Revision: 201003 default PDK_3.0.g
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 01:12:20 +0200
changeset 0 f5a58ecadc66
child 3 2811ce8b1bfb
Revision: 201003
layers.sysdef.xml
package_definition.xml
servicediscoveryandcontrol/pnp/bwins/rpnpu.def
servicediscoveryandcontrol/pnp/eabi/rpnpu.def
servicediscoveryandcontrol/pnp/group/bld.inf
servicediscoveryandcontrol/pnp/group/rpnp.iby
servicediscoveryandcontrol/pnp/group/rpnp.mmp
servicediscoveryandcontrol/pnp/group/servicediscoveryframework.mrp
servicediscoveryandcontrol/pnp/inc/ccontrolchannelbase.h
servicediscoveryandcontrol/pnp/inc/cpnpservicediscoverybase.h
servicediscoveryandcontrol/pnp/inc/cpnpservicepublisherbase.h
servicediscoveryandcontrol/pnp/inc/mpnpobserver.h
servicediscoveryandcontrol/pnp/inc/pnp.h
servicediscoveryandcontrol/pnp/inc/pnpconstants.h
servicediscoveryandcontrol/pnp/inc/pnpparameterbundle.h
servicediscoveryandcontrol/pnp/inc/rcontrolchannel.h
servicediscoveryandcontrol/pnp/inc/rpnpservicediscovery.h
servicediscoveryandcontrol/pnp/inc/rpnpservicepublisher.h
servicediscoveryandcontrol/pnp/src/cpnpservicediscoverybase.cpp
servicediscoveryandcontrol/pnp/src/cpnpservicepublisherbase.cpp
servicediscoveryandcontrol/pnp/src/pnpparameterbundle.cpp
servicediscoveryandcontrol/pnp/src/rcontrolchannel.cpp
servicediscoveryandcontrol/pnp/src/rpnpservicediscovery.cpp
servicediscoveryandcontrol/pnp/src/rpnpservicepublisher.cpp
servicediscoveryandcontrol/pnp/test/integtest/data/testpnp.ini
servicediscoveryandcontrol/pnp/test/integtest/data/testpnp.script
servicediscoveryandcontrol/pnp/test/integtest/group/bld.inf
servicediscoveryandcontrol/pnp/test/integtest/group/testpnp.iby
servicediscoveryandcontrol/pnp/test/integtest/group/testpnp.mmp
servicediscoveryandcontrol/pnp/test/integtest/inc/constants.h
servicediscoveryandcontrol/pnp/test/integtest/inc/testpnp.h
servicediscoveryandcontrol/pnp/test/integtest/inc/testpnpmanager.h
servicediscoveryandcontrol/pnp/test/integtest/src/testpnp.cpp
servicediscoveryandcontrol/pnp/test/integtest/src/testpnpmanager.cpp
servicediscoveryandcontrol/pnp/test/testplugin/group/bld.inf
servicediscoveryandcontrol/pnp/test/testplugin/group/testplugin.mmp
servicediscoveryandcontrol/pnp/test/testplugin/inc/ctestcontrolchannel.h
servicediscoveryandcontrol/pnp/test/testplugin/inc/ctestpnpservicediscoveryimpl.h
servicediscoveryandcontrol/pnp/test/testplugin/inc/ctestpnpservicepublisherimpl.h
servicediscoveryandcontrol/pnp/test/testplugin/inc/testpnpconstants.h
servicediscoveryandcontrol/pnp/test/testplugin/inc/testpnpparamset.h
servicediscoveryandcontrol/pnp/test/testplugin/inc/testpnpparamset.inl
servicediscoveryandcontrol/pnp/test/testplugin/inc/testpnpparamsextfactory.h
servicediscoveryandcontrol/pnp/test/testplugin/src/2025D05D.rss
servicediscoveryandcontrol/pnp/test/testplugin/src/ctestcontrolchannel.cpp
servicediscoveryandcontrol/pnp/test/testplugin/src/ctestpnpservicediscovery.cpp
servicediscoveryandcontrol/pnp/test/testplugin/src/ctestpnpservicepublisher.cpp
servicediscoveryandcontrol/pnp/test/testplugin/src/ecom_testimpl.cpp
servicediscoveryandcontrol/pnp/test/testplugin/src/testpnpparamsextfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/bwins/pnpu.def
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/eabi/pnpu.def
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/group/pnp.mmp
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/ccontrolchannel.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/cpnpservicediscoverybase.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/cpnpservicepublisherbase.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/mpnpobserver.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/mupnpeventnotification.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/pnpparameterbundle.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/rcontrolchannel.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/rpnpservicediscovery.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/rpnpservicepublisher.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/upnpconstants.h
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/ccontrolchannel.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/cpnpservicediscoverybase.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/cpnpservicepublisherbase.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/pnpparameterbundle.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/rcontrolchannel.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/rpnpservicediscovery.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/rpnpservicepublisher.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/group/upnp.mmp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/ccallbackargument.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/ctimermappeduri.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/ctimermappeduri.inl
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpdescribe.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpelement.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpelementarray.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpeventhandler.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpeventnotifier.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnppublisher.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpregisternotify.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpsearch.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpservicediscoveryimpl.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpservicepublisherimpl.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpsubscribe.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/mupnpeventnotification.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/pnputils.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpparamset.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpparamset.inl
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpparamsextfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpsubconnevents.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpsubconnevents.inl
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpsubconneventsfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/2000D05D.rss
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/ccallbackargument.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/ccontrolchannel.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cpnpservicediscovery.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cpnpservicepublisher.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpdescribe.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpelement.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpelementarray.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpeventhandler.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpeventnotifier.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnppublisher.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpregisternotify.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpsearch.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpsubscribe.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/ecom_impl.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/pnputils.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/upnpparamsextfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/upnpsubconneventsfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/group/UPnPIntegTest.iby
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/group/multiple_machines_client.mmp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/group/multiple_machines_server.mmp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/inc/testupnp.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/src/testupnpmanager.cpp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/Scripts/testdelay.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/group/testdelay.iby
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/group/testdelay.mmp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/inc/testdelay.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/inc/testupnp.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/src/testdelay.cpp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/src/testupnp.cpp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/Scripts/test_synchronize_client.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/Scripts/test_synchronize_server.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/TestData/Ini_Files/test_synchronize_client.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/test_synchronize_client.iby
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/test_synchronize_client.mmp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/test_synchronize_server.iby
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/test_synchronize_server.mmp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/inc/testupnp.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/inc/testupnpmanager.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/src/testupnp.cpp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/src/testupnpmanager.cpp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0002.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0003.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0004.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0005.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0006.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0007.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0008.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0009.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0010.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0011.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0012.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0013.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0014.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0015.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0016.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0017.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0018.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/discover_low_ver.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/discover_low_ver_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/discover_low_ver_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/test_synchronize_client.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/test_synchronize_server.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_abruptclose_describe_44_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_abruptclose_describe_44_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_abruptclose_discovery_43_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_abruptclose_discovery_43_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_describe_0001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_describe_0001_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_discovery.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_discovery_0001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_discovery_0001_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_discovery_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_register_notify_0037_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_register_notify_0037_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_describe_0001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_initiateaction_0019.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_initiateaction_0019_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_initiateaction_0019_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_initiateaction_0019_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_open_discovery_001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_open_discovery_001_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_publish_regression.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_refresh_advertisement_0045_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_refresh_advertisement_0045_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_refresh_advertisement_0045_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_refresh_advertisement_0045_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_10.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_10_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_11.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_11_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_12.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_12_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_13.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_13_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_7.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_7_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_8.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_8_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_9.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_9_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_10.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_10_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_7.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_7_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_8.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_8_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_9.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_9_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_send_notify_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_send_notify_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_unsubscribe_0042_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_unsubscribe_0042_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_unsubscribe_0042_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_unsubscribe_0042_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_3+2d+k_advertisements_0051.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_10.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_10_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_11.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_11_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_12.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_12_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_13.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_13_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_14.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_14_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_15.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_15_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_16.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_16_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_7.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_7_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_8.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_8_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_9.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_9_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0062_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0062_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_discovery_response_time_0049_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_discovery_response_time_0049_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_root_0001_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_root_0001_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_service_description_0031.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0002.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0003.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0004.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0005.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0006.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0007.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0008.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0009.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0010.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0011.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0012.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0013.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0014.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0015.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0016.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0017.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0018.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/discover_low_ver.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/discover_low_ver_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/discover_low_ver_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/multiple_machines_client.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/test_synchronize_client.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/test_synchronize_server.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_abruptclose_describe_44_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_abruptclose_describe_44_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_abruptclose_discovery_43_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_abruptclose_discovery_43_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery_0001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery_0001_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_register_notify_0037_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_register_notify_0037_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_describe_0001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_initiateaction_0019.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_initiateaction_0019_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_initiateaction_0019_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_initiateaction_0019_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_open_discovery_001.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_open_discovery_001_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_publish_regression.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_refresh_advertisement_0045_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_refresh_advertisement_0045_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_refresh_advertisement_0045_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_refresh_advertisement_0045_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_7_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_10.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_10_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_11.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_11_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_12.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_12_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_13.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_13_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_14_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_15_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_7.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_7_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_8.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_8_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_9.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_9_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_10.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_10_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_7.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_7_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_8.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_8_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_9.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_9_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_send_notify_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_send_notify_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_unsubscribe_0042_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_unsubscribe_0042_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_unsubscribe_0042_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_unsubscribe_0042_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_10.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_10_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_11.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_11_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_12.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_12_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_13.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_13_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_14.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_14_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_15.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_15_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_16.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_16_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_7.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_7_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_8.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_8_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_9.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_9_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0062_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0062_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_discovery_response_time_0049_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_discovery_response_time_0049_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_root_0001_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_root_0001_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_1.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_1_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_2.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_2_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_3.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_3_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_4.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_4_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_5.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_5_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_6.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_6_rev.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_service_description_0031.script
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/iconfiles/playstation1.png
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/iconfiles/playstation2.png
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/iconfiles/playstation3.png
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/iconfiles/playstation4.png
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/action.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/actionresponse.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/AVTransport1.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/AVTransport2.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ConnectionManager1.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ConnectionManager2.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ContentDirectory1.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ContentDirectory2.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/Feeder1.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/RenderingControl1.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/RenderingControl2.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/Scan1.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ScheduledRecording1.xml
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/canceldiscovery.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/canceldiscovery_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0029.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0029_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0030.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0030_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0060.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0060_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discover_low_ver.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0001.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0002.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0003.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0004.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0005.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0006.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0007.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0008.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0009.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0010.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0011.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0012.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0013.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0014.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0015.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0016.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0017.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0018.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0019.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0020.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery_0048.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery_0048_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery_0049.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery_0049_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/initiateaction_0019.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/initiateaction_0019_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/multiplemachines.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/opendiscovery_001.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/opendiscovery_001_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0001.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0001_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0061.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0061_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0062.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0062_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/refresh_adv_0045.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/refresh_adv_0045_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register_0036.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register_0036_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register_0037.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register_0037_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/sendnotify.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/sendnotify_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0038.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0038_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0039.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0039_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0042.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0042_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/upnp_abruptclosecp.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/upnp_abruptclosecp_rev.ini
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/multiple_machines_client.iby
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/multiple_machines_client.mmp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/multiple_machines_server.iby
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/multiple_machines_server.mmp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/single_machine.mmp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/constants.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/testrcontrolchannel.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/testupnp.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/testupnpmanager.h
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/src/testrcontrolchannel.cpp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/src/testupnp.cpp
servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/src/testupnpmanager.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/bwins/appprotintfmsgsu.def
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/eabi/appprotintfmsgsu.def
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/group/appprotintf.mmp
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/group/appprotintfmsgs.mmp
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf.h
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_base.h
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_fact.h
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_msgs.h
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_tcp.h
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_udp.h
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/2000D05C.rss
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_base.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_fact.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_msgs.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_tcp.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_udp.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpcpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlcpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlcpractivities.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlcprfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrldeftscpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrldeftscpractivities.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlscpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlscpractivities.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlscprfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlscprstates.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpmcpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpmcpractivities.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpmcprfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpscpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpstatemachine.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnptiermanager.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnptiermanageractivities.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnptiermanagerfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnptiermanagerselector.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/ecom_impl.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpcpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlcpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlcpractivities.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlcprfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrldeftscpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrldeftscpractivities.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlscpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlscpractivities.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlscprfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlscprstates.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpmcpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpmcpractivities.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpmcprfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpscpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpstatemachine.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnptiermanager.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnptiermanageractivities.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnptiermanagerfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnptiermanagerselector.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/chttpclienthandler.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/cprotocolhandler.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/csoapparser.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/csoapparser.inl
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/ctransaction.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/cupnptimer.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/genericcontainer.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpclientflow.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpclientflow.inl
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpevent.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpmudpflow.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpserver.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpserverflow.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpserverflow.inl
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpserverhandler.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpudpflow.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpflowbase.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpflowfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnplog.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpmemoryutils.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnppint.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpserverconstants.h
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/chttpclienthandler.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/cprotocolhandler.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/csoapparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/ctransaction.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/cupnptimer.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/genericcontainer.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpclientflow.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpmudpflow.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpserver.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpserverflow.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpserverhandler.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpudpflow.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnpflowbase.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnpflowfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnpmemoryutils.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnppint.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnppintfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicecpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicecpractivities.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicecprfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicecprstates.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicedeftscpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicedeftscpractivities.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicedeftscprstates.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicescpr.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicescpractivities.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicescprfactory.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicescprstates.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpsppublishinfo.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpsppublishinfo.inl
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpsppublishinfocontainer.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpspsubscribeinfo.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpspsubscribeinfo.inl
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpspsubscribeinfocontainer.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpspsubscribeinfocontainer.inl
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpuuid.h
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicecpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicecpractivities.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicecprfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicecprstates.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicedeftscpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicedeftscpractivities.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicedeftscprstates.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicescpr.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicescpractivities.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicescprfactory.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicescprstates.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpsppublishinfocontainer.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpuuid.cpp
servicediscoveryandcontrol/pnp/test/upnp/Server/StringDictionary/upnpdeviceschema.st
servicediscoveryandcontrol/pnp/test/upnp/Server/StringDictionary/upnpserviceschema.st
servicediscoveryandcontrol/pnp/test/upnp/Server/group/2000D053.rss
servicediscoveryandcontrol/pnp/test/upnp/Server/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/Server/group/upnpserver.iby
servicediscoveryandcontrol/pnp/test/upnp/Server/group/upnpserver.mmp
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/bwins/sockethandleru.def
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/eabi/sockethandleru.def
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/group/sockethandler.iby
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/group/sockethandler.mmp
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/csockethandler.h
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/csocketopener.h
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/rsockethandler.h
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/sockhandlerdefs.h
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/src/csockethandler.cpp
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/src/csocketopener.cpp
servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/src/rsockethandler.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/bwins/chunkmgru.def
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/eabi/chunkmgru.def
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/group/chunkmgr.mmp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/cchunkallocator.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/cchunkmanager.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/cmemchunk.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/rchunkpool.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/rmemcell.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/rmemchunk.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/cchunkallocator.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/cchunkmanager.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/cmemchunk.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/rchunkpool.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/rmemcell.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/rmemchunk.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/data/chunkmgr_test.script
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/group/chunkmgrtest.iby
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/group/ts_chunkmgr.mmp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/chunkmgrteststepbase.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test01createdeletechunkmgr.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test02allocdealloc.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test03allocerror.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test04defaultheapfreecheck.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test05allocdeallocperformance.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test06alloccheckblocksize.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test07exhaustchunkpools.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test08multiplethreads.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/testsuitechunkmgr.h
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/chunkmgrteststepbase.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test01createdeletechunkmgr.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test02allocdealloc.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test03allocerror.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test04defaultheapfreecheck.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test05allocdeallocperformance.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test06alloccheckblocksize.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test07exhaustchunkpools.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test08multiplethreads.cpp
servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/testsuitechunkmgr.cpp
servicediscoveryandcontrol/pnp/test/upnp/codec/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/codec/group/upnpcodec.mmp
servicediscoveryandcontrol/pnp/test/upnp/codec/inc/cupnpcodec.h
servicediscoveryandcontrol/pnp/test/upnp/codec/inc/cupnpheaderreader.h
servicediscoveryandcontrol/pnp/test/upnp/codec/inc/cupnpheaderwriter.h
servicediscoveryandcontrol/pnp/test/upnp/codec/src/2001c597.RSS
servicediscoveryandcontrol/pnp/test/upnp/codec/src/cupnpcodec.cpp
servicediscoveryandcontrol/pnp/test/upnp/codec/src/cupnpheaderreader.cpp
servicediscoveryandcontrol/pnp/test/upnp/codec/src/cupnpheaderwriter.cpp
servicediscoveryandcontrol/pnp/test/upnp/codec/src/upnpcodecmain.cpp
servicediscoveryandcontrol/pnp/test/upnp/group/application-protocols_upnp.mrp
servicediscoveryandcontrol/pnp/test/upnp/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/group/commsdbg.ini
servicediscoveryandcontrol/pnp/test/upnp/group/device.xml
servicediscoveryandcontrol/pnp/test/upnp/group/runtests.iby
servicediscoveryandcontrol/pnp/test/upnp/group/te_upnp.cfg
servicediscoveryandcontrol/pnp/test/upnp/group/te_upnp_wifi_ethernet.cfg
servicediscoveryandcontrol/pnp/test/upnp/group/upnp.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/bwins/tcpclientu.def
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/eabi/tcpclientu.def
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/group/tcpclient.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/group/tcpclient.mmp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/atestsocket.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/cpipeliningtestcase.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp1.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp10.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp11.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp12.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp13.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp14.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp2.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp3.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp4.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp5.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp6.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp7.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp8.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp9.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctestserversockethandler.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/es_ptest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/mtcpclienttestcase.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/protocolfamily.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/proxyprotocol.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ptcpclienttests.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/testtcpserver.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/cpipeliningtestcase.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp1.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp10.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp11.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp12.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp13.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp14.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp2.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp3.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp4.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp5.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp6.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp7.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp8.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp9.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctestserversockethandler.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/protocolfamily.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/proxyprotocol.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ptcpclienttests.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/testtcpserver.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/bwins/tcpserveru.def
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/eabi/tcpserveru.def
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/group/tcpserver.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/group/tcpserver.mmp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/atestsocket.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestcase.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp1.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp10.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp11.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp12.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp13.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp14.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp15.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp16.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp17.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp18.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp19.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp2.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp20.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp21.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp22.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp23.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp24.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp25.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp26.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp27.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp28.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp29.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp3.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp30.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp31.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp32.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp33.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp34.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp4.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp41.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp5.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp6.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp7.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp8.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp9.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/protocolfamily.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/proxyprotocol.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ptcpservertests.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestcase.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp1.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp10.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp11.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp12.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp13.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp14.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp15.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp16.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp17.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp18.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp19.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp2.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp20.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp21.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp22.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp23.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp24.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp25.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp26.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp27.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp28.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp29.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp3.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp30.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp31.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp32.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp33.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp34.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp4.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp41.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp5.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp6.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp7.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp8.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp9.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/protocolfamily.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/proxyprotocol.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ptcpservertests.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/data/ip.proxy.tcpclient.esk
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/data/ip.proxy.tcpserver.esk
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/data/ip.proxy.udpclient.esk
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/data/ip.proxy.udpserver.esk
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/group/te_serverbase.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/group/te_serverbase.mmp
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/inc/es_dummy.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/inc/te_serverbase.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/inc/te_serverbaseteststep.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/dummy.ini
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_tcpclient.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_tcpclient_test_with_config.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_tcpserver.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_tcpserver_test_with_config.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_test_copy_config_files.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_test_remove_config_files.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_udpclient.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_udpclient_test_with_config.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_udpserver.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_udpserver_test_with_config.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/src/te_serverbase.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/src/te_serverbaseteststep.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/testclient/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/unittests/testclient/group/testupnpclientserver.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/testclient/group/testupnpclientserver.mmp
servicediscoveryandcontrol/pnp/test/upnp/unittests/testclient/src/testclientstep.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/bwins/udpclientu.def
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/eabi/udpclientu.def
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/group/udpclient.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/group/udpclient.mmp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/es_ptest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/protocolfamily.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/proxyprotocol.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/pudpclienttests.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/testmudpserver.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/src/protocolfamily.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/src/proxyprotocol.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/src/pudpclienttests.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/src/testmudpserver.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/bwins/udpserveru.def
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/eabi/udpserveru.def
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/group/udpserver.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/group/udpserver.mmp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/inc/protocolfamily.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/inc/proxyprotocol.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/inc/pudpservertests.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/src/protocolfamily.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/src/proxyprotocol.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/src/pudpservertests.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/StringDictionary/testvendordeviceschema.st
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/StringDictionary/testvendorserviceschema.st
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/group/testupnpdescriptionserver.mmp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/group/upnpdescriptiontest.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/inc/testupnpdescriptionserver.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/inc/testupnpdescriptionservicestep.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/ini/testupnpdescriptionsuite.ini
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/script/testupnpdescriptionsuite.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/src/testupnpdescriptionserver.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/src/testupnpdescriptionservicestep.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_DEF126707.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input1.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input2.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input3.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input4.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input5.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input6.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg1.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg10.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg11.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg12.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg13.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg14.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg15.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg16.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg17.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg18.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg19.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg2.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg20.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg21.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg22.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg23.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg24.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg3.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg4.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg5.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg6.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg7.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg8.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg9.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_DEF126707.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input1.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input2.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input3.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input4.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input5.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg1.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg10.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg11.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg12.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg13.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg14.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg15.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg16.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg17.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg18.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg19.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg2.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg20.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg21.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg22.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg23.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg24.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg25.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg26.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg27.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg3.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg4.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg5.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg6.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg7.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg8.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg9.xml
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest.ini
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_codec_tests.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_codec_tests_oom.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_composer_tests.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_composer_tests_oom.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_1.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_1_oom.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_2.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_2_oom.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_3.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_3_oom.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_response_composer_tests.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_response_composer_tests_oom.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_response_parser_tests.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_response_parser_tests_oom.script
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/group/upnpmessagetest.iby
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/group/upnpmessagetest.mmp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/ccodecdecodetest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/ccodecencodetest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnpmessagetest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnprequestcomposertest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnprequestparsertest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnpresponsecomposertest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnpresponseparsertest.h
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/ccodecdecodetest.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/ccodecencodetest.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnpmessagetest.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnprequestcomposertest.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnprequestparsertest.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnpresponsecomposertest.cpp
servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnpresponseparsertest.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/StringDictionary/upnpdescriptionschema.st
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/bwins/upnpdescriptionu.def
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/eabi/upnpdescriptionu.def
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/group/upnpdescription.mmp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cactionparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cargumentparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cattribute.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpdeviceparam.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpdeviceparam.inl
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpserviceparam.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpserviceparam.inl
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cstatetableparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cstringpoolmanager.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpdescriptioncomposer.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpdescriptionparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpdevicecomposer.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpproperty.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpproperty.inl
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpservicecomposer.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/deviceiconparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/deviceinfoparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/parsehandlerbase.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/parsehandlerbase.inl
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/rootdeviceparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/rootserviceparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/serviceinfoparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/specversionparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/tattributeiter.h
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cactionparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cargumentparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cattribute.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cpnpdeviceparam.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cpnpserviceparam.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cstatetableparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cstringpoolmanager.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpdescriptioncomposer.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpdescriptionparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpdevicecomposer.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpproperty.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpservicecomposer.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/deviceiconparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/deviceinfoparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/parsehandlerbase.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/rootdeviceparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/rootserviceparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/serviceinfoparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/specversionparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/tattributeiter.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/bwins/upnpmessageu.DEF
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/eabi/upnpmessageu.def
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/group/upnpmessage.mmp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CHeaderField.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CHeaders.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CMessage.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CMessage.inl
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CRequest.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CRequest.inl
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CResponse.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CResponse.inl
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnpmessagecomposer.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnprequestcomposer.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnprequestparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnpresponsecomposer.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnpresponseparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/mcomposerobserver.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/mhttpmessagecomposerobserver.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/mhttpmessageparserobserver.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/mparserobserver.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rhttpheaders.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rhttpmessagecomposer.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rhttpmessageparser.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rrequest.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rresponse.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rupnpmessage.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/tupnpmessagepanic.h
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CHeaderField.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CHeaders.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CMessage.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CRequest.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CResponse.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/RResponse.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnpmessagecomposer.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnprequestcomposer.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnprequestparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnpresponsecomposer.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnpresponseparser.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/rhttpheaders.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/rrequest.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/rupnpmessage.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/tupnpmessagepanic.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnputils/bwins/upnputilsu.DEF
servicediscoveryandcontrol/pnp/test/upnp/upnputils/eabi/upnputilsu.def
servicediscoveryandcontrol/pnp/test/upnp/upnputils/group/bld.inf
servicediscoveryandcontrol/pnp/test/upnp/upnputils/group/upnputils.mmp
servicediscoveryandcontrol/pnp/test/upnp/upnputils/inc/pnpextparameterfamily.h
servicediscoveryandcontrol/pnp/test/upnp/upnputils/inc/pnpextparameterfamily.inl
servicediscoveryandcontrol/pnp/test/upnp/upnputils/inc/tupnptable.h
servicediscoveryandcontrol/pnp/test/upnp/upnputils/inc/upnp_cf_msgs.h
servicediscoveryandcontrol/pnp/test/upnp/upnputils/src/tupnptable.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnputils/src/upnp_cf_msgs.cpp
servicediscoveryandcontrol/pnp/test/upnp/upnputils/strings/UpnpStringConstants.st
srvdiscovery_info/srvdiscovery_metadata/srvdiscovery_metadata.mrp
sysdef_1_4_0.dtd
upnp/group/bld.inf
upnp/group/upnpplatformvar.hrh
upnp/upnpstack/cenrep/keys_upnpstack.xls
upnp/upnpstack/conf/upnpstack.confml
upnp/upnpstack/conf/upnpstack_101f9784.crml
upnp/upnpstack/controlpointbase/BWINS/UpnpControlPointBaseu.def
upnp/upnpstack/controlpointbase/eabi/UpnpControlPointBaseu.def
upnp/upnpstack/controlpointbase/group/bld.inf
upnp/upnpstack/controlpointbase/group/upnpcontrolpointbase.mmp
upnp/upnpstack/controlpointbase/inc/upnpcpbcurrenthttpclient.h
upnp/upnpstack/controlpointbase/inc/upnpcpbdescriptionagent.h
upnp/upnpstack/controlpointbase/inc/upnpcpbdevicedescription.h
upnp/upnpstack/controlpointbase/inc/upnpcpbdevicelistutils.h
upnp/upnpstack/controlpointbase/inc/upnpcpbdevicerepository.h
upnp/upnpstack/controlpointbase/inc/upnpcpbdiscoveryagent.h
upnp/upnpstack/controlpointbase/inc/upnpcpbembeddeddevicedescription.h
upnp/upnpstack/controlpointbase/inc/upnpcpbhttpmessagecontroller.h
upnp/upnpstack/controlpointbase/inc/upnpcpbinitialeventretry.h
upnp/upnpstack/controlpointbase/inc/upnpcpbinitialeventretryhandler.h
upnp/upnpstack/controlpointbase/inc/upnpcpbsimpledevicedescription.h
upnp/upnpstack/controlpointbase/inc/upnpcphttprequestor.h
upnp/upnpstack/controlpointbase/inc/upnpcphttprequestorimpl.h
upnp/upnpstack/controlpointbase/inc/upnpcphttprequestorimplbase.h
upnp/upnpstack/controlpointbase/inc/upnpcpstackrequestor.h
upnp/upnpstack/controlpointbase/inc/upnpcpstackrequestorimpl.h
upnp/upnpstack/controlpointbase/inc/upnpcpstackrequestorimplbase.h
upnp/upnpstack/controlpointbase/inc/upnpdevicedescriptionhttptransaction.h
upnp/upnpstack/controlpointbase/inc/upnpfilesender.h
upnp/upnpstack/controlpointbase/inc/upnpservicedescriptionhttptransaction.h
upnp/upnpstack/controlpointbase/inc/upnpserviceinfo.h
upnp/upnpstack/controlpointbase/inc/upnpservicesubscriptionhttptransaction.h
upnp/upnpstack/controlpointbase/inc/upnpserviceunsubscriptionhttptransaction.h
upnp/upnpstack/controlpointbase/inc/upnpsoapactionhttptransaction.h
upnp/upnpstack/controlpointbase/src/upnpcontrolpoint.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbcurrenthttpclient.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbdescriptionagent.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbdevicedescription.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbdevicelistutils.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbdevicerepository.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbdiscoveryagent.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbembeddeddevicedescription.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbinitialeventretry.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbinitialeventretryhandler.cpp
upnp/upnpstack/controlpointbase/src/upnpcpbsimpledevicedescription.cpp
upnp/upnpstack/controlpointbase/src/upnpcphttprequestorimpl.cpp
upnp/upnpstack/controlpointbase/src/upnpcphttprequestorimplbase.cpp
upnp/upnpstack/controlpointbase/src/upnpcpstackrequestorimpl.cpp
upnp/upnpstack/controlpointbase/src/upnpcpstackrequestorimplbase.cpp
upnp/upnpstack/controlpointbase/src/upnpdevicedescriptionhttptransaction.cpp
upnp/upnpstack/controlpointbase/src/upnpfilesender.cpp
upnp/upnpstack/controlpointbase/src/upnpservicedescriptionhttptransaction.cpp
upnp/upnpstack/controlpointbase/src/upnpserviceinfo.cpp
upnp/upnpstack/controlpointbase/src/upnpservicesubscriptionhttptransaction.cpp
upnp/upnpstack/controlpointbase/src/upnpserviceunsubscriptionhttptransaction.cpp
upnp/upnpstack/controlpointbase/src/upnpsoapactionhttptransaction.cpp
upnp/upnpstack/data/homemedia.sis
upnp/upnpstack/data/upnpstack.sis
upnp/upnpstack/data/upnpstack_withRADA.SIS
upnp/upnpstack/data/upnpstack_withRADA.pkg
upnp/upnpstack/dlnawebserver/BWINS/DLNAwebserveru.def
upnp/upnpstack/dlnawebserver/eabi/DLNAwebserveru.def
upnp/upnpstack/dlnawebserver/group/bld.inf
upnp/upnpstack/dlnawebserver/group/dlnawebserver.mmp
upnp/upnpstack/dlnawebserver/inc/upnphttpbuffer.h
upnp/upnpstack/dlnawebserver/inc/upnphttpchunkfiletransferreader.h
upnp/upnpstack/dlnawebserver/inc/upnphttpchunkparser.h
upnp/upnpstack/dlnawebserver/inc/upnphttpfileaccess.h
upnp/upnpstack/dlnawebserver/inc/upnphttpfiletransferreader.h
upnp/upnpstack/dlnawebserver/inc/upnphttpfiletransferwriter.h
upnp/upnpstack/dlnawebserver/inc/upnphttpserver.h
upnp/upnpstack/dlnawebserver/inc/upnphttpsession.h
upnp/upnpstack/dlnawebserver/inc/upnprangeheaderparser.h
upnp/upnpstack/dlnawebserver/inc/upnpretrywrite.h
upnp/upnpstack/dlnawebserver/inc/upnpsocketshutdown.h
upnp/upnpstack/dlnawebserver/inc/upnptcpserver.h
upnp/upnpstack/dlnawebserver/inc/upnptcpsession.h
upnp/upnpstack/dlnawebserver/inc/upnptcpsessionreader.h
upnp/upnpstack/dlnawebserver/inc/upnptcpsessionwriter.h
upnp/upnpstack/dlnawebserver/src/upnphttpbuffer.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpchunkfiletransferreader.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpchunkparser.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpfileaccess.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpfiletransferreader.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpfiletransferwriter.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpserver.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpserverruntime.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpserversession.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpservertransaction.cpp
upnp/upnpstack/dlnawebserver/src/upnphttpsession.cpp
upnp/upnpstack/dlnawebserver/src/upnprangeheaderparser.cpp
upnp/upnpstack/dlnawebserver/src/upnpretrywrite.cpp
upnp/upnpstack/dlnawebserver/src/upnpsocketshutdown.cpp
upnp/upnpstack/dlnawebserver/src/upnptcpserver.cpp
upnp/upnpstack/dlnawebserver/src/upnptcpsession.cpp
upnp/upnpstack/dlnawebserver/src/upnptcpsessionreader.cpp
upnp/upnpstack/dlnawebserver/src/upnptcpsessionwriter.cpp
upnp/upnpstack/group/bld.inf
upnp/upnpstack/messagehandler/group/bld.inf
upnp/upnpstack/messagehandler/group/messagehandler.mmp
upnp/upnpstack/messagehandler/inc/upnpcustomlog.h
upnp/upnpstack/messagehandler/inc/upnpipfiltering.h
upnp/upnpstack/messagehandler/inc/upnpipfilteringdnsquery.h
upnp/upnpstack/messagehandler/inc/upnpmessagehandler.h
upnp/upnpstack/messagehandler/inc/upnpmessagehandler.pan
upnp/upnpstack/messagehandler/inc/upnpmessagehandlerengine.h
upnp/upnpstack/messagehandler/inc/upnpmessagehandlerengineobserver.h
upnp/upnpstack/messagehandler/inc/upnpmessagehandlerobserver.h
upnp/upnpstack/messagehandler/inc/upnpmessagehandlersession.h
upnp/upnpstack/messagehandler/inc/upnpmhcommon.h
upnp/upnpstack/messagehandler/inc/upnpssdphandlerbase.h
upnp/upnpstack/messagehandler/inc/upnpssdphandlerdown.h
upnp/upnpstack/messagehandler/inc/upnpssdphandlerup.h
upnp/upnpstack/messagehandler/src/upnpipfiltering.cpp
upnp/upnpstack/messagehandler/src/upnpipfilteringdnsquery.cpp
upnp/upnpstack/messagehandler/src/upnpmessagehandler.cpp
upnp/upnpstack/messagehandler/src/upnpmessagehandlerengine.cpp
upnp/upnpstack/messagehandler/src/upnpmessagehandlersession.cpp
upnp/upnpstack/messagehandler/src/upnpssdphandlerbase.cpp
upnp/upnpstack/messagehandler/src/upnpssdphandlerdown.cpp
upnp/upnpstack/messagehandler/src/upnpssdphandlerup.cpp
upnp/upnpstack/rom/upnpstack.iby
upnp/upnpstack/rom/upnpstack_stub.iby
upnp/upnpstack/rom/upnpstack_withRADA.iby
upnp/upnpstack/serviceframework/BWINS/UpnpServiceFrameworku.def
upnp/upnpstack/serviceframework/data/2000f881.cre
upnp/upnpstack/serviceframework/data/backup_registration.xml
upnp/upnpstack/serviceframework/eabi/UpnpServiceFrameworku.def
upnp/upnpstack/serviceframework/group/bld.inf
upnp/upnpstack/serviceframework/group/upnpserviceframework.mmp
upnp/upnpstack/serviceframework/inc/upnpactioncontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpactionlistcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpactionnamecontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpallowedvaluelistcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpallowedvaluerangecontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpargumentcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpargumentlistcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpbasecontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpbodyofsoapcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpcontenthandler.inl
upnp/upnpstack/serviceframework/inc/upnpcontenthandlerscontroller.h
upnp/upnpstack/serviceframework/inc/upnpdevicecontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpdevicelistcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpdeviceliterals.h
upnp/upnpstack/serviceframework/inc/upnpdevicetagcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpdispatcher.pan
upnp/upnpstack/serviceframework/inc/upnpdispatcherengine.h
upnp/upnpstack/serviceframework/inc/upnpdispatcherrequest.h
upnp/upnpstack/serviceframework/inc/upnpdispatchersession.h
upnp/upnpstack/serviceframework/inc/upnperrorcodeseekercontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpeventcontroller.h
upnp/upnpstack/serviceframework/inc/upnpeventqueuemanagerbase.h
upnp/upnpstack/serviceframework/inc/upnpgenamessage.h
upnp/upnpstack/serviceframework/inc/upnpgenamessagefactory.h
upnp/upnpstack/serviceframework/inc/upnphttpclientengine.h
upnp/upnpstack/serviceframework/inc/upnphttpinitialeventtransaction.h
upnp/upnpstack/serviceframework/inc/upnphttpmessagesender.h
upnp/upnpstack/serviceframework/inc/upnphttpmessagesenderowner.h
upnp/upnpstack/serviceframework/inc/upnphttpmoderatedeventtransaction.h
upnp/upnpstack/serviceframework/inc/upnphttpnonmoderatedeventtransaction.h
upnp/upnpstack/serviceframework/inc/upnphttpservertransactiondescription.h
upnp/upnpstack/serviceframework/inc/upnphttpservertransactionhandler.h
upnp/upnpstack/serviceframework/inc/upnphttptransaction.h
upnp/upnpstack/serviceframework/inc/upnpiconcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpiconlistcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpignorecontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpinitialeventqueuemanager.h
upnp/upnpstack/serviceframework/inc/upnpmoderatedeventqueuemanager.h
upnp/upnpstack/serviceframework/inc/upnpnonmoderatedeventqueuemanager.h
upnp/upnpstack/serviceframework/inc/upnppropertysetcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnprootcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpscpdcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpservicecontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpservicelistcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpserviceliterals.h
upnp/upnpstack/serviceframework/inc/upnpservicestatetablecontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpservicetagcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpsilentdeviceimplcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpsilentdeviceimplementation.h
upnp/upnpstack/serviceframework/inc/upnpsingletagcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpsoapcontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpsoapliterals.h
upnp/upnpstack/serviceframework/inc/upnpsoapmessage.h
upnp/upnpstack/serviceframework/inc/upnpsoapmessagefactory.h
upnp/upnpstack/serviceframework/inc/upnpsoapparser.h
upnp/upnpstack/serviceframework/inc/upnpstatevariablecontenthandler.h
upnp/upnpstack/serviceframework/inc/upnpsubscriberlibrary.h
upnp/upnpstack/serviceframework/inc/upnpsubscriberlibraryelement.h
upnp/upnpstack/serviceframework/src/upnpaction.cpp
upnp/upnpstack/serviceframework/src/upnpactioncontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpactionlistcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpactionnamecontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpallowedvaluelistcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpallowedvaluerangecontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpargument.cpp
upnp/upnpstack/serviceframework/src/upnpargumentcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpargumentlistcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpbodyofsoapcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpcontenthandlerscontroller.cpp
upnp/upnpstack/serviceframework/src/upnpdescriptionproperty.cpp
upnp/upnpstack/serviceframework/src/upnpdevice.cpp
upnp/upnpstack/serviceframework/src/upnpdevicecontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpdevicedescription.cpp
upnp/upnpstack/serviceframework/src/upnpdevicedescriptionrequest.cpp
upnp/upnpstack/serviceframework/src/upnpdevicedescriptionstore.cpp
upnp/upnpstack/serviceframework/src/upnpdeviceimplementation.cpp
upnp/upnpstack/serviceframework/src/upnpdeviceimplementationbase.cpp
upnp/upnpstack/serviceframework/src/upnpdevicelistcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpdevicetagcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpdispatcher.cpp
upnp/upnpstack/serviceframework/src/upnpdispatcherengine.cpp
upnp/upnpstack/serviceframework/src/upnpdispatcherrequest.cpp
upnp/upnpstack/serviceframework/src/upnpdispatchersession.cpp
upnp/upnpstack/serviceframework/src/upnperrorcodeseekercontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpeventcontroller.cpp
upnp/upnpstack/serviceframework/src/upnpeventqueuemanagerbase.cpp
upnp/upnpstack/serviceframework/src/upnpgenamessage.cpp
upnp/upnpstack/serviceframework/src/upnpgenamessagefactory.cpp
upnp/upnpstack/serviceframework/src/upnphttpclientengine.cpp
upnp/upnpstack/serviceframework/src/upnphttpinitialeventtransaction.cpp
upnp/upnpstack/serviceframework/src/upnphttpmessagesender.cpp
upnp/upnpstack/serviceframework/src/upnphttpmoderatedeventtransaction.cpp
upnp/upnpstack/serviceframework/src/upnphttpnonmoderatedeventtransaction.cpp
upnp/upnpstack/serviceframework/src/upnphttpservertransactiondescription.cpp
upnp/upnpstack/serviceframework/src/upnphttpservertransactionhandler.cpp
upnp/upnpstack/serviceframework/src/upnphttptransaction.cpp
upnp/upnpstack/serviceframework/src/upnpicon.cpp
upnp/upnpstack/serviceframework/src/upnpiconcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpiconlistcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpignorecontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpinitialeventqueuemanager.cpp
upnp/upnpstack/serviceframework/src/upnpmoderatedeventqueuemanager.cpp
upnp/upnpstack/serviceframework/src/upnpnonmoderatedeventqueuemanager.cpp
upnp/upnpstack/serviceframework/src/upnppropertysetcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnprootcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpscpdcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpservice.cpp
upnp/upnpstack/serviceframework/src/upnpservicecontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpserviceimplementation.cpp
upnp/upnpstack/serviceframework/src/upnpservicelistcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpservicestatetablecontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpservicetagcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpsettings.cpp
upnp/upnpstack/serviceframework/src/upnpsilentdeviceimplementation.cpp
upnp/upnpstack/serviceframework/src/upnpsingletagcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpsoapcontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpsoapmessage.cpp
upnp/upnpstack/serviceframework/src/upnpsoapmessagefactory.cpp
upnp/upnpstack/serviceframework/src/upnpsoapparser.cpp
upnp/upnpstack/serviceframework/src/upnpstatevariable.cpp
upnp/upnpstack/serviceframework/src/upnpstatevariablecontenthandler.cpp
upnp/upnpstack/serviceframework/src/upnpsubscriberlibrary.cpp
upnp/upnpstack/serviceframework/src/upnpsubscriberlibraryelement.cpp
upnp/upnpstack/ssdpserver/BWINS/SSDPServeru.def
upnp/upnpstack/ssdpserver/eabi/SSDPServeru.def
upnp/upnpstack/ssdpserver/group/bld.inf
upnp/upnpstack/ssdpserver/group/ssdpserver.mmp
upnp/upnpstack/ssdpserver/inc/upnpssdpserver.h
upnp/upnpstack/ssdpserver/inc/upnpssdpserverobserver.h
upnp/upnpstack/ssdpserver/inc/upnpudpsendrequest.h
upnp/upnpstack/ssdpserver/inc/upnpudpserver.h
upnp/upnpstack/ssdpserver/src/upnpssdpserver.cpp
upnp/upnpstack/ssdpserver/src/upnpudpsendrequest.cpp
upnp/upnpstack/ssdpserver/src/upnpudpserver.cpp
upnp/upnpstack/upnpconnectionmanagersession/BWINS/upnpconnectionmanagersessionu.def
upnp/upnpstack/upnpconnectionmanagersession/eabi/upnpconnectionmanagersessionu.def
upnp/upnpstack/upnpconnectionmanagersession/group/bld.inf
upnp/upnpstack/upnpconnectionmanagersession/group/upnpconnectionmanagersession.mmp
upnp/upnpstack/upnpconnectionmanagersession/inc/upnpconnectionmanagerproxy.h
upnp/upnpstack/upnpconnectionmanagersession/inc/upnpconnectionmanagersession.h
upnp/upnpstack/upnpconnectionmanagersession/src/upnpconnectionmanagernetworkevent.cpp
upnp/upnpstack/upnpconnectionmanagersession/src/upnpconnectionmanagernetworkeventprovider.cpp
upnp/upnpstack/upnpconnectionmanagersession/src/upnpconnectionmanagerproxy.cpp
upnp/upnpstack/upnpconnectionmanagersession/src/upnpconnectionmanagersession.cpp
upnp/upnpstack/upnpconnectionmanagersession/src/upnpnetworkeventaddresschange.cpp
upnp/upnpstack/upnpconnectionmanagersession/src/upnpnetworkeventbase.cpp
upnp/upnpstack/upnpconnmanager/group/bld.inf
upnp/upnpstack/upnpconnmanager/group/upnpconnmanager.mmp
upnp/upnpstack/upnpconnmanager/inc/upnpconninterfacewatcher.h
upnp/upnpstack/upnpconnmanager/inc/upnpconnmanager.h
upnp/upnpstack/upnpconnmanager/inc/upnpconnmanagercommon.h
upnp/upnpstack/upnpconnmanager/inc/upnpconnmanagerengine.h
upnp/upnpstack/upnpconnmanager/inc/upnpconnmanagersession.h
upnp/upnpstack/upnpconnmanager/inc/upnpipeventnotifier.h
upnp/upnpstack/upnpconnmanager/src/upnpconninterfacewatcher.cpp
upnp/upnpstack/upnpconnmanager/src/upnpconnmanager.cpp
upnp/upnpstack/upnpconnmanager/src/upnpconnmanagerengine.cpp
upnp/upnpstack/upnpconnmanager/src/upnpconnmanagersession.cpp
upnp/upnpstack/upnpconnmanager/src/upnpipeventnotifier.cpp
upnp/upnpstack/upnphttptransfer/BWINS/httptransferu.def
upnp/upnpstack/upnphttptransfer/eabi/httptransferu.def
upnp/upnpstack/upnphttptransfer/group/bld.inf
upnp/upnpstack/upnphttptransfer/group/httptransfer.mmp
upnp/upnpstack/upnphttptransfer/inc/httpdownloadworker.h
upnp/upnpstack/upnphttptransfer/inc/httpfile.h
upnp/upnpstack/upnphttptransfer/inc/httpheader.h
upnp/upnpstack/upnphttptransfer/inc/httpnotifytimer.h
upnp/upnpstack/upnphttptransfer/inc/httptransfertimer.h
upnp/upnpstack/upnphttptransfer/inc/httptransfertimerobserver.h
upnp/upnpstack/upnphttptransfer/inc/httptransferworker.h
upnp/upnpstack/upnphttptransfer/inc/httpuploadworker.h
upnp/upnpstack/upnphttptransfer/src/httpdownloader.cpp
upnp/upnpstack/upnphttptransfer/src/httpdownloadworker.cpp
upnp/upnpstack/upnphttptransfer/src/httpfile.cpp
upnp/upnpstack/upnphttptransfer/src/httpheader.cpp
upnp/upnpstack/upnphttptransfer/src/httpnotifytimer.cpp
upnp/upnpstack/upnphttptransfer/src/httptransferbase.cpp
upnp/upnpstack/upnphttptransfer/src/httptransfertimer.cpp
upnp/upnpstack/upnphttptransfer/src/httptransferworker.cpp
upnp/upnpstack/upnphttptransfer/src/httpuploader.cpp
upnp/upnpstack/upnphttptransfer/src/httpuploadworker.cpp
upnp/upnpstack/upnputils/BWINS/upnpipserversutilsu.def
upnp/upnpstack/upnputils/eabi/upnpipserversutilsu.def
upnp/upnpstack/upnputils/group/bld.inf
upnp/upnpstack/upnputils/group/upnputils.mmp
upnp/upnpstack/upnputils/inc/upnpcompvariant.hrh
upnp/upnpstack/upnputils/inc/upnpdevicelibrary.h
upnp/upnpstack/upnputils/inc/upnpdevicelibraryelement.h
upnp/upnpstack/upnputils/inc/upnpipaddressutils.h
upnp/upnpstack/upnputils/inc/upnplist.h
upnp/upnpstack/upnputils/inc/upnpmessageobserver.h
upnp/upnpstack/upnputils/inc/upnpmsearchtimer.h
upnp/upnpstack/upnputils/inc/upnpssdpmessage.h
upnp/upnpstack/upnputils/inc/upnpssdpmessagefactory.h
upnp/upnpstack/upnputils/inc/upnptimeoutelement.h
upnp/upnpstack/upnputils/inc/upnpuheapmark.h
upnp/upnpstack/upnputils/src/upnpdevicelibrary.cpp
upnp/upnpstack/upnputils/src/upnpdevicelibraryelement.cpp
upnp/upnpstack/upnputils/src/upnpdominterface.cpp
upnp/upnpstack/upnputils/src/upnpfileutils.cpp
upnp/upnpstack/upnputils/src/upnphttpheader.cpp
upnp/upnpstack/upnputils/src/upnphttpmessage.cpp
upnp/upnpstack/upnputils/src/upnphttpmessagefactory.cpp
upnp/upnpstack/upnputils/src/upnpipaddressutils.cpp
upnp/upnpstack/upnputils/src/upnplist.cpp
upnp/upnpstack/upnputils/src/upnpmsearchtimer.cpp
upnp/upnpstack/upnputils/src/upnpnotifytimer.cpp
upnp/upnpstack/upnputils/src/upnpsessionbase.cpp
upnp/upnpstack/upnputils/src/upnpssdpmessage.cpp
upnp/upnpstack/upnputils/src/upnpssdpmessagefactory.cpp
upnp/upnpstack/upnputils/src/upnpstring.cpp
upnp/upnpstack/upnputils/src/upnpsymbianserverbase.cpp
upnp/upnpstack/upnputils/src/upnptimeoutelement.cpp
upnp/upnpstack_plat/group/bld.inf
upnp/upnpstack_plat/upnp_common_api/group/bld.inf
upnp/upnpstack_plat/upnp_common_api/inc/upnpaction.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpargument.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpcommonstructs.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpcommonupnplits.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpconnectionmanagernetworkevent.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpconnectionmanagernetworkeventprovider.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpconnmanagereventtypes.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpcons.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpdescriptionproperty.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpdevice.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpdevicedescription.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpdiscoveryobserver.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpdispatcher.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpdispatchercustomer.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpdispatcherengineobserver.h
upnp/upnpstack_plat/upnp_common_api/inc/upnperrors.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpicon.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpnetworkeventaddresschange.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpnetworkeventbase.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpnetworkeventobserver.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpnotifytimer.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpservice.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpsettings.h
upnp/upnpstack_plat/upnp_common_api/inc/upnpstatevariable.h
upnp/upnpstack_plat/upnp_common_api/upnp_common_api.metaxml
upnp/upnpstack_plat/upnp_control_point_api/group/bld.inf
upnp/upnpstack_plat/upnp_control_point_api/inc/upnpcontrolpoint.h
upnp/upnpstack_plat/upnp_control_point_api/upnp_control_point_api.metaxml
upnp/upnpstack_plat/upnp_device_api/group/bld.inf
upnp/upnpstack_plat/upnp_device_api/inc/upnpdevicedescriptionprovider.h
upnp/upnpstack_plat/upnp_device_api/inc/upnpdevicedescriptionrequest.h
upnp/upnpstack_plat/upnp_device_api/inc/upnpdevicedescriptionstore.h
upnp/upnpstack_plat/upnp_device_api/inc/upnpdeviceimplementation.h
upnp/upnpstack_plat/upnp_device_api/inc/upnpdeviceimplementationbase.h
upnp/upnpstack_plat/upnp_device_api/inc/upnpserviceimplementation.h
upnp/upnpstack_plat/upnp_device_api/inc/upnpsubscriberlibraryobserver.h
upnp/upnpstack_plat/upnp_device_api/upnp_device_api.metaxml
upnp/upnpstack_plat/upnp_http_transfer_api/group/bld.inf
upnp/upnpstack_plat/upnp_http_transfer_api/inc/httpdownloader.h
upnp/upnpstack_plat/upnp_http_transfer_api/inc/httptransferbase.h
upnp/upnpstack_plat/upnp_http_transfer_api/inc/httptransferobserver.h
upnp/upnpstack_plat/upnp_http_transfer_api/inc/httpuploader.h
upnp/upnpstack_plat/upnp_http_transfer_api/inc/httpworkerobserver.h
upnp/upnpstack_plat/upnp_http_transfer_api/upnp_http_transfer_api.metaxml
upnp/upnpstack_plat/upnp_httpserver_api/group/bld.inf
upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpserverobserver.h
upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpserverruntime.h
upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpserversession.h
upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpservertransaction.h
upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpservertransactioncreator.h
upnp/upnpstack_plat/upnp_httpserver_api/upnp_httpserver_api.metaxml
upnp/upnpstack_plat/upnp_utils_api/group/bld.inf
upnp/upnpstack_plat/upnp_utils_api/inc/upnpdominterface.h
upnp/upnpstack_plat/upnp_utils_api/inc/upnpfileutils.h
upnp/upnpstack_plat/upnp_utils_api/inc/upnphttpheader.h
upnp/upnpstack_plat/upnp_utils_api/inc/upnphttpmessage.h
upnp/upnpstack_plat/upnp_utils_api/inc/upnphttpmessagefactory.h
upnp/upnpstack_plat/upnp_utils_api/inc/upnpsessionbase.h
upnp/upnpstack_plat/upnp_utils_api/inc/upnpstring.h
upnp/upnpstack_plat/upnp_utils_api/inc/upnpsymbianserverbase.h
upnp/upnpstack_plat/upnp_utils_api/upnp_utils_api.metaxml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/layers.sysdef.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,13 @@
+<?xml version="1.0"?><!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [  
+ <!ENTITY layer_real_source_path "sf/mw/srvdiscovery" >
+]>
+<SystemDefinition name="ossrv" schema="1.4.0">  
+<systemModel> 
+<!-- Common file for prebuild layers-->          
+<layer name="mw_layer">                        
+<module name="upnp">                             
+<unit name="upnp" unitID="mrtdo.upnp" bldFile="&layer_real_source_path;/upnp/group" mrp="" />
+</module>    
+</layer>        
+</systemModel>
+</SystemDefinition>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_definition.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0">
+  <package id="srvdiscovery" name="Service Discovery and Usage" levels="plugin framework server generic specific">
+    <collection id="servicediscoveryandcontrol" name="Service Discovery and Control" level="framework">
+      <component id="servicediscoveryfw" name="Service Discovery Framework" introduced="^3" purpose="optional">
+        <unit bldFile="servicediscoveryandcontrol/pnp/group" mrp="servicediscoveryandcontrol/pnp/group/servicediscoveryframework.mrp"/>
+      </component>
+    </collection>
+    <collection id="srvdiscovery_info" name="Service Discovery and Usage Info" level="specific">
+      <component id="srvdiscovery_metadata" name="Service Discovery and Usage Metadata" class="config" introduced="^2" purpose="development" target="desktop">
+        <unit mrp="srvdiscovery_info/srvdiscovery_metadata/srvdiscovery_metadata.mrp"/>
+      </component>
+    </collection>
+  </package>
+</SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/bwins/rpnpu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+EXPORTS
+	?Discover@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 1 NONAME ; void RPnPServiceDiscovery::Discover(class RPnPParameterBundle const &)
+	?Cancel@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 2 NONAME ; void RPnPServiceDiscovery::Cancel(class RPnPParameterBundle const &)
+	?MessageDes@TControlMessage@@QBEABVTDesC8@@XZ @ 3 NONAME ; class TDesC8 const & TControlMessage::MessageDes(void) const
+	?SetLast@TControlMessage@@QAEXXZ @ 4 NONAME ; void TControlMessage::SetLast(void)
+	?IsLast@TControlMessage@@QBEHXZ @ 5 NONAME ; int TControlMessage::IsLast(void) const
+	?Open@RPnPParameterBundleBase@@QAEHXZ @ 6 NONAME ; int RPnPParameterBundleBase::Open(void)
+	??1CPnPServicePublisherBase@@UAE@XZ @ 7 NONAME ; CPnPServicePublisherBase::~CPnPServicePublisherBase(void)
+	?SetMaxLength@TControlMessage@@QAEXH@Z @ 8 NONAME ; void TControlMessage::SetMaxLength(int)
+	??0RPnPServiceDiscovery@@QAE@XZ @ 9 NONAME ; RPnPServiceDiscovery::RPnPServiceDiscovery(void)
+	?Open@RPnPServiceDiscovery@@QAEHI@Z @ 10 NONAME ; int RPnPServiceDiscovery::Open(unsigned int)
+	?Close@RPnPParameterBundleBase@@QAEXXZ @ 11 NONAME ; void RPnPParameterBundleBase::Close(void)
+	??0CPnPServiceDiscoveryBase@@IAE@XZ @ 12 NONAME ; CPnPServiceDiscoveryBase::CPnPServiceDiscoveryBase(void)
+	?MaxLength@TControlMessage@@QBEHXZ @ 13 NONAME ; int TControlMessage::MaxLength(void) const
+	?SendNotify@RPnPServicePublisher@@QAEXABVRPnPParameterBundle@@@Z @ 14 NONAME ; void RPnPServicePublisher::SendNotify(class RPnPParameterBundle const &)
+	?Close@RControlChannel@@QAEXXZ @ 15 NONAME ; void RControlChannel::Close(void)
+	?ClearFlags@TControlMessage@@QAEXXZ @ 16 NONAME ; void TControlMessage::ClearFlags(void)
+	?Recv@RControlChannel@@QAEXAAVTControlMessage@@AAVTRequestStatus@@@Z @ 17 NONAME ; void RControlChannel::Recv(class TControlMessage &, class TRequestStatus &)
+	?CancelSend@RControlChannel@@QAEXXZ @ 18 NONAME ; void RControlChannel::CancelSend(void)
+	??1CPnPServiceDiscoveryBase@@UAE@XZ @ 19 NONAME ; CPnPServiceDiscoveryBase::~CPnPServiceDiscoveryBase(void)
+	?Close@RPnPServicePublisher@@QAEXXZ @ 20 NONAME ; void RPnPServicePublisher::Close(void)
+	?Subscribe@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 21 NONAME ; void RPnPServiceDiscovery::Subscribe(class RPnPParameterBundle const &)
+	?Publish@RPnPServicePublisher@@QAEXABVRPnPParameterBundle@@@Z @ 22 NONAME ; void RPnPServicePublisher::Publish(class RPnPParameterBundle const &)
+	?Open@RPnPServicePublisher@@QAEHI@Z @ 23 NONAME ; int RPnPServicePublisher::Open(unsigned int)
+	?MessagePtr@TControlMessage@@QAEAAVTDes8@@XZ @ 24 NONAME ; class TDes8 & TControlMessage::MessagePtr(void)
+	?PnPObserver@RPnPParameterBundle@@QBEPAVMPnPObserver@@XZ @ 25 NONAME ; class MPnPObserver * RPnPParameterBundle::PnPObserver(void) const
+	?InitiateControl@RPnPServicePublisher@@QAEHAAVRControlChannel@@@Z @ 26 NONAME ; int RPnPServicePublisher::InitiateControl(class RControlChannel &)
+	??1TControlMessage@@QAE@XZ @ 27 NONAME ; TControlMessage::~TControlMessage(void)
+	?SetPnPObserver@RPnPParameterBundle@@QAEXPAVMPnPObserver@@@Z @ 28 NONAME ; void RPnPParameterBundle::SetPnPObserver(class MPnPObserver *)
+	?SetMessagePtr@TControlMessage@@QAEXAAVTDes8@@@Z @ 29 NONAME ; void TControlMessage::SetMessagePtr(class TDes8 &)
+	?CancelRecv@RControlChannel@@QAEXXZ @ 30 NONAME ; void RControlChannel::CancelRecv(void)
+	??0RControlChannel@@QAE@XZ @ 31 NONAME ; RControlChannel::RControlChannel(void)
+	?RegisterNotify@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 32 NONAME ; void RPnPServiceDiscovery::RegisterNotify(class RPnPParameterBundle const &)
+	??0CPnPServicePublisherBase@@IAE@XZ @ 33 NONAME ; CPnPServicePublisherBase::CPnPServicePublisherBase(void)
+	?Close@RPnPServiceDiscovery@@QAEXXZ @ 34 NONAME ; void RPnPServiceDiscovery::Close(void)
+	?InitiateControl@RPnPServiceDiscovery@@QAEHAAVRControlChannel@@ABVTDesC8@@@Z @ 35 NONAME ; int RPnPServiceDiscovery::InitiateControl(class RControlChannel &, class TDesC8 const &)
+	?Send@RControlChannel@@QAEXAAVTControlMessage@@AAVTRequestStatus@@@Z @ 36 NONAME ; void RControlChannel::Send(class TControlMessage &, class TRequestStatus &)
+	??0RPnPServicePublisher@@QAE@XZ @ 37 NONAME ; RPnPServicePublisher::RPnPServicePublisher(void)
+	?SetMessageDes@TControlMessage@@QAEXABVTDesC8@@@Z @ 38 NONAME ; void TControlMessage::SetMessageDes(class TDesC8 const &)
+	??0TControlMessage@@QAE@XZ @ 39 NONAME ; TControlMessage::TControlMessage(void)
+	?Describe@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 40 NONAME ; void RPnPServiceDiscovery::Describe(class RPnPParameterBundle const &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/eabi/rpnpu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+EXPORTS
+	_ZN15RControlChannel10CancelRecvEv @ 1 NONAME
+	_ZN15RControlChannel10CancelSendEv @ 2 NONAME
+	_ZN15RControlChannel4RecvER15TControlMessageR14TRequestStatus @ 3 NONAME
+	_ZN15RControlChannel4SendER15TControlMessageR14TRequestStatus @ 4 NONAME
+	_ZN15RControlChannel5CloseEv @ 5 NONAME
+	_ZN15RControlChannelC1Ev @ 6 NONAME
+	_ZN15RControlChannelC2Ev @ 7 NONAME
+	_ZN15TControlMessage10ClearFlagsEv @ 8 NONAME
+	_ZN15TControlMessage10MessagePtrEv @ 9 NONAME
+	_ZN15TControlMessage12SetMaxLengthEi @ 10 NONAME
+	_ZN15TControlMessage13SetMessageDesERK6TDesC8 @ 11 NONAME
+	_ZN15TControlMessage13SetMessagePtrER5TDes8 @ 12 NONAME
+	_ZN15TControlMessage7SetLastEv @ 13 NONAME
+	_ZN15TControlMessageC1Ev @ 14 NONAME
+	_ZN15TControlMessageC2Ev @ 15 NONAME
+	_ZN15TControlMessageD1Ev @ 16 NONAME
+	_ZN15TControlMessageD2Ev @ 17 NONAME
+	_ZN19RPnPParameterBundle14SetPnPObserverEP12MPnPObserver @ 18 NONAME
+	_ZN20RPnPServiceDiscovery14RegisterNotifyERK19RPnPParameterBundle @ 19 NONAME
+	_ZN20RPnPServiceDiscovery15InitiateControlER15RControlChannelRK6TDesC8 @ 20 NONAME
+	_ZN20RPnPServiceDiscovery4OpenEj @ 21 NONAME
+	_ZN20RPnPServiceDiscovery5CloseEv @ 22 NONAME
+	_ZN20RPnPServiceDiscovery6CancelERK19RPnPParameterBundle @ 23 NONAME
+	_ZN20RPnPServiceDiscovery8DescribeERK19RPnPParameterBundle @ 24 NONAME
+	_ZN20RPnPServiceDiscovery8DiscoverERK19RPnPParameterBundle @ 25 NONAME
+	_ZN20RPnPServiceDiscovery9SubscribeERK19RPnPParameterBundle @ 26 NONAME
+	_ZN20RPnPServiceDiscoveryC1Ev @ 27 NONAME
+	_ZN20RPnPServiceDiscoveryC2Ev @ 28 NONAME
+	_ZN20RPnPServicePublisher10SendNotifyERK19RPnPParameterBundle @ 29 NONAME
+	_ZN20RPnPServicePublisher15InitiateControlER15RControlChannel @ 30 NONAME
+	_ZN20RPnPServicePublisher4OpenEj @ 31 NONAME
+	_ZN20RPnPServicePublisher5CloseEv @ 32 NONAME
+	_ZN20RPnPServicePublisher7PublishERK19RPnPParameterBundle @ 33 NONAME
+	_ZN20RPnPServicePublisherC1Ev @ 34 NONAME
+	_ZN20RPnPServicePublisherC2Ev @ 35 NONAME
+	_ZN23RPnPParameterBundleBase4OpenEv @ 36 NONAME
+	_ZN23RPnPParameterBundleBase5CloseEv @ 37 NONAME
+	_ZN24CPnPServiceDiscoveryBaseC2Ev @ 38 NONAME
+	_ZN24CPnPServiceDiscoveryBaseD0Ev @ 39 NONAME
+	_ZN24CPnPServiceDiscoveryBaseD1Ev @ 40 NONAME
+	_ZN24CPnPServiceDiscoveryBaseD2Ev @ 41 NONAME
+	_ZN24CPnPServicePublisherBaseC2Ev @ 42 NONAME
+	_ZN24CPnPServicePublisherBaseD0Ev @ 43 NONAME
+	_ZN24CPnPServicePublisherBaseD1Ev @ 44 NONAME
+	_ZN24CPnPServicePublisherBaseD2Ev @ 45 NONAME
+	_ZNK15TControlMessage10MessageDesEv @ 46 NONAME
+	_ZNK15TControlMessage6IsLastEv @ 47 NONAME
+	_ZNK15TControlMessage9MaxLengthEv @ 48 NONAME
+	_ZNK19RPnPParameterBundle11PnPObserverEv @ 49 NONAME
+	_ZTI24CPnPServiceDiscoveryBase @ 50 NONAME
+	_ZTI24CPnPServicePublisherBase @ 51 NONAME
+	_ZTV24CPnPServiceDiscoveryBase @ 52 NONAME
+	_ZTV24CPnPServicePublisherBase @ 53 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+/*
+* 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_PLATFORMS
+default
+
+PRJ_EXPORTS
+../inc/pnp.h                          SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/pnp.h)
+../inc/mpnpobserver.h 		     SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/mpnpobserver.h)
+../inc/pnpparameterbundle.h	    SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/pnpparameterbundle.h)	
+../inc/rpnpservicediscovery.h	  SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/rpnpservicediscovery.h)	
+../inc/rpnpservicepublisher.h	  SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/rpnpservicepublisher.h)	
+../inc/rcontrolchannel.h	  SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/rcontrolchannel.h)	
+../inc/cpnpservicediscoverybase.h SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/cpnpservicediscoverybase.h)
+../inc/cpnpservicepublisherbase.h SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/cpnpservicepublisherbase.h)
+../inc/ccontrolchannelbase.h	  SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/ccontrolchannelbase.h)
+../inc/pnpconstants.h			  SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/pnpconstants.h)
+
+
+rpnp.iby	/epoc32/rom/include/rpnp.iby
+
+PRJ_MMPFILES
+rpnp.mmp
+
+PRJ_TESTMMPFILES
+#include "../test/testplugin/group/bld.inf"
+#include "../test/integtest/group/bld.inf"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/group/rpnp.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,22 @@
+// 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 __RPNP_IBY__
+#define __RPNP_IBY__
+
+file=ABI_DIR\BUILD_DIR\rpnp.dll system\libs\rpnp.dll
+
+
+#endif __RPNP_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/group/rpnp.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+// 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:
+// Generic purpose DLL that provides support for applications to discover services/devices or 
+// to publish its services
+// 
+//
+
+
+TARGET rpnp.dll
+TARGETTYPE dll
+CAPABILITY ALL -TCB
+
+UID  0x1000008D 0x2000D054
+VENDORID 0x70000001
+
+SOURCEPATH ../src
+SOURCE 	rpnpservicediscovery.cpp
+SOURCE 	rpnpservicepublisher.cpp
+SOURCE 	pnpparameterbundle.cpp 
+SOURCE	rcontrolchannel.cpp 
+SOURCE  cpnpservicediscoverybase.cpp 
+SOURCE  cpnpservicepublisherbase.cpp
+
+USERINCLUDE ../inc
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY euser.lib 
+LIBRARY esock.lib 
+LIBRARY ecom.lib
+
+
+SMPSAFE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/group/servicediscoveryframework.mrp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,12 @@
+component	servicediscoveryframework
+source	\sf\mw\srvdiscovery\servicediscoveryandcontrol\pnp
+binary	\sf\mw\srvdiscovery\servicediscoveryandcontrol\pnp\group	all
+exports	\sf\mw\srvdiscovery\servicediscoveryandcontrol\pnp\group
+
+notes_source	\component_defs\release.src
+
+
+
+ipr E 
+ipr T \sf\mw\srvdiscovery\servicediscoveryandcontrol\pnp\test
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/ccontrolchannelbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,68 @@
+// 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 __CCONTROLCHANNELBASE_H_
+#define __CCONTROLCHANNELBASE_H_
+
+#include <e32base.h>
+
+class TControlMessage;
+/**
+ This class acts as a base class which technology specific control channel need to implement
+ @publishedPartner
+ @prototype
+ */
+NONSHARABLE_CLASS (CControlChannelBase) : public CBase
+	{
+protected:
+	CControlChannelBase();
+public:
+	~CControlChannelBase();
+public:
+	/*
+      Recv is used for receiving the data through control channel.
+	  @param aMessage msg wrapped as TControlMessage 
+      @param aStatus request status
+     */  
+	virtual void Recv ( TControlMessage& aMessage, TRequestStatus& aStatus ) = 0;
+	 /*
+      Send is used for sending the data through control channel.
+	  @param aMessage msg wrapped as TControlMessage 
+      @param aStatus request status
+     */  
+	virtual void Send ( TControlMessage& aMessage, TRequestStatus& aStatus ) = 0;
+      /*
+       Cancels the asynchronous recv used for receiving the data through control channel.
+	  */  
+	virtual void CancelRecv () = 0;
+	  /*
+       Cancels the asynchronous send used for sending the data through control channel.
+	  */  
+	virtual void CancelSend () = 0;
+
+	};
+	
+inline CControlChannelBase::CControlChannelBase()	
+	{
+	
+	}
+	
+inline CControlChannelBase::~CControlChannelBase()
+	{
+	
+	}	
+
+#endif //__CCONTROLCHANNELBASE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/cpnpservicediscoverybase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,83 @@
+// 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 __CPNPSERVICEDISCOVERYBASE_H__
+#define __CPNPSERVICEDISCOVERYBASE_H__
+
+#include <pnp/pnp.h>
+
+class RPnPParameterBundle;
+class CControlChannelBase;
+
+/** This class acts as an abstract base class which technology specific information need to implement
+    @publishedPartner
+    @prototype
+ */
+class CPnPServiceDiscoveryBase : public CBase
+	{
+public:
+	/** Static factory method */
+	static CPnPServiceDiscoveryBase* NewL( TUint aTierId ); 	
+    /**
+	Default Destructor
+	*/ 
+	IMPORT_C virtual ~CPnPServiceDiscoveryBase();
+	/** Second phase constructor */
+	virtual TInt Construct( TUint aTierId) = 0;
+	/**
+	Issues a discovery request. The technology specific discovery information is packed
+	in aServiceInfo parameter.
+	@param aServiceInfo Parameter bundle contains the discovery information.
+	*/	
+	virtual void Discover ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	/**
+	Retrieves the description of the service. The technology specific description information is packed
+	in aServiceInfo parameter.
+	@param Parameter bundle contains the information about the service.
+	*/
+	virtual void Describe ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	/**
+	Subscribes for event notifications to the service .
+	The technology specific description information is packed in aServiceInfo parameter.
+	@param Parameter bundle contains the information about the service.	
+	*/
+	virtual void Subscribe ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	/**
+	Registers for events of service. The technology specific registration information
+	is packed in aServiceInfo.
+	@param Parameter bundle contains the register information.
+	*/
+	virtual void RegisterNotify ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	/**
+	Issues a cancel request.
+	@param Parameter bundle contains the cancel request.
+	*/
+	virtual void Cancel ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	/**
+	It enables to send and receive messages.
+	*/
+	virtual CControlChannelBase* InitiateControlL ( const TDesC8& aUri ) = 0;
+	
+protected:  
+    /**
+	Default constructor
+	*/
+	IMPORT_C CPnPServiceDiscoveryBase();
+
+private:
+	TUid iEcomDtorID;
+	};
+
+#endif //__CPNPSERVICEDISCOVERYBASE_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/cpnpservicepublisherbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+// 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 __CPNPSERVICEPUBLISHERBASE_H__
+#define __CPNPSERVICEPUBLISHERBASE_H__
+
+#include <pnp/pnp.h>
+
+class RPnPParameterBundle;
+class CControlChannelBase;
+
+/** This class acts as an abstract base class which technology specific information need to implement
+    @publishedPartner
+    @prototype
+ */
+class CPnPServicePublisherBase : public CBase
+	{
+public:
+	/** Static factory method */
+	static CPnPServicePublisherBase* NewL( TUint aTierId );
+    /**
+	Default Destructor
+	*/
+	IMPORT_C virtual ~CPnPServicePublisherBase();	
+	/** Second phase constructor */
+	virtual TInt Construct( TUint aTierId) = 0;
+	/**
+	Publishes service notifications. The technology specific service information
+	is packed in aServiceInfo.
+	@param Parameter bundle containing service information.		
+	*/
+	virtual void Publish ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	/**
+	Sends service notification.
+    @param Parameter bundle contains the technology specific information.
+	*/
+	virtual void SendNotify ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	/**	  
+	 It enables to send and receive messages.
+	 */
+	virtual CControlChannelBase* InitiateControlL () = 0;
+
+protected:
+    /**
+	Default constructor
+	*/
+	IMPORT_C CPnPServicePublisherBase();
+		
+private:
+	TUid iEcomDtorID;		
+	};
+	
+#endif // __CPNPSERVICEPUBLISHERBASE_H__ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/mpnpobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+// 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:
+// PnPObserver.h
+// 
+//
+
+#ifndef __MPNPOBSERVER_H__
+#define __MPNPOBSERVER_H__
+
+#include <e32def.h>
+#include <e32base.h>
+
+class RPnPParameterBundleBase;
+/**
+Observer class which has a callback function to return the responses. Client must implement to handle the responses.
+@publishedPartner
+@prototype
+*/
+class MPnPObserver
+	{
+public:
+	/**
+	Callback method which returns the responses.It can be success or fail and is contained in the response parameter bundle
+	@param aServiceEventInfo Parameter bundle containg the response.
+	*/
+	virtual void OnPnPEventL ( RPnPParameterBundleBase& aServiceEventInfo) = 0;
+	/**
+	Callback method which handles the errors of submitting requests. In case this method is returned, the client should check
+	all the values passed in the corresponding bundle because it'll be called only in case of invalid bundle or low memory condition
+	Note that unlike OnPnPEventL ,this is not a callback method and returns synchronously in case of error.
+	@param aError error code.
+	*/
+	virtual void OnPnPError (TInt aError) = 0;
+	};
+
+#endif  /*__MPNPOBSERVER_H__*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/pnp.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+// 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 __PNP_H__
+#define __PNP_H__
+
+#include <pnp/mpnpobserver.h>
+#include <pnp/pnpparameterbundle.h>
+#include <pnp/rpnpservicediscovery.h>
+#include <pnp/rpnpservicepublisher.h>
+#include <pnp/rcontrolchannel.h>
+#include <pnp/pnpconstants.h>
+
+#endif //__PNP_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/pnpconstants.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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 __PNPCONSTANTS_H__
+#define __PNPCONSTANTS_H__
+
+/**
+This is the Uid which is used to load the underlying pnp interface. New plugins which make use of the
+pnp interface should make use of this as the interface id of their implementations in the rss file of the plugin
+@publishedPartner
+@prototype
+*/
+const TUid  KPnPInterfaceId = {0x2000D060};
+
+//Error strings
+_LIT( KPnPHandleNotOpen , "PnP Handle Not Open");
+_LIT( KControlChannelHandleNotOpen , "Control Channel Handle Not Open");
+
+
+//Panic codes
+const TInt KErrPnPNotOpen = -2525 ;
+const TInt KErrControlChannelNotOpen = -2526;
+
+#endif // __PNPCONSTANTS_H__ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/pnpparameterbundle.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,60 @@
+// 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 __PNPPARAMETERBUNDLE_H__
+#define __PNPPARAMETERBUNDLE_H__
+
+#include <es_sock.h>
+#include <comms-infras/es_parameterfamily.h>
+
+
+class MPnPObserver;
+
+/**
+Parameter bundle class contains a bundle of RParameterFamiles. 
+@publishedPartner
+@prototype
+*/ 
+ class RPnPParameterBundleBase : public RParameterFamilyBundle
+	 {
+ public:
+	 
+	 IMPORT_C TInt Open();	 
+	 IMPORT_C void Close();
+	 };
+
+/**
+Parameter bundle class contains a bundle of RParameterFamiles and a pointer to callback.
+Callback pointer should be set if calling client is expecting to recieve any response.
+@publishedPartner
+@prototype
+*/ 
+
+class RPnPParameterBundle : public RPnPParameterBundleBase
+	{
+public:
+ 	
+ 	/* Set function for MPnPObserver callback */	
+ 	IMPORT_C void SetPnPObserver( MPnPObserver* aPnPObserver );
+ 	/* Get function for MPnPObserver callback */
+ 	IMPORT_C MPnPObserver * PnPObserver( ) const; 	
+ 	
+private :	
+ 	/* Pointer to callback */
+ 	MPnPObserver* iPnPObserver; 
+ 	};
+	
+#endif //__PNPPARAMETERBUNDLE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/rcontrolchannel.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,127 @@
+// 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 __RCONTROLCHANNEL_H__
+#define __RCONTROLCHANNEL_H__
+
+#include <e32base.h>
+
+class CControlChannelBase;
+
+/* 
+ This class is used to wrap the TDes8 data that is used for transmission
+ @publishedPartner
+ @prototype
+*/
+class TControlMessage
+	{
+public: 
+    /** Default constructor */
+	IMPORT_C TControlMessage ();
+
+    /** Default destructor */
+	IMPORT_C ~TControlMessage ();
+    /** 
+	Used to Set the data part of control message with data supplied in aData
+    @param aData Supplied data
+    */
+	IMPORT_C void SetMessageDes ( const TDesC8& aData );
+    /** 
+	Used to Set the data part of control message with data supplied in aData
+    @param aData Supplied data
+    */
+	IMPORT_C void SetMessagePtr ( TDes8& aData );	
+    /**
+	Used to retrieves the data part of control message
+    @return 8 bit non-modifiable descriptor 
+    */
+	IMPORT_C const TDesC8& MessageDes () const;
+    /**
+	Used to retrieves the data part of control message
+    @return 8 bit modifiable descriptor 
+    */
+	IMPORT_C TDes8& MessagePtr ();	
+    /**
+	Used to tell whether the data is the last message in the control data or not
+    @param True if the msg is the last message
+    */
+	IMPORT_C TBool IsLast() const;
+    /**	Used to set the last message of the control data */
+	IMPORT_C void SetLast();
+    /**
+	Used to set max length of Control Message
+    @param aLen Max length of the msg
+    */
+	IMPORT_C void SetMaxLength ( TInt aLen );
+    /** 
+	Used to get max length of the Control Message
+    @return Max length of the msg 
+    */
+	IMPORT_C TInt MaxLength () const;
+    /** Used to reset the SetLast flag */
+	IMPORT_C void ClearFlags ();
+	
+private:
+	TPtr8 		iPtr;
+	TInt 		iMaxLength;
+	TUint	 	iFlags;
+	};
+
+
+/** 
+ This class is used to send and receive control messages
+ @publishedPartner
+ @prototype
+ */
+class RControlChannel
+	{
+	friend class RPnPServiceDiscovery;
+	friend class RPnPServicePublisher;
+	
+public: 
+	
+    /** default constructor */
+	IMPORT_C RControlChannel ( );
+    /**
+	Used to receive control messages
+    @param aMessage msg wrapped as TControlMessage 
+    @param aStatus request status
+    */
+	IMPORT_C void Recv ( TControlMessage& aMessage, TRequestStatus& aStatus );
+    /**
+	Used to send control messages
+    @param aMessage msg wrapped as TControlMessage 
+    @param aStatus request status
+    */
+	IMPORT_C void Send ( TControlMessage& aMessage, TRequestStatus& aStatus );
+    
+	/** Used to close the channel */
+	IMPORT_C void Close ();	
+	
+	/** Used to cancel the asynchronous recv */
+	IMPORT_C void CancelRecv ();
+	
+	/** Used to cancel the asynchronous send */
+	IMPORT_C void CancelSend ();
+
+private:
+    void Attach(CControlChannelBase& aChannelBase);	
+    
+private:
+	CControlChannelBase* iControlChannelImpl;
+	};
+
+#endif //__RCONTROLCHANNEL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/rpnpservicediscovery.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,124 @@
+// 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 __RPNPPSERVICEDISCOVER_H__
+#define __RPNPPSERVICEDISCOVER_H__
+
+#include <e32base.h>
+
+class RControlChannel;
+class CPnPServiceDiscoveryBase;
+class RPnPParameterBundle;
+
+/**
+A generic class which provides the functionality to provision the applications who want to discover services
+and listen for service related notifications. The service discovery and related notification are technology specific.
+@publishedPartner
+@prototype
+*/
+class RPnPServiceDiscovery
+	{
+public:
+	/**
+	Constructor
+	*/
+	IMPORT_C RPnPServiceDiscovery( );
+
+	/**
+	Resolves the technology.
+	@param aTierID implementation UID. Identifies technology for which service discovery is requested.
+	@return KErrNone if successful. Returns system wide error codes on failure
+	*/
+	IMPORT_C TInt Open ( TUint aTierID );
+
+	/**
+	Issues a discovery request. The technology specific discovery information is packed
+	in aServiceInfo parameter. The caller should set a callback function of type MPnPCallBack in aServiceInfo
+	to retrieve discovery responses.
+	When the responses are received, MPnPObserver::OnPnPEventL is called for each response and calling clients
+	must provide the implementation to handle the responses.
+
+	In case of invalid input is provided in the form of corrupted uris for searching or low memory conditions,the application returns
+	synchronously with MPnPObserver::OnPnPError
+	@param aServiceInfo Parameter bundle contains the discovery information.	
+	*/
+	IMPORT_C void  Discover ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Retrieves the description of the remote service. The technology specific description information is packed
+	in aServiceInfo parameter. The caller should set a callback function of type MPnPObserver
+	in aServiceInfo to retrieve description responses.
+    When the responses are received MPnPObserver ::OnPnPEventL is called for each response and calling clients must provide
+	the implementation to handle the responses.
+
+	In case invalid input is provided in the form of corrupted uris for describe or low memory conditions,the application returns
+	synchronously with MPnPObserver::OnPnPError.However application is not able to filter out all invalid URLs
+	@param Parameter bundle contains the information about remote service(s) to be described.	
+	*/
+	IMPORT_C void Describe ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Subscribes for event notifications to the remote service or device .
+	The technology specific description information is packed in aServiceInfo parameter.
+	The caller should set a callback function of type MPnPObserver in aServiceInfo to retrieve description responses.
+    When the responses are received MPnPObserver ::OnPnPEventL is called for each response and calling clients must provide
+	the implementation to handle the responses.
+
+	In case invalid input is provided in the form of corrupted uris for subscribe or low memory conditions,the application returns
+	synchronously with MPnPObserver::OnPnPError.However application is not able to filter out all invalid URLs
+
+	@param Parameter bundle contains the information about remote service(s) to be described.	
+	*/
+
+	IMPORT_C void Subscribe ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Registers for events of remote service. The technology specific registration  information
+	is packed in aServiceInfo. The caller can set a callback function of type MPnPObserver in aServiceInfo
+	to retrieve response of registration.
+
+
+	In case invalid input is provided in the form of corrupted uris for registration or low memory conditions,the application returns
+	synchronously with MPnPObserver::OnPnPError.
+
+	@param Parameter bundle contains the register information to be sent to remote service.	
+	*/
+	IMPORT_C void  RegisterNotify ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Issues a cancel request to ongoing discoveries, describe , subscribe requests .This also cancels notify
+	of previously registered events from remote service. The technology specific discovery cancellation information
+	is packed in aServiceInfo.
+
+	@param Parameter bundle contains the cancel requests.	
+	*/
+	IMPORT_C void  Cancel ( const RPnPParameterBundle& aServiceInfo );
+
+    /**
+	It enables to send and receive messages.
+	@return KErrNone if successful. Returns system wide error codes on failure.
+	*/
+	IMPORT_C TInt InitiateControl ( RControlChannel& aControlChannel, const TDesC8& aUri );
+
+	/**
+	Close technology specific session.
+	*/
+	IMPORT_C void Close ( );
+
+private:
+	CPnPServiceDiscoveryBase* iPnPServiceDiscoveryImpl;	
+	};
+
+#endif /*__RPNPPSERVICEDISCOVER_H__*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/inc/rpnpservicepublisher.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+// 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 __RPNPPSERVICEPUBLISHER_H__
+#define __RPNPPSERVICEPUBLISHER_H__
+
+#include <e32base.h>
+
+class RControlChannel;
+class CPnPServicePublisherBase;
+class RPnPParameterBundle;
+
+
+/**
+A generic class which provides the functionality, to be implemented by a service point to service the remote clients.
+@publishedPartner
+@prototype
+*/
+class RPnPServicePublisher
+   {
+	public:
+	/**
+	Default constructor
+	*/
+	IMPORT_C RPnPServicePublisher ( );
+
+	/**
+	Resolves the access point.
+	@param aTierID implementation UID. Identifies technology for which service discovery is requested.
+	@return KErrNone if successful. Returns system wide error codes on failure
+	*/
+	IMPORT_C TInt Open (TUint aTierId );
+
+	/**
+	Publishes service notifications to remote clients. The technology specific service information
+	is packed in aServiceInfo.
+	Note that a service point will only publish a single device or service.Consequently only one
+	parameter set must be sent in the bundle.Also once published,the service point must be closed
+	before another publish is done.
+	
+
+	When the responses are received, MPnPObserver::OnPnPEventL is called for each response and calling clients
+	must provide the implementation to handle the responses.
+
+	In case of corrupted uris or value fields or low memory conditions, MPnPObserver::OnPnPError is called
+	synchronously which must be handled by the client
+
+	@param Parameter bundle containing service information.		
+	*/
+	IMPORT_C void Publish ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Sends service notification to remote clients who've subscribed to the service/device
+
+	No responses are received in MPnPObserver::OnPnPEventL and MPnPObserver::OnPnPError is also not called
+	@param Parameter bundle contains the technology specific information.	
+	*/
+	IMPORT_C void SendNotify ( const  RPnPParameterBundle & aServiceInfo );
+
+	/**	  
+	 It enables to send and receive messages.
+	 @return KErrNone if successful. Returns system wide error codes on failure.	 
+	 */
+	IMPORT_C TInt InitiateControl ( RControlChannel& aControlChannel );
+
+	/**
+	Close technology specific session.
+	*/
+	IMPORT_C void Close ( );
+
+	private:
+		 CPnPServicePublisherBase* iPnPServicePublisherImpl;		 
+    };
+
+#endif /*__RPNPPSERVICEPUBLISHER_H__*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/src/cpnpservicediscoverybase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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 "cpnpservicediscoverybase.h"
+#include <ecom/ecomresolverparams.h>
+#include <ecom/ecom.h>
+
+CPnPServiceDiscoveryBase* CPnPServiceDiscoveryBase::NewL( TUint aTierID )
+	{
+	_LIT8(KClient,"/Client");
+	TBuf8<128> tierId;
+	tierId.Num(aTierID);
+	tierId.Append(KClient);
+	// Set resolving parameters
+	TEComResolverParams resolverParams;
+	resolverParams.SetDataType(tierId);
+	return (REINTERPRET_CAST(CPnPServiceDiscoveryBase*,
+	REComSession::CreateImplementationL(KPnPInterfaceId,_FOFF(CPnPServiceDiscoveryBase, iEcomDtorID),resolverParams)));
+	}
+
+EXPORT_C CPnPServiceDiscoveryBase::CPnPServiceDiscoveryBase()
+	{
+	}
+
+EXPORT_C CPnPServiceDiscoveryBase::~CPnPServiceDiscoveryBase()
+	{
+	if (iEcomDtorID.iUid)
+		{
+		REComSession::DestroyedImplementation(iEcomDtorID);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/src/cpnpservicepublisherbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+// 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 "cpnpservicepublisherbase.h"
+#include <ecom/ecomresolverparams.h>
+#include <ecom/ecom.h>
+
+
+CPnPServicePublisherBase* CPnPServicePublisherBase::NewL( TUint aTierID )
+	{
+	_LIT8(KServer,"/Server");
+	TBuf8<128> tierId;
+	tierId.Num(aTierID);
+	tierId.Append(KServer);
+	// Set resolving parameters
+	TEComResolverParams resolverParams;
+	resolverParams.SetDataType(tierId);
+	return (REINTERPRET_CAST(CPnPServicePublisherBase*,
+		REComSession::CreateImplementationL(KPnPInterfaceId,_FOFF(CPnPServicePublisherBase, iEcomDtorID),resolverParams)));
+	}
+
+
+EXPORT_C CPnPServicePublisherBase::CPnPServicePublisherBase()
+	{
+	}
+
+EXPORT_C CPnPServicePublisherBase::~CPnPServicePublisherBase()
+	{
+	if (iEcomDtorID.iUid)
+		{
+		REComSession::DestroyedImplementation(iEcomDtorID);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/src/pnpparameterbundle.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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 "pnpparameterbundle.h"
+
+EXPORT_C TInt RPnPParameterBundleBase::Open()
+ 	{
+ 	TRAPD(err,CreateL());
+ 	return err;
+ 	}
+ 
+ EXPORT_C void RPnPParameterBundleBase::Close()
+ 	{
+ 	Destroy();
+ 	}
+ 
+ EXPORT_C void RPnPParameterBundle::SetPnPObserver ( MPnPObserver* aPnPObserver )
+ 	{
+ 	iPnPObserver = aPnPObserver;
+ 	}
+ 
+ EXPORT_C MPnPObserver* RPnPParameterBundle::PnPObserver () const
+ 	{
+ 	return iPnPObserver;
+ 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/src/rcontrolchannel.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,120 @@
+// 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 <pnp/ccontrolchannelbase.h>
+#include <pnp/pnpconstants.h>
+#include "rcontrolchannel.h"
+
+
+EXPORT_C RControlChannel::RControlChannel ()
+: iControlChannelImpl ( NULL )
+	{	
+	}
+
+EXPORT_C void RControlChannel::Recv ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	__ASSERT_DEBUG ( iControlChannelImpl, User::Panic( KControlChannelHandleNotOpen, KErrControlChannelNotOpen) );
+	iControlChannelImpl->Recv ( aMessage, aStatus );	
+	}
+
+EXPORT_C void RControlChannel::Send ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	__ASSERT_DEBUG ( iControlChannelImpl, User::Panic( KControlChannelHandleNotOpen, KErrControlChannelNotOpen) );
+	iControlChannelImpl->Send ( aMessage, aStatus );
+	}
+	
+EXPORT_C void RControlChannel::Close ()
+	{
+	delete iControlChannelImpl;
+	iControlChannelImpl = NULL;
+	}
+EXPORT_C void RControlChannel::CancelRecv ()
+	{
+	iControlChannelImpl->CancelRecv();	
+	}
+
+EXPORT_C void RControlChannel::CancelSend ()
+	{
+	iControlChannelImpl->CancelSend();	
+	}
+void RControlChannel::Attach(CControlChannelBase& aChannelBase)
+    {
+    iControlChannelImpl = &aChannelBase;
+	}
+	
+// -----------------------------------------------------
+
+EXPORT_C TControlMessage::TControlMessage ()
+: iPtr(NULL, 0),
+iMaxLength (KErrUnknown),
+iFlags(0)
+	{
+		
+	}
+
+EXPORT_C TControlMessage::~TControlMessage ()
+	{
+		
+	}
+
+EXPORT_C void TControlMessage::SetMessageDes ( const TDesC8& aData )
+	{
+	iPtr.Set((TUint8*)aData.Ptr(), aData.Length(), aData.Length() );
+	}
+
+EXPORT_C void TControlMessage::SetMessagePtr ( TDes8& aData )
+	{
+	iPtr.Set((TUint8*)aData.Ptr(), aData.Length(), aData.MaxLength() );
+	}
+
+EXPORT_C const TDesC8& TControlMessage::MessageDes () const
+	{
+	return iPtr;	
+	}
+
+EXPORT_C TDes8& TControlMessage::MessagePtr ()
+	{
+	return iPtr;	
+	}	
+
+EXPORT_C TBool TControlMessage::IsLast() const
+	{
+	return ( iFlags & 1 ); // 0th bit ( LSB )
+	}
+	
+EXPORT_C void TControlMessage::SetLast()
+	{
+	iFlags |= 1; // set the 0th bit
+	}
+
+EXPORT_C void TControlMessage::ClearFlags ()
+	{
+	// clear set last flag
+	iFlags &= ~1;
+	}
+
+EXPORT_C void TControlMessage::SetMaxLength ( TInt aLen )
+	{
+	iMaxLength = aLen;	
+	}
+
+EXPORT_C TInt TControlMessage::MaxLength () const
+	{
+	return iMaxLength;	
+	}
+	
+
+// ----------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/src/rpnpservicediscovery.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,94 @@
+// 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 <pnp/cpnpservicediscoverybase.h>
+#include "rpnpservicediscovery.h"
+
+EXPORT_C RPnPServiceDiscovery::RPnPServiceDiscovery( ):
+	iPnPServiceDiscoveryImpl ( NULL )
+	{
+	}  
+
+EXPORT_C TInt RPnPServiceDiscovery::Open ( TUint aTierID )
+	{
+	if (!iPnPServiceDiscoveryImpl )
+		{
+		TInt err = KErrNone;
+		TRAP(err,iPnPServiceDiscoveryImpl = CPnPServiceDiscoveryBase::NewL( aTierID ));
+		if ( err != KErrNone )
+			return err;
+			
+		err = iPnPServiceDiscoveryImpl->Construct( aTierID );
+		if ( err != KErrNone )
+			{
+			Close();
+			}
+		return err;
+		}
+	else
+		return KErrAlreadyExists;
+				
+	}
+
+EXPORT_C void  RPnPServiceDiscovery::Discover ( const RPnPParameterBundle& aServiceInfo )
+	{	
+	__ASSERT_ALWAYS( iPnPServiceDiscoveryImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+	iPnPServiceDiscoveryImpl->Discover ( aServiceInfo );
+	}
+
+EXPORT_C void RPnPServiceDiscovery::Describe ( const RPnPParameterBundle& aServiceInfo )
+	{	
+	__ASSERT_ALWAYS( iPnPServiceDiscoveryImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+	iPnPServiceDiscoveryImpl->Describe ( aServiceInfo );
+	}
+
+EXPORT_C void RPnPServiceDiscovery::Subscribe ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_ALWAYS( iPnPServiceDiscoveryImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+	iPnPServiceDiscoveryImpl->Subscribe ( aServiceInfo );
+	}
+
+EXPORT_C void  RPnPServiceDiscovery::RegisterNotify ( const RPnPParameterBundle& aServiceInfo )
+	{	
+	__ASSERT_ALWAYS( iPnPServiceDiscoveryImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+	iPnPServiceDiscoveryImpl->RegisterNotify ( aServiceInfo );
+	}
+
+
+EXPORT_C void  RPnPServiceDiscovery::Cancel ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_ALWAYS( iPnPServiceDiscoveryImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+	iPnPServiceDiscoveryImpl->Cancel ( aServiceInfo );
+	}
+
+EXPORT_C TInt RPnPServiceDiscovery::InitiateControl( RControlChannel& aControlChannel, const TDesC8& aUri)
+	{
+	__ASSERT_ALWAYS( iPnPServiceDiscoveryImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+    CControlChannelBase* channelBase = NULL;
+	TRAPD (err , channelBase = iPnPServiceDiscoveryImpl->InitiateControlL(aUri));
+    if ( err == KErrNone)
+        {    	
+    	aControlChannel.Attach(*channelBase);  
+        }
+    return err;	
+	}
+
+EXPORT_C void RPnPServiceDiscovery::Close ( )
+	{
+	delete	iPnPServiceDiscoveryImpl;
+	iPnPServiceDiscoveryImpl = NULL;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/src/rpnpservicepublisher.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,75 @@
+// 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 <pnp/cpnpservicepublisherbase.h>
+#include "rpnpservicepublisher.h"
+
+
+EXPORT_C RPnPServicePublisher::RPnPServicePublisher( ):
+	iPnPServicePublisherImpl ( NULL )
+	{
+	}
+
+EXPORT_C TInt RPnPServicePublisher::Open ( TUint aTierID )
+	{
+	if (!iPnPServicePublisherImpl )
+		{
+		TInt err = KErrNone;
+		TRAP(err,iPnPServicePublisherImpl = CPnPServicePublisherBase::NewL( aTierID ));
+		if ( err != KErrNone )
+			return err;
+			
+		err = iPnPServicePublisherImpl->Construct( aTierID );
+		if ( err != KErrNone )
+			{
+			Close();
+			}
+		return err;
+		}
+	else
+		return KErrAlreadyExists;
+				
+	}
+
+EXPORT_C void RPnPServicePublisher::Close ( )
+	{
+	delete	iPnPServicePublisherImpl;
+	iPnPServicePublisherImpl = NULL;
+	}
+
+EXPORT_C void RPnPServicePublisher::Publish ( const  RPnPParameterBundle& aServiceInfo )
+	{	
+	__ASSERT_ALWAYS( iPnPServicePublisherImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+	iPnPServicePublisherImpl->Publish ( aServiceInfo );
+	}
+
+EXPORT_C void RPnPServicePublisher::SendNotify ( const  RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_ALWAYS( iPnPServicePublisherImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+	iPnPServicePublisherImpl->SendNotify ( aServiceInfo );
+	}
+
+EXPORT_C TInt RPnPServicePublisher::InitiateControl( RControlChannel& aControlChannel )
+	{
+	__ASSERT_ALWAYS( iPnPServicePublisherImpl, User::Panic( KPnPHandleNotOpen, KErrPnPNotOpen) );
+    CControlChannelBase* channelBase = NULL;
+	TRAPD (err , channelBase = iPnPServicePublisherImpl->InitiateControlL());
+    if ( err == KErrNone)
+        {    	
+    	aControlChannel.Attach(*channelBase);  
+        }
+    return err;		
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/data/testpnp.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,92 @@
+//testpnp.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover operation to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+[cpstatus_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+
+[cancel_discovery_1]
+operationtype=canceldiscovery
+
+
+[spstatus_1]
+spStatus=TRUE
+operationtype=openpublisher
+
+[cpstatus_2]
+operationtype=opendiscovererfailed
+
+
+[spstatus_2]
+operationtype=openpublisherfailed
+
+
+//Publish a service 
+[publish_service_1]
+operationtype=publishservice
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+positivecase=TRUE
+
+
+//Discover published service
+[discover_1]
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1
+operationtype=discovery
+canceldiscovery=FALSE
+positivecase=TRUE
+
+
+//Describe 
+[describe_1]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+
+[cancel_describe_1]
+operationtype=canceldescribe
+
+
+[register_notify_1]
+listofuritypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+
+
+[cancel_notify_1]
+operationtype=cancelnotify
+
+
+//Subscribe
+[subscribe_1]
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+
+
+[initiate_action_1]
+operationtype=initiateaction
+
+
+[send_notify_1]
+operationtype=notify
+
+
+[testpnp_1]
+listofsequences=cpstatus_1,discover_1,describe_1,register_notify_1,subscribe_1,spstatus_1,publish_service_1,send_notify_1,cancel_describe_1,cancel_notify_1,cancel_discovery_1
+
+
+[testpnp_2]
+listofsequences=cpstatus_2,spstatus_2
+
+
+[testpnp_3]
+listofsequences=cpstatus_1,spstatus_1,cpstatus_1,spstatus_1
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/data/testpnp.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all  
+
+LOAD_SUITE testpnp
+
+START_TESTCASE				testpnp_1				
+//! @SYMTestCaseID			PNP_001,PNP_002,PNP_003,PNP_004,PNP_005,PNP_006,PNP_007
+//! @SYMREQ					
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High
+//! @SYMTestType 			UT
+
+RUN_TEST_STEP 500 testpnp TestPnPManager z:\pnp\testpnp\testdata\ini\testpnp.ini  testpnp_1
+END_TESTCASE	testpnp_1
+PRINT Completed 
+
+START_TESTCASE				testpnp_2				
+//! @SYMREQ					
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High
+//! @SYMTestType 			UT
+
+RUN_TEST_STEP !Error=-1 500 testpnp TestPnPManager z:\pnp\testpnp\testdata\ini\testpnp.ini  testpnp_2
+END_TESTCASE	testpnp_2
+PRINT Completed 
+
+START_TESTCASE				testpnp_3				
+//! @SYMREQ					
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High
+//! @SYMTestType 			UT
+
+RUN_TEST_STEP !Error=-11 500 testpnp TestPnPManager z:\pnp\testpnp\testdata\ini\testpnp.ini  testpnp_3
+END_TESTCASE	testpnp_3
+PRINT Completed 
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,34 @@
+// 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:
+//
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+testpnp.iby  /epoc32/rom/include/testpnp.iby 
+
+//script file
+../data/testpnp.script		        z:/pnp/testpnp/scripts/testpnp.script
+
+//ini file
+../data/testpnp.ini				    z:/pnp/testpnp/testdata/ini/testpnp.ini
+
+
+PRJ_TESTMMPFILES
+testpnp.mmp
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/group/testpnp.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,34 @@
+// 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 __TESTPNP_IBY__
+#define __TESTPNP_IBY__
+
+#include <testexecute.iby>
+
+file=ABI_DIR\BUILD_DIR\testpnp.exe	                 Sys\Bin\testpnp.exe	
+
+//script
+data=EPOCROOT##epoc32\data\z\pnp\testpnp\scripts\testpnp.script		pnp\testpnp\scripts\testpnp.script
+
+
+//ini file
+data=EPOCROOT##epoc32\data\z\pnp\testpnp\testdata\ini\testpnp.ini   	pnp\testpnp\testdata\ini\testpnp.ini
+
+//testplugin
+ECOM_PLUGIN(testplugin.dll,2025D05D.rsc)
+
+#endif  //__TESTPNP_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/group/testpnp.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+// 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:
+//
+
+TARGET      	testpnp.exe
+TARGETTYPE  	exe
+UID		0x1000007A 0xA0009308
+VENDORID 	0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+
+SOURCE 			testpnp.cpp
+SOURCE 			testpnpmanager.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE		../../testplugin/inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/pnp
+SYSTEMINCLUDE		/epoc32/include/ecom
+SYSTEMINCLUDE		/epoc32/include/test
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			rpnp.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+LIBRARY                 esock.lib 
+LIBRARY                 insock.lib
+LIBRARY			cinidata.lib
+LIBRARY                 netmeta.lib
+
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/inc/constants.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,72 @@
+// 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:
+// Contains constants refered in test code
+// 
+//
+
+#ifndef __CONSTANTS_H__
+#define __CONSTANTS_H__
+
+// Constant literals
+_LIT(KTestPnPManager, "TestPnPManager");
+
+
+const TInt KMaxLogSize 		    = 1024;
+const TInt KMaxUriSize 		    = 1024;
+const TUint KTestTierId 	    = 0x2025D054;
+const TUint KInvalidTestTierId 	= 0x2525D025;
+
+//Constants
+_LIT(KDiscovery, 			"discovery");
+_LIT(KDescribe, 			"describe");
+_LIT(KSubscribe, 			"subscribe");
+_LIT(KRegisterAnnouncement, "registernotify");
+_LIT(KPublishService, 		"publishservice");
+_LIT(KNotify, 				"notify");
+_LIT(KCancelDiscover, 		"canceldiscovery");
+_LIT(KCancelDescribe, 		"canceldescribe");
+_LIT(KCancelNotify,			"cancelnotify");
+_LIT(KReadIni,				"readini");
+_LIT(KDescribeService,		"describeservice");
+_LIT(KOpenDiscoverer,		"opendiscoverer");
+_LIT(KOpenPublisher,		"openpublisher");
+_LIT(KCancelAll,			"cancelall");
+_LIT(KPositiveCase,			"positivecase");
+_LIT(KOpenDiscovererFail,	"opendiscovererfailed");
+_LIT(KOpenPublisherFail,	"openpublisherfailed");
+
+//Constant literals -- Discovery response 
+_LIT(KResponseTime, 		"responsetime");
+_LIT(KDescription, 			"description");
+_LIT(KUri, 					"uri");
+_LIT(KServiceType,			"servicetype");
+_LIT(KOperationType,		"operationtype");
+_LIT(KUrl,					"url");
+
+const TInt KMaxBufLength = 256;
+
+
+_LIT8(KSlash, "/");
+_LIT8(KColonSlashSlash, "://");
+_LIT8(KColon, ":");
+
+
+//Panics
+_LIT(KDescribeTestPanicCategory,"Describe");
+_LIT(KDescoveryTestPanicCategory, "Discovery");
+
+	
+
+
+#endif //__CONSTANTS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/inc/testpnp.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+// 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:
+// Contains declarations of CTestPnP class
+// 
+//
+
+#ifndef __TEST_PNP_H__
+#define __TEST_PNP_H__
+
+#include <testexecuteserverbase.h>
+
+/*
+CTestPnP class which is derived from the Test server and provides the functionalities to 
+perform ability to run individual test steps (test cases or part testcases) either sequentially 
+or concurrently within scripts (test harnesses). 
+*/
+
+class CTestPnP: public CTestServer
+	{
+public:
+	static CTestPnP* NewL();
+	// Base class pure virtual override
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+
+protected:
+	CTestStep*    CreateTestStepL(const TDesC& aStepName);
+	};
+
+#endif // __TEST_PNP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/inc/testpnpmanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+// Contains declaration of CTestPnPManager, CTestPnPObserver 
+// 
+//
+
+#ifndef __TEST_PNP_MANAGER_H__
+#define __TEST_PNP_MANAGER_H__
+
+// System Includes
+#include <testexecutestepbase.h>
+#include <e32base.h>
+#include <e32cmn.h>
+#include <e32std.h>
+#include <pnp/rpnpservicediscovery.h>
+#include <pnp/rpnpservicepublisher.h>
+#include <pnp/mpnpobserver.h>
+#include <pnp/pnpparameterbundle.h>
+#include <e32des8.h>
+
+
+// User Includes
+#include "constants.h"
+#include "ctestcontrolchannel.h"
+#include "testpnpparamset.h"
+
+// Forward declarations
+class CTestPnPObserver;
+class CTestTimer;
+
+class MTimerObserver
+	{
+public:
+	virtual void TimedOut() = 0;		
+	};
+
+/*
+CTestPnPManager class which is derived from the CTestStep and provides the
+functionalities to perform Create (and open) an individual TestStep (testcase or part testcase), Run a TestStep
+with defined pre and post processing, Abort a TestStep, Close a TestStep session.
+Also performs the creation control point or service point, performs a sequence of pnp operations
+and get back the results to compare them against expected results.
+*/
+class CTestPnPManager : public CTestStep,
+						public MTimerObserver
+	{
+public:
+	CTestPnPManager();
+	~CTestPnPManager();
+
+	virtual TVerdict doTestStepPreambleL();
+	virtual TVerdict doTestStepPostambleL();
+	virtual TVerdict doTestStepL();
+
+	void SetCurrentSection(const TDesC& aCurrentSection);
+	TDesC& GetCurrentSection();
+	
+	// Operation  related functions
+	void InitializeL();
+	void SequenceOperationsL();
+	void PerformDesiredOperationsL(const TDesC& aSequence);
+
+	// TestPnP API related functions
+	void OpenPublisherL();	
+	void OpenDiscovererL();
+	void DiscoverL();
+	void PublishServiceL(const TDesC& aOperationType);
+	void DescribeL();
+	void DescribeServiceL();
+	void RegisterForAnnouncementsL();
+	void InitiateActionL();
+	void SubscribeForStateChangeNotificationsL();
+	void SendNotificationsL();
+    void OpenDiscovererFailed();
+	void OpenPublisherFailed();
+	
+	// Cancellation related functions
+	void CancelDiscoverL();
+	void CancelNotifyAnnouncementL ();	
+	void CancelDescribeL();
+
+	// Utility functions
+	void TokenizeStringL(const TDesC& aString, RArray<TPtrC>& aList, TChar aSeparator = ',');
+	const TDesC& ScriptFileName();
+	
+	// from MTimerObserver
+	void TimedOut();
+
+	
+private:
+    
+    CActiveScheduler*					    iScheduler;
+	RPnPServiceDiscovery					iControlPoint;
+	RPnPServicePublisher   		        	iServicePoint;
+	RControlChannel							iControlChannel;	
+	TControlMessage                         iMsg;
+	TRequestStatus                          iStatus;	
+
+private:	
+	TBuf<KMaxBufLength>					iCurrentSection;
+	TBuf<KMaxBufLength> 				iScriptName;
+	TBool								iCancelDiscovery;
+	
+	};
+
+/*
+CTestPnPObserver class which is derived from CBase and MPnPObserver to provide the
+following functionalities. It supports the methods capture the results when an
+pnp event is hit after performing any pnp operation.
+*/
+class CTestPnPObserver: public CBase, MPnPObserver
+	{
+public:
+	static CTestPnPObserver* NewL(CTestPnPManager* aManager);
+	~CTestPnPObserver();
+	void OnPnPEventL (RPnPParameterBundleBase& aServiceEventInfo);
+	void OnPnPError (TInt aError);
+	CTestPnPManager& Manager();
+	void SequenceOperationsL();
+
+private:
+	CTestPnPObserver();
+	void ConstructL(CTestPnPManager* aManager);
+
+private:
+	  CTestPnPManager* 					iManager;
+	  TUint								iSequence;
+	};
+	
+
+class CTestTimer:public CActive
+	{
+public:
+	static CTestTimer* NewL(MTimerObserver& aObserver);
+	~CTestTimer();
+	void After(TTimeIntervalMicroSeconds32 aInterval);
+	
+private:
+	CTestTimer(MTimerObserver& aObserver);
+			
+public:
+	void RunL();
+	void DoCancel();
+	
+private:
+	RTimer		iTimer;
+	MTimerObserver& iObserver;	
+	};	
+
+
+#endif //__TEST_PNP_MANAGER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/src/testpnp.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,119 @@
+// 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:
+// Contains implementation of CTestPnPManager class
+// 
+//
+
+#include "testpnp.h"
+#include "testpnpmanager.h"
+
+/*
+	Static factory constructor. Uses two phase construction and leaves nothing on the 
+	CleanupStack. Creates a CTestPnP object.
+	@param  None
+	@return Instance of the test server
+ */
+CTestPnP* CTestPnP::NewL()
+	{
+	CTestPnP *	server = new (ELeave) CTestPnP();
+	CleanupStack::PushL(server);
+	// CServer base class call
+	RProcess	handle = RProcess();
+	TParsePtrC	serverName(handle.FileName());
+	server->ConstructL(serverName.Name());
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+/*
+   Function to create and start the CTestServer derived server.
+   Secure variant.Much simpler, uses the new Rendezvous() call to sync with the client
+   @param  None
+   @return None
+*/
+LOCAL_C void MainL()
+	{
+	// Leave the hooks in for platform security
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().DataCaging(RProcess::ESecureApiOn);
+	CActiveScheduler* sched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CTestPnP*	server = NULL;
+	// Create the CTestServer derived server
+	TRAPD(err,server = CTestPnP::NewL());
+	if(err == KErrNone)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+/**
+   Secure variant only
+   Process entry point. Called by client using RProcess API.	
+   @param  None
+   @return Standard Epoc error code on process exit
+ */
+GLDEF_C TInt E32Main()
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD( error, MainL() );
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return error;
+    }
+
+
+CTestStep* CTestPnP::CreateTestStep(const TDesC& aStepName)
+	{
+	CTestStep* testStep = NULL;
+	TRAPD(err,testStep=CreateTestStepL(aStepName));
+	if(err == KErrNone)
+		{
+		return testStep;
+		}
+	else
+		{
+		return NULL;
+		}
+	}
+
+/**
+   Secure and non-secure variants
+   Implementation of CTestServer pure virtual
+   @param  aStepName a reference to string
+   @return A CTestStep derived instance
+ */
+CTestStep* CTestPnP::CreateTestStepL(const TDesC& aStepName)
+	{
+	CTestStep* testStep = NULL;
+	// They are created "just in time" when the worker thread is created
+	// More test steps can be added below
+	if(aStepName == KTestPnPManager)
+		{
+		testStep = new CTestPnPManager();
+        }
+	return testStep;
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/integtest/src/testpnpmanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,829 @@
+// 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:
+// Contains implementation of CTestPnPManager class
+// Contains implemenatation of CTestPnPManager, CTestPnPObserver, CTestPnPTimer, 
+// and CAction classes
+// 
+//
+
+#include "testpnpmanager.h"
+
+
+/*
+  Constructor:
+  @test
+*/
+CTestPnPManager::CTestPnPManager()
+:	CTestStep()
+	{
+	iCancelDiscovery = EFalse;
+	}
+
+/*
+   Initializes all member vaiables.
+   @param		None.
+   @return		None.
+*/
+void CTestPnPManager::InitializeL()
+	{
+    iScheduler = new (ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iScheduler);
+	}
+
+/*
+   Destructor
+   @test
+*/
+CTestPnPManager::~CTestPnPManager()
+	{
+	_LIT(KInfoDesctructorBegin, "Begin: In Destructor CTestPnPanager....\n");
+	INFO_PRINTF1(KInfoDesctructorBegin);
+	delete iScheduler;
+	iScheduler = NULL;	
+	iControlChannel.Close();	
+	iControlPoint.Close();
+	iServicePoint.Close();
+	}
+
+
+
+/*
+   Implementation of CTestStep base class virtual and this is used for doing all
+   initialisation common
+    to derived classes here.
+   @param  None
+   @return TVerdict
+ */
+TVerdict CTestPnPManager::doTestStepPreambleL()
+	{
+    InitializeL();
+	return CTestStep::doTestStepPreambleL();
+	}
+
+
+/*
+ return Script File name..if any
+*/
+const TDesC& CTestPnPManager::ScriptFileName()
+	{
+	return iScriptName;
+	}
+
+
+/*
+   Implementation of CTestStep base class virtual and it is used for doing all
+   after test treatment common to derived classes in here.
+   @return TVerdict
+ */
+TVerdict CTestPnPManager::doTestStepPostambleL()
+	{
+	return CTestStep::doTestStepPostambleL();
+	}
+
+
+TVerdict CTestPnPManager::doTestStepL()
+	{
+	SequenceOperationsL();
+	return TestStepResult();
+	}
+
+/*
+   This function performs operations based on sequence specified in the ini file
+   @param  None
+   @return None
+*/
+void CTestPnPManager::SequenceOperationsL()
+	{
+	_LIT(KInfoLogFile, "SequenceOperationsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RArray<TPtrC> sequenceList;
+	CleanupClosePushL(sequenceList);
+	TPtrC listOfSequences;
+	_LIT(KListOfSequences, "listofsequences");
+	GetStringFromConfig(ConfigSection(), KListOfSequences, listOfSequences);
+
+	TokenizeStringL(listOfSequences, sequenceList);
+	TInt numOperations = sequenceList.Count();
+
+	for(TInt i(0); i < numOperations; i++)
+		{
+		SetCurrentSection(sequenceList[i]);
+		PerformDesiredOperationsL(sequenceList[i]);
+		}
+	CleanupStack::PopAndDestroy(); 
+	_LIT(KInfoLogFile1, "SequenceOperationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+
+/*
+   This function performs desired operations specified as a parameter
+   @param  aOperation string representing operation to be performed
+   @return None
+*/
+void CTestPnPManager::PerformDesiredOperationsL(const TDesC& aOperation)
+	{
+	const TInt KMatch = 0;
+	TPtrC operationType;
+	_LIT(KOperationType, "operationtype");
+	GetStringFromConfig(aOperation, KOperationType, operationType);
+	
+	if(operationType.Compare(KOpenDiscoverer) == KMatch)
+		{
+		OpenDiscovererL();
+		}
+	else if(operationType.Compare(KOpenPublisher) == KMatch)
+		{
+		OpenPublisherL();
+		}
+	else if(operationType.Compare(KDiscovery) == KMatch)
+		{
+		DiscoverL();
+		}
+	else if(operationType.Compare(KCancelDiscover) == KMatch)
+		{
+		CancelDiscoverL();
+		}
+	else if(operationType.Compare(KDescribe) == 0)
+	    {
+    	DescribeServiceL();
+    	}
+    else if(operationType.Compare(KCancelDescribe) == KMatch)
+		{
+		CancelDescribeL();
+		}
+	else if(operationType.Compare(KPublishService) == KMatch)
+		{
+		PublishServiceL(aOperation);
+		}
+	else if(operationType.Compare(KSubscribe) == KMatch)
+		{
+		SubscribeForStateChangeNotificationsL();
+		}
+	else if(operationType.Compare(KRegisterAnnouncement) == KMatch)
+		{
+		RegisterForAnnouncementsL();
+		}
+	else if(operationType.Compare(KCancelNotify) == KMatch)
+		{
+		CancelNotifyAnnouncementL();
+		}
+	else if(operationType.Compare(KNotify) == KMatch)
+		{
+	    SendNotificationsL();
+		}
+	else if(operationType.Compare(KOpenDiscovererFail) == KMatch)
+	   {
+	   OpenDiscovererFailed();
+	   }
+    else if(operationType.Compare(KOpenPublisherFail) == KMatch)
+	   {
+	   OpenPublisherFailed();   
+	   }
+	}
+
+/*
+   Parses a comma separated string and constructs a list out of the values
+   @param	aString a reference to a string to be tokenized
+   @param	aList is an out parameter to store a list of tokens in an arry
+   @param	aSeparator is a character used to delimit the tokens
+  */
+void CTestPnPManager::TokenizeStringL(const TDesC& aString, RArray<TPtrC>& aList, TChar aSeparator)
+	{
+	TLex lexer(aString);
+
+	while(!lexer.Eos())
+		{
+		lexer.SkipSpaceAndMark();
+
+		while(!lexer.Eos() && lexer.Get() != aSeparator)
+			{
+			}
+
+		if(!lexer.Eos())
+			{
+			lexer.UnGet();
+			}
+		aList.AppendL(lexer.MarkedToken());
+		lexer.Inc();
+		}
+	}
+
+
+/*
+   Sets the current config section.
+   @param	aCurrentSection - a reference string that represent current config section
+   @return	None
+ */
+void CTestPnPManager::SetCurrentSection(const TDesC& aCurrentSection)
+	{
+	iCurrentSection = aCurrentSection;
+	}
+
+/*
+   Retrieve the current config section.
+   @param
+   @return	Reference to current config section
+ */
+TDesC& CTestPnPManager::GetCurrentSection()
+	{
+	return	iCurrentSection;
+	}
+
+/*
+	Tests whether discovering services/devices is performed
+	@param		aOperationType is reference to a section name in ini file where required parameters
+				needs to be referred for this operation.
+	@return		None.
+ */
+void CTestPnPManager::DiscoverL()
+	{
+	RArray<TPtrC> serviceTypeList;
+	TPtrC listOfServiceTypes;
+	_LIT(KListOfServiceTypes, "listofservicetypes");
+	_LIT(KInfoLogFile, "DiscoverL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CTestPnPObserver* pnpObserver = CTestPnPObserver::NewL(this);
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)pnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPDiscoverRequestParamSet);
+	if(!GetStringFromConfig(GetCurrentSection(), KListOfServiceTypes, listOfServiceTypes))
+		{
+		_LIT(KErrInfo, "Problem in reading values from ini. \n Expected fields are: \n%S \n");
+		ERR_PRINTF2( KErrInfo, &KListOfServiceTypes );
+		return;
+		}
+
+	TokenizeStringL(listOfServiceTypes, serviceTypeList);
+	TInt numUris = serviceTypeList.Count();
+
+	serviceTypeList.Close();
+	iControlPoint.Discover(pnpBundle);
+
+	_LIT(KInfoLogFile1, "DiscoverL End... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	}
+
+
+/*
+	Tests whether Publishing a Service/Device is performed
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void CTestPnPManager::PublishServiceL (const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "PublishServiceL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CTestPnPObserver* pnpObserver = CTestPnPObserver::NewL(this);
+	RPnPParameterBundle pnpBundle ;
+	pnpBundle.Open();
+	
+    CleanupClosePushL( pnpBundle );
+    pnpBundle.SetPnPObserver((MPnPObserver*)pnpObserver);
+    RParameterFamily family = pnpBundle.CreateFamilyL(ETestPnPServiceRegisterParamSet);
+    
+    TPtrC serviceType;
+	GetStringFromConfig(aOperationType, KServiceType, serviceType);
+	RBuf8 serviceTypeBuf;
+	serviceTypeBuf.Create(serviceType.Length());
+	serviceTypeBuf.Copy(serviceType);
+	
+	iServicePoint.Publish( pnpBundle );
+    serviceTypeBuf.Close();
+    
+	_LIT(KInfoLogFile1, "PublishServiceL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	}
+
+
+void CTestPnPManager::SendNotificationsL ()
+	{
+	_LIT(KInfoLogFile, "SendNotificationsL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+ 
+    RPnPParameterBundle pnpBundle;
+    pnpBundle.CreateL();   
+    CleanupClosePushL( pnpBundle );
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL(ETestPnPServiceNotificationParamSet);
+
+	iServicePoint.SendNotify( pnpBundle );
+    _LIT(KInfoLogFile1, "SendNotificationsL End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	CleanupStack::Pop( &pnpBundle );	
+	}
+
+
+/*	Opens a handle to a RPnPServiceDiscovery object
+	@param			None.
+	@return			None.
+ */
+void CTestPnPManager::OpenDiscovererL()
+	{
+	_LIT(KInfoLogFile, "OpenDiscovererL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TBool cpStatus = EFalse;
+	TInt openStatus = 0;
+	_LIT(KCpStatus, "cpstatus");
+	GetBoolFromConfig(GetCurrentSection(), KCpStatus, cpStatus);
+	if(!cpStatus)
+		{
+		_LIT(KInfoDiscoverer, "Control Point should not be Created \n");
+		INFO_PRINTF1(KInfoDiscoverer);
+		return;
+		}
+
+	openStatus = iControlPoint.Open(KTestTierId);
+	
+	if(openStatus != KErrNone) 
+		{
+		_LIT(KOpenDiscovererFailed, "Control Point discovery open failed with error %d ");
+		ERR_PRINTF2(KOpenDiscovererFailed, openStatus);
+		SetTestStepError(openStatus);
+		}
+	else
+		{
+		_LIT(KOpenDiscovererSuccess, "Control Point Discovery was successfully started with return value %d :");
+		INFO_PRINTF2(KOpenDiscovererSuccess, openStatus);
+		}
+		
+	_LIT8(KUri, "Prakash");
+	TBuf8<255> buf(KUri);
+	iControlPoint.InitiateControl(iControlChannel,buf);
+	iMsg.SetMessagePtr(buf);
+    TPtrC8 iPtr=iMsg.MessagePtr();	
+    if ( !iMsg.IsLast () )
+	      {
+	      iMsg.ClearFlags();
+	      iControlChannel.Send(iMsg,iStatus);
+	      CTestTimer* testTimer = CTestTimer::NewL(*this);
+	      testTimer->After(2000000);
+	      CActiveScheduler::Start();
+	      delete testTimer;
+		  }
+	}
+
+
+/*
+	Opens a handle to a RPnPServicePublisher object 
+	@param			None.
+	@return			TBool representing success or failure of the operation.
+ */
+void CTestPnPManager::OpenPublisherL()
+	{
+	_LIT(KInfoLogFile, "OpenPublisherL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TBool spStatus = EFalse;
+	TInt openStatus = 0;
+	_LIT(KSpStatus, "spstatus");
+	GetBoolFromConfig(GetCurrentSection(), KSpStatus, spStatus);
+
+	openStatus = iServicePoint.Open(KTestTierId);
+
+  	if( openStatus != KErrNone )
+  		{
+ 		_LIT(KOpenDiscovererFailed, "Publisher open failed with error %d ");
+ 		ERR_PRINTF2(KOpenDiscovererFailed, openStatus);
+ 		SetTestStepError(openStatus);
+ 		}
+ 	else
+ 		{
+ 		_LIT(KOpenPublisherSuccess, "Service publisher was successfully started with return value %d :");
+  		INFO_PRINTF2(KOpenPublisherSuccess, openStatus);
+ 		}
+ 		
+ 	iServicePoint.InitiateControl(iControlChannel);
+	_LIT8(KUri, "Rajesh");
+	TBufC8<255> buf(KUri);	
+	iMsg.SetMessageDes ( buf );    
+    iMsg.SetLast ();
+    TPtrC8 iPtr= iMsg.MessageDes();
+	TInt newLen = buf.Length();
+	iMsg.SetMaxLength (newLen);
+	TInt maxLen =iMsg.MaxLength();
+	iControlChannel.Recv(iMsg,iStatus);
+    CTestTimer* testTimer = CTestTimer::NewL(*this);
+	testTimer->After(2000000);
+	CActiveScheduler::Start();
+	delete testTimer;
+	}
+	
+
+/*
+Test for Register announcements ssdp:alive and ssdp:byebye messages
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+*/
+void  CTestPnPManager::RegisterForAnnouncementsL ()
+	{
+	_LIT(KInfoLogFile, "RegisterForAnnouncementsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RArray<TPtrC> uriTypeList;
+	TPtrC listOfUriTypes;
+	_LIT(KListOfUriTypes, "listofuritypes");
+	CTestPnPObserver* pnpObserver = CTestPnPObserver::NewL(this);
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)pnpObserver);
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPRegisterAnnouncementParamSet);
+	
+	if(!GetStringFromConfig(GetCurrentSection(), KListOfUriTypes, listOfUriTypes))
+		{
+		_LIT(KErrInfo, "Problem in reading values from ini. \n Expected fields are: %S \n");
+		ERR_PRINTF2( KErrInfo, &KListOfUriTypes);
+		return;
+		}
+
+	TokenizeStringL(listOfUriTypes, uriTypeList);
+	TInt numUris = uriTypeList.Count();
+
+	uriTypeList.Close();
+	iControlPoint.RegisterNotify( pnpBundle );
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	_LIT(KInfoLogFile1, "RegisterForAnnouncementsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);	
+	}
+
+/*
+	Tests whether subscribtion to event change notifications is performed
+	@param			None.
+	@return			None.
+ */
+void  CTestPnPManager::SubscribeForStateChangeNotificationsL()
+	{
+	_LIT(KInfoLogFile, "SubscribeForStateChangeNotificationsL() start.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CTestPnPObserver* pnpObserver = CTestPnPObserver::NewL(this);
+	CleanupStack::PushL( pnpObserver );
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)pnpObserver);
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPSubscribeRequestParamSet);
+
+	iControlPoint.Subscribe( pnpBundle );
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CleanupStack::PopAndDestroy( pnpObserver );
+	_LIT(KInfoLogFile1, "SubscribeForStateChangeNotificationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+
+/*	Test for Cancelling Discovery Operation
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+*/
+void CTestPnPManager::CancelDiscoverL()
+	{
+	iCancelDiscovery = ETrue;
+	_LIT(KInfoLogFile, "CancelDiscoverL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CTestPnPObserver* pnpObserver = CTestPnPObserver::NewL(this);
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)pnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPCancelDiscoverParamSet);
+
+	iControlPoint.Cancel ( pnpBundle );
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	
+	_LIT(KInfoLogFile1, "CancelDiscoverL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestPnPManager::CancelDescribeL()
+	{
+	_LIT(KInfoLogFile, "CancelDescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CTestPnPObserver* pnpObserver = CTestPnPObserver::NewL(this);
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)pnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPCancelDescribeParamSet);
+
+	iControlPoint.Cancel ( pnpBundle );
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	_LIT(KInfoLogFile1, "CancelDescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+
+
+/*	Test for Cancelling Register Announcement
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void  CTestPnPManager::CancelNotifyAnnouncementL()
+	{
+	_LIT(KInfoLogFile, "CancelNotifyAnnouncementL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CTestPnPObserver* pnpObserver = CTestPnPObserver::NewL(this);
+		
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)pnpObserver);
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL ( ETestPnPCancelRegisterNotifyParamSet );
+	
+	iControlPoint.Cancel ( pnpBundle);
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	_LIT(KInfoLogFile1, "CancelNotifyAnnouncementL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+  Constructor:
+*/
+CTestPnPObserver::CTestPnPObserver()
+	:iSequence(0)
+	{
+	}
+
+/*
+  Destructor
+*/
+CTestPnPObserver::~CTestPnPObserver()
+	{
+	}
+
+
+/*
+	Static factory constructor. Uses two phase construction and leaves nothing on the
+	CleanupStack. Creates a CTestControlPointService object.
+	@param			aManager	A pointer to a CTestPnPManager object.
+	@return			A pointer to the newly created CPnPObserver object.
+	@post			A fully constructed and initialized CPnPObserver object.
+ */
+CTestPnPObserver* CTestPnPObserver::NewL(CTestPnPManager* aManager)
+	{
+	CTestPnPObserver* self = new(ELeave) CTestPnPObserver;
+	CleanupStack::PushL(self);
+	self->ConstructL(aManager);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+/*
+	Second phase of two-phase construction method. Does any allocations required to fully construct
+	the object.
+	@pre 		First phase of construction is complete.
+	@param		aManager	A pointer to a CTestPnPManager object.
+	@post		The object is fully constructed and initialized.
+ */
+void CTestPnPObserver::ConstructL(CTestPnPManager* aManager)
+	{
+	iManager = aManager;
+	}
+
+
+
+/*
+   This method returns a reference to the CTestPnPManager object.
+   @param None
+   return a reference to the CTestPnPManager object
+ */
+CTestPnPManager& CTestPnPObserver::Manager()
+	{
+	return *iManager;
+	}
+
+/*
+   This is called when callback hits. And this method stores the bundle results
+   and meta information related to that results into results array maintained by manager
+   for later verification.
+   @param  aParameterBundle a reference to CPnPParameterBundleBase
+   @return None
+ */
+void CTestPnPObserver::OnPnPEventL ( RPnPParameterBundleBase& aParameterBundle)
+	{
+	_LIT(KInfoLogFile, "OnPnPEventL ().... \n");
+	Manager().INFO_PRINTF1(KInfoLogFile);
+
+	RParameterFamily paramFamily = aParameterBundle.GetFamilyAtIndex(0);
+	
+	if( paramFamily.IsNull ())
+		{
+		switch ( paramFamily.Id() )
+			{
+			case ETestPnPDiscoverResponseParamSet:
+				{				
+				_LIT(KInfoLogFile, "Discovery Response\n \n");
+	            Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+			
+			case ETestPnPPresenceAnnouncementParamSet:
+				{
+				_LIT(KInfoLogFile, "Presence Announcement Response\n");
+	            Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+
+			case ETestPnPAbsenceAnnouncementParamSet:
+				{				
+				_LIT(KInfoLogFile, "Absence Announcement Response\n");
+	            Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+
+			case ETestPnPPublishResponseParamSet:
+				{
+                _LIT(KInfoLogFile, "Publish Response\n");
+	            Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+			
+			case ETestPnPDescribeResponseParamSet:
+				{							
+				_LIT(KInfoLogFile, "Describe Response\n");
+	            Manager().INFO_PRINTF1(KInfoLogFile);
+			    }
+			break;
+			
+			case ETestPnPSubscribeResponseParamSet:
+				{				
+                _LIT(KInfoLogFile, "Subscribe Response\n");
+	            Manager().INFO_PRINTF1(KInfoLogFile);
+             	}
+			break;
+			
+			case ETestPnPNotifyEventParamSet:
+				{//receives event notifications sent at client
+				_LIT(KInfoLogFile, "Notify Event Response\n");
+	            Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+			
+			default:
+			break;
+			}
+		}
+	}
+
+/*
+   Error handling,asynchronous one.
+   @param  aError Error Code
+   @return None
+ */
+void CTestPnPObserver::OnPnPError(TInt aError)
+	{
+	_LIT(KPositiveCase,"positivecase");
+	TBool positiveCase = ETrue;
+	Manager().GetBoolFromConfig(Manager().GetCurrentSection(), KPositiveCase, positiveCase);
+	// Note down the error and stop scheduler
+	_LIT(KErrorMessage, "Error occurred in the Test PnP Observer : %d \n");
+	Manager().ERR_PRINTF2(KErrorMessage, aError);
+	}
+
+
+void CTestPnPManager::DescribeServiceL()
+	{
+	_LIT(KInfoLogFile, "CTestPnPManager::DescribeServiceL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+
+	CTestPnPObserver* pnpObserver = CTestPnPObserver::NewL(this);
+	CleanupStack::PushL( pnpObserver );	
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)pnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPDescribeRequestParamSet);	
+
+	iControlPoint.Describe( pnpBundle );
+	_LIT(KInfoLogFile1, "CTestPnPManager::DescribeServiceL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CleanupStack::PopAndDestroy( pnpObserver );
+	}
+
+
+/*Fails to open a handle to a RPnPServiceDiscovery object
+  @param			None.
+  @return			None.
+ */
+void CTestPnPManager::OpenDiscovererFailed()
+	{
+	_LIT(KInfoLogFile, "OpenDiscovererFailed().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt openStatus = 0;
+	openStatus = iControlPoint.Open(KInvalidTestTierId);
+	
+	if(openStatus != KErrNone) 
+		{
+		_LIT(KOpenDiscovererFailed, "Control Point discovery open failed with error %d ");
+		ERR_PRINTF2(KOpenDiscovererFailed, openStatus);
+		SetTestStepError(openStatus);
+		}
+	else
+		{
+		_LIT(KOpenDiscovererSuccess, "Control Point Discovery was successfully started with return value %d :");
+		INFO_PRINTF2(KOpenDiscovererSuccess, openStatus);
+		}
+	}
+	
+	
+/*Fails to open a handle to a RPnPServicePublisher object
+  @param			None.
+  @return			None.
+ */
+void CTestPnPManager::OpenPublisherFailed()
+	{
+	_LIT(KInfoLogFile, "OpenPublisherFailed().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt openStatus = 0;	
+	openStatus = iServicePoint.Open(KInvalidTestTierId);
+		
+	if( openStatus != KErrNone )
+  		{
+ 		_LIT(KOpenPublisherFailed, "Publisher open failed with error %d ");
+ 		ERR_PRINTF2(KOpenPublisherFailed, openStatus);
+ 		SetTestStepError(openStatus);
+ 		}
+ 	else
+ 		{
+ 		_LIT(KOpenPublisherSuccess, "Service publisher was successfully started with return value %d :");
+  		INFO_PRINTF2(KOpenPublisherSuccess, openStatus);
+ 		}
+	}
+	
+void CTestPnPManager::TimedOut()
+	{
+	iControlChannel.CancelRecv();
+	iControlChannel.CancelSend();
+	CActiveScheduler::Stop();	
+	}
+	
+// CTestTimer //
+CTestTimer* CTestTimer::NewL(MTimerObserver& aObserver)
+	{
+	return new(ELeave) CTestTimer(aObserver);	
+	}
+
+CTestTimer::~CTestTimer()
+	{
+	Cancel();
+	iTimer.Close();
+	}
+
+CTestTimer::CTestTimer(MTimerObserver& aObserver)
+:CActive(EPriorityStandard), iObserver(aObserver)
+	{
+	CActiveScheduler::Add(this);
+	iTimer.CreateLocal();
+	}
+
+void CTestTimer::RunL()
+	{
+	iObserver.TimedOut();
+	}
+
+void CTestTimer::DoCancel()
+	{
+	iTimer.Cancel();	
+	}
+	
+void CTestTimer::After(TTimeIntervalMicroSeconds32 aInterval)
+	{
+	iTimer.After(iStatus,  aInterval);
+	SetActive();
+	}
+	
+	
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+// 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:
+//
+
+PRJ_TESTEXPORTS
+../inc/testpnpconstants.h		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/testpnpconstants.h)
+../inc/testpnpparamset.h		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/testpnpparamset.h)
+../inc/testpnpparamset.inl		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(pnp/testpnpparamset.inl)
+
+PRJ_TESTMMPFILES
+testplugin.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/group/testplugin.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,50 @@
+// 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:
+// UPnP specific dll that provides support for applications to create parameter bundles of
+// desired type for carrying out various operations like discovery,describe etc.
+// 
+//
+
+
+TARGET testplugin.dll
+TARGETTYPE PLUGIN
+CAPABILITY ALL -TCB
+
+UID 0x10009D8D 0x2025D05D
+VENDORID 0x70000001
+
+SOURCEPATH ../src
+SOURCE  ecom_testimpl.cpp
+SOURCE  testpnpparamsextfactory.cpp
+SOURCE 	ctestpnpservicediscovery.cpp
+SOURCE 	ctestpnpservicepublisher.cpp
+SOURCE 	ctestcontrolchannel.cpp
+
+
+START RESOURCE 2025D05D.rss
+TARGET testplugin.rsc
+END
+
+USERINCLUDE ../inc
+
+SYSTEMINCLUDE /epoc32/include 
+SYSTEMINCLUDE /epoc32/include/pnp
+
+LIBRARY euser.lib 
+LIBRARY esock.lib 
+LIBRARY insock.lib
+LIBRARY rpnp.lib
+LIBRARY netmeta.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/inc/ctestcontrolchannel.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+// 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 __CTESTCONTROLCHANNEL_H__
+#define __CTESTCONTROLCHANNEL_H__
+
+#include <e32base.h>
+#include <pnp/rcontrolchannel.h>
+#include <pnp/ccontrolchannelbase.h>
+
+class CPnPRControlChannelAO;
+
+class MControlChannelAOObsever
+	{
+public:
+	virtual void TimeOut(CPnPRControlChannelAO& aControlChannelAO) = 0;	
+	};
+
+class CTestControlChannel : public CControlChannelBase,
+							public MControlChannelAOObsever
+{
+public:
+	static CTestControlChannel* NewL();
+	virtual ~CTestControlChannel();
+	void Recv ( TControlMessage& aMessage, TRequestStatus& aStatus );
+	void Send ( TControlMessage& aMessage, TRequestStatus& aStatus );
+	void CancelRecv ();
+	void CancelSend ();
+	
+	void TimeOut(CPnPRControlChannelAO& aControlChannelAO);
+		
+private:
+	CTestControlChannel();
+	void ConstructL();	
+	
+private:	
+    CPnPRControlChannelAO *rControlAO;
+};
+
+
+
+class CPnPRControlChannelAO:public CActive
+    {
+public:
+     static CPnPRControlChannelAO* NewL(MControlChannelAOObsever& aObserver);   
+     virtual ~ CPnPRControlChannelAO();      
+  	 void Recvdata();
+	 void Senddata();
+	 void RunL();
+	 void DoCancel();   
+	 void After(TTimeIntervalMicroSeconds32 anInterval);
+	 
+private:
+    void ConstructL();	
+    CPnPRControlChannelAO(MControlChannelAOObsever& aObserver);	
+   
+private:	
+     RTimer			iTimer;       
+	 MControlChannelAOObsever& iObserver;
+    };
+
+#endif  //__CTESTCONTROLCHANNEL_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/inc/ctestpnpservicediscoveryimpl.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,56 @@
+// 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 __CTESTPNPPSERVICEDISCOVERYIMPL_H__
+#define __CTESTPNPPSERVICEDISCOVERYIMPL_H__
+
+
+#include <pnp/cpnpservicediscoverybase.h>
+#include <pnp/mpnpobserver.h>
+
+//User includes
+#include "testpnpconstants.h"
+#include "testpnpparamset.h"
+
+
+/* Body of RPnPServiceDiscovery class and calls the SubmitRequest and NotifyResults
+   of respective classes
+ */
+class CTestPnPServiceDiscoveryImpl : public CPnPServiceDiscoveryBase
+	{
+public:
+	static CTestPnPServiceDiscoveryImpl* NewL();
+	~CTestPnPServiceDiscoveryImpl ();
+		
+private:
+	// From CPnPServiceDiscoveryBase
+	TInt Construct( TUint aTierId);
+	void Discover ( const RPnPParameterBundle& aServiceInfo );
+	void Describe ( const RPnPParameterBundle& aServiceInfo );
+	void Subscribe ( const RPnPParameterBundle& aServiceInfo );
+	void RegisterNotify ( const RPnPParameterBundle& aServiceInfo );
+	void Cancel ( const RPnPParameterBundle& aServiceInfo );
+	CControlChannelBase* InitiateControlL ( const TDesC8& aUri );
+
+private:
+	CTestPnPServiceDiscoveryImpl();
+	void DiscoverL ( const RPnPParameterBundle& aServiceInfo );
+	void RegisterNotifyL ( const RPnPParameterBundle& aServiceInfo );
+	void SubscribeL ( const RPnPParameterBundle& aServiceInfo );
+	void DescribeL ( const RPnPParameterBundle& aServiceInfo );		
+	
+	};
+
+#endif // __CTESTPNPPSERVICEDISCOVERYIMPL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/inc/ctestpnpservicepublisherimpl.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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 __CTESTPNPPSERVICEPUBLISHERIMPL_H__
+#define __CTESTPNPPSERVICEPUBLISHERIMPL_H__
+
+
+#include <pnp/cpnpservicepublisherbase.h>
+#include <pnp/mpnpobserver.h>
+
+//User includes
+#include "testpnpconstants.h"
+#include "testpnpparamset.h"
+
+
+/* Body of RPnPServicePublisher class and calls the SubmitRequest and NotifyResults
+   of respective classes
+ */
+class CTestPnPServicePublisherImpl :public CPnPServicePublisherBase 
+	{
+public:
+	static CTestPnPServicePublisherImpl* NewL();
+	~CTestPnPServicePublisherImpl ( );
+		
+private:
+	TInt Construct ( TUint aTierId );
+	void Publish ( const RPnPParameterBundle& aServiceInfo );
+	void SendNotify ( const RPnPParameterBundle& aServiceInfo );
+	CControlChannelBase* InitiateControlL ();
+
+
+private:
+	CTestPnPServicePublisherImpl ( );
+	void PublishL ( const RPnPParameterBundle& aServiceInfo );
+	void SendNotifyL ( const RPnPParameterBundle& aServiceInfo );
+
+	};
+
+#endif // __CTESTPNPPSERVICEPUBLISHERIMPL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/inc/testpnpconstants.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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 __TESTPNPCONSTANTS_H_
+#define __TESTPNPCONSTANTS_H_
+
+/**
+This is the tier id value which must be specified whenever the user wants to open a TestPnP Service Point or Control Point. 
+This is the parameter which must be specified in the RPnPServicePublisher::Open or RPnPServiceDiscovery::Open APIs
+*/
+
+const TUint KTestPnPInterface  = 0x2025D054;
+
+
+//implementation uid for discovery 
+const TUint KTestPnPDiscoveryUid = 0x2025DC69;
+
+//implementation uid for publisher
+const TUint KTestPnPPublisherUid = 0x2025DC6A;
+
+//implementation uid for params factory
+const TInt KTestPnPParamsFactoryUid = 0x2001D05E;
+
+
+//TestPnP panic codes
+enum TTestPnPPanic
+	{
+	KTestPnPErrNotOpen = 1 , //Set the starting error code.
+	KTestPnPErrNoObserver,
+	KTestPnPErrInvalidFamilyCount,
+	KTestPnPErrInvalidFamily,
+	KTestPnPErrNoParamSet,
+	KTestPnPErrDiscoveryInProgress,
+	KTestPnPErrPublish,
+	KTestPnPErrResponseUriNotFound,
+	};
+
+
+#endif //__TESTPNPCONSTANTS_H_
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/inc/testpnpparamset.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,392 @@
+// 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 __TESTPNPPARAMSET_H__
+#define __TESTPNPPARAMSET_H__
+
+#include <es_sock.h>
+#include <in_sock.h>
+#include <elements/metadata.h>
+#include <comms-infras/es_parameterfamily.h>
+#include <comms-infras/es_parameterbundle.h>
+
+#include "testpnpconstants.h"
+
+/**
+TestPnP ParameterSet Family Identifiers.
+*/
+enum TTestPnPParamSetFamily
+	{
+	// Used by Control Point
+	ETestPnPRegisterAnnouncementParamSet 	= 1,
+	ETestPnPAbsenceAnnouncementParamSet 	= 2,
+	ETestPnPPresenceAnnouncementParamSet	= 3,
+	ETestPnPDiscoverRequestParamSet		= 4,
+	ETestPnPDiscoverResponseParamSet		= 5,
+	//Do not use the 6 as it is used by family which carries implementation UID of SCPR.
+	ETestPnPDescribeRequestParamSet		= 7,
+	ETestPnPDescribeResponseParamSet		= 8,
+	ETestPnPSubscribeRequestParamSet		= 9,
+	ETestPnPSubscribeResponseParamSet		= 10,
+	ETestPnPNotifyEventParamSet			= 11,
+	ETestPnPCancelDiscoverParamSet			= 12,
+	ETestPnPCancelDescribeParamSet			= 13,
+	ETestPnPCancelSubscribeParamSet		= 14,
+	ETestPnPCancelRegisterNotifyParamSet	= 15,
+	ETestPnPRequestParamSet				= 16,
+	ETestPnPResponseParamSet				= 17,
+
+	// Used by Service Point
+	ETestPnPServiceRegisterParamSet		= 18,
+	ETestPnPServiceNotificationParamSet	= 19,
+	ETestPnPPublishResponseParamSet		= 20,
+	};
+
+/**
+class TTestPnPEvent
+TestPnPEvent class defines the reason code for an event callback.
+*/
+NONSHARABLE_CLASS(TTestPnPEvent)
+	{
+public:
+	/** Type of TestPnP Event. */
+	enum TEventType
+	{
+		/** This signifies that the operation completed successfully. */
+		ESuccess,
+		/** This is a 'catch-all' for communicating failures. The actual error reason is
+			shown in error code. */
+		EFail,
+	};
+
+public:
+	/** The event status. */
+	TInt iStatus;
+	/** The error code value. */
+	TInt iErrorCode;
+	};
+
+
+
+
+/**
+The base class for all TestPnP ParamSet classes.
+*/
+NONSHARABLE_CLASS (CTestPnPParamSetBase) : public CSubConExtensionParameterSet
+	{
+	public:		
+		inline static CTestPnPParamSetBase* NewL ( RParameterFamily& aFamily, TTestPnPParamSetFamily aFamilyType );
+	protected:
+		inline CTestPnPParamSetBase ();
+	};
+
+
+// -------------------------------------------------------------------
+
+/**
+Parameter set class containing a Uri. All TestPnP Request ParamSet classes derive from this class.
+*/
+NONSHARABLE_CLASS ( CTestPnPRequestParamSetBase ) : public CTestPnPParamSetBase
+	{
+	protected:
+		RBuf8 iUri;
+	public:
+		inline void SetUriL ( const TDesC8& aUri );
+		inline const TDesC8& Uri () const;
+	protected:
+		inline CTestPnPRequestParamSetBase ();
+		inline ~CTestPnPRequestParamSetBase ();
+	protected:
+		DATA_VTABLE
+	};
+
+// ----------------------------------------------------------------------
+
+/**
+Parameter set class containing a TestPnP Event. All TestPnP Response ParamSet classes derive from this class.
+*/
+NONSHARABLE_CLASS ( CTestPnPResponseParamSetBase ) : public CTestPnPRequestParamSetBase
+	{
+	protected:
+		TTestPnPEvent iTestPnPEvent;
+	public:
+		inline void SetTestPnPEvent ( const TTestPnPEvent& aEvent );
+		inline const TTestPnPEvent& TestPnPEvent () const;
+	protected:
+		inline CTestPnPResponseParamSetBase ();
+	protected:
+		DATA_VTABLE
+	};
+
+// -------------------------------------------------------------------------
+
+/** TestPnP Control Point ParameterSet classes. */
+
+/**
+Parameter set class for discovering services/devices.
+Calling client should set the ServiceType/DeviceType and maximum wait time.
+*/
+NONSHARABLE_CLASS(CTestPnPDiscoverRequestParamSet) : public CTestPnPRequestParamSetBase
+	{
+	private:
+		TInt iTimeToDelayResponse;
+	public :
+		inline static CTestPnPDiscoverRequestParamSet* NewL( RParameterFamily& aFamily );
+		inline void SetResponseTime(TInt aResponseTime);
+		inline TInt ResponseTime( ) const ;
+	protected:
+		DATA_VTABLE
+	};
+
+// ---------------------------------------------------------------------------
+
+/**
+Parameter set class for subscribing to remote service. Client should set the ServiceLocation and Duration
+of subscription.
+*/
+NONSHARABLE_CLASS(CTestPnPSubscribeRequestParamSet) : public CTestPnPRequestParamSetBase
+	{
+protected:
+
+public:
+	inline static CTestPnPSubscribeRequestParamSet* NewL( RParameterFamily& aFamily );
+
+protected:
+		DATA_VTABLE
+	};
+
+// ----------------------------------------------------------------------------
+
+/**
+Parameter set class for registering SSDP:Alive request of a service/device. Caller should send the
+ServiceType/DeviceType to register for announcements.
+*/
+NONSHARABLE_CLASS(CTestPnPRegisterAnnouncementParamSet) : public CTestPnPRequestParamSetBase
+	{
+	public:
+		TBool iRegister;
+		inline static CTestPnPRegisterAnnouncementParamSet* NewL ( RParameterFamily& aFamily );
+		inline void SetRegisterVariable(TBool aValue);
+		inline TBool RegisterVariable();
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+
+/**
+Parameter set class for describe request. Caller should set the ServiceType/DeviceType to be described.
+*/
+NONSHARABLE_CLASS(CTestPnPDescribeRequestParamSet) : public CTestPnPRequestParamSetBase
+	{
+
+	public:
+		inline static CTestPnPDescribeRequestParamSet* NewL ( RParameterFamily& aFamily );
+
+
+	protected:
+		DATA_VTABLE
+	};
+// -----------------------------------------------------------------------------
+/**
+Parameter set class for cancel discover request.
+
+*/
+
+NONSHARABLE_CLASS(CTestPnPCancelDiscoverParamSet) : public CTestPnPRequestParamSetBase
+	{
+	public:		
+		inline static CTestPnPCancelDiscoverParamSet* NewL( RParameterFamily& aFamily );
+
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+/**
+Parameter set class for cancel describe request.
+*/
+
+NONSHARABLE_CLASS(CTestPnPCancelDescribeParamSet) : public CTestPnPRequestParamSetBase
+	{
+	public:
+		inline static CTestPnPCancelDescribeParamSet* NewL( RParameterFamily& aFamily );
+
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+/**
+Parameter set class for cancel subscribe request.
+*/
+
+NONSHARABLE_CLASS(CTestPnPCancelSubscribeParamSet) : public CTestPnPRequestParamSetBase
+	{
+	public:
+		inline static CTestPnPCancelSubscribeParamSet* NewL( RParameterFamily& aFamily );
+
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+/**
+Parameter set class for cancel register notify request.
+*/
+NONSHARABLE_CLASS(CTestPnPCancelRegisterNotifyParamSet) : public CTestPnPRequestParamSetBase
+	{
+	public:
+		inline static CTestPnPCancelRegisterNotifyParamSet* NewL( RParameterFamily& aFamily );
+
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving the responses of discovery requests. Client can extract remote device
+information such as Device Location, Unique Service Name (USN) and Max age of the advertisement in
+callback function.
+
+*/
+NONSHARABLE_CLASS(CTestPnPDiscoverResponseParamSet) : public CTestPnPResponseParamSetBase
+	{
+public :
+	// Internal APIs
+	inline static CTestPnPDiscoverResponseParamSet* NewL( RParameterFamily& aFamily );
+
+	// D'tor
+	inline ~CTestPnPDiscoverResponseParamSet ();
+protected:
+		DATA_VTABLE
+	};
+
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving responses of describe requests. Client can extract the device description
+in callback function.
+
+*/
+NONSHARABLE_CLASS(CTestPnPDescribeResponseParamSet) : public CTestPnPResponseParamSetBase
+	{
+public:
+	inline static CTestPnPDescribeResponseParamSet* NewL( RParameterFamily& aFamily );
+	inline ~CTestPnPDescribeResponseParamSet ();
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving response of subscription request. Calling client can extract the
+subscription status in callback function.
+
+*/
+NONSHARABLE_CLASS(CTestPnPSubscribeResponseParamSet) : public CTestPnPResponseParamSetBase
+	{
+public:
+	inline static CTestPnPSubscribeResponseParamSet* NewL( RParameterFamily& aFamily );
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving the event notification. Calling client can extract the
+notification information in callback function. If notification order is not matched an error code
+is returned to the client.
+
+*/
+NONSHARABLE_CLASS(CTestPnPNotifyEventParamSet) : public CTestPnPResponseParamSetBase
+	{
+public:
+	inline static CTestPnPNotifyEventParamSet* NewL( RParameterFamily& aFamily );
+	inline ~CTestPnPNotifyEventParamSet ();
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving the SSDP:ByeBye message. Calling client can extract the
+published information in callback function.
+
+*/
+NONSHARABLE_CLASS(CTestPnPAbsenceAnnouncementParamSet) : public CTestPnPResponseParamSetBase
+	{
+public:
+	inline static CTestPnPAbsenceAnnouncementParamSet* NewL( RParameterFamily& aFamily );
+
+	// D'tor
+	inline ~CTestPnPAbsenceAnnouncementParamSet ();
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving SSDP:Alive message. Calling client can extract the
+published information in callback function.
+
+*/
+NONSHARABLE_CLASS(CTestPnPPresenceAnnouncementParamSet) : public CTestPnPAbsenceAnnouncementParamSet
+	{
+public:
+	inline static CTestPnPPresenceAnnouncementParamSet* NewL( RParameterFamily& aFamily );
+
+	// D'tor
+	inline ~CTestPnPPresenceAnnouncementParamSet ();
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/** TestPnP Service Point ParameterSet classes. */
+
+/**
+Parameter set class for registering the service and publishing the service information. Service Client
+should set the following fields :
+*/
+NONSHARABLE_CLASS( CTestPnPServiceRegisterParamSet ) : public CTestPnPRequestParamSetBase
+	{
+	public:
+		inline ~CTestPnPServiceRegisterParamSet ();
+		inline static CTestPnPServiceRegisterParamSet* NewL(RParameterFamily& aFamily);
+
+	protected:
+		DATA_VTABLE
+	};
+
+
+/** Parameter set class for receiving success or failure for service or device
+  registration
+
+*/
+NONSHARABLE_CLASS(CTestPnPPublishResponseParamSet) : public CTestPnPResponseParamSetBase
+	{
+public:
+	inline static CTestPnPPublishResponseParamSet* NewL( RParameterFamily& aFamily);
+protected:
+	DATA_VTABLE
+
+	};
+
+
+#include "testpnpparamset.inl"
+
+#endif // __TESTPNPPARAMSET_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/inc/testpnpparamset.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,199 @@
+// 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:
+//
+
+CTestPnPParamSetBase* CTestPnPParamSetBase::NewL ( RParameterFamily& aFamily, TTestPnPParamSetFamily aFamilyType )
+	{
+	STypeId typeId = STypeId::CreateSTypeId(KTestPnPParamsFactoryUid,aFamilyType);
+	CTestPnPParamSetBase* self = static_cast < CTestPnPParamSetBase* > ( CSubConParameterSet::NewL( typeId ) );
+	TBool containerValue = aFamily.IsNull();
+	if(!containerValue)
+		{
+		CleanupStack::PushL ( self );
+		aFamily.AddParameterSetL ( self, RParameterFamily::ERequested );			
+		CleanupStack::Pop ( self );
+		}
+	return self;	
+	}
+	
+CTestPnPParamSetBase::CTestPnPParamSetBase ()
+	{
+	}
+
+// ------------------------------------------
+CTestPnPRequestParamSetBase::CTestPnPRequestParamSetBase ()
+	{
+	}
+
+CTestPnPRequestParamSetBase::~CTestPnPRequestParamSetBase ()
+	{
+	}
+
+// -------------------------------------------------------------------------
+CTestPnPResponseParamSetBase::CTestPnPResponseParamSetBase ()
+	{
+	}
+
+void CTestPnPResponseParamSetBase::SetTestPnPEvent ( const TTestPnPEvent& aEvent )
+	{
+	iTestPnPEvent = aEvent;
+	}
+
+const TTestPnPEvent& CTestPnPResponseParamSetBase::TestPnPEvent () const
+	{
+	return iTestPnPEvent;		
+	}
+
+
+// -------------------------------------------------------------------------
+CTestPnPDiscoverRequestParamSet* CTestPnPDiscoverRequestParamSet::NewL ( RParameterFamily& aFamily )
+ 	{	 
+ 	return static_cast < CTestPnPDiscoverRequestParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPDiscoverRequestParamSet ) );
+ 	}
+
+
+CTestPnPSubscribeRequestParamSet* CTestPnPSubscribeRequestParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPSubscribeRequestParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPSubscribeRequestParamSet ) );
+	}
+
+
+// ----------------------------------------------------------------------------
+
+CTestPnPRegisterAnnouncementParamSet* CTestPnPRegisterAnnouncementParamSet::NewL ( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPRegisterAnnouncementParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPRegisterAnnouncementParamSet ) );
+	}
+
+void CTestPnPRegisterAnnouncementParamSet::SetRegisterVariable(TBool aValue)
+	{
+	iRegister=aValue;
+	}
+
+TBool CTestPnPRegisterAnnouncementParamSet::RegisterVariable()
+	{
+	return iRegister;
+	}
+// -----------------------------------------------------------------------------
+
+CTestPnPDescribeRequestParamSet* CTestPnPDescribeRequestParamSet::NewL ( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPDescribeRequestParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPDescribeRequestParamSet ) );
+	}
+
+
+
+// -----------------------------------------------------------------------------
+
+CTestPnPCancelDiscoverParamSet* CTestPnPCancelDiscoverParamSet::NewL ( RParameterFamily& aFamily)
+	{
+	return static_cast < CTestPnPCancelDiscoverParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPCancelDiscoverParamSet ) );
+	}
+// -----------------------------------------------------------------------------
+
+CTestPnPCancelDescribeParamSet* CTestPnPCancelDescribeParamSet::NewL ( RParameterFamily& aFamily)
+	{
+	return static_cast < CTestPnPCancelDescribeParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPCancelDescribeParamSet ) );
+	}
+
+// -----------------------------------------------------------------------------
+CTestPnPCancelSubscribeParamSet* CTestPnPCancelSubscribeParamSet::NewL ( RParameterFamily& aFamily)
+	{
+	return static_cast < CTestPnPCancelSubscribeParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPCancelSubscribeParamSet ) );
+	}
+
+// -----------------------------------------------------------------------------
+CTestPnPCancelRegisterNotifyParamSet* CTestPnPCancelRegisterNotifyParamSet::NewL ( RParameterFamily& aFamily)
+	{
+	return static_cast < CTestPnPCancelRegisterNotifyParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPCancelRegisterNotifyParamSet ) );
+	}
+// -----------------------------------------------------------------------------
+CTestPnPDiscoverResponseParamSet* CTestPnPDiscoverResponseParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPDiscoverResponseParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPDiscoverResponseParamSet ) );
+	}
+
+// D'tor
+CTestPnPDiscoverResponseParamSet::~CTestPnPDiscoverResponseParamSet ()
+	{
+	}
+
+
+CTestPnPDescribeResponseParamSet* CTestPnPDescribeResponseParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPDescribeResponseParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPDescribeResponseParamSet ) );
+	}
+	
+CTestPnPDescribeResponseParamSet::~CTestPnPDescribeResponseParamSet ()
+	{
+	}
+
+
+// -----------------------------------------------------------------------------
+CTestPnPSubscribeResponseParamSet* CTestPnPSubscribeResponseParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPSubscribeResponseParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPSubscribeResponseParamSet ) );
+	}
+
+
+CTestPnPNotifyEventParamSet* CTestPnPNotifyEventParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPNotifyEventParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPNotifyEventParamSet ) );
+	}
+
+
+CTestPnPNotifyEventParamSet::~CTestPnPNotifyEventParamSet ()
+	{
+	}
+
+
+// -------------------------------------------------------------------------------------
+CTestPnPAbsenceAnnouncementParamSet* CTestPnPAbsenceAnnouncementParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPAbsenceAnnouncementParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPAbsenceAnnouncementParamSet ) );
+	}
+
+
+CTestPnPAbsenceAnnouncementParamSet::~CTestPnPAbsenceAnnouncementParamSet ()
+	{
+	}
+	
+
+CTestPnPPresenceAnnouncementParamSet* CTestPnPPresenceAnnouncementParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPPresenceAnnouncementParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPPresenceAnnouncementParamSet ) );
+	}
+	
+		
+CTestPnPPresenceAnnouncementParamSet::~CTestPnPPresenceAnnouncementParamSet ()
+	{
+	}
+
+
+CTestPnPServiceRegisterParamSet::~CTestPnPServiceRegisterParamSet ()
+	{
+	}
+
+CTestPnPServiceRegisterParamSet* CTestPnPServiceRegisterParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CTestPnPServiceRegisterParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPServiceRegisterParamSet ) );
+	}
+
+
+// -------------------------------------------------------------------------------------
+
+CTestPnPPublishResponseParamSet* CTestPnPPublishResponseParamSet::NewL(RParameterFamily& aFamily)
+	{
+	return static_cast < CTestPnPPublishResponseParamSet* > ( CTestPnPParamSetBase::NewL( aFamily, ETestPnPPublishResponseParamSet ) );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/inc/testpnpparamsextfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,30 @@
+// 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 __TESTPNPPARAMSEXTFACTORY_H__
+#define __TESTPNPPARAMSEXTFACTORY_H__
+
+#include <e32base.h>
+
+class CTestPnPParamSetBase;
+
+class CTestPnPParamsExtFactory : public CBase
+{
+	public:
+	static CTestPnPParamSetBase* NewL ( TAny* aConstructionParams );
+};
+
+#endif // __TESTPNPPARAMSEXTFACTORY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/src/2025D05D.rss	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,62 @@
+// 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:
+// @file 2025D05D.RSS
+// Registry info for the UPnP Sub-Connection Extension Parameters Plugin
+// 
+//
+
+#include <ecom/registryinfo.rh>
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x2025D05D;
+interfaces =
+    {
+     INTERFACE_INFO
+        {
+        interface_uid = 0x10204303;
+        implementations =
+            {
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2025D05E;
+                version_no = 1;
+                display_name = "Test PnP Sub-Connection Extension Parameter Set Factory";
+                default_data = "text/wml";
+                }
+            };
+        },
+   INTERFACE_INFO
+        {
+        interface_uid = 0x2000D060;
+        implementations =
+            {
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2025DC69;
+                version_no = 1;
+                display_name = "Test PnP Discovery";
+                default_data = "539349076/Client";
+                },
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2025DC6A;
+                version_no = 1;
+                display_name = "Test PnP Publish";
+                default_data = "539349076/Server";
+                }
+            };
+        }
+   };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/src/ctestcontrolchannel.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,124 @@
+// 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 "ctestcontrolchannel.h"
+#include <e32debug.h>
+
+
+CTestControlChannel* CTestControlChannel::NewL()
+	{
+	CTestControlChannel* self = new (ELeave) CTestControlChannel ();
+	CleanupStack::PushL ( self );
+	self->ConstructL ( );
+	CleanupStack::Pop (); // self
+	return self;
+	}
+
+CTestControlChannel::~CTestControlChannel ()
+	{
+	
+	}
+
+void CTestControlChannel::Recv ( TControlMessage& /*aMessage*/, TRequestStatus& /*aStatus*/ )
+	{
+	rControlAO = CPnPRControlChannelAO::NewL(*this);
+	rControlAO->Recvdata();			
+	}
+
+void CTestControlChannel::Send ( TControlMessage& /*aMessage*/, TRequestStatus& /*aStatus*/ )
+	{
+	rControlAO = CPnPRControlChannelAO::NewL(*this);
+	rControlAO-> Senddata();
+	}
+
+
+void CTestControlChannel::CancelRecv ()
+	{
+	
+	}
+
+void CTestControlChannel::CancelSend ()
+	{
+	
+	}
+
+
+CTestControlChannel::CTestControlChannel ( )
+	{
+	 //Nothing	
+	}
+
+void CTestControlChannel::ConstructL ()
+	{	
+	 //Nothing
+	}
+
+void CTestControlChannel::TimeOut(CPnPRControlChannelAO& aControlChannelAO)
+	{
+	CPnPRControlChannelAO* controlChannelAO = &aControlChannelAO;
+	delete controlChannelAO;	
+	}
+
+CPnPRControlChannelAO* CPnPRControlChannelAO::NewL(MControlChannelAOObsever& aObserver)
+{
+    CPnPRControlChannelAO* self = new (ELeave) CPnPRControlChannelAO (aObserver);
+	CleanupStack::PushL ( self );
+	self->ConstructL ( );
+	CleanupStack::Pop (); 
+	return self;
+}
+
+CPnPRControlChannelAO::CPnPRControlChannelAO(MControlChannelAOObsever& aObserver)
+:CActive(EPriorityStandard), iObserver(aObserver)
+    {
+	CActiveScheduler::Add(this);	
+    }  
+
+void CPnPRControlChannelAO::ConstructL()
+	{
+	 iTimer.CreateLocal();	
+	}
+
+void CPnPRControlChannelAO::Recvdata()
+    {
+    After(500000);
+	}
+
+void CPnPRControlChannelAO::Senddata()
+    {
+    After(500000);	
+    }
+CPnPRControlChannelAO::~CPnPRControlChannelAO()
+    {
+     Cancel();
+     iTimer.Close();
+    }
+
+void CPnPRControlChannelAO::After(TTimeIntervalMicroSeconds32 anInterval)
+  {
+	iTimer.After(iStatus,anInterval);
+	SetActive();			
+  }	
+
+void CPnPRControlChannelAO::DoCancel()
+	{
+	 iTimer.Cancel();
+	}
+
+void CPnPRControlChannelAO::RunL()
+    {
+	iObserver.TimeOut(*this);	
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/src/ctestpnpservicediscovery.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,138 @@
+// 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:
+// CTestPnPServiceDiscoveryImpl.cpp
+// 
+//
+
+#include "ctestpnpservicediscoveryimpl.h"
+#include "ctestcontrolchannel.h"
+
+
+CTestPnPServiceDiscoveryImpl::CTestPnPServiceDiscoveryImpl ()
+	{
+	}
+	
+		
+CTestPnPServiceDiscoveryImpl* CTestPnPServiceDiscoveryImpl::NewL()
+	{
+	CTestPnPServiceDiscoveryImpl* self = new (ELeave) CTestPnPServiceDiscoveryImpl;
+	return self;
+	}
+	
+	
+CTestPnPServiceDiscoveryImpl::~CTestPnPServiceDiscoveryImpl ()
+	{
+
+	}
+
+
+TInt CTestPnPServiceDiscoveryImpl::Construct(TUint)
+	{	
+    return KErrNone;
+	}
+
+
+void CTestPnPServiceDiscoveryImpl::Discover ( const RPnPParameterBundle& aServiceInfo )
+	{
+	TRAPD( err, DiscoverL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+	
+
+void CTestPnPServiceDiscoveryImpl::DiscoverL ( const RPnPParameterBundle& aServiceInfo )
+	{
+    RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPDiscoverResponseParamSet);
+	aServiceInfo.PnPObserver()->OnPnPEventL( pnpBundle );
+	CleanupStack::PopAndDestroy(&pnpBundle);	
+	}
+
+
+void CTestPnPServiceDiscoveryImpl::Describe(  const RPnPParameterBundle& aServiceInfo )
+	{
+	TRAPD( err, DescribeL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+	
+// Sends the Describe request
+void CTestPnPServiceDiscoveryImpl::DescribeL ( const RPnPParameterBundle& aServiceInfo)
+	{
+    RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPDescribeResponseParamSet);
+	aServiceInfo.PnPObserver()->OnPnPEventL( pnpBundle );
+	CleanupStack::PopAndDestroy(&pnpBundle);
+	}
+	
+//Sends the Subscribe request
+void CTestPnPServiceDiscoveryImpl::Subscribe ( const RPnPParameterBundle& aServiceInfo )
+	{
+	TRAPD( err, SubscribeL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+
+void CTestPnPServiceDiscoveryImpl::SubscribeL ( const RPnPParameterBundle& aServiceInfo )
+	{		
+    RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPSubscribeResponseParamSet);
+	aServiceInfo.PnPObserver()->OnPnPEventL( pnpBundle );
+	CleanupStack::PopAndDestroy(&pnpBundle);
+	}
+
+void CTestPnPServiceDiscoveryImpl::RegisterNotify(  const RPnPParameterBundle& aServiceInfo )//done
+	{
+	TRAPD( err, RegisterNotifyL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+	
+	
+// Used to register for advertisements of specific service type or ssdp:all
+void CTestPnPServiceDiscoveryImpl::RegisterNotifyL ( const RPnPParameterBundle& aServiceInfo )//done
+	{
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPPresenceAnnouncementParamSet);
+	aServiceInfo.PnPObserver()->OnPnPEventL( pnpBundle );
+	CleanupStack::PopAndDestroy(&pnpBundle);
+	}
+
+
+/* Used to cancel previous requests of control point */
+void CTestPnPServiceDiscoveryImpl::Cancel ( const RPnPParameterBundle& aServiceInfo )//done
+	{
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPCancelDiscoverParamSet);
+	aServiceInfo.PnPObserver()->OnPnPEventL( pnpBundle );
+	CleanupStack::PopAndDestroy(&pnpBundle);
+	}
+
+
+CControlChannelBase* CTestPnPServiceDiscoveryImpl::InitiateControlL ( const TDesC8& /*aUri*/ )
+	{
+	CTestControlChannel* ctrlChannel = CTestControlChannel::NewL();
+    return  ctrlChannel;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/src/ctestpnpservicepublisher.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,86 @@
+// 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:
+// ctestpnpservicepublisherimpl.cpp
+// 
+//
+
+
+#include "ctestpnpservicepublisherimpl.h"
+#include "ctestcontrolchannel.h"
+
+
+
+CTestPnPServicePublisherImpl::CTestPnPServicePublisherImpl ()
+	{
+	}
+
+	
+CTestPnPServicePublisherImpl* CTestPnPServicePublisherImpl::NewL()
+	{
+	return new ( ELeave ) CTestPnPServicePublisherImpl;
+	}
+	
+CTestPnPServicePublisherImpl::~CTestPnPServicePublisherImpl ()
+	{
+	}
+
+
+TInt CTestPnPServicePublisherImpl::Construct(TUint)
+	{
+	return KErrNone;
+	}
+
+
+void CTestPnPServicePublisherImpl::Publish ( const RPnPParameterBundle& aServiceInfo )
+	{
+	TRAPD(err, PublishL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+
+void CTestPnPServicePublisherImpl::PublishL ( const RPnPParameterBundle& aServiceInfo )
+	{
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (ETestPnPPublishResponseParamSet);
+	aServiceInfo.PnPObserver()->OnPnPEventL( pnpBundle );
+	CleanupStack::PopAndDestroy(&pnpBundle);
+	}
+
+
+void CTestPnPServicePublisherImpl::SendNotify ( const RPnPParameterBundle& aServiceInfo )
+	{
+	TRAPD( err, SendNotifyL( aServiceInfo ));
+	if ( err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+	
+	
+void CTestPnPServicePublisherImpl::SendNotifyL ( const RPnPParameterBundle& /*aServiceInfo*/ )
+	{
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	CleanupStack::PopAndDestroy(&pnpBundle);
+	}
+	
+
+CControlChannelBase* CTestPnPServicePublisherImpl::InitiateControlL ()
+	{
+	CTestControlChannel* ctrlChannel = CTestControlChannel::NewL();
+    return  ctrlChannel;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/src/ecom_testimpl.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,34 @@
+// 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 <ecom/implementationproxy.h>
+#include "testpnpparamsextfactory.h"
+#include "testpnpparamset.h"
+#include "ctestpnpservicediscoveryimpl.h"
+#include "ctestpnpservicepublisherimpl.h"
+  
+const TImplementationProxy ImplementationTable[] =
+	{
+	IMPLEMENTATION_PROXY_ENTRY(KTestPnPParamsFactoryUid, CTestPnPParamsExtFactory::NewL),
+	IMPLEMENTATION_PROXY_ENTRY(KTestPnPDiscoveryUid, CTestPnPServiceDiscoveryImpl::NewL),
+	IMPLEMENTATION_PROXY_ENTRY(KTestPnPPublisherUid, CTestPnPServicePublisherImpl::NewL)
+	};
+
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+    {
+    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/testplugin/src/testpnpparamsextfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,150 @@
+// 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 <e32base.h>
+#include "testpnpparamsextfactory.h"
+#include "testpnpparamset.h"
+
+START_ATTRIBUTE_TABLE(CTestPnPRequestParamSetBase, KTestPnPParamsFactoryUid, ETestPnPRequestParamSet)	
+END_ATTRIBUTE_TABLE()
+
+START_ATTRIBUTE_TABLE(CTestPnPResponseParamSetBase, KTestPnPParamsFactoryUid, ETestPnPResponseParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPRegisterAnnouncementParamSet, KTestPnPParamsFactoryUid, ETestPnPRegisterAnnouncementParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPAbsenceAnnouncementParamSet, KTestPnPParamsFactoryUid, ETestPnPAbsenceAnnouncementParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPResponseParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPPresenceAnnouncementParamSet, KTestPnPParamsFactoryUid, ETestPnPPresenceAnnouncementParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPAbsenceAnnouncementParamSet, 0)
+
+
+START_ATTRIBUTE_TABLE(CTestPnPDiscoverRequestParamSet, KTestPnPParamsFactoryUid, ETestPnPDiscoverRequestParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPDiscoverResponseParamSet, KTestPnPParamsFactoryUid, ETestPnPDiscoverResponseParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPResponseParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPDescribeRequestParamSet, KTestPnPParamsFactoryUid, ETestPnPDescribeRequestParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPDescribeResponseParamSet, KTestPnPParamsFactoryUid, ETestPnPDescribeResponseParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPResponseParamSetBase, ETestPnPResponseParamSet)
+
+START_ATTRIBUTE_TABLE(CTestPnPSubscribeRequestParamSet, KTestPnPParamsFactoryUid, ETestPnPSubscribeRequestParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPSubscribeResponseParamSet, KTestPnPParamsFactoryUid, ETestPnPSubscribeResponseParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPResponseParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPNotifyEventParamSet, KTestPnPParamsFactoryUid, ETestPnPNotifyEventParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CTestPnPResponseParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPCancelDiscoverParamSet, KTestPnPParamsFactoryUid, ETestPnPCancelDiscoverParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPCancelDescribeParamSet, KTestPnPParamsFactoryUid, ETestPnPCancelDescribeParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPCancelSubscribeParamSet, KTestPnPParamsFactoryUid, ETestPnPCancelSubscribeParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPCancelRegisterNotifyParamSet, KTestPnPParamsFactoryUid, ETestPnPCancelRegisterNotifyParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CTestPnPServiceRegisterParamSet, KTestPnPParamsFactoryUid, ETestPnPServiceRegisterParamSet)
+END_ATTRIBUTE_TABLE_BASE(CTestPnPRequestParamSetBase, 0)
+
+
+START_ATTRIBUTE_TABLE(CTestPnPPublishResponseParamSet, KTestPnPParamsFactoryUid, ETestPnPPublishResponseParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CTestPnPResponseParamSetBase, 0)
+
+
+CTestPnPParamSetBase* CTestPnPParamsExtFactory::NewL ( TAny* aConstructionParams )
+	{
+	const TInt32 familyType = reinterpret_cast<TInt32>(aConstructionParams);
+	CTestPnPParamSetBase* myTestPnPParamBase = NULL;
+	switch ( familyType )
+		{
+		case ETestPnPRegisterAnnouncementParamSet:		
+			myTestPnPParamBase = new (ELeave) CTestPnPRegisterAnnouncementParamSet;
+		break;
+
+		case ETestPnPPresenceAnnouncementParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPPresenceAnnouncementParamSet;
+		break;
+
+		case ETestPnPDiscoverRequestParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPDiscoverRequestParamSet;
+		break;
+
+		case ETestPnPDiscoverResponseParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPDiscoverResponseParamSet;
+		break;
+
+		case ETestPnPDescribeRequestParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPDescribeRequestParamSet;
+		break;
+
+		case ETestPnPDescribeResponseParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPDescribeResponseParamSet;
+		break;
+				
+		case ETestPnPSubscribeRequestParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPSubscribeRequestParamSet;
+		break;
+
+		case ETestPnPSubscribeResponseParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPSubscribeResponseParamSet;
+		break;
+
+		case ETestPnPNotifyEventParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPNotifyEventParamSet;
+		break;
+
+
+		case ETestPnPCancelDiscoverParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPCancelDiscoverParamSet;
+		break;
+		
+		case ETestPnPCancelDescribeParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPCancelDescribeParamSet;
+		break;
+		
+		case ETestPnPCancelSubscribeParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPCancelSubscribeParamSet;
+		break;
+		
+		case ETestPnPCancelRegisterNotifyParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPCancelRegisterNotifyParamSet;
+		break;
+		
+		case ETestPnPServiceRegisterParamSet:
+			myTestPnPParamBase = new (ELeave) CTestPnPServiceRegisterParamSet;
+		break;
+				
+		case ETestPnPPublishResponseParamSet:
+			myTestPnPParamBase	= new (ELeave) CTestPnPPublishResponseParamSet;
+		break;
+
+		default:
+			ASSERT(0);
+		break;
+		}
+	return myTestPnPParamBase;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/bwins/pnpu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+EXPORTS
+	?Cancel@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 1 NONAME ; void RPnPServiceDiscovery::Cancel(class RPnPParameterBundle const &)
+	?MessageDes@TControlMessage@@QBEABVTDesC8@@XZ @ 2 NONAME ; class TDesC8 const & TControlMessage::MessageDes(void) const
+	?IsLast@TControlMessage@@QBEHXZ @ 3 NONAME ; int TControlMessage::IsLast(void) const
+	?SetMaxLength@TControlMessage@@QAEXH@Z @ 4 NONAME ; void TControlMessage::SetMaxLength(int)
+	??0RPnPServiceDiscovery@@QAE@XZ @ 5 NONAME ; RPnPServiceDiscovery::RPnPServiceDiscovery(void)
+	?SendNotify@RPnPServicePublisher@@QAEXABVRPnPParameterBundle@@@Z @ 6 NONAME ; void RPnPServicePublisher::SendNotify(class RPnPParameterBundle const &)
+	?Close@RControlChannel@@QAEXXZ @ 7 NONAME ; void RControlChannel::Close(void)
+	?Open@RControlChannel@@QAEHAAVRSocketServ@@AAVRSubConnection@@IHIABUTConnectionDetails@@@Z @ 8 NONAME ; int RControlChannel::Open(class RSocketServ &, class RSubConnection &, unsigned int, int, unsigned int, struct TConnectionDetails const &)
+	??1CPnPServiceDiscoveryBase@@UAE@XZ @ 9 NONAME ; CPnPServiceDiscoveryBase::~CPnPServiceDiscoveryBase(void)
+	?Subscribe@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 10 NONAME ; void RPnPServiceDiscovery::Subscribe(class RPnPParameterBundle const &)
+	?MessagePtr@TControlMessage@@QAEAAVTDes8@@XZ @ 11 NONAME ; class TDes8 & TControlMessage::MessagePtr(void)
+	?PnPObserver@RPnPParameterBundle@@QBEPAVMPnPObserver@@XZ @ 12 NONAME ; class MPnPObserver * RPnPParameterBundle::PnPObserver(void) const
+	?InitiateControl@RPnPServicePublisher@@QAEHAAVRControlChannel@@@Z @ 13 NONAME ; int RPnPServicePublisher::InitiateControl(class RControlChannel &)
+	??1TControlMessage@@QAE@XZ @ 14 NONAME ; TControlMessage::~TControlMessage(void)
+	?RegisterNotify@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 15 NONAME ; void RPnPServiceDiscovery::RegisterNotify(class RPnPParameterBundle const &)
+	?Send@RControlChannel@@QAEXAAVTControlMessage@@AAVTRequestStatus@@@Z @ 16 NONAME ; void RControlChannel::Send(class TControlMessage &, class TRequestStatus &)
+	?SetMessageDes@TControlMessage@@QAEXABVTDesC8@@@Z @ 17 NONAME ; void TControlMessage::SetMessageDes(class TDesC8 const &)
+	?Describe@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 18 NONAME ; void RPnPServiceDiscovery::Describe(class RPnPParameterBundle const &)
+	?Discover@RPnPServiceDiscovery@@QAEXABVRPnPParameterBundle@@@Z @ 19 NONAME ; void RPnPServiceDiscovery::Discover(class RPnPParameterBundle const &)
+	?SetLast@TControlMessage@@QAEXXZ @ 20 NONAME ; void TControlMessage::SetLast(void)
+	??1CPnPServicePublisherBase@@UAE@XZ @ 21 NONAME ; CPnPServicePublisherBase::~CPnPServicePublisherBase(void)
+	?Open@RPnPParameterBundleBase@@QAEHXZ @ 22 NONAME ; int RPnPParameterBundleBase::Open(void)
+	?Open@RPnPServiceDiscovery@@QAEHI@Z @ 23 NONAME ; int RPnPServiceDiscovery::Open(unsigned int)
+	??0CPnPServiceDiscoveryBase@@IAE@XZ @ 24 NONAME ; CPnPServiceDiscoveryBase::CPnPServiceDiscoveryBase(void)
+	?Close@RPnPParameterBundleBase@@QAEXXZ @ 25 NONAME ; void RPnPParameterBundleBase::Close(void)
+	?MaxLength@TControlMessage@@QBEHXZ @ 26 NONAME ; int TControlMessage::MaxLength(void) const
+	?ClearFlags@TControlMessage@@QAEXXZ @ 27 NONAME ; void TControlMessage::ClearFlags(void)
+	?Recv@RControlChannel@@QAEXAAVTControlMessage@@AAVTRequestStatus@@@Z @ 28 NONAME ; void RControlChannel::Recv(class TControlMessage &, class TRequestStatus &)
+	?Close@RPnPServicePublisher@@QAEXXZ @ 29 NONAME ; void RPnPServicePublisher::Close(void)
+	?Open@RPnPServicePublisher@@QAEHI@Z @ 30 NONAME ; int RPnPServicePublisher::Open(unsigned int)
+	?Publish@RPnPServicePublisher@@QAEXABVRPnPParameterBundle@@@Z @ 31 NONAME ; void RPnPServicePublisher::Publish(class RPnPParameterBundle const &)
+	?SetPnPObserver@RPnPParameterBundle@@QAEXPAVMPnPObserver@@@Z @ 32 NONAME ; void RPnPParameterBundle::SetPnPObserver(class MPnPObserver *)
+	?SetMessagePtr@TControlMessage@@QAEXAAVTDes8@@@Z @ 33 NONAME ; void TControlMessage::SetMessagePtr(class TDes8 &)
+	??0RControlChannel@@QAE@XZ @ 34 NONAME ; RControlChannel::RControlChannel(void)
+	?Close@RPnPServiceDiscovery@@QAEXXZ @ 35 NONAME ; void RPnPServiceDiscovery::Close(void)
+	??0CPnPServicePublisherBase@@IAE@XZ @ 36 NONAME ; CPnPServicePublisherBase::CPnPServicePublisherBase(void)
+	?InitiateControl@RPnPServiceDiscovery@@QAEHAAVRControlChannel@@ABVTDesC8@@@Z @ 37 NONAME ; int RPnPServiceDiscovery::InitiateControl(class RControlChannel &, class TDesC8 const &)
+	??0RPnPServicePublisher@@QAE@XZ @ 38 NONAME ; RPnPServicePublisher::RPnPServicePublisher(void)
+	??0TControlMessage@@QAE@XZ @ 39 NONAME ; TControlMessage::TControlMessage(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/eabi/pnpu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+EXPORTS
+	_ZN15RControlChannel4OpenER11RSocketServR14RSubConnectionjijRK18TConnectionDetails @ 1 NONAME
+	_ZN15RControlChannel4RecvER15TControlMessageR14TRequestStatus @ 2 NONAME
+	_ZN15RControlChannel4SendER15TControlMessageR14TRequestStatus @ 3 NONAME
+	_ZN15RControlChannel5CloseEv @ 4 NONAME
+	_ZN15RControlChannelC1Ev @ 5 NONAME
+	_ZN15RControlChannelC2Ev @ 6 NONAME
+	_ZN15TControlMessage10ClearFlagsEv @ 7 NONAME
+	_ZN15TControlMessage10MessagePtrEv @ 8 NONAME
+	_ZN15TControlMessage12SetMaxLengthEi @ 9 NONAME
+	_ZN15TControlMessage13SetMessageDesERK6TDesC8 @ 10 NONAME
+	_ZN15TControlMessage13SetMessagePtrER5TDes8 @ 11 NONAME
+	_ZN15TControlMessage7SetLastEv @ 12 NONAME
+	_ZN15TControlMessageC1Ev @ 13 NONAME
+	_ZN15TControlMessageC2Ev @ 14 NONAME
+	_ZN15TControlMessageD1Ev @ 15 NONAME
+	_ZN15TControlMessageD2Ev @ 16 NONAME
+	_ZN19RPnPParameterBundle14SetPnPObserverEP12MPnPObserver @ 17 NONAME
+	_ZN20RPnPServiceDiscovery14RegisterNotifyERK19RPnPParameterBundle @ 18 NONAME
+	_ZN20RPnPServiceDiscovery15InitiateControlER15RControlChannelRK6TDesC8 @ 19 NONAME
+	_ZN20RPnPServiceDiscovery4OpenEj @ 20 NONAME
+	_ZN20RPnPServiceDiscovery5CloseEv @ 21 NONAME
+	_ZN20RPnPServiceDiscovery6CancelERK19RPnPParameterBundle @ 22 NONAME
+	_ZN20RPnPServiceDiscovery8DescribeERK19RPnPParameterBundle @ 23 NONAME
+	_ZN20RPnPServiceDiscovery8DiscoverERK19RPnPParameterBundle @ 24 NONAME
+	_ZN20RPnPServiceDiscovery9SubscribeERK19RPnPParameterBundle @ 25 NONAME
+	_ZN20RPnPServiceDiscoveryC1Ev @ 26 NONAME
+	_ZN20RPnPServiceDiscoveryC2Ev @ 27 NONAME
+	_ZN20RPnPServicePublisher10SendNotifyERK19RPnPParameterBundle @ 28 NONAME
+	_ZN20RPnPServicePublisher15InitiateControlER15RControlChannel @ 29 NONAME
+	_ZN20RPnPServicePublisher4OpenEj @ 30 NONAME
+	_ZN20RPnPServicePublisher5CloseEv @ 31 NONAME
+	_ZN20RPnPServicePublisher7PublishERK19RPnPParameterBundle @ 32 NONAME
+	_ZN20RPnPServicePublisherC1Ev @ 33 NONAME
+	_ZN20RPnPServicePublisherC2Ev @ 34 NONAME
+	_ZN23RPnPParameterBundleBase4OpenEv @ 35 NONAME
+	_ZN23RPnPParameterBundleBase5CloseEv @ 36 NONAME
+	_ZN24CPnPServiceDiscoveryBaseC2Ev @ 37 NONAME
+	_ZN24CPnPServiceDiscoveryBaseD0Ev @ 38 NONAME
+	_ZN24CPnPServiceDiscoveryBaseD1Ev @ 39 NONAME
+	_ZN24CPnPServiceDiscoveryBaseD2Ev @ 40 NONAME
+	_ZN24CPnPServicePublisherBaseC2Ev @ 41 NONAME
+	_ZN24CPnPServicePublisherBaseD0Ev @ 42 NONAME
+	_ZN24CPnPServicePublisherBaseD1Ev @ 43 NONAME
+	_ZN24CPnPServicePublisherBaseD2Ev @ 44 NONAME
+	_ZNK15TControlMessage10MessageDesEv @ 45 NONAME
+	_ZNK15TControlMessage6IsLastEv @ 46 NONAME
+	_ZNK15TControlMessage9MaxLengthEv @ 47 NONAME
+	_ZNK19RPnPParameterBundle11PnPObserverEv @ 48 NONAME
+	_ZTI15CControlChannel @ 49 NONAME
+	_ZTI21CControlChannelReader @ 50 NONAME
+	_ZTI21CControlChannelWriter @ 51 NONAME
+	_ZTI22CControlChannelHandler @ 52 NONAME
+	_ZTI24CPnPServiceDiscoveryBase @ 53 NONAME
+	_ZTI24CPnPServicePublisherBase @ 54 NONAME
+	_ZTIN4Meta18RMetaDataContainerINS_13SMetaDataEComEEE @ 55 NONAME
+	_ZTV15CControlChannel @ 56 NONAME
+	_ZTV21CControlChannelReader @ 57 NONAME
+	_ZTV21CControlChannelWriter @ 58 NONAME
+	_ZTV22CControlChannelHandler @ 59 NONAME
+	_ZTV24CPnPServiceDiscoveryBase @ 60 NONAME
+	_ZTV24CPnPServicePublisherBase @ 61 NONAME
+	_ZTVN4Meta18RMetaDataContainerINS_13SMetaDataEComEEE @ 62 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+*
+*/
+
+
+
+PRJ_TESTEXPORTS
+../inc/mpnpobserver.h 			SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/mpnpobserver.h)
+../inc/pnpparameterbundle.h		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/pnpparameterbundle.h)	
+../inc/rpnpservicediscovery.h	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/rpnpservicediscovery.h)	
+../inc/rpnpservicepublisher.h	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/rpnpservicepublisher.h)	
+../inc/rcontrolchannel.h		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/rcontrolchannel.h)	
+../inc/upnpconstants.h			SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/upnpconstants.h)
+../inc/cpnpservicediscoverybase.h  SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cpnpservicediscoverybase.h)
+../inc/cpnpservicepublisherbase.h  SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cpnpservicepublisherbase.h)
+
+
+PRJ_TESTMMPFILES
+pnp.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/group/pnp.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+// 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:
+// Generic purpose DLL that provides support for applications to discover services/devices or 
+// to publish its services
+// 
+//
+
+
+TARGET pnp.dll
+TARGETTYPE dll
+CAPABILITY ALL -TCB
+
+UID  0x1000008D 0x2000D054
+VENDORID 0x70000001
+
+SOURCEPATH ../src
+SOURCE 	rpnpservicediscovery.cpp
+SOURCE 	rpnpservicepublisher.cpp
+SOURCE 	pnpparameterbundle.cpp 
+SOURCE	rcontrolchannel.cpp 
+SOURCE  ccontrolchannel.cpp cpnpservicediscoverybase.cpp cpnpservicepublisherbase.cpp
+
+USERINCLUDE ../inc
+
+SYSTEMINCLUDE /epoc32/include 
+SYSTEMINCLUDE /epoc32/include/upnp
+
+LIBRARY euser.lib 
+LIBRARY esock.lib 
+LIBRARY upnputils.lib
+LIBRARY netmeta.lib
+LIBRARY nodemessages.lib
+LIBRARY ecom.lib
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/ccontrolchannel.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,96 @@
+// 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 __CCONTROLCHANNEL_H_
+#define __CCONTROLCHANNEL_H_
+
+#include <e32base.h>
+#include <es_sock.h>
+#include "rcontrolchannel.h"
+
+class CControlChannelHandler : public CActive
+	{	
+	protected:
+		CControlChannelHandler ( RSocket& aSocket, TBool aChannelType );		
+		TInt RunError(TInt aError);
+	protected:
+		RSocket& 			iSocket;  // Not owned
+		TBool				iChannelType; // EFalse for Client usage
+										  // ETrue for server usage	
+		TControlMessage* 	iMessage; // Not owned.
+		TRequestStatus*		iChannelStatus;  // Not owned	
+		TInt 				iDataLength;	// Actual buffer size. this is used for internal purpose to find the
+										// end of the message. This variable will get incremented whenever we
+										// receive/send data from/to the socket and will be reset to 0 once the end of
+										// message is reached.		
+	};
+
+class CControlChannelReader : public CControlChannelHandler 
+	{
+	public:
+		static CControlChannelReader* NewL ( RSocket& aSocket, TBool aChannelType );
+		~CControlChannelReader ();
+		
+		void Read ( TControlMessage& aMessage, TRequestStatus& aStatus );		
+	private:
+		CControlChannelReader ( RSocket& aSocket, TBool aChannelType );		
+		
+		// From CActive
+		void RunL ();
+		void DoCancel ();
+			
+	private:
+		TSockXfrLength  iBytesReceived; // Socket recv buffer size.
+ 	};
+
+// ---------------------------------------------------------------
+
+class CControlChannelWriter : public CControlChannelHandler
+	{
+	public:
+		static CControlChannelWriter* NewL ( RSocket& aSocket, TBool aChannelType );
+		~CControlChannelWriter ();
+		
+		void Write ( TControlMessage& aMessage, TRequestStatus& aStatus );
+	private:
+	  	CControlChannelWriter ( RSocket& aSocket, TBool aChannelType );
+	  		  	
+	  	// From CActive
+		void RunL ();
+		void DoCancel ();
+
+	private:
+		RBuf8	iBuf; 		  
+	};
+
+// ---------------------------------------------------------------
+
+class CControlChannel : public CBase
+{
+public:
+	static CControlChannel* NewL ( RSocketServ& aSocketServ, RSubConnection& aSubConnection, TUint aAddrFamily, TBool aChannelType, TUint aProtocol, const TConnectionDetails& aConnInfo );
+	virtual ~CControlChannel ();
+	
+	void Recv ( TControlMessage& aMessage, TRequestStatus& aStatus );
+	void Send ( TControlMessage& aMessage, TRequestStatus& aStatus );
+private:
+	CControlChannel ( );
+	void ConstructL ( RSocketServ& aSocketServ, RSubConnection& aSubConnection, TUint aAddrFamily, TBool aChannelType, TUint aProtocol, const TConnectionDetails& aConnInfo );
+private:
+	RSocket 				iSocket;
+	CControlChannelReader* 	iReader;
+	CControlChannelWriter* 	iWriter;	
+};
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/cpnpservicediscoverybase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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 __CPNPSERVICEDISCOVERYBASE_H_
+#define __CPNPSERVICEDISCOVERYBASE_H_
+
+#include <pnpparameterbundle.h>
+#include <rcontrolchannel.h>
+
+class CPnPServiceDiscoveryBase : public CBase
+	{
+public:
+	static CPnPServiceDiscoveryBase* NewL( TUint aTierId );
+	IMPORT_C virtual ~CPnPServiceDiscoveryBase();
+	
+	virtual TInt Construct( TUint aTierId) = 0;
+	virtual void Discover ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	virtual void Describe ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	virtual void Subscribe ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	virtual void RegisterNotify ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	virtual void Cancel ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	virtual TInt InitiateControl ( RControlChannel& aControlChannel, const TDesC8& aUri ) = 0;
+	
+protected:
+	IMPORT_C CPnPServiceDiscoveryBase();
+
+private:
+	TUid iEcomDtorID;
+	};
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/cpnpservicepublisherbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+// 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 __CPNPSERVICEPUBLISHERBASE_H_
+#define __CPNPSERVICEPUBLISHERBASE_H_
+
+#include <rcontrolchannel.h>
+#include <pnpparameterbundle.h>
+
+class CPnPServicePublisherBase : public CBase
+	{
+public:
+	static CPnPServicePublisherBase* NewL( TUint aTierId );
+	IMPORT_C virtual ~CPnPServicePublisherBase();
+	
+	virtual TInt Construct( TUint aTierId) = 0;
+	virtual void Publish ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	virtual void SendNotify ( const RPnPParameterBundle& aServiceInfo ) = 0;
+	virtual TInt InitiateControl ( RControlChannel& aControlChannel ) = 0;
+
+
+protected:
+	IMPORT_C CPnPServicePublisherBase();
+		
+private:
+	TUid iEcomDtorID;
+		
+	};
+	
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/mpnpobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+// 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:
+// PnPObserver.h
+// 
+//
+
+#ifndef __MPNPOBSERVER_H__
+#define __MPNPOBSERVER_H__
+#include <e32def.h>
+#include <e32base.h>
+
+#include <pnpparameterbundle.h>
+/**
+Observer class which has a callback function to return the responses. Client must implement to handle the responses.
+@publishedPartner
+@prototype
+*/
+class MPnPObserver
+	{
+public:
+	/**
+	Callback method which returns the responses.It can be success or fail and is contained in the response parameter bundle
+	@param aServiceEventInfo Parameter bundle containg the response.
+	*/
+	virtual void OnPnPEventL ( RPnPParameterBundleBase& aServiceEventInfo) = 0;
+	/**
+	Callback method which handles the errors of submitting requests. In case this method is returned, the client should check
+	all the values passed in the corresponding bundle because it'll be called only in case of invalid bundle or low memory condition
+	Note that unlike OnPnPEventL ,this is not a callback method and returns synchronously in case of error.
+	@param aError error code.
+	*/
+	virtual void OnPnPError (TInt aError) = 0;
+	};
+
+#endif //__PNPOBSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/mupnpeventnotification.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+// 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 __MUPNPEVENTNOTIFICATION_H_
+#define __MUPNPEVENTNOTIFICATION_H_
+#include <e32def.h>
+
+class MUPnPEventNotification
+	{
+public:
+	virtual void OnNotificationL(TUint32)=0;
+	};
+	
+#endif /*MUPNPEVENTNOTIFICATION_H_*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/pnpparameterbundle.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,58 @@
+// 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 __PNPPARAMETERBUNDLE_H__
+#define __PNPPARAMETERBUNDLE_H__
+
+#include <es_sock.h>
+#include <upnpparamset.h>
+#include <comms-infras/es_parameterfamily.h>
+class MPnPObserver;
+
+
+/**
+Parameter bundle class contains a bundle of RParameterFamiles and a pointer to callback.
+Callback pointer should be set if calling client is expecting to recieve any response.
+@publishedPartner
+@prototype
+*/ 
+ class RPnPParameterBundleBase : public RParameterFamilyBundle
+	 {
+ public:
+	 
+	 IMPORT_C TInt Open();	 
+	 IMPORT_C void Close();
+	 };
+ /*
+ @publishedPartner
+@prototype
+ */ 
+
+class RPnPParameterBundle : public RPnPParameterBundleBase
+	{
+public:
+ 	
+ 	/* Set function for MPnPObserver callback */	
+ 	IMPORT_C void SetPnPObserver( MPnPObserver* aPnPObserver );
+ 	/* Get function for MPnPObserver callback */
+ 	IMPORT_C MPnPObserver * PnPObserver( ) const; 	
+ 	
+private :
+ 	
+ 	/* Pointer to callback */
+ 	MPnPObserver * iPnPObserver;
+ 
+ 	};
+#endif //__PNPPARAMETERBUNDLE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/rcontrolchannel.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,149 @@
+// 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 __RCONTROLCHANNEL_H_
+#define __RCONTROLCHANNEL_H_
+#include <e32base.h>
+#include <es_sock.h>
+#include <in_sock.h>
+
+const TInt KMaxLength = 100;
+const TInt KIntSize = 4;
+
+
+// Option names. Used for Get & Set options from the socket.
+/*
+Set the absolute URI
+*/
+const TUint KCHAbsoluteUri = 1;
+
+/*
+The maximum receive length that is expected. When it is called with GetOpt
+it can return KErrUnknown otherwise a valid length
+*/
+const TUint KCHMaxRecvLength = 2;
+
+/*
+The message is last or not
+*/
+const TUint KCHLastMessage = 3;
+
+
+/*
+Option level --- Always 0.
+*/
+const TUint KCHOptionLevel = 0; // Always 0.
+
+struct TCHMessageOption
+	{
+	TCHMessageOption ( TUint aId, TInt aValue )
+	: iId ( aId ),
+	iValue ( aValue )
+	{		
+	}
+	
+	TUint iId;
+	TInt  iValue; 	
+	};
+
+/* 
+ This class is used to wrap the TDes8 data that is used for transmission
+ in the sockets
+ @publishedPartner
+ @prototype
+*/
+class TControlMessage
+	{
+	friend class CControlChannelReader;
+	friend class CControlChannelWriter;
+public:
+	IMPORT_C TControlMessage ();
+	IMPORT_C ~TControlMessage ();
+	IMPORT_C void SetMessageDes ( const TDesC8& aData );
+	IMPORT_C void SetMessagePtr ( TDes8& aData );	
+	IMPORT_C const TDesC8& MessageDes () const;
+	IMPORT_C TDes8& MessagePtr ();	
+	IMPORT_C TBool IsLast() const;
+	IMPORT_C void SetLast();
+	IMPORT_C void SetMaxLength ( TInt aLen );
+	IMPORT_C TInt MaxLength () const;
+	IMPORT_C void ClearFlags ();
+	
+private:	
+	// Not for external use. Only for internal purpose
+	void SetId ( TUint aId );
+	TUint Id () const;
+	void SetDirty ();
+	TBool IsDirty () const;
+	
+private:
+	TPtr8 		iPtr;
+	TUint		iId;
+	TInt 		iMaxLength;
+	TUint	 	iFlags;
+	};
+
+
+/* The connection details. 
+
+@internalTechnology
+*/
+
+struct TConnectionDetails
+	{
+	TConnectionDetails ( TSockAddr* aAddr, const TDesC8& aUri )
+	: iAddr ( aAddr ),
+	iUri ( aUri )
+	{ }
+	
+	TConnectionDetails ( )
+	: iAddr ( NULL ),
+	iUri ( KNullDesC8 () )
+	{ }
+	
+	TSockAddr* 	iAddr;
+	TPtrC8 		iUri;
+	};
+
+class CControlChannel;
+
+/** This class acts as a wrapper over rsocket and is used to send and receive SOAP messages
+ @publishedPartner
+ @prototype
+ */
+class RControlChannel
+	{
+public:
+	IMPORT_C RControlChannel ( );
+	IMPORT_C void Recv ( TControlMessage& aMessage, TRequestStatus& aStatus );
+	IMPORT_C void Send ( TControlMessage& aMessage, TRequestStatus& aStatus );
+	IMPORT_C void Close ();	
+	
+	/** Open is used to open up the underlying socket of RControlChannel and get it ready for data transfer
+	@internalComponent
+	@prototype
+	*/
+	
+	IMPORT_C TInt Open (  RSocketServ& aSocketServ, RSubConnection& aSubConnection, TUint aAddrFamily, TBool aChannelType, TUint aProtocol, const TConnectionDetails& aConnInfo );
+	
+private:
+	CControlChannel* iControlChannelImpl;
+	};
+
+_LIT_SECURITY_POLICY_PASS ( KAllowAllPolicy );
+	
+
+#endif /*RCONTROLCHANNEL_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/rpnpservicediscovery.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,158 @@
+// 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 __RPNPPSERVICEDISCOVER_H__
+#define __RPNPPSERVICEDISCOVER_H__
+
+#include <e32base.h>
+#include <rcontrolchannel.h>
+#include "cpnpservicediscoverybase.h"
+
+class CUPnPServiceDiscoveryImpl;
+/**
+A generic class which provides the functionality to provision the applications who want to discover services
+and listen for service related notifications. The service discovery and related notification are technology specific.
+@publishedPartner
+@prototype
+*/
+class RPnPServiceDiscovery
+	{
+public:
+	/**
+	Constructor
+	*/
+	IMPORT_C RPnPServiceDiscovery( );
+
+	/**
+	Resolves the access point.
+	@param aTierID implementation UID. Identifies technology for which service discovery is requested.
+	@return KErrNone if successful. Returns system wide error codes on failure
+	*/
+	IMPORT_C TInt Open ( TUint aTierID );
+
+	/**
+	Issues a discovery request. The technology specific discovery information is packed
+	in aServiceInfo parameter. The caller should set a callback function of type MPnPCallBack in aServiceInfo
+	to retrieve discovery responses.
+	When the responses are received, MPnPObserver::OnPnPEventL is called for each response and calling clients
+	must provide the implementation to handle the responses.
+
+	The uris provided for registraion of advertisements must conform to the schemas specified in UPnPDeviceArchitecture 1.0
+
+	In case invalid input is provided in the form of corrupted uris for searching or low memory conditions,the application returns
+	synchronously with MPnPObserver::OnPnPError
+	@param aServiceInfo Parameter bundle contains the discovery information.
+	
+	@panic 1 The RPnPServiceDiscovery::Open() has not been called
+	@panic 2 Invalid observer object supplied. It may be null or corrupted
+	@panic 3 More than one family supplied in bundle
+	@panic 4 Invalid family
+	@panic 5 No parameter set used
+	*/
+	IMPORT_C void  Discover ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Retrieves the description of the remote service. The technology specific description information is packed
+	in aServiceInfo parameter. The caller should set a callback function of type MPnPObserver
+	in aServiceInfo to retrieve description responses.
+    When the responses are received MPnPObserver ::OnPnPEventL is called for each response and calling clients must provide
+	the implementation to handle the responses.
+
+	In case invalid input is provided in the form of corrupted uris for describe or low memory conditions,the application returns
+	synchronously with MPnPObserver::OnPnPError.However application is not able to filter out all invalid URLs
+	@param Parameter bundle contains the information about remote service(s) to be described.
+	
+	@panic 1 The RPnPServiceDiscovery::Open() has not been called
+	@panic 2 Invalid observer object supplied. It may be null or corrupted
+	@panic 3 More than one family supplied in bundle
+	@panic 4 Invalid family
+	@panic 5 No parameter set used
+	*/
+	IMPORT_C void Describe ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Subscribes for event notifications to the remote service or device .
+	The technology specific description information is packed in aServiceInfo parameter.
+	The caller should set a callback function of type MPnPObserver in aServiceInfo to retrieve description responses.
+    When the responses are received MPnPObserver ::OnPnPEventL is called for each response and calling clients must provide
+	the implementation to handle the responses.
+
+	In case invalid input is provided in the form of corrupted uris for subscribe or low memory conditions,the application returns
+	synchronously with MPnPObserver::OnPnPError.However application is not able to filter out all invalid URLs
+
+	@param Parameter bundle contains the information about remote service(s) to be described.
+		
+	@panic 1 The RPnPServiceDiscovery::Open() has not been called
+	@panic 2 Invalid observer object supplied. It may be null or corrupted
+	@panic 3 More than one family supplied in bundle
+	@panic 4 Invalid family
+	@panic 5 No parameter set used
+	*/
+
+	IMPORT_C void Subscribe ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Registers for events of remote service. The technology specific registration  information
+	is packed in aServiceInfo. The caller can set a callback function of type MPnPObserver in aServiceInfo
+	to retrieve response of registration.
+
+	The uris provided for registraion of advertisements must conform to the schemas specified in UPnPDeviceArchitecture 1.0
+	The scheme followed for register notify uris is the same as that followed for the NT parameter of service/device publish
+	of UPnP Device Architecture 1.0
+
+	In case invalid input is provided in the form of corrupted uris for registration or low memory conditions,the application returns
+	synchronously with MPnPObserver::OnPnPError.
+
+	@param Parameter bundle contains the register information to be sent to remote service.
+	
+	@panic 1 The RPnPServiceDiscovery::Open() has not been called
+	@panic 2 Invalid observer object supplied. It may be null or corrupted
+	@panic 3 More than one family supplied in bundle
+	@panic 4 Invalid family
+	@panic 5 No parameter set used
+	*/
+	IMPORT_C void  RegisterNotify ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Issues a cancel request to ongoing discoveries, describe , subscribe requests .This also cancels notify
+	of previously registered events from remote service. The technology specific discovery cancellation information
+	is packed in aServiceInfo.
+
+	@param Parameter bundle contains the cancel requests.
+	
+	@panic 1 The RPnPServiceDiscovery::Open() has not been called
+	@panic 3 More than one family supplied in bundle
+	@panic 5 No parameter set used
+	*/
+	IMPORT_C void  Cancel ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	 Starts the Connection and attaches the sub-connection to it.This also
+	 creates the socket and enables it to send and receive messages.
+	 @return KErrNone if successful. Returns system wide error codes on failure
+	 */
+	IMPORT_C TInt InitiateControl ( RControlChannel& aControlChannel, const TDesC8& aUri );
+
+	/**
+	Close technology specific session.
+	*/
+	IMPORT_C void Close ( );
+
+private:
+	CPnPServiceDiscoveryBase *iUPnPServiceDiscoveryImpl;
+	
+	};
+
+#endif //__RPNPPSERVICEDISCOVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/rpnpservicepublisher.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,98 @@
+// 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 __RPNPPSERVICEPUBLISHER_H__
+#define __RPNPPSERVICEPUBLISHER_H__
+#include <cpnpservicepublisherbase.h>
+
+/**
+A generic class which provides the functionality, to be implemented by a service point to service the remote clients.
+@publishedPartner
+@prototype
+*/
+class RPnPServicePublisher
+{
+	public:
+	/**
+	Default constructor
+	*/
+	IMPORT_C RPnPServicePublisher ( );
+
+	/**
+	Resolves the access point.
+	@param aTierID implementation UID. Identifies technology for which service discovery is requested.
+	@return KErrNone if successful. Returns system wide error codes on failure
+	*/
+	IMPORT_C TInt Open (TUint aTierId );
+
+	/**
+	Publishes service notifications to remote clients. The technology specific service information
+	is packed in aServiceInfo.
+	Note that a service point will only publish a single device or service.Consequently only one
+	parameter set must be sent in the bundle.Also once published,the service point must be closed
+	before another publish is done.
+	
+	The uris for device or service publish must conform to the schema specified in UPnP Device Architecture 1.0
+
+	When the responses are received, MPnPObserver::OnPnPEventL is called for each response and calling clients
+	must provide the implementation to handle the responses.
+
+	In case of corrupted uris or value fields or low memory conditions, MPnPObserver::OnPnPError is called
+	synchronously which must be handled by the client
+
+	In UPnP implementation the publish notifications are sent to SSDP multicast address on UDP channel.
+	@param Parameter bundle containing service information.
+	
+	@panic 1 The RPnPServiceDiscovery::Open() has not been called
+	@panic 2 Invalid observer object supplied. It may be null or corrupted
+	@panic 3 More than one family supplied in bundle
+	@panic 4 Invalid family
+	@panic 5 No parameter set used
+	*/
+	IMPORT_C void Publish ( const RPnPParameterBundle& aServiceInfo );
+
+	/**
+	Sends service notification to remote clients who've subscribed to the service/device
+
+	No responses are received in MPnPObserver::OnPnPEventL and MPnPObserver::OnPnPError is also not called
+	@param Parameter bundle contains the technology specific information.
+	
+	@panic 1 The RPnPServiceDiscovery::Open() has not been called
+	@panic 3 More than one family supplied in bundle
+	@panic 4 Invalid family
+	@panic 5 No parameter set used
+	*/
+	IMPORT_C void SendNotify ( const  RPnPParameterBundle & aServiceInfo );
+
+	/**
+	 Starts the Connection and attaches the sub-connection to it.This also
+	 creates the socket and enables it to send and receive messages.
+	 @return KErrNone if successful. Returns system wide error codes on failure
+	 */
+	IMPORT_C TInt InitiateControl ( RControlChannel& aControlChannel );
+
+	/**
+	Close technology specific session.
+	In UPnP it sends SSDP::ByeBye notifications to SSDP multicast adress.
+	*/
+	IMPORT_C void Close ( );
+
+	private:
+		 CPnPServicePublisherBase* iUPnPServicePublisherImpl;
+		 
+};
+
+#endif //__RPNPPSERVICEPUBLISHER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/inc/upnpconstants.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,214 @@
+// 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 __UPNPCONSTANTS_H_
+#define __UPNPCONSTANTS_H_
+
+/**
+This is the tier id value which must be specified whenever the user wants to open a UPnP Service Point or Control Point. 
+This is the parameter which must be specified in the RPnPServicePublisher::Open or RPnPServiceDiscovery::Open APIs
+@publishedPartner
+@prototype
+*/
+
+const TUint KUPnPInterface  = 0x2000D054;
+
+/**
+This is the Uid which is used to load in the underlying the pnp interface. New plugins which make use of the
+pnp interface should make use of this as the interface id of their implementations in the rss file of the plugin
+@publishedPartner
+@prototype
+*/
+const TUid  KPnPInterfaceId = {0x2000D060};
+
+/**
+Base value for the UPnP error code range (-7700 to -7900)
+@publishedPartner
+@prototype
+*/
+const TInt KUpnpErrorBase = -7700;
+
+/**
+Error range  for client dll returned error code
+@publishedPartner
+@prototype
+*/
+const TInt KUpnpClientErrorBase=KUpnpErrorBase-50;
+
+/**
+Error code for invalid bundle passed by client application.
+This error code is returned when the application fails to retrieve
+either the callback (MPnPObserver) , or family or the parameter
+set from the passed bundle
+
+@publishedPartner
+@prototype
+*/
+const TInt KErrClientDllInvalidBundle = KUpnpClientErrorBase-1;
+
+//UpnP panic codes
+
+enum TUPnPPanic
+	{
+	KUPnPErrNotOpen = 1 , //Set the starting error code.
+	KUPnPErrNoObserver,
+	KUPnPErrInvalidFamilyCount,
+	KUPnPErrInvalidFamily,
+	KUPnPErrNoParamSet,
+	KUPnPErrDiscoveryInProgress,
+	KUPnPErrPublish,
+	KUPnPErrInvalidInput,
+	KUPnPErrTimerError,
+	KUPnPErrResponseUriNotFound,
+	KUPnPErrInvalidFriendlyName,
+	KUPnPErrInvalidManufactureName,
+	KUPnPErrInvalidModelName,
+	KUPnPErrInvalidModelNumber,
+	KUPnPErrInvalidModelDescription,
+	KUPnPErrInvalidSerialNumber,
+	KUPnPErrInvalidUDN,
+	KUPnPErrInvalidUPC,
+	KUPnPErrMultiplePublishParamSet,
+	KUPnPErrInvalidMimeType,
+	};
+
+
+//error strings
+_LIT(KUPnPNoObserver,"Observer not set");
+_LIT( KUPnPHandleNotOpen , "Handle not open");
+_LIT( KUPnPInvalidFamilyCount , "Family count not equal to 1");
+_LIT( KUPnPInvalidFamily , "Invalid Family");
+_LIT( KUPnPNoParamSet , "No paramset");
+_LIT(KUPnPDiscoveryInProgress,"Discovery in not set");
+_LIT(KUPnPAlreadyPublished,"The service has already published");
+_LIT(KUPnPServiceNotPublished,"The service is not yet published");
+_LIT(KUPnPInvalidUserInput, "The input data/argument is invalid");
+_LIT(KUPnPTimerUriNotFound, "Internal error : URI  in timer list not found");
+_LIT(KUPnPResponseUriNotFound, "Internal error : URI  not found in resposne");
+_LIT(KUPnPDeviceSendingNotification,"The device is sending notification");
+_LIT(KUPnPInvalidFriendlyName,"The device friendly name is not valid");
+_LIT(KUPnPInvalidManufactureName,"The device Manufacturer is name not valid");
+_LIT(KUPnPInvalidModelName,"The model name is not valid");
+_LIT(KUPnPInvalidModelNumber,"The model number is not valid");
+_LIT(KUPnPInvalidModelDescription,"The model description is not valid");
+_LIT(KUPnPInvalidSerialNumber,"The device serial number is not valid");
+_LIT(KUPnPInvalidUPC,"The device UPC is not valid");
+_LIT(KUPnPInvalidUDN,"The unique device name is not valid");
+_LIT(KUPnPControlChannel,"UPnP Control Channel");
+_LIT(KUPnPMultiplePublish,"Multiple devices/service publish in single service point");
+_LIT(KUPnPInvalidIconInfo,"The device Icon Info is not valid");
+
+/**
+Error range  for upnpcodec dll returned error code
+@publishedPartner
+@prototype
+*/
+const TInt KUpnpCodecErrorBase=KUpnpErrorBase-150;
+
+/**
+Error encoding ST header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeST				= KUpnpCodecErrorBase - 1;
+
+/**
+Error encoding USN header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeUSN			= KUpnpCodecErrorBase - 2;
+
+/**
+Error encoding Timeout header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeTimeout		= KUpnpCodecErrorBase - 3;
+
+/**
+Error encoding EXT header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeEXT			= KUpnpCodecErrorBase - 4;
+
+/**
+Error encoding SID header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeSID			= KUpnpCodecErrorBase - 5;
+
+/**
+Error encoding NTS header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeNTS			= KUpnpCodecErrorBase - 6;
+
+/**
+Error encoding NT header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeNT				= KUpnpCodecErrorBase - 7;
+
+/**
+Error encoding MX header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeMX				= KUpnpCodecErrorBase - 8;
+
+/**
+Error encoding SEQ header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeSEQ			= KUpnpCodecErrorBase - 9;
+
+/**
+Error encoding MAN header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeMAN			= KUpnpCodecErrorBase - 10;
+
+/**
+Error encoding SoapAction header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeSoapAction		= KUpnpCodecErrorBase - 11;
+
+/**
+Error encoding Callback header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPEncodeCallback		= KUpnpCodecErrorBase - 12;
+
+/**
+Error decoding MAN header
+@publishedPartner
+@prototype
+*/
+const TInt KErrUPnPDecodeMAN	 		= KUpnpCodecErrorBase - 13;
+
+#endif /*UPNPERR_H_*/
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/ccontrolchannel.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,259 @@
+// 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 "ccontrolchannel.h"
+#include <es_sock.h>
+#include <e32const.h>
+#include <upnpconstants.h>
+
+CControlChannelHandler::CControlChannelHandler ( RSocket &aSocket, TBool aChannelType )
+:CActive ( EPriorityNormal ), iSocket ( aSocket ), iChannelType ( aChannelType )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+TInt CControlChannelHandler::RunError ( TInt aError )
+	{
+	User::RequestComplete ( iChannelStatus, aError );
+	return KErrNone;	
+	}
+// -------------------------------------------------------------
+CControlChannelReader* CControlChannelReader::NewL ( RSocket& aSocket, TBool aChannelType )
+	{
+	return new ( ELeave ) CControlChannelReader ( aSocket, aChannelType );
+	}
+		
+CControlChannelReader::CControlChannelReader ( RSocket& aSocket, TBool aChannelType )
+	: CControlChannelHandler ( aSocket, aChannelType )
+	{
+	}
+
+CControlChannelReader::~CControlChannelReader ()
+	{
+	Cancel ();	
+	}
+	
+void CControlChannelReader::Read ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	if ( iChannelType == EFalse )
+		{	
+		__ASSERT_DEBUG ( !aMessage.IsDirty (), User::Panic ( KUPnPControlChannel, KErrInUse ) );
+		}
+		
+	iMessage 		= &aMessage;
+	iChannelStatus 	= &aStatus;	
+	*iChannelStatus = KRequestPending;
+	
+	iMessage->MessagePtr().SetLength ( 0 );
+	iSocket.RecvOneOrMore ( iMessage->MessagePtr(), 0, iStatus, iBytesReceived );
+	SetActive ();
+	}
+
+void CControlChannelReader::RunL ()
+	{
+	User::LeaveIfError ( iStatus.Int() );	
+	TPtrC8 buffer ( iMessage->MessagePtr() );
+	TInt lenToSkip = 0;
+	if ( iDataLength == 0 )  // ie; first message
+		{
+		// We should have more than 4 bytes ( ie; the identifier, which is of TUint,
+		// size. here, sizeof (TUint) )
+		__ASSERT_DEBUG ( buffer.Length () >= sizeof(TUint), User::Invariant() );
+		
+		// Extract the first 4 bytes. we will have our identifier with it.
+		TLex8 parser ( buffer );
+		TUint id = 0;
+		User::LeaveIfError ( parser.Val ( id, EDecimal ) );
+		iMessage->SetId( id );
+		lenToSkip = sizeof (TUint);
+		
+		// Check how we are going to end with the message. checking the TControlMessage::MaxLength
+		// or by explicitly specifying it.
+		
+		// Get the Maxlength and set it to the iMessage
+		TInt maxLen = 0;
+		User::LeaveIfError ( iSocket.GetOpt ( KCHMaxRecvLength, KCHOptionLevel, maxLen ) ); 
+		iMessage->SetMaxLength ( maxLen );
+		}
+	TPtrC8 bufferToCopy ( buffer.Ptr() + lenToSkip, buffer.Length() - lenToSkip );
+	iMessage->MessagePtr().Copy ( bufferToCopy );
+	iDataLength += bufferToCopy.Length ();
+	TInt maxLen = iMessage->MaxLength ();
+	if ( maxLen == KErrUnknown )
+		{
+		// We have to issue a GetOpt to see whether we complete with the message.
+		TBool last = EFalse;
+		User::LeaveIfError ( iSocket.GetOpt ( KCHLastMessage, KCHOptionLevel, last ) );
+		if ( last )
+			iMessage->SetLast ();
+		}
+	else
+		{
+		if ( iDataLength == maxLen )
+			{
+			// We completed with the message. Set the message end flag as ETrue
+			// and reset the iRecvLength
+			iDataLength = 0;
+			iMessage->SetLast ();
+			}
+		}
+		
+	if ( iMessage->IsLast () && iChannelType == EFalse )
+		{
+		// client usage is done with the current control message
+		// We have to set a dirty bit as well for not reusing this message again
+		iMessage->SetDirty ();
+		}
+	
+	User::RequestComplete ( iChannelStatus, KErrNone );
+	}
+	
+void CControlChannelReader::DoCancel ()
+	{
+	iSocket.CancelRecv ();
+	User::RequestComplete ( iChannelStatus, KErrCancel );	
+	}
+
+// ---------------------------------------------------------------
+	
+CControlChannelWriter* CControlChannelWriter::NewL ( RSocket& aSocket, TBool aChannelType )
+	{
+	return new ( ELeave ) CControlChannelWriter ( aSocket, aChannelType );
+	}
+		
+CControlChannelWriter::CControlChannelWriter ( RSocket& aSocket, TBool aChannelType )
+	: CControlChannelHandler ( aSocket, aChannelType)
+	{
+	}
+
+CControlChannelWriter::~CControlChannelWriter ()
+	{
+	Cancel ();
+	}	
+	  
+void CControlChannelWriter::Write ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	if ( iChannelType )
+		{
+		__ASSERT_DEBUG ( !aMessage.IsDirty (), User::Panic ( KUPnPControlChannel, KErrInUse ) );
+		}
+		
+	iMessage 		= &aMessage;
+	iChannelStatus 	=  &aStatus;	
+	*iChannelStatus = KRequestPending;
+	
+	if ( iMessage->Id () == 0 )
+		{
+		// Message ID is not set. Typically when we do the first send after connect 
+		// ie; Client side RControlChannel operation.
+		iMessage->SetId ( iSocket.SubSessionHandle () );							
+		}
+
+	if ( iMessage->MaxLength() != KErrUnknown )
+		{
+		TCHMessageOption option ( iMessage->Id (), iMessage->MaxLength () );
+		TPckg < TCHMessageOption > optionBuf ( option );
+		// Set the total size if set in the TControlMessage
+		iSocket.SetOpt ( KCHMaxRecvLength, KCHOptionLevel, optionBuf );		
+		}
+	
+	if ( iMessage->IsLast () && iChannelType )
+		{
+		// server usage is done with the current control message
+		// We have to set a dirty bit as well for not reusing this message again
+		iMessage->SetDirty ();
+		}
+		
+	iSocket.Send ( iMessage->MessageDes(), iMessage->Id(), iStatus );
+	SetActive ();
+	}
+
+void CControlChannelWriter::RunL ()
+	{
+	User::LeaveIfError ( iStatus.Int() );	
+	if ( iMessage->MaxLength() == KErrUnknown && iMessage->IsLast () )
+		{
+		TCHMessageOption option ( iMessage->Id (), iMessage->IsLast () );
+		TPckg < TCHMessageOption > optionBuf ( option );
+
+		// SetOpt to know whether we are sending the last message
+		User::LeaveIfError ( iSocket.SetOpt( KCHLastMessage, KCHOptionLevel, optionBuf ) );
+		}
+	
+	User::RequestComplete ( iChannelStatus, KErrNone );
+	}
+
+void CControlChannelWriter::DoCancel ()
+	{
+	iSocket.CancelSend ();
+	User::RequestComplete ( iChannelStatus, KErrCancel );
+	}
+
+// ----------------------------------------------------------------
+
+CControlChannel* CControlChannel::NewL ( RSocketServ& aSocketServ, RSubConnection& aSubConnection, TUint aAddrFamily, TBool aChannelType, TUint aProtocol, const TConnectionDetails& aConnInfo )
+	{
+	CControlChannel* self = new (ELeave) CControlChannel ( );
+	CleanupStack::PushL ( self );
+	self->ConstructL ( aSocketServ, aSubConnection, aAddrFamily, aChannelType, aProtocol, aConnInfo );
+	CleanupStack::Pop (); // self
+	return self;
+	}
+
+CControlChannel::~CControlChannel ()
+	{
+	delete iReader;
+	delete iWriter;
+	iSocket.Close ();		
+	}
+
+void CControlChannel::Recv ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	iReader->Read ( aMessage, aStatus );	
+	}
+
+void CControlChannel::Send ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	iWriter->Write ( aMessage, aStatus );
+	}
+
+
+CControlChannel::CControlChannel ( )
+	{		
+	}
+
+void CControlChannel::ConstructL ( RSocketServ& aSocketServ, RSubConnection& aSubConnection, TUint aAddrFamily, TBool aChannelType, TUint aProtocol, const TConnectionDetails& aConnInfo )
+	{
+	User::LeaveIfError ( iSocket.Open( aSocketServ, aAddrFamily, KSockStream, aProtocol, aSubConnection ) );
+	
+	if ( aConnInfo.iAddr )
+		{
+		TRequestStatus connectStatus;
+		iSocket.Connect ( *(aConnInfo.iAddr), connectStatus );
+		User::WaitForRequest ( connectStatus );  // This is Ok to do... as in the esock server ( actually flow )will just store the 
+												// connect address internally and not attempting to do an actual connect. As good as 
+												// setopt but we need the socket to know that this is a connected socket.
+		User::LeaveIfError ( connectStatus.Int() );					
+		}
+	
+	if ( aConnInfo.iUri.Length() != 0 )
+		{
+		// Do a setopt to inform the esock about our URI
+		User::LeaveIfError ( iSocket.SetOpt ( KCHAbsoluteUri, KCHOptionLevel, aConnInfo.iUri ) );
+		}
+		
+	iReader = CControlChannelReader::NewL ( iSocket, aChannelType );
+	iWriter = CControlChannelWriter::NewL ( iSocket, aChannelType );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/cpnpservicediscoverybase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+// 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 "cpnpservicediscoverybase.h"
+#include <ecom/ecomresolverparams.h>
+#include <ecom/ecom.h>
+#include <upnpconstants.h>
+
+CPnPServiceDiscoveryBase* CPnPServiceDiscoveryBase::NewL( TUint aTierID )
+	{
+	_LIT8(KClient,"/Client");
+	TBuf8<128> tierId;
+	tierId.Num(aTierID);
+	tierId.Append(KClient);
+	// Set resolving parameters
+	TEComResolverParams resolverParams;
+	resolverParams.SetDataType(tierId);
+	return (REINTERPRET_CAST(CPnPServiceDiscoveryBase*,
+	REComSession::CreateImplementationL(KPnPInterfaceId,_FOFF(CPnPServiceDiscoveryBase, iEcomDtorID),resolverParams)));
+	}
+
+EXPORT_C CPnPServiceDiscoveryBase::CPnPServiceDiscoveryBase()
+	{
+	}
+
+EXPORT_C CPnPServiceDiscoveryBase::~CPnPServiceDiscoveryBase()
+	{
+	if (iEcomDtorID.iUid)
+		{
+		REComSession::DestroyedImplementation(iEcomDtorID);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/cpnpservicepublisherbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+// 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 "cpnpservicepublisherbase.h"
+#include <ecom/ecomresolverparams.h>
+#include <ecom/ecom.h>
+#include <upnpconstants.h>
+
+CPnPServicePublisherBase* CPnPServicePublisherBase::NewL( TUint aTierID )
+	{
+	_LIT8(KServer,"/Server");
+	TBuf8<128> tierId;
+	tierId.Num(aTierID);
+	tierId.Append(KServer);
+	// Set resolving parameters
+	TEComResolverParams resolverParams;
+	resolverParams.SetDataType(tierId);
+	return (REINTERPRET_CAST(CPnPServicePublisherBase*,
+		REComSession::CreateImplementationL(KPnPInterfaceId,_FOFF(CPnPServicePublisherBase, iEcomDtorID),resolverParams)));
+	}
+
+
+EXPORT_C CPnPServicePublisherBase::CPnPServicePublisherBase()
+	{
+	}
+
+EXPORT_C CPnPServicePublisherBase::~CPnPServicePublisherBase()
+	{
+	if (iEcomDtorID.iUid)
+		{
+		REComSession::DestroyedImplementation(iEcomDtorID);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/pnpparameterbundle.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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 "pnpparameterbundle.h"
+
+EXPORT_C TInt RPnPParameterBundleBase::Open()
+ 	{
+ 	TRAPD(err,CreateL());
+ 	return err;
+ 	}
+ 
+ EXPORT_C void RPnPParameterBundleBase::Close()
+ 	{
+ 	Destroy();
+ 	}
+ 
+ EXPORT_C void RPnPParameterBundle::SetPnPObserver ( MPnPObserver* aPnPObserver )
+ 	{
+ 	iPnPObserver = aPnPObserver;
+ 	}
+ 
+ EXPORT_C MPnPObserver* RPnPParameterBundle::PnPObserver () const
+ 	{
+ 	return iPnPObserver;
+ 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/rcontrolchannel.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,133 @@
+// 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 "rcontrolchannel.h"
+#include "ccontrolchannel.h"
+
+#include <inetprottextutils.h>
+
+EXPORT_C RControlChannel::RControlChannel ()
+: iControlChannelImpl ( NULL )
+	{	
+	}
+
+EXPORT_C void RControlChannel::Recv ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	__ASSERT_DEBUG ( iControlChannelImpl, User::Invariant() );
+	iControlChannelImpl->Recv ( aMessage, aStatus );	
+	}
+
+EXPORT_C void RControlChannel::Send ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	__ASSERT_DEBUG ( iControlChannelImpl, User::Invariant() );
+	iControlChannelImpl->Send ( aMessage, aStatus );
+	}
+
+EXPORT_C void RControlChannel::Close ()
+	{
+	delete iControlChannelImpl;
+	iControlChannelImpl = NULL;
+	}
+
+EXPORT_C TInt RControlChannel::Open ( RSocketServ& aSocketServ, RSubConnection& aSubConnection, TUint aAddrFamily, TBool aChannelType, TUint aProtocol, const TConnectionDetails& aConnInfo )
+	{
+	TRAPD( err, iControlChannelImpl = CControlChannel::NewL ( aSocketServ, aSubConnection, aAddrFamily, aChannelType, aProtocol, aConnInfo ) );
+	return err;
+	}
+
+// -----------------------------------------------------
+
+EXPORT_C TControlMessage::TControlMessage ()
+: iPtr(NULL, 0),
+iId (0),
+iMaxLength (KErrUnknown),
+iFlags(0)
+	{
+		
+	}
+
+EXPORT_C TControlMessage::~TControlMessage ()
+	{
+		
+	}
+
+EXPORT_C void TControlMessage::SetMessageDes ( const TDesC8& aData )
+	{
+	iPtr.Set((TUint8*)aData.Ptr(), aData.Length(), aData.Length() );
+	}
+
+EXPORT_C void TControlMessage::SetMessagePtr ( TDes8& aData )
+	{
+	iPtr.Set((TUint8*)aData.Ptr(), aData.Length(), aData.MaxLength() );
+	}
+
+EXPORT_C const TDesC8& TControlMessage::MessageDes () const
+	{
+	return iPtr;	
+	}
+
+EXPORT_C TDes8& TControlMessage::MessagePtr ()
+	{
+	return iPtr;	
+	}	
+
+EXPORT_C TBool TControlMessage::IsLast() const
+	{
+	return ( iFlags & 1 ); // 0th bit ( LSB )
+	}
+	
+EXPORT_C void TControlMessage::SetLast()
+	{
+	iFlags |= 1; // set the 0th bit
+	}
+
+EXPORT_C void TControlMessage::ClearFlags ()
+	{
+	// clear set last flag
+	iFlags &= ~1;
+	}
+
+EXPORT_C void TControlMessage::SetMaxLength ( TInt aLen )
+	{
+	iMaxLength = aLen;	
+	}
+
+EXPORT_C TInt TControlMessage::MaxLength () const
+	{
+	return iMaxLength;	
+	}
+	
+void TControlMessage::SetId ( TUint aId )
+	{
+	iId = aId;		
+	}
+
+TUint TControlMessage::Id () const	
+	{
+	return iId;	
+	}
+
+void TControlMessage::SetDirty ()
+	{
+	iFlags |= (1 << 1); // set the 0th bit	
+	}
+
+TBool TControlMessage::IsDirty () const
+	{
+	return ( iFlags & (1 << 1) );
+	}
+
+// ----------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/rpnpservicediscovery.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,125 @@
+// 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 <rpnpservicediscovery.h>
+#include <upnp/upnpconstants.h>
+
+EXPORT_C RPnPServiceDiscovery::RPnPServiceDiscovery( ):
+	iUPnPServiceDiscoveryImpl ( NULL )
+	{
+	}  
+
+EXPORT_C TInt RPnPServiceDiscovery::Open ( TUint aTierID )
+	{
+	if (!iUPnPServiceDiscoveryImpl )
+		{
+		TInt err;
+		if (!iUPnPServiceDiscoveryImpl )
+			{
+			TRAP(err,iUPnPServiceDiscoveryImpl = CPnPServiceDiscoveryBase::NewL( aTierID ));
+			if ( err != KErrNone )
+				return err;
+			}
+		err = iUPnPServiceDiscoveryImpl->Construct( aTierID );
+		if ( err != KErrNone )
+			{
+			Close();
+			}
+		return err;
+		}
+	else
+		return KErrAlreadyExists;
+				
+	}
+
+EXPORT_C void  RPnPServiceDiscovery::Discover ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_DEBUG( iUPnPServiceDiscoveryImpl, User::Panic( KUPnPHandleNotOpen, KUPnPErrNotOpen));
+	__ASSERT_DEBUG(aServiceInfo.PnPObserver()!= NULL, User::Panic(KUPnPNoObserver,KUPnPErrNoObserver));
+
+	__ASSERT_DEBUG(aServiceInfo.CountParameterFamilies() == 1, User::Panic(KUPnPInvalidFamilyCount,KUPnPErrInvalidFamilyCount));	
+	TUint32 param=EUPnPDiscoverRequestParamSet;
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( param );		
+	__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily)); 	
+	TInt paramSetCount = family.CountParameterSets(RParameterFamily::ERequested);
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+
+	iUPnPServiceDiscoveryImpl->Discover ( aServiceInfo );
+	}
+
+EXPORT_C void RPnPServiceDiscovery::Describe ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_ALWAYS( iUPnPServiceDiscoveryImpl, User::Panic( KUPnPHandleNotOpen,KUPnPErrNotOpen ) );
+	__ASSERT_DEBUG(aServiceInfo.PnPObserver()!= NULL, User::Panic(KUPnPNoObserver,KUPnPErrNoObserver));
+	
+	__ASSERT_DEBUG(aServiceInfo.CountParameterFamilies() == 1, User::Panic(KUPnPInvalidFamilyCount,KUPnPErrInvalidFamilyCount));
+	
+	TUint32 param=EUPnPDescribeRequestParamSet;
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( param );
+	__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+	iUPnPServiceDiscoveryImpl->Describe ( aServiceInfo );
+	}
+
+EXPORT_C void RPnPServiceDiscovery::Subscribe ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_ALWAYS( iUPnPServiceDiscoveryImpl, User::Panic( KUPnPHandleNotOpen,KUPnPErrNotOpen ) );
+	__ASSERT_DEBUG(aServiceInfo.PnPObserver()!= NULL, User::Panic(KUPnPNoObserver,KUPnPErrNoObserver));
+	__ASSERT_DEBUG(aServiceInfo.CountParameterFamilies() == 1, User::Panic(KUPnPInvalidFamilyCount,KUPnPErrInvalidFamilyCount));
+	
+	TUint32 param = EUPnPSubscribeRequestParamSet;
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( param );	
+	__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+	iUPnPServiceDiscoveryImpl->Subscribe ( aServiceInfo );
+	}
+
+EXPORT_C void  RPnPServiceDiscovery::RegisterNotify ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_ALWAYS( iUPnPServiceDiscoveryImpl, User::Panic( KUPnPHandleNotOpen, KUPnPErrNotOpen) );
+	__ASSERT_DEBUG(aServiceInfo.PnPObserver()!= NULL, User::Panic(KUPnPNoObserver,KUPnPErrNoObserver));
+	__ASSERT_DEBUG(aServiceInfo.CountParameterFamilies() == 1, User::Panic(KUPnPInvalidFamilyCount,KUPnPErrInvalidFamilyCount));
+	
+	TUint32 param = EUPnPRegisterAnnouncementParamSet;
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( param );
+	__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+	iUPnPServiceDiscoveryImpl->RegisterNotify ( aServiceInfo );
+	}
+
+
+EXPORT_C void  RPnPServiceDiscovery::Cancel ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_ALWAYS( iUPnPServiceDiscoveryImpl, User::Panic( KUPnPHandleNotOpen, KUPnPErrNotOpen) );
+	__ASSERT_DEBUG(aServiceInfo.CountParameterFamilies() == 1, User::Panic(KUPnPInvalidFamilyCount,KUPnPErrInvalidFamilyCount));
+	RParameterFamily family=const_cast<RPnPParameterBundle&>(aServiceInfo).GetFamilyAtIndex(0);
+	
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+	iUPnPServiceDiscoveryImpl->Cancel ( aServiceInfo );
+	}
+
+EXPORT_C TInt RPnPServiceDiscovery::InitiateControl( RControlChannel& aControlChannel, const TDesC8& aUri)
+	{
+	__ASSERT_ALWAYS( iUPnPServiceDiscoveryImpl, User::Panic( KUPnPHandleNotOpen, KUPnPErrNotOpen) );
+	return iUPnPServiceDiscoveryImpl->InitiateControl( aControlChannel, aUri);
+	}
+
+EXPORT_C void RPnPServiceDiscovery::Close ( )
+	{
+	delete	iUPnPServiceDiscoveryImpl;
+	iUPnPServiceDiscoveryImpl = NULL;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/pnp/src/rpnpservicepublisher.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,85 @@
+// 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 <rpnpservicepublisher.h>
+#include <rcontrolchannel.h>
+#include <upnp/upnpconstants.h>
+
+EXPORT_C RPnPServicePublisher::RPnPServicePublisher( ):
+	iUPnPServicePublisherImpl ( NULL )
+	{
+	}
+
+EXPORT_C TInt RPnPServicePublisher::Open ( TUint aTierID )
+	{
+	if (!iUPnPServicePublisherImpl )
+		{
+		TInt err;
+		if (!iUPnPServicePublisherImpl )
+			{
+			TRAP(err,iUPnPServicePublisherImpl = CPnPServicePublisherBase::NewL( aTierID ));
+			if ( err != KErrNone )
+				return err;
+			}
+		err = iUPnPServicePublisherImpl->Construct( aTierID );
+		if ( err != KErrNone )
+			{
+			Close();
+			}
+		return err;
+		}
+	else
+		return KErrAlreadyExists;
+				
+	}
+
+EXPORT_C void RPnPServicePublisher::Close ( )
+	{
+	delete	iUPnPServicePublisherImpl;
+	iUPnPServicePublisherImpl = NULL;
+	}
+
+EXPORT_C void RPnPServicePublisher::Publish ( const  RPnPParameterBundle& aServiceInfo )
+	{
+	
+	__ASSERT_DEBUG( iUPnPServicePublisherImpl, User::Panic( KUPnPHandleNotOpen, KUPnPErrNotOpen ) );
+	__ASSERT_DEBUG(aServiceInfo.PnPObserver()!= NULL, User::Panic(KUPnPNoObserver,KUPnPErrNoObserver));
+	__ASSERT_DEBUG(aServiceInfo.CountParameterFamilies() == 1, User::Panic(KUPnPInvalidFamilyCount,KUPnPErrInvalidFamilyCount));
+	
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).GetFamilyAtIndex(0);
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) == 1, User::Panic(KUPnPMultiplePublish,KUPnPErrMultiplePublishParamSet));
+	iUPnPServicePublisherImpl->Publish ( aServiceInfo );
+	}
+
+EXPORT_C void RPnPServicePublisher::SendNotify ( const  RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_DEBUG( iUPnPServicePublisherImpl, User::Panic( KUPnPHandleNotOpen, KUPnPErrNotOpen ) );
+	__ASSERT_DEBUG(aServiceInfo.CountParameterFamilies() == 1, User::Panic(KUPnPInvalidFamilyCount,KUPnPErrInvalidFamilyCount));
+	
+	TUint32 param=EUPnPServiceNotificationParamSet;
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily(param);	
+	__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+	
+	iUPnPServicePublisherImpl->SendNotify ( aServiceInfo );
+	}
+
+EXPORT_C TInt RPnPServicePublisher::InitiateControl( RControlChannel& aControlChannel )
+	{
+	__ASSERT_DEBUG( iUPnPServicePublisherImpl, User::Panic( KUPnPHandleNotOpen, KUPnPErrNotOpen ) );	
+	return iUPnPServicePublisherImpl->InitiateControl( aControlChannel );
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+// 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:
+//
+
+PRJ_TESTEXPORTS
+../inc/upnpparamset.h		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/upnpparamset.h)
+../inc/upnpparamset.inl		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/upnpparamset.inl)
+
+PRJ_TESTMMPFILES
+upnp.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/group/upnp.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,66 @@
+// 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:
+// UPnP specific dll that provides support for applications to create parameter bundles of
+// desired type for carrying out various UPnP operations like discovery,describe etc.
+// 
+//
+
+
+TARGET upnp.dll
+TARGETTYPE PLUGIN
+CAPABILITY ALL -TCB
+
+UID 0x10009D8D 0x2000D05D
+VENDORID 0x70000001
+
+SOURCEPATH ../src
+SOURCE  ecom_impl.cpp
+SOURCE  upnpparamsextfactory.cpp
+SOURCE  upnpsubconneventsfactory.cpp
+SOURCE 	cupnpsearch.cpp 
+SOURCE 	cupnpeventnotifier.cpp
+SOURCE 	cupnpdescribe.cpp 
+SOURCE	cupnpelement.cpp 
+SOURCE 	cupnpelementarray.cpp
+SOURCE	cupnpsubscribe.cpp 
+SOURCE	cupnpregisternotify.cpp 
+SOURCE  cupnppublisher.cpp 
+SOURCE  cupnpeventhandler.cpp 
+SOURCE  pnputils.cpp
+SOURCE  ccallbackargument.cpp 
+SOURCE 	cpnpservicediscovery.cpp
+SOURCE 	cpnpservicepublisher.cpp
+
+
+START RESOURCE 2000D05D.rss
+TARGET upnp.rsc
+END
+
+USERINCLUDE ../inc
+USERINCLUDE ../../../upnputils/inc
+
+SYSTEMINCLUDE /epoc32/include 
+SYSTEMINCLUDE /epoc32/include/upnp
+
+LIBRARY euser.lib 
+LIBRARY esock.lib 
+LIBRARY esocksvr.lib
+LIBRARY netmeta.lib
+LIBRARY insock.lib
+LIBRARY pnp.lib
+LIBRARY upnputils.lib
+LIBRARY inetprotutil.lib 
+LIBRARY nodemessages.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/ccallbackargument.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,56 @@
+// 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 __CCALLBACKARGUMENT_H_
+#define __CCALLBACKARGUMENT_H_
+#include <e32base.h>
+/*
+  This class holds the *This pointer of the object calling it so that the static
+  methods being called on expiry of CDeltaTimer can operate on the attributes of 
+  class
+ 
+  @internalComponent
+ */
+class CCallbackArgument: public CBase
+	{
+public:
+	static CCallbackArgument* NewL(TAny* aThis ,const TDesC8& aUri );
+	~CCallbackArgument();
+	inline TAny* GetThisPointer() const;
+	inline const TDesC8& GetUri() const;
+private:
+	CCallbackArgument (TAny* aThis );
+	void ConstructL(const TDesC8& aUri);
+	
+	TAny* iThisPointer;
+	RBuf8 iUri;
+	};
+
+/* Returns the pointer to the object it contains. */
+TAny* CCallbackArgument::GetThisPointer() const
+	{
+	return iThisPointer;
+	}
+
+/* 	Returns a reference to the uri for which the timer has been triggered.This
+ 	enables the calling function to look up its table of uris for the matching uri
+ 	and take the appropriate action
+ 	*/ 
+const TDesC8& CCallbackArgument::GetUri() const
+	{
+	return iUri;
+	}
+
+#endif /*CCALLBACKARGUMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/ctimermappeduri.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+// 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 __CTIMERMAPPEDURI_H_
+#define __CTIMERMAPPEDURI_H_
+#include <e32base.h>
+/* This class stores a mapping of TDeltaTimerEntry corresponding to the uris
+ for which search request has been  issued. It allows the entry to be removed in 
+ case a new search/subscribe request with the same uri is issued or when cancelling
+ the search/subscribe request 
+ 
+ @internalComponent
+ */
+class CTimerMappedUri : public CBase
+	{
+public:
+	inline static CTimerMappedUri* NewL(const TDesC8& aUri,TDeltaTimerEntry* aEntry,TInt aTime);
+	inline ~CTimerMappedUri();
+	inline TDeltaTimerEntry& GetTimerEntry() const;
+	inline TInt Delay() const;
+	inline TBool UriExists(const TDesC8& aUri) const;
+	inline const TDesC8& GetUri() const;
+	inline TBool MatchTimerEntry( const TDeltaTimerEntry* aEntry ) const ;
+private:
+	inline void ConstructL(const TDesC8& aUri);
+	inline CTimerMappedUri(TDeltaTimerEntry* aEntry, TInt aTime );
+	
+	RBuf8 iUri;
+	TDeltaTimerEntry* iEntry;
+	TInt iTime;
+	};
+
+#include "ctimermappeduri.inl"
+#endif /*CTIMERMAPPEDURI_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/ctimermappeduri.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,80 @@
+#ifndef CTIMERMAPPEDURI_INL_
+#define CTIMERMAPPEDURI_INL_
+// 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:
+// Returns a reference to the timer entry for the purpose of deleting it from
+// the deltatimer entry contained in the calling object
+// 
+//
+
+TDeltaTimerEntry& CTimerMappedUri::GetTimerEntry() const
+	{
+	return *iEntry;
+	}
+
+const TDesC8& CTimerMappedUri::GetUri() const
+	{
+	return iUri;
+	}
+
+
+/* Tells if the uri passed is the same as contained in the object
+ */
+TBool CTimerMappedUri::UriExists(const TDesC8& aUri) const
+	{
+	if(aUri.CompareF(iUri) == NULL)
+		return ETrue;
+	else
+		return EFalse;
+	}
+
+/* Returns the delay time according to which the timer has to be set */
+TInt CTimerMappedUri::Delay() const
+	{
+	return iTime;
+	}
+
+CTimerMappedUri* CTimerMappedUri::NewL(const TDesC8& aUri,TDeltaTimerEntry* aEntry,TInt aTime)
+	{
+	CTimerMappedUri* timerUri = new(ELeave) CTimerMappedUri(aEntry,aTime);
+	CleanupStack::PushL(timerUri);
+	timerUri->ConstructL(aUri);
+	CleanupStack::Pop(1);
+	return timerUri;
+	}
+
+CTimerMappedUri::CTimerMappedUri(TDeltaTimerEntry* aEntry,TInt aTime):iEntry(aEntry),iTime(aTime)
+	{
+	}
+
+void CTimerMappedUri::ConstructL(const TDesC8& aUri)
+	{
+	iUri.Close();
+	iUri.CreateL(aUri);
+	}
+
+CTimerMappedUri::~CTimerMappedUri()
+	{
+	iUri.Close();
+	delete iEntry;
+	}
+TBool CTimerMappedUri::MatchTimerEntry( const TDeltaTimerEntry* aEntry ) const
+	{
+	if ( aEntry == iEntry )
+		return ETrue;
+	else
+		return EFalse;
+	}
+
+#endif /*CTIMERMAPPEDURI_INL_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpdescribe.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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 __CUPNPDESCRIBE_H_
+#define __CUPNPDESCRIBE_H_
+#include <e32base.h>
+
+#include <upnpparamset.h>
+#include <pnpparameterbundle.h>
+
+#include "cupnpelementarray.h"
+/* This class is used to send describe requests to the service point.Also the
+   responses are conveyed back to the client code.
+   @internalComponent
+ */
+class CUPnPDescribe: public CBase
+	{
+public:
+	CUPnPDescribe( RSubConnection& aSubConnection ,RHostResolver& aResolver);
+	void SubmitRequestL( const RPnPParameterBundle& aServiceInfo );
+	void NotifyResultsL(RPnPParameterBundleBase& aBundle);
+	void CancelDescribeL( const RPnPParameterBundle& aServiceInfo );
+	~CUPnPDescribe();
+
+private:
+	RSubConnection& iSubConnection;
+	RHostResolver&  iResolver;
+	CUPnPElementArray* iElementArray;
+
+	};
+#endif /*CUPNPDESCRIBE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpelement.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+// 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 __CUPNPELEMENT_H_
+#define __CUPNPELEMENT_H_
+
+#include <e32base.h>
+#include <mpnpobserver.h>
+/* This is the container class which stores the uri's which have been requested for
+   alongwith the callback(MPnPObserver) pointer which has sent the request
+   
+   @internalComponent
+ */
+class CUPnPElement:public CBase
+	{
+public:
+	CUPnPElement( MPnPObserver* aObserver);
+	void AppendValueL( const TDesC8& aUri);
+	TInt MatchValue( const TDesC8& aUri);
+	TInt RemoveValue( const TDesC8& aUri);
+	~CUPnPElement();
+	
+	inline MPnPObserver* CallBack() const;
+	inline TBool UriExists() const;
+	
+private:
+	MPnPObserver*				iObserver;
+	RPointerArray<HBufC8>		iValueArray;
+	};
+
+// Returns true or false based on whether the element contains any uris or not
+// so that it can be deleted if no uri exist
+TBool CUPnPElement::UriExists() const 
+	{
+	return (iValueArray.Count()<=0)? EFalse:ETrue;
+	}
+
+MPnPObserver* CUPnPElement::CallBack() const
+	{
+	return iObserver;
+	}
+
+#endif /*CUPNPELEMENT_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpelementarray.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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 __CUPNPELEMENTARRAY_H_
+#define __CUPNPELEMENTARRAY_H_
+#include "cupnpelement.h"
+
+/* Container providing access and other operations on CUPnPElement object
+ @internalComponent
+ */
+class CUPnPElementArray:public CBase
+	{
+public:
+ 	void  InsertElementL( MPnPObserver* aObserver,const TDesC8& aUri);
+	MPnPObserver* MatchElement(const TDesC8& aUri );
+	TInt RemoveElement( const TDesC8& aUri );
+	void SsdpAllModificationL( MPnPObserver* aObserver );
+	CUPnPElementArray();
+	~CUPnPElementArray();
+
+private:
+	RPointerArray<CUPnPElement>			iElements;
+		
+};
+#endif /*CUPNPELEMENTARRAY_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpeventhandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,30 @@
+// 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 __CUPNPEVENTHANDLER_H_
+#define __CUPNPEVENTHANDLER_H_
+#include <pnpparameterbundle.h>
+class CUPnPEventHandler : public CBase
+	{
+public:
+	CUPnPEventHandler( RSubConnection& aSubConnection );
+	void SubmitRequestL( const RPnPParameterBundle& aBundle );
+	~CUPnPEventHandler();
+
+private:
+	RSubConnection& iSubConnection;
+	};
+#endif /*CUPNPEVENTHANDLER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpeventnotifier.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+// 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 __CUPNPEVENTNOTIFIER_H_
+#define __CUPNPEVENTNOTIFIER_H_
+#include <e32base.h>
+#include <es_sock.h>
+#include <e32debug.h>
+#include "mupnpeventnotification.h"
+/*
+ Active object which monitors the sub connection for incoming packets and passes
+ it to the respective classes NotifyResults
+ @internalComponent
+ */
+class CUPnPEventNotifier:public CActive
+	{
+public:
+	CUPnPEventNotifier( MUPnPEventNotification& aEvent , RSubConnection& aSubConnection);
+	void Notify();
+	virtual void RunL();
+	virtual TInt RunError( TInt aError );
+	virtual void DoCancel();
+	virtual ~CUPnPEventNotifier();
+private:	
+	TNotificationEventBuf iEventNotificationBuf;
+	MUPnPEventNotification& iNotification;
+	RSubConnection& iSubConnection;
+	TBool iClearParams;
+	};
+#endif /*CUPNPEVENTNOTIFIER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnppublisher.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,81 @@
+// 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 __CUPNPPUBLISHER_H_
+#define __CUPNPPUBLISHER_H_
+#include <e32math.h>
+#include <upnpparamset.h>
+#include <pnpparameterbundle.h>
+#include <mpnpobserver.h>
+
+const TInt KMicroTime = 1000000;
+/* Used to send publish advertisements to the network.Also periodic refreshment
+   of these advertisements is done
+   @internalComponent
+ */
+class CUPnPPublisher : public CBase
+	{
+public:
+	static CUPnPPublisher* NewL ( RSubConnection& aSubConnection );
+	~CUPnPPublisher();
+	void SubmitRequestL( const RPnPParameterBundle& aServiceInfo );
+	void NotifyResultsL(RPnPParameterBundleBase& aBundle);
+	
+public:
+	inline TBool IsService();
+
+private:
+	CUPnPPublisher(RSubConnection& aSubConnection );
+	static TInt AdvertisementRefresh(TAny* aPtr);
+	inline TUint64 CalculatePeriod (TInt aTime);
+	inline RSubConnection& SubConnection();
+	void ConstructL();
+	void ValidateOtherFieldsL(const  CUPnPDeviceRegisterParamSet& aDeviceParam);
+	void ValidateIconList(const  CUPnPDeviceRegisterParamSet& aDeviceParam);
+	void CopyWithIconInfoL ( const CUPnPDeviceRegisterParamSet& aDeviceParam, RPnPParameterBundleBase& aBundle );
+	void StoreIconListL ( const CUPnPIconList& aIconList, RBuf8& aBuffer );
+	
+	MPnPObserver* iObserver;
+	RSubConnection& iSubConnection;
+	CPeriodic* iPeriodTimer;
+	TBool iService;
+	TInt iPeriod;
+	TInt iTime;
+	};
+
+/* Used to calculate the period of refeshing the advertisement given the cache time
+ For convenience, the period is kept at 1/3rd of the cache time
+ @param  aTime	The cache control time
+ @return The period time
+ */
+TUint64 CUPnPPublisher::CalculatePeriod(TInt aTime)
+	{
+	const TUint64 divisor = 3;
+	TUint64 temp; // Placeholder
+	TUint64 q = Math::UDivMod64(aTime,divisor,temp);
+	return q;
+	}
+
+RSubConnection& CUPnPPublisher::SubConnection()
+	{
+	return iSubConnection;
+	}
+
+TBool CUPnPPublisher::IsService()
+	{
+	return iService;
+	}
+
+#endif /*CUPNPPUBLISHER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpregisternotify.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+// 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 __CUPNPREGISTERNOTIFY_H_
+#define __CUPNPREGISTERNOTIFY_H_
+#include <e32base.h>
+
+#include <mpnpobserver.h>
+#include "cupnpelementarray.h"
+
+/* Used to register for specific advertisements
+ @internalComponent
+ */
+
+class CUPnPRegisterNotify : public CBase
+{
+public:
+	void SubmitRequestL(const RPnPParameterBundle& aServiceInfo);
+	void NotifyResultsL(TUint32 aFamily, RPnPParameterBundleBase& aBundle);
+	~CUPnPRegisterNotify();
+	void CancelNotifyAnnouncementL( const RPnPParameterBundle& aServiceInfo );
+	CUPnPRegisterNotify(RSubConnection& aSubConnection );
+private:
+	RSubConnection& 	iSubConnection;
+	CUPnPElementArray* 	iElementArray;
+
+};
+#endif /*CUPNPREGISTERNOTIFY_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpsearch.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,99 @@
+// 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 __CUPNPSEARCH_H_
+#define __CUPNPSEARCH_H_
+
+#include <e32base.h>
+#include <mpnpobserver.h>
+#include <upnp/upnpconstants.h>
+
+#include "pnputils.h"
+#include "ccallbackargument.h"
+#include "ctimermappeduri.h"
+
+/* Used to send discover requests for service points in the network
+ @internalComponent
+ */
+class CUPnPSearch: public CBase
+{
+public:
+	static CUPnPSearch* NewL( RSubConnection& aSubConnection );
+	void SubmitRequestL( const RPnPParameterBundle& aServiceInfo );
+	void NotifyResultsL( RPnPParameterBundleBase& aBundle );
+	void CancelSearchL( const RPnPParameterBundle& aServiceInfo );
+	inline TBool DiscoverInProgress();
+	~CUPnPSearch();
+
+private:
+	CUPnPSearch( RSubConnection& aSubConnection );
+	void ConstructL();
+	void CancelSearchL(const TDesC8& aUri);
+	void CreateTimerEntryL( const TDesC8& aUri );
+	void MakeBundleAndNotifyL(CCallbackArgument* aCallArgument);
+	static TInt StopSearch( TAny* aPtr );
+
+	inline TInt AdjustedDelay(TInt aTime);
+	inline RPointerArray<CTimerMappedUri>& GetTimerArray();
+	inline MPnPObserver* Observer();
+	inline RPointerArray<CCallbackArgument>& GetArgumentArray();
+	inline void SetDiscoverProgress( TBool aValue);
+	CTimerMappedUri* iMappedUri;
+	RSubConnection& iSubConnection;
+	CDeltaTimer* iDeltaTimer;
+	MPnPObserver* iObserver;
+	RPointerArray<CTimerMappedUri> 		iTimerMappedArray;
+	RPointerArray<CCallbackArgument> 	iCallbackArray;
+	TDeltaTimerEntry* iEntry;
+	TBool iIsSearching;
+};
+
+/* Used to calculate the time in microseconds to set the timer entry.Also a little
+ of time is used extra to account for Intra process communication
+ @param aTime	The time for which the timer has to be set in seconds
+ @return The actual time in microseconds
+ */
+TInt CUPnPSearch::AdjustedDelay( TInt aTime )
+	{
+	const TUint KIntTime = 1000000 ;
+	const TUint KInternalIPCLag = 1;
+	aTime = ( aTime + KInternalIPCLag ) * KIntTime ;
+	return aTime;
+	}
+
+MPnPObserver* CUPnPSearch::Observer()
+	{
+	return iObserver;
+	}
+
+/* inline method to return the RPointerArray */
+RPointerArray<CTimerMappedUri>& CUPnPSearch::GetTimerArray()
+	{
+	return iTimerMappedArray;
+	}
+RPointerArray<CCallbackArgument>& CUPnPSearch::GetArgumentArray()
+	{
+	return iCallbackArray;
+	}
+
+TBool CUPnPSearch::DiscoverInProgress()
+	{
+	return iIsSearching;
+	}
+void CUPnPSearch::SetDiscoverProgress( TBool aValue)
+	{
+	iIsSearching = aValue;
+	}
+#endif /*CUPNPSEARCH_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpservicediscoveryimpl.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,78 @@
+// 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 __CUPNPPSERVICEDISCOVERYIMPL_H__
+#define __CUPNPPSERVICEDISCOVERYIMPL_H__
+#include <es_sock.h>
+#include <cpnpservicediscoverybase.h>
+
+#include "mupnpeventnotification.h"
+#include "cupnpeventnotifier.h"
+#include "cupnpsearch.h"
+#include "cupnpdescribe.h"
+#include "cupnpsubscribe.h"
+#include "cupnpregisternotify.h"
+
+
+//Connection Preference for RPnPDiscovery
+const TUint KDiscoveryConnPref = 51;
+const TInt KUPnPDiscoveryUid = 0x2001DC69;
+
+/* Body of RPnPServiceDiscovery class and calls the SubmitRequest and NotifyResults
+   of respective classes
+   @internalComponent
+ */
+class CUPnPServiceDiscoveryImpl : public CPnPServiceDiscoveryBase, public MUPnPEventNotification
+	{
+public:
+	static CUPnPServiceDiscoveryImpl* NewL();
+	~CUPnPServiceDiscoveryImpl ();
+		
+private:
+	// From CPnPServiceDiscoveryBase
+	TInt Construct( TUint aTierId);
+	void Discover ( const RPnPParameterBundle& aServiceInfo );
+	void Describe ( const RPnPParameterBundle& aServiceInfo );
+	void Subscribe ( const RPnPParameterBundle& aServiceInfo );
+	void RegisterNotify ( const RPnPParameterBundle& aServiceInfo );
+	void Cancel ( const RPnPParameterBundle& aServiceInfo );
+	TInt InitiateControl ( RControlChannel& /*aControlChannel*/, const TDesC8& aUri );
+
+private:
+	CUPnPServiceDiscoveryImpl ();
+
+	// From MUPnPEventNotification
+	void  OnNotificationL (TUint32);
+
+	void DiscoverL ( const RPnPParameterBundle& aServiceInfo );
+	void ProcessCancelL( const RPnPParameterBundle& aServiceInfo);
+	void RegisterNotifyL ( const RPnPParameterBundle& aServiceInfo );
+	void SubscribeL ( const RPnPParameterBundle& aServiceInfo );
+	void DescribeL ( const RPnPParameterBundle& aServiceInfo );
+	
+private:
+	RConnection 			iConnection;
+	RSubConnection 			iSubConnection;
+	RSocketServ 			iSocketServer;	
+	RHostResolver			iHostResolver;
+
+	CUPnPEventNotifier* 	iEventNotifier;
+	CUPnPSearch* 			iUPnPSearch;
+	CUPnPDescribe* 			iUPnPDescribe;
+	CUPnPSubscribe* 		iUPnPSubscribe;
+	CUPnPRegisterNotify* 	iUPnPRegister;
+	};
+
+#endif // __CUPNPPSERVICEDISCOVERYIMPL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpservicepublisherimpl.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,67 @@
+// 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 __CUPNPPSERVICEPUBLISHERIMPL_H__
+#define __CUPNPPSERVICEPUBLISHERIMPL_H__
+#include <es_sock.h>
+#include <connpref.h>
+#include <upnp/upnpconstants.h>
+#include <cpnpservicepublisherbase.h>
+
+#include "cupnppublisher.h"
+#include "cupnpeventnotifier.h"
+#include "cupnpeventhandler.h"
+#include "mupnpeventnotification.h"
+
+//Connection Preference for RPnPPublisher
+const TUint KPublishConnPref = 52;
+const TInt KUPnPPublisherUid = 0x2001DC6A;
+class CPnPParameterBundle;
+
+/* Body of RPnPServicePublisher class and calls the SubmitRequest and NotifyResults
+   of respective classes
+   @internalComponent
+ */
+class CUPnPServicePublisherImpl :public CPnPServicePublisherBase , public MUPnPEventNotification 
+	{
+public:
+	static CUPnPServicePublisherImpl* NewL();
+	~CUPnPServicePublisherImpl ( );
+		
+private:
+	TInt Construct ( TUint aTierId );
+	void Publish ( const RPnPParameterBundle& aServiceInfo );
+	void SendNotify ( const RPnPParameterBundle& aServiceInfo );
+	TInt InitiateControl ( RControlChannel& /*aControlChannel*/ );
+
+
+private:
+	CUPnPServicePublisherImpl ( );
+    void OnNotificationL(TUint32);
+
+	void PublishL ( const RPnPParameterBundle& aServiceInfo );
+	void SendNotifyL ( const RPnPParameterBundle& aServiceInfo );
+
+private:
+	RConnection 			iConnection;
+	RSubConnection 			iSubConnection;
+	CUPnPEventNotifier* 	iEventNotifier;
+	CUPnPPublisher*			iUPnPPublisher;
+	CUPnPEventHandler*		iUPnPEventHandler;
+	RSocketServ 			iSocketServer;
+	TBool					iAlreadyPublished;
+	};
+
+#endif // __CUPNPPSERVICEPUBLISHERIMPL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/cupnpsubscribe.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,84 @@
+// 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 __CUPNPSUBSCRIBE_H_
+#define __CUPNPSUBSCRIBE_H_
+
+#include <e32base.h>
+#include <e32math.h>
+#include <pnpparameterbundle.h>
+
+#include "cupnpelementarray.h"
+#include "ccallbackargument.h"
+#include "ctimermappeduri.h"
+
+/* This class is used to send subscribe requests to the service point.Also the
+   responses are conveyed back to the client code.
+   @internalComponent
+ */
+class CUPnPSubscribe: public CBase
+	{
+public:
+	static CUPnPSubscribe* NewL( RSubConnection& aSubConnection , RHostResolver& aResolver);
+	void SubmitRequestL( const RPnPParameterBundle& aServiceInfo );
+	void NotifyResultsL(TUint32 aFamilyId, RPnPParameterBundleBase& aBundle);
+	void CancelSubscribeL( const RPnPParameterBundle& aServiceInfo);
+	~CUPnPSubscribe();
+
+private:
+	void ConstructL();
+	CUPnPSubscribe ( RSubConnection& aSubConnection , RHostResolver& aResolver);
+	static TInt OnTimerExpiry( TAny* aPtr );
+	void CreateTimerEntryL(const TDesC8& aUri ,TInt aExpiryTime);
+	TInt AdjustedDelay(TInt aTime);
+	void MakeBundleAndNotifyL(MPnPObserver* aObserver, HBufC8* aUri);
+
+	inline CUPnPElementArray* ElementArrayHandle();
+	inline RPointerArray<CTimerMappedUri>& GetTimerArray();
+	inline RPointerArray<CCallbackArgument>& GetArgumentArray();
+
+private:
+	RSubConnection& iSubConnection;
+	CUPnPElementArray* iElementArray;
+	RPointerArray<CTimerMappedUri> 		iTimerMappedArray;
+	RPointerArray<CCallbackArgument> 	iCallbackArray;
+	
+	
+	TCallBack iCallBack;
+	TDeltaTimerEntry* iTimerEntry;
+	CDeltaTimer* iDeltaTimer;
+	RHostResolver&  iResolver;	
+	CTimerMappedUri* iMappedUri;
+	TBool iDuplicateStatus;
+	
+	};
+
+CUPnPElementArray* CUPnPSubscribe::ElementArrayHandle()
+	{
+	return iElementArray;
+	}
+
+/* inline method to return the RPointerArray */
+RPointerArray<CTimerMappedUri>& CUPnPSubscribe::GetTimerArray()
+	{
+	return iTimerMappedArray;
+	}
+RPointerArray<CCallbackArgument>& CUPnPSubscribe::GetArgumentArray()
+	{
+	return iCallbackArray;
+	}
+
+#endif /*CUPNPSUBSCRIPTION_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/mupnpeventnotification.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+// 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 __MUPNPEVENTNOTIFICATION_H_
+#define __MUPNPEVENTNOTIFICATION_H_
+#include <e32def.h>
+
+class MUPnPEventNotification
+	{
+public:
+	virtual void OnNotificationL(TUint32)=0;
+	};
+	
+#endif /*MUPNPEVENTNOTIFICATION_H_*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/pnputils.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,79 @@
+// 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 __PNPUTILS_H_
+#define __PNPUTILS_H_
+#include <e32base.h>
+#include <es_sock.h>
+#include <e32des8.h>
+#include <e32def.h>
+#include <uri8.h>
+#include <es_sock.h>
+#include <in_sock.h>
+
+/* Utilities class
+ @internalComponent
+ */
+class CUPnPUtils : public CBase
+	{
+
+public:
+	/*
+	 * Converts a RSubConParameterBundle to CSubConParameterBundle and vice-versa
+	 */ 
+	template <class T1 , class T2>
+	static TUint ReplicateToReverseBundle (const T1& aSrcBundle,T2& aTargetBundle);
+	
+	enum TClientDllPanic
+		{
+		EPnpServiceDiscoveryHandleNotOpen
+		};
+	enum TUriType
+		{
+		EService,
+		EDevice,
+		EAny
+		};
+	TUriType iUriType;
+	static void ResolveHostAddressL ( RHostResolver& aResolver,const TDesC8& aUri, TInetAddr& aSockAddr );
+	static TInt GenericUriValidity ( const TDesC8& aUri ,TUriType aType);
+
+private:
+	static const TUint KOffset=3;
+	static const TUint KIpv4MaxAddrSize = 20;
+	};
+	
+template <class T1 , class T2>
+TUint CUPnPUtils::ReplicateToReverseBundle (const T1& aSrcBundle,T2& aTargetBundle)
+
+	{
+	TUint length = aSrcBundle.Length();
+	RBuf8 serializedBuffer;
+	TUint err;
+	if((err=serializedBuffer.Create(length))!=KErrNone)
+		return err;
+	//Create a serailized version of the cscparambundle and store it in tempdata
+	if((err=aSrcBundle.Store(serializedBuffer))!=KErrNone)
+		return err;
+	//Deserialize tempData to rsubconparambundle	
+	if((err=aTargetBundle.Load(serializedBuffer))!=KErrNone)
+		return err;
+	serializedBuffer.Close();
+	return KErrNone;
+	}
+	
+
+
+#endif /*PNPUTILS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpparamset.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,711 @@
+// 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 __UPNPPARAMSET_H__
+#define __UPNPPARAMSET_H__
+
+#include <es_sock.h>
+#include <pnpextparameterfamily.h>
+#include <appprotintf/app_protintf_msgs.h>
+
+const TInt KUPnPParamsFactoryUid = 0x2000D05E;
+
+/**
+UPnP ParameterSet Family Identifiers.
+@publishedPartner
+@prototype
+*/
+enum TUPnPParamSetFamily
+	{
+	// Used by Control Point
+	EUPnPRegisterAnnouncementParamSet 	= 1,
+	EUPnPAbsenceAnnouncementParamSet 	= 2,
+	EUPnPPresenceAnnouncementParamSet	= 3,
+	EUPnPDiscoverRequestParamSet		= 4,
+	EUPnPDiscoverResponseParamSet		= 5,
+	//Do not use the 6 as it is used by family which carries implementation UID of SCPR.
+	EUPnPDescribeRequestParamSet		= 7,
+	EUPnPDescribeResponseParamSet		= 8,
+	EUPnPSubscribeRequestParamSet		= 9,
+	EUPnPSubscribeResponseParamSet		= 10,
+	EUPnPNotifyEventParamSet			= 11,
+	EUPnPCancelDiscoverParamSet			= 12,
+	EUPnPCancelDescribeParamSet			= 13,
+	EUPnPCancelSubscribeParamSet		= 14,
+	EUPnPCancelRegisterNotifyParamSet	= 15,
+	EUPnPRequestParamSet				= 16,
+	EUPnPResponseParamSet				= 17,
+
+	// Used by Service Point
+	EUPnPServiceRegisterParamSet		= 18,
+	EUPnPDeviceRegisterParamSet			= 19,
+	EUPnPServiceNotificationParamSet	= 20,
+	EUPnPServiceRefreshParamSet			= 21,
+	EUPnPPublishResponseParamSet		= 22,
+
+	//@internalTechnology
+	//@prototype
+	//Used by UPnP Server to clear responses handled to UPnP Client with GetParameters
+	EUPnPClearParamSet,
+	EUPnPDeviceRegisterParamSetBase,
+	EUPnPDeviceRegisterParamSetExt,
+	};
+
+/**
+class TUPnPEvent
+UPnPEvent class defines the reason code for an event callback.
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(TUPnPEvent)
+	{
+public:
+	/** Type of UPnP Event. */
+	enum TEventType
+	{
+		/** This signifies that the operation completed successfully. */
+		ESuccess,
+		/** This is a 'catch-all' for communicating failures. The actual error reason is
+			shown in error code. */
+		EFail,
+		/** This signifies a discovery search timeout */
+		EDiscoveryTimeout,
+		/** This signifies a subscription request timeout */
+		ESubscriptionTimeout
+	};
+
+public:
+	/** The event status. */
+	TInt iStatus;
+	/** The error code value. */
+	TInt iErrorCode;
+	};
+
+
+
+
+/**
+The base class for all UPnP ParamSet classes.
+
+@internalTechnology
+@prototype
+*/
+NONSHARABLE_CLASS (CUPnPParamSetBase) : public CSubConExtensionParameterSet
+	{
+	public:		
+		inline static CUPnPParamSetBase* NewL ( RParameterFamily& aFamily, TUPnPParamSetFamily aFamilyType );
+	protected:
+		inline CUPnPParamSetBase ();
+	};
+
+
+// -------------------------------------------------------------------
+
+/**
+Parameter set class containing a Uri. All UPnP Request ParamSet classes derive from this class.
+
+@internalTechnology
+@prototype
+*/
+NONSHARABLE_CLASS ( CUPnPRequestParamSetBase ) : public CUPnPParamSetBase
+	{
+	protected:
+		RBuf8 iUri;
+	public:
+		inline void SetUriL ( const TDesC8& aUri );
+		inline const TDesC8& Uri () const;
+	protected:
+		inline CUPnPRequestParamSetBase ();
+		inline ~CUPnPRequestParamSetBase ();
+	protected:
+		DATA_VTABLE
+	};
+
+// ----------------------------------------------------------------------
+
+/**
+Parameter set class containing a UPnP Event. All UPnP Response ParamSet classes derive from this class.
+
+@internalTechnology
+@prototype 
+*/
+NONSHARABLE_CLASS ( CUPnPResponseParamSetBase ) : public CUPnPRequestParamSetBase
+	{
+	protected:
+		TUPnPEvent iUPnPEvent;
+	public:
+		inline void SetUPnPEvent ( const TUPnPEvent& aEvent );
+		inline const TUPnPEvent& UPnPEvent () const;
+	protected:
+		inline CUPnPResponseParamSetBase ();
+	protected:
+		DATA_VTABLE
+	};
+
+// -------------------------------------------------------------------------
+
+/** UPnP Control Point ParameterSet classes. */
+
+/**
+Parameter set class for discovering services/devices.
+Calling client should set the ServiceType/DeviceType and maximum wait time.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPDiscoverRequestParamSet) : public CUPnPRequestParamSetBase
+	{
+	private:
+		TInt iTimeToDelayResponse;
+	public :
+		inline static CUPnPDiscoverRequestParamSet* NewL( RParameterFamily& aFamily );
+		inline void SetResponseTime(TInt aResponseTime);
+		inline TInt ResponseTime( ) const ;
+	protected:
+		DATA_VTABLE
+	};
+
+// ---------------------------------------------------------------------------
+
+/**
+Parameter set class for subscribing to remote service. Client should set the ServiceLocation and Duration
+of subscription.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPSubscribeRequestParamSet) : public CUPnPRequestParamSetBase
+	{
+protected:
+	TInt iTimeoutSeconds;
+	TAppProtAddr iRemoteHost;
+
+public:
+	inline static CUPnPSubscribeRequestParamSet* NewL( RParameterFamily& aFamily );
+	inline void SetDuration(TInt aDuration);
+	inline TInt Duration( ) const ;
+
+	//@internalTechnology
+	//@prototype
+	inline void SetRemoteHost( const TInetAddr& aHost );
+	//@internalTechnology
+	//@prototype 
+	inline const TAppProtAddr& RemoteHost ( ) const;
+protected:
+		DATA_VTABLE
+	};
+
+// ----------------------------------------------------------------------------
+
+/**
+Parameter set class for registering SSDP:Alive request of a service/device. Caller should send the
+ServiceType/DeviceType to register for announcements.
+
+@publishedPartner
+@prototype 
+*/
+NONSHARABLE_CLASS(CUPnPRegisterAnnouncementParamSet) : public CUPnPRequestParamSetBase
+	{
+	public:
+		TBool iRegister;
+		inline static CUPnPRegisterAnnouncementParamSet* NewL ( RParameterFamily& aFamily );
+		inline void SetRegisterVariable(TBool aValue);
+		inline TBool RegisterVariable();
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+
+/**
+Parameter set class for describe request. Caller should set the ServiceType/DeviceType to be described.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPDescribeRequestParamSet) : public CUPnPRequestParamSetBase
+	{
+	private:
+		TAppProtAddr iHostAddr;
+
+	public:
+		inline static CUPnPDescribeRequestParamSet* NewL ( RParameterFamily& aFamily );
+
+		//@internalTechnology
+		//@prototype
+		inline void SetRemoteHost( const TInetAddr& aHost );
+		//@internalTechnology
+		//@prototype
+		inline const TAppProtAddr& RemoteHost ( ) const;
+
+	protected:
+		DATA_VTABLE
+	};
+// -----------------------------------------------------------------------------
+/**
+Parameter set class for cancel discover request.
+@publishedPartner
+@prototype
+*/
+
+NONSHARABLE_CLASS(CUPnPCancelDiscoverParamSet) : public CUPnPRequestParamSetBase
+	{
+	public:		
+		inline static CUPnPCancelDiscoverParamSet* NewL( RParameterFamily& aFamily );
+
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+/**
+Parameter set class for cancel describe request.
+@publishedPartner
+@prototype
+*/
+
+NONSHARABLE_CLASS(CUPnPCancelDescribeParamSet) : public CUPnPRequestParamSetBase
+	{
+	public:
+		inline static CUPnPCancelDescribeParamSet* NewL( RParameterFamily& aFamily );
+
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+/**
+Parameter set class for cancel subscribe request.
+@publishedPartner
+@prototype
+*/
+
+NONSHARABLE_CLASS(CUPnPCancelSubscribeParamSet) : public CUPnPRequestParamSetBase
+	{
+	public:
+		inline static CUPnPCancelSubscribeParamSet* NewL( RParameterFamily& aFamily );
+
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+/**
+Parameter set class for cancel register notify request.
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPCancelRegisterNotifyParamSet) : public CUPnPRequestParamSetBase
+	{
+	public:
+		inline static CUPnPCancelRegisterNotifyParamSet* NewL( RParameterFamily& aFamily );
+
+	protected:
+		DATA_VTABLE
+	};
+
+// -----------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving the responses of discovery requests. Client can extract remote device
+information such as Device Location, Unique Service Name (USN) and Max age of the advertisement in
+callback function.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPDiscoverResponseParamSet) : public CUPnPResponseParamSetBase
+	{
+private:
+	TInt iExpiration;
+	RBuf8 iDeviceLocation;
+	RBuf8 iUSN;
+public :
+
+	inline TInt ExpiryTime ( ) const ;
+	inline const TDesC8& DeviceLocation ( ) const ;
+	inline const TDesC8& USN ( ) const ;
+
+	// Internal APIs
+	inline static CUPnPDiscoverResponseParamSet* NewL( RParameterFamily& aFamily );
+	inline void SetExpiryTime( TInt aExpiryTime );
+	inline void SetDeviceLocationL( const TDesC8& aDeviceLocation );
+	inline void SetUSNL( const TDesC8& aUSN );
+
+	// D'tor
+	inline ~CUPnPDiscoverResponseParamSet ();
+protected:
+		DATA_VTABLE
+	};
+
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving responses of describe requests. Client can extract the device description
+in callback function.
+
+@publishedPartner
+@prototype 
+*/
+NONSHARABLE_CLASS(CUPnPDescribeResponseParamSet) : public CUPnPResponseParamSetBase
+	{
+private:
+	RBuf8 iDescription;
+public:
+	inline const TDesC8& Description( ) const ;
+	inline static CUPnPDescribeResponseParamSet* NewL( RParameterFamily& aFamily );
+	inline void SetDescriptionL( const TDesC8& aDescription );
+	inline ~CUPnPDescribeResponseParamSet ();
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving response of subscription request. Calling client can extract the
+subscription status in callback function.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPSubscribeResponseParamSet) : public CUPnPResponseParamSetBase
+	{
+private:
+	TInt iTimeoutSeconds;
+public:
+	inline TInt GetTimerExpiry() const;
+	inline void SetTimerExpiry(TInt aExpiryTime);
+	inline static CUPnPSubscribeResponseParamSet* NewL( RParameterFamily& aFamily );
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving the event notification. Calling client can extract the
+notification information in callback function. If notification order is not matched an error code
+is returned to the client.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPNotifyEventParamSet) : public CUPnPResponseParamSetBase
+	{
+private:
+	RBuf8 iNotifyData;
+public:
+	inline const TDesC8& Notification( ) const ;
+	inline static CUPnPNotifyEventParamSet* NewL( RParameterFamily& aFamily );
+	inline void SetNotificationL ( const TDesC8& aNotification );
+	inline ~CUPnPNotifyEventParamSet ();
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving the SSDP:ByeBye message. Calling client can extract the
+published information in callback function.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPAbsenceAnnouncementParamSet) : public CUPnPResponseParamSetBase
+	{
+protected:
+	RBuf8 iUSN;
+public:
+	inline const TDesC8& USN( ) const ;
+	inline static CUPnPAbsenceAnnouncementParamSet* NewL( RParameterFamily& aFamily );
+	inline void SetUSNL(const TDesC8& aUSN);
+
+	// D'tor
+	inline ~CUPnPAbsenceAnnouncementParamSet ();
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/**
+Parameter set class for retrieving SSDP:Alive message. Calling client can extract the
+published information in callback function.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPPresenceAnnouncementParamSet) : public CUPnPAbsenceAnnouncementParamSet
+	{
+private:
+	TInt iExpiration;
+	RBuf8 iLocation;
+public:
+	inline TInt Duration( ) const ;
+	inline const TDesC8& ServiceLocation( ) const ;
+	// Internal APIs
+	inline static CUPnPPresenceAnnouncementParamSet* NewL( RParameterFamily& aFamily );
+	inline void SetDuration( TInt aDuration );
+	inline void SetServiceLocationL( const TDesC8& aServiceLocation );
+
+	// D'tor
+	inline ~CUPnPPresenceAnnouncementParamSet ();
+protected:
+		DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------
+
+/** UPnP Service Point ParameterSet classes. */
+
+/**
+Parameter set class for registering the service and publishing the service information. Service Client
+should set the following fields :
+
+CUPnPRequestParamSetBase::SetUriL 	ServiceType
+SetDeviceUidL						Root device uid
+SetCacheControlData					Max age of notification
+SetServiceDescriptionL				Scdp url (url for description)
+SetInitialMessageL 					Initial Eventing message ( This message is the same as the initial eventing message which is sent along with subscribe response
+										See UPnP Device Architecture 1.0 )
+
+Refer to UPnP Device Architecture 1.0
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS( CUPnPServiceRegisterParamSet ) : public CUPnPRequestParamSetBase
+	{
+
+	private:
+		RBuf8 iDeviceUid;
+		TInt  iCacheControl;
+		RBuf8 iServiceDescription;
+		RBuf8 iInitialEventMessage;
+		TInt iTimeOut;
+
+	public:
+		inline ~CUPnPServiceRegisterParamSet ();
+		inline static CUPnPServiceRegisterParamSet* NewL(RParameterFamily& aFamily);
+		inline void SetDeviceUidL(const TDesC8& aUSN);
+		inline void SetCacheControlData(TInt aCacheControlData);
+		inline void SetServiceDescriptionL(const TDesC8& aServiceDescription);
+		inline void SetInitialMessageL(const TDesC8& aInitialMessage);
+		inline void SetSubscriptionDuration(TInt aTimeOut);
+
+		inline const TDesC8& DeviceUid( ) const ;
+		inline TInt CacheControlData( ) const ;
+		inline const TDesC8& ServiceDescription( ) const ;
+		inline const TDesC8& InitialMessage() const;
+		inline TInt SubscriptionDuration( ) const;
+
+	protected:
+		DATA_VTABLE
+	};
+
+/** Parameter class to register Icon for embedded device.User should set the required parameters
+ SetMimeTypeL   Format of the Image
+ SetUrlL		Url to the Icon (Relative to Base Url)
+ SetWidth		Horizontal pixels
+ SetHeight		Vertical pixels
+ SetDepth		Color Depth
+ 
+ Refer to UPnP Device Architecture 1.0
+@publishedPartner
+@prototype
+*/
+class CUPnPIconParams: public CBase
+	{
+public:
+	inline static CUPnPIconParams* NewL();
+	inline ~CUPnPIconParams ();
+	
+	inline void SetMimeTypeL ( const TDesC8& aMimeType );
+	inline void SetUrlL ( const TDesC8& aUrl );
+	inline void SetWidth ( TInt  aWidth );
+	inline void SetHeight ( TInt aHeight );
+	inline void SetDepth ( TInt aDepth );
+	
+	inline const TDesC8& MimeType () const;
+	inline const TDesC8& Url () const;
+	inline TInt Width () const;
+	inline TInt Height () const;
+	inline TInt Depth () const;
+	
+private:
+	RBuf8	iMimeType;
+	RBuf8 	iUrl;
+	TInt	iWidth;
+	TInt	iHeight;
+	TInt	iDepth;
+	};
+
+typedef RPointerArray < CUPnPIconParams > CUPnPIconList;	
+
+/** Parameter set base class for registering the device.User should set the required parameters
+ SetCacheControlData   	Time for which notification is valid
+ SetParentDeviceUidL	If the device is an embedded device then its parent device should be specified here
+ SetFriendlyNameL		Friendly name ( length < 64 chars)
+ SetManufacturerL		Manufacturers name ( length < 64 chars)
+ SetManufactureUrlL		Manufacturer url(optional)
+ SetModelDescL			Short model description (optional ,length < 128 chars)
+ SetModelNameL			Model name ( length < 32 chars)
+ SetModelNumberL		Optional (length < 32 chars)
+ SetModelUriL			Web site for model ( optional )
+ SetPresentationL		This is the url of the  GUI of the service point if any provided
+ SetSerialNumberL		Serial Number (optional, length < 64 chars)
+ SetUDNL				Unique device name
+ SetUPCL				Universal product code ( optional, 12 digits)
+
+ Refer to UPnP Device Architecture 1.0
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS( CUPnPDeviceRegisterParamSetBase ) : public CUPnPRequestParamSetBase
+	{
+
+protected:
+	TInt  iCacheControl;
+	RBuf8 iParentDeviceUid;
+	RBuf8 iFriendlyName;
+	RBuf8 iManufacturer;
+	RBuf8 iManufacturerURL;
+	RBuf8 iModelDescription;
+	RBuf8 iModelName;
+	RBuf8 iModelNumber;
+	RBuf8 iModelURL;
+	RBuf8 iPresentationURL;
+	RBuf8 iSerialNumber;
+	RBuf8 iUDN;
+	RBuf8 iUPC;	
+
+protected:
+	inline CUPnPDeviceRegisterParamSetBase ();
+	inline ~CUPnPDeviceRegisterParamSetBase ();
+
+public:
+	inline void SetCacheControlData (TInt aCacheControlData);
+	inline void SetParentDeviceUidL ( const TDesC8& aParentDeviceUid );
+	inline void SetFriendlyNameL ( const TDesC8& aFriendlyName );
+	inline void SetManufacturerL ( const TDesC8& aManufacturer );
+	inline void SetManufactureUrlL ( const TDesC8& aManUrl );
+	inline void SetModelDescL ( const TDesC8& aModelDesc );
+	inline void SetModelNameL ( const TDesC8& aModelName );
+	inline void SetModelNumberL ( const TDesC8& aModelNumber );
+	inline void SetModelUriL ( const TDesC8& aModelUri );
+	inline void SetPresentationL ( const TDesC8& aPresentationUri );
+	inline void SetSerialNumberL ( const TDesC8& aSerialNumber );
+	inline void SetUDNL ( const TDesC8& aUri );
+	inline void SetUPCL ( const TDesC8& aUri );	
+
+	inline TInt CacheControlData( ) const ;
+	inline const TDesC8& ParentDeviceUid() const;
+	inline const TDesC8& FriendlyName() const;
+	inline const TDesC8& Manufacturer() const;
+	inline const TDesC8& ManufacturerUrl() const;
+	inline const TDesC8& ModelDesc() const;
+	inline const TDesC8& ModelName() const;
+	inline const TDesC8& ModelNumber() const;
+	inline const TDesC8& ModelUri() const;
+	inline const TDesC8& PresentationUri() const;
+	inline const TDesC8& SerialNumber() const;
+	inline const TDesC8& UDN() const;
+	inline const TDesC8& UPC() const;	
+		
+protected:
+	DATA_VTABLE
+	};
+
+/** Parameter set class for registering the device.User should set the required parameters
+ 	SetIconInfoL	Icons related to the embedded device
+ Refer to UPnP Device Architecture 1.0
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS( CUPnPDeviceRegisterParamSet ) : public CUPnPDeviceRegisterParamSetBase
+	{
+private:
+	CUPnPIconList iIconList;
+	
+public:	
+	inline static CUPnPDeviceRegisterParamSet* NewL(RParameterFamily& aFamily);	
+	inline ~CUPnPDeviceRegisterParamSet();
+		
+	inline void SetIconInfoL ( CUPnPIconParams* aIconInfo );
+	inline const CUPnPIconList& IconList () const;
+
+protected:
+	DATA_VTABLE	
+	};
+
+/**
+Parameter set class for sending event notifications.
+
+@publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPServiceNotificationParamSet) : public CUPnPRequestParamSetBase
+	{
+private:
+	RBuf8 iNotifyData;
+public:
+	inline const TDesC8& Notification( ) const ;
+	inline static CUPnPServiceNotificationParamSet* NewL( RParameterFamily& aFamily );
+	inline void SetNotificationL( const TDesC8& aNotification );
+	inline ~CUPnPServiceNotificationParamSet ();
+protected:
+		DATA_VTABLE
+	};
+
+/** Parameter set class for receiving success or failure for service or device
+  registration
+
+ @publishedPartner
+@prototype
+*/
+NONSHARABLE_CLASS(CUPnPPublishResponseParamSet) : public CUPnPResponseParamSetBase
+	{
+public:
+	inline static CUPnPPublishResponseParamSet* NewL( RParameterFamily& aFamily);
+protected:
+	DATA_VTABLE
+
+	};
+
+// -------------------------------------------------------------------------------------
+
+
+
+// @internalTechnology
+// @prototype
+// Used by UPnP Client/Server serailize Icon List
+NONSHARABLE_CLASS( CUPnPDeviceRegisterParamSetExt ) : public CUPnPDeviceRegisterParamSetBase
+	{
+private:
+	RBuf8 iIconData;	
+
+public:
+	inline ~CUPnPDeviceRegisterParamSetExt();
+	inline static CUPnPDeviceRegisterParamSetExt* NewL(RParameterFamily& aFamily);	
+
+	inline void SetIconDataL ( const TDesC8& aIconData );	
+	inline const TDesC8& IconData () const;
+	
+protected:
+	DATA_VTABLE
+	};
+// -------------------------------------------------------------------------------------	
+	
+
+#include "upnpparamset.inl"
+
+#endif // __UPNPPARAMSET_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpparamset.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,698 @@
+// 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:
+//
+
+CUPnPParamSetBase* CUPnPParamSetBase::NewL ( RParameterFamily& aFamily, TUPnPParamSetFamily aFamilyType )
+	{
+	STypeId typeId( KUPnPParamsFactoryUid, aFamilyType );
+	CUPnPParamSetBase* self = static_cast < CUPnPParamSetBase* > ( CSubConParameterSet::NewL( typeId ) );
+	TBool containerValue = aFamily.IsNull();
+	if(!containerValue)
+		{
+		CleanupStack::PushL ( self );
+		aFamily.AddParameterSetL ( self, RParameterFamily::ERequested );			
+		CleanupStack::Pop ( self );
+		}
+	return self;	
+	}
+CUPnPParamSetBase::CUPnPParamSetBase ()
+	{
+	}
+
+// ------------------------------------------
+CUPnPRequestParamSetBase::CUPnPRequestParamSetBase ()
+	{
+	}
+
+void CUPnPRequestParamSetBase::SetUriL ( const TDesC8& aUri )
+	{
+	iUri.Close ();
+	iUri.CreateL ( aUri );
+	}
+
+const TDesC8& CUPnPRequestParamSetBase::Uri () const
+	{
+	return iUri;
+	}
+
+CUPnPRequestParamSetBase::~CUPnPRequestParamSetBase ()
+	{
+	iUri.Close ();
+	}
+
+// -------------------------------------------------------------------------
+CUPnPResponseParamSetBase::CUPnPResponseParamSetBase ()
+	{
+	}
+
+void CUPnPResponseParamSetBase::SetUPnPEvent ( const TUPnPEvent& aEvent )
+	{
+	iUPnPEvent = aEvent;
+	}
+
+const TUPnPEvent& CUPnPResponseParamSetBase::UPnPEvent () const
+	{
+	return iUPnPEvent;		
+	}
+
+
+// -------------------------------------------------------------------------
+CUPnPDiscoverRequestParamSet* CUPnPDiscoverRequestParamSet::NewL ( RParameterFamily& aFamily )
+ 	{	 
+ 	return static_cast < CUPnPDiscoverRequestParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPDiscoverRequestParamSet ) );
+ 	}
+
+void CUPnPDiscoverRequestParamSet::SetResponseTime(TInt aResponseTime)
+	{
+	iTimeToDelayResponse = aResponseTime;
+	}
+
+TInt CUPnPDiscoverRequestParamSet::ResponseTime( ) const
+	{
+	return iTimeToDelayResponse;
+	}
+
+// ----------------------------------------------------------------------------
+
+CUPnPSubscribeRequestParamSet* CUPnPSubscribeRequestParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPSubscribeRequestParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPSubscribeRequestParamSet ) );
+	}
+
+void CUPnPSubscribeRequestParamSet::SetDuration(TInt aDuration)
+	{
+	iTimeoutSeconds = aDuration;
+	}
+
+
+TInt CUPnPSubscribeRequestParamSet::Duration( ) const
+	{
+	return iTimeoutSeconds;
+	}
+
+void CUPnPSubscribeRequestParamSet::SetRemoteHost( const TInetAddr& aHost )
+	{
+	iRemoteHost.iAddr = aHost.Address();
+	iRemoteHost.iPort = aHost.Port();
+	}
+
+const TAppProtAddr& CUPnPSubscribeRequestParamSet::RemoteHost( ) const
+	{
+	return iRemoteHost;
+	}
+	
+// ----------------------------------------------------------------------------
+
+CUPnPRegisterAnnouncementParamSet* CUPnPRegisterAnnouncementParamSet::NewL ( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPRegisterAnnouncementParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPRegisterAnnouncementParamSet ) );
+	}
+
+void CUPnPRegisterAnnouncementParamSet::SetRegisterVariable(TBool aValue)
+	{
+	iRegister=aValue;
+	}
+
+TBool CUPnPRegisterAnnouncementParamSet::RegisterVariable()
+	{
+	return iRegister;
+	}
+// -----------------------------------------------------------------------------
+
+CUPnPDescribeRequestParamSet* CUPnPDescribeRequestParamSet::NewL ( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPDescribeRequestParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPDescribeRequestParamSet ) );
+	}
+
+void CUPnPDescribeRequestParamSet::SetRemoteHost( const TInetAddr& aHost )
+	{	
+	iHostAddr.iAddr = aHost.Address();
+	iHostAddr.iPort = aHost.Port();
+	}
+
+const TAppProtAddr& CUPnPDescribeRequestParamSet::RemoteHost( ) const
+	{
+	return iHostAddr;
+	}
+	
+
+// -----------------------------------------------------------------------------
+
+CUPnPCancelDiscoverParamSet* CUPnPCancelDiscoverParamSet::NewL ( RParameterFamily& aFamily)
+	{
+	return static_cast < CUPnPCancelDiscoverParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPCancelDiscoverParamSet ) );
+	}
+// -----------------------------------------------------------------------------
+
+CUPnPCancelDescribeParamSet* CUPnPCancelDescribeParamSet::NewL ( RParameterFamily& aFamily)
+	{
+	return static_cast < CUPnPCancelDescribeParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPCancelDescribeParamSet ) );
+	}
+
+// -----------------------------------------------------------------------------
+CUPnPCancelSubscribeParamSet* CUPnPCancelSubscribeParamSet::NewL ( RParameterFamily& aFamily)
+	{
+	return static_cast < CUPnPCancelSubscribeParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPCancelSubscribeParamSet ) );
+	}
+
+// -----------------------------------------------------------------------------
+CUPnPCancelRegisterNotifyParamSet* CUPnPCancelRegisterNotifyParamSet::NewL ( RParameterFamily& aFamily)
+	{
+	return static_cast < CUPnPCancelRegisterNotifyParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPCancelRegisterNotifyParamSet ) );
+	}
+// -----------------------------------------------------------------------------
+CUPnPDiscoverResponseParamSet* CUPnPDiscoverResponseParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPDiscoverResponseParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPDiscoverResponseParamSet ) );
+	}
+
+// D'tor
+CUPnPDiscoverResponseParamSet::~CUPnPDiscoverResponseParamSet ()
+	{
+	iDeviceLocation.Close ();
+	iUSN.Close ();
+	}
+
+void CUPnPDiscoverResponseParamSet::SetExpiryTime( TInt aExpiryTime )
+	{
+	iExpiration = aExpiryTime;
+	}
+
+void CUPnPDiscoverResponseParamSet::SetDeviceLocationL( const TDesC8& aDeviceLocation )
+	{
+	iDeviceLocation.Close ();
+	iDeviceLocation.CreateL ( aDeviceLocation );
+	}
+
+void CUPnPDiscoverResponseParamSet::SetUSNL( const TDesC8& aUSN )
+	{
+	iUSN.Close ();
+	iUSN.CreateL ( aUSN );
+	}
+
+TInt CUPnPDiscoverResponseParamSet::ExpiryTime( ) const
+	{
+	return iExpiration;
+	}
+
+const TDesC8& CUPnPDiscoverResponseParamSet::DeviceLocation( ) const
+	{
+	return iDeviceLocation;
+	}
+
+const TDesC8& CUPnPDiscoverResponseParamSet::USN( ) const
+	{
+	return iUSN;
+	}
+
+// -----------------------------------------------------------------------------
+CUPnPDescribeResponseParamSet* CUPnPDescribeResponseParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPDescribeResponseParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPDescribeResponseParamSet ) );
+	}
+CUPnPDescribeResponseParamSet::~CUPnPDescribeResponseParamSet ()
+	{
+	iDescription.Close ();
+	}
+
+void CUPnPDescribeResponseParamSet::SetDescriptionL( const TDesC8& aDescription )
+	{
+	iDescription.Close ();
+	iDescription.CreateL ( aDescription );
+	}
+
+const TDesC8& CUPnPDescribeResponseParamSet::Description( ) const
+	{
+	return iDescription;
+	}	
+
+// -----------------------------------------------------------------------------
+CUPnPSubscribeResponseParamSet* CUPnPSubscribeResponseParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPSubscribeResponseParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPSubscribeResponseParamSet ) );
+	}
+TInt CUPnPSubscribeResponseParamSet::GetTimerExpiry() const
+	{
+	return iTimeoutSeconds;
+	}
+
+void CUPnPSubscribeResponseParamSet::SetTimerExpiry( TInt aExpiryTime )
+	{
+	iTimeoutSeconds = aExpiryTime;
+	}
+
+// -------------------------------------------------------------------------------------
+CUPnPNotifyEventParamSet* CUPnPNotifyEventParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPNotifyEventParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPNotifyEventParamSet ) );
+	}
+void CUPnPNotifyEventParamSet::SetNotificationL ( const TDesC8& aNotification )
+	{
+	iNotifyData.Close ();
+	iNotifyData.CreateL ( aNotification );
+	}
+
+CUPnPNotifyEventParamSet::~CUPnPNotifyEventParamSet ()
+	{
+	iNotifyData.Close ();
+	}
+
+
+const TDesC8& CUPnPNotifyEventParamSet::Notification( ) const
+	{
+	return iNotifyData;
+	}
+
+// -------------------------------------------------------------------------------------
+CUPnPAbsenceAnnouncementParamSet* CUPnPAbsenceAnnouncementParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPAbsenceAnnouncementParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPAbsenceAnnouncementParamSet ) );
+	}
+void CUPnPAbsenceAnnouncementParamSet::SetUSNL(const TDesC8& aUSN)
+	{
+	iUSN.Close ();
+	iUSN.CreateL ( aUSN );
+	}
+
+CUPnPAbsenceAnnouncementParamSet::~CUPnPAbsenceAnnouncementParamSet ()
+	{
+	iUSN.Close ();
+	}
+
+const TDesC8& CUPnPAbsenceAnnouncementParamSet::USN( ) const
+	{
+	return iUSN;
+	}
+
+// -------------------------------------------------------------------------------------
+
+CUPnPPresenceAnnouncementParamSet* CUPnPPresenceAnnouncementParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPPresenceAnnouncementParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPPresenceAnnouncementParamSet ) );
+	}
+
+CUPnPPresenceAnnouncementParamSet::~CUPnPPresenceAnnouncementParamSet ()
+	{
+	iLocation.Close ();
+	}
+
+void CUPnPPresenceAnnouncementParamSet::SetDuration( TInt aDuration )
+	{
+	iExpiration = aDuration;
+	}
+
+void CUPnPPresenceAnnouncementParamSet::SetServiceLocationL( const TDesC8& aServiceLocation )
+	{
+	iLocation.Close ();
+	iLocation.CreateL ( aServiceLocation );
+	}
+
+TInt CUPnPPresenceAnnouncementParamSet::Duration( ) const
+	{
+	return iExpiration;
+	}
+
+const TDesC8& CUPnPPresenceAnnouncementParamSet::ServiceLocation( ) const 
+	{
+	return iLocation;
+	}
+
+// -------------------------------------------------------------------------------------
+
+CUPnPServiceRegisterParamSet::~CUPnPServiceRegisterParamSet ()
+	{
+	iDeviceUid.Close ();
+	iServiceDescription.Close ();
+	iInitialEventMessage.Close();
+	}
+
+CUPnPServiceRegisterParamSet* CUPnPServiceRegisterParamSet::NewL( RParameterFamily& aFamily )
+	{
+	return static_cast < CUPnPServiceRegisterParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPServiceRegisterParamSet ) );
+	}
+void CUPnPServiceRegisterParamSet::SetDeviceUidL(const TDesC8& aUSN)
+	{
+	iDeviceUid.Close ();
+	iDeviceUid.CreateL ( aUSN );
+	}
+
+void CUPnPServiceRegisterParamSet::SetCacheControlData(TInt aCacheControlData)
+	{
+	iCacheControl = aCacheControlData;
+	}
+
+void CUPnPServiceRegisterParamSet::SetServiceDescriptionL(const TDesC8& aServiceDescription)
+	{
+	iServiceDescription.Close ();
+	iServiceDescription.CreateL ( aServiceDescription );
+	}
+void CUPnPServiceRegisterParamSet::SetInitialMessageL( const TDesC8& aInitialMessage)
+	{
+	iInitialEventMessage.Close();
+	iInitialEventMessage.CreateL( aInitialMessage );
+	}
+
+
+void CUPnPServiceRegisterParamSet::SetSubscriptionDuration(TInt aTimeOut)
+	{
+	iTimeOut = aTimeOut;
+	}
+
+
+const TDesC8& CUPnPServiceRegisterParamSet::DeviceUid( ) const
+	{
+	return iDeviceUid;
+	}
+
+
+TInt CUPnPServiceRegisterParamSet::CacheControlData( ) const
+	{
+	return iCacheControl;
+	}
+
+const TDesC8& CUPnPServiceRegisterParamSet::ServiceDescription( ) const
+	{
+	return iServiceDescription;
+	}
+
+const TDesC8& CUPnPServiceRegisterParamSet::InitialMessage( ) const
+	{
+	return iInitialEventMessage;
+	}
+
+TInt CUPnPServiceRegisterParamSet::SubscriptionDuration() const
+	{
+	return iTimeOut;
+	}
+// ----------------------------------------------------------------------------
+
+CUPnPIconParams* CUPnPIconParams::NewL ()
+	{
+	return new ( ELeave ) CUPnPIconParams;
+	}
+	
+CUPnPIconParams::~CUPnPIconParams ()
+	{
+	iMimeType.Close ();
+	iUrl.Close ();
+	}
+	
+void CUPnPIconParams::SetMimeTypeL ( const TDesC8& aMimeType )
+	{
+	iMimeType.Close ();
+	iMimeType.CreateL ( aMimeType );
+	}
+
+void CUPnPIconParams::SetUrlL ( const TDesC8& aUrl )
+	{
+	iUrl.Close ();
+	iUrl.CreateL ( aUrl );
+	}
+	
+void CUPnPIconParams::SetWidth ( TInt aWidth )
+	{
+	iWidth = aWidth;
+	}
+	
+void CUPnPIconParams::SetHeight ( TInt aHeight )
+	{
+	iHeight = aHeight;
+	}
+	
+void CUPnPIconParams::SetDepth ( TInt aDepth )
+	{
+	iDepth = aDepth;
+	}
+	
+const TDesC8& CUPnPIconParams::MimeType () const
+	{
+	return iMimeType;
+	}
+
+const TDesC8& CUPnPIconParams::Url () const
+	{
+	return iUrl;
+	}
+	
+TInt CUPnPIconParams::Width () const
+	{
+	return iWidth;
+	}
+
+TInt CUPnPIconParams::Height () const
+	{
+	return iHeight;
+	}
+
+TInt CUPnPIconParams::Depth () const
+	{
+	return iDepth;
+	}
+
+// ----------------------------------------------------------------------------
+
+CUPnPDeviceRegisterParamSetBase::CUPnPDeviceRegisterParamSetBase ()
+	{
+	}
+
+CUPnPDeviceRegisterParamSetBase::~CUPnPDeviceRegisterParamSetBase()
+	{
+	iParentDeviceUid.Close();
+	iFriendlyName.Close();
+	iManufacturer.Close();
+	iManufacturerURL.Close();
+	iModelDescription.Close();
+	iModelName.Close();
+	iModelNumber.Close();
+	iModelURL.Close();
+	iPresentationURL.Close();
+	iSerialNumber.Close();
+	iUDN.Close();
+	iUPC.Close();
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetCacheControlData(TInt aCacheControlData)
+	{
+	iCacheControl = aCacheControlData;
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetParentDeviceUidL( const TDesC8& aParentDeviceUid )
+	{
+	iParentDeviceUid.Close();
+	iParentDeviceUid.CreateL( aParentDeviceUid );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetFriendlyNameL ( const TDesC8& aFriendlyName )
+	{
+	iFriendlyName.Close();
+	iFriendlyName.CreateL( aFriendlyName );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetManufacturerL ( const TDesC8& aManufacturer )
+	{
+	iManufacturer.Close();
+	iManufacturer.CreateL( aManufacturer );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetManufactureUrlL ( const TDesC8& aManUrl )
+	{
+	iManufacturerURL.Close();
+	iManufacturerURL.CreateL( aManUrl );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetModelDescL ( const TDesC8& aModelDesc )
+	{
+	iModelDescription.Close();
+	iModelDescription.CreateL( aModelDesc );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetModelNameL ( const TDesC8& aModelName )
+	{
+	iModelName.Close();
+	iModelName.CreateL( aModelName );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetModelNumberL ( const TDesC8& aModelNumber )
+	{
+	iModelNumber.Close();
+	iModelNumber.CreateL( aModelNumber );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetModelUriL ( const TDesC8& aModelUri )
+	{
+	iModelURL.Close();
+	iModelURL.CreateL( aModelUri );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetPresentationL ( const TDesC8& aPresentationUri )
+	{
+	iPresentationURL.Close();
+	iPresentationURL.CreateL( aPresentationUri );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetSerialNumberL ( const TDesC8& aSerialNumber )
+	{
+	iSerialNumber.Close();
+	iSerialNumber.CreateL( aSerialNumber );
+	}
+
+
+void CUPnPDeviceRegisterParamSetBase::SetUDNL ( const TDesC8& aUri )
+	{
+	iUDN.Close();
+	iUDN.CreateL( aUri );
+	}
+
+void CUPnPDeviceRegisterParamSetBase::SetUPCL ( const TDesC8& aUri )
+	{
+	iUPC.Close();
+	iUPC.CreateL( aUri );
+	}
+	
+TInt CUPnPDeviceRegisterParamSetBase::CacheControlData( ) const
+	{
+	return iCacheControl;
+	}
+	
+const TDesC8& CUPnPDeviceRegisterParamSetBase::ParentDeviceUid() const
+	{
+	return iParentDeviceUid;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::FriendlyName() const
+	{
+	return iFriendlyName;
+	}
+const TDesC8& CUPnPDeviceRegisterParamSetBase::Manufacturer() const
+	{
+	return iManufacturer;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::ManufacturerUrl() const
+	{
+	return iManufacturerURL;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::ModelDesc() const
+	{
+	return iModelDescription;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::ModelName() const
+	{
+	return iModelName;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::ModelNumber() const
+	{
+	return iModelNumber;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::ModelUri() const
+	{
+	return iModelURL;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::PresentationUri() const
+	{
+	return iPresentationURL;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::SerialNumber() const
+	{
+	return iSerialNumber;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::UDN() const
+	{
+	return iUDN;
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetBase::UPC() const
+	{
+	return iUPC;
+	}	
+
+// ----------------------------------------------------------------------------
+CUPnPDeviceRegisterParamSet* CUPnPDeviceRegisterParamSet::NewL(RParameterFamily& aFamily)
+	{
+	return static_cast < CUPnPDeviceRegisterParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPDeviceRegisterParamSet ) );
+	}
+
+CUPnPDeviceRegisterParamSet::~CUPnPDeviceRegisterParamSet()
+	{
+	iIconList.ResetAndDestroy();
+	}
+
+void CUPnPDeviceRegisterParamSet::SetIconInfoL ( CUPnPIconParams* aIconInfo )
+	{
+	iIconList.Append ( aIconInfo );
+	}
+
+const CUPnPIconList& CUPnPDeviceRegisterParamSet::IconList () const
+	{
+	return iIconList;
+	}
+
+// ----------------------------------------------------------------------------
+CUPnPDeviceRegisterParamSetExt* CUPnPDeviceRegisterParamSetExt::NewL(RParameterFamily& aFamily)
+	{
+	return static_cast < CUPnPDeviceRegisterParamSetExt* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPDeviceRegisterParamSetExt ) );
+	}
+
+CUPnPDeviceRegisterParamSetExt::~CUPnPDeviceRegisterParamSetExt()
+	{
+	iIconData.Close ();
+	}
+
+void CUPnPDeviceRegisterParamSetExt::SetIconDataL ( const TDesC8& aIconData )
+	{
+	iIconData.Close ();
+	iIconData.CreateL ( aIconData );
+	}
+
+const TDesC8& CUPnPDeviceRegisterParamSetExt::IconData () const
+	{
+	return iIconData;
+	}
+
+// ----------------------------------------------------------------------------
+CUPnPServiceNotificationParamSet* CUPnPServiceNotificationParamSet::NewL(RParameterFamily& aFamily)
+	{
+	return static_cast < CUPnPServiceNotificationParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPServiceNotificationParamSet ) );
+	}
+
+void CUPnPServiceNotificationParamSet::SetNotificationL ( const TDesC8& aNotification )
+	{
+	iNotifyData.Close ();
+	iNotifyData.CreateL ( aNotification );
+	}
+
+CUPnPServiceNotificationParamSet::~CUPnPServiceNotificationParamSet ()
+	{
+	iNotifyData.Close ();
+	}
+
+
+const TDesC8& CUPnPServiceNotificationParamSet::Notification( ) const
+	{
+	return iNotifyData;
+	}
+
+// -------------------------------------------------------------------------------------
+
+CUPnPPublishResponseParamSet* CUPnPPublishResponseParamSet::NewL(RParameterFamily& aFamily)
+	{
+	return static_cast < CUPnPPublishResponseParamSet* > ( CUPnPParamSetBase::NewL( aFamily, EUPnPPublishResponseParamSet ) );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpparamsextfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,30 @@
+// 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 __UPNPPARAMSEXTFACTORY_H__
+#define __UPNPPARAMSEXTFACTORY_H__
+
+#include <e32base.h>
+
+class CUPnPParamSetBase;
+
+class CUPnPParamsExtFactory : public CBase
+{
+	public:
+	static CUPnPParamSetBase* NewL ( TAny* aConstructionParams );
+};
+
+#endif // __UPNPPARAMSEXTFACTORY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpsubconnevents.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+// 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 __UPNPSUBCONNEVENTS_H__
+#define __UPNPSUBCONNEVENTS_H__
+
+#include <es_sock.h>
+
+// UID for UPnP Sub Connection Events Family
+const TInt KUPnPSubConnEventsUid = 0x2000D05F;
+const TUint32 KUPnPSubConnEvent =  0x1;
+
+class CUPnPSubConnEvent : public CSubConNotificationEvent
+	{
+	public:
+		inline static CUPnPSubConnEvent* NewL();
+		inline TUint32 GetFamily() const;
+		inline void SetFamily(TUint32 aFamily);	
+		inline static void CleanupSubConnEvent( TAny* aAny );
+	private:			
+		TUint32 iFamilyId;
+	protected:
+		DATA_VTABLE
+	};
+
+#include "upnpsubconnevents.inl"
+
+#endif // __UPNPSUBCONNEVENTS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpsubconnevents.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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:
+//
+
+CUPnPSubConnEvent* CUPnPSubConnEvent::NewL()
+	{
+	STypeId typeId(KUPnPSubConnEventsUid, KUPnPSubConnEvent);
+	return static_cast<CUPnPSubConnEvent*>(CSubConNotificationEvent::NewL(typeId));
+	}
+		
+TUint32 CUPnPSubConnEvent::GetFamily() const
+	{
+	return iFamilyId;
+	}
+
+void CUPnPSubConnEvent::SetFamily(TUint32 aFamilyId)
+	{
+	iFamilyId = aFamilyId;
+	}
+	
+void CUPnPSubConnEvent::CleanupSubConnEvent ( TAny* aAny )
+	{
+	CUPnPSubConnEvent* event = (CUPnPSubConnEvent*)aAny;
+	delete event;
+	}
+	
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/upnpsubconneventsfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+// 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 __UPNPSUBCONNEVENTSFACTORY_H__
+#define __UPNPSUBCONNEVENTSFACTORY_H__
+
+#include <es_sock.h>
+
+class CUPnPSubConnEventsFactory : public CBase
+	{	
+	public:
+		static CSubConNotificationEvent* NewL (TAny* aConstructionParams);
+	};
+
+#endif // __UPNPSUBCONNEVENTSFACTORY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/2000D05D.rss	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,76 @@
+// 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:
+// @file 2000D05D.RSS
+// Registry info for the UPnP Sub-Connection Extension Parameters Plugin
+// 
+//
+
+#include <ecom/registryinfo.rh>
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x2000D05D;
+interfaces =
+    {
+    INTERFACE_INFO
+        {
+        interface_uid = 0x10204303;
+        implementations =
+            {
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D05E;
+                version_no = 1;
+                display_name = "UPnP Sub-Connection Extension Parameter Set Factory";
+                default_data = "text/wml";
+                }
+            };
+        },
+    INTERFACE_INFO
+        {
+        interface_uid = 0x10204305;
+        implementations =
+            {
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D05F;
+                version_no = 1;
+                display_name = "UPnP Sub-Connection Events Factory";
+                default_data = "text/wml";
+                }
+            };
+        },
+    INTERFACE_INFO
+        {
+        interface_uid = 0x2000D060;
+        implementations =
+            {
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2001DC69;
+                version_no = 1;
+                display_name = "UPnP Discovery";
+                default_data = "536924244/Client";
+                },
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2001DC6A;
+                version_no = 1;
+                display_name = "UPnP Publish";
+                default_data = "536924244/Server";
+                }
+            };
+        }
+   };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/ccallbackargument.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+// 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 "ccallbackargument.h"
+
+CCallbackArgument* CCallbackArgument::NewL( TAny* aThis,const TDesC8& aUri )
+	{
+	CCallbackArgument* callArgument = new (ELeave )CCallbackArgument(aThis);
+	CleanupStack::PushL(callArgument);
+	callArgument->ConstructL(aUri);
+	CleanupStack::Pop(1);
+	return callArgument;
+	}
+CCallbackArgument::CCallbackArgument( TAny* aThis):iThisPointer(aThis)
+	{
+	}
+
+CCallbackArgument::~CCallbackArgument()
+	{
+	iUri.Close();
+	}
+
+void CCallbackArgument::ConstructL(const TDesC8& aUri )
+	{
+	iUri.Close();
+	iUri.CreateL(aUri);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/ccontrolchannel.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,258 @@
+// 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 "ccontrolchannel.h"
+#include <es_sock.h>
+#include <e32const.h>
+#include <upnpconstants.h>
+
+CControlChannelHandler::CControlChannelHandler ( RSocket &aSocket, TBool aChannelType )
+:CActive ( EPriorityNormal ), iSocket ( aSocket ), iChannelType ( aChannelType )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+TInt CControlChannelHandler::RunError ( TInt aError )
+	{
+	User::RequestComplete ( iChannelStatus, aError );
+	return KErrNone;	
+	}
+// -------------------------------------------------------------
+CControlChannelReader* CControlChannelReader::NewL ( RSocket& aSocket, TBool aChannelType )
+	{
+	return new ( ELeave ) CControlChannelReader ( aSocket, aChannelType );
+	}
+		
+CControlChannelReader::CControlChannelReader ( RSocket& aSocket, TBool aChannelType )
+	: CControlChannelHandler ( aSocket, aChannelType )
+	{
+	}
+
+CControlChannelReader::~CControlChannelReader ()
+	{
+	Cancel ();	
+	}
+	
+void CControlChannelReader::Read ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	if ( iChannelType == EFalse )
+		{	
+		__ASSERT_DEBUG ( !aMessage.IsDirty (), User::Panic ( KUPnPControlChannel, KErrInUse ) );
+		}
+		
+	iMessage 		= &aMessage;
+	iChannelStatus 	= &aStatus;	
+	*iChannelStatus = KRequestPending;
+	
+	iSocket.RecvOneOrMore ( iMessage->MessagePtr(), 0, iStatus, iBytesReceived );
+	SetActive ();
+	}
+
+void CControlChannelReader::RunL ()
+	{
+	User::LeaveIfError ( iStatus.Int() );	
+	TPtrC8 buffer ( iMessage->MessagePtr() );
+	TInt lenToSkip = 0;
+	if ( iDataLength == 0 )  // ie; first message
+		{
+		// We should have more than 4 bytes ( ie; the identifier, which is of TUint,
+		// size. here, sizeof (TUint) )
+		__ASSERT_DEBUG ( buffer.Length () > sizeof(TUint), User::Invariant() );
+		
+		// Extract the first 4 bytes. we will have our identifier with it.
+		TLex8 parser ( buffer );
+		TUint id = 0;
+		User::LeaveIfError ( parser.Val ( id, EDecimal ) );
+		iMessage->SetId( id );
+		lenToSkip = sizeof (TUint);
+		
+		// Check how we are going to end with the message. checking the TControlMessage::MaxLength
+		// or by explicitly specifying it.
+		
+		// Get the Maxlength and set it to the iMessage
+		TInt maxLen = 0;
+		User::LeaveIfError ( iSocket.GetOpt ( KCHMaxRecvLength, KCHOptionLevel, maxLen ) ); 
+		iMessage->SetMaxLength ( maxLen );
+		}
+	TPtrC8 bufferToCopy ( buffer.Ptr() + lenToSkip, buffer.Length() - lenToSkip );
+	iMessage->MessagePtr().Copy ( bufferToCopy );
+	iDataLength += bufferToCopy.Length ();
+	TInt maxLen = iMessage->MaxLength ();
+	if ( maxLen == KErrUnknown )
+		{
+		// We have to issue a GetOpt to see whether we complete with the message.
+		TBool last = EFalse;
+		User::LeaveIfError ( iSocket.GetOpt ( KCHLastMessage, KCHOptionLevel, last ) );
+		if ( last )
+			iMessage->SetLast ();
+		}
+	else
+		{
+		if ( iDataLength == maxLen )
+			{
+			// We completed with the message. Set the message end flag as ETrue
+			// and reset the iRecvLength
+			iDataLength = 0;
+			iMessage->SetLast ();
+			}
+		}
+		
+	if ( iMessage->IsLast () && iChannelType == EFalse )
+		{
+		// client usage is done with the current control message
+		// We have to set a dirty bit as well for not reusing this message again
+		iMessage->SetDirty ();
+		}
+	
+	User::RequestComplete ( iChannelStatus, KErrNone );
+	}
+	
+void CControlChannelReader::DoCancel ()
+	{
+	iSocket.CancelRecv ();
+	User::RequestComplete ( iChannelStatus, KErrCancel );	
+	}
+
+// ---------------------------------------------------------------
+	
+CControlChannelWriter* CControlChannelWriter::NewL ( RSocket& aSocket, TBool aChannelType )
+	{
+	return new ( ELeave ) CControlChannelWriter ( aSocket, aChannelType );
+	}
+		
+CControlChannelWriter::CControlChannelWriter ( RSocket& aSocket, TBool aChannelType )
+	: CControlChannelHandler ( aSocket, aChannelType)
+	{
+	}
+
+CControlChannelWriter::~CControlChannelWriter ()
+	{
+	Cancel ();
+	}	
+	  
+void CControlChannelWriter::Write ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	if ( iChannelType )
+		{
+		__ASSERT_DEBUG ( !aMessage.IsDirty (), User::Panic ( KUPnPControlChannel, KErrInUse ) );
+		}
+		
+	iMessage 		= &aMessage;
+	iChannelStatus 	=  &aStatus;	
+	*iChannelStatus = KRequestPending;
+	
+	if ( iMessage->Id () == 0 )
+		{
+		// Message ID is not set. Typically when we do the first send after connect 
+		// ie; Client side RControlChannel operation.
+		iMessage->SetId ( iSocket.SubSessionHandle () );							
+		}
+
+	if ( iMessage->MaxLength() != KErrUnknown )
+		{
+		TCHMessageOption option ( iMessage->Id (), iMessage->MaxLength () );
+		TPckg < TCHMessageOption > optionBuf ( option );
+		// Set the total size if set in the TControlMessage
+		iSocket.SetOpt ( KCHMaxRecvLength, KCHOptionLevel, optionBuf );		
+		}
+	
+	if ( iMessage->IsLast () && iChannelType )
+		{
+		// server usage is done with the current control message
+		// We have to set a dirty bit as well for not reusing this message again
+		iMessage->SetDirty ();
+		}
+		
+	iSocket.Send ( iMessage->MessageDes(), iMessage->Id(), iStatus );
+	SetActive ();
+	}
+
+void CControlChannelWriter::RunL ()
+	{
+	User::LeaveIfError ( iStatus.Int() );	
+	if ( iMessage->MaxLength() == KErrUnknown && iMessage->IsLast () )
+		{
+		TCHMessageOption option ( iMessage->Id (), iMessage->IsLast () );
+		TPckg < TCHMessageOption > optionBuf ( option );
+
+		// SetOpt to know whether we are sending the last message
+		User::LeaveIfError ( iSocket.SetOpt( KCHLastMessage, KCHOptionLevel, optionBuf ) );
+		}
+	
+	User::RequestComplete ( iChannelStatus, KErrNone );
+	}
+
+void CControlChannelWriter::DoCancel ()
+	{
+	iSocket.CancelSend ();
+	User::RequestComplete ( iChannelStatus, KErrCancel );
+	}
+
+// ----------------------------------------------------------------
+
+CControlChannel* CControlChannel::NewL ( RSocketServ& aSocketServ, RSubConnection& aSubConnection, TUint aAddrFamily, TBool aChannelType, TUint aProtocol, const TConnectionDetails& aConnInfo )
+	{
+	CControlChannel* self = new (ELeave) CControlChannel ( );
+	CleanupStack::PushL ( self );
+	self->ConstructL ( aSocketServ, aSubConnection, aAddrFamily, aChannelType, aProtocol, aConnInfo );
+	CleanupStack::Pop (); // self
+	return self;
+	}
+
+CControlChannel::~CControlChannel ()
+	{
+	delete iReader;
+	delete iWriter;
+	iSocket.Close ();		
+	}
+
+void CControlChannel::Recv ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	iReader->Read ( aMessage, aStatus );	
+	}
+
+void CControlChannel::Send ( TControlMessage& aMessage, TRequestStatus& aStatus )
+	{
+	iWriter->Write ( aMessage, aStatus );
+	}
+
+
+CControlChannel::CControlChannel ( )
+	{		
+	}
+
+void CControlChannel::ConstructL ( RSocketServ& aSocketServ, RSubConnection& aSubConnection, TUint aAddrFamily, TBool aChannelType, TUint aProtocol, const TConnectionDetails& aConnInfo )
+	{
+	User::LeaveIfError ( iSocket.Open( aSocketServ, aAddrFamily, KSockStream, aProtocol, aSubConnection ) );
+	
+	if ( aConnInfo.iAddr )
+		{
+		TRequestStatus connectStatus;
+		iSocket.Connect ( *(aConnInfo.iAddr), connectStatus );
+		User::WaitForRequest ( connectStatus );  // This is Ok to do... as in the esock server ( actually flow )will just store the 
+												// connect address internally and not attempting to do an actual connect. As good as 
+												// setopt but we need the socket to know that this is a connected socket.
+		User::LeaveIfError ( connectStatus.Int() );					
+		}
+	
+	if ( aConnInfo.iUri.Length() != 0 )
+		{
+		// Do a setopt to inform the esock about our URI
+		User::LeaveIfError ( iSocket.SetOpt ( KCHAbsoluteUri, KCHOptionLevel, aConnInfo.iUri ) );
+		}
+		
+	iReader = CControlChannelReader::NewL ( iSocket, aChannelType );
+	iWriter = CControlChannelWriter::NewL ( iSocket, aChannelType );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cpnpservicediscovery.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,240 @@
+// 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:
+// cupnpservicediscoveryimpl.cpp
+// 
+//
+
+#include <connpref.h>
+#include "cupnpservicediscoveryimpl.h"
+#include <upnp/upnpconstants.h>
+
+CUPnPServiceDiscoveryImpl::CUPnPServiceDiscoveryImpl ()
+	{
+	}
+CUPnPServiceDiscoveryImpl* CUPnPServiceDiscoveryImpl::NewL()
+	{
+	CUPnPServiceDiscoveryImpl* self = new (ELeave) CUPnPServiceDiscoveryImpl;
+	return self;
+	}
+CUPnPServiceDiscoveryImpl::~CUPnPServiceDiscoveryImpl ()
+	{
+
+	delete	iEventNotifier;
+	delete 	iUPnPSearch;
+	delete 	iUPnPDescribe;
+	delete 	iUPnPSubscribe;
+	delete 	iUPnPRegister;
+
+	iHostResolver.Close();
+	iSubConnection.Close();
+	iConnection.Close();	
+	iSocketServer.Close();
+	}
+
+// Explicitly start the connection
+TInt CUPnPServiceDiscoveryImpl::Construct( TUint aTierId )
+	{	
+	TInt err;
+	//Connect the Socket Server
+	if((err = iSocketServer.Connect()) != KErrNone)
+		return err;
+
+	//const TUint KUPnPTierId = 0x2000D054;
+	// Open the connection passing the socket server and the tier Id
+	if((err = iConnection.Open( iSocketServer, aTierId )) != KErrNone)
+		return err;
+
+	//Start the connection using the given preferences
+	TConnSnapPref prefs ( KDiscoveryConnPref );
+	if((err = iConnection.Start( prefs )) != KErrNone)
+		return err;
+
+	//Create a new sub-connection on the started connection
+	err = iSubConnection.Open(iSocketServer, RSubConnection::ECreateNew, iConnection);
+	if ( err != KErrNone )
+		return err;
+
+	err = iHostResolver.Open( iSocketServer, KAfInet , KProtocolInetTcp);// , iConnection);
+	if (err != KErrNone )
+		return err;
+	
+	iEventNotifier = new CUPnPEventNotifier ( *this , iSubConnection );
+	if( !iEventNotifier )
+		return KErrNoMemory ;
+	
+	iEventNotifier->Notify();
+	return KErrNone;
+	}
+
+// Sends the M-SEARCH request
+void CUPnPServiceDiscoveryImpl::Discover ( const RPnPParameterBundle& aServiceInfo )
+	{
+	TRAPD( err, DiscoverL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+
+void CUPnPServiceDiscoveryImpl::DiscoverL ( const RPnPParameterBundle& aServiceInfo )
+	{
+	if( !iUPnPSearch )
+		iUPnPSearch = CUPnPSearch::NewL( iSubConnection );
+	
+	__ASSERT_DEBUG( iUPnPSearch->DiscoverInProgress()== EFalse,User::Panic(KUPnPDiscoveryInProgress,KUPnPErrDiscoveryInProgress) );
+	iUPnPSearch->SubmitRequestL( aServiceInfo );
+	}
+
+
+void CUPnPServiceDiscoveryImpl::Describe(  const RPnPParameterBundle& aServiceInfo )
+	{
+	TRAPD( err, DescribeL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+// Sends the Describe request
+void CUPnPServiceDiscoveryImpl::DescribeL ( const RPnPParameterBundle& aServiceInfo )
+	{
+	if( !iUPnPDescribe )
+		iUPnPDescribe = new (ELeave) CUPnPDescribe(iSubConnection ,iHostResolver);
+	iUPnPDescribe->SubmitRequestL(aServiceInfo);
+	}
+//Sends the Subscribe request
+void CUPnPServiceDiscoveryImpl::Subscribe ( const RPnPParameterBundle& aServiceInfo )
+	{
+	TRAPD( err, SubscribeL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+
+void CUPnPServiceDiscoveryImpl::SubscribeL ( const RPnPParameterBundle& aServiceInfo )
+	{
+	if( !iUPnPSubscribe )
+		iUPnPSubscribe = CUPnPSubscribe::NewL( iSubConnection,  iHostResolver );
+	
+	iUPnPSubscribe->SubmitRequestL( aServiceInfo );
+	}
+
+void CUPnPServiceDiscoveryImpl::RegisterNotify(  const RPnPParameterBundle& aServiceInfo )//done
+	{
+	TRAPD( err, RegisterNotifyL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+// Used to register for advertisements of specific service type or ssdp:all
+void CUPnPServiceDiscoveryImpl::RegisterNotifyL ( const RPnPParameterBundle& aServiceInfo )//done
+	{
+	if( !iUPnPRegister )
+		iUPnPRegister = new (ELeave) CUPnPRegisterNotify(iSubConnection );
+	iUPnPRegister->SubmitRequestL(aServiceInfo);
+	}
+
+/* Used to cancel previous requests of control point */
+void CUPnPServiceDiscoveryImpl::Cancel ( const RPnPParameterBundle& aServiceInfo )//done
+	{
+	//Ignore the error.
+	TRAP_IGNORE(ProcessCancelL(aServiceInfo));
+	}
+
+/* Used to call the NotifyResults method (which sends the responses back to the
+  callback of the respective classes. In case , responses are coming for requests
+  then they're ignored as they'll mostly be acknowlegements.
+ @param afamilyId The family according to which NotifyResults of respective class
+ 				  is called
+ */
+void CUPnPServiceDiscoveryImpl::OnNotificationL (TUint32 afamilyId)
+	{	
+	RPnPParameterBundleBase pnpBundle;
+	CleanupClosePushL(pnpBundle);
+	// Get the subcon parameters
+	User::LeaveIfError(iSubConnection.GetParameters(pnpBundle));
+
+	// Send a clear request
+	RPnPParameterBundleBase pBundle;
+	User::LeaveIfError(pBundle.Open());
+	CleanupClosePushL(pBundle);	
+	RParameterFamily family = pBundle.CreateFamilyL(EUPnPClearParamSet);
+	User::LeaveIfError ( iSubConnection.SetParameters(pBundle) );	
+	CleanupStack::PopAndDestroy(&pBundle);
+	CleanupStack::Pop(&pnpBundle);
+	
+	switch(afamilyId)
+		{
+		case EUPnPDiscoverResponseParamSet:
+			iUPnPSearch->NotifyResultsL(pnpBundle);
+		break;
+
+		case EUPnPDescribeResponseParamSet:
+			iUPnPDescribe->NotifyResultsL(pnpBundle);
+		break;
+
+		case EUPnPPresenceAnnouncementParamSet:
+		case EUPnPAbsenceAnnouncementParamSet:
+			iUPnPRegister->NotifyResultsL(afamilyId, pnpBundle);
+		break;
+		
+		case EUPnPSubscribeResponseParamSet:
+		case EUPnPNotifyEventParamSet:
+			iUPnPSubscribe->NotifyResultsL(afamilyId, pnpBundle);
+		break;
+		
+		default:
+		__ASSERT_DEBUG(0, User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+		break;
+		}	
+	}
+
+TInt CUPnPServiceDiscoveryImpl::InitiateControl ( RControlChannel& /*aControlChannel*/, const TDesC8& aUri )
+	{
+	TInetAddr addr;
+	TRAPD ( err, CUPnPUtils::ResolveHostAddressL ( iHostResolver, aUri, addr ) );
+	
+	if ( err == KErrNone )
+		{
+		TConnectionDetails connDetails ( &addr, aUri );
+		//err = aControlChannel.Open ( iSocketServer, iSubConnection, KAfInet, EFalse, KProtocolInetTcp, connDetails );
+		}
+		
+	return err;
+	}
+
+void CUPnPServiceDiscoveryImpl::ProcessCancelL( const RPnPParameterBundle& aServiceInfo)
+	{
+	RParameterFamily family=const_cast<RPnPParameterBundle&>(aServiceInfo).GetFamilyAtIndex(0);
+	
+	switch(family.Id())
+		{
+		case EUPnPCancelDiscoverParamSet:
+		if( iUPnPSearch )
+			iUPnPSearch->CancelSearchL( aServiceInfo );
+		break;
+
+		case EUPnPCancelDescribeParamSet:
+		if ( iUPnPDescribe )
+			iUPnPDescribe->CancelDescribeL( aServiceInfo );
+		break;
+
+		case EUPnPCancelRegisterNotifyParamSet:
+		if( iUPnPRegister )
+			iUPnPRegister->CancelNotifyAnnouncementL( aServiceInfo );
+		break;
+
+		case EUPnPCancelSubscribeParamSet:
+		if ( iUPnPSubscribe )
+			iUPnPSubscribe->CancelSubscribeL( aServiceInfo );
+		break;
+
+		default:
+		__ASSERT_DEBUG(0, User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+		break;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cpnpservicepublisher.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,138 @@
+// 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:
+// cupnpservicepublisherimpl.cpp
+// 
+//
+
+
+#include "cupnpservicepublisherimpl.h"
+#include "pnputils.h"
+
+CUPnPServicePublisherImpl::CUPnPServicePublisherImpl ()
+	{
+	}
+CUPnPServicePublisherImpl* CUPnPServicePublisherImpl::NewL()
+	{
+	return new ( ELeave ) CUPnPServicePublisherImpl;
+	}
+CUPnPServicePublisherImpl::~CUPnPServicePublisherImpl ()
+	{
+	delete 	iEventNotifier;
+	delete	iUPnPEventHandler;
+	delete	iUPnPPublisher;	
+
+	iSubConnection.Close();
+	iConnection.Close();
+	iSocketServer.Close();
+	}
+
+void CUPnPServicePublisherImpl::Publish ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_DEBUG( !iUPnPPublisher, User::Panic( KUPnPAlreadyPublished, KUPnPErrPublish));
+	TRAPD(err, PublishL( aServiceInfo ));
+	if(err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+
+void CUPnPServicePublisherImpl::PublishL ( const RPnPParameterBundle& aServiceInfo )
+	{
+	iUPnPPublisher = CUPnPPublisher::NewL( iSubConnection );
+	iUPnPPublisher->SubmitRequestL( aServiceInfo );
+	}
+
+void CUPnPServicePublisherImpl::SendNotify ( const RPnPParameterBundle& aServiceInfo )
+	{
+	__ASSERT_DEBUG( iUPnPPublisher, User::Panic(KUPnPServiceNotPublished,KUPnPErrPublish));
+	__ASSERT_DEBUG( iUPnPPublisher->IsService(), User::Panic(KUPnPDeviceSendingNotification,KUPnPErrPublish));
+	TRAPD( err, SendNotifyL( aServiceInfo ));
+	if ( err != KErrNone )
+		aServiceInfo.PnPObserver()->OnPnPError(err);
+	}
+void CUPnPServicePublisherImpl::SendNotifyL ( const RPnPParameterBundle& aServiceInfo )
+	{
+	if( !iUPnPEventHandler )
+		iUPnPEventHandler = new (ELeave) CUPnPEventHandler(iSubConnection);
+	iUPnPEventHandler->SubmitRequestL( aServiceInfo );
+	}
+// Explicitly start the connection
+TInt CUPnPServicePublisherImpl::Construct(TUint aTierId )
+	{
+	TInt err;
+	//Connect the Socket Server
+	if((err = iSocketServer.Connect()) != KErrNone)
+		return err;
+
+	// Open the connection passing the socket server and the tier Id
+	if((err = iConnection.Open( iSocketServer, aTierId )) != KErrNone)
+		return err;
+
+	//Start the connection using the given preferences
+	TConnSnapPref prefs ( KPublishConnPref );
+	if((err = iConnection.Start( prefs )) != KErrNone)
+		return err;
+
+	//Create a new sub-connection on the started connection
+	err = iSubConnection.Open(iSocketServer, RSubConnection::ECreateNew, iConnection);
+	if ( err != KErrNone )
+		return err ;
+	
+	iEventNotifier = new CUPnPEventNotifier ( *this , iSubConnection );
+	if( !iEventNotifier )
+		return KErrNoMemory ;
+
+	iEventNotifier->Notify();
+	return KErrNone;
+	}
+
+
+// Invoke NotifyResults of respective classes
+void CUPnPServicePublisherImpl::OnNotificationL (TUint32 aFamilyId)
+	{
+	RPnPParameterBundleBase pnpBundle;
+	CleanupClosePushL(pnpBundle);
+	// Get the subcon parameters
+	User::LeaveIfError(iSubConnection.GetParameters(pnpBundle));
+
+	// Send a clear request
+	RPnPParameterBundleBase pBundle;
+	User::LeaveIfError(pBundle.Open());
+	CleanupClosePushL(pBundle);	
+	RParameterFamily family = pBundle.CreateFamilyL(EUPnPClearParamSet);
+	User::LeaveIfError ( iSubConnection.SetParameters(pBundle) );	
+	CleanupStack::PopAndDestroy(&pBundle);
+	CleanupStack::Pop(&pnpBundle);
+	
+	switch( aFamilyId )
+		{
+		case EUPnPPublishResponseParamSet:
+			iUPnPPublisher->NotifyResultsL(pnpBundle);
+		break;
+		
+		default:
+		__ASSERT_DEBUG(0, User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+		break;		
+		}	
+	}
+
+TInt CUPnPServicePublisherImpl::InitiateControl ( RControlChannel& /*aControlChannel*/ )
+	{
+	TSockAddr sockAddr;
+	TConnectionDetails connInfo ( &sockAddr, KNullDesC8 () ); // Note! dummy connect will happen in control channel
+						// so it will be able to recv request packets, or else 
+						// immediate recv call after socket open will fail with KErrNotReady
+	//return aControlChannel.Open ( iSocketServer, iSubConnection, KAfInet, ETrue, KProtocolInetTcp, connInfo );
+	return KErrNone;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpdescribe.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,151 @@
+// 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 "cupnpdescribe.h"
+#include <upnp/upnpconstants.h>
+#include "pnputils.h"
+#include "cupnpelement.h"
+
+CUPnPDescribe::CUPnPDescribe(RSubConnection& aSubConnection , RHostResolver& aResolver) : iSubConnection( aSubConnection )
+	,iResolver ( aResolver )
+	{
+
+	}
+
+CUPnPDescribe::~CUPnPDescribe()
+	{
+	delete iElementArray;
+	}
+
+/* Sends a describe request to the service point.It resolves all the uris passed
+   in the parameter bundle to ip addresses if they're passed as domain names and
+   appends them to element array
+
+   @param aServiceInfo The parameter bundle which contains the uris to be sent
+   describe requests to
+ */
+void CUPnPDescribe::SubmitRequestL( const RPnPParameterBundle& aServiceInfo )
+	{	
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( EUPnPDescribeRequestParamSet );
+
+	// Iterate through all the param sets in the passed bundle
+	CUPnPDescribeRequestParamSet* paramSet  = NULL;
+	TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;	
+
+	TInetAddr address;
+	// Initialize the iterator to the first family again. In this iteration all
+	// the uris will be appended
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+	{
+		paramSet = static_cast<CUPnPDescribeRequestParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+
+		__ASSERT_DEBUG( paramSet->Uri() != KNullDesC8, User::Panic( KUPnPInvalidUserInput, KUPnPErrInvalidInput ) );
+		const TDesC8& uri = paramSet->Uri();
+
+		// Creates a new Element array if one is not already present and
+		// appends the uri to it
+		if(!iElementArray)
+			{
+			iElementArray = new CUPnPElementArray;
+			User::LeaveIfNull( iElementArray );
+			}
+			
+		MPnPObserver* observer = iElementArray->MatchElement( uri );
+		if ( observer )
+			{			
+			reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL ( paramIndex );
+			continue;
+			}
+		iElementArray->InsertElementL(aServiceInfo.PnPObserver(),uri);
+
+		CUPnPUtils::ResolveHostAddressL ( iResolver, paramSet->Uri(), address ) ;
+		paramSet->SetRemoteHost ( address );
+			
+		}
+	User::LeaveIfError(iSubConnection.SetParameters(aServiceInfo));
+
+	}
+
+/* Used to send back the description data to the client through the OnPnPEventL()
+ method
+ */
+void CUPnPDescribe::NotifyResultsL(RPnPParameterBundleBase& aBundle)
+	{
+	User::LeaveIfNull(iElementArray);
+	
+	TUint32 param = EUPnPDescribeResponseParamSet;
+	RParameterFamily family = aBundle.FindFamily( param );	
+	__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));
+	__ASSERT_DEBUG( family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));	
+	CUPnPDescribeResponseParamSet* paramSet  = NULL;
+	MPnPObserver* observer = NULL;
+	TUint count = family.CountParameterSets(RParameterFamily::ERequested);
+		
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+	{			
+		paramSet = static_cast<CUPnPDescribeResponseParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested) );
+		const TDesC8& uri = paramSet->Uri();
+
+		/* If the element array doesn't contain an element with matching
+		 * uri then ignore it.
+		 */
+
+		observer = iElementArray->MatchElement( uri );
+		__ASSERT_DEBUG( observer != NULL, User::Panic(KUPnPResponseUriNotFound,KUPnPErrResponseUriNotFound));
+		iElementArray->RemoveElement( uri );
+		
+	}
+
+	observer->OnPnPEventL(aBundle);
+	}
+
+/* CancelDescribe is used to send cancel describe requests to the network
+ @param aServiceInfo The bundle which contains the list of uris whose describe
+ 		request should be cancelled
+ */
+
+void CUPnPDescribe::CancelDescribeL( const RPnPParameterBundle& aServiceInfo )
+	{
+	User::LeaveIfNull(iElementArray);
+	
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( EUPnPCancelDescribeParamSet );
+	
+	TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;
+	// Iterate through the parameter sets and check to see whether the uris
+	// are present.
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+	{
+		CUPnPCancelDescribeParamSet* paramSet  = NULL;
+		paramSet = static_cast<CUPnPCancelDescribeParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested) );
+		//Extract the uri
+		const TDesC8& uri = paramSet->Uri();
+
+		/* If the element array doesn't contain an element with matching
+		 * uri then ignore it
+		 */
+		MPnPObserver* observer = iElementArray->MatchElement( uri );
+		if ( !observer )
+			{			
+			reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL ( paramIndex );
+			continue;
+			}
+
+		iElementArray->RemoveElement( uri );
+	}
+
+	// Do the set params only if the uri is to found in the element array
+	if ( family.CountParameterSets(RParameterFamily::ERequested)>= 1)
+		User::LeaveIfError(iSubConnection.SetParameters(aServiceInfo));	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpelement.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,72 @@
+// 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 "cupnpelement.h"
+
+CUPnPElement::CUPnPElement( MPnPObserver* aObserver ):iObserver( aObserver )
+	{
+	}
+
+/* Destroy the contained RPointerArray but not the MPnPObserver
+ * because its ownership is not with CUPnPElement
+ */ 
+CUPnPElement::~CUPnPElement()
+	{
+	iValueArray.ResetAndDestroy();
+	}
+
+ /* Append the uri into the array and returns KErrNone if it succeeds or 
+ * returns a system wide error code if it fails
+ * @param aUri  The uri to be appended
+ */
+void CUPnPElement::AppendValueL(const TDesC8& aUri)
+	{
+	HBufC8* uri=aUri.AllocL();
+	CleanupStack::PushL(uri);
+	iValueArray.AppendL(uri);
+	CleanupStack::Pop(uri);
+	}
+
+/* Matches the passed uri argument against the RArrayPointer and returns
+ * the index value if present and KErrNotFound if not .
+ * @param aUriArg  The uri to be matched against
+ */ 
+TInt CUPnPElement::MatchValue(const TDesC8& aUriArg)
+	{
+	HBufC8* hbufPtr = NULL;
+	for (TInt i=0 ; i<iValueArray.Count() ; i++)
+		{
+		hbufPtr = iValueArray[i];
+		if( (*hbufPtr).CompareF(aUriArg) == NULL)
+			return i;	
+		}
+	return KErrNotFound;
+	}
+/* Removes the url passed
+ */ 
+
+TInt CUPnPElement::RemoveValue(const TDesC8& aUriArg)
+	{
+	TInt index=MatchValue(aUriArg);
+	if(index != KErrNotFound)
+		{
+		HBufC8* data=iValueArray[index];
+		iValueArray.Remove(index);
+		delete data;
+		}
+	return index;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpelementarray.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,113 @@
+// 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 "cupnpelementarray.h"
+
+CUPnPElementArray::CUPnPElementArray()
+	{
+	}
+
+CUPnPElementArray::~CUPnPElementArray()
+	{
+	iElements.ResetAndDestroy();
+	}
+
+/* The callbacks alongwith the uris which're being received for each request by a control
+ * point are retrieved and stored as a UPnPElement
+ */
+void CUPnPElementArray::InsertElementL( MPnPObserver* aObserver,const TDesC8& aUri )
+	{	
+	for(TInt i=0;i<iElements.Count();i++)
+		{
+		CUPnPElement* element= iElements[i];
+		const MPnPObserver* observer=element->CallBack();
+		
+		/* If the MPnPObserver is already in the Element Array then
+		 * append to it and return*/
+		if(observer==aObserver)
+			{
+			element->AppendValueL(aUri);
+			return ;
+			}
+		}
+	//Create a new element and append the uri to it	
+	CUPnPElement* element = new CUPnPElement(aObserver);
+	element->AppendValueL(aUri);
+	
+	//Now Append the element to the element array
+	iElements.AppendL(element);
+
+	}
+
+/* Tries to retrieve the callback given the uri and NULL if not present
+ */
+  MPnPObserver* CUPnPElementArray::MatchElement(const TDesC8& aUri)
+	{
+	TInt subIndex = KErrNotFound;
+	for(TInt i=0;i<iElements.Count();i++)
+		{
+		CUPnPElement* element= iElements[i];
+		subIndex=element->MatchValue(aUri);
+		if(subIndex != KErrNotFound)
+			return element->CallBack();
+		}
+	return NULL;
+	}
+/* Removes the uri given and the corresponding element as well if it is the last uri
+ */
+ 
+TInt CUPnPElementArray::RemoveElement(const TDesC8& aUri)
+	{
+	for(TInt i=0;i<iElements.Count();i++)
+		{
+		CUPnPElement* element= iElements[i];
+		TInt subIndex=element->RemoveValue(aUri);
+		if(subIndex != KErrNotFound)
+			{
+			if(element->UriExists()==EFalse)
+				{
+				iElements.Remove(i);
+				delete element;
+				}
+			return subIndex;
+			}
+		}	
+	// If the uri does not give any match in the element array
+	return KErrNotFound;
+	}
+
+/* If any element contains "ssdp:all" then all other elements in the array are
+   removed and only one element containing "ssdp:all" remains in the array.Used
+   for RegisterNotify use case when a control point registers for all advertisements
+   using "ssdp:all". No other uri is required to be registered thereon
+   
+   
+ */
+void CUPnPElementArray::SsdpAllModificationL( MPnPObserver* aObserver )
+	// Returns the count of elements in the element array
+	{
+	_LIT8(KSsdpAll,"ssdp:all");
+	//Create a new element and append the uri to it	
+	CUPnPElement* element = new CUPnPElement(aObserver);
+	
+	//If unable to append this uri to the element then return directly
+	element->AppendValueL( KSsdpAll);
+		
+	iElements.ResetAndDestroy();
+	
+	//Now Append the element to the element array
+	iElements.AppendL(element);
+	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpeventhandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,32 @@
+// 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 "cupnpeventhandler.h"
+#include "pnputils.h"
+
+CUPnPEventHandler::CUPnPEventHandler( RSubConnection& aSubConnection )
+	: iSubConnection ( aSubConnection )
+	{
+	}
+
+// Sends the eventing message to the network
+void CUPnPEventHandler::SubmitRequestL( const RPnPParameterBundle& aBundle )
+	{
+	User::LeaveIfError(iSubConnection.SetParameters(aBundle));
+	}
+// Holds no resources
+CUPnPEventHandler::~CUPnPEventHandler()
+	{
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpeventnotifier.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+// 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 <upnpparamset.h>
+#include "upnpsubconnevents.h"
+#include "cupnpeventnotifier.h"
+
+CUPnPEventNotifier::CUPnPEventNotifier(MUPnPEventNotification& aEvent,RSubConnection& aSubConnection)
+	: CActive( EPriorityStandard ),
+	iNotification( aEvent ), iSubConnection ( aSubConnection ), iClearParams(EFalse)
+	{
+	CActiveScheduler::Add(this);
+	}
+
+/* Issues the active call for monitoring the subconnection */
+void CUPnPEventNotifier::Notify()
+	{
+	if(IsActive())
+		return ;
+	
+	// Issues the active request.The incoming data is stored in iEventNotificationBuf
+	iSubConnection.EventNotification(iEventNotificationBuf, EFalse, iStatus);
+	SetActive();
+	}
+
+/* When a packet arrives in the sub-connection then the familyId is extracted
+ and calls OnNotification of CUPnPServiceDiscovery/CUPnPServicePublisher which calls
+ NotifyResults of respective class
+ */ 
+void CUPnPEventNotifier::RunL()
+	{
+	User::LeaveIfError( iStatus.Int() );
+	CSubConNotificationEvent* event = CSubConNotificationEvent::NewL(iEventNotificationBuf);
+	CUPnPSubConnEvent* responseEvent = static_cast<CUPnPSubConnEvent*>(event);		
+	CleanupStack::PushL (TCleanupItem(CUPnPSubConnEvent::CleanupSubConnEvent,responseEvent));
+	TUint32 familyId = responseEvent->GetFamily();
+	
+	Notify ();
+	
+	iNotification.OnNotificationL(familyId);
+	CleanupStack::PopAndDestroy(responseEvent);	
+	}
+
+/* Issues the asynchronous cancel request for event notification*/	
+void CUPnPEventNotifier::DoCancel()
+	{
+	iSubConnection.CancelEventNotification();
+	}
+	
+TInt CUPnPEventNotifier::RunError( TInt aError )
+	{
+	_LIT(KErrorLog, "SubConnection Notification Error %d");
+	// upnplogger code to be added
+	RDebug::Print( KErrorLog , aError );
+	return KErrNone ;
+	}
+
+CUPnPEventNotifier::~CUPnPEventNotifier()
+	{
+	Cancel();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnppublisher.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,294 @@
+// 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 "cupnppublisher.h"
+#include "pnputils.h"
+#include <upnp/upnpconstants.h>
+
+const TInt KStdTimeOutVal = 300;
+
+CUPnPPublisher::CUPnPPublisher( RSubConnection& aSubConnection)
+	//Constructor
+	: iSubConnection ( aSubConnection )
+	{
+	}
+
+CUPnPPublisher* CUPnPPublisher::NewL (RSubConnection& aSubConnection)
+	{
+	CUPnPPublisher* self = new (ELeave) CUPnPPublisher( aSubConnection );
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+void CUPnPPublisher::ConstructL()
+	// Constructs the periodic timer which is used for refreshment of
+	// ssdp:alive
+	{
+	iPeriodTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+	}
+
+
+CUPnPPublisher::~CUPnPPublisher()
+	// Does all the associated clean up
+	{
+	iPeriodTimer->Cancel();
+	delete iPeriodTimer;
+	}
+
+/* Sends an advertisement to the network.The validity of the uris is done.
+ */
+void CUPnPPublisher::SubmitRequestL( const RPnPParameterBundle& aServiceInfo )
+// Sends a publish request to the network
+	{
+	_LIT8(KUuid,"uuid");
+	iObserver = NULL;
+	const TInt KLowerCacheLimit = 1800;
+	const TInt KUpperCacheLimit = 6000;
+	iObserver=aServiceInfo.PnPObserver();
+	CUPnPServiceRegisterParamSet* serviceParamSet = NULL;
+	CUPnPDeviceRegisterParamSet* deviceParamSet = NULL;
+	
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).GetFamilyAtIndex(0);
+	
+	TTimeIntervalMicroSeconds32 period;
+	TInt paramIndex = 0;
+	switch(family.Id())
+		{
+		case EUPnPServiceRegisterParamSet:
+			// If param set is of type Service Register
+			{
+			
+			serviceParamSet = static_cast<CUPnPServiceRegisterParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+			// The passed bundle will contain only one param set. Hence we don't need to
+			// iterate through them			
+			iService = ETrue;
+			// Check validity of NT parameter for service
+			User::LeaveIfError(CUPnPUtils::GenericUriValidity(serviceParamSet->Uri(),CUPnPUtils::EService));
+			if ( serviceParamSet->Uri().Locate('#') != KErrNotFound )
+				User::Leave(KErrCorrupt);
+			/* Extract the Cache control time. If less than miminum specified value
+			   assign it to minimum*/
+			iTime = serviceParamSet->CacheControlData();
+			if (iTime < KLowerCacheLimit || iTime > KUpperCacheLimit)
+				iTime = KLowerCacheLimit;
+
+			// Calculate the period according to given time in cache control.For
+			// convenience its kept to 1/3rd of the cache time. However if the
+			// period exceeds the max possible time in periodic timer then keep
+			// it to lower period limit
+			iPeriod = CalculatePeriod(iTime);
+			period = iPeriod * KMicroTime;
+
+			// Set the period timer
+			TCallBack callBack(AdvertisementRefresh, this );
+			//Change the value from 60000000 to period after.This is for integration testing
+			iPeriodTimer->Start( period, period, callBack );
+			
+			//Validate the timeout parameter
+			if(serviceParamSet->SubscriptionDuration() < KStdTimeOutVal)
+				{
+				serviceParamSet->SetSubscriptionDuration(KStdTimeOutVal); 
+				}
+		
+			User::LeaveIfError(iSubConnection.SetParameters(aServiceInfo));
+			break;
+			}
+
+
+		case EUPnPDeviceRegisterParamSet:
+			// If param set is of type Device Register
+			{
+			deviceParamSet = static_cast<CUPnPDeviceRegisterParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+			// The passed bundle will contain only one param set. Hence we don't need to
+			// iterate through them			
+			iService = EFalse;
+			// Check validity of NT parameter
+			// If uri is of form uuid:device-uid or urn:schemas-org....
+			const TDesC8& ntUri = deviceParamSet->Uri();
+			// This is to avoid a panic in case descriptor is not of minimum length
+			if(ntUri.Length() < 5)
+				User::Leave(KErrCorrupt);
+
+			if( ntUri.CompareF(KUuid) )
+				User::LeaveIfError(CUPnPUtils::GenericUriValidity ( ntUri , CUPnPUtils::EDevice));
+			else if ( ntUri[4] != ':')
+				User::Leave(KErrCorrupt);
+
+			// Validate all the remaining fields
+			ValidateOtherFieldsL( *deviceParamSet );
+			
+			/* Extract the Cache control time. If less than miminum specified value
+			   assign it to minimum*/
+			iTime = deviceParamSet->CacheControlData();
+			if (iTime < KLowerCacheLimit || iTime > KUpperCacheLimit)
+				iTime = KLowerCacheLimit;
+
+
+			// Calculate the period according to given time in cache control.For
+			// convenience its kept to 1/3rd of the cache time. However if the
+			// period exceeds the max possible time in periodic timer then keep
+			// it to lower period limit
+			iPeriod = CalculatePeriod(iTime);
+			period = iPeriod * KMicroTime;
+
+			// Set the period timer
+			TCallBack callBack(AdvertisementRefresh, this );
+			iPeriodTimer->Start( period, period, callBack );
+			
+			RPnPParameterBundleBase bundle;
+			User::LeaveIfError ( bundle.Open () );
+			CleanupClosePushL ( bundle );			
+			CopyWithIconInfoL ( *deviceParamSet, bundle );
+			
+			User::LeaveIfError(iSubConnection.SetParameters(bundle));
+			CleanupStack::PopAndDestroy ( &bundle );
+			break;
+			}
+
+		default:
+			User::Leave(KErrCorrupt);
+		} 	
+	}
+
+/* Used to notify results back to the client application */
+void CUPnPPublisher::NotifyResultsL(RPnPParameterBundleBase& aBundle)
+	{
+	User::LeaveIfNull(iObserver);
+	iObserver->OnPnPEventL(aBundle) ;
+	}
+
+// Callback function which sends a refresh packet everytime its called
+TInt CUPnPPublisher::AdvertisementRefresh( TAny* aPtr )
+	{
+	RPnPParameterBundleBase pBundle ;
+	pBundle.Open ();
+	//Allocate the family on the bundle	
+	RParameterFamily family;
+	TRAPD(err, family = pBundle.CreateFamilyL(EUPnPServiceRefreshParamSet) );
+	
+	if( err != KErrNone )
+		return err;
+	
+	CUPnPPublisher* publishObject = static_cast<CUPnPPublisher*>(aPtr);	
+	// Finally send refresh request to the subconnection
+	err = publishObject->SubConnection().SetParameters(pBundle );
+	pBundle.Close();
+	return err;	
+	}
+
+void CUPnPPublisher::ValidateOtherFieldsL( const CUPnPDeviceRegisterParamSet& aDeviceParam)
+	{		
+	//mandatory fields validation.
+	__ASSERT_DEBUG(( aDeviceParam.FriendlyName().Length() > 0) && (aDeviceParam.FriendlyName().Length() < 64 ), User::Panic( KUPnPInvalidFriendlyName, KUPnPErrInvalidFriendlyName ) );
+	__ASSERT_DEBUG(( aDeviceParam.Manufacturer().Length() > 0 ) && (aDeviceParam.Manufacturer().Length() < 64 ), User::Panic( KUPnPInvalidManufactureName, KUPnPErrInvalidManufactureName ) );
+	__ASSERT_DEBUG(( aDeviceParam.ModelName().Length() > 0 ) && (aDeviceParam.ModelName().Length() < 32 ), User::Panic( KUPnPInvalidModelName, KUPnPErrInvalidModelName ) );
+	
+	// UDN validation 
+	_LIT8(KUuid,"uuid:");
+	__ASSERT_DEBUG( aDeviceParam.UDN().Length() > KUuid().Length(), User::Panic( KUPnPInvalidUDN, KUPnPErrInvalidUDN ) );
+	TPtrC8 ptr;
+	ptr.Set( aDeviceParam.UDN().Left( KUuid().Length() ) );
+	if ( ptr.CompareF(KUuid) != 0 )
+		{
+		__ASSERT_DEBUG( 0, User::Panic( KUPnPInvalidUDN, KUPnPErrInvalidUDN ) );
+		}
+	
+	//optional fields validation
+	if ( aDeviceParam.ModelDesc() != KNullDesC8 )
+		__ASSERT_DEBUG( aDeviceParam.ModelDesc().Length() < 128 , User::Panic( KUPnPInvalidModelDescription, KUPnPErrInvalidModelDescription ) );
+
+	if ( aDeviceParam.ModelNumber() != KNullDesC8 )
+		__ASSERT_DEBUG( aDeviceParam.ModelNumber().Length() < 32, User::Panic( KUPnPInvalidModelNumber, KUPnPErrInvalidModelNumber ) );
+	
+	if ( aDeviceParam.SerialNumber() != KNullDesC8 )
+		__ASSERT_DEBUG( aDeviceParam.SerialNumber().Length() < 64, User::Panic( KUPnPInvalidSerialNumber, KUPnPErrInvalidSerialNumber ) );
+
+	if (aDeviceParam.UPC() != KNullDesC8)
+		__ASSERT_DEBUG( aDeviceParam.UPC().Length() == 12, User::Panic( KUPnPInvalidUPC, KUPnPErrInvalidUPC ) );
+	
+	ValidateIconList ( aDeviceParam );
+	}
+	
+	
+void CUPnPPublisher::ValidateIconList ( const  CUPnPDeviceRegisterParamSet& aDeviceParam )
+	{
+	const CUPnPIconList& iconList = aDeviceParam.IconList ();
+	for ( TInt i = 0; i < iconList.Count (); i++ )
+		{
+		const TDesC8& mimeType = iconList[i]->MimeType ().Mid ( 0, 6 );		
+		__ASSERT_DEBUG ( mimeType.CompareF ( _L8 ( "image/" ) ) == 0, User::Panic ( KUPnPInvalidIconInfo, KUPnPErrInvalidMimeType ) );
+		}
+	}
+
+void CUPnPPublisher::CopyWithIconInfoL ( const CUPnPDeviceRegisterParamSet& aDeviceParam, RPnPParameterBundleBase& aBundle )
+	{
+	RParameterFamily family = aBundle.CreateFamilyL ( EUPnPDeviceRegisterParamSetExt );
+	CUPnPDeviceRegisterParamSetExt* newParamSet = CUPnPDeviceRegisterParamSetExt::NewL ( family );
+	newParamSet->SetUriL ( aDeviceParam.Uri () );
+	newParamSet->SetUPCL ( aDeviceParam.UPC () );
+	newParamSet->SetCacheControlData ( aDeviceParam.CacheControlData () );
+	newParamSet->SetParentDeviceUidL ( aDeviceParam.ParentDeviceUid () );
+	newParamSet->SetFriendlyNameL ( aDeviceParam.FriendlyName () );
+	newParamSet->SetManufacturerL ( aDeviceParam.Manufacturer () );
+	newParamSet->SetManufactureUrlL ( aDeviceParam.ManufacturerUrl () );
+ 	newParamSet->SetModelDescL ( aDeviceParam.ModelDesc () );
+	newParamSet->SetModelNameL ( aDeviceParam.ModelName () );
+ 	newParamSet->SetModelNumberL ( aDeviceParam.ModelNumber () );
+ 	newParamSet->SetModelUriL ( aDeviceParam.ModelUri () );
+ 	newParamSet->SetPresentationL ( aDeviceParam.PresentationUri () );
+ 	newParamSet->SetSerialNumberL ( aDeviceParam.SerialNumber () );
+ 	newParamSet->SetUDNL ( aDeviceParam.UDN () );
+	newParamSet->SetUPCL ( aDeviceParam.UPC () );
+	
+	RBuf8 iconData;
+	CleanupClosePushL ( iconData );
+	StoreIconListL ( aDeviceParam.IconList (), iconData );
+	newParamSet->SetIconDataL ( iconData );
+	CleanupStack::PopAndDestroy ( &iconData );
+	}	
+
+void CUPnPPublisher::StoreIconListL ( const CUPnPIconList& aIconList, RBuf8& aBuffer )
+	{	
+	CUPnPIconParams* iconInfo = NULL;	
+	TInt length = sizeof ( TUint32 );	// icon list count	
+	for ( TInt i = 0; i < aIconList.Count (); i++ )
+		{
+		iconInfo = aIconList[i];
+		length  += ( iconInfo->MimeType ().Length () 
+					+ 	iconInfo->Url ().Length ()			
+					+ 	( sizeof ( TUint32 ) * 2 ) // length delimiters for url and mimetype
+					+	( sizeof ( TUint32 ) * 3 ) ); // w,h,d	
+		}	
+	aBuffer.CreateL ( length );    
+	aBuffer.AppendNumFixedWidth ( aIconList.Count(), EDecimal, sizeof ( TUint32 ) );
+	
+	// manual copy of all upnp icon params
+	for ( TInt i = 0; i < aIconList.Count (); i++ )
+		{
+		iconInfo = aIconList[i];
+				
+		aBuffer.AppendNumFixedWidth ( iconInfo->MimeType ().Length (), EDecimal, sizeof ( TUint32 ) );
+		aBuffer.Append ( iconInfo->MimeType () );
+		
+		aBuffer.AppendNumFixedWidth ( iconInfo->Url ().Length (), EDecimal, sizeof ( TUint32 ) );
+		aBuffer.Append ( iconInfo->Url () );
+		
+		aBuffer.AppendNumFixedWidth ( iconInfo->Width (), EDecimal, sizeof ( TUint32 ) );
+		aBuffer.AppendNumFixedWidth ( iconInfo->Height (), EDecimal, sizeof ( TUint32 ) );
+		aBuffer.AppendNumFixedWidth ( iconInfo->Depth (), EDecimal, sizeof ( TUint32 ) );
+		}	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpregisternotify.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,164 @@
+// 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 "cupnpregisternotify.h"
+#include "pnputils.h"
+#include <upnp/upnpconstants.h>
+
+_LIT8(KSsdpAll,"ssdp:all");
+
+CUPnPRegisterNotify::CUPnPRegisterNotify( RSubConnection& aSubConnection )
+	: iSubConnection( aSubConnection )
+	{
+	}
+
+CUPnPRegisterNotify::~CUPnPRegisterNotify()
+	{
+	delete iElementArray;
+	}
+/* Submits a request to the network to register for announcements of a specific type.
+ @param aBundle Parameter bundle containing list of uris to be registered
+ */
+void CUPnPRegisterNotify::SubmitRequestL( const RPnPParameterBundle& aBundle )
+	{
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aBundle).FindFamily ( EUPnPRegisterAnnouncementParamSet );
+	// Iterate through all the param sets in the passed bundle
+
+	CUPnPRegisterAnnouncementParamSet* paramSet  = NULL;
+
+	TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;
+	// Perform the first iteration in which validation of all the uris
+	// contained in the bundle will be done
+	
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+		{
+		paramSet = static_cast<CUPnPRegisterAnnouncementParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+		const TDesC8& uri  = paramSet->Uri();
+		if( !iElementArray )
+			{
+			iElementArray = new (ELeave) CUPnPElementArray ;
+			if (uri.CompareF(KSsdpAll) != NULL)
+				User::LeaveIfError(CUPnPUtils::GenericUriValidity( uri, CUPnPUtils::EAny ));
+			iElementArray->InsertElementL( aBundle.PnPObserver() , uri );
+			}
+		else
+			{
+			if ( iElementArray->MatchElement( uri ) || iElementArray->MatchElement( KSsdpAll ))
+	 			{	 			
+	 			reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL ( paramIndex );
+	 			continue;
+	 			}
+			if (uri.CompareF( KSsdpAll) == NULL)
+				{
+				iElementArray->SsdpAllModificationL( aBundle.PnPObserver() );
+				for(TInt i=family.CountParameterSets(RParameterFamily::ERequested)-1; i>=0 ; i--)
+					{
+					if( i != paramIndex )						
+						reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL ( i );
+					}
+				break;
+				}	
+			
+			User::LeaveIfError( CUPnPUtils::GenericUriValidity( uri, CUPnPUtils::EAny ) );	
+			iElementArray->InsertElementL( aBundle.PnPObserver() , uri );
+			}
+		}
+	User::LeaveIfError(iSubConnection.SetParameters(aBundle));	
+	}
+
+/* Used to cancel registration request
+ @param aServiceInfo Bundle containing list of uris whose registraion for
+         			 advertisements have to be cancelled
+  */
+void CUPnPRegisterNotify::CancelNotifyAnnouncementL( const RPnPParameterBundle& aServiceInfo )
+	{
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily ( EUPnPCancelRegisterNotifyParamSet );
+	// Iterate through all the param sets in the passed bundle
+	CUPnPCancelRegisterNotifyParamSet* paramSet = NULL;
+	TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;
+	
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+	{
+	  	paramSet = static_cast<CUPnPCancelRegisterNotifyParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested) );
+	  
+		if ( !(iElementArray->MatchElement(paramSet->Uri())))
+			{			
+			reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL ( paramIndex );
+			continue;
+			}
+		else
+			iElementArray->RemoveElement( paramSet->Uri() );
+		// Removes the uri entry from the array if exists
+	}
+
+	User::LeaveIfError(iSubConnection.SetParameters( aServiceInfo ));	
+	}
+
+/* Sends the notification to the client according to the advertisement received.
+ Advertisements can be for both presence (ssdp:alive) or absence (ssdp:bye-bye)
+
+ @param aFamily Indicates whether the advertisement is presence or absence
+ */
+void CUPnPRegisterNotify::NotifyResultsL(TUint32 aFamily, RPnPParameterBundleBase& aBundle)
+	{
+	MPnPObserver* observer = NULL;
+	
+	CUPnPPresenceAnnouncementParamSet* presenceParamSet  = NULL;
+	CUPnPAbsenceAnnouncementParamSet* absenceParamSet  = NULL;
+	RParameterFamily family ;
+	switch(aFamily)
+		{
+		case EUPnPPresenceAnnouncementParamSet:
+			{
+			family = aBundle.FindFamily(EUPnPPresenceAnnouncementParamSet);						
+			__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));
+			__ASSERT_DEBUG( family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));		
+			TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;			
+			presenceParamSet = static_cast<CUPnPPresenceAnnouncementParamSet*> ( family.GetParameterSetAtIndex ( count - 1, RParameterFamily::ERequested ) );
+			
+			observer = iElementArray->MatchElement( presenceParamSet->Uri () );
+			if ( !observer )
+				{
+				observer = iElementArray->MatchElement( KSsdpAll );
+				User::LeaveIfNull(observer);
+				}
+			break;
+			}
+
+		case EUPnPAbsenceAnnouncementParamSet:
+			{
+			// Remove the uri from the element array as the service
+			// point is no more in the network
+			family = aBundle.FindFamily(EUPnPAbsenceAnnouncementParamSet);			
+			__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));
+			__ASSERT_DEBUG( family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+			TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;			
+			absenceParamSet = static_cast<CUPnPAbsenceAnnouncementParamSet*> ( family.GetParameterSetAtIndex ( count - 1, RParameterFamily::ERequested ) );		 
+
+			observer = iElementArray->MatchElement( absenceParamSet->Uri () );
+			if ( !observer )
+				{
+				observer = iElementArray->MatchElement( KSsdpAll );
+				User::LeaveIfNull(observer);
+				}
+			break;
+			}
+
+		default:
+		__ASSERT_DEBUG(0, User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+		}
+
+	observer->OnPnPEventL( aBundle ) ;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpsearch.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,293 @@
+// 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 "cupnpsearch.h"
+
+CUPnPSearch::CUPnPSearch( RSubConnection& aSubConnection )
+	:iSubConnection( aSubConnection )
+	{
+	}
+
+CUPnPSearch* CUPnPSearch::NewL(RSubConnection& aSubConnection)
+	{
+	CUPnPSearch* search = new (ELeave) CUPnPSearch( aSubConnection );
+	CleanupStack::PushL( search );
+	search->ConstructL();
+	CleanupStack::Pop( search );
+	return search;
+	}
+
+void CUPnPSearch::ConstructL()
+	{
+	// Create a delta timer with the given priority
+	iDeltaTimer=CDeltaTimer::NewL(EPriorityLow);
+	}
+
+CUPnPSearch::~CUPnPSearch()
+	{
+	iDeltaTimer->Cancel();	
+	delete iDeltaTimer;
+	iTimerMappedArray.ResetAndDestroy();
+	iCallbackArray.ResetAndDestroy();
+	iMappedUri=NULL;
+	}
+
+/* Used to send a discover request to the network
+ @param aServiceInfo Bundle of uri's which have to be searched for
+ */
+void CUPnPSearch::SubmitRequestL(const RPnPParameterBundle& aServiceInfo)
+	{
+	const TInt KMaxMXValue = 120;
+	_LIT8(KSsdpAll,"ssdp:all");	
+	iObserver = aServiceInfo.PnPObserver();
+	
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( EUPnPDiscoverRequestParamSet );
+	// Iterate through all the param sets in the passed bundle
+	
+	CUPnPDiscoverRequestParamSet* paramSet = NULL;
+	TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;
+	
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+		{
+		paramSet = static_cast<CUPnPDiscoverRequestParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+
+		//Extract the MX value and the uri
+		TInt delayResp=paramSet->ResponseTime();
+		const TDesC8& uri = paramSet->Uri();
+		__ASSERT_DEBUG( uri != KNullDesC8, User::Panic( KUPnPInvalidUserInput, KUPnPErrInvalidInput ) );
+		__ASSERT_DEBUG( delayResp>=0, User::Panic( KUPnPInvalidUserInput, KUPnPErrInvalidInput ) );
+		if ( delayResp > KMaxMXValue )
+			{
+			paramSet->SetResponseTime(KMaxMXValue);
+			delayResp = KMaxMXValue;
+			}
+		/* If one of the uris being discovered is ssdp:all then no other uri
+		 needs to be discovered and hence no more traversal through the param
+		 bundle is required */
+		if ( paramSet->Uri().CompareF(KSsdpAll) == NULL)
+			{
+			CreateTimerEntryL(uri);
+			iTimerMappedArray.ResetAndDestroy();
+			iMappedUri = CTimerMappedUri::NewL(uri,iEntry,delayResp);
+			iTimerMappedArray.AppendL(iMappedUri);
+			if ( family.CountParameterSets(RParameterFamily::ERequested) > 1 )
+				{
+				for ( TInt i = family.CountParameterSets(RParameterFamily::ERequested)-1; i >= 0; i-- )
+					{
+					if ( i != paramIndex )						
+					    reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL ( i );
+
+					}
+				}
+
+			break;
+			}
+		// Check for validity of the uri
+		User::LeaveIfError(CUPnPUtils::GenericUriValidity( uri, CUPnPUtils::EAny ));
+		 
+
+		// If uri has already been indexed into iTimerMappedArray that means its a
+		// duplicate entry and the index of this param set is appended to
+		// tempDuplicateArray
+		TInt err = KErrNone;
+		for (TInt i=0;i<iTimerMappedArray.Count();i++)
+			{
+			if(iTimerMappedArray[i]->UriExists(uri))
+				{
+				reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL(paramIndex);
+				err = KErrAlreadyExists;
+				break;
+				}
+			}
+		if (err == KErrAlreadyExists)
+			continue;
+
+		// CreateTimerEntry sets iEntry to the new timer entry
+		CreateTimerEntryL(uri);
+		iMappedUri = CTimerMappedUri::NewL(uri,iEntry,delayResp);
+		iTimerMappedArray.AppendL(iMappedUri);
+		
+		}
+
+	/* Transfer ownvership of all CTimerMappedUri objects from tempMappedArray to
+	  iTimerMappedArray
+	  */
+	for(TInt i=0;i<iTimerMappedArray.Count();i++)
+		{
+		// queue up in deltatimer
+		TInt time = AdjustedDelay(iTimerMappedArray[i]->Delay());
+		TTimeIntervalMicroSeconds32 delay(time);
+		iDeltaTimer->Queue(delay,iTimerMappedArray[i]->GetTimerEntry());
+		}
+	/* if SetParameters fails should it be communicated to client
+	* so that he may take corrective measures */
+	User::LeaveIfError(iSubConnection.SetParameters(aServiceInfo));
+	SetDiscoverProgress(ETrue);
+	}
+
+/* Static method which is called on timer expiry and which removes the uri entry
+ * from the array.
+ */
+TInt CUPnPSearch::StopSearch(TAny* aPtr)
+	{
+	CCallbackArgument* pointerData= static_cast<CCallbackArgument*> (aPtr);
+	CUPnPSearch* thisObject= static_cast < CUPnPSearch*> (pointerData->GetThisPointer());
+	RPointerArray<CTimerMappedUri>& rArray=thisObject->GetTimerArray();
+	RPointerArray<CCallbackArgument>& argArray = thisObject->GetArgumentArray();
+	const TDesC8& uri = pointerData->GetUri();
+	TInt index;
+	for(index=0;index<rArray.Count();index++)
+		{
+		if(rArray[index]->UriExists(uri))
+			{
+			// Removes the uri entry from the array
+			CTimerMappedUri* timerUri = rArray[index];
+			rArray.Remove(index);
+			delete timerUri;
+			break;
+			}
+		}
+	for( index=0;index<argArray.Count();index++)
+		{
+		if(uri.CompareF(argArray[index]->GetUri()) == NULL)
+			{
+			argArray.Remove(index);
+			break;
+			}
+		}
+	// Requests the subconnection to cancel ongoing search
+	TRAPD( error , thisObject->CancelSearchL( uri ));
+
+	// Reset Discover In progress
+	if(rArray.Count() <= 0)
+		thisObject->SetDiscoverProgress(EFalse);
+	
+	// Notifies the client that timer has expired
+	TRAP(error,thisObject->MakeBundleAndNotifyL(pointerData));
+	delete pointerData;
+	return error;
+	}
+
+/* Used to notify results back to the client application */
+void CUPnPSearch::NotifyResultsL(RPnPParameterBundleBase& aBundle)
+	{
+	RParameterFamily family = aBundle.FindFamily(EUPnPDiscoverResponseParamSet);	
+ 	__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+	__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));
+	iObserver->OnPnPEventL(aBundle) ;
+	}
+
+/* Is used to notify the timeout expired result back to the control point */
+void CUPnPSearch::MakeBundleAndNotifyL(CCallbackArgument* aCallArgument)
+	{
+	RPnPParameterBundleBase pnpBundle ;
+	pnpBundle.Open();	
+	CleanupClosePushL( pnpBundle );
+
+	// Create the family on the bundle
+	RParameterFamily family = pnpBundle.CreateFamilyL(EUPnPDiscoverResponseParamSet);	
+	//Set the values in the parameter set
+	CUPnPDiscoverResponseParamSet* searchParamSet = CUPnPDiscoverResponseParamSet::NewL(family );
+
+	TUPnPEvent event;
+	const TDesC8& uri = aCallArgument->GetUri();
+	event.iStatus=TUPnPEvent::EDiscoveryTimeout;
+	event.iErrorCode = KErrTimedOut;
+	searchParamSet->SetUPnPEvent(event);
+	searchParamSet->SetUriL ( uri );	
+	CleanupStack::Pop(&pnpBundle);
+	iObserver->OnPnPEventL( pnpBundle );
+	}
+
+/* Used to send a Cancel discover request to the network in case of timer expiry
+ Sent automatically by CUPnPSearch::StopSearch */
+void CUPnPSearch::CancelSearchL(const TDesC8& aUri)
+	{	
+	RPnPParameterBundleBase rBundle;
+	rBundle.Open();
+	CleanupClosePushL( rBundle );
+	RParameterFamily family = rBundle.CreateFamilyL(EUPnPCancelDiscoverParamSet);	
+	
+	//Allocate the param set on the family
+	CUPnPCancelDiscoverParamSet* paramSet = CUPnPCancelDiscoverParamSet::NewL(family );
+
+	// Set the values in the parameter set
+	paramSet->SetUriL( aUri );
+	// Finally send cancel request to the subconnection
+	User::LeaveIfError( iSubConnection.SetParameters(rBundle ));
+	CleanupStack::PopAndDestroy( &rBundle );
+	}
+
+/* Used to send a Cancel discover request  to the network. This is called on client
+ invocation
+ @param aServiceInfo Bundle containing list of uri's whose discovery has to be cancelled
+ */
+void CUPnPSearch::CancelSearchL( const RPnPParameterBundle& aServiceInfo )
+	{	
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily(EUPnPCancelDiscoverParamSet);
+	
+	/* The uris passed in the bundle are looked up in iTimerMappedUri.If they
+	 exist, then its entry is removed from DeltaTimer and iTimerMappedUri as well
+	 */
+	TInt err = 0;
+	// Iterate through all the param sets in the passed bundle
+	
+	TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;
+	CUPnPCancelDiscoverParamSet* paramSet = NULL;
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+		{
+		paramSet = static_cast<CUPnPCancelDiscoverParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested) );
+		
+		//Extract the uri
+		const TDesC8& uri = paramSet->Uri();
+		__ASSERT_DEBUG( paramSet->Uri() != KNullDesC8, User::Panic( KUPnPInvalidUserInput, KUPnPErrInvalidInput ) );
+		// Removes the uri entry from the array if exists
+		err=KErrNotFound;
+		for(TInt i=0;i<iTimerMappedArray.Count();i++)
+			{
+			if(iTimerMappedArray[i]->UriExists(uri))
+				{
+				err = KErrNone;
+				CTimerMappedUri* timerUri = iTimerMappedArray[i];
+				iDeltaTimer->Remove(timerUri->GetTimerEntry());
+				iTimerMappedArray.Remove(i);
+				if(iTimerMappedArray.Count()<= 0)
+					SetDiscoverProgress(EFalse);
+				delete timerUri;
+				break;
+				}
+			}
+		if ( err != KErrNone )
+			{			
+			reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL ( paramIndex );
+			continue;
+			}
+		}
+	if ( family.CountParameterSets(RParameterFamily::ERequested)>= 1)
+			User::LeaveIfError(iSubConnection.SetParameters(aServiceInfo));
+	}
+
+/* CreateTimerEntry : creates the deltatimer entry and sets it to iEntry
+ @param aUri  The uri whose timer entry has to be created
+ */
+void CUPnPSearch::CreateTimerEntryL(const TDesC8& aUri )
+	{
+	CCallbackArgument* callArgument =CCallbackArgument::NewL(this,aUri);
+	CleanupStack::PushL(callArgument);
+	iCallbackArray.AppendL(callArgument);
+	TCallBack callBack(StopSearch,callArgument);
+	iEntry = new (ELeave) TDeltaTimerEntry ( callBack );
+	CleanupStack::Pop();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/cupnpsubscribe.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,395 @@
+// 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 "cupnpsubscribe.h"
+#include "upnpconstants.h"
+#include "pnputils.h"
+#include <e32const.h>
+
+CUPnPSubscribe::CUPnPSubscribe(RSubConnection& aSubConnection , RHostResolver& aResolver):iSubConnection(aSubConnection)
+	,iResolver ( aResolver )
+	{
+	}
+
+CUPnPSubscribe* CUPnPSubscribe::NewL(RSubConnection& aSubConnection , RHostResolver& aResolver)
+	{
+	CUPnPSubscribe* subscribe=new ( ELeave ) CUPnPSubscribe(aSubConnection , aResolver);
+	CleanupStack::PushL( subscribe );
+	subscribe->ConstructL();
+	CleanupStack::Pop();
+	return subscribe;
+	}
+
+void CUPnPSubscribe::ConstructL()
+	{
+	iDeltaTimer=CDeltaTimer::NewL(EPriorityLow);
+	}
+
+CUPnPSubscribe:: ~CUPnPSubscribe()
+	{
+	iDeltaTimer->Cancel();	
+	delete iDeltaTimer;
+	delete iElementArray;
+	iTimerMappedArray.ResetAndDestroy();
+	iCallbackArray.ResetAndDestroy();
+	iMappedUri=NULL;
+	}
+
+/* Sends a subscribe request to the service point.It resolves all the uris passed
+   in the parameter bundle to ip addresses if they're passed as domain names and
+   appends them to element array
+
+   @param aServiceInfo The parameter bundle which contains the uris to be sent
+   describe requests to
+ */
+void CUPnPSubscribe::SubmitRequestL(const RPnPParameterBundle& aServiceInfo)
+	{
+	TInt paramIndex=0;
+	
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( EUPnPSubscribeRequestParamSet );
+	
+	// Iteration 1 : Mainly used for resubscribing request. All the entries
+	// corresponding to the uri which've been subscribed for before and are
+	// present in this parameter set are removed
+	
+	CUPnPSubscribeRequestParamSet* paramSet  = NULL;
+	TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;
+	
+	for ( paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+		{
+		paramSet = static_cast<CUPnPSubscribeRequestParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+		
+		const TDesC8& uri = paramSet->Uri();
+		__ASSERT_DEBUG( paramSet->Uri() != KNullDesC8, User::Panic( KUPnPInvalidUserInput, KUPnPErrInvalidInput ) );
+		__ASSERT_DEBUG( paramSet->Duration() > 0, User::Panic( KUPnPInvalidUserInput, KUPnPErrInvalidInput ) );
+
+		for(TInt i=0;i<iTimerMappedArray.Count();i++)
+			{
+			if(iTimerMappedArray[i]->UriExists(uri))
+				{
+				CTimerMappedUri* timerUri = iTimerMappedArray[i];
+				iDeltaTimer->Remove(timerUri->GetTimerEntry());
+				iTimerMappedArray.Remove(i);
+				delete timerUri;
+				break;
+				}
+			}
+		for( TInt i=0;i<iCallbackArray.Count();i++)
+			{
+			if(uri.CompareF(iCallbackArray[i]->GetUri()) == NULL)
+				{
+				CCallbackArgument* callArgument = iCallbackArray[i];
+				iCallbackArray.Remove(i);
+				delete callArgument;
+				break;
+				}
+			}
+		
+		if( iElementArray && iElementArray->MatchElement(uri))
+			iElementArray->RemoveElement(uri);
+		
+		}
+	// Initialize the iterator . The uris will be checked for duplication,resolved
+	// and appended
+	TInetAddr address;
+	
+	for ( paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+		{
+			paramSet = static_cast<CUPnPSubscribeRequestParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+			const TDesC8& uri = paramSet->Uri();
+			
+		// Creates a new Element array if one is not already present and
+		// appends the uri to it. If the uri is duplicate then the corresponding param
+		// set is removed
+		if(!iElementArray)
+			{
+			iElementArray = new CUPnPElementArray;
+			User::LeaveIfNull(iElementArray);
+			iElementArray->InsertElementL(aServiceInfo.PnPObserver(), uri);
+			}
+		else
+			{
+			if(!iElementArray->MatchElement(uri))
+				{
+				iElementArray->InsertElementL(aServiceInfo.PnPObserver(),uri);
+				}
+			else
+				{
+				reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL(paramIndex);
+				continue;
+				}
+			}
+			
+		CUPnPUtils::ResolveHostAddressL ( iResolver, paramSet->Uri(), address );
+		paramSet->SetRemoteHost ( address );
+		
+		}
+	/* Finally if all other processing is done successfully do the
+	 * set params
+	 */
+			
+	if ( family.CountParameterSets(RParameterFamily::ERequested)>=1)
+		User::LeaveIfError(iSubConnection.SetParameters(aServiceInfo));
+	
+	
+	}
+
+/* On expiry of the CDeltaTimer associated with the requested uri
+ * it removes the corresponding from the element array and notifies the client
+ */
+TInt CUPnPSubscribe::OnTimerExpiry(TAny* aPtr)
+	{
+	TInt error = KErrNone;
+	CCallbackArgument* pointerData= static_cast<CCallbackArgument*> (aPtr);
+	CUPnPSubscribe* thisObject= static_cast<CUPnPSubscribe*> (pointerData->GetThisPointer());
+	CUPnPElementArray* thisElementArray=thisObject->ElementArrayHandle();
+	RPointerArray<CTimerMappedUri>& timerArray=thisObject->GetTimerArray();
+	RPointerArray<CCallbackArgument>& argArray = thisObject->GetArgumentArray();
+
+	const TDesC8& uri = pointerData->GetUri();
+
+	TInt index;
+	for( index=0; index<timerArray.Count(); index++ )
+		{
+		if(timerArray[index]->UriExists(uri))
+			{
+			CTimerMappedUri* timerUri = timerArray[index];
+			timerArray.Remove(index);
+			delete timerUri;
+			index = -1;
+			break;
+			}
+		}
+	__ASSERT_DEBUG( index == -1 ,User::Panic(KUPnPTimerUriNotFound,KUPnPErrTimerError) );
+	for( index=0; index<argArray.Count(); index++ )
+		{
+		const TDesC8& testUri = argArray[index]->GetUri();
+		if(uri.CompareF(argArray[index]->GetUri())==NULL)
+			{
+			argArray.Remove(index);
+			break;
+			}
+		}
+	MPnPObserver* observer = thisElementArray->MatchElement(uri);
+	__ASSERT_DEBUG( observer , User::Invariant());
+	// Removes the uri from the element Array 
+	HBufC8* notifyUri = pointerData->GetUri().Alloc();
+	__ASSERT_DEBUG( notifyUri , User::Invariant());
+	
+	// Deletes the CCallbackargument data
+	delete pointerData;
+	
+	// Notifies the client that timer has expired
+	TRAP(error,thisObject->MakeBundleAndNotifyL(observer, notifyUri));
+	return KErrNone;
+	}
+
+/* Passes back the response bundle to the client. A response bundle
+ will contain only one parameter set consequently with a single observer
+ */
+void CUPnPSubscribe::NotifyResultsL(TUint32 aFamilyId, RPnPParameterBundleBase& aBundle)
+	{
+	MPnPObserver* observer = NULL;
+	User::LeaveIfNull(iElementArray);
+	
+	CUPnPSubscribeResponseParamSet* subscribeParamSet  = NULL;
+	CUPnPNotifyEventParamSet* notifyParamSet  = NULL;	
+	RParameterFamily family ;
+	switch(aFamilyId)
+		{
+		case EUPnPSubscribeResponseParamSet:
+			{
+			// Response to subscription request
+			family = aBundle.FindFamily(EUPnPSubscribeResponseParamSet);			
+			__ASSERT_DEBUG(!family.IsNull (), User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+			__ASSERT_DEBUG(family.CountParameterSets(RParameterFamily::ERequested) > 0, User::Panic(KUPnPNoParamSet,KUPnPErrNoParamSet));				
+			TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;
+			for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+				{
+				 subscribeParamSet = static_cast<CUPnPSubscribeResponseParamSet*> (family.GetParameterSetAtIndex(paramIndex,RParameterFamily::ERequested));
+				 switch(( subscribeParamSet->UPnPEvent() ).iStatus)
+					{
+					case TUPnPEvent::ESuccess:
+						{
+						/* Extract the uri and the expiry time which has been supplied by
+						 * the server and create a deltatimer entry using them
+						 */ 
+						TInt subscribeExpiryTime = subscribeParamSet->GetTimerExpiry();
+						const TDesC8& uri = subscribeParamSet->Uri();
+						observer = iElementArray->MatchElement(uri);
+						__ASSERT_DEBUG( observer != NULL, User::Panic(KUPnPResponseUriNotFound,KUPnPErrResponseUriNotFound));
+
+						CreateTimerEntryL(uri,subscribeExpiryTime);
+						}
+					break;
+
+					case TUPnPEvent::EFail:
+						{
+						const TDesC8& uri = subscribeParamSet->Uri();
+						observer=iElementArray->MatchElement(uri);
+						__ASSERT_DEBUG( observer != NULL, User::Panic(KUPnPResponseUriNotFound,KUPnPErrResponseUriNotFound));
+						iElementArray->RemoveElement(uri);
+						}
+					break;
+
+					default:
+						__ASSERT_DEBUG(0, User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+					}
+				}
+			}
+		break;
+
+		case EUPnPNotifyEventParamSet:
+			{
+			
+			// Eventing parameter set
+			family = aBundle.FindFamily( EUPnPNotifyEventParamSet );
+			TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;			
+			notifyParamSet = static_cast<CUPnPNotifyEventParamSet*> ( family.GetParameterSetAtIndex ( count - 1, RParameterFamily::ERequested ) );	
+			observer = iElementArray->MatchElement(notifyParamSet->Uri());
+			__ASSERT_DEBUG( observer != NULL, User::Panic(KUPnPResponseUriNotFound,KUPnPErrResponseUriNotFound));
+			}
+			break;
+		default:
+			__ASSERT_DEBUG(0, User::Panic(KUPnPInvalidFamily,KUPnPErrInvalidFamily));	
+		}
+	
+	observer->OnPnPEventL(aBundle) ;
+	}
+
+/* Makes a bundle on expiry of the timer and sends it the client application
+ * saying "Subscription has timed out"
+ */
+void CUPnPSubscribe::MakeBundleAndNotifyL(MPnPObserver* aObserver, HBufC8* aUri)
+	{
+	RPnPParameterBundleBase pnpBundle ;
+	pnpBundle.Open();		
+	CleanupClosePushL( pnpBundle );
+
+	RParameterFamily family = pnpBundle.CreateFamilyL(EUPnPSubscribeResponseParamSet);
+	// Create a new Param set
+    CUPnPSubscribeResponseParamSet* subscribeParamSet = CUPnPSubscribeResponseParamSet::NewL(family );
+    
+    // Set the values for the event
+    TUPnPEvent event;
+    event.iStatus=TUPnPEvent::ESubscriptionTimeout;
+    event.iErrorCode = KErrTimedOut;
+
+   // Set the values in the parameter set
+    subscribeParamSet->SetUPnPEvent(event);
+    subscribeParamSet->SetUriL ( *aUri );
+    subscribeParamSet->SetTimerExpiry(NULL);
+
+    CleanupStack::Pop( &pnpBundle);
+    delete aUri;
+    aObserver->OnPnPEventL( pnpBundle ) ;
+	}
+
+/* CancelDescribe is used to send cancel subscribe requests to the network
+ @param aServiceInfo The bundle which contains the list of uris whose describe
+ 		request should be cancelled
+ */
+void CUPnPSubscribe::CancelSubscribeL( const RPnPParameterBundle& aServiceInfo )
+	{
+	User::LeaveIfNull(iElementArray);	
+	RParameterFamily family = const_cast<RPnPParameterBundle&>(aServiceInfo).FindFamily( EUPnPCancelSubscribeParamSet );
+		
+	CUPnPCancelSubscribeParamSet* paramSet = NULL;
+	TUint count = family.CountParameterSets ( RParameterFamily::ERequested ) ;
+	
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+	{
+		paramSet = static_cast<CUPnPCancelSubscribeParamSet*> ( family.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested) );
+		//Extract the uri
+		const TDesC8& uri = paramSet->Uri();
+		__ASSERT_DEBUG( paramSet->Uri() != KNullDesC8, User::Panic( KUPnPInvalidUserInput, KUPnPErrInvalidInput ) );
+
+		// Removes the uri entry from the array if exists
+		for(TInt i=0;i<iTimerMappedArray.Count();i++)
+			{
+			if(iTimerMappedArray[i]->UriExists(uri) )
+				{
+				CTimerMappedUri* timerUri = iTimerMappedArray[i];
+				iDeltaTimer->Remove(timerUri->GetTimerEntry());
+				iTimerMappedArray.Remove(i);
+				delete timerUri;
+				break;
+				}
+			}
+		for( TInt i=0;i<iCallbackArray.Count();i++)
+			{
+			if(uri.CompareF(iCallbackArray[i]->GetUri()) == NULL)
+				{
+				CCallbackArgument* callArgument = iCallbackArray[i];
+				iCallbackArray.Remove(i);
+				delete callArgument;
+				break;
+				}
+			}
+
+		// Remove the entry from element array
+		MPnPObserver* observer = iElementArray->MatchElement( uri );
+		if ( !observer )
+			{		
+			reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL ( paramIndex );
+			continue;
+			}
+		iElementArray->RemoveElement( uri );
+		}
+	if ( family.CountParameterSets(RParameterFamily::ERequested) >= 1)
+		User::LeaveIfError(iSubConnection.SetParameters( aServiceInfo ));
+	
+	}
+
+/* The timer delay is adjusted to 90% of the subscription time.Also it is adjusted
+   for microseconds and IPC lag
+ */
+TInt CUPnPSubscribe::AdjustedDelay( TInt aTime )
+	{
+	TUint64 divisor = 10;
+	TUint64 temp; // just a placeholder
+	TUint64 q = Math::UDivMod64(aTime,divisor,temp);
+	temp = q*(divisor-1);
+	aTime = static_cast<TInt>(temp);
+
+	const TInt KIntTime = 1000000 ;
+	const TInt KInternalIPCLag = 1;
+	aTime = ( aTime + KInternalIPCLag ) * KIntTime ;
+	return aTime;
+	}
+
+/* CreateTimerEntry : creates the deltatimer entry and queues it up
+ */
+void CUPnPSubscribe::CreateTimerEntryL(const TDesC8& aUri ,TInt aExpiryTime)
+
+	{
+	CCallbackArgument* callArgument = CCallbackArgument::NewL(this,aUri);
+	CleanupStack::PushL(callArgument);
+	iCallbackArray.AppendL(callArgument);
+	CleanupStack::Pop();
+	
+	TCallBack callBack(OnTimerExpiry,callArgument);
+	iTimerEntry = new(ELeave) TDeltaTimerEntry( callBack );
+	iMappedUri = CTimerMappedUri::NewL(aUri, iTimerEntry,aExpiryTime);
+	iTimerMappedArray.AppendL(iMappedUri);
+	
+	// The time is set to 90% of the given time to allow the user
+	// to resubscribe before the expiry time
+	TInt time = AdjustedDelay(aExpiryTime);
+	TTimeIntervalMicroSeconds32 delay(time);
+	iDeltaTimer->Queue(delay,*iTimerEntry);
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/ecom_impl.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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 <ecom/implementationproxy.h>
+#include "upnpparamsextfactory.h"
+#include "upnpsubconneventsfactory.h"
+#include "upnpsubconnevents.h"
+#include "upnpparamset.h"
+#include "cupnpservicediscoveryimpl.h"
+#include "cupnpservicepublisherimpl.h"
+  
+const TImplementationProxy ImplementationTable[] =
+	{
+	IMPLEMENTATION_PROXY_ENTRY(KUPnPParamsFactoryUid, CUPnPParamsExtFactory::NewL),
+	IMPLEMENTATION_PROXY_ENTRY(KUPnPSubConnEventsUid, CUPnPSubConnEventsFactory::NewL),
+	IMPLEMENTATION_PROXY_ENTRY(KUPnPDiscoveryUid, CUPnPServiceDiscoveryImpl::NewL),
+	IMPLEMENTATION_PROXY_ENTRY(KUPnPPublisherUid, CUPnPServicePublisherImpl::NewL)
+	};
+
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+    {
+    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/pnputils.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,187 @@
+// 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 "pnputils.h"
+#include "cupnpservicediscoveryimpl.h"
+#include <inetprottextutils.h>
+#include <uriutils.h>
+
+const TUint KHttpDefaultPort = 80;
+
+/* Used to resolve the domain name into ipaddress
+ @param aResolver   The RHostResolver reference used to resolve the domain name
+ @param aUri		The url which has to be resolved into ip address
+ @param aSockAddr	The resolved address which will get written to on success
+ */
+void CUPnPUtils::ResolveHostAddressL ( RHostResolver& aResolver,const TDesC8& aUri, TInetAddr& aSockAddr )
+	{
+	TUriParser8 parsedUri;
+	parsedUri.Parse( aUri );
+	_LIT8(KScheme,"http");
+	const TDesC8& scheme = parsedUri.Extract( EUriScheme );
+	if ( scheme.CompareF( KScheme ))
+		User::Leave(KErrCorrupt);
+	// Check if the character followed by the scheme eg. http:// is a numeral. If
+	// so its already an ip address and hence no need to resolve
+	//If the first character following http:// is a number then its already
+	// an ipaddress and hence is returned as is		
+	const TDesC8& hostname = parsedUri.Extract( EUriHost );
+	if ( UriUtils::HostType( hostname ) == UriUtils::EIPv4Host )
+		{
+		RBuf hostBuf;
+		hostBuf.CreateL ( hostname.Length ( ) );
+				
+		hostBuf.Copy ( hostname );
+		aSockAddr.Input ( hostBuf );		
+		hostBuf.Close ( );
+		}
+	else if ( UriUtils::HostType( hostname ) == UriUtils::ETextHost )
+		{
+		RBuf tempBuf;
+		tempBuf.CreateL ( hostname.Length ( ) );		
+		tempBuf.Copy ( hostname );
+	
+		TNameEntry dnsHostEntry;
+		// Get the ip address corresponding to the hostname and write it to tempBuf
+		aResolver.GetByName( tempBuf, dnsHostEntry );
+		TInetAddr address = TInetAddr(dnsHostEntry().iAddr);
+		aSockAddr.SetAddress ( address.Address ( ) );
+		if ( address.Port () == 0 )
+			{			
+			aSockAddr.SetPort ( KHttpDefaultPort );
+			}
+		else
+			{
+			aSockAddr.SetPort ( address.Port () );
+			}	
+		
+		tempBuf.Close ( );
+		}
+	else
+		User::Leave(KErrCorrupt);
+	
+	if ( parsedUri.IsPresent ( EUriPort ) )
+		{
+		const TDesC8& portBuf = parsedUri.Extract( EUriPort );
+		TInt port;
+		InetProtTextUtils::ConvertDescriptorToInt ( portBuf, port );
+		aSockAddr.SetPort ( port );
+		}		
+	}
+
+/* Used to check whether uri conforms to given type. The uri types it checks are
+  1. upnp:rootdevice
+  2. urn:domain-name:service:serviceId
+  3. urn:domain-name:device:deviceId
+  4. uuid:
+  
+  @param aUri	The url whose validity must be checked
+  @param aType	The type of uri to be checked against
+  				If aType == EDevice Then aUri is of deviceType
+  				else if aType == EService Then aUri is of serviceType
+  				else if aType == EAny then aUri is generic
+ */
+TInt CUPnPUtils::GenericUriValidity ( const TDesC8& aUri , CUPnPUtils::TUriType aType)
+	{
+	_LIT8(KUrn,"urn");
+	_LIT8(KUpnp,"upnp:rootdevice");
+	_LIT8(KService,"service");
+	_LIT8(KDevice,"device");
+	_LIT8(KUuid,"uuid");
+	if(aUri.Length()<=5)
+		return KErrCorrupt;
+	
+	if((aType == CUPnPUtils::EDevice) || (aType == CUPnPUtils::EAny))
+		{
+		if ( aUri.Left(4) == KUuid && aUri[4] == ':')
+			return KErrNone;
+		// Test whether uri is "upnp:rootdevice"
+		if (aUri.CompareF(KUpnp) == NULL)
+			return KErrNone;
+		}
+	TLex8 uriParser(aUri);
+	TChar ch = ':';
+	uriParser.Mark();
+	while((uriParser.Eos() == EFalse) && uriParser.Peek() != ch)
+		uriParser.Inc();
+	if(uriParser.MarkedToken().CompareF(KUrn) == NULL)
+		{
+		// Reach the first character after the first delimiter ":"
+		uriParser.Inc();
+		if( !uriParser.Eos() )
+			uriParser.Inc();
+		
+		// Now move char pointer to the second delimiter
+		while((uriParser.Eos() == EFalse) && uriParser.Peek() != ch)
+			uriParser.Inc();
+		if (uriParser.Eos())
+			return KErrCorrupt;
+		
+		// Reach the the 2nd delimiter ":" and mark it. Now start searching
+		// from the next character
+		uriParser.Inc();
+		uriParser.Mark();
+		if( !uriParser.Eos() )
+			uriParser.Inc();
+		
+		// Now move char pointer to the 3rd delimiter
+		while((uriParser.Eos() == EFalse) && uriParser.Peek() != ch)
+			uriParser.Inc();
+		
+		// Extract the token in between it should be either "service" or "device"
+		const TDesC8& testUri = uriParser.MarkedToken();
+		TBool flag = EFalse;
+		if(aType == CUPnPUtils::EService && (testUri.CompareF(KService) == NULL))
+			flag = ETrue;
+		else if(aType == CUPnPUtils::EDevice && (testUri.CompareF(KDevice) == NULL))
+			flag = ETrue;
+		else if (aType == CUPnPUtils::EAny)
+			{
+			if ((testUri.CompareF(KDevice) == NULL) || (testUri.CompareF(KService)== NULL))
+				flag = ETrue;
+			}
+		
+		if (flag == EFalse )
+			return KErrCorrupt;
+		
+		// Now check for the remaining part of the uri
+		uriParser.Inc();
+		uriParser.Mark();
+		
+		if( !uriParser.Eos() )
+			uriParser.Inc();
+			
+		// Now move char pointer to the 4th delimiter
+		while((uriParser.Eos() == EFalse) && uriParser.Peek() != ch)
+			uriParser.Inc();
+		if( uriParser.Eos() )
+			return KErrCorrupt;
+		// The service/device suffix should be of length <=64
+		if((uriParser.MarkedToken()).Length() >64)
+			return KErrCorrupt;
+		// Now the first character outside the last colon should be a number
+		uriParser.Inc();
+		ch = uriParser.Peek();
+		if( ch >= 48 && ch <= 57 )
+			return KErrNone;
+		else
+			return KErrCorrupt;
+	
+		}
+	else
+		return KErrCorrupt;
+		
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/upnpparamsextfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,213 @@
+// 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 <e32base.h>
+#include <comms-infras/metabuffer.h>
+#include "upnpparamsextfactory.h"
+#include "upnpparamset.h"
+
+START_ATTRIBUTE_TABLE(CUPnPRequestParamSetBase, KUPnPParamsFactoryUid, EUPnPRequestParamSet)
+	REGISTER_ATTRIBUTE(CUPnPRequestParamSetBase, iUri, TMetaBuf8)	
+END_ATTRIBUTE_TABLE()
+
+START_ATTRIBUTE_TABLE(CUPnPResponseParamSetBase, KUPnPParamsFactoryUid, EUPnPResponseParamSet)
+	REGISTER_ATTRIBUTE(CUPnPResponseParamSetBase, iUPnPEvent, TMetaNumber)
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPRegisterAnnouncementParamSet, KUPnPParamsFactoryUid, EUPnPRegisterAnnouncementParamSet)
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPAbsenceAnnouncementParamSet, KUPnPParamsFactoryUid, EUPnPAbsenceAnnouncementParamSet)
+	REGISTER_ATTRIBUTE(CUPnPAbsenceAnnouncementParamSet, iUSN, TMetaBuf8)
+END_ATTRIBUTE_TABLE_BASE(CUPnPResponseParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPPresenceAnnouncementParamSet, KUPnPParamsFactoryUid, EUPnPPresenceAnnouncementParamSet)
+	REGISTER_ATTRIBUTE(CUPnPPresenceAnnouncementParamSet, iExpiration, TMetaNumber)
+	REGISTER_ATTRIBUTE(CUPnPPresenceAnnouncementParamSet, iLocation, TMetaBuf8)
+END_ATTRIBUTE_TABLE_BASE(CUPnPAbsenceAnnouncementParamSet, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPDiscoverRequestParamSet, KUPnPParamsFactoryUid, EUPnPDiscoverRequestParamSet)
+	REGISTER_ATTRIBUTE(CUPnPDiscoverRequestParamSet, iTimeToDelayResponse, TMetaNumber)
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPDiscoverResponseParamSet, KUPnPParamsFactoryUid, EUPnPDiscoverResponseParamSet)
+	REGISTER_ATTRIBUTE(CUPnPDiscoverResponseParamSet, iExpiration, TMetaNumber)	
+	REGISTER_ATTRIBUTE(CUPnPDiscoverResponseParamSet, iDeviceLocation, TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDiscoverResponseParamSet, iUSN, TMetaBuf8)
+END_ATTRIBUTE_TABLE_BASE(CUPnPResponseParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPDescribeRequestParamSet, KUPnPParamsFactoryUid, EUPnPDescribeRequestParamSet)
+	REGISTER_ATTRIBUTE(CUPnPDescribeRequestParamSet, iHostAddr, TMeta<TAppProtAddr>)
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPDescribeResponseParamSet, KUPnPParamsFactoryUid, EUPnPDescribeResponseParamSet)
+	REGISTER_ATTRIBUTE(CUPnPDescribeResponseParamSet, iDescription, TMetaBuf8)
+END_ATTRIBUTE_TABLE_BASE(CUPnPResponseParamSetBase, EUPnPResponseParamSet)
+
+START_ATTRIBUTE_TABLE(CUPnPSubscribeRequestParamSet, KUPnPParamsFactoryUid, EUPnPSubscribeRequestParamSet)
+	REGISTER_ATTRIBUTE(CUPnPSubscribeRequestParamSet, iTimeoutSeconds, TMetaNumber)
+	REGISTER_ATTRIBUTE(CUPnPSubscribeRequestParamSet, iRemoteHost, TMeta<TAppProtAddr>)
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPSubscribeResponseParamSet, KUPnPParamsFactoryUid, EUPnPSubscribeResponseParamSet)
+	REGISTER_ATTRIBUTE(CUPnPSubscribeResponseParamSet, iTimeoutSeconds, TMetaNumber)	
+END_ATTRIBUTE_TABLE_BASE(CUPnPResponseParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPNotifyEventParamSet, KUPnPParamsFactoryUid, EUPnPNotifyEventParamSet)		
+	REGISTER_ATTRIBUTE(CUPnPNotifyEventParamSet, iNotifyData, TMetaBuf8)
+END_ATTRIBUTE_TABLE_BASE(CUPnPResponseParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPCancelDiscoverParamSet, KUPnPParamsFactoryUid, EUPnPCancelDiscoverParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPCancelDescribeParamSet, KUPnPParamsFactoryUid, EUPnPCancelDescribeParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPCancelSubscribeParamSet, KUPnPParamsFactoryUid, EUPnPCancelSubscribeParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPCancelRegisterNotifyParamSet, KUPnPParamsFactoryUid, EUPnPCancelRegisterNotifyParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPServiceRegisterParamSet, KUPnPParamsFactoryUid, EUPnPServiceRegisterParamSet)
+	REGISTER_ATTRIBUTE(CUPnPServiceRegisterParamSet, iDeviceUid, TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPServiceRegisterParamSet, iCacheControl, TMetaNumber)
+	REGISTER_ATTRIBUTE(CUPnPServiceRegisterParamSet, iServiceDescription, TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPServiceRegisterParamSet, iInitialEventMessage, TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPServiceRegisterParamSet, iTimeOut, TMetaNumber)
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPDeviceRegisterParamSetBase, KUPnPParamsFactoryUid, EUPnPDeviceRegisterParamSetBase)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iCacheControl, TMetaNumber)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iParentDeviceUid, TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iFriendlyName , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iManufacturer , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iManufacturerURL , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iModelDescription , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iModelName , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iModelNumber , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iModelURL , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iPresentationURL , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iSerialNumber , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iUDN , TMetaBuf8)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetBase, iUPC , TMetaBuf8)	
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPDeviceRegisterParamSet, KUPnPParamsFactoryUid, EUPnPDeviceRegisterParamSet)
+END_ATTRIBUTE_TABLE_BASE(CUPnPDeviceRegisterParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPDeviceRegisterParamSetExt, KUPnPParamsFactoryUid, EUPnPDeviceRegisterParamSetExt)
+	REGISTER_ATTRIBUTE(CUPnPDeviceRegisterParamSetExt, iIconData, TMetaBuf8)
+END_ATTRIBUTE_TABLE_BASE(CUPnPDeviceRegisterParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPServiceNotificationParamSet, KUPnPParamsFactoryUid, EUPnPServiceNotificationParamSet)	
+	REGISTER_ATTRIBUTE(CUPnPServiceNotificationParamSet, iNotifyData, TMetaBuf8)	
+END_ATTRIBUTE_TABLE_BASE(CUPnPRequestParamSetBase, 0)
+
+START_ATTRIBUTE_TABLE(CUPnPPublishResponseParamSet, KUPnPParamsFactoryUid, EUPnPPublishResponseParamSet)		
+END_ATTRIBUTE_TABLE_BASE(CUPnPResponseParamSetBase, 0)
+
+
+CUPnPParamSetBase* CUPnPParamsExtFactory::NewL ( TAny* aConstructionParams )
+	{
+	//TUPnPParamSetFamily familyType = REINTERPRET_CAST ( TUPnPParamSetFamily, *aConstructionParams );	
+	const TInt32 familyType = reinterpret_cast<TInt32>(aConstructionParams);
+	CUPnPParamSetBase* myUPnPParamBase = NULL;
+	switch ( familyType )
+		{
+		case EUPnPRegisterAnnouncementParamSet:		
+			myUPnPParamBase = new (ELeave) CUPnPRegisterAnnouncementParamSet;
+		break;
+
+		case EUPnPAbsenceAnnouncementParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPAbsenceAnnouncementParamSet;
+		break;
+
+		case EUPnPPresenceAnnouncementParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPPresenceAnnouncementParamSet;
+		break;
+
+		case EUPnPDiscoverRequestParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPDiscoverRequestParamSet;
+		break;
+
+		case EUPnPDiscoverResponseParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPDiscoverResponseParamSet;
+		break;
+
+		case EUPnPDescribeRequestParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPDescribeRequestParamSet;
+		break;
+
+		case EUPnPDescribeResponseParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPDescribeResponseParamSet;
+		break;
+				
+		case EUPnPSubscribeRequestParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPSubscribeRequestParamSet;
+		break;
+
+		case EUPnPSubscribeResponseParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPSubscribeResponseParamSet;
+		break;
+
+		case EUPnPNotifyEventParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPNotifyEventParamSet;
+		break;
+
+
+		case EUPnPCancelDiscoverParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPCancelDiscoverParamSet;
+		break;
+		
+		case EUPnPCancelDescribeParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPCancelDescribeParamSet;
+		break;
+		
+		case EUPnPCancelSubscribeParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPCancelSubscribeParamSet;
+		break;
+		
+		case EUPnPCancelRegisterNotifyParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPCancelRegisterNotifyParamSet;
+		break;
+		
+		case EUPnPServiceRegisterParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPServiceRegisterParamSet;
+		break;
+		
+		case EUPnPDeviceRegisterParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPDeviceRegisterParamSet;
+		break;
+		
+		case EUPnPServiceNotificationParamSet:
+			myUPnPParamBase = new (ELeave) CUPnPServiceNotificationParamSet;
+		break;
+				
+		case EUPnPPublishResponseParamSet:
+			myUPnPParamBase	= new (ELeave) CUPnPPublishResponseParamSet;
+		break;
+		
+		case EUPnPDeviceRegisterParamSetExt:
+			myUPnPParamBase = new (ELeave) CUPnPDeviceRegisterParamSetExt;
+		break;
+		
+		default:
+			ASSERT(0);
+		break;
+		}
+	return myUPnPParamBase;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/src/upnpsubconneventsfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// upnpsubconnevents.cpp
+// 
+//
+
+#include <comms-infras/metadata.h>
+#include <comms-infras/metatype.h>
+#include "upnpsubconneventsfactory.h"
+#include "upnpsubconnevents.h"
+
+
+START_ATTRIBUTE_TABLE( CUPnPSubConnEvent, KUPnPSubConnEventsUid, KUPnPSubConnEvent )	
+	REGISTER_ATTRIBUTE( CUPnPSubConnEvent, iFamilyId, TMetaNumber)	
+END_ATTRIBUTE_TABLE()
+
+
+CSubConNotificationEvent* CUPnPSubConnEventsFactory::NewL(TAny* aConstructionParameters)
+	{
+	TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters);
+	switch (type)
+		{
+		case (KUPnPSubConnEvent):
+			return new (ELeave) CUPnPSubConnEvent;
+		default:
+			ASSERT(0);
+			break;
+		}		
+	return NULL;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/group/UPnPIntegTest.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,36 @@
+// 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 __UPNPINTEGTEST_IBY__
+#define __UPNPINTEGTEST_IBY__
+
+#include "ced.iby"
+#include "ceddump.iby"
+#include "test_synchronize_client.iby"
+#include "test_synchronize_server.iby"
+#include "multiple_machines_client.iby"
+#include "multiple_machines_server.iby"
+
+#endif
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+// 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:
+//
+
+// Subproject builds
+#include "../testupnp/group/bld.inf"
+#include "../testsynchronization/group/bld.inf"
+#include "../testdelay/group/bld.inf"
+
+
+PRJ_TESTEXPORTS
+UPnPIntegTest.iby		/epoc32/rom/include/upnpintegtest.iby
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,29 @@
+// 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:
+//
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+multiple_machines_client.iby  /epoc32/rom/include/multiple_machines_client.iby
+multiple_machines_server.iby  /epoc32/rom/include/multiple_machines_server.iby
+
+//Client scripts
+
+PRJ_TESTMMPFILES
+multiple_machines_client.mmp
+multiple_machines_server.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/group/multiple_machines_client.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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:
+//
+
+TARGET      	multiple_machines_client.exe
+TARGETTYPE  	exe
+UID		0x1000007A 0xA0009306
+VENDORID 	0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+SOURCE 			testupnpmanager.cpp
+
+SOURCEPATH		../../testupnp/src
+SOURCE 			testupnp.cpp
+SOURCE			testrcontrolchannel.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE		../../testupnp/inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/upnp
+SYSTEMINCLUDE		/epoc32/include/test
+SYSTEMINCLUDE		/epoc32/include/ecom
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			pnp.lib
+LIBRARY			esock.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+LIBRARY			upnputils.lib
+LIBRARY			inetprotutil.lib
+LIBRARY         insock.lib
+LIBRARY         commdb.lib
+LIBRARY			cinidata.lib
+LIBRARY			upnpdescription.lib
+LIBRARY         netmeta.lib
+LIBRARY         nodemessages.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/group/multiple_machines_server.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,56 @@
+// 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:
+//
+
+TARGET      	multiple_machines_server.exe
+TARGETTYPE  	exe
+UID		0x1000007A 0xA0009307
+VENDORID 	0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+SOURCE 			testupnpmanager.cpp
+
+SOURCEPATH		../../testupnp/src
+SOURCE 			testupnp.cpp
+SOURCE			testrcontrolchannel.cpp
+
+
+USERINCLUDE		../inc
+USERINCLUDE		../../testupnp/inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/upnp
+SYSTEMINCLUDE		/epoc32/include/test
+SYSTEMINCLUDE		/epoc32/include/ecom
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			pnp.lib
+LIBRARY			esock.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+LIBRARY			upnputils.lib
+LIBRARY			inetprotutil.lib
+LIBRARY        	insock.lib
+LIBRARY        	commdb.lib
+LIBRARY			cinidata.lib
+LIBRARY			upnpdescription.lib
+LIBRARY         netmeta.lib
+LIBRARY         nodemessages.lib
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/inc/testupnp.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+// 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:
+// Contains declarations of CTestUPnP class
+// 
+//
+
+#ifndef __TEST_UPNP_H__
+#define __TEST_UPNP_H__
+#include <testexecuteserverbase.h>
+
+/*
+CTestUPnP class which is derived from the Test server and provides the functionalities to 
+perform ability to run individual test steps (test cases or part testcases) either sequentially 
+or concurrently within scripts (test harnesses). 
+*/
+
+class CTestUPnP : public CTestServer
+	{
+public:
+	static CTestUPnP* NewL();
+	// Base class pure virtual override
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+
+protected:
+	CTestStep*    CreateTestStepL(const TDesC& aStepName);
+	};
+
+#endif // __TEST_UPNP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/oomtest/src/testupnpmanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,3044 @@
+// 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:
+// Contains implementation of CTestUPnPManager class
+// Contains implemenatation of CTestUPnPManager, CUPnPObserver, CUPnPTimer, 
+// and CAction classes
+// 
+//
+
+#include "testupnpmanager.h"
+
+
+/*
+  Constructor:
+  @internalTechnology
+  @test
+*/
+CTestUPnPManager::CTestUPnPManager()
+:	CTestStep()
+	{
+	iCancelDiscovery = EFalse;
+	iExpectedData = EFalse;
+	iDiscoverySuccess = EFalse;
+	iNotifyCount = 0;
+	iPublishCount = 0;
+	iDescribeResponseCount = 0;
+	iRenewCount = 0;
+	iFailedNumUris = 0;
+	}
+
+/*
+   Initializes all member vaiables.
+   @param		None.
+   @return		None.
+*/
+void CTestUPnPManager::InitializeL()
+	{
+	iScheduler = new (ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iScheduler);
+	
+	_LIT(KInfoLogFile, "SequenceOperationsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	TPtrC listOfSequences;
+	_LIT(KListOfSequences, "listofsequences");
+	GetStringFromConfig(ConfigSection(), KListOfSequences, listOfSequences);
+
+	TokenizeStringL(listOfSequences, iSequenceList);
+	iNumOperations = iSequenceList.Count();
+
+	}
+
+/*
+   Destructor
+   @internalTechnology
+   @test
+*/
+CTestUPnPManager::~CTestUPnPManager()
+	{
+	}
+
+void CTestUPnPManager::ClosePublisher()
+	{
+	_LIT(KInfoLogFile, "ClosePublisher....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	CancelPublish();
+	}
+
+void CTestUPnPManager::CloseDiscoverer()
+	{
+	iControlPoint.Close();
+	}
+
+void CTestUPnPManager::CleanUpObserverArray()
+	{
+	_LIT(KInfoLogFile, "CleanUpObserverArray....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	if (iObserverArray.Count() > 0 )
+		{
+		iObserverArray.ResetAndDestroy();
+		}
+	else
+		{
+		iObserverArray.Close();
+		}
+	_LIT(KInfoLogFile1, "CleanUpObserverArray End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::CleanUpResultsArray()
+	{
+	_LIT(KInfoLogFile, "CleanUpResultsArray....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iResultsArray.Count();
+		for (TInt index(0); index < count ; index++ )
+			{
+			iResultsArray[index]->Close();
+			}
+	iResultsArray.Close();
+	_LIT(KInfoLogFile1, "CleanUpResultsArray End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::DescriptionSuiteCleanUp()
+	{
+	_LIT(KInfoLogFile, "DescriptionSuiteCleanUp....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iDescriptionSuiteArray.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iDescriptionSuiteArray[index].iBaseUrl.Close();
+		iDescriptionSuiteArray[index].iDescription.Close();
+		DeleteSeriveUrlsList(index);
+		}
+	iDescriptionSuiteArray.Close();
+	_LIT(KInfoLogFile1, "DescriptionSuiteCleanUp End...\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ScpdUriArrayCleanUp()
+	{
+	_LIT(KInfoLogFile, "ScpdUriArrayCleanUp....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iScpdUriArray.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iScpdUriArray[index].Close();
+		}
+	iScpdUriArray.Close();
+	_LIT(KInfoLogFile1, "ScpdUriArrayCleanUp End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::EventUriArrayCleanUp()
+	{
+	_LIT(KInfoLogFile, "EventUriArrayCleanUp....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iEventUriArray.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iEventUriArray[index].Close();
+		}
+	iEventUriArray.Close();
+	_LIT(KInfoLogFile1, "EventUriArrayCleanUp End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ControlUriArrayCleanUp()
+	{
+	_LIT(KInfoLogFile, "ControlUriArrayCleanUp....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iControlUriArray.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iControlUriArray[index].Close();
+		}
+	iControlUriArray.Close();
+	_LIT(KInfoLogFile1, "ControlUriArrayCleanUp End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+   Implementation of CTestStep base class virtual and this is used for doing all
+   initialisation common
+    to derived classes here.
+   @param  None
+   @return TVerdict
+ */
+TVerdict CTestUPnPManager::doTestStepPreambleL()
+	{
+	InitializeL();
+	SavePreviousLogFileL();
+	return CTestStep::doTestStepPreambleL();
+	}
+
+/*
+ Save the previous log file...if any
+*/
+void CTestUPnPManager::SavePreviousLogFileL()
+	{
+	_LIT(KInfoLogFile, "Saving Previous logs If any.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RFs fileserv;
+	TInt error = fileserv.Connect();
+	if(!error)
+		{
+		_LIT(KlogFile, "C:\\logs\\log.txt");
+		_LIT(KPrefixLog, "C:\\upnplogs\\");
+		_LIT(KSuffix, "_UDEB");
+		_LIT(KExtn, ".txt");
+		
+		CFileMan* fMan = NULL;
+		TRAP_IGNORE(fMan = CFileMan::NewL(fileserv));
+		if(fMan != NULL)
+			{
+			CleanupStack::PushL(fMan);
+			RBuf newFileName;
+			const TInt KTwentyFour = 24;
+			newFileName.Create(ConfigSection().Length() + KTwentyFour );
+			newFileName.Copy(KPrefixLog);
+			//Script file name
+			iScriptName.Copy(ConfigSection());
+			newFileName.Append(iScriptName);
+			newFileName.Append(KSuffix);
+			newFileName.Append(KExtn);
+			
+			TInt error = fMan->Rename(KlogFile, newFileName);
+			if (error != KErrNone)
+				{
+				_LIT(KErrInfo, "Unable to Save Previous logs...May be NO Previous logs exist \n");
+				ERR_PRINTF1(KErrInfo);
+				}
+			else
+				{
+				_LIT(KSavingInfo, "<font color=0000ff><b>Saved Previous logs with File Name: <u>%S</u> </b></font> \n");
+				INFO_PRINTF2(KSavingInfo, &newFileName);
+				}
+			CleanupStack::PopAndDestroy(fMan);
+			newFileName.Close();
+			}
+		}
+	fileserv.Close();
+	_LIT(KInfoLogFile1, "Saving Previous logs End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+ return Script File name..if any
+*/
+const TDesC& CTestUPnPManager::ScriptFileName()
+	{
+	return iScriptName;
+	}
+
+/*
+   Implementation of CTestStep base class virtual and it is used for doing all
+   after test treatment common to derived classes in here.
+   @return TVerdict
+ */
+TVerdict CTestUPnPManager::doTestStepPostambleL()
+	{
+		_LIT(KInfoDesctructorBegin, "Begin: In Destructor CTestUpnPanager....\n");
+	INFO_PRINTF1(KInfoDesctructorBegin);
+	if(iStringPoolMgr)
+		{
+		iStringPoolMgr->Release();
+		//this will tkae care of clean up of iStringPool
+		}
+	_LIT(KInfoDesctructorBegin2, "Releasing String Pool Manager....\n");
+	INFO_PRINTF1(KInfoDesctructorBegin2);
+		
+	CleanUpObserverArray();
+	iDeviceLocationArray.Close();
+	CleanUpResultsArray();
+	DescriptionSuiteCleanUp();
+	ScpdUriArrayCleanUp();
+	ControlUriArrayCleanUp();
+	EventUriArrayCleanUp();
+	CloseDiscoverer();
+	//#ifdef _DEBUG
+		ClosePublisher();
+		CActiveScheduler::Install(NULL); //Testing for ONB hangs
+		_LIT(KInfoDesctructorBegin1, "Deleting the Active Schedulers....\n");
+		INFO_PRINTF1(KInfoDesctructorBegin1);
+		delete iScheduler;
+		iScheduler = NULL;	
+	//#endif //_Debug
+
+	iPublisherObserverMap.Close();	
+	_LIT(KInfoDesctructorEnd, "End: ....In Destructor CTestUpnPanager\n");
+	INFO_PRINTF1(KInfoDesctructorEnd);
+
+	return CTestStep::doTestStepPostambleL();
+	}
+
+
+TVerdict CTestUPnPManager::doTestStepL()
+	{
+	SequenceOperationsL();
+	return TestStepResult();
+	}
+
+/*
+   This function performs operations based on sequence specified in the ini file
+   @param  None
+   @return None
+*/
+void CTestUPnPManager::SequenceOperationsL()
+	{
+	for(TInt i(0); i < iNumOperations; i++)
+		{
+		SetCurrentSection(iSequenceList[i]);
+		TPtrC operationType;
+		_LIT(KOperationType, "operationtype");
+		GetStringFromConfig(iSequenceList[i], KOperationType, operationType);
+		PerformDesiredOperationsL(iSequenceList[i], operationType);
+		}
+	}
+
+/*
+   This function performs desired operations specified as a parameter
+   @param  aOperation string representing operation to be performed
+   @return None
+*/
+void CTestUPnPManager::PerformDesiredOperationsL(const TDesC& aOperation, const TDesC& operationType)
+	{
+	const TInt KMatch = 0;
+//	TPtrC operationType;
+//	_LIT(KOperationType, "operationtype");
+//	GetStringFromConfig(aOperation, KOperationType, operationType);
+	
+	if(operationType.Compare(KOpenDiscoverer) == KMatch)
+		{
+		DoTestOOML(EOpenDiscover);
+		}
+	else if(operationType.Compare(KDiscovery) == KMatch)
+		{
+		TPtrC listOfServiceTypes;
+		TPtrC listOfMxTimes;
+		_LIT(KListOfServiceTypes, "listofservicetypes");
+		_LIT(KListOfMxTimes, "listofmxtimes");
+		if(!GetStringFromConfig(GetCurrentSection(), KListOfServiceTypes, listOfServiceTypes)
+			|| !GetStringFromConfig(GetCurrentSection(), KListOfMxTimes, listOfMxTimes))
+			{
+			_LIT(KErrInfo, "Problem in reading values from ini. \n Expected fields are: \n%S, \n%S \n");
+			ERR_PRINTF3( KErrInfo, &KListOfServiceTypes, &KListOfMxTimes );
+			//SetTestStepResult(EFail);
+			return;
+			}
+		TokenizeStringL(listOfServiceTypes, iServiceTypeList);
+		TokenizeStringL(listOfMxTimes, iMxTimeList);
+
+		DoTestOOML(EDiscover);
+		}
+	else if(operationType.Compare(KCancelDiscover) == KMatch)
+		{
+		CancelDiscoverL(aOperation);
+		}
+	else if(operationType.Compare(KCancelDescribe) == KMatch)
+		{
+		CancelDescribeL(aOperation);
+		}
+	else if(operationType.Compare(KPublishService) == KMatch)
+		{
+		TPtrC iServiceType;
+		GetStringFromConfig(aOperation, KServiceType, iServiceType);
+
+		TPtrC iUsn;
+		GetStringFromConfig(aOperation, KUSN, iUsn);
+		
+		TInt iDuration;
+		GetIntFromConfig(aOperation, KCacheControl, iDuration);
+		
+		TPtrC iDescription;
+		GetStringFromConfig(aOperation, KDescription, iDescription);
+		
+		TPtrC descriptionPath;
+		_LIT(KDescriptionPath, "Description_Path");
+		GetStringFromConfig(aOperation, KDescriptionPath, iDescriptionPath);
+
+		DoTestOOML(EPublishService);
+//		PublishServiceL(aOperation);
+		}
+	else if(operationType.Compare(KPublishDevice) == KMatch)
+		{
+		GetStringFromConfig(aOperation, KParentDeviceUid, iParentdeviceuid);
+		GetStringFromConfig(aOperation, KDeviceType, iDevicetype);
+		GetStringFromConfig(aOperation, KFriendlyName, iFriendlyname);
+		GetStringFromConfig(aOperation, KManufacturer, iManufacturer);
+		GetStringFromConfig(aOperation, KManufacturerURL, iManufacturerurl);
+		GetStringFromConfig(aOperation, KModelDescription, iModeldescription);
+		GetStringFromConfig(aOperation, KModelName, iModelname);
+		GetStringFromConfig(aOperation, KModelNumber, iModelnumber);
+		GetStringFromConfig(aOperation, KModelURL, iModelurl);
+		GetStringFromConfig(aOperation, KPresentationURL, iPresentationurl);
+		GetStringFromConfig(aOperation, KSerialNumber, iSerialnumber);
+		GetStringFromConfig(aOperation, KUDN, iUdn);
+		GetStringFromConfig(aOperation, KUPC, iUpc);
+		GetIntFromConfig(aOperation, KCacheControl, iDuration);
+		DoTestOOML(EPublishDevice);
+		}
+	else if(operationType.Compare(KDescribe) == 0)
+		{
+		DescribeL();
+		}
+	else if(operationType.Compare(KDescribeService) == 0)
+		{
+		DescribeServiceL();
+		}
+	else if(operationType.Compare(KSubscribe) == 0)
+		{
+		SubscribeForStateChangeNotificationsL();
+		}
+	else if(operationType.Compare(KUnsubscribe) == 0)
+		{
+		UnsubscribeForStateChangeNotificationsL(aOperation);
+		}
+	else if(operationType.Compare(KRegisterAnnouncement) == KMatch)
+		{
+		RegisterForAnnouncementsL(aOperation);
+		}
+	else if(operationType.Compare(KCancelNotify) == KMatch)
+		{
+		CancelNotifyAnnouncementL(aOperation);
+		}
+	else if(operationType.Compare(KInitiateControl) == KMatch)
+		{
+		InitiateActionL(aOperation);
+		}
+	else if(operationType.Compare(KStartScheduler) == KMatch)
+		{
+		CActiveScheduler::Start();
+		}
+	else if(operationType.Compare(KStopScheduler) == KMatch)
+		{
+		CActiveScheduler::Stop();
+		}
+	else if(operationType.Compare(KStartTimer) == KMatch)
+		{
+		StartTimerL(aOperation);
+		}
+	else if(operationType.Compare(KPrintResults) == 0)
+		{
+		PrintAndValidateResultsL(aOperation);
+		}
+	}
+
+/*
+   Parses a comma separated string and constructs a list out of the values
+   @param	aString a reference to a string to be tokenized
+   @param	aList is an out parameter to store a list of tokens in an arry
+   @param	aSeparator is a character used to delimit the tokens
+  */
+void CTestUPnPManager::TokenizeStringL(const TDesC& aString, RArray<TPtrC>& aList, TChar aSeparator)
+	{
+	TLex lexer(aString);
+
+	while(!lexer.Eos())
+		{
+		lexer.SkipSpaceAndMark();
+
+		while(!lexer.Eos() && lexer.Get() != aSeparator)
+			{
+			}
+
+		if(!lexer.Eos())
+			{
+			lexer.UnGet();
+			}
+		aList.AppendL(lexer.MarkedToken());
+		lexer.Inc();
+		}
+	}
+
+/*
+   Starts a timer for a wait time and triggers CallBack function as timer expires.
+   @param	None
+   @return	None
+ */
+void CTestUPnPManager::StartTimerL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "StartTimerL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	_LIT(KWaitTime,"waittime");
+	TInt waitTime = 0;
+	GetIntFromConfig(aOperationType, KWaitTime, waitTime);
+//	TTimeIntervalMicroSeconds32 interval(waitTime);
+	CUPnPTimer* timer = CUPnPTimer::NewL(this);
+	CleanupStack::PushL(timer);
+	timer->IssueRequestL(waitTime);
+	CActiveScheduler::Start();
+	CleanupStack::PopAndDestroy(timer);
+	_LIT(KInfoLogFile1, "StartTimerL End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+   Sets the current config section.
+   @param	aCurrentSection - a reference string that represent current config section
+   @return	None
+ */
+void CTestUPnPManager::SetCurrentSection(const TDesC& aCurrentSection)
+	{
+	iCurrentSection = aCurrentSection;
+	}
+
+/*
+   Retrieve the current config section.
+   @param
+   @return	Reference to current config section
+ */
+TDesC& CTestUPnPManager::GetCurrentSection()
+	{
+	return	iCurrentSection;
+	}
+
+/*
+	Tests whether discovering services/devices is performing as specified in UPnP specifications.
+	@param		aOperationType is reference to a section name in ini file where required parameters
+				needs to be referred for this operation.
+	@return		None.
+ */
+void CTestUPnPManager::DiscoverL()
+	{
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.AppendL(upnpObserver);
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+	CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL ( *pnpBundle , EUPnPDiscoverRequestParamSet );
+	TInt numUris = iServiceTypeList.Count();
+	iFailedNumUris = iServiceTypeList.Count(); //This should be of Unique Uri's count
+	TInt numMxs = iMxTimeList.Count();
+	TLex responseTimeObj;
+	RBuf8 buf;
+	buf.CreateL(KMaxUriSize);
+	for(TInt i(0); i < numUris; i++)
+		{
+		CUPnPDiscoverRequestParamSet* discoverParamSet = CUPnPDiscoverRequestParamSet::NewL(pnpFamily );
+		buf.Copy(iServiceTypeList[i]);
+		discoverParamSet->SetUriL( buf );
+		//response time
+		responseTimeObj.Assign(iMxTimeList[i]);
+		TInt responseTime(0);
+		responseTimeObj.Val(responseTime);
+		discoverParamSet->SetResponseTime(responseTime);
+		}
+	iControlPoint.Discover(*pnpBundle);
+	CActiveScheduler::Start();
+
+	buf.Close();
+	iMxTimeList.Close();
+	iServiceTypeList.Close();
+	CleanupStack::PopAndDestroy( pnpBundle );
+	}
+
+TBool CTestUPnPManager::IsDiscoverySuccess()
+	{
+	return iDiscoverySuccess;
+	}
+
+void CTestUPnPManager::SetDiscoveryStatus(TBool aSuccess)
+	{
+	_LIT(KInfoDiscoverSetStatus, "Setting iDiscoverySuccesss Flag to %d \n");
+	INFO_PRINTF2(KInfoDiscoverSetStatus, aSuccess );
+	iDiscoverySuccess = aSuccess;
+	}
+
+/*
+	Tests whether Publishing a Service/Device is performing as specified in UPnP specifications.
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void CTestUPnPManager::PublishServiceL ()
+	{
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	//To keep track of mapping between Observer and Publisher
+	TInt observerIndex = iObserverArray.Count() - 1;
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+    CleanupClosePushL( *pnpBundle );
+    pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPServiceRegisterParamSet );
+   	CUPnPServiceRegisterParamSet* registerServiceParamSet = CUPnPServiceRegisterParamSet::NewL(pnpFamily );
+	RBuf8 serviceTypeBuf;
+	serviceTypeBuf.Create(iServiceType.Length());
+	serviceTypeBuf.Copy(iServiceType);
+
+	RBuf8 usnBuf;
+	usnBuf.Create(iUsn.Length());
+	usnBuf.Copy(iUsn);
+
+	RBuf8 descriptionBuf;
+	descriptionBuf.Create(iDescription.Length());
+	descriptionBuf.Copy(iDescription);
+
+	registerServiceParamSet->SetUriL ( serviceTypeBuf );
+	registerServiceParamSet->SetDeviceUidL ( usnBuf );
+	registerServiceParamSet->SetCacheControlData ( iDuration );
+	registerServiceParamSet->SetSubscriptionDuration(300);
+	
+	ExtractServiceDescriptionL (*registerServiceParamSet);
+
+	_LIT8(KInitialMessage, "Initial Service Message");
+	registerServiceParamSet->SetInitialMessageL(KInitialMessage);
+
+	//To keep track of mapping between Observer and Publisher
+	TInt publisherIndex = OpenPublisherL();
+	//Create mapping of Publsiher and observer
+	TPublisherObserverMap publisherObserverMapElement;
+	publisherObserverMapElement.iPublisherIndex = publisherIndex;
+	publisherObserverMapElement.iObserverIndex =  observerIndex;
+	publisherObserverMapElement.iPublisherControl = KService;
+	iPublisherObserverMap.Append(publisherObserverMapElement);
+
+	//Publish service nad update publish count
+	iPublishCount++;
+	iPublisherArray[publisherIndex].Publish(*pnpBundle);
+
+	descriptionBuf.Close();
+	usnBuf.Close();
+	serviceTypeBuf.Close();
+	CleanupStack::PopAndDestroy( pnpBundle );
+	}
+	
+/*
+ * Get publisher mapping index for the given observer index
+ */
+TInt CTestUPnPManager::GetPublisherIndex (TInt aObserverIndex)
+	{
+	_LIT(KInfoLogFile, "GetPublisherIndex.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt count = iPublisherObserverMap.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		if (iPublisherObserverMap[index].iObserverIndex == aObserverIndex)
+			{
+			return iPublisherObserverMap[index].iPublisherIndex;
+			}
+		}
+	return KErrNotFound;
+	}
+
+/*
+ * Gets publisher control i.e, Device/Service for the given observer index
+ */
+TPublisherControl CTestUPnPManager::GetPublisherControl (TInt aObserverIndex)
+	{
+	_LIT(KInfoLogFile, "GetPublisherControl.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt count = iPublisherObserverMap.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		if (iPublisherObserverMap[index].iObserverIndex == aObserverIndex)
+			{
+			return iPublisherObserverMap[index].iPublisherControl;
+			}
+		}
+	return KErrNoControl;
+	}
+
+/*
+ * Gets publisher control i.e, Device/Service for the given observer index
+ */
+TPublisherControl CTestUPnPManager::PublisherType (TInt aPublisherIndex)
+	{
+	_LIT(KInfoLogFile, "PublisherType.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iPublisherObserverMap.Count();
+	TPublisherControl publisherControl = KErrNoControl;
+	for (TInt index(0); index < count ; index++ )
+		{
+		if (iPublisherObserverMap[index].iPublisherIndex == aPublisherIndex)
+			{
+			switch (iPublisherObserverMap[index].iPublisherControl)
+				{
+				case KService:
+					{
+					publisherControl = KService;
+					break;
+					}
+				case KDevice:
+					{
+					publisherControl = KDevice;
+					break;
+					}
+				default :
+					{
+					publisherControl = KErrNoControl;
+					break;
+					}
+				}
+			}
+		}
+	_LIT(KInfoLogFile2, "PublisherType....End \n");
+	INFO_PRINTF1(KInfoLogFile2);
+	return publisherControl;
+	}
+
+TInt CTestUPnPManager::NotifyCount()
+	{
+	return iNotifyCount;
+	}
+
+TBool CTestUPnPManager::SendNotificationsL (CUPnPObserver* aObserver)
+	{
+	_LIT(KInfoLogFile, "SendNotificationsL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+    TInt observerIndex = iObserverArray.Find(aObserver);
+    TInt publisherIndex = GetPublisherIndex(observerIndex);
+    TPublisherControl publisherControl = GetPublisherControl(observerIndex);
+
+    if(publisherControl != KService)
+    	{
+    	_LIT(KSendNotifyErr,"SEND NOTIFY NOT EXECUTED -- Can be Executed only ON Services...\n");
+    	ERR_PRINTF1(KSendNotifyErr);
+    	return EFalse;
+    	}
+
+    CPnPParameterBundle* pnpBundle = CPnPParameterBundle ::NewL( );
+    CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)this);
+
+    CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPServiceNotificationParamSet);
+    CUPnPServiceNotificationParamSet* ServiceNotifyParamSet = CUPnPServiceNotificationParamSet::NewL (pnpFamily );
+
+	RBuf8 notificationDataBuf;
+	notificationDataBuf.CreateL(_L8("notification"));
+
+	ServiceNotifyParamSet->SetNotificationL (notificationDataBuf );
+	iNotifyCount++;
+	if(publisherIndex >= 0)
+		{
+		iPublisherArray[publisherIndex].SendNotify(*pnpBundle );
+		_LIT(KSendNotify,"Info: SEND NOTIFY SUCCESSFUL...\n");
+		INFO_PRINTF1(KSendNotify);
+		}
+	else
+		{
+		_LIT(KSendNotifyFailed,"Err: SEND NOTIFY UNSUCCESSFUL...\n");
+		ERR_PRINTF1(KSendNotifyFailed);
+		}
+
+	CleanupStack::PopAndDestroy( pnpBundle );
+	notificationDataBuf.Close();
+	_LIT(KInfoLogFile1, "SendNotificationsL End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	return ETrue;
+	}
+
+/*
+	Extract service description available in a file, copy it to the buffer and append the same to service register paramset.
+	@param			aConfigSection - reference to a section name in ini file where required parameters that needs to be referred for this operation.
+					aServiceRegisterParamSet - Storage for the description buffer
+	@return			None.
+ */
+
+void CTestUPnPManager::ExtractServiceDescriptionL (CUPnPServiceRegisterParamSet& aServiceRegisterParamSet)
+	{
+	if((iDescriptionPath == KNullDesC) && (iDescription == KNullDesC)) 
+		{
+		_LIT8(KDefaultServiceDescription, "defaultservicedescription");
+		TBuf8<KMaxBufLength> descBuf;
+		descBuf.Copy(KDefaultServiceDescription);
+		aServiceRegisterParamSet.SetServiceDescriptionL (descBuf);
+		return;
+		}
+	else
+		{
+		RFs fs;
+		RFile file;
+		TInt err;
+		RBuf8 buf;
+		User::LeaveIfError(fs.Connect());
+		CleanupClosePushL(fs);
+		if(iDescriptionPath != KNullDesC)
+			{
+			err = file.Open(fs, iDescriptionPath, EFileShareReadersOnly);
+			}
+		else 
+			{
+			err = file.Open(fs, iDescription, EFileShareReadersOnly);
+			}
+
+		if (err != KErrNone)
+			{
+			User::LeaveIfError(err);
+			}
+		CleanupClosePushL(file);
+		TInt fileSize = 0;
+		file.Size(fileSize);
+		buf.Create(fileSize);
+		err = file.Read(buf, fileSize);
+		aServiceRegisterParamSet.SetServiceDescriptionL ( buf );
+		_LIT(KServiceDescription, "ServiceDescription is.... %S \n");
+		INFO_PRINTF2(KServiceDescription, &buf);
+		CleanupStack::PopAndDestroy(2);
+		buf.Close();
+		}
+	_LIT(KInfoLogFile1, "ExtractServiceDescriptionL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ResolveScpdUrisL(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "ResolveScpdUrisL .... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	if ( aIndex < 0 )
+		{
+		_LIT(KBadIndex, "BadIndex...ResolveScpdUrisL Cannot be executed \n");
+		ERR_PRINTF1(KBadIndex);
+		return;
+		}
+	const TInt KSlashLenghth = 1;
+	TUriParser8 uri;
+	uri.Parse(iDescriptionSuiteArray[aIndex].iBaseUrl);
+	TBuf8<KMaxUriSize> buf;
+	buf.Copy(uri.Extract(EUriScheme));
+
+	buf.Append(KColonSlashSlash);
+	buf.Append(uri.Extract(EUriHost));
+
+	buf.Append(KColon);
+	buf.Append(uri.Extract(EUriPort));
+
+	TInt count = iDescriptionSuiteArray[aIndex].iServiceUrls.Count();
+	for (TInt scpdIndex(0); scpdIndex < count; scpdIndex++ )
+		{
+		RBuf8 scpdUri;
+		scpdUri.Create(buf.Length() + KSlashLenghth + iDescriptionSuiteArray[aIndex].iServiceUrls[scpdIndex].scpdUrl.Length());
+		scpdUri.Copy(buf);
+		 if (iDescriptionSuiteArray[aIndex].iServiceUrls[scpdIndex].scpdUrl.Find(KSlash)!=0)
+			 {
+			 scpdUri.Append(KSlash);
+			 }
+		 scpdUri.Append(iDescriptionSuiteArray[aIndex].iServiceUrls[scpdIndex].scpdUrl);
+		 AppendScpdUriL(scpdUri);
+		}
+	_LIT(KInfoLogFile1, "ResolveScpdUrisL End .... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ResolveEventUrisL(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "ResolveEventUrisL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	if ( aIndex < 0 )
+		{
+		_LIT(KBadIndex, "BadIndex...ResolveEventUrisL Cannot be executed \n");
+		ERR_PRINTF1(KBadIndex);
+		return;
+		}
+	const TInt KSlashLenghth = 1;
+	TUriParser8 uri;
+	uri.Parse(iDescriptionSuiteArray[aIndex].iBaseUrl);
+	TBuf8<KMaxUriSize> buf;
+	buf.Copy(uri.Extract(EUriScheme));
+
+	buf.Append(KColonSlashSlash);
+	buf.Append(uri.Extract(EUriHost));
+
+	buf.Append(KColon);
+	buf.Append(uri.Extract(EUriPort));
+
+	TInt count = iDescriptionSuiteArray[aIndex].iServiceUrls.Count();
+	for (TInt eventIndex(0); eventIndex < count; eventIndex++ )
+		{
+		RBuf8 eventUri;
+		eventUri.Create(buf.Length() + KSlashLenghth + iDescriptionSuiteArray[aIndex].iServiceUrls[eventIndex].eventSubUrl.Length());
+		eventUri.Copy(buf);
+		 if (iDescriptionSuiteArray[aIndex].iServiceUrls[eventIndex].eventSubUrl.Find(KSlash)!=0)
+			 {
+			 eventUri.Append(KSlash);
+			 }
+		 eventUri.Append(iDescriptionSuiteArray[aIndex].iServiceUrls[eventIndex].eventSubUrl);
+		 AppendEventUriL(eventUri);
+		}
+	_LIT(KInfoLogFile1, "ResolveEventUrisL End.... \n"); 
+	INFO_PRINTF1(KInfoLogFile1);
+		
+	}
+
+void CTestUPnPManager::ResolveControlUrisL(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "ResolveControlUrisL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	if ( aIndex < 0 )
+		{
+		_LIT(KBadIndex, "BadIndex...ResolveControlUrisL Cannot be executed \n");
+		ERR_PRINTF1(KBadIndex);
+		return;
+		}
+	const TInt KSlashLenghth = 1;
+	TUriParser8 uri;
+	uri.Parse(iDescriptionSuiteArray[aIndex].iBaseUrl);
+	TBuf8<KMaxUriSize> buf;
+	buf.Copy(uri.Extract(EUriScheme));
+
+	buf.Append(KColonSlashSlash);
+	buf.Append(uri.Extract(EUriHost));
+
+	buf.Append(KColon);
+	buf.Append(uri.Extract(EUriPort));
+
+	TInt count = iDescriptionSuiteArray[aIndex].iServiceUrls.Count();
+	for (TInt ControlIndex(0); ControlIndex < count; ControlIndex++ )
+		{
+		RBuf8 controlUri;
+		controlUri.Create(buf.Length() + KSlashLenghth + iDescriptionSuiteArray[aIndex].iServiceUrls[ControlIndex].controlUrl.Length());
+		controlUri.Copy(buf);
+		 if (iDescriptionSuiteArray[aIndex].iServiceUrls[ControlIndex].controlUrl.Find(KSlash)!=0)
+			 {
+			 controlUri.Append(KSlash);
+			 }
+		 controlUri.Append(iDescriptionSuiteArray[aIndex].iServiceUrls[ControlIndex].controlUrl);
+		 AppendControlUriL(controlUri);
+		}
+	_LIT(KInfoLogFile1, "ResolveControlUrisL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+	Opens a handle to a RPnPServiceDiscovery object
+	@param			None.
+	@return			None.
+ */
+void CTestUPnPManager::OpenDiscovererL()
+	{
+	User::LeaveIfError(iControlPoint.Open(KTierId));
+	}
+
+/*
+	Opens a handle to a RPnPServicePublisher object and append the same to Publisher array
+	@param			None.
+	@return			TBool representing success or failure of the operation.
+ */
+TInt CTestUPnPManager::OpenPublisherL()
+	{
+  	RPnPServicePublisher publisher;
+	TInt openStatus = 0;
+	User::LeaveIfError(publisher.Open(KTierId));
+	iPublisherArray.AppendL(publisher);
+	TInt index = iPublisherArray.Count() - 1;
+	return index;
+	}
+	
+/*
+	Publishing of device as per UPnP specifications.
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+
+void CTestUPnPManager::PublishDeviceL ()
+	{
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.AppendL(upnpObserver);
+
+	//To keep track of mapping between Observer and Publisher
+	TInt observerIndex = iObserverArray.Count() - 1;
+
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+    CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPDeviceRegisterParamSet );
+	CUPnPDeviceRegisterParamSet* registerDeviceParamSet = CUPnPDeviceRegisterParamSet::NewL(pnpFamily );
+
+	RBuf8 parentdeviceuidBuf;
+	parentdeviceuidBuf.CreateL(iParentdeviceuid.Length());
+	parentdeviceuidBuf.Copy(iParentdeviceuid);
+
+	RBuf8 devicetypeBuf;
+	devicetypeBuf.CreateL(iDevicetype.Length());
+	devicetypeBuf.Copy(iDevicetype);
+
+	RBuf8 friendlynameBuf;
+	friendlynameBuf.CreateL(iFriendlyname.Length());
+	friendlynameBuf.Copy(iFriendlyname);
+
+	RBuf8 manufacturerBuf;
+	manufacturerBuf.CreateL(iManufacturer.Length());
+	manufacturerBuf.Copy(iManufacturer);
+
+	RBuf8 manufacturerurlBuf;
+	manufacturerurlBuf.CreateL(iManufacturerurl.Length());
+	manufacturerurlBuf.Copy(iManufacturerurl);
+
+	RBuf8 modeldescriptionBuf;
+	modeldescriptionBuf.CreateL(iModeldescription.Length());
+	modeldescriptionBuf.Copy(iModeldescription);
+
+	RBuf8 modelnameBuf;
+	modelnameBuf.CreateL(iModelname.Length());
+	modelnameBuf.Copy(iModelname);
+
+	RBuf8 modelnumberBuf;
+	modelnumberBuf.CreateL(iModelnumber.Length());
+	modelnumberBuf.Copy(iModelnumber);
+
+
+	RBuf8 modelurlBuf;
+	modelurlBuf.CreateL(iModelurl.Length());
+	modelurlBuf.Copy(iModelurl);
+
+	RBuf8 presentationurlBuf;
+	presentationurlBuf.CreateL(iPresentationurl.Length());
+	presentationurlBuf.Copy(iPresentationurl);
+
+	RBuf8 serialnumberBuf;
+	serialnumberBuf.CreateL(iSerialnumber.Length());
+	serialnumberBuf.Copy(iSerialnumber);
+
+	RBuf8 udnBuf;
+	udnBuf.CreateL(iUdn.Length());
+	udnBuf.Copy(iUdn);
+
+	RBuf8 upcBuf;
+	upcBuf.CreateL(iUpc.Length());
+	upcBuf.Copy(iUpc);
+
+
+	TInt publisherIndex = OpenPublisherL();
+	registerDeviceParamSet-> SetParentDeviceUidL(parentdeviceuidBuf);
+	registerDeviceParamSet-> SetUriL (devicetypeBuf);
+	registerDeviceParamSet-> SetFriendlyNameL (friendlynameBuf);
+	registerDeviceParamSet-> SetManufacturerL (manufacturerBuf );
+	registerDeviceParamSet-> SetManufactureUrlL (manufacturerurlBuf);
+	registerDeviceParamSet-> SetModelDescL (modeldescriptionBuf);
+	registerDeviceParamSet-> SetModelNameL (modelnameBuf);
+	registerDeviceParamSet-> SetModelNumberL (modelnumberBuf);
+	registerDeviceParamSet-> SetModelUriL (modelurlBuf);
+	registerDeviceParamSet-> SetPresentationL (presentationurlBuf);
+	registerDeviceParamSet-> SetUDNL (udnBuf);
+	registerDeviceParamSet-> SetUPCL (upcBuf);
+	registerDeviceParamSet-> SetCacheControlData (iDuration);
+	registerDeviceParamSet-> SetSerialNumberL (serialnumberBuf);
+
+	//To keep track of mapping between Observer and Publisher
+	//Create mapping of Publsiher and observer
+	TPublisherObserverMap publisherObserverMapElement;
+	publisherObserverMapElement.iPublisherIndex = publisherIndex;
+	publisherObserverMapElement.iObserverIndex =  observerIndex;
+	publisherObserverMapElement.iPublisherControl = KDevice;
+	iPublisherObserverMap.AppendL(publisherObserverMapElement);
+
+	//Publish Device and update publish count
+	iPublishCount++;
+	iPublisherArray[publisherIndex].Publish(*pnpBundle);
+
+	CleanUpObserverArray();
+	upcBuf.Close();
+	udnBuf.Close();
+	serialnumberBuf.Close();
+	presentationurlBuf.Close();
+	modelurlBuf.Close();
+	modelnumberBuf.Close();
+	modelnameBuf.Close();
+	manufacturerurlBuf.Close();
+	manufacturerBuf.Close();
+	friendlynameBuf.Close();
+	devicetypeBuf.Close();
+	parentdeviceuidBuf.Close();
+	CleanupStack::PopAndDestroy( pnpBundle );
+	_LIT(KInfoLogFile1, "PublishDeviceL End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+Test for Register announcements ssdp:alive and ssdp:byebye messages
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+*/
+void  CTestUPnPManager::RegisterForAnnouncementsL (const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "RegisterForAnnouncementsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RArray<TPtrC> uriTypeList;
+	TPtrC listOfUriTypes;
+	_LIT(KListOfUriTypes, "listofuritypes");
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+	CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL ( *pnpBundle , EUPnPRegisterAnnouncementParamSet );
+	if(!GetStringFromConfig(GetCurrentSection(), KListOfUriTypes, listOfUriTypes))
+		{
+		_LIT(KErrInfo, "Problem in reading values from ini. \n Expected fields are: \n%S, \n%S \n");
+		ERR_PRINTF2( KErrInfo, &KListOfUriTypes);
+		return;
+		}
+
+	TokenizeStringL(listOfUriTypes, uriTypeList);
+	TInt numUris = uriTypeList.Count();
+	RBuf8 buf;
+	buf.Create(KMaxUriSize);
+	for(TInt i(0); i < numUris; i++)
+		{
+		CUPnPRegisterAnnouncementParamSet* announcementParamSet = CUPnPRegisterAnnouncementParamSet::NewL(pnpFamily );
+		buf.Copy(uriTypeList[i]);
+		announcementParamSet->SetUriL( buf );
+		}
+	buf.Close();
+	uriTypeList.Close();
+	iControlPoint.RegisterNotify(*pnpBundle );
+	TBool schedulerStart = EFalse;
+	_LIT(KSchedulerStart, "schedulerstart");
+	GetBoolFromConfig(aOperationType, KSchedulerStart, schedulerStart);
+	if(schedulerStart)
+		{
+		CActiveScheduler::Start();
+		}
+	CleanupStack::PopAndDestroy(pnpBundle);
+	_LIT(KInfoLogFile1, "RegisterForAnnouncementsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	
+	}
+
+/*
+	Tests whether subscribtion to event change notifications is performing as specified in UPnP specifications.
+	@param			None.
+	@return			None.
+ */
+void  CTestUPnPManager::SubscribeForStateChangeNotificationsL()
+	{
+	_LIT(KInfoLogFile, "SubscribeForStateChangeNotificationsL() start.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+    CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPSubscribeRequestParamSet);
+	TInt subscriptionDuration;
+    _LIT(KSubscriptionDuration, "subscriptionduration");
+	GetIntFromConfig(GetCurrentSection(), KSubscriptionDuration, subscriptionDuration);
+	TBool readIni = EFalse;
+	GetBoolFromConfig(GetCurrentSection(), KReadIni, readIni);
+	if(readIni)
+		{
+		CUPnPSubscribeRequestParamSet * subscribeParamSet = CUPnPSubscribeRequestParamSet::NewL (pnpFamily );
+		TPtrC subscriptionUri;
+		GetStringFromConfig(GetCurrentSection(), KSubscriptionUri, subscriptionUri);
+		RBuf8 subscriptionUriBuf;
+		subscriptionUriBuf.Create(subscriptionUri.Length());
+		subscriptionUriBuf.Copy(subscriptionUri);
+		subscribeParamSet->SetDuration(subscriptionDuration);
+		subscribeParamSet->SetUriL(subscriptionUriBuf);
+		subscriptionUriBuf.Close();
+		}
+	else
+		{
+		//Multiple uri's can be submitted for description
+		ResolveAllUrisL();
+		TInt eventUriCount = iEventUriArray.Count();
+		if ( eventUriCount==0 )
+			{
+			_LIT(KEventSubscription,"Event Subscription Cannot be performed \n");
+			INFO_PRINTF1(KEventSubscription);
+			CleanupStack::PopAndDestroy( pnpBundle );
+			CleanupStack::PopAndDestroy( upnpObserver );
+			//SetTestStepResult(EFail);
+			return;
+			}
+		for(TInt index(0); index < eventUriCount ; index++)
+			{
+			//for (TInt j(0); j < 10 ; j++)
+			//{//Pass Duplicate subscritption reuqest multiple times in single bundle
+				CUPnPSubscribeRequestParamSet * subscribeParamSet = CUPnPSubscribeRequestParamSet::NewL (pnpFamily );
+				subscribeParamSet->SetUriL(iEventUriArray[index]);
+				subscribeParamSet->SetDuration(subscriptionDuration);
+				RBuf eventUri16;
+				eventUri16.Create(iEventUriArray[index].Length());
+				eventUri16.Copy(iEventUriArray[index]);
+				_LIT(KEventSubUriInfo,"Event Uri Submitted for Subscription Request is: %S \n");
+				INFO_PRINTF2(KEventSubUriInfo, &eventUri16);
+				eventUri16.Close();
+			//	}
+			}
+		}
+	iControlPoint.Subscribe( *pnpBundle );
+	CActiveScheduler::Start();
+	CleanupStack::PopAndDestroy( pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	_LIT(KInfoLogFile1, "SubscribeForStateChangeNotificationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void  CTestUPnPManager::ReSubscribeForStateChangeNotificationsL()
+	{
+	_LIT(KInfoLogFile, "Re-SubscribeForStateChangeNotificationsL() start.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+    CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPSubscribeRequestParamSet);
+	TInt subscriptionDuration;
+    _LIT(KSubscriptionDuration, "subscriptionduration");
+	GetIntFromConfig(GetCurrentSection(), KSubscriptionDuration, subscriptionDuration);
+	
+	TInt eventUriCount = iEventUriArray.Count();
+	if ( eventUriCount==0 )
+		{
+		_LIT(KEventSubscription,"Event Subscription Cannot be performed \n");
+		INFO_PRINTF1(KEventSubscription);
+		CleanupStack::PopAndDestroy( pnpBundle );
+		CleanupStack::PopAndDestroy( upnpObserver );
+		//SetTestStepResult(EFail);
+		return;
+		}
+	for(TInt index(0); index < eventUriCount ; index++)
+		{
+		CUPnPSubscribeRequestParamSet * subscribeParamSet = CUPnPSubscribeRequestParamSet::NewL (pnpFamily );
+		subscribeParamSet->SetUriL(iEventUriArray[index]);
+		subscribeParamSet->SetDuration(20);
+		RBuf eventUri16;
+		eventUri16.Create(iEventUriArray[index].Length());
+		eventUri16.Copy(iEventUriArray[index]);
+		_LIT(KEventSubUriInfo,"Event Uri Submitted for Re-Subscription  is: %S \n");
+		INFO_PRINTF2(KEventSubUriInfo, &eventUri16);
+		eventUri16.Close();
+		}
+	iControlPoint.Subscribe( *pnpBundle );
+	CActiveScheduler::Start();
+	CleanupStack::PopAndDestroy( pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	_LIT(KInfoLogFile1, "Re-SubscribeForStateChangeNotificationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+/*
+	Tests whether unsubscribtion to subscribed events is performing as specified in UPnP specifications.
+	@param			None
+	@return			None.
+ */
+void  CTestUPnPManager::UnsubscribeForStateChangeNotificationsL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "UnsubscribeForStateChangeNotificationsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL();
+	CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPCancelSubscribeParamSet);
+	TBool readIni = EFalse;
+	GetBoolFromConfig(aOperationType, KReadIni, readIni);
+	if(readIni)
+		{
+	CUPnPCancelSubscribeParamSet * unsubscribeParamSet = CUPnPCancelSubscribeParamSet::NewL(pnpFamily);
+	TPtrC unsubscribepath;
+	_LIT(KUnsubscribePath, "unsubscribepath");
+		GetStringFromConfig(aOperationType, KUnsubscribePath, unsubscribepath);
+	RBuf8 unsubscribepathBuf;
+	unsubscribepathBuf.Create(unsubscribepath.Length());
+	unsubscribepathBuf.Copy(unsubscribepath);
+	unsubscribeParamSet->SetUriL(unsubscribepathBuf);
+		_LIT(KCanCelSubscribeInfo,"Executing Cancel Subscribe for URI:  %S \n");
+		INFO_PRINTF2(KCanCelSubscribeInfo, &unsubscribepath);
+		iControlPoint.Cancel(*pnpBundle );
+	unsubscribepathBuf.Close();
+	}
+	else
+	{
+		TInt eventUriCount = iEventUriArray.Count();
+		if ( eventUriCount==0 )
+			{
+			_LIT(KEventUnSubscription,"Event UnSubscription Cannot be performed \n");
+			INFO_PRINTF1(KEventUnSubscription);
+			CleanupStack::PopAndDestroy( pnpBundle );
+			return;
+			}
+		for(TInt index(0); index < eventUriCount ; index++)//eventUriCount
+			{
+			CUPnPCancelSubscribeParamSet * unsubscribeParamSet = CUPnPCancelSubscribeParamSet::NewL(pnpFamily);
+			unsubscribeParamSet ->SetUriL(iEventUriArray[index]);
+			RBuf eventUri16;
+			eventUri16.Create(iEventUriArray[index].Length());
+			eventUri16.Copy(iEventUriArray[index]);
+			_LIT(KEventSubUriInfo,"Event Uri Submitted for UnSubscription Request is: %S \n");
+			INFO_PRINTF2(KEventSubUriInfo, &eventUri16);
+			eventUri16.Close();
+			}
+		iControlPoint.Cancel(*pnpBundle );
+		}
+	CleanupStack::PopAndDestroy( pnpBundle );
+	_LIT(KInfoLogFile1, "UnsubscribeForStateChangeNotificationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+	Test for Intiatting a Control Action from Control Point side
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void CTestUPnPManager::InitiateActionL(const TDesC& /* aOperationType */)
+	{
+	_LIT(KInfoLogFile, "InitiateActionL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	ResolveAllUrisL();
+	if(!iAction)
+		{
+		iAction= CAction::NewL(this);
+		}
+	for(TInt i(0); i < iControlUriArray.Count(); i++)
+		{
+		RBuf controlUri16;
+		controlUri16.Create(iControlUriArray[i].Length());
+		controlUri16.Copy(iControlUriArray[i]);
+		_LIT(KContolUri, "<font color=00ff00><b><u>Control Uri Submitted is: %S </b></u></font>");
+		INFO_PRINTF2(KContolUri, &controlUri16);
+		iAction->InitiateActionControlL(iControlUriArray[i],iControlPoint);
+		controlUri16.Close();		
+		}
+	_LIT(KInfoLogFile1, "InitiateActionL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+	Test for Cancelling Discovery Operation
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void CTestUPnPManager::CancelDiscoverL(const TDesC& aOperationType)
+	{
+	iCancelDiscovery = ETrue;
+	const TInt KBufLength = 1000;
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+    CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL ( *pnpBundle , EUPnPCancelDiscoverParamSet );
+	CUPnPCancelDiscoverParamSet* cancelDiscoverParamSet = CUPnPCancelDiscoverParamSet::NewL(pnpFamily );
+	TPtrC serviceType;
+	GetStringFromConfig(aOperationType, KServiceType, serviceType);
+	RBuf8 buf;
+	buf.Create(KBufLength);
+	buf.Copy(serviceType);
+	cancelDiscoverParamSet->SetUriL( buf );
+	iControlPoint.Cancel (*pnpBundle );
+	buf.Close();
+	CleanupStack::PopAndDestroy( pnpBundle );
+	
+	TBool flag=ETrue;
+	_LIT(KStopScheduler,"stopscheduler");
+	GetBoolFromConfig(aOperationType,KStopScheduler,flag);
+	if(flag)		
+		{
+		CActiveScheduler::Stop();	
+		}
+	_LIT(KInfoLogFile1, "CancelDiscoverL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::CancelDescribeL(const TDesC& aOperationType)
+	{
+	//Modify this later
+	const TInt KBufLength = 1000;
+	_LIT(KInfoLogFile, "CancelDescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+    CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL ( *pnpBundle , EUPnPCancelDescribeParamSet );
+	CUPnPCancelDescribeParamSet* cancelDescribeParamSet = CUPnPCancelDescribeParamSet::NewL(pnpFamily );
+	TPtrC serviceType;
+	GetStringFromConfig(aOperationType, KServiceType, serviceType);
+	_LIT(KCanCelDiscoveryInfo,"Executing Cancel Describe for URI:  %S \n");
+	INFO_PRINTF2(KCanCelDiscoveryInfo, &serviceType);
+	RBuf8 buf;
+	buf.Create(KBufLength);
+	buf.Copy(serviceType);
+	cancelDescribeParamSet->SetUriL( buf );
+	iControlPoint.Cancel (*pnpBundle );
+	buf.Close();
+	CleanupStack::PopAndDestroy( pnpBundle );
+	_LIT(KInfoLogFile1, "CancelDescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+ Cancells all persistent Device Description Requests.
+*/
+void CTestUPnPManager::CancelAllDeviceDescribeL()
+	{
+	_LIT(KInfoLogFile, "CancelAllDeviceDescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	//this perofrms only Cancellation of all Device descriptions only
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+    CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL ( *pnpBundle , EUPnPCancelDescribeParamSet );
+	TInt DevLocCount = iDeviceLocationArray.Count();
+	for(TInt index(0); index < DevLocCount  ; index++)
+		{
+		TBuf8<256> url;
+		TUriParser8 uri;
+		uri.Parse(iDeviceLocationArray[index]);
+		url.Copy(_L8("http://"));
+		const TDesC8& scheme = uri.Extract(EUriScheme);
+		_LIT8(KScheme, "http");
+		//Uri must be of scheme "http" only
+		if (scheme.CompareF(KScheme) == 0)
+			{
+			const TDesC8& host = uri.Extract(EUriHost);
+			url.Append(host);
+			url.Append(_L8(":"));
+			const TDesC8& portStr = uri.Extract ( EUriPort );
+			url.Append(portStr);
+			url.Append(_L8("/")) ;
+			CUPnPCancelDescribeParamSet* cancelDescribeParamSet = CUPnPCancelDescribeParamSet::NewL(pnpFamily );
+			cancelDescribeParamSet->SetUriL(url);
+			RBuf uri16;
+			uri16.Create(url.Length());
+			uri16.Copy(url);
+			_LIT(KCanCelDescribeInfo,"Executing Cancel Describe for URI:  %S \n");
+			INFO_PRINTF2(KCanCelDescribeInfo, &uri16);
+			uri16.Close();
+			}
+		}
+	iControlPoint.Cancel (*pnpBundle );
+	CleanupStack::PopAndDestroy( pnpBundle );
+	CActiveScheduler::Stop();
+	_LIT(KInfoLogFile1, "CancelAllDeviceDescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	}
+
+/*
+ * this perofrms only Cancellation of all Service descriptions only
+*/
+void CTestUPnPManager::CancelAllServiceDescribeL()
+	{
+	_LIT(KInfoLogFile, "CancelAllServiceDescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+    CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL ( *pnpBundle , EUPnPCancelDescribeParamSet );
+	TInt scpdCount = iScpdUriArray.Count();
+	for(TInt index(0); index < scpdCount  ; index++)
+		{
+		RBuf uri16;
+		uri16.Create(iScpdUriArray[index].Length());
+		uri16.Copy(iScpdUriArray[index]);
+		_LIT(KCanCelDescribeServiceInfo,"Executing Cancel DescribeService for URI:  %S \n");
+		INFO_PRINTF2(KCanCelDescribeServiceInfo, &uri16);
+		uri16.Close();
+		CUPnPCancelDescribeParamSet* cancelDescribeParamSet = CUPnPCancelDescribeParamSet::NewL(pnpFamily );
+		cancelDescribeParamSet->SetUriL(iScpdUriArray[index]);
+		}
+	iControlPoint.Cancel (*pnpBundle );
+	CleanupStack::PopAndDestroy( pnpBundle );
+	CActiveScheduler::Stop();
+	_LIT(KInfoLogFile1, "CancelAllServiceDescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	}
+
+/*
+	Test for Cancelling Register Announcement
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void  CTestUPnPManager::CancelNotifyAnnouncementL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "CancelNotifyAnnouncementL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+	 CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPCancelRegisterNotifyParamSet);
+	CUPnPCancelRegisterNotifyParamSet * cancelNotifyParamSet = CUPnPCancelRegisterNotifyParamSet::NewL(pnpFamily);
+	TPtrC uri;
+	GetStringFromConfig(aOperationType, KUri, uri);
+	RBuf8 buf;
+	buf.Create(uri.Length());
+	buf.Copy(uri);
+	cancelNotifyParamSet->SetUriL(buf);
+	iControlPoint.Cancel (*pnpBundle);
+	buf.Close();
+	CleanupStack::PopAndDestroy(pnpBundle);
+	_LIT(KInfoLogFile1, "CancelNotifyAnnouncementL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::AppendBundlesL(CPnPParameterBundleBase* aPnPBundle)
+	{
+	iResultsArray.AppendL(aPnPBundle);
+	}
+
+/*
+   Validates the discovery response received from the callback against the expected discovery response.
+   @param	aIndex is an integer refers to an index in the ResultsArray of CResults object.
+   @param	aResultsList is an array for section names for expected results section.
+   @param	aExpctedResults is an array of Bools and each of the element indicates whether the expected results
+   			in each section are matched against actual results.
+   @return	None
+ */
+
+void CTestUPnPManager::PrintAndValidateResultsL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "PrintAndValidateResultsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt resultsCount = 0;
+	const TInt bundleCount = iResultsArray.Count();
+	_LIT(KPrintStatement, "printing results \n");
+	_LIT(KPrintDesign,"	\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \n");
+	INFO_PRINTF1(KPrintStatement);
+	INFO_PRINTF1(KPrintDesign);
+	for(TInt i(0); i < bundleCount; i++)
+		{
+		CUPnPParameterFamily* paramFamily = static_cast<CUPnPParameterFamily*> ( iResultsArray[i]->GetFamilyByIndex() );
+		if( paramFamily )
+			{
+			switch ( paramFamily->Id() )
+				{
+				case EUPnPDiscoverResponseParamSet:
+					{
+					PrintDiscoveryResultsL(paramFamily);
+					ValidateDiscoveryResultsL(aOperationType);
+					}
+				break;
+
+				case EUPnPPresenceAnnouncementParamSet:
+					{
+					TParamSetIter<CUPnPPresenceAnnouncementParamSet> iter;
+					CUPnPPresenceAnnouncementParamSet* paramSet  = NULL;
+					paramFamily->InitializeIter(iter);
+					while ( !iter.AtEnd()  )
+						{
+						//Paramset at current position
+						paramSet = iter();
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KRegisterAliveFailed,"Failed to Send Register Alive Notifications with...Error Code  = %d \n");
+							ERR_PRINTF2(KRegisterAliveFailed, error);
+							//SetTestStepResult(EFail); 
+							++iter;
+							continue;
+							}
+						TPtrC8 serviceLocation(paramSet->ServiceLocation());
+						HBufC* devloc = HBufC::NewLC(serviceLocation.Length());	//1
+						devloc->Des().Copy(serviceLocation);
+						TPtrC devLocPointer (devloc->Des());
+						_LIT(KInfoUri,"The URI found is %S \n");
+						INFO_PRINTF2(KInfoUri, &devLocPointer);
+
+						TInt availabilityDuration = 0;
+						availabilityDuration = paramSet->Duration();
+						_LIT(KInfoDuration,"The service availability duration is %d \n");
+						INFO_PRINTF2(KInfoDuration, &availabilityDuration);
+
+						_LIT(KInfoAlive,"ssdp:alive notification got from %S AND Duration is %d\n");
+						INFO_PRINTF3(KInfoAlive, &devLocPointer, &availabilityDuration);
+
+						TPtrC8 usn(paramSet->USN());
+						HBufC* usnVal = HBufC::NewLC(usn.Length());	//2
+						usnVal->Des().Copy(usn);
+						TPtrC usnValPointer (usnVal->Des());
+						_LIT(KInfoUSN,"The USN found is %S \n");
+						INFO_PRINTF2(KInfoUSN, &usnValPointer);
+
+						TPtrC8 uri(paramSet->Uri());
+						HBufC* uriVal = HBufC::NewLC(uri.Length());	//3
+						uriVal->Des().Copy(uri);
+						TPtrC uriValPointer (uriVal->Des());
+						_LIT(KInfoURI,"The Uri found is %S \n");
+						INFO_PRINTF2(KInfoURI, &uriValPointer);
+						resultsCount++;
+						CleanupStack::PopAndDestroy(uriVal);
+						CleanupStack::PopAndDestroy(usnVal);
+						CleanupStack::PopAndDestroy(devloc);
+						++iter;
+						}
+					}
+				break;
+				case EUPnPDescribeResponseParamSet:
+					{
+					TParamSetIter<CUPnPDescribeResponseParamSet> iter;
+					CUPnPDescribeResponseParamSet* paramSet  = NULL;
+					paramFamily->InitializeIter(iter);
+					while ( !iter.AtEnd()  )
+						{
+						paramSet = iter();
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KDescribeFailed,"Failed to Describe with...Error Code  = %d \n");
+							ERR_PRINTF2(KDescribeFailed, error);
+							//SetTestStepResult(EFail); 
+							return;
+							}
+						TPtrC8 description(paramSet->Description());
+						HBufC* descriptionValue = HBufC::NewLC(description.Length());
+						descriptionValue->Des().Copy(description);
+						TPtrC descriptionPointer (descriptionValue->Des());
+						_LIT(KInfoDescribe,"content is  %S \n");
+						INFO_PRINTF2(KInfoDescribe, &descriptionPointer);
+						CleanupStack::PopAndDestroy(descriptionValue);
+						++iter;
+						resultsCount++;
+						}
+					//Reached Eof the Bundles
+					}
+				break;
+				case EUPnPAbsenceAnnouncementParamSet:
+					{
+					TParamSetIter<CUPnPAbsenceAnnouncementParamSet> iter;
+					CUPnPAbsenceAnnouncementParamSet* paramSet  = NULL;
+					paramFamily->InitializeIter(iter);
+
+					while ( !iter.AtEnd()  )
+						{
+						//Paramset at current position
+						paramSet = iter();
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KRegisterByeByeFailed,"Failed to Send Register ByeBye Notifications with...Error Code  = %d \n");
+							ERR_PRINTF2(KRegisterByeByeFailed, error);
+							//SetTestStepResult(EFail); 
+							++iter;
+							continue;
+							}
+						TPtrC8 usn(paramSet->USN());
+						HBufC* usnVal = HBufC::NewLC(usn.Length());
+						usnVal->Des().Copy(usn);
+						TPtrC usnValPointer (usnVal->Des());
+
+						_LIT(KInfoBye,"ssdp:byebye notification received from %S \n");
+						INFO_PRINTF2(KInfoBye, &usnValPointer);
+						resultsCount++;
+						CleanupStack::PopAndDestroy(usnVal);
+						++iter;
+						}
+					}
+				break;
+				case EUPnPSubscribeResponseParamSet:
+					{
+					TParamSetIter<CUPnPSubscribeResponseParamSet> iter;
+					CUPnPSubscribeResponseParamSet* paramSet  = NULL;
+					paramFamily->InitializeIter(iter);
+					while ( !iter.AtEnd() )
+						{
+						//Paramset at current position
+						paramSet = iter();
+						RBuf subscriptionUri16;
+						subscriptionUri16.Create(paramSet->Uri().Length());
+						subscriptionUri16.Copy(paramSet->Uri());
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							_LIT(KInfoSubscribeFailed, "Err: Failed to Subscribe.\n %S \n");
+							INFO_PRINTF2(KInfoSubscribeFailed,&subscriptionUri16);
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KErrSubscribe,"Failed to Subscribe with...Error Code  = %d \n");
+							ERR_PRINTF2(KErrSubscribe, error);
+							//SetTestStepResult(EFail); 
+							}
+						else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESubscriptionTimeout)
+							{
+							_LIT(KInfoSubscribeTimedOut, "Info: SubscribeTimed out \n %S \n");
+							INFO_PRINTF2(KInfoSubscribeTimedOut,&subscriptionUri16);
+							}
+						else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+							{
+							_LIT(KInfoSubscribeSuccess, "<font color=00ff00><b><u>Info: Subscribtion SUCCESS</u></b></font>\n %S \n");
+							INFO_PRINTF2(KInfoSubscribeSuccess,&subscriptionUri16);
+							}
+						subscriptionUri16.Close();
+						++iter;
+						}
+					}
+				break;
+				case EUPnPNotifyEventParamSet:
+					{//receives event notifications sent at client
+					TParamSetIter<CUPnPNotifyEventParamSet> iter;
+					CUPnPNotifyEventParamSet* paramSet  = NULL;
+					paramFamily->InitializeIter(iter);
+					while ( !iter.AtEnd() )
+						{
+						//Paramset at current position
+						paramSet = iter();
+						RBuf subscriptionUri16;
+						subscriptionUri16.Create(paramSet->Uri().Length());
+						subscriptionUri16.Copy(paramSet->Uri());
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							++iter;
+							_LIT(KInfoNotificationsFailed, "Err: Failed to Get Event notifications \n %S \n");
+							INFO_PRINTF2(KInfoNotificationsFailed,&subscriptionUri16);
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KNotificationsFailed,"Failed to Receive Notifications with...Error Code  = %d \n");
+							ERR_PRINTF2(KNotificationsFailed, error);
+							//SetTestStepResult(EFail); 
+							}
+						else if (paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+							{
+							_LIT(KInfoNotifications, "Notifications for subscribed Uri: %S \t is received \n");
+							INFO_PRINTF2(KInfoNotifications, &subscriptionUri16);
+							++iter;
+							}
+						subscriptionUri16.Close();
+						}
+					}
+				break;
+				default:
+					{
+					//Do Nothing
+					}
+				break;
+				}
+			}
+		}
+	_LIT(KEndPrintStatement,"Done with printing results \n");
+	INFO_PRINTF1(KEndPrintStatement);
+	INFO_PRINTF1(KPrintDesign);
+	}
+
+/*
+  Constructor:
+*/
+CUPnPObserver::CUPnPObserver()
+	:iSequence(0),iResultsCount(0)
+	{
+	}
+
+/*
+  Destructor
+*/
+CUPnPObserver::~CUPnPObserver()
+	{
+	iFileServ.Close();
+	}
+
+
+/*
+	Static factory constructor. Uses two phase construction and leaves nothing on the
+	CleanupStack. Creates a CTestControlPointService object.
+	@param			aManager	A pointer to a CTestUPnPManager object.
+	@return			A pointer to the newly created CPnPObserver object.
+	@post			A fully constructed and initialized CPnPObserver object.
+ */
+CUPnPObserver* CUPnPObserver::NewL(CTestUPnPManager* aManager)
+	{
+	CUPnPObserver* self = new(ELeave) CUPnPObserver;
+	CleanupStack::PushL(self);
+	self->ConstructL(aManager);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+/*
+	Second phase of two-phase construction method. Does any allocations required to fully construct
+	the object.
+	@pre 		First phase of construction is complete.
+	@param		aManager	A pointer to a CTestUPnPManager object.
+	@post		The object is fully constructed and initialized.
+ */
+void CUPnPObserver::ConstructL(CTestUPnPManager* aManager)
+	{
+	iManager = aManager;
+	User::LeaveIfError(iFileServ.Connect());
+	}
+
+
+
+/*
+   This method returns a reference to the CTestUPnPManager object.
+   @param None
+   return a reference to the CTestUPnPManager object
+ */
+CTestUPnPManager& CUPnPObserver::Manager()
+	{
+	return *iManager;
+	}
+
+void CTestUPnPManager::DoTestOOML (TInt aTestType)
+	{
+		TInt iTryCount = 1;
+		TInt err=0;
+//		__UHEAP_MARK;
+		for ( ;; )
+			{
+			__UHEAP_SETFAIL(RHeap::EFailNext, iTryCount);
+			
+			switch(aTestType)
+				{
+			case EPublishDevice:
+				TRAP( err, PublishDeviceL());
+				break;
+			case EOpenDiscover:
+				TRAP(err,OpenDiscovererL());
+				break;
+			case EDiscover:
+				TRAP(err, DiscoverL());
+				break;
+			case EPublishService:
+				TRAP(err,PublishServiceL());
+				break;
+			default:
+				break;
+				}
+					
+			if ( err == KErrNone ) 
+				{
+				__UHEAP_RESET;
+				INFO_PRINTF1(_L("Memory allocation testing completed. No of allocations "));
+				break;
+				}
+			if ( err != KErrNoMemory )
+				{	
+				SetTestStepResult(EFail);
+				User::Leave(err);
+				}
+			__UHEAP_SETFAIL(RHeap::ENone, 0);
+			if(aTestType == EPublishDevice && iTryCount == 25)		
+				{
+				iTryCount = 30;
+				}
+			iTryCount++;
+			}
+//		__UHEAP_MARKEND;	
+		INFO_PRINTF2(_L("TRYCOUNT %d"), iTryCount);
+	}
+
+/*
+   This is called when callback hits. And this method stores the bundle results
+   and meta information related to that results into results array maintained by manager
+   for later verification.
+   @param  aParameterBundle a reference to CPnPParameterBundleBase
+   @return None
+ */
+void CUPnPObserver::OnPnPEventL ( CPnPParameterBundleBase& aParameterBundle)
+	{
+	_LIT(KInfoLogFile, "OnPnPEventL ().... \n");
+	Manager().INFO_PRINTF1(KInfoLogFile);
+	
+	CopyResultBundlesL(aParameterBundle);
+	CUPnPParameterFamily* paramFamily = static_cast<CUPnPParameterFamily*> ( aParameterBundle.GetFamilyByIndex() );
+	if( paramFamily )
+		{
+		switch ( paramFamily->Id() )
+			{
+			case EUPnPDiscoverResponseParamSet:
+				{
+				TParamSetIter<CUPnPDiscoverResponseParamSet> iter;
+				CUPnPDiscoverResponseParamSet* paramSet  = NULL;
+				paramFamily->InitializeIter(iter);
+				while (!iter.AtEnd())
+					{
+					paramSet = iter();
+					//Printig of Search target
+					TPtrC8 uriST(paramSet->Uri());
+					HBufC* stUri = HBufC::NewLC(uriST.Length());
+					stUri->Des().Copy(uriST);
+					TPtrC uriStPtr (stUri->Des());
+					CleanupStack::PopAndDestroy(stUri);
+					
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EDiscoveryTimeout)
+						{
+						CActiveScheduler::Stop();
+						return;
+						}
+					}
+				}
+			break;
+			case EUPnPPresenceAnnouncementParamSet:
+				{
+				TParamSetIter<CUPnPPresenceAnnouncementParamSet> iter;
+				CUPnPPresenceAnnouncementParamSet* paramSet  = NULL;
+				paramFamily->InitializeIter(iter);
+
+				while ( !iter.AtEnd()  )
+					{
+					paramSet = iter();
+					//Printig of Search target
+					TPtrC8 uriST(paramSet->Uri());
+					HBufC* stUri = HBufC::NewLC(uriST.Length());
+					stUri->Des().Copy(uriST);
+					TPtrC uriStPtr (stUri->Des());
+					_LIT(KInfoST,"<b>The RegisterNotify URI was:  <u>%S</u> </b>\n");
+					Manager().INFO_PRINTF2(KInfoST, &uriStPtr);
+					CleanupStack::PopAndDestroy(stUri);
+					
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KRegisterNotifyFail,"Resgitser Notify Failed: TUPnPEvent::EFail Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KRegisterNotifyFail,error);
+						CActiveScheduler::Stop();
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					TPtrC8 serviceLocation(paramSet->ServiceLocation());
+					HBufC* servloc = HBufC::NewLC(serviceLocation.Length()); //1
+					servloc->Des().Copy(serviceLocation);
+					TPtrC servlocPointer (servloc->Des());
+					TInt duration = paramSet->Duration();
+					_LIT(KInfoAlive,"<font color=1f6633><b>ssdp:alive notification got from %S AND Duration is %d </b></font>\n");
+					iManager->INFO_PRINTF3(KInfoAlive, &servlocPointer, &duration);
+					CleanupStack::PopAndDestroy(servloc);
+					++iter;
+					iResultsCount++;
+					}
+				_LIT(KInfoLogFile, "EUPnPPresenceAnnouncementParamSet.... \n");
+				Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+
+			case EUPnPAbsenceAnnouncementParamSet:
+				{
+				TParamSetIter<CUPnPAbsenceAnnouncementParamSet> iter;
+				CUPnPAbsenceAnnouncementParamSet* paramSet  = NULL;
+				paramFamily->InitializeIter(iter);
+
+				while ( !iter.AtEnd()  )
+					{
+					paramSet = iter();
+					//Printig of Search target
+					TPtrC8 uriST(paramSet->Uri());
+					HBufC* stUri = HBufC::NewLC(uriST.Length());
+					stUri->Des().Copy(uriST);
+					TPtrC uriStPtr (stUri->Des());
+					_LIT(KInfoST,"<b>The RegisterNotify URI was:  <u>%S</u> </b>\n");
+					Manager().INFO_PRINTF2(KInfoST, &uriStPtr);
+					CleanupStack::PopAndDestroy(stUri);
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KRegisterNotifyByeByeFail,"Resgitser Notify ByeBye Failed: TUPnPEvent::EFail Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KRegisterNotifyByeByeFail, error);
+						CActiveScheduler::Stop();
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					TPtrC8 usn(paramSet->USN());
+					HBufC* usnvalue = HBufC::NewLC(usn.Length());	//1
+					usnvalue->Des().Copy(usn);
+					TPtrC usnPointer (usnvalue->Des());
+					_LIT(KInfoBye,"<font color=33121f><b>ssdp:byebye notification received from %S </b></font>\n");
+					iManager->INFO_PRINTF2(KInfoBye, &usnPointer);
+					CleanupStack::PopAndDestroy(usnvalue);
+					++iter;
+					}
+					_LIT(KInfoLogFile, "EUPnPAbsenceAnnouncementParamSet.... \n");
+					Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+
+			case EUPnPPublishResponseParamSet:
+				{
+				TBool flag=EFalse;
+				_LIT(KStopScheduler,"stopscheduler");
+				TInt responseCount = 0;
+				CUPnPPublishResponseParamSet* paramSet  = NULL;
+				Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KStopScheduler,flag);
+				_LIT(KExpectedPublishEesponseCount,"expectedpublishresponsecount");
+				Manager().GetIntFromConfig(Manager().GetCurrentSection(),KExpectedPublishEesponseCount,responseCount);
+				TParamSetIter<CUPnPPublishResponseParamSet> iter;
+				paramFamily->InitializeIter(iter);
+				while ( !iter.AtEnd()  )
+					{
+					paramSet = iter();
+					Manager().iPublishCount--;
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+						{
+						TBool sendNotify= EFalse;
+						TInt notifyCount(0);
+						_LIT(KInfoPublish, "Info: Succesfully Published a Device/Service.");
+						Manager().INFO_PRINTF1(KInfoPublish);
+						_LIT(KSendNotify,"sendnotifications");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KSendNotify,sendNotify);
+
+						if(sendNotify)
+							{
+							RBuf16 descriptionBaseUri;
+							descriptionBaseUri.Create(paramSet->Uri().Length());
+							descriptionBaseUri.Copy(paramSet->Uri());
+							_LIT(KInfoSendNotify, "Info: Calling Send Notify on Uri %S \n");
+							Manager().INFO_PRINTF2(KInfoSendNotify, &descriptionBaseUri);
+							descriptionBaseUri.Close();
+							Manager().SendNotificationsL(this);
+							}
+						_LIT(KExpctedNotifications,"expectednotifications");
+						Manager().GetIntFromConfig(Manager().GetCurrentSection(),KExpctedNotifications,notifyCount);
+						TInt publishCount = Manager().iPublishCount;
+						if(flag && notifyCount == Manager().NotifyCount()&& publishCount <= 0 )
+							{
+							_LIT(KInfoLogFile, "EUPnPPublishResponseParamSet Success....And Stopping Active Scheduler after %d Publishes \n");
+							Manager().INFO_PRINTF2(KInfoLogFile, publishCount );
+							CActiveScheduler::Stop();
+							}
+						}
+					else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KErrPublish,"Failed to Published a Device/Service...Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KErrPublish, error);
+						CActiveScheduler::Stop();
+						_LIT(KInfoLogFile, "EUPnPPublishResponseParamSet Fail.... \n");
+						Manager().INFO_PRINTF1(KInfoLogFile);
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					++iter;
+					}
+				}
+			break;
+
+			case EUPnPDescribeResponseParamSet:
+				{
+				//abruptdescribeclosecp
+				//opt for Abrupt close of CP
+				TBool abruptDiscribeCloseCP = EFalse;
+				_LIT(KAbruptDiscribeCloseCP,"abruptdescribeclosecp");
+				Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KAbruptDiscribeCloseCP,abruptDiscribeCloseCP );
+				if(abruptDiscribeCloseCP)
+					{
+					//Closing Control point Abruptly
+					_LIT(KInfoSubScribe, "In Describe Response \n");
+					_LIT(KInfoCloseCP, "Closing Control point Abruptly.... \n");
+					Manager().INFO_PRINTF1(KInfoSubScribe);
+					Manager().INFO_PRINTF1(KInfoCloseCP);
+					CActiveScheduler::Stop();
+					Manager().CloseDiscoverer();
+					return;
+					}
+				
+				TParamSetIter<CUPnPDescribeResponseParamSet> iter;
+				CUPnPDescribeResponseParamSet* paramSet  = NULL;
+				paramFamily->InitializeIter(iter);
+
+				while ( !iter.AtEnd()  )
+					{
+					//Only one response expected for Describe and no iter increment is required
+					//Paramset at current position
+					paramSet = iter();
+
+					RBuf8 descriptionBuf;
+					RBuf8 descriptionBaseUri;
+					descriptionBaseUri.Create(paramSet->Uri());
+					descriptionBuf.Create(paramSet->Description());
+
+					RBuf description16;
+					description16.Create(descriptionBuf.Length());
+					description16.Copy(descriptionBuf);
+
+					RBuf descriptionUri16;
+					descriptionUri16.Create(descriptionBaseUri.Length());
+					descriptionUri16.Copy(descriptionBaseUri);
+
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KDescribeFail,"Describe Response Fail: TUPnPEvent::EFail...Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KDescribeFail, error);
+						_LIT(KDescriptionUri,"Description Uri is  %S \n");
+						Manager().ERR_PRINTF1(KDescribeFail);
+						Manager().INFO_PRINTF2(KDescriptionUri, &descriptionUri16  );
+						_LIT(KInfoLogFile, "EUPnPDescribeResponseParamSet Fail.... \n");
+						Manager().INFO_PRINTF1(KInfoLogFile);
+						CActiveScheduler::Stop();
+						descriptionBuf.Close();
+						descriptionBaseUri.Close();
+						description16.Close();
+						descriptionUri16.Close();
+						//Manager().SetTestStepResult(EFail);
+						return;
+						}
+					Manager().AppendDescriptionL(descriptionBaseUri, descriptionBuf);
+					TFileName filename;
+					filename.Format(KDefaultFileFormat, 'C');
+					TBuf<KMaxBufLength> filenameBuffer(filename);
+					//get scriptName
+					filenameBuffer.Append(Manager().ScriptFileName());
+					_LIT(KUnderScore, "_");
+					filenameBuffer.Append(KUnderScore);
+					filenameBuffer.AppendNumFixedWidth(iSequence,EDecimal, 4);
+					iSequence++;
+					filenameBuffer.Append(KDefaultExtension);
+					RFile file;
+					TInt err=file.Replace(iFileServ,filenameBuffer,EFileRead|EFileWrite|EFileShareAny);
+					if (err == KErrNone)
+						{
+						TInt writeErr= file.Write(descriptionBuf);
+						if(writeErr != KErrNone )
+							{
+							_LIT(KErrWrite,"Unable to Write the description to the File \n");
+							Manager().ERR_PRINTF1(KErrWrite);
+							}
+						_LIT(KDescriptionUri,"Description Uri is  %S \n");
+						_LIT(KInfoDescribe,"content is  %S \n");
+						Manager().INFO_PRINTF2(KDescriptionUri, &descriptionUri16  );
+						Manager().INFO_PRINTF2(KInfoDescribe, &description16);
+						Manager().iDescribeResponseCount++;
+						}
+					descriptionBuf.Close();
+					descriptionBaseUri.Close();
+					description16.Close();
+					descriptionUri16.Close();
+					file.Close();
+					++iter;
+					iResultsCount++;
+					}
+				TBool cancelAll = EFalse;
+				Manager().GetBoolFromConfig(Manager().GetCurrentSection(), KCancelAll, cancelAll );
+				TBool cancelAllService = EFalse;
+				Manager().GetBoolFromConfig(Manager().GetCurrentSection(), KCancelAllService, cancelAllService );
+				TInt descCount = 1;
+				Manager().GetIntFromConfig(Manager().GetCurrentSection(), KExpctedDescriptions, descCount );
+
+				if(Manager().iDescribeResponseCount >= descCount )// Modify this later
+					{
+					if(cancelAll)
+						{
+						Manager().CancelAllDeviceDescribeL();
+						return;
+						}
+					else if(cancelAllService)
+						{
+						Manager().CancelAllServiceDescribeL();
+						return;
+					}
+					else
+					{
+					CActiveScheduler::Stop();
+					_LIT(KInfoLogFile, "EUPnPDescribeResponseParamSet.... \n");
+					Manager().INFO_PRINTF1(KInfoLogFile);
+					return;
+					}
+				}
+				}
+			break;
+			case EUPnPSubscribeResponseParamSet:
+				{
+				TParamSetIter<CUPnPSubscribeResponseParamSet> iter;
+				CUPnPSubscribeResponseParamSet* paramSet  = NULL;
+				paramFamily->InitializeIter(iter);
+
+				while ( !iter.AtEnd() )
+					{
+					//Paramset at current position
+					paramSet = iter();
+					RBuf subscriptionUri16;
+					subscriptionUri16.Create(paramSet->Uri().Length());
+					subscriptionUri16.Copy(paramSet->Uri());
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						_LIT(KInfoSubscribeFailed, "Info: Failed to Subscribe.\n %S \n");
+						Manager().INFO_PRINTF2(KInfoSubscribeFailed,&subscriptionUri16);
+						subscriptionUri16.Close();
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KSubscribeFailed,"Failed to Subscribe with...Error Code  = %d \n");
+						Manager().ERR_PRINTF2(KSubscribeFailed, error);
+						CActiveScheduler::Stop();
+						_LIT(KInfoLogFile, "EUPnPSubscribeResponseParamSet Fail.... \n");
+						Manager().INFO_PRINTF1(KInfoLogFile);
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESubscriptionTimeout)
+						{
+						_LIT(KInfoSubscribeTimeOut, "Info: Subscription about to expire\n %S \n");
+						Manager().INFO_PRINTF2(KInfoSubscribeTimeOut, &subscriptionUri16);
+						subscriptionUri16.Close();
+						_LIT(KInfoSubscribeTimeOut3, "subscription uri deleted\n");
+						Manager().INFO_PRINTF1(KInfoSubscribeTimeOut3);
+						
+						//Implementation of Resubscribe is here
+						TBool renewFlag = EFalse;
+						_LIT(KRenewFlag,"renewflag");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KRenewFlag,renewFlag );
+						
+						_LIT(KInfoSubscribeTimeOut1, "renew flag value %d renew count   %d  \n");
+						Manager().INFO_PRINTF3(KInfoSubscribeTimeOut1, renewFlag,Manager().iRenewCount);
+						
+						if( renewFlag && Manager().iRenewCount == 0)
+							{//go to renew here only once
+							subscriptionUri16.Close();//cleanup activity
+							CActiveScheduler::Stop();//this is for start made in prev subscribe
+							_LIT(KInfoLogFile, "EUPnPSubscribeResponseParamSet Timeout1.... \n");
+							Manager().INFO_PRINTF1(KInfoLogFile);
+							Manager().iRenewCount++;
+							//renew subscriptions
+							_LIT(KInfoSubscribeTimeOut2, "renew count %d \n");
+							Manager().INFO_PRINTF2(KInfoSubscribeTimeOut2,Manager().iRenewCount);
+							_LIT(KInfoReSubscribe, "Request to RESUBSCRIPTION is Executed\n %S \n");
+							Manager().INFO_PRINTF1(KInfoReSubscribe);
+							Manager().SubscribeForStateChangeNotificationsL();
+							return;
+							}
+						else
+							{
+							//Unsubscribe before closing
+							_LIT(KInfoUnSubscribe, "Request to UNSUBSCRIPTION is Executed As Subscription TIMED OUT \n %S \n");
+							Manager().INFO_PRINTF1(KInfoUnSubscribe);
+							TPtrC referSection;
+							_LIT(KReferSection,"refersection");
+							Manager().GetStringFromConfig(Manager().GetCurrentSection(),KReferSection,referSection );
+							Manager().UnsubscribeForStateChangeNotificationsL(referSection);
+							subscriptionUri16.Close();//cleanup activity
+							CActiveScheduler::Stop();
+							_LIT(KInfoLogFile, "EUPnPSubscribeResponseParamSet Timeout2.... \n");
+							Manager().INFO_PRINTF1(KInfoLogFile);
+							return;
+							}
+						}
+					else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+						{
+						_LIT(KInfoSubscribeSuccess, "Info: SUBSCRIPTION REQUEST IS ACCEPTED FOR SUBSCRIPTION\n %S \n");
+						Manager().INFO_PRINTF2(KInfoSubscribeSuccess, &subscriptionUri16);
+						
+						//opt for Abrupt close of CP
+						TBool abruptCloseCP = EFalse;
+						_LIT(KAbruptCloseCP,"abruptclosecp");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KAbruptCloseCP,abruptCloseCP );
+						if(abruptCloseCP)
+							{
+							//Closing Control point Abruptly
+							_LIT(KInfoSubScribe, "In Subscribe Response \n");
+							_LIT(KInfoCloseCP, "Closing Control point Abruptly.... \n");
+							Manager().INFO_PRINTF1(KInfoSubScribe);
+							Manager().INFO_PRINTF1(KInfoCloseCP);
+							CActiveScheduler::Stop();
+							Manager().CloseDiscoverer();
+							return;
+							}
+						//Opt for Unsubscribe
+						TBool unSubscribeFlag = EFalse;
+						_LIT(KUnsubscribeFlag,"unsubscribeflag");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KUnsubscribeFlag,unSubscribeFlag );
+						if(unSubscribeFlag)
+							{//go to unsubscribe here
+							_LIT(KInfoUnSubscribe, "Request to UNSUBSCRIPTION is Executed Before Subscription Expiry\n  \n");
+							Manager().INFO_PRINTF1(KInfoUnSubscribe);
+							TPtrC referSection;
+							_LIT(KReferSection,"refersection");
+							Manager().GetStringFromConfig(Manager().GetCurrentSection(),KReferSection,referSection );
+							//Unsubscribe
+							Manager().UnsubscribeForStateChangeNotificationsL(referSection);
+							subscriptionUri16.Close();//cleanup activity
+							CActiveScheduler::Stop();//this is for start made in prev subscribe
+							_LIT(KInfoLogFile, "EUPnPSubscribeResponseParamSet Success.... \n");
+							Manager().INFO_PRINTF1(KInfoLogFile);
+							return;
+							}
+						}
+					++iter;
+					}
+				}
+			break;
+			case EUPnPNotifyEventParamSet:
+				{//receives event notifications sent at client
+				_LIT(KInfoLogFile, "EUPnPNotifyEventParamSet.... \n");
+				Manager().INFO_PRINTF1(KInfoLogFile);
+				
+				TParamSetIter<CUPnPNotifyEventParamSet> iter;
+				CUPnPNotifyEventParamSet* paramSet  = NULL;
+				paramFamily->InitializeIter(iter);
+
+				while ( !iter.AtEnd() )
+					{
+					//Paramset at current position
+					paramSet = iter();
+					RBuf subscriptionUri16;
+					subscriptionUri16.Create(paramSet->Uri().Length());
+					subscriptionUri16.Copy(paramSet->Uri());
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						++iter;
+						_LIT(KInfoNotificationsFailed, "Info: Failed to Get Event notifications\n %S \n");
+						Manager().INFO_PRINTF2(KInfoNotificationsFailed,&subscriptionUri16);
+						subscriptionUri16.Close();
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KNotificationsFailed,"Failed to Receive Notifications with...Error Code  = %d \n");
+						Manager().ERR_PRINTF2(KNotificationsFailed, error);
+						//Manager().SetTestStepResult(EFail);
+						return;
+						}
+					else if (paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+						{
+						_LIT(KInfoNotifications, "Notifications for subscribed Uri: %S \t is received \n");
+						Manager().INFO_PRINTF2(KInfoNotifications, &subscriptionUri16);
+						subscriptionUri16.Close();//cleanup activity
+						++iter;
+						}
+					}
+				_LIT(KInfoLogFile1, "EUPnPNotifyEventParamSet End.... \n");
+				Manager().INFO_PRINTF1(KInfoLogFile1);
+				}
+			break;
+			default:
+				{
+				//Do Nothing
+				}
+			break;
+			}
+		}
+	}
+
+/*
+   Error handling,asynchronous one.
+   @param  aError Error Code
+   @return None
+ */
+void CUPnPObserver::OnPnPError(TInt aError)
+	{
+	if(aError == KErrNoMemory)
+		{
+		//User::Leave(KErrNoMemory);
+		}
+	_LIT(KPositiveCase,"positivecase");
+	TBool positiveCase = ETrue;
+	Manager().GetBoolFromConfig(Manager().GetCurrentSection(), KPositiveCase, positiveCase);
+	// Note down the error and stop scheduler
+	//If not postive case, client.dll will come back before active scheduler start
+	//so, don't execute activescheduler::stop
+	if (positiveCase)
+		{
+		CActiveScheduler::Stop();
+		}
+	_LIT(KErrorMessage, "Error occurred in the UPnP Observer : %d \n");
+	Manager().ERR_PRINTF2(KErrorMessage, aError);
+	//Manager().SetTestStepResult(EFail);
+	}
+
+/*
+   This function copies result bundles into results array, which inturn is used in printing results
+   @param  aPnpBundle a reference to CPnPParameterBundleBase
+   @return None
+ */
+void CUPnPObserver::CopyResultBundlesL(const RPnPParameterBundle& aPnpBundle)
+	{
+	_LIT(KInfoLogFile, "CUPnPObserver::CopyResultBundlesL().... \n");
+	Manager().INFO_PRINTF1(KInfoLogFile);
+	
+	HBufC8* holdBundle = HBufC8::NewLC(aPnpBundle.Length());
+
+	if (!holdBundle)
+        {
+        User::Leave(KErrNoMemory);
+        }
+
+    TPtr8 storePtr(holdBundle->Des());
+	TInt retOnStore = aPnpBundle.Store(storePtr);
+	User::LeaveIfError(retOnStore);
+
+	TPtrC8 loadPtr(holdBundle->Des());
+	CPnPParameterBundleBase* newPnpBundle = CPnPParameterBundleBase::NewL();
+	TInt retOnLoad = newPnpBundle->Load(loadPtr);
+	User::LeaveIfError(retOnLoad);
+	CleanupStack::PushL(newPnpBundle);
+	Manager().AppendBundlesL(newPnpBundle);
+	CleanupStack::Pop(newPnpBundle);
+	CleanupStack::PopAndDestroy(holdBundle);
+	_LIT(KInfoLogFile1, "CUPnPObserver::CopyResultBundlesL() End.... \n");
+	Manager().INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+   This function Prints Discovery results by getting it from Results bundle
+   @param  aParamFamily a pointer to CUPnPParameterFamily
+   @return None
+ */
+void CTestUPnPManager::PrintDiscoveryResultsL(CUPnPParameterFamily* aParamFamily)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::PrintDiscoveryResultsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+
+	_LIT(KPrintStatement, "printing results \n");
+	_LIT(KPrintDesign,"	\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \n");
+
+	INFO_PRINTF1(KPrintStatement);
+	INFO_PRINTF1(KPrintDesign);
+
+	TParamSetIter<CUPnPDiscoverResponseParamSet> iter;
+	CUPnPDiscoverResponseParamSet* paramSet  = NULL;
+	aParamFamily->InitializeIter(iter);
+
+	while ( !iter.AtEnd() )
+		{
+		paramSet = iter();
+
+		if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+			{
+			TInt error = paramSet->UPnPEvent().iErrorCode;
+			_LIT(KDiscoverFailed,"Failed to Discover with...Error Code  = %d \n");
+			ERR_PRINTF2(KDiscoverFailed, error);
+			++iter;
+			continue;
+			}
+		else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EDiscoveryTimeout)
+			{
+			_LIT(KDiscoverTimeOut,"Discover Response TimeOut: TUPnPEvent::EDiscoveryTimeout \n");
+			INFO_PRINTF1(KDiscoverTimeOut);
+			++iter;
+			continue;
+			}
+		TPtrC8 deviceLocation(paramSet->DeviceLocation());
+		HBufC* devloc = HBufC::NewLC(deviceLocation.Length());	//1
+		devloc->Des().Copy(deviceLocation);
+		TPtrC devLocPointer (devloc->Des());
+		_LIT(KInfoUri,"The Location: %S \n");
+		INFO_PRINTF2(KInfoUri, &devLocPointer);
+
+		TPtrC8 usn(paramSet->USN());
+		HBufC* usnVal = HBufC::NewLC(usn.Length());	//2
+		usnVal->Des().Copy(usn);
+		TPtrC usnValPointer (usnVal->Des());
+		_LIT(KInfoUSN,"The USN found is %S \n");
+		INFO_PRINTF2(KInfoUSN, &usnValPointer);
+
+		TInt expiryTime = paramSet->ExpiryTime();
+		_LIT(KInfoexpiryTime,"The Expiry Time or CACHE-CONTROL: max-age =  %d \n");
+		INFO_PRINTF2(KInfoexpiryTime, expiryTime);
+
+		CleanupStack::PopAndDestroy(usnVal);
+		CleanupStack::PopAndDestroy(devloc);
+		++iter;
+		continue;
+		}
+	_LIT(KEndPrintStatement,"Done with printing results \n");
+	INFO_PRINTF1(KEndPrintStatement);
+	INFO_PRINTF1(KPrintDesign);
+	}
+
+void CTestUPnPManager::ValidateDiscoveryResultsL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::ValidateDiscoveryResultsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt DeviceLocationCount = NULL;
+	TPtrC ExpectedURL;
+	GetStringFromConfig(aOperationType, KExpectedURL, ExpectedURL);
+
+	TInt totalCount(0);
+	GetIntFromConfig(aOperationType, KExpectedCount, totalCount);
+	const TInt bundleCount = iResultsArray.Count();
+
+	for(TInt i(0); i < bundleCount; i++)
+		{
+		CUPnPParameterFamily* paramFamily = static_cast<CUPnPParameterFamily*> ( iResultsArray[i]->GetFamilyByIndex() );
+		if( paramFamily )
+			{
+	 		if(paramFamily->Id() ==EUPnPDiscoverResponseParamSet)
+				{
+				TParamSetIter<CUPnPDiscoverResponseParamSet> iter;
+				CUPnPDiscoverResponseParamSet* paramSet  = NULL;
+				paramFamily->InitializeIter(iter);
+
+				while ( !iter.AtEnd() )
+					{
+					paramSet = iter();
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KDiscoverFailed,"Failed to Discover with...Error Code  = %d \n");
+						ERR_PRINTF2(KDiscoverFailed, error);
+						++iter;
+						continue;
+						}
+					TPtrC8 deviceLocation(paramSet->DeviceLocation());
+					HBufC* devloc = HBufC::NewLC(deviceLocation.Length());
+					devloc->Des().Copy(deviceLocation);
+					TPtrC devLocPointer (devloc->Des());
+					DeviceLocationCount++;
+					if((ExpectedURL!=KNullDesC) && (ExpectedURL.Compare(devLocPointer) == KErrNone))
+						{
+						SetTestStepResult(EPass);
+						}
+					CleanupStack::PopAndDestroy(devloc);
+					++iter;
+					continue;
+					}
+				}
+			}
+		}
+	if((DeviceLocationCount != NULL) &&(DeviceLocationCount == totalCount))
+		{
+		SetTestStepResult(EPass);
+		}
+	_LIT(KInfoLogFile1, "CTestUPnPManager::ValidateDiscoveryResultsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::CancelPublish()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::CancelPublish() Begin....  \n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iPublisherArray.Count();
+	for(TInt i(count - 1); i >= 0 ; i--)
+		{
+		TPublisherControl publisherType = PublisherType(i);
+		_LIT(KInfoCancelLog, "CTestUPnPManager::CancelPublish()...Closing Publisher....  %d\n");
+		INFO_PRINTF2(KInfoCancelLog,i);
+		switch(publisherType)
+			{
+			case KService:
+				{
+				_LIT(KInfoService, "Closing Publisher.... of Type---->SERVICE\n");
+				INFO_PRINTF1(KInfoService);
+				break;
+				}
+			case KDevice:
+				{
+				_LIT(KInfoDevice, "Closing Publisher.... of Type---->DEVICE\n");
+				INFO_PRINTF1(KInfoDevice);
+				break;
+				}
+			default :
+				{
+				_LIT(KInfoErr, "Closing Publisher.... of Type---->InValid\n");
+				ERR_PRINTF1(KInfoErr);
+				break;
+				}
+			}
+		iPublisherArray[i].Close();
+		}
+	_LIT(KInfoLogFile2, "CancelPublish() Array Closed.... \n");
+	INFO_PRINTF1(KInfoLogFile2);
+	iPublisherArray.Close();
+	_LIT(KInfoLogFile3, "CTestUPnPManager::CancelPublish() End.... \n");
+	INFO_PRINTF1(KInfoLogFile3);
+	}
+
+void CTestUPnPManager::DescribeServiceL()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::DescribeServiceL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	ResolveAllUrisL();
+	TInt scpdUriCount = iScpdUriArray.Count();
+	//__ASSERT_DEBUG ( scpdUriCount > 0, User::Panic (KDescribeTestPanicCategory,KErrNoDescriptionPath ) );
+	if ( scpdUriCount==0 )
+		{
+		_LIT(KDescription,"Description Cannot be performed \n");
+		INFO_PRINTF1(KDescription);
+		//SetTestStepResult(EFail);
+		return;
+		}
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+	CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPDescribeRequestParamSet);
+
+	// Read the ScpdUrl from ScpdUri Array
+	//Make sure that Before this Describe Device, and Discovery is executes Succesfully.
+	for(TInt index(0); index < scpdUriCount ; index++)//scpdUriCount
+		{
+		CUPnPDescribeRequestParamSet* describeParamSet = CUPnPDescribeRequestParamSet::NewL (pnpFamily );
+		describeParamSet->SetUriL(iScpdUriArray[index]);
+		RBuf scpdUri16;
+		scpdUri16.Create(iScpdUriArray[index].Length());
+		scpdUri16.Copy(iScpdUriArray[index]);
+		_LIT(KScpdUriInfo,"SCPD Uri Submitted for Description Request is: %S \n");
+		INFO_PRINTF2(KScpdUriInfo, &scpdUri16);
+		scpdUri16.Close();
+		}
+	iControlPoint.Describe(*pnpBundle );
+	CActiveScheduler::Start();
+	_LIT(KInfoLogFile1, "CTestUPnPManager::DescribeServiceL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	CleanupStack::PopAndDestroy( pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	}
+
+void CTestUPnPManager::DescribeL()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::DescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	CPnPParameterBundle* pnpBundle = CPnPParameterBundle::NewL( );
+	CleanupClosePushL( *pnpBundle );
+	pnpBundle->SetPnPObserver((MPnPObserver*)upnpObserver);
+	CUPnPParameterFamily* pnpFamily = CUPnPParameterFamily::NewL (*pnpBundle , EUPnPDescribeRequestParamSet);
+	RBuf8 descriptionPathBuf;
+
+	TBool readIni = ETrue;
+	GetBoolFromConfig(GetCurrentSection(), KReadIni, readIni);
+	if(readIni)
+		{
+		// Get the Description path from .ini File
+		TPtrC descriptionPath;
+		GetStringFromConfig(GetCurrentSection(), KDescriptionPath, descriptionPath);
+		CUPnPDescribeRequestParamSet* describeParamSet = CUPnPDescribeRequestParamSet::NewL (pnpFamily );
+		descriptionPathBuf.Create(descriptionPath.Length());
+		descriptionPathBuf.Copy(descriptionPath);
+		describeParamSet->SetUriL(descriptionPathBuf);
+		descriptionPathBuf.Close();
+		iControlPoint.Describe(*pnpBundle );
+		TBool SchedulerStatus = ETrue;
+		_LIT(KSchedulerStatus, "schedulerstart");
+		GetBoolFromConfig(GetCurrentSection(), KSchedulerStatus, SchedulerStatus);
+		if(SchedulerStatus)
+			{
+			CActiveScheduler::Start();
+			}
+		}
+	else
+		{
+		// Read the Description path from DevLoaction array
+		//Make sure that Before this Describe, Successful Discovery is happend.
+		TInt DevLocCount = iDeviceLocationArray.Count();
+		if ( DevLocCount==0 )
+			{
+			_LIT(KDescription,"Description Cannot be performed as NO Uri available to Describe\n");
+			INFO_PRINTF1(KDescription);
+			CleanupStack::PopAndDestroy( pnpBundle );
+			CleanupStack::PopAndDestroy( upnpObserver );
+			//SetTestStepResult(EFail);
+			return;
+			}
+
+		//__ASSERT_DEBUG ( DevLocCount > 0, User::Panic (KDescribeTestPanicCategory,KErrNoDescriptionPath ) );
+
+		for(TInt iter(0); iter < DevLocCount  ; iter++)
+			{
+			TBuf8<256> url;
+			TUriParser8 uri;
+			uri.Parse(iDeviceLocationArray[iter]);
+			const TDesC8& scheme = uri.Extract(EUriScheme);
+			_LIT8(KScheme, "http");
+			//Uri must be of scheme "http" only
+			if (scheme.CompareF(KScheme) == 0)
+				{
+				url.Copy(iDeviceLocationArray[iter]);
+				CUPnPDescribeRequestParamSet* describeParamSet = CUPnPDescribeRequestParamSet::NewL (pnpFamily );
+				describeParamSet->SetUriL(url);
+				}
+			else
+				{
+				_LIT(KInavlidUri, "Describe Request for InvalidURi");
+				INFO_PRINTF1(KInavlidUri);
+				return;
+				}
+			}
+			
+		iControlPoint.Describe(*pnpBundle );
+		TBool SchedulerStatus = ETrue;
+		_LIT(KSchedulerStatus, "schedulerstart");
+		GetBoolFromConfig(GetCurrentSection(), KSchedulerStatus, SchedulerStatus);
+		if(SchedulerStatus)
+			{
+			CActiveScheduler::Start();
+			}
+		}
+	_LIT(KInfoLogFile1, "CTestUPnPManager::DescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	CleanupStack::PopAndDestroy( pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	}
+
+void CTestUPnPManager::ResolveAllUrisL()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::ResolveAllUrisL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt count = iDescriptionSuiteArray.Count();
+	//__ASSERT_DEBUG ( count > 0, User::Panic (KDescribeTestPanicCategory, KErrNoServiceUris ) );
+	if( count <=0 )
+		{
+		_LIT(KErrResolve, "No Description is exist to Resolve URIs");
+		ERR_PRINTF1(KErrResolve);
+		return;
+		}
+	//Fill the all types of Uris for each base Uri
+	for (TInt index(0); index < count ; index++ )
+		{
+		GetServiceUrlsListL(index);
+		ResolveScpdUrisL(index);
+		ResolveEventUrisL(index);
+		ResolveControlUrisL(index);
+		}
+	}
+
+void CTestUPnPManager::GetServiceUrlsListL(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::GetServiceUrlsListL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPDeviceDescription*	rootDeviceDescription = NULL;
+	//Release the content of StringPool if any
+	if(iStringPoolMgr)
+		iStringPoolMgr->Release();
+	DeleteSeriveUrlsList(aIndex);
+
+	 iStringPoolMgr = CStringPoolManager::NewL();
+	 //Store the Parsed node info
+	 iStringPool = iStringPoolMgr->StringPool();
+	_LIT(KInfoLogFile4, "Creating Stringpool and its manager.... \n");
+	INFO_PRINTF1(KInfoLogFile4);
+	
+	//Parse the device description
+    CUPnPDescriptionParser* app = CUPnPDescriptionParser::NewL( iStringPool, CUPnPDescriptionParser::EDevice);
+	_LIT(KInfoLogFile2, "CTestUPnPManager::CUpnpDeviceXmlParser::NewL().... \n");
+	INFO_PRINTF1(KInfoLogFile2);
+    TRAPD(error,(rootDeviceDescription = static_cast<CUPnPDeviceDescription*>(app->ParseDescriptionBufL(iDescriptionSuiteArray[aIndex].iDescription))));
+	if (error != KErrNone)
+		{
+		_LIT(KErrLogFile1, "CTestUPnPManager::GetServiceUrlsListL() is Terminating.... And Error is %d \n");
+		ERR_PRINTF2(KErrLogFile1, error);
+		return;
+		}
+	_LIT(KInfoLogFile3, "rootDeviceDescription.... \n");
+	INFO_PRINTF1(KInfoLogFile3);
+	
+   
+    
+    delete app;
+	app = NULL;
+	_LIT(KInfoLogFile5, "Deleting CUpnpDeviceXmlParser().... \n");
+	INFO_PRINTF1(KInfoLogFile5);
+
+    //Retrieve the Tag for Base
+    RString string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EUrlBase,iStringPoolMgr->GetUPnPTable());
+    //Get the node info for the Base i.e., value between the start and end Base tags
+    //If BaseUri exist in Description replace already existing BaseUri
+	if(rootDeviceDescription->Property(string).Compare(KNullDesC8)>0)
+		{
+		//Delete already stored Base uri
+		iDescriptionSuiteArray[aIndex].iBaseUrl.Close();
+		iDescriptionSuiteArray[aIndex].iBaseUrl.Create(rootDeviceDescription->Property(string).Length());
+		iDescriptionSuiteArray[aIndex].iBaseUrl.Copy(rootDeviceDescription->Property(string));
+		}
+
+	//Catch hold of first level of Device
+	CUPnPDevice* device = rootDeviceDescription->DeviceObject();
+
+	TInt count =device->CountOfEmbeddedDeviceInfoTable();
+	if(count>0)
+		{
+		for(TInt i=0;i<count;i++)
+			{
+			GetEmbeddedDeviceServicesL(aIndex,device->AtEmbeddedDeviceInfoTable(i));
+			}
+		}
+	GetServiceValuesL(aIndex, device);
+	_LIT(KInfoLogFile6, "Finished GetServiceValuesL.... \n");
+	INFO_PRINTF1(KInfoLogFile6);
+	delete rootDeviceDescription;
+	rootDeviceDescription = NULL;
+	_LIT(KInfoLogFile1, "CTestUPnPManager::GetServiceUrlsListL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::DeleteSeriveUrlsList(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::DeleteSeriveUrlsList().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	for(TInt i=0;i<iDescriptionSuiteArray[aIndex].iServiceUrls.Count();i++)
+		{
+		iDescriptionSuiteArray[aIndex].iServiceUrls[i].serviceType.Close();
+		iDescriptionSuiteArray[aIndex].iServiceUrls[i].scpdUrl.Close();
+		iDescriptionSuiteArray[aIndex].iServiceUrls[i].controlUrl.Close();
+		iDescriptionSuiteArray[aIndex].iServiceUrls[i].eventSubUrl.Close();
+		}
+	iDescriptionSuiteArray[aIndex].iServiceUrls.Close();
+	_LIT(KInfoLogFile1, "CTestUPnPManager::DeleteSeriveUrlsList() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::GetEmbeddedDeviceServicesL(TInt aIndex, CUPnPDevice* aDevice)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::GetEmbeddedDeviceServicesL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	if(aDevice->CountOfEmbeddedDeviceInfoTable() > 0)
+		{
+		for(TInt i=0;i<aDevice->CountOfEmbeddedDeviceInfoTable();i++)
+			{
+			GetEmbeddedDeviceServicesL(aIndex, aDevice->AtEmbeddedDeviceInfoTable(i));
+			GetServiceValuesL(aIndex, aDevice);
+			}
+		}
+	else
+		{
+		GetServiceValuesL(aIndex, aDevice);
+		}
+	}
+
+
+void CTestUPnPManager::AppendDeviceLocationL(TDesC8& aDevLocPointer)
+	{
+	User::LeaveIfError(	iDeviceLocationArray.Append(aDevLocPointer) );
+	}
+
+void CTestUPnPManager::AppendScpdUriL(RBuf8& aScpdUri)
+	{
+	User::LeaveIfError(	iScpdUriArray.Append(aScpdUri) );
+	}
+
+void CTestUPnPManager::AppendEventUriL(RBuf8& aEventUri)
+	{
+	User::LeaveIfError(	iEventUriArray.Append(aEventUri) );
+	}
+
+void CTestUPnPManager::AppendControlUriL(RBuf8& aControlUri)
+	{
+	User::LeaveIfError(	iControlUriArray.Append(aControlUri) );
+	}
+
+void CTestUPnPManager::AppendDescriptionL(RBuf8& aBaseUri,RBuf8& aDescription)
+	{
+	TDescriptionSuite buf;
+	buf.iDescription.CreateL(aDescription);
+	buf.iBaseUrl.CreateL(aBaseUri);
+	iDescriptionSuiteArray.Append(buf);
+	}
+
+void CTestUPnPManager::GetServiceValuesL(TInt aIndex, CUPnPDevice* aDevice)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::GetServiceValuesL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TUint count;
+	const CUPnPServiceInfo* servInfo = NULL;
+	TServiceUrl serviceurl;
+	count = aDevice->CountOfServiceInfoTable();
+	if(count > 0)
+		{
+		for(TInt i = 0;  i< aDevice->CountOfServiceInfoTable(); i++)
+			{
+			servInfo = aDevice->AtServiceInfoTable(i);
+
+			RString string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EServiceType, iStringPoolMgr->GetUPnPTable());
+			serviceurl.serviceType.Create(servInfo->Property(string).Length());
+			serviceurl.serviceType.Copy(servInfo->Property(string));
+
+			string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EScpdUrl, iStringPoolMgr->GetUPnPTable());
+			serviceurl.scpdUrl.Create(servInfo->Property(string).Length());
+			serviceurl.scpdUrl.Copy(servInfo->Property(string));
+
+			string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EContorlUrl, iStringPoolMgr->GetUPnPTable());
+			serviceurl.controlUrl.Create(servInfo->Property(string).Length());
+			serviceurl.controlUrl.Copy(servInfo->Property(string));
+
+			string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EEventSubUrl, iStringPoolMgr->GetUPnPTable());
+			serviceurl.eventSubUrl.Create(servInfo->Property(string).Length());
+			serviceurl.eventSubUrl.Copy(servInfo->Property(string));
+
+			iDescriptionSuiteArray[aIndex].iServiceUrls.AppendL(serviceurl);
+			}
+		}
+	_LIT(KInfoLogFile1, "CTestUPnPManager::GetServiceValuesL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+
+CUPnPTimer::CUPnPTimer(CTestUPnPManager* aManager)
+: CActive(EPriorityHigh),iManager(aManager)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+
+CUPnPTimer::~CUPnPTimer()
+    {
+	Cancel();
+    }
+
+
+CUPnPTimer* CUPnPTimer::NewL(CTestUPnPManager* aManager)
+    {
+	CUPnPTimer* self = new (ELeave) CUPnPTimer(aManager);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+    }
+
+void CUPnPTimer::ConstructL()
+	{
+	}
+
+
+void CUPnPTimer::IssueRequestL(TTimeIntervalMicroSeconds32 anInterval)
+    {
+	iTimer.CreateLocal();
+    iTimer.After(iStatus, anInterval);
+    SetActive();
+	_LIT(KInfoLogFile, "CUPnPTimer::IssueRequestL() End.... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile);
+    }
+
+
+void CUPnPTimer::RunL()
+	{
+	CActiveScheduler::Stop();
+	_LIT(KInfoLogFile, "CUPnPTimer::RunL() End.... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile);
+	
+	}
+
+void CUPnPTimer::DoCancel()
+	{
+	iTimer.Cancel();
+	}
+
+CAction* CAction::NewL(CTestUPnPManager* aManager)
+	{
+	CAction* self = new (ELeave) CAction(aManager);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+
+	}
+
+CAction::CAction(CTestUPnPManager* aManager)
+: CActive(CActive::EPriorityStandard),iManager(aManager)
+	{
+
+	}
+
+CAction::~CAction()
+	{
+	Cancel();
+	iFile.Close ( );
+	iFs.Close ( );
+	}
+
+void CAction::ConstructL()
+	{
+	_LIT(KInfoLogFile, "CAction::ConstructL() .... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile);
+	CActiveScheduler::Add(this);
+	_LIT(KPath, "c:\\upnp\\testupnp\\client\\testdata\\");
+	_LIT(KFile, "c:\\upnp\\testupnp\\client\\testdata\\actionresponse.xml");
+	User::LeaveIfError ( iFs.Connect ( ) );
+    TInt err = iFile.Open ( iFs, KFile, EFileWrite );
+    if(err == KErrNotFound)
+		{
+		err = iFile.Create(iFs,KFile,EFileWrite);
+		}
+	else if(err == KErrPathNotFound)
+		{
+		err= iFs.MkDirAll(KPath);
+		if(err==KErrNone || err== KErrAlreadyExists)
+			{
+			iFile.Create(iFs,KFile,EFileWrite);
+			}
+		}
+	else
+    	{
+    	User::LeaveIfError(err);
+    	}
+	}
+
+void CAction::RunL()
+	{
+	switch(iActionState)
+		{
+		case ESendData:
+			iActionState = EReceiveData;
+			iControlChannel.Recv ( iCtrlMsg, iStatus );
+			SetActive();
+			_LIT(KInfoLogFile, "CAction::RunL Send Data.... \n");
+			iManager->INFO_PRINTF1(KInfoLogFile);
+			break;
+		case EReceiveData:
+		    TInt err = iFile.Write(iCtrlMsg.MessageDes ());
+		    if ( !iCtrlMsg.IsLast () )
+		    	{
+				iCtrlMsg.ClearFlags();
+		    	iControlChannel.Recv ( iCtrlMsg, iStatus );
+				SetActive();
+				_LIT(KInfoLogFile, "CAction::RunL Receive Data... \n");
+				iManager->INFO_PRINTF1(KInfoLogFile);
+		    	}
+			else
+				{
+				iControlChannel.Close( );
+				CActiveScheduler::Stop();
+				_LIT(KInfoLogFile, "CAction::RunL End.... \n");
+				iManager->INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+		}
+	}
+
+void CAction::DoCancel()
+	{
+	}
+
+void CAction::InitiateActionControlL(TDesC8& aUri,RPnPServiceDiscovery& aControlPoint)
+	{
+	RFs fs;
+    RFile	file;
+    TInt err;
+    RBuf8 buf;
+	_LIT(KInfoLogFile2, "InitiateActionControlL .... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile2);
+
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+    err = file.Open(fs,_L("z:\\upnp\\testupnp\\client\\testdata\\action.xml"),EFileRead);
+	if (err != KErrNone)
+	    {
+	    User::LeaveIfError(err);
+	    }
+	CleanupClosePushL(file);
+	TInt fileSize = 0;
+	file.Size(fileSize);
+	buf.Create(fileSize);
+	err = file.Read(buf, fileSize);
+	err= -1;
+	err = aControlPoint.InitiateControl ( iControlChannel, aUri );
+	_LIT(KInfoLogFile, "InitiateControl() on Control Point Done with %d.... \n");
+	iManager->INFO_PRINTF2(KInfoLogFile,err);
+	iCtrlMsg.SetMessageDes ( buf );
+	iCtrlMsg.SetLast ();
+	TInt newLen = buf.Length();
+	iCtrlMsg.SetMaxLength (newLen);
+	iControlChannel.Send ( iCtrlMsg, iStatus );
+	SetActive();
+	CActiveScheduler::Start();
+	_LIT(KInfoLogFile1, "InitiateActionControlL End.... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile1);
+	CleanupStack::PopAndDestroy(2 );
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/Scripts/testdelay.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+//! @file
+//! @SYMTestSuiteName	testdelay 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all testdelay 
+LOAD_SUITE testdelay
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+
+PRINT Completed testdelay
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,28 @@
+// 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:
+//
+
+PRJ_EXPORTS
+
+PRJ_TESTEXPORTS
+../Scripts/testdelay.script		z:/upnp/testupnp/client/scripts/testdelay.script
+testdelay.iby 					/epoc32/rom/include/testdelay.iby
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+testdelay.mmp
+
+PRJ_PLATFORMS
+winscw armv5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/group/testdelay.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+// 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 __TEST_DELAY_IBY__
+#define __TEST_DELAY_IBY__
+
+file=ABI_DIR\BUILD_DIR\testdelay.exe		                 Sys\Bin\testdelay.exe	
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/group/testdelay.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+// 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:
+//
+
+TARGET      	testdelay.exe
+TARGETTYPE  	exe
+UID				0x1000007A 0xA000930B
+VENDORID 		0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+
+SOURCE 			testupnp.cpp
+SOURCE 			testdelay.cpp
+
+
+USERINCLUDE		../inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/test
+SYSTEMINCLUDE		/epoc32/include/ecom
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/inc/testdelay.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,89 @@
+// 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:
+// testupnpmanager.h
+// Contains implementation of CTestUPnPManager class
+// 
+//
+
+#ifndef __TEST_UPNP_MANAGER_H__
+#define __TEST_UPNP_MANAGER_H__
+
+// System Includes
+#include <testexecutestepbase.h>
+#include <e32base.h>
+#include <e32cmn.h>
+#include <e32std.h>
+#include <es_sock.h>
+#include <in_sock.h>
+#include <commdbconnpref.h>
+#include <e32des8.h>
+
+
+// Constant literals
+_LIT(KTestUPnPManager, "TestUPnPManager");
+
+/**
+CTestUPnPManager class which is derived from the CTestStep and TTestUPnPUtilities provides the 
+functionalities to perform Create (and open) an individual TestStep (testcase or part testcase), Run a TestStep
+with defined pre and post processing, Abort a TestStep, Close a TestStep session.
+Also performs the creation of threads to run as control point or service point, performs a sequence of upnp operations 
+and get back the results to compare them against expected results.
+@file
+@internalTechnology
+*/
+class CTestUPnPManager : public CTestStep
+	{
+public:
+	CTestUPnPManager();
+	~CTestUPnPManager();
+
+	virtual TVerdict doTestStepPreambleL();
+	virtual TVerdict doTestStepPostambleL();
+	virtual TVerdict doTestStepL();
+	
+private:
+	void  InitializeL();
+
+public:
+	CActiveScheduler*					iScheduler;
+	TRequestStatus 						iStatus;	
+	};
+		
+/**
+CUPnPTimer class is derived from CActive. It to provides a Timer AO
+@file
+@internalTechnology
+*/	
+class CUPnPTimer:public CActive
+	{
+	public:
+		static CUPnPTimer* NewL ();
+		~CUPnPTimer(); 
+		void IssueRequestL(TTimeIntervalMicroSeconds32 anInterval);
+		TBool PendingRequest();	
+
+		void RunL();
+		void DoCancel(); 
+
+	private:
+		CUPnPTimer();
+		void ConstructL();
+	
+	private:
+		RTimer iTimer;
+		TBool iRequestPending;
+	}; 
+	
+
+#endif //__TEST_UPNP_MANAGER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/inc/testupnp.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+// 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:
+// Contains implementation of CTestUPnP class
+// 
+//
+
+#ifndef __TEST_UPNP_H__
+#define __TEST_UPNP_H__
+#include <testexecuteserverbase.h>
+
+/**
+CTestUPnP class which is derived from the Test server and provides the functionalities to 
+perform ability to run individual test steps (test cases or part testcases) either sequentially 
+or concurrently within scripts (test harnesses). 
+@file
+@internalTechnology
+*/
+
+class CTestUPnP : public CTestServer
+	{
+public:
+	static CTestUPnP* NewL();
+	// Base class pure virtual override
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+	};
+
+#endif // __TEST_UPNP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/src/testdelay.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,145 @@
+// 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:
+// Contains implementation of CTestUPnPManager class
+// 
+//
+
+/**
+ @file
+ @internalTechnology
+*/
+
+#include "testdelay.h"
+
+
+/*
+  Constructor:
+  @internalTechnology
+  @test
+*/
+CTestUPnPManager::CTestUPnPManager()
+:	CTestStep()
+	{
+	}
+
+/*
+   Initializes all member vaiables.
+   @param		None.
+   @return		None.
+*/
+void CTestUPnPManager::InitializeL()
+	{
+	iScheduler = new (ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iScheduler);
+	}
+
+/*
+   Destructor
+   @internalTechnology
+   @test
+*/
+CTestUPnPManager::~CTestUPnPManager()
+	{
+	CActiveScheduler::Install(NULL);
+	delete iScheduler;
+	}
+
+/*
+   Implementation of CTestStep base class virtual and this is used for doing all
+   initialisation common
+    to derived classes here.
+   @param  None
+   @return TVerdict
+ */
+TVerdict CTestUPnPManager::doTestStepPreambleL()
+	{
+	InitializeL();
+	return CTestStep::doTestStepPreambleL();
+	}
+
+/*
+   Implementation of CTestStep base class virtual and it is used for doing all
+   after test treatment common to derived classes in here.
+   @return TVerdict
+ */
+TVerdict CTestUPnPManager::doTestStepPostambleL()
+	{
+	return CTestStep::doTestStepPostambleL();
+	}
+
+
+TVerdict CTestUPnPManager::doTestStepL()
+	{
+	return TestStepResult();	
+	}
+
+
+
+CUPnPTimer::CUPnPTimer()
+: CActive(EPriorityIdle), iRequestPending(EFalse)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+
+CUPnPTimer::~CUPnPTimer()
+    {
+	if(PendingRequest())
+		{
+		Cancel();
+		}
+    }
+
+
+CUPnPTimer* CUPnPTimer::NewL()
+    {
+	CUPnPTimer* self = new (ELeave) CUPnPTimer();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+    }
+
+void CUPnPTimer::ConstructL()
+	{
+	}
+
+
+void CUPnPTimer::IssueRequestL(TTimeIntervalMicroSeconds32 anInterval)
+    {
+	iTimer.CreateLocal();
+    iTimer.After(iStatus, anInterval);
+ 	iRequestPending = ETrue;
+    SetActive();
+    }
+
+TBool CUPnPTimer::PendingRequest()
+    {
+    return iRequestPending;
+    }
+
+
+void CUPnPTimer::RunL()
+	{
+	iRequestPending = EFalse;
+	CActiveScheduler::Stop();
+	}
+
+void CUPnPTimer::DoCancel()
+	{
+	if(PendingRequest())
+		{
+		Cancel();
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testdelay/src/testupnp.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+// 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:
+// Contains implementation of CTestUPnPManager class
+// 
+//
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#include "testupnp.h"
+#include "testdelay.h"
+
+/**
+	Static factory constructor. Uses two phase construction and leaves nothing on the 
+	CleanupStack. Creates a CTestUPnP object.
+	@param  None
+	@return Instance of the test server
+ */
+CTestUPnP* CTestUPnP::NewL()
+	{
+	CTestUPnP *	server = new (ELeave) CTestUPnP();
+	CleanupStack::PushL(server);
+	// CServer base class call
+	RProcess	handle = RProcess();
+	TParsePtrC	serverName(handle.FileName());
+	server->ConstructL(serverName.Name());
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+/** 
+   Function to create and start the CTestServer derived server.
+   Secure variant.Much simpler, uses the new Rendezvous() call to sync with the client
+   @param  None
+   @return None
+*/
+LOCAL_C void MainL()
+	{
+	// Leave the hooks in for platform security
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().DataCaging(RProcess::ESecureApiOn);
+	CActiveScheduler* sched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CTestUPnP*	server = NULL;
+	// Create the CTestServer derived server
+	TRAPD(err,server = CTestUPnP::NewL());
+	if(err == KErrNone)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+/**
+   Secure variant only
+   Process entry point. Called by client using RProcess API.	
+   @param  None
+   @return Standard Epoc error code on process exit
+ */
+GLDEF_C TInt E32Main()
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD( error, MainL() );
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return error;
+    }
+
+/**
+   Secure and non-secure variants
+   Implementation of CTestServer pure virtual
+   @param  aStepName a reference to string
+   @return A CTestStep derived instance
+ */
+CTestStep* CTestUPnP::CreateTestStep(const TDesC& aStepName)
+	{
+	CTestStep* testStep = NULL;
+	// They are created "just in time" when the worker thread is created
+	// More test steps can be added below
+	if(aStepName == KTestUPnPManager)
+		{
+		testStep = new CTestUPnPManager();
+        }
+
+	return testStep;
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/Scripts/test_synchronize_client.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+//! @file
+//! @SYMTestSuiteName	test_synchronize_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all test_synchronize_client 
+LOAD_SUITE test_synchronize_client
+
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini multiplemachinemode
+
+PRINT Completed test_synchronize_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/Scripts/test_synchronize_server.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+//! @file
+//! @SYMTestSuiteName	test_synchronize_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all test_synchronize_server 
+LOAD_SUITE test_synchronize_server
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\server\testdata\ini_files\multiplemachines.ini multiplemachinemode
+
+PRINT Completed test_synchronize_server
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/TestData/Ini_Files/test_synchronize_client.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,8 @@
+[clientdata]
+clientenabled=TRUE
+serverport=32244
+serveripaddress=10.192.196.165
+
+[serverdata]
+clientenabled=FALSE
+serverport=32244
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,34 @@
+// 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:
+//
+
+PRJ_EXPORTS
+
+PRJ_TESTEXPORTS
+
+../TestData/Ini_Files/test_synchronize_client.ini		z:/upnp/testupnp/client/testdata/ini_files/test_synchronize_client.ini
+../Scripts/test_synchronize_client.script				z:/upnp/testupnp/client/scripts/test_synchronize_client.script
+../Scripts/test_synchronize_server.script				z:/upnp/testupnp/server/scripts/test_synchronize_server.script
+
+test_synchronize_client.iby /epoc32/rom/include/test_synchronize_client.iby
+test_synchronize_server.iby /epoc32/rom/include/test_synchronize_server.iby
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+test_synchronize_server.mmp
+test_synchronize_client.mmp
+
+PRJ_PLATFORMS
+winscw armv5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/test_synchronize_client.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,26 @@
+// 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 __TEST_SYNCHRONIZE_CLIENT_IBY__
+#define __TEST_SYNCHRONIZE_CLIENT_IBY__
+
+#include <testexecute.iby>
+
+file=ABI_DIR\BUILD_DIR\test_synchronize_client.exe		                 Sys\Bin\test_synchronize_client.exe
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\test_synchronize_client.script             upnp\testupnp\client\scripts\test_synchronize_client.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini     upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/test_synchronize_client.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+// 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:
+//
+
+TARGET      	test_synchronize_client.exe
+TARGETTYPE  	exe
+UID				0x1000007A 0xA0009309
+VENDORID 		0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+
+SOURCE 			testupnp.cpp
+SOURCE 			testupnpmanager.cpp
+
+
+USERINCLUDE		../inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/test
+SYSTEMINCLUDE		/epoc32/include/ecom
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+LIBRARY         esock.lib 
+LIBRARY        	insock.lib
+LIBRARY         commdb.lib
+LIBRARY		cinidata.lib
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/test_synchronize_server.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,25 @@
+// 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 __TEST_SYNCHRONIZE_SERVER_IBY__
+#define __TEST_SYNCHRONIZE_SERVER_IBY__
+
+#include <testexecute.iby>
+
+file=ABI_DIR\BUILD_DIR\test_synchronize_server.exe		                 Sys\Bin\test_synchronize_server.exe	
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\test_synchronize_server.script    upnp\testupnp\server\scripts\test_synchronize_server.script
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/group/test_synchronize_server.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+// 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:
+//
+
+TARGET      	test_synchronize_server.exe
+TARGETTYPE  	exe
+UID				0x1000007A 0xA000930A
+VENDORID 		0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+
+SOURCE 			testupnp.cpp
+SOURCE 			testupnpmanager.cpp
+
+
+USERINCLUDE		../inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/test
+SYSTEMINCLUDE		/epoc32/include/ecom
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+LIBRARY         esock.lib 
+LIBRARY        	insock.lib
+LIBRARY         commdb.lib
+LIBRARY		cinidata.lib
+
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/inc/testupnp.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+// 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:
+// Contains implementation of CTestUPnP class
+// 
+//
+
+#ifndef __TEST_UPNP_H__
+#define __TEST_UPNP_H__
+#include <testexecuteserverbase.h>
+
+/**
+CTestUPnP class which is derived from the Test server and provides the functionalities to 
+perform ability to run individual test steps (test cases or part testcases) either sequentially 
+or concurrently within scripts (test harnesses). 
+@file
+@internalTechnology
+*/
+
+class CTestUPnP : public CTestServer
+	{
+public:
+	static CTestUPnP* NewL();
+	// Base class pure virtual override
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+	};
+
+#endif // __TEST_UPNP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/inc/testupnpmanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+// 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:
+// Contains implementation of CTestUPnPManager class
+// 
+//
+
+#ifndef __TEST_UPNP_MANAGER_H__
+#define __TEST_UPNP_MANAGER_H__
+
+// System Includes
+#include <testexecutestepbase.h>
+#include <e32base.h>
+#include <e32cmn.h>
+#include <e32std.h>
+#include <es_sock.h>
+#include <in_sock.h>
+#include <commdbconnpref.h>
+#include <e32des8.h>
+
+
+// Constant literals
+_LIT(KTestUPnPManager, "TestUPnPManager");
+
+/**
+CTestUPnPManager class which is derived from the CTestStep and TTestUPnPUtilities provides the 
+functionalities to perform Create (and open) an individual TestStep (testcase or part testcase), Run a TestStep
+with defined pre and post processing, Abort a TestStep, Close a TestStep session.
+Also performs the creation of threads to run as control point or service point, performs a sequence of upnp operations 
+and get back the results to compare them against expected results.
+@file
+@internalTechnology
+*/
+class CTestUPnPManager : public CTestStep
+	{
+public:
+	CTestUPnPManager();
+	~CTestUPnPManager();
+
+	virtual TVerdict doTestStepPreambleL();
+	virtual TVerdict doTestStepPostambleL();
+	virtual TVerdict doTestStepL();
+	
+private:
+	void  InitializeL();
+	void  ConnectClientL();
+	void  ConnectServerL();	
+
+public:
+	CActiveScheduler*					iScheduler;
+	TRequestStatus 						iStatus;	
+	};
+
+
+#endif //__TEST_UPNP_MANAGER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/src/testupnp.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+// 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:
+// Contains implementation of CTestUPnPManager class
+// 
+//
+
+/**
+ @file
+ @internalTechnology 
+*/
+
+#include "testupnp.h"
+#include "testupnpmanager.h"
+
+/**
+	Static factory constructor. Uses two phase construction and leaves nothing on the 
+	CleanupStack. Creates a CTestUPnP object.
+	@param  None
+	@return Instance of the test server
+ */
+CTestUPnP* CTestUPnP::NewL()
+	{
+	CTestUPnP *	server = new (ELeave) CTestUPnP();
+	CleanupStack::PushL(server);
+	// CServer base class call
+	RProcess	handle = RProcess();
+	TParsePtrC	serverName(handle.FileName());
+	server->ConstructL(serverName.Name());
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+/** 
+   Function to create and start the CTestServer derived server.
+   Secure variant.Much simpler, uses the new Rendezvous() call to sync with the client
+   @param  None
+   @return None
+*/
+LOCAL_C void MainL()
+	{
+	// Leave the hooks in for platform security
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().DataCaging(RProcess::ESecureApiOn);
+	CActiveScheduler* sched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CTestUPnP*	server = NULL;
+	// Create the CTestServer derived server
+	TRAPD(err,server = CTestUPnP::NewL());
+	if(err == KErrNone)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+/**
+   Secure variant only
+   Process entry point. Called by client using RProcess API.	
+   @param  None
+   @return Standard Epoc error code on process exit
+ */
+GLDEF_C TInt E32Main()
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD( error, MainL() );
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return error;
+    }
+
+/**
+   Secure and non-secure variants
+   Implementation of CTestServer pure virtual
+   @param  aStepName a reference to string
+   @return A CTestStep derived instance
+ */
+CTestStep* CTestUPnP::CreateTestStep(const TDesC& aStepName)
+	{
+	CTestStep* testStep = NULL;
+	// They are created "just in time" when the worker thread is created
+	// More test steps can be added below
+	if(aStepName == KTestUPnPManager)
+		{
+		testStep = new CTestUPnPManager();
+        }
+
+	return testStep;
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testsynchronization/src/testupnpmanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,200 @@
+// 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:
+// Contains implementation of CTestUPnPManager class
+// 
+//
+
+/**
+ @file
+ @internalTechnology
+*/
+
+#include "testupnpmanager.h"
+
+
+/*
+  Constructor:
+  @internalTechnology
+  @test
+*/
+CTestUPnPManager::CTestUPnPManager()
+:	CTestStep()
+	{
+	}
+
+/*
+   Initializes all member vaiables.
+   @param		None.
+   @return		None.
+*/
+void CTestUPnPManager::InitializeL()
+	{
+	iScheduler = new (ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iScheduler);
+	}
+
+/*
+   Destructor
+   @internalTechnology
+   @test
+*/
+CTestUPnPManager::~CTestUPnPManager()
+	{
+	CActiveScheduler::Install(NULL);
+	delete iScheduler;
+	}
+
+/*
+   Implementation of CTestStep base class virtual and this is used for doing all
+   initialisation common
+    to derived classes here.
+   @param  None
+   @return TVerdict
+ */
+TVerdict CTestUPnPManager::doTestStepPreambleL()
+	{
+	return CTestStep::doTestStepPreambleL();
+	}
+
+/*
+   Implementation of CTestStep base class virtual and it is used for doing all
+   after test treatment common to derived classes in here.
+   @return TVerdict
+ */
+TVerdict CTestUPnPManager::doTestStepPostambleL()
+	{
+	return CTestStep::doTestStepPostambleL();
+	}
+
+
+TVerdict CTestUPnPManager::doTestStepL()
+	{
+	return TestStepResult();	
+	}
+
+
+void CTestUPnPManager::ConnectClientL()
+    {
+
+	
+    RSocketServ 	iSockServ;
+    RConnection 	iConnection;
+    RSubConnection 	iSubConnection;
+
+	TInt error = KErrNone;
+	error = iSockServ.Connect();
+	error = iConnection.Open(iSockServ);
+
+	TCommDbConnPref prefs;
+	prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
+	prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
+
+	error = iConnection.Start();
+	error = iSubConnection.Open(iSockServ, RSubConnection::EAttachToDefault, iConnection);
+
+	User::LeaveIfError(error);
+
+	_LIT(KServerIPAddress, "10.192.192.138");
+	TInt serverPort = 7890;
+	TInetAddr destAddr;
+	destAddr.Input(KServerIPAddress);
+	destAddr.SetPort(serverPort);
+
+
+
+	FOREVER
+		{
+		TRequestStatus	status;
+		RSocket	socket;
+		TInt error = KErrNone;
+		TInt64 numOfRetries = 0;
+		const TInt64 KMaxNumOfRetries = 1152921504606846976;
+
+
+		error = socket.Open(iSockServ, KAfInet, KSockStream, KProtocolInetTcp, iSubConnection);
+		User::LeaveIfError(error);
+		socket.Connect(destAddr, status);
+		User::WaitForRequest(status);
+
+		if(KErrNone == status.Int())
+			{
+			_LIT(KHostReachable, "Host reachable \n");
+			INFO_PRINTF1(KHostReachable);
+			socket.Close();
+			iSubConnection.Close();
+			iConnection.Close();
+			iSockServ.Close();
+			return;
+			}
+		else
+			{
+			_LIT(KHostNotReachable, "Host NOT reachable \n");
+			INFO_PRINTF1(KHostNotReachable);
+			numOfRetries++;
+			socket.Close();
+			if(numOfRetries > KMaxNumOfRetries)
+				{
+				iSubConnection.Close();
+				iConnection.Close();
+				iSockServ.Close();
+				return;
+				}
+			}
+		}
+    }
+
+
+void CTestUPnPManager::ConnectServerL()
+    {
+	RSocketServ 		iSockServ;
+	RConnection 		iConnection;
+	RSubConnection 		iSubConnection;
+	RSocket 			iSocket;
+	RSocket				iConnectedSocket;
+	TRequestStatus 		status;
+
+
+
+	TInt serverPort = 7890;
+
+	TInt error = KErrNone;
+	error = iSockServ.Connect();
+	error = iConnection.Open(iSockServ);
+
+	error = iConnection.Start();
+	error = iSubConnection.Open(iSockServ, RSubConnection::EAttachToDefault, iConnection);
+
+	TInetAddr anyAddrOnPort(KInetAddrAny,serverPort);
+	error = iSocket.Open(iSockServ, KAfInet, KSockStream, KProtocolInetTcp, iSubConnection);
+	error = iSocket.Bind(anyAddrOnPort);
+	error = iConnectedSocket.Open(iSockServ);
+	User::LeaveIfError(error);
+
+
+	const TInt KQueueSize = 3;
+	iSocket.Listen(KQueueSize);
+	iSocket.Accept(iConnectedSocket,status);
+	User::WaitForRequest(status);
+
+	_LIT(KConnectionEstablished, "connection established \n");
+	INFO_PRINTF1(KConnectionEstablished);
+
+	iConnectedSocket.Close();
+	iSocket.Close();
+	iSubConnection.Close();
+	iConnection.Close();
+	iSockServ.Close();
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+
+START_TESTCASE			UPnP_Discovery_0001
+//! @file				
+//! @SYMTestCaseID		UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ				REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 		Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults Should get responses from all devices.	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0001.ini discovery_0001
+END_TESTCASE	UPnP_Discovery_0001
+
+
+PRINT Completed multiple_machines_client 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0002.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0002
+//! @file					
+//! @SYMTestCaseID			UPNP- POS - 0001	
+//! @SYMTestCaseDesc 		search for all UPnP enabled devices
+//! @SYMREQ					REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High	
+//! @SYMTestActions 		Perform discovery with ST:ssdp:all second version
+//! @SYMTestExpectedResults Should get response from all devices	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0002.ini discovery_0002
+END_TESTCASE	UPnP_Discovery_0002
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0003.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0003
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0002 to upnp-pos-0004	
+//! @SYMTestCaseDesc 		Search for UPnP Standard devices
+//! @SYMREQ					REQ8605,REQ8606,REQ8607,REQ8668
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High	
+//! @SYMTestActions 		Search with ST:urn:schemas-upnp-org:device:deviceType
+//! @SYMTestExpectedResults Search should complete with desired information	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0003.ini discovery_0003
+END_TESTCASE	UPnP_Discovery_0003
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0004.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0004
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0002 to upnp-pos-0004	
+//! @SYMTestCaseDesc 		Search for UPnP Standard devices second version
+//! @SYMREQ					REQ8605,REQ8606,REQ8607,REQ8668
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High	
+//! @SYMTestActions 		Search with ST:urn:schemas-upnp-org:device:deviceType second version
+//! @SYMTestExpectedResults Search should complete with desired information	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0004.ini discovery_0004
+END_TESTCASE	UPnP_Discovery_0004
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0005.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0005
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0005 to upnp-pos-0007	
+//! @SYMTestCaseDesc 		Search for UPnP Vendor defined devices
+//! @SYMREQ					REQ8605,REQ8606,REQ8607,REQ8668	
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High	
+//! @SYMTestActions 		M-Search with ST: urn:domain-name:device:deviceType:v
+//! @SYMTestExpectedResults Should send desired discovery information	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0005.ini discovery_0005
+END_TESTCASE	UPnP_Discovery_0005
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0006.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0006
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0005 to upnp-pos-0007	
+//! @SYMTestCaseDesc 		Search for UPnP Vendor defined devices second version
+//! @SYMREQ					REQ8605,REQ8606,REQ8607,REQ8668	
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High	
+//! @SYMTestActions 		M-Search with ST: urn:domain-name:device:deviceType:v second version
+//! @SYMTestExpectedResults Should send desired discovery information	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0006.ini discovery_0006
+END_TESTCASE	UPnP_Discovery_0006
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0007.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0007
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0008
+//! @SYMTestCaseDesc 		Search for UPnP Root Devices
+//! @SYMREQ					REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High	
+//! @SYMTestActions 		Search for UPnP Root Devices
+//! @SYMTestExpectedResults Should discover all UPnP Root Devices	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0007.ini discovery_0007
+END_TESTCASE	UPnP_Discovery_0007
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0008.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0008
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0008
+//! @SYMTestCaseDesc 		Search for UPnP Root Devices second version
+//! @SYMREQ					REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High	
+//! @SYMTestActions 		Search for UPnP Root Devices
+//! @SYMTestExpectedResults Should discover all UPnP Root Devices second version	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0008.ini discovery_0008
+END_TESTCASE	UPnP_Discovery_0008
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0009.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+
+START_TESTCASE					UPnP_Discovery_0009
+//! @file						
+//! @SYMTestCaseID				upnp-pos-0009
+//! @SYMTestCaseDesc 			Search for UPnP Device based on its UUID
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High
+//! @SYMTestActions 			Search for UPnP Device based on its UUID
+//! @SYMTestExpectedResults 	Should get response from the desired UUID only	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0009.ini discovery_0009
+END_TESTCASE	UPnP_Discovery_0009
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0010.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0010
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0009
+//! @SYMTestCaseDesc 		Search for UPnP Device based on its UUID second version
+//! @SYMREQ					REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High
+//! @SYMTestActions 		Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0010.ini discovery_0010
+END_TESTCASE	UPnP_Discovery_0010
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0011.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE					UPnP_Discovery_0011
+//! @file						
+//! @SYMTestCaseID				upnp-pos-0009
+//! @SYMTestCaseDesc 			Search for UPnP Device based on its UUID second version
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High
+//! @SYMTestActions 			Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults 	Should get response from the desired UUID only	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0011.ini discovery_0011
+END_TESTCASE	UPnP_Discovery_0011
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0012.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0012
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0009
+//! @SYMTestCaseDesc 		Search for UPnP Device based on its UUID second version
+//! @SYMREQ					REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High
+//! @SYMTestActions 		Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0012.ini discovery_0012
+END_TESTCASE	UPnP_Discovery_0012
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0013.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_Discovery_0013
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0013.ini discovery_0013
+END_TESTCASE	UPnP_Discovery_0013
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0014.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE					UPnP_Discovery_0014
+//! @file						
+//! @SYMTestCaseID				upnp-pos-0009
+//! @SYMTestCaseDesc 			Search for UPnP Device based on its UUID second version
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High
+//! @SYMTestActions 			Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults 	Should get response from the desired UUID only	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0014.ini discovery_0014
+END_TESTCASE	UPnP_Discovery_0014
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0015.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE					UPnP_Discovery_0015
+//! @file						
+//! @SYMTestCaseID				upnp-pos-0009
+//! @SYMTestCaseDesc 			Search for UPnP Device based on its UUID second version
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High
+//! @SYMTestActions 			Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults 	Should get response from the desired UUID only	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0015.ini discovery_0015
+END_TESTCASE	UPnP_Discovery_0015
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0016.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0016
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0009
+//! @SYMTestCaseDesc 		Search for UPnP Device based on its UUID second version
+//! @SYMREQ					REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High
+//! @SYMTestActions 		Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0016.ini discovery_0016
+END_TESTCASE	UPnP_Discovery_0016
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0017.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE					UPnP_Discovery_0017
+//! @file						
+//! @SYMTestCaseID				upnp-pos-0009
+//! @SYMTestCaseDesc 			Search for UPnP Device based on its UUID second version
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High
+//! @SYMTestActions 			Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults 	Should get response from the desired UUID only	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0017.ini discovery_0017
+END_TESTCASE	UPnP_Discovery_0017
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/UPnP_Discovery_0018.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE				UPnP_Discovery_0018
+//! @file					
+//! @SYMTestCaseID			upnp-pos-0009
+//! @SYMTestCaseDesc 		Search for UPnP Device based on its UUID second version
+//! @SYMREQ					REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		High
+//! @SYMTestActions 		Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0018.ini discovery_0018
+END_TESTCASE	UPnP_Discovery_0018
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/discover_low_ver.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! discover_low_ver.script
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPNP_DISCOVER_LOW_VER
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discover_low_ver.ini UPnP_discover_low_ver_0021
+END_TESTCASE	UPNP_DISCOVER_LOW_VER
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/discover_low_ver_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! discover_low_ver.script
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPNP_DISCOVER_LOW_VER
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discover_low_ver.ini UPnP_discover_low_ver_0022
+END_TESTCASE	UPNP_DISCOVER_LOW_VER
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/discover_low_ver_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! discover_low_ver.script
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPNP_DISCOVER_LOW_VER
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discover_low_ver.ini UPnP_discover_low_ver_0023
+END_TESTCASE	UPNP_DISCOVER_LOW_VER
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/test_synchronize_client.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+//! @file
+//! @SYMTestSuiteName	test_synchronize_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all test_synchronize_client 
+LOAD_SUITE test_synchronize_client
+
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini multiplemachinemode
+
+PRINT Completed test_synchronize_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/test_synchronize_server.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+//! @file
+//! @SYMTestSuiteName	test_synchronize_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all test_synchronize_server 
+LOAD_SUITE test_synchronize_server
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\server\testdata\ini_files\multiplemachines.ini multiplemachinemode
+
+PRINT Completed test_synchronize_server
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_abruptclose_describe_44_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_abruptclose_describe_44_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_abruptclose_describe_44_1
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp.ini  UPnP_AbruptClose_Describe_0001
+
+END_TESTCASE	upnp_abruptclose_describe_44_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_abruptclose_describe_44_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_abruptclose_describe_44_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_abruptclose_describe_44_1
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp_rev.ini  UPnP_AbruptClose_Describe_0001_rev
+
+END_TESTCASE	upnp_abruptclose_describe_44_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_abruptclose_discovery_43_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_abruptclose_discovery_43_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_abruptclose_discovery_43_1
+//! @file				
+//! @SYMTestCaseID				UPNP- POS - 0001	
+//! @SYMTestCaseDesc 			search for all UPnP enabled devices
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High	
+//! @SYMTestActions 			Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults 	Should get responses from all devices.	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp.ini  UPnP_AbruptClose_Discovery_0001
+
+END_TESTCASE	upnp_abruptclose_discovery_43_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_abruptclose_discovery_43_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_abruptclose_discovery_43_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_abruptclose_discovery_43_1
+//! @file				
+//! @SYMTestCaseID				UPNP- POS - 0001	
+//! @SYMTestCaseDesc 			search for all UPnP enabled devices
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High	
+//! @SYMTestActions 			Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults 	Should get responses from all devices.	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp_rev.ini  UPnP_AbruptClose_Discovery_0001_rev
+
+END_TESTCASE	upnp_abruptclose_discovery_43_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_describe_0001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_cancel_describe_0001
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldescribe.ini UPnP_cancel_describe_0001
+END_TESTCASE	UPnP_cancel_describe_0001
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_describe_0001_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_cancel_describe_0001_rev
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldescribe_rev.ini upnp_cancel_describe_0001_rev
+END_TESTCASE	UPnP_cancel_describe_0001_rev
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_discovery.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_cancel_discovery
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery.ini canceldiscovery
+END_TESTCASE	UPnP_cancel_discovery
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_discovery_0001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_cancel_discovery_0001
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery.ini upnp_cancel_discovery_0001
+END_TESTCASE	UPnP_cancel_discovery_0001
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_discovery_0001_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_cancel_discovery_0001_rev
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery_rev.ini upnp_cancel_discovery_0001_rev
+END_TESTCASE	UPnP_cancel_discovery_0001_rev
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_discovery_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_cancel_discovery_rev
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery_rev.ini canceldiscovery_rev
+END_TESTCASE	UPnP_cancel_discovery_rev
+
+
+PRINT Completed multiple_machines_client 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_register_notify_0037_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_cancel_register_notify_0037_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_cancel_register_notify_0037_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0037
+//! @SYMTestCaseDesc 		Control point cancels registration for NOTIFY announcements
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point cancels registration to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested operation is not approved then control point may acknowledge with appropriate error message. 
+//! 						3.	After a successful cancellation of the registration, the control point will not get any notifications.
+//! @SYMTestExpectedResults	If Cancellation of the registration is successful, then Control point should not get any event messages for SSDP: Alive and SSDP: Byebye.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0037.ini upnp_cancel_register_notify_0037_1
+
+END_TESTCASE	upnp_cancel_register_notify_0037_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_cancel_register_notify_0037_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_cancel_register_notify_0037_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_cancel_register_notify_0037_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0037
+//! @SYMTestCaseDesc 		Control point cancels registration for NOTIFY announcements
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point cancels registration to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested operation is not approved then control point may acknowledge with appropriate error message. 
+//! 						3.	After a successful cancellation of the registration, the control point will not get any notifications.
+//! @SYMTestExpectedResults	If Cancellation of the registration is successful, then Control point should not get any event messages for SSDP: Alive and SSDP: Byebye.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0037_rev.ini upnp_cancel_register_notify_0037_1_rev
+
+END_TESTCASE	upnp_cancel_register_notify_0037_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_describe_0001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+
+//START_TESTCASE	UPnP_Describe_0001
+//! @file		
+//! @SYMTestCaseID	UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults Should get responses from all devices.	
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe0001.ini UPnP_Describe_0001
+END_TESTCASE	UPnP_Describe_0001
+
+
+PRINT Completed multiple_machines_client 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_initiateaction_0019.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_Discovery_0018
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\initiateaction_0019.ini initiateaction_0019
+END_TESTCASE	UPnP_Discovery_0018
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_initiateaction_0019_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! upnp_initiateaction_0019_2.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_initiateaction_0019_2
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\initiateaction_0019.ini initiateaction_0019_2
+END_TESTCASE	upnp_initiateaction_0019_2
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_initiateaction_0019_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! upnp_initiateaction_0019_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPNP_INITIATEACTION_0019_2_REV
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestRControlChannel z:\upnp\testupnp\client\testdata\ini_files\initiateaction_0019_rev.ini initiateaction_0019_2_rev
+END_TESTCASE	UPNP_INITIATEACTION_0019_2_REV
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_initiateaction_0019_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	UPnP_Discovery_0018
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestRControlChannel z:\upnp\testupnp\client\testdata\ini_files\initiateaction_0019_rev.ini initiateaction_0019_rev
+END_TESTCASE	UPnP_Discovery_0018
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_issue_invalid_discovery_requests_0048_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048.ini upnp_invalid_discovery_requests_0048_1
+
+END_TESTCASE	upnp_issue_invalid_discovery_requests_0048_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP  500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048_rev.ini upnp_invalid_discovery_requests_0048_1_rev
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048.ini upnp_invalid_discovery_requests_0048_2
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048_rev.ini upnp_invalid_discovery_requests_0048_2_rev
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_3.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_3
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048.ini upnp_invalid_discovery_requests_0048_3
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_invalid_discovery_requests_0048_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_3_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP  500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048_rev.ini upnp_invalid_discovery_requests_0048_3_rev
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_open_discovery_001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+
+START_TESTCASE			UPnP_open_discovery_001
+//! @file				
+//! @SYMTestCaseID		UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ				REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 		Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults Should get responses from all devices.	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP !Error=-11 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\opendiscovery_001.ini discovery_001
+END_TESTCASE	UPnP_open_discovery_001
+
+
+PRINT Completed multiple_machines_client 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_open_discovery_001_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+
+START_TESTCASE			UPnP_open_discovery_001_rev
+//! @file				
+//! @SYMTestCaseID		UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ				REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 		Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults Should get responses from all devices.	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP !Error=-11 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\opendiscovery_001_rev.ini discovery_001_rev
+END_TESTCASE	UPnP_open_discovery_001_rev
+
+
+PRINT Completed multiple_machines_client 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_publish_regression.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,182 @@
+//
+// 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:
+//
+//upnp_publish_regression.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+
+START_TESTCASE	upnp_publish_regression
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ 				REQ8627
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+END_TESTCASE	upnp_publish_regression
+
+START_TESTCASE	upnp_publish_regression_1
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+END_TESTCASE	upnp_publish_regression_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_refresh_advertisement_0045_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_refresh_advertisement_0045_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_refresh_advertisement_0045_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 1000 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045.ini  UPnP_Refresh_Advertisement_0001
+
+END_TESTCASE	upnp_refresh_advertisement_0045_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_refresh_advertisement_0045_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_refresh_advertisement_0045_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_refresh_advertisement_0045_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 1000 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045_rev.ini  UPnP_Refresh_Advertisement_0001_rev
+
+END_TESTCASE	upnp_refresh_advertisement_0045_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_refresh_advertisement_0045_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_refresh_advertisement_0045_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_refresh_advertisement_0045_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 1000 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045.ini  UPnP_Refresh_Advertisement_0002
+
+END_TESTCASE	upnp_refresh_advertisement_0045_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_refresh_advertisement_0045_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_refresh_advertisement_0045_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_refresh_advertisement_0045_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 1000 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045_rev.ini  UPnP_Refresh_Advertisement_0002_rev
+
+END_TESTCASE	upnp_refresh_advertisement_0045_2_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ 				REQ8634	
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_1
+
+END_TESTCASE	upnp_register_notify_0036
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_1
+END_TESTCASE	upnp_register_notify_0036_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_1_rev
+
+END_TESTCASE	upnp_register_notify_0036_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_2
+END_TESTCASE	upnp_register_notify_0036_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_2_rev
+END_TESTCASE	upnp_register_notify_0036_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_3.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_3
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_3
+END_TESTCASE	upnp_register_notify_0036_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_3_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_3_rev
+END_TESTCASE	upnp_register_notify_0036_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_4.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_4
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_4
+END_TESTCASE	upnp_register_notify_0036_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_4_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_4_rev
+END_TESTCASE	upnp_register_notify_0036_4_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_5.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_5
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_5
+END_TESTCASE	upnp_register_notify_0036_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_5_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_5_rev
+END_TESTCASE	upnp_register_notify_0036_5_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_6.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_6
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_6
+END_TESTCASE	upnp_register_notify_0036_6
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_notify_0036_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_6_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client  
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_notify_0036_6_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_6_rev
+END_TESTCASE	upnp_register_notify_0036_6_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//upnp_register_state_change_services_0038.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ 				REQ8634
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 300 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0001
+RUN_TEST_STEP 300 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0002
+
+END_TESTCASE	upnp_register_state_change_services_0038
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0001
+
+END_TESTCASE	upnp_register_state_change_services_0038_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_10.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_10.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_10
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0010
+
+END_TESTCASE	upnp_register_state_change_services_0038_10
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_10_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_10_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_10_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0010_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_10_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_11.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_11.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_11
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0011
+
+END_TESTCASE	upnp_register_state_change_services_0038_11
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_11_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_11_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_11_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0011_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_11_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_12.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_12.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_12
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0012
+
+END_TESTCASE	upnp_register_state_change_services_0038_12
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_12_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_12_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_12_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0012_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_12_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_13.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_13.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_13
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0013
+
+END_TESTCASE	upnp_register_state_change_services_0038_13
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_13_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_13_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_13_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0013_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_13_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0001_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0002
+
+END_TESTCASE	upnp_register_state_change_services_0038_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0002_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_2_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_3.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_3
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0003
+
+END_TESTCASE	upnp_register_state_change_services_0038_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_3_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0003_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_3_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_4.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_4
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0004
+
+END_TESTCASE	upnp_register_state_change_services_0038_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_4_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0004_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_4_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_5.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_5
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0005
+
+END_TESTCASE	upnp_register_state_change_services_0038_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_5_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0005_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_5_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_6.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_6
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0006
+
+END_TESTCASE	upnp_register_state_change_services_0038_6
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_6_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_6_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0006_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_6_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_7.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_7.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_7
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0007
+
+END_TESTCASE	upnp_register_state_change_services_0038_7
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_7_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_7_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_7_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0007_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_7_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_8.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_8.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_8
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0008
+
+END_TESTCASE	upnp_register_state_change_services_0038_8
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_8_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_8_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_8_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0008_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_8_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_9.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_9.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_9
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0009
+
+END_TESTCASE	upnp_register_state_change_services_0038_9
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_register_state_change_services_0038_9_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_9_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_register_state_change_services_0038_9_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0009_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_9_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_renew_subscription_0039_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_1
+END_TESTCASE	upnp_renew_subscription_0039_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_10.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_10.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_10
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_10
+
+END_TESTCASE	upnp_renew_subscription_0039_10
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_10_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_10_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_10_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_10_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_10_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_renew_subscription_0039_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_1_rev
+END_TESTCASE	upnp_renew_subscription_0039_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_2
+
+END_TESTCASE	upnp_renew_subscription_0039_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_2_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_3.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_3
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_3
+
+END_TESTCASE	upnp_renew_subscription_0039_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_3_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_3_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_4.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_4
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_4
+
+END_TESTCASE	upnp_renew_subscription_0039_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_4_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_4_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_4_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_5.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_5
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_5
+
+END_TESTCASE	upnp_renew_subscription_0039_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_5_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_5_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_5_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_6.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_6
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_6
+
+END_TESTCASE	upnp_renew_subscription_0039_6
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_6_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_6_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_6_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_6_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_7.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_7.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_7
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_7
+
+END_TESTCASE	upnp_renew_subscription_0039_7
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_7_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_7_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_7_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_7_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_7_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_8.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_8.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_8
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_8
+
+END_TESTCASE	upnp_renew_subscription_0039_8
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_8_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_8_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_8_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_8_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_8_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_9.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_9.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_9
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_9
+
+END_TESTCASE	upnp_renew_subscription_0039_9
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_renew_subscription_0039_9_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_9_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_renew_subscription_0039_9_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_9_rev
+
+END_TESTCASE	upnp_renew_subscription_0039_9_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_send_notify_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_send_notify_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	SendNotify_0001
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//!								
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\sendnotify.ini SendNotify_0001
+
+END_TESTCASE	SendNotify_0001
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_send_notify_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_send_notify_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	SendNotify_0001_rev
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//!								
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\sendnotify_rev.ini SendNotify_0001_rev
+
+END_TESTCASE	SendNotify_0001_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_1
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini UPnP_Describe_Standard_Root_Service
+
+END_TESTCASE	upnp_standard_service_description_0030_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini UPnP_Describe_Standard_Root_Service_rev
+
+END_TESTCASE	upnp_standard_service_description_0030_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_2.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_2
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini UPnP_Describe_Std_Root_MltplServices
+
+END_TESTCASE	upnp_standard_service_description_0030_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini UPnP_Describe_Std_Root_MltplServices_rev
+
+END_TESTCASE	upnp_standard_service_description_0030_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_3.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_3
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini upnp_embedded_device_std_service_level1_description
+
+END_TESTCASE	upnp_standard_service_description_0030_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_3_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini upnp_embedded_device_std_service_level1_description_rev
+
+END_TESTCASE	upnp_standard_service_description_0030_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_4.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_4
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini upnp_embedded_devices_5levels_std_service_description
+
+END_TESTCASE	upnp_standard_service_description_0030_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_4_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini upnp_embedded_devices_5levels_std_service_description_rev
+
+END_TESTCASE	upnp_standard_service_description_0030_4_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_5.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_5
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini upnp_embd_devices_3levels_multiple_service_description
+
+END_TESTCASE	upnp_standard_service_description_0030_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_standard_service_description_0030_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_5_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_standard_service_description_0030_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini upnp_embd_devices_3levels_multiple_service_description_rev
+
+END_TESTCASE	upnp_standard_service_description_0030_5_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_unsubscribe_0042_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! upnp_unsubscribe_0042_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_unsubscribe_0042_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0042
+//! @SYMTestCaseDesc 		Control point unsubscribe for state change in services.
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589, REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point subscribes for state changes in services.
+//! 						2.	Control point unsubscribe for the state change using UNSUBSCRIBE method using the SID.
+//! 						3.	If requested UNSUBSCRIBE is approved then Service point may acknowledge with HTTP/1.1 200 OK within 30 sec, else with appropriate error messages. (may be like Incompatible headers, Invalid SID, or Missing SID)
+//! @SYMTestExpectedResults	The control point must not receive any state change events from the device.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0042.ini upnp_unsubscribe_0042_1
+
+END_TESTCASE	upnp_unsubscribe_0042_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_unsubscribe_0042_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_unsubscribe_0042_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_unsubscribe_0042_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0042
+//! @SYMTestCaseDesc 		Control point unsubscribe for state change in services.
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589, REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point subscribes for state changes in services.
+//! 						2.	Control point unsubscribe for the state change using UNSUBSCRIBE method using the SID.
+//! 						3.	If requested UNSUBSCRIBE is approved then Service point may acknowledge with HTTP/1.1 200 OK within 30 sec, else with appropriate error messages. (may be like Incompatible headers, Invalid SID, or Missing SID)
+//! @SYMTestExpectedResults	The control point must not receive any state change events from the device.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0042_rev.ini upnp_unsubscribe_0042_1_rev
+
+END_TESTCASE	upnp_unsubscribe_0042_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_unsubscribe_0042_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! upnp_unsubscribe_0042_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_unsubscribe_0042_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0042
+//! @SYMTestCaseDesc 		Control point unsubscribe for state change in services.
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589, REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point subscribes for state changes in services.
+//! 						2.	Control point unsubscribe for the state change using UNSUBSCRIBE method using the SID.
+//! 						3.	If requested UNSUBSCRIBE is approved then Service point may acknowledge with HTTP/1.1 200 OK within 30 sec, else with appropriate error messages. (may be like Incompatible headers, Invalid SID, or Missing SID)
+//! @SYMTestExpectedResults	The control point must not receive any state change events from the device.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0042.ini upnp_unsubscribe_0042_2
+
+END_TESTCASE	upnp_unsubscribe_0042_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_unsubscribe_0042_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+//
+// 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:
+//
+//! upnp_unsubscribe_0042_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_unsubscribe_0042_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0042
+//! @SYMTestCaseDesc 		Control point unsubscribe for state change in services.
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589, REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point subscribes for state changes in services.
+//! 						2.	Control point unsubscribe for the state change using UNSUBSCRIBE method using the SID.
+//! 						3.	If requested UNSUBSCRIBE is approved then Service point may acknowledge with HTTP/1.1 200 OK within 30 sec, else with appropriate error messages. (may be like Incompatible headers, Invalid SID, or Missing SID)
+//! @SYMTestExpectedResults	The control point must not receive any state change events from the device.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0042_rev.ini upnp_unsubscribe_0042_2_rev
+
+END_TESTCASE	upnp_unsubscribe_0042_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_3+2d+k_advertisements_0051.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+//
+// 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:
+//
+//! upnp_validate_3+2d+k_advertisements_0051.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+
+START_TESTCASE	upnp_validate_3+2d+k_advertisements_0051
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0051
+//! @SYMTestCaseDesc 		Service point should be able to advertise itself as soon as it joins the UPnP LAN (Notify with NTS:ssdp:alive)
+//! @SYMREQ					REQ8617 REQ8618 REQ8619
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a Service point to UPnP enabled network.
+//! 						2.	Service point multicasts advertisements with NOTIFY method and sddp:alive in the NTS header for all its service types and devices.
+//! @SYMTestExpectedResults	Validate 3+2d+k Discovery advertisements are advertised. i.e.,
+//!								If there is an UPnP enabled root device then it is expected to send 3+2d+k advertisements per root device.
+//!								If there are only non-root devices then each of them are expected to send only 2d+k advertisements.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_validate_3+2d+k_server
+END_TESTCASE	upnp_validate_3+2d+k_advertisements_0051
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_1
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_1
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_1
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP  500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_1_rev
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_1_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_2.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_2
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_2
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_2
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP  500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_2_rev
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_2_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_3.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_3
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_3
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_3
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_3_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP  500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_3_rev
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_3_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_4.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_4
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_4
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_4
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_4_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_4_rev
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_4_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_4_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_5.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_5
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_5
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_5
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_describe_requests_headers_0060_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_5_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_5_rev
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_5_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_5_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_1
+END_TESTCASE	upnp_validate_device_registration_0061_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_10.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_10.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_10
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_10
+END_TESTCASE	upnp_validate_device_registration_0061_10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_10_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_10.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_10
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_10_rev
+END_TESTCASE	upnp_validate_device_registration_0061_10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_11.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_11.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_11
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP !Result=Fail 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_11
+END_TESTCASE	upnp_validate_device_registration_0061_11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_11_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_11.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_11
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_11_rev
+END_TESTCASE	upnp_validate_device_registration_0061_11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_12.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_12.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_12
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP !Result=Fail 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_12
+END_TESTCASE	upnp_validate_device_registration_0061_12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_12_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_12.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_12
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_12_rev
+END_TESTCASE	upnp_validate_device_registration_0061_12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_13.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_13.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_13
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP !Result=Fail 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_13
+END_TESTCASE	upnp_validate_device_registration_0061_13
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_13_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_13.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_13
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_13_rev
+END_TESTCASE	upnp_validate_device_registration_0061_13
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_14.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_14.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_14
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_14
+END_TESTCASE	upnp_validate_device_registration_0061_14
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_14_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_14.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_14
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_14_rev
+END_TESTCASE	upnp_validate_device_registration_0061_14
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_15.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_15.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_15
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_15
+END_TESTCASE	upnp_validate_device_registration_0061_15
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_15_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_15.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_15
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_15_rev
+END_TESTCASE	upnp_validate_device_registration_0061_15
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_16.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_16.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_16
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_16
+END_TESTCASE	upnp_validate_device_registration_0061_16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_16_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_16.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_16
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_16_rev
+END_TESTCASE	upnp_validate_device_registration_0061_16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_1_rev
+END_TESTCASE	upnp_validate_device_registration_0061_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_2.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_2
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_2
+END_TESTCASE	upnp_validate_device_registration_0061_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_2.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_2
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_2_rev
+END_TESTCASE	upnp_validate_device_registration_0061_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_3.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_3
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_3
+END_TESTCASE	upnp_validate_device_registration_0061_3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_3.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_3
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_3_rev
+END_TESTCASE	upnp_validate_device_registration_0061_3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_4.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_4
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_4
+END_TESTCASE	upnp_validate_device_registration_0061_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_4.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_4
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_4_rev
+END_TESTCASE	upnp_validate_device_registration_0061_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_5.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_5
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_5
+END_TESTCASE	upnp_validate_device_registration_0061_5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_5.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_5
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_5_rev
+END_TESTCASE	upnp_validate_device_registration_0061_5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_6.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_6
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_6
+END_TESTCASE	upnp_validate_device_registration_0061_6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_6.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_6
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_6_rev
+END_TESTCASE	upnp_validate_device_registration_0061_6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_7.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_7.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_7
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_7
+END_TESTCASE	upnp_validate_device_registration_0061_7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_7_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_7.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_7
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_7_rev
+END_TESTCASE	upnp_validate_device_registration_0061_7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_8.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_8.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_8
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_8
+END_TESTCASE	upnp_validate_device_registration_0061_8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_8_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_8.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_8
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607					
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_8_rev
+END_TESTCASE	upnp_validate_device_registration_0061_8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_9.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_9.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_9
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_PANIC_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_9
+END_TESTCASE	upnp_validate_device_registration_0061_9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0061_9_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_9.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0061_9
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_9_rev
+END_TESTCASE	upnp_validate_device_registration_0061_9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0062_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0062_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0062_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0062.ini upnp_validate_device_registration_0062_1
+END_TESTCASE	upnp_validate_device_registration_0062_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_device_registration_0062_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0062_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_device_registration_0062_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0062_rev.ini upnp_validate_device_registration_0062_1_rev
+END_TESTCASE	upnp_validate_device_registration_0062_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_discovery_response_time_0049_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_validate_discovery_response_time_0049_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_validate_discovery_response_time_0049_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS – 0049
+//! @SYMTestCaseDesc 		Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX ( <= 120 ) 
+//! 						header before sending response for a discovery request.
+//! @SYMREQ 				REQ8614 REQ8615
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Start one service point in UPnP enabled network.
+//! 						2.	Join a control point in the UPnP enabled network and issue a discovery request with ST:ssdp:root 
+//! 						3.	Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX (<= 120) header before sending response
+//! 						4.	MX header value must be less than or equal to 120. If it exceeds 120 seconds then Service point chooses to wait between 0 to 120 seconds before responding.
+//! @SYMTestExpectedResults		Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX (<=120) header before sending response.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0049.ini upnp_validate_discovery_response_time_0049_1
+
+END_TESTCASE	upnp_validate_discovery_response_time_0049_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_discovery_response_time_0049_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_validate_discovery_response_time_0049_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+
+START_TESTCASE	upnp_validate_discovery_response_time_0049_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS – 0049
+//! @SYMTestCaseDesc 		Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX ( <= 120 ) 
+//! 						header before sending response for a discovery request.
+//! @SYMREQ 				REQ8614 REQ8615
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Start one service point in UPnP enabled network.
+//! 						2.	Join a control point in the UPnP enabled network and issue a discovery request with ST:ssdp:root 
+//! 						3.	Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX (<= 120) header before sending response
+//! 						4.	MX header value must be less than or equal to 120. If it exceeds 120 seconds then Service point chooses to wait between 0 to 120 seconds before responding.
+//! @SYMTestExpectedResults		Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX (<=120) header before sending response.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500  multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0049_rev.ini upnp_validate_discovery_response_time_0049_1_rev
+
+END_TESTCASE	upnp_validate_discovery_response_time_0049_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_root_0001_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_root_0001_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_root_0001_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ 				REQ8672
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0001.ini upnp_validate_root_0001_1
+END_TESTCASE	upnp_validate_root_0001_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_validate_root_0001_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_validate_root_0001_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_validate_root_0001_1_rev
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ 				REQ8672
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0001_rev.ini upnp_validate_root_0001_1_rev
+END_TESTCASE	upnp_validate_root_0001_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_1.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_1
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0001
+END_TESTCASE	upnp_vendor_device_description_0029_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0001_rev
+END_TESTCASE	upnp_vendor_device_description_0029_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_2.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_2
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0002
+END_TESTCASE	upnp_vendor_device_description_0029_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0002_rev
+END_TESTCASE	upnp_vendor_device_description_0029_2_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_3.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_3
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0003
+END_TESTCASE	upnp_vendor_device_description_0029_3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_3_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0003_rev
+END_TESTCASE	upnp_vendor_device_description_0029_3_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_4.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_4
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0004
+END_TESTCASE	upnp_vendor_device_description_0029_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_4_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0004_rev
+END_TESTCASE	upnp_vendor_device_description_0029_4_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_5.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_5
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0005
+END_TESTCASE	upnp_vendor_device_description_0029_5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_5_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0005_rev
+END_TESTCASE	upnp_vendor_device_description_0029_5_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_6.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_6
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0006
+END_TESTCASE	upnp_vendor_device_description_0029_6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_device_description_0029_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_6_rev.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE test_synchronize_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_device_description_0029_6_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini clientdata
+RUN_TEST_STEP 500 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0006_rev
+END_TESTCASE	upnp_vendor_device_description_0029_6_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/client/upnp_vendor_service_description_0031.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+//
+// 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:
+//
+//upnp_vendor_service_description_0031.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+LOAD_SUITE testdelay
+
+START_TESTCASE	upnp_vendor_service_description_0031
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0031
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a vendor defined service type (ST:urn:domain-name:service:serviceType:v).
+//! @SYMREQ 				REQ8627	
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with ST:urn:domain-name:service:serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 testdelay TestUPnPManager  
+RUN_TEST_STEP 1000 testdelay TestUPnPManager
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini UPnP_Describe_Vendor_Root_Service
+Delay 100
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini UPnP_Describe_vendor_Root_MltplServices
+Delay 100
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini upnp_embedded_device_vendor_service_level1_description
+Delay 100
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini upnp_embedded_devices_5levels_vendor_service_description
+Delay 100
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini upnp_embd_devices_3levels_multiple_vendor_service_description
+Delay 100
+END_TESTCASE	upnp_vendor_service_description_0031
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0001
+//! @file		
+//! @SYMTestCaseID	UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults Should get responses from all devices.	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0001.ini discovery_0001_server
+END_TESTCASE	UPnP_Discovery_0001
+
+
+PRINT Completed multiple_machines_server 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0002.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server  
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0002
+//! @file		
+//! @SYMTestCaseID	UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all second version
+//! @SYMTestExpectedResults Should get response from all devices	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server  TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0002.ini discovery_0002_server
+END_TESTCASE	UPnP_Discovery_0002
+
+
+PRINT Completed multiple_machines_server 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0003.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0003
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0002 to upnp-pos-0004	
+//! @SYMTestCaseDesc 	Search for UPnP Standard devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607,REQ8668
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Search with ST:urn:schemas-upnp-org:device:deviceType
+//! @SYMTestExpectedResults Search should complete with desired information	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0003.ini discovery_0003_server
+END_TESTCASE	UPnP_Discovery_0003
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0004.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0004
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0002 to upnp-pos-0004	
+//! @SYMTestCaseDesc 	Search for UPnP Standard devices second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607,REQ8668
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Search with ST:urn:schemas-upnp-org:device:deviceType second version
+//! @SYMTestExpectedResults Search should complete with desired information	
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0004.ini discovery_0004_server
+END_TESTCASE	UPnP_Discovery_0004
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0005.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0005
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0005 to upnp-pos-0007	
+//! @SYMTestCaseDesc 	Search for UPnP Vendor defined devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607,REQ8668	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	M-Search with ST: urn:domain-name:device:deviceType:v
+//! @SYMTestExpectedResults Should send desired discovery information	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0005.ini discovery_0005_server
+END_TESTCASE	UPnP_Discovery_0005
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0006.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0006
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0005 to upnp-pos-0007	
+//! @SYMTestCaseDesc 	Search for UPnP Vendor defined devices second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607,REQ8668	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	M-Search with ST: urn:domain-name:device:deviceType:v second version
+//! @SYMTestExpectedResults Should send desired discovery information	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0006.ini discovery_0006_server
+END_TESTCASE	UPnP_Discovery_0006
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0007.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0007
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0008
+//! @SYMTestCaseDesc 	Search for UPnP Root Devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Search for UPnP Root Devices
+//! @SYMTestExpectedResults shoud disocver all UPnP Root Devices	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0007.ini discovery_0007_server
+END_TESTCASE	UPnP_Discovery_0007
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0008.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0008
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0008
+//! @SYMTestCaseDesc 	Search for UPnP Root Devices second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Search for UPnP Root Devices
+//! @SYMTestExpectedResults shoud disocver all UPnP Root Devices second version	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0008.ini discovery_0008_server
+END_TESTCASE	UPnP_Discovery_0008
+
+
+PRINT Completed multiple_machines_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0009.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0009
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID
+//! @SYMTestExpectedResults should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0009.ini discovery_0009_server
+END_TESTCASE	UPnP_Discovery_0009
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0010.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0010
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0010.ini discovery_0010_server
+END_TESTCASE	UPnP_Discovery_0010
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0011.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0011
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0011.ini discovery_0011_server
+END_TESTCASE	UPnP_Discovery_0011
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0012.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0012
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0012.ini discovery_0012_server
+END_TESTCASE	UPnP_Discovery_0012
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0013.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0013
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0013.ini discovery_0013_server
+END_TESTCASE	UPnP_Discovery_0013
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0014.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0014
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0014.ini discovery_0014_server
+END_TESTCASE	UPnP_Discovery_0014
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0015.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0015
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0015.ini discovery_0015_server
+END_TESTCASE	UPnP_Discovery_0015
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0016.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0016
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0016.ini discovery_0016_server
+END_TESTCASE	UPnP_Discovery_0016
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0017.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0017
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0017.ini discovery_0017_server
+END_TESTCASE	UPnP_Discovery_0017
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/UPnP_Discovery_0018.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_Discovery_0018
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery0018.ini discovery_0018_server
+END_TESTCASE	UPnP_Discovery_0018
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/discover_low_ver.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! discover_low_ver.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPNP_DISCOVER_LOW_VER
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discover_low_ver.ini UPnP_discover_low_ver_0021_server
+END_TESTCASE	UPNP_DISCOVER_LOW_VER
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/discover_low_ver_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! discover_low_ver.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPNP_DISCOVER_LOW_VER
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discover_low_ver.ini UPnP_discover_low_ver_0022_server
+END_TESTCASE	UPNP_DISCOVER_LOW_VER
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/discover_low_ver_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! discover_low_ver.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPNP_DISCOVER_LOW_VER
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discover_low_ver.ini UPnP_discover_low_ver_0023_server
+END_TESTCASE	UPNP_DISCOVER_LOW_VER
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/multiple_machines_client.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,107 @@
+//
+// 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:
+//
+//!
+//! Script file to launch all testupnp automated UPnP tests
+//!
+
+//! TestUPnP.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client
+
+LOAD_SUITE multiple_machines_client
+
+START_TESTCASE	UPNP-ALL-TESTS
+
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0001.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0002.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0003.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0004.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0005.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0006.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0007.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0008.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0009.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_discovery_0010.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_1.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_1_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_2.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_2_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_3.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_3_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_4.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_4_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_5.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_5_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_6.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_6_rev.script
+DELAY 200
+
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_1.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_1_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_2.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_2_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_3.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_3_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_4.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_4_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_5.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_5_rev.script
+DELAY 200
+
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_1.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_1_rev.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_2.script
+DELAY 200
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_2_rev.script
+DELAY 200
+
+RUN_SCRIPT z:\upnp\testupnp\client\scripts\upnp_publish_regression.script
+
+END_TESTCASE	UPNP-ALL-TESTS
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/test_synchronize_client.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+//! @file
+//! @SYMTestSuiteName	test_synchronize_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all test_synchronize_client 
+LOAD_SUITE test_synchronize_client
+
+
+RUN_TEST_STEP 1000 test_synchronize_client TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini multiplemachinemode
+
+PRINT Completed test_synchronize_client
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/test_synchronize_server.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+//! @file
+//! @SYMTestSuiteName	test_synchronize_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all test_synchronize_server 
+LOAD_SUITE test_synchronize_server
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\server\testdata\ini_files\multiplemachines.ini multiplemachinemode
+
+PRINT Completed test_synchronize_server
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_abruptclose_describe_44_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_abruptclose_describe_44_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_abruptclose_describe_44_1
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp.ini  UPnP_AbruptClose_Describe_0001_server
+
+END_TESTCASE	upnp_abruptclose_describe_44_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_abruptclose_describe_44_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_abruptclose_describe_44_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_abruptclose_describe_44_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp_rev.ini  UPnP_AbruptClose_Describe_0001_server_rev
+
+END_TESTCASE	upnp_abruptclose_describe_44_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_abruptclose_discovery_43_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_abruptclose_discovery_43_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_abruptclose_discovery_43_1
+//! @file				
+//! @SYMTestCaseID				UPNP- POS - 0001	
+//! @SYMTestCaseDesc 			search for all UPnP enabled devices
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High	
+//! @SYMTestActions 			Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults 	Should get responses from all devices.	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp.ini  UPnP_AbruptClose_Discovery_0001_server
+
+END_TESTCASE	upnp_abruptclose_discovery_43_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_abruptclose_discovery_43_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_abruptclose_discovery_43_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_abruptclose_discovery_43_1_rev
+//! @file				
+//! @SYMTestCaseID				UPNP- POS - 0001	
+//! @SYMTestCaseDesc 			search for all UPnP enabled devices
+//! @SYMREQ						REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 				Implemented
+//! @SYMTestPriority 			High	
+//! @SYMTestActions 			Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults 	Should get responses from all devices.	
+//! @SYMTestType 				CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp_rev.ini  UPnP_AbruptClose_Discovery_0001_rev_server
+
+END_TESTCASE	upnp_abruptclose_discovery_43_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_cancel_discovery
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery.ini canceldiscovery_server
+END_TESTCASE	UPnP_cancel_discovery
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery_0001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_cancel_discovery_0001
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery.ini upnp_cancel_discovery_0001_server
+END_TESTCASE	UPnP_cancel_discovery_0001
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery_0001_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_cancel_discovery_0001_rev
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery_rev.ini upnp_cancel_discovery_0001_rev_server
+END_TESTCASE	UPnP_cancel_discovery_0001_rev
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_cancel_discovery_rev
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery_rev.ini canceldiscovery_1_server_rev
+END_TESTCASE	UPnP_cancel_discovery_rev
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_discovery_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_cancel_discovery_rev
+//! @file		
+//! @SYMTestCaseID	
+//! @SYMTestCaseDesc 	
+//! @SYMREQ				REQ8608, REQ8605,REQ8606,REQ8607, REQ8617,REQ8618	
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	
+//! @SYMTestExpectedResults 
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\canceldiscovery_rev.ini canceldiscovery_rev_server
+END_TESTCASE	UPnP_cancel_discovery_rev
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_register_notify_0037_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_cancel_register_notify_0037_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_cancel_register_notify_0037_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0037
+//! @SYMTestCaseDesc 		Control point cancels registration for NOTIFY announcements
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point cancels registration to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested operation is not approved then control point may acknowledge with appropriate error message. 
+//! 						3.	After a successful cancellation of the registration, the control point will not get any notifications.
+//! @SYMTestExpectedResults	If Cancellation of the registration is successful, then Control point should not get any event messages for SSDP: Alive and SSDP: Byebye.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0037.ini upnp_cancel_register_notify_0037_1_server
+
+END_TESTCASE	upnp_cancel_register_notify_0037_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_cancel_register_notify_0037_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_cancel_register_notify_0037_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_cancel_register_notify_0037_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0037
+//! @SYMTestCaseDesc 		Control point cancels registration for NOTIFY announcements
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point cancels registration to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested operation is not approved then control point may acknowledge with appropriate error message. 
+//! 						3.	After a successful cancellation of the registration, the control point will not get any notifications.
+//! @SYMTestExpectedResults	If Cancellation of the registration is successful, then Control point should not get any event messages for SSDP: Alive and SSDP: Byebye.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0037_rev.ini upnp_cancel_register_notify_0037_1_rev_server
+
+END_TESTCASE	upnp_cancel_register_notify_0037_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_describe_0001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_client 
+
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+
+//START_TESTCASE	UPnP_Describe_0001
+//! @file		
+//! @SYMTestCaseID	UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults Should get responses from all devices.	
+//! @SYMTestType 		CIT
+
+
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe0001.ini UPnP_Describe_0001
+END_TESTCASE	UPnP_Describe_0001
+
+
+PRINT Completed multiple_machines_client 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_initiateaction_0019.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_InitiateAction_0019
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestRControlChannel z:\upnp\testupnp\client\testdata\ini_files\initiateaction_0019.ini initiateaction_0019_server
+END_TESTCASE	UPnP_InitiateAction_0019
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_initiateaction_0019_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_InitiateAction_0019
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestRControlChannel z:\upnp\testupnp\client\testdata\ini_files\initiateaction_0019.ini initiateaction_0019_2_server
+END_TESTCASE	UPnP_InitiateAction_0019
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_initiateaction_0019_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_initiateaction_0019_2_rev_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPNP_INITIATEACTION_0019_2_REV
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\initiateaction_0019_rev.ini initiateaction_0019_2_rev_server
+END_TESTCASE	UPNP_INITIATEACTION_0019_2_REV
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_initiateaction_0019_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_InitiateAction_0019
+//! @file		
+//! @SYMTestCaseID	upnp-pos-0009
+//! @SYMTestCaseDesc 	Search for UPnP Device based on its UUID second version
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Search for UPnP Device based on its UUID second version
+//! @SYMTestExpectedResults Should get response from the desired UUID only	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\initiateaction_0019_rev.ini initiateaction_0019_rev_server
+END_TESTCASE	UPnP_InitiateAction_0019
+
+
+PRINT Completed multiple_machines_server
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048.ini  upnp_invalid_discovery_requests_0048_1_server
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048_rev.ini  upnp_invalid_discovery_requests_0048_1_rev_server
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048.ini  upnp_invalid_discovery_requests_0048_2_server
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048_rev.ini  upnp_invalid_discovery_requests_0048_2_rev_server
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_2_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_3.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_3
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048.ini  upnp_invalid_discovery_requests_0048_3_server
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_invalid_discovery_requests_0048_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_invalid_discovery_requests_0048_3_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_invalid_discovery_requests_0048_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0048
+//! @SYMTestCaseDesc 		Service point must ignore an invalid discovery requests
+//! @SYMREQ 				REQ8613, REQ8645
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point in UPnP enabled network and discover a service using the UPnP control point with a search request of malformed content (Like Invalid value in MAN header, a missing MX header, or other malformed content).
+//! 						2.	Service point must ignore the search request of malformed content by not sending any response to it.
+//! @SYMTestExpectedResults	Such a malformed request should not get any response and receiving devices simply discard that request.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0048_rev.ini  upnp_invalid_discovery_requests_0048_3_rev_server
+
+END_TESTCASE	upnp_invalid_discovery_requests_0048_3_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_open_discovery_001.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_open_discovery_001
+//! @file		
+//! @SYMTestCaseID	UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults Should get responses from all devices.	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP !Error=-11 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\opendiscovery_001.ini discovery_001_server
+END_TESTCASE	UPnP_open_discovery_001
+
+
+PRINT Completed multiple_machines_server 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_open_discovery_001_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName	multiple_machines_server 
+
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	UPnP_open_discovery_001_rev
+//! @file		
+//! @SYMTestCaseID	UPNP- POS - 0001	
+//! @SYMTestCaseDesc 	search for all UPnP enabled devices
+//! @SYMREQ		REQ8605,REQ8606,REQ8607
+//! @SYMTestStatus 	Implemented
+//! @SYMTestPriority 	High	
+//! @SYMTestActions 	Perform discovery with ST:ssdp:all
+//! @SYMTestExpectedResults Should get responses from all devices.	
+//! @SYMTestType 		CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP !Error=-11 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\opendiscovery_001_rev.ini discovery_001_server_rev
+END_TESTCASE	UPnP_open_discovery_001_rev
+
+
+PRINT Completed multiple_machines_server 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_publish_regression.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,182 @@
+//
+// 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:
+//
+//upnp_publish_regression.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+
+START_TESTCASE	upnp_publish_regression
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ 				REQ8627
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0002
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0003
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0004
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0005
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0006
+Delay 100
+END_TESTCASE	upnp_publish_regression
+
+START_TESTCASE	upnp_publish_regression_1
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+RUN_TEST_STEP 100 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish.ini publishtest_0001
+Delay 100
+END_TESTCASE	upnp_publish_regression_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_refresh_advertisement_0045_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_refresh_advertisement_0045_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_refresh_advertisement_0045_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 1000 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045.ini  UPnP_Refresh_Advertisement_0001_server
+
+END_TESTCASE	upnp_refresh_advertisement_0045_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_refresh_advertisement_0045_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_refresh_advertisement_0045_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_refresh_advertisement_0045_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 1000 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045_rev.ini  UPnP_Refresh_Advertisement_0001_server_rev
+
+END_TESTCASE	upnp_refresh_advertisement_0045_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_refresh_advertisement_0045_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_refresh_advertisement_0045_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_refresh_advertisement_0045_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 1000 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045.ini  UPnP_Refresh_Advertisement_0002_server
+
+END_TESTCASE	upnp_refresh_advertisement_0045_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_refresh_advertisement_0045_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_refresh_advertisement_0045_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_refresh_advertisement_0045_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 1000 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045_rev.ini  UPnP_Refresh_Advertisement_0002_server_rev
+
+END_TESTCASE	upnp_refresh_advertisement_0045_2_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ 				REQ8634	
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_1_server
+
+END_TESTCASE	upnp_register_notify_0036
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_1_server
+
+END_TESTCASE	upnp_register_notify_0036_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_1_rev_server
+
+END_TESTCASE	upnp_register_notify_0036_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_2.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_2_server
+
+END_TESTCASE	upnp_register_notify_0036_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_2_rev_server
+
+END_TESTCASE	upnp_register_notify_0036_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_3.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_3
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_3_server
+
+END_TESTCASE	upnp_register_notify_0036_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_3_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_3_rev_server
+
+END_TESTCASE	upnp_register_notify_0036_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_4.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_4
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_4_server
+
+END_TESTCASE	upnp_register_notify_0036_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_4_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_4_rev_server
+
+END_TESTCASE	upnp_register_notify_0036_4_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_5.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_5
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_5_server
+
+END_TESTCASE	upnp_register_notify_0036_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_5_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_5_rev_server
+
+END_TESTCASE	upnp_register_notify_0036_5_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_6.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_6
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036.ini upnp_register_notify_0036_6_server
+
+END_TESTCASE	upnp_register_notify_0036_6
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_6_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_6_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_6_rev_server
+
+END_TESTCASE	upnp_register_notify_0036_6_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_notify_0036_7_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_notify_0036_6_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_notify_0036_7_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0036
+//! @SYMTestCaseDesc 		Control points register for NOTIFY announcements. Register to ssdp:alive and ssdp:byebye
+//! @SYMREQ					REQ8634,REQ8617,REQ8618,REQ8620,REQ8621, REQ8625
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point register to SSDP: Alive and SSDP: ByeBye
+//! 						2.	If requested subscription is not approved then control point will be getting appropriate error message. 
+//! @SYMTestExpectedResults	If register for notify is approved then control point gets subsequent event messages.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini upnp_register_notify_0036_7_server_rev
+
+END_TESTCASE	upnp_register_notify_0036_7_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//upnp_register_state_change_services_0038.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+
+START_TESTCASE	upnp_register_state_change_services_0038
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ 				REQ8634
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 300 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0001
+RUN_TEST_STEP 300 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0002
+
+END_TESTCASE	upnp_register_state_change_services_0038
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_1.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0001_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_10.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_10.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_10
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0010_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_10_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_10_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_10_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0010_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_10_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_11.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_11.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_11
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0011_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_11_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_11_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_11_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0011_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_11_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_12.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_12.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_12
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0012_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_12_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_12_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_12_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0012_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_12_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_13.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_13.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_13
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0013_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_13
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_13_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_13_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_13_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0013_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_13_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_14_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_13_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_14_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0014_server_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_14_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_15_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_13_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_15_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0015_server_rev
+
+END_TESTCASE	upnp_register_state_change_services_0038_15_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_1_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0001_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_2.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0002_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_2_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0002_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_2_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_3.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_3
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0003_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_3_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0003_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_3_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_4.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_4
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0004_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_4_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0004_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_4_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_4.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_4
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0005_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_5_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0005_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_5_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_6.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_6
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0006_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_6_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_6_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0006_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_6_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_7.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_7.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_7
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0007_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_7_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_7_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_7_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0007_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_7_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_8.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_8.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_8
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0008_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_8_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_8_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_8_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0008_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_8_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_9.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_9.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_9
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini  UPnP_Subscribe_0009_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_register_state_change_services_0038_9_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+//
+// 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:
+//
+//! upnp_register_state_change_services_0038_9_rev.script
+//! @SYMTestSuiteName	testupnp 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_register_state_change_services_0038_9_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0038
+//! @SYMTestCaseDesc 		Control point registers for state changes in services.
+//! @SYMREQ					REQ8634, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626, REQ8624
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point issues GENA’s SUBSCRIBE request to an event with NT and CALLBACK headers 
+//! 						2.	If requested subscription is approved then Service point must acknowledge with SID and TIMEOUT, else with appropriate error message. 
+//! @SYMTestExpectedResults	If subscription is approved then control point gets an SID else an appropriate error message.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini  UPnP_Subscribe_0009_rev_server
+
+END_TESTCASE	upnp_register_state_change_services_0038_9_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_1_server
+
+END_TESTCASE	upnp_renew_subscription_0039_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_10.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_10.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_10
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_10_server
+
+END_TESTCASE	upnp_renew_subscription_0039_10
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_10_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_10_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_10_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_10_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_10_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_1_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_2.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_2_server
+
+END_TESTCASE	upnp_renew_subscription_0039_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_2_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_3.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_3
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_3_server
+
+END_TESTCASE	upnp_renew_subscription_0039_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_3_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_3_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_4.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_4
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_4_server
+
+END_TESTCASE	upnp_renew_subscription_0039_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_4_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_4_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_4_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_5.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_5
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_5_server
+
+END_TESTCASE	upnp_renew_subscription_0039_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_5_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_5_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_5_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_6.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_6
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_6_server
+
+END_TESTCASE	upnp_renew_subscription_0039_6
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_6_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_6_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_6_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_6_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_7.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_7.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_7
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_7_server
+
+END_TESTCASE	upnp_renew_subscription_0039_7
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_7_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_7_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_7_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_7_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_7_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_8.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_8.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_8
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_8_server
+
+END_TESTCASE	upnp_renew_subscription_0039_8
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_8_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_8_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_8_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_8_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_8_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_9.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_9.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_9
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini upnp_renew_subscription_0039_9_server
+
+END_TESTCASE	upnp_renew_subscription_0039_9
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_renew_subscription_0039_9_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_renew_subscription_0039_9_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_renew_subscription_0039_9_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0039
+//! @SYMTestCaseDesc 		Renew a subscription 
+//! @SYMREQ					REQ8633, REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607,REQ8681, REQ8611, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point in an UPnP issues a request to renew subscription using the SUBSCRIBE method and SID.
+//! 						2.	If requested subscription renewal is approved then Service point acknowledges with SID else with an appropriate error message.
+//! @SYMTestExpectedResults	If the renewal of the subscription is approved then control points gets an SID.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini upnp_renew_subscription_0039_9_rev_server
+
+END_TESTCASE	upnp_renew_subscription_0039_9_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_send_notify_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_send_notify_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	SendNotify_0001
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//!								
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\sendnotify.ini SendNotify_0001_server
+
+END_TESTCASE	SendNotify_0001
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_send_notify_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_send_notify_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	SendNotify_0001_rev
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618, REQ8626				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//!								
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\sendnotify_rev.ini SendNotify_0001_rev_server
+
+END_TESTCASE	SendNotify_0001_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_1
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini UPnP_Describe_Standard_Root_Service_server
+
+END_TESTCASE	upnp_standard_service_description_0030_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini UPnP_Describe_Standard_Root_Service_rev_server
+
+END_TESTCASE	upnp_standard_service_description_0030_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_2.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_2
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini UPnP_Describe_Std_Root_MltplServices_server
+
+END_TESTCASE	upnp_standard_service_description_0030_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini UPnP_Describe_Std_Root_MltplServices_rev_server
+
+END_TESTCASE	upnp_standard_service_description_0030_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_3.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_3
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini upnp_embedded_device_std_service_level1_description_server
+
+END_TESTCASE	upnp_standard_service_description_0030_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_3_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini upnp_embedded_device_std_service_level1_description_rev_server
+
+END_TESTCASE	upnp_standard_service_description_0030_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_4.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_4
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini upnp_embedded_devices_5levels_std_service_description_server
+
+END_TESTCASE	upnp_standard_service_description_0030_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_4_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini upnp_embedded_devices_5levels_std_service_description_rev_server
+
+END_TESTCASE	upnp_standard_service_description_0030_4_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_5.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_5
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini upnp_embd_devices_3levels_multiple_service_description_server
+
+END_TESTCASE	upnp_standard_service_description_0030_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_standard_service_description_0030_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+//
+// 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:
+//
+//! upnp_standard_service_description_0030_5_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_standard_service_description_0030_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0030
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a standard service type (urn:schemas-upnp-org:service: serviceType:v).	
+//! @SYMREQ					REQ8627,  REQ8629, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617,REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with urn:schemas-upnp-org:service: serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	
+//!								Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini upnp_embd_devices_3levels_multiple_service_description_rev_server
+
+END_TESTCASE	upnp_standard_service_description_0030_5_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_unsubscribe_0042_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_unsubscribe_0042_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_unsubscribe_0042_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0042
+//! @SYMTestCaseDesc 		Control point unsubscribe for state change in services.
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589, REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point subscribes for state changes in services.
+//! 						2.	Control point unsubscribe for the state change using UNSUBSCRIBE method using the SID.
+//! 						3.	If requested UNSUBSCRIBE is approved then Service point may acknowledge with HTTP/1.1 200 OK within 30 sec, else with appropriate error messages. (may be like Incompatible headers, Invalid SID, or Missing SID)
+//! @SYMTestExpectedResults	The control point must not receive any state change events from the device.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0042.ini upnp_unsubscribe_0042_1_server
+
+END_TESTCASE	upnp_unsubscribe_0042_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_unsubscribe_0042_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_unsubscribe_0042_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_unsubscribe_0042_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0042
+//! @SYMTestCaseDesc 		Control point unsubscribe for state change in services.
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589, REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point subscribes for state changes in services.
+//! 						2.	Control point unsubscribe for the state change using UNSUBSCRIBE method using the SID.
+//! 						3.	If requested UNSUBSCRIBE is approved then Service point may acknowledge with HTTP/1.1 200 OK within 30 sec, else with appropriate error messages. (may be like Incompatible headers, Invalid SID, or Missing SID)
+//! @SYMTestExpectedResults	The control point must not receive any state change events from the device.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0042_rev.ini upnp_unsubscribe_0042_1_rev_server
+
+END_TESTCASE	upnp_unsubscribe_0042_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_unsubscribe_0042_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_unsubscribe_0042_2.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_unsubscribe_0042_2
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0042
+//! @SYMTestCaseDesc 		Control point unsubscribe for state change in services.
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589, REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point subscribes for state changes in services.
+//! 						2.	Control point unsubscribe for the state change using UNSUBSCRIBE method using the SID.
+//! 						3.	If requested UNSUBSCRIBE is approved then Service point may acknowledge with HTTP/1.1 200 OK within 30 sec, else with appropriate error messages. (may be like Incompatible headers, Invalid SID, or Missing SID)
+//! @SYMTestExpectedResults	The control point must not receive any state change events from the device.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0042.ini upnp_unsubscribe_0042_2_server
+
+END_TESTCASE	upnp_unsubscribe_0042_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_unsubscribe_0042_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+//
+// 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:
+//
+//! upnp_unsubscribe_0042_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_unsubscribe_0042_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0042
+//! @SYMTestCaseDesc 		Control point unsubscribe for state change in services.
+//! @SYMREQ				REQ8634, REQ8627, REQ8629,REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589, REQ4877, REQ8617,REQ8618, REQ8626
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Control point subscribes for state changes in services.
+//! 						2.	Control point unsubscribe for the state change using UNSUBSCRIBE method using the SID.
+//! 						3.	If requested UNSUBSCRIBE is approved then Service point may acknowledge with HTTP/1.1 200 OK within 30 sec, else with appropriate error messages. (may be like Incompatible headers, Invalid SID, or Missing SID)
+//! @SYMTestExpectedResults	The control point must not receive any state change events from the device.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\subscribe_0042_rev.ini upnp_unsubscribe_0042_2_rev_server
+
+END_TESTCASE	upnp_unsubscribe_0042_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_1
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_1_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_1
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_1_rev_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_1_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_1_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_2.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_2
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_2_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_2
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_2_rev_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_2_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_2_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_3.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_3
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_3_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_3
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_3
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_3_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_3_rev_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_3_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_3_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_4.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_4
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_4_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_4
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_4_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_4_rev_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_4_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_4_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_5.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_5
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060.ini upnp_validate_describe_requests_headers_0060_5_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_5
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_5
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_describe_requests_headers_0060_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_describe_requests_headers_0060_5_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_describe_requests_headers_0060_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP - NEG - 0060
+//! @SYMTestCaseDesc 		Service points ignores describe requests without the mandatory headers. 
+//! @SYMREQ 				REQ8650
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Join a control point to UPnP enabled network.
+//! 						2.	Issue Discovery request with method ST:ssdp:all.
+//! 						3.	Issues HTTP GET request for a device description without setting all mandatory headers.
+//! 						4.	The service point must ignore such request.
+//! @SYMTestExpectedResults	Service points must ignore invalid describe request.
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini upnp_validate_describe_requests_headers_0060_5_rev_server
+END_TESTCASE	upnp_validate_describe_requests_headers_0060_5_rev
+
+PRINT Completed upnp_validate_describe_requests_headers_0060_5_rev
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_1.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_1_server
+END_TESTCASE	upnp_validate_device_registration_0061_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_10.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_10.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_10
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_10_server
+END_TESTCASE	upnp_validate_device_registration_0061_10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_10_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_10.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_10
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_10_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_11.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_11.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_11
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_11_server
+END_TESTCASE	upnp_validate_device_registration_0061_11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_11_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_11.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_11
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP !Result=Fail 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_11_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_12.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_12.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_12
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_12_server
+END_TESTCASE	upnp_validate_device_registration_0061_12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_12_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_12.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_12
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP !Result=Fail 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_12_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_13.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_13.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_13
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_13_server
+END_TESTCASE	upnp_validate_device_registration_0061_13
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_13_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_13.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_13
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP !Result=Fail 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_13_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_13
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_14.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_14.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_14
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_14_server
+END_TESTCASE	upnp_validate_device_registration_0061_14
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_14_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_14.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_14
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_14_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_14
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_15.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_15.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_15
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_15_server
+END_TESTCASE	upnp_validate_device_registration_0061_15
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_15_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_15.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_15
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_15_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_15
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_16.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_16.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_16
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_16_server
+END_TESTCASE	upnp_validate_device_registration_0061_16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_16_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_16.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_16
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_16_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_1.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_1_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_2.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_2
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_2_server
+END_TESTCASE	upnp_validate_device_registration_0061_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_2.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_2
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_2_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_3.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_3
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_3_server
+END_TESTCASE	upnp_validate_device_registration_0061_3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_3.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_3
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_3_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_4.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_4
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_4_server
+END_TESTCASE	upnp_validate_device_registration_0061_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_4.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_4
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_4_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_5.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_5
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_5_server
+END_TESTCASE	upnp_validate_device_registration_0061_5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_5.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_5
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_5_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_6.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_6
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_6_server
+END_TESTCASE	upnp_validate_device_registration_0061_6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_6.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_6
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_6_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_7.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_7.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_7
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_7_server
+END_TESTCASE	upnp_validate_device_registration_0061_7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_7_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_7.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_7
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_7_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_8.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_8.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_8
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_8_server
+END_TESTCASE	upnp_validate_device_registration_0061_8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_8_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_8.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_8
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_8_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_9.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_9.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_9
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061.ini upnp_validate_device_registration_0061_9_server
+END_TESTCASE	upnp_validate_device_registration_0061_9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0061_9_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0061_9.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0061_9
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_PANIC_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini upnp_validate_device_registration_0061_9_rev_server
+END_TESTCASE	upnp_validate_device_registration_0061_9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0062_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0062_1.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0062_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0062.ini upnp_validate_device_registration_0062_1_server
+END_TESTCASE	upnp_validate_device_registration_0062_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_device_registration_0062_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+//
+// 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:
+//
+//! upnp_validate_device_registration_0062_1.script
+//! @SYMTestSuiteName	multiple_machines_server  
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+
+START_TESTCASE	upnp_validate_device_registration_0062_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672,REQ8605,REQ8606,REQ8607				
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0062_rev.ini upnp_validate_device_registration_0062_1_rev_server
+END_TESTCASE	upnp_validate_device_registration_0062_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_discovery_response_time_0049_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_validate_discovery_response_time_0049_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_discovery_response_time_0049_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS – 0049
+//! @SYMTestCaseDesc 		Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX ( <= 120 ) 
+//! 						header before sending response for a discovery request.
+//! @SYMREQ 				REQ8614 REQ8615
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Start one service point in UPnP enabled network.
+//! 						2.	Join a control point in the UPnP enabled network and issue a discovery request with ST:ssdp:root 
+//! 						3.	Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX (<= 120) header before sending response
+//! 						4.	MX header value must be less than or equal to 120. If it exceeds 120 seconds then Service point chooses to wait between 0 to 120 seconds before responding.
+//! @SYMTestExpectedResults		Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX (<=120) header before sending response.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0049.ini upnp_validate_discovery_response_time_0049_1_server
+
+END_TESTCASE	upnp_validate_discovery_response_time_0049_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_discovery_response_time_0049_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_validate_discovery_response_time_0049_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_discovery_response_time_0049_1
+//! @file					
+//! @SYMTestCaseID			UPNP - POS – 0049
+//! @SYMTestCaseDesc 		Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX ( <= 120 ) 
+//! 						header before sending response for a discovery request.
+//! @SYMREQ 				REQ8614 REQ8615
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Start one service point in UPnP enabled network.
+//! 						2.	Join a control point in the UPnP enabled network and issue a discovery request with ST:ssdp:root 
+//! 						3.	Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX (<= 120) header before sending response
+//! 						4.	MX header value must be less than or equal to 120. If it exceeds 120 seconds then Service point chooses to wait between 0 to 120 seconds before responding.
+//! @SYMTestExpectedResults		Service Point must wait for a random period of time between 0 seconds and the number of seconds specified in the MX (<=120) header before sending response.
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500  multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\discovery_0049_rev.ini upnp_validate_discovery_response_time_0049_1_rev_server
+
+END_TESTCASE	upnp_validate_discovery_response_time_0049_1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_root_0001_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_validate_root_0001_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_root_0001_1
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ 				REQ8627
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0001.ini upnp_validate_root_0001_1_server
+END_TESTCASE	upnp_validate_root_0001_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_validate_root_0001_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+//! upnp_validate_root_0001_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_validate_root_0001_1_rev
+//! @file					
+//! @SYMTestCaseID			
+//! @SYMTestCaseDesc 		
+//! @SYMREQ 				REQ8672
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		
+//! @SYMTestExpectedResults	
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\publish_0001_rev.ini upnp_validate_root_0001_1_rev_server
+END_TESTCASE	upnp_validate_root_0001_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_1.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_1
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0001_server
+END_TESTCASE	upnp_vendor_device_description_0029_1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_1_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_1_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_1_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0001_rev_server
+END_TESTCASE	upnp_vendor_device_description_0029_1_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_2.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_2
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0002_server
+END_TESTCASE	upnp_vendor_device_description_0029_2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_2_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_2_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_2_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0002_rev_server
+END_TESTCASE	upnp_vendor_device_description_0029_2_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_3.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_3
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0003_server
+END_TESTCASE	upnp_vendor_device_description_0029_3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_3_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_3_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_3_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0003_rev_server
+END_TESTCASE	upnp_vendor_device_description_0029_3_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_4.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_4.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_4
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0004_server
+END_TESTCASE	upnp_vendor_device_description_0029_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_4_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_4_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_4_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0004_rev_server
+END_TESTCASE	upnp_vendor_device_description_0029_4_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_5.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_5.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_5
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0005_server
+END_TESTCASE	upnp_vendor_device_description_0029_5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_5_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_5_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_5_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0005_rev_server
+END_TESTCASE	upnp_vendor_device_description_0029_5_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_6.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_6.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_6
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini upnp_vendor_device_description_0006_server
+END_TESTCASE	upnp_vendor_device_description_0029_6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_device_description_0029_6_rev.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+//
+// 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:
+//
+//! upnp_vendor_device_description_0029_6_rev.script
+//! @SYMTestSuiteName	multiple_machines_server 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_server 
+LOAD_SUITE multiple_machines_server
+LOAD_SUITE test_synchronize_server
+
+START_TESTCASE	upnp_vendor_device_description_0029_6_rev
+//! @file					
+//! @SYMTestCaseID			UPNP_POS_0029
+//! @SYMTestCaseDesc 		Retrieve  the device description of an UPnP device with a vendor defined device type(ST: urn:domain-name:device:deviceType:v)
+//! @SYMREQ					REQ8627, REQ8605, REQ8606, REQ8607, REQ8611, REQ8681, REQ10588, REQ10589,REQ4877, REQ8617, REQ8618
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled vendor defined devices in the LAN with ST: urn:domain-name:device:deviceType:v 
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! @SYMTestExpectedResults	
+//!							Retrieval of device description for a desired device is completed. i.e.,
+//!							If control point provides a valid LOCATION then it retrieves a file containing device description for a vendor defined device.
+//!							It is expected to receive only one describe response for describe request.
+//!							If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+
+RUN_TEST_STEP 1000 test_synchronize_server TestUPnPManager  z:\upnp\testupnp\client\testdata\ini_files\test_synchronize_client.ini serverdata
+RUN_TEST_STEP 500 multiple_machines_server TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini upnp_vendor_device_description_0006_rev_server
+END_TESTCASE	upnp_vendor_device_description_0029_6_rev
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/Scripts/server/upnp_vendor_service_description_0031.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,50 @@
+//
+// 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:
+//
+//upnp_vendor_service_description_0031.script
+//! @SYMTestSuiteName	multiple_machines_client 
+//! @SYMScriptTestEnvironment
+
+PRINT Run all multiple_machines_client 
+
+LOAD_SUITE multiple_machines_client
+
+START_TESTCASE	upnp_vendor_service_description_0031
+//! @file					
+//! @SYMTestCaseID			UPNP - POS - 0031
+//! @SYMTestCaseDesc 		Retrieve the service description of an UPnP device with a vendor defined service type (ST:urn:domain-name:service:serviceType:v).
+//! @SYMREQ 				REQ8627	
+//! @SYMTestStatus 			Implemented
+//! @SYMTestPriority 		1
+//! @SYMTestActions 		1.	Issue a discovery search request for all UPnP enabled services of standard service type in the LAN with ST:urn:domain-name:service:serviceType:v.
+//! 						2.	Retrieve the Device description by issuing HTTP GET request for the URL retrieved from the LOCATION field specified in successful Discovery response.
+//! 						3.	From the step 2 above parse the data for SCPDURL, this specifies the relative URL for service description.
+//! 						4.	Retrieve the service description by issuing HTTP GET request for the URL (convert this to absolute URI) from step 3.
+//! @SYMTestExpectedResults	Retrieval of service description for a standard service of UPnP Device is completed. i.e.,
+//!								If control point provides a valid LOCATION then it retrieves a file containing standard service description for a root device.
+//!								It is expected to receive only one describe response for describe request.
+//!								If it is an invalid location or unable to retrieve the description then it is expected return with appropriate error message.  
+//! @SYMTestType 			CIT
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini UPnP_Describe_Vendor_Root_Service
+Delay 100
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini UPnP_Describe_vendor_Root_MltplServices
+Delay 100
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini upnp_embedded_device_vendor_service_level1_description
+Delay 100
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini upnp_embedded_devices_5levels_vendor_service_description
+Delay 100
+RUN_TEST_STEP 200 multiple_machines_client TestUPnPManager z:\upnp\testupnp\client\testdata\ini_files\describe.ini upnp_embd_devices_3levels_multiple_vendor_service_description
+Delay 100
+END_TESTCASE	upnp_vendor_service_description_0031
\ No newline at end of file
Binary file servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/iconfiles/playstation1.png has changed
Binary file servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/iconfiles/playstation2.png has changed
Binary file servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/iconfiles/playstation3.png has changed
Binary file servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/iconfiles/playstation4.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/action.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
+<s:Body>
+<u:SetTarget xmlns:u="urn:schemas-upnp-org:service:SwitchPower:1">
+<newTargetValue>0</newTargetValue>
+</u:SetTarget>
+</s:Body>
+</s:Envelope>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/actionresponse.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
+   <s:Body>
+      <u:SetTargetResponse xmlns:u="urn:schemas-upnp-org:service:SwitchPower:1" />
+   </s:Body>
+</s:Envelope>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/AVTransport1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,477 @@
+<scpd>
+    <serviceStateTable>
+        <stateVariable>
+            <name>TransportState</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+            <allowedValueList>
+                <allowedValue>STOPPED</allowedValue>
+                <allowedValue>PLAYING</allowedValue>
+            </allowedValueList>
+        </stateVariable>
+        <stateVariable>
+            <name>TransportStatus</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+            <allowedValueList>
+                <allowedValue>OK</allowedValue>
+                <allowedValue>ERROR_OCCURRED</allowedValue>           
+            </allowedValueList>
+        </stateVariable>
+        <stateVariable>
+            <name>PlaybackStorageMedium</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+	 <stateVariable>
+            <name>RecordStorageMedium</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+              </stateVariable>
+        <stateVariable>
+            <name>PossiblePlaybackStorageMedia</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>PossibleRecordStorageMedia</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>CurrentPlayMode</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+            <allowedValueList>
+                <allowedValue>NORMAL</allowedValue>
+            </allowedValueList>
+            <defaultValue>NORMAL</defaultValue>
+        </stateVariable>
+        <stateVariable>
+            <name>TransportPlaySpeed</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+	<allowedValueList>
+                <allowedValue>1</allowedValue>
+            </allowedValueList>
+        </stateVariable>
+        <stateVariable>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <name>RecordMediumWriteStatus </name>
+            <dataType>string</dataType>
+         </stateVariable>
+        <stateVariable>
+            <name>CurrentRecordQualityMode</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+          </stateVariable>
+        <stateVariable>
+            <name>PossibleRecordQualityModes</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>NumberOfTracks</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>ui4</dataType>
+		<allowedValueRange>
+			<minimum>0</minimum>
+		</allowedValueRange>
+         </stateVariable>
+        <stateVariable>
+            <name>CurrentTrack</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>ui4</dataType>
+		<allowedValueRange>
+			<minimum>0</minimum>
+			<step>1</step>
+		</allowedValueRange>
+        </stateVariable>
+        <stateVariable>
+            <name>CurrentTrackDuration</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+	  <stateVariable>
+            <name>CurrentMediaDuration</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>CurrentTrackMetaData</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>CurrentTrackURI</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>AVTransportURI</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>AVTransportURIMetaData</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>NextAVTransportURI</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>NextAVTransportURIMetaData</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>RelativeTimePosition</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>AbsoluteTimePosition</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>RelativeCounterPosition</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>i4</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>AbsoluteCounterPosition</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>i4</dataType>
+        </stateVariable>
+        <stateVariable>
+		<Optional/>
+            <name>CurrentTransportActions</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>LastChange</name>
+            <sendEventsAttribute>yes</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_SeekMode</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+            <allowedValueList>
+                 <allowedValue>TRACK_NR</allowedValue>
+            </allowedValueList>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_SeekTarget</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_InstanceID</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>ui4</dataType>
+        </stateVariable>
+    </serviceStateTable>
+    <actionList>
+        <action>
+            <name>SetAVTransportURI</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>CurrentURI</name>
+                    <direction>in</direction>                    <relatedStateVariable>AVTransportURI</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>CurrentURIMetaData</name>
+                    <direction>in</direction>                    <relatedStateVariable>AVTransportURIMetaData</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>	<Optional/>
+            <name>SetNextAVTransportURI</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>NextURI</name>
+                    <direction>in</direction>                    <relatedStateVariable>NextAVTransportURI</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>NextURIMetaData</name>
+                    <direction>in</direction>                    <relatedStateVariable>NextAVTransportURIMetaData</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>GetMediaInfo</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                 <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>NrTracks</name>
+                    <direction>out</direction>                    <relatedStateVariable>NumberOfTracks</relatedStateVariable>
+                </argument>
+<argument>
+                    <name>MediaDuration</name>
+                    <direction>out</direction>                    <relatedStateVariable>CurrentMediaDuration</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>CurrentURI</name>
+                    <direction>out</direction>                    <relatedStateVariable>AVTransportURI</relatedStateVariable>
+                </argument>
+		    <argument>
+                    <name>CurrentURIMetaData</name>
+                    <direction>out</direction>                    <relatedStateVariable>AVTransportURIMetaData</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>NextURI</name>
+                    <direction>out</direction>                    <relatedStateVariable>NextAVTransportURI</relatedStateVariable>
+                </argument>
+		    <argument>
+                    <name>NextURIMetaData</name>
+                    <direction>out</direction>                    <relatedStateVariable>NextAVTransportURIMetaData</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>PlayMedium</name>
+                    <direction>out</direction>                    <relatedStateVariable>PlaybackStorageMedium</relatedStateVariable>
+                </argument>
+<argument>
+                    <name>RecordMedium</name>
+                    <direction>out</direction>                    <relatedStateVariable>RecordStorageMedium</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>WriteStatus</name>
+                    <direction>out</direction>                    <relatedStateVariable>RecordMediumWriteStatus </relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>GetTransportInfo</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>CurrentTransportState</name>
+                    <direction>out</direction>                    <relatedStateVariable>TransportState</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>CurrentTransportStatus</name>
+                    <direction>out</direction>                    <relatedStateVariable>TransportStatus</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>CurrentSpeed</name>
+                    <direction>out</direction>                    <relatedStateVariable>TransportPlaySpeed</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>GetPositionInfo</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Track</name>
+                    <direction>out</direction>                    <relatedStateVariable>CurrentTrack</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>TrackDuration</name>
+                    <direction>out</direction>                    <relatedStateVariable>CurrentTrackDuration</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>TrackMetaData</name>
+                    <direction>out</direction>                    <relatedStateVariable>CurrentTrackMetaData</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>TrackURI</name>
+                    <direction>out</direction>                    <relatedStateVariable>CurrentTrackURI</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>RelTime</name>
+                    <direction>out</direction>                    <relatedStateVariable>RelativeTimePosition</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>AbsTime</name>
+                    <direction>out</direction>                    <relatedStateVariable>AbsoluteTimePosition</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>RelCount</name>
+                    <direction>out</direction>                    <relatedStateVariable>RelativeCounterPosition</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>AbsCount</name>
+                    <direction>out</direction>                    <relatedStateVariable>AbsoluteCounterPosition</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>GetDeviceCapabilities</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>PlayMedia</name>
+                    <direction>out</direction>                    <relatedStateVariable>PossiblePlaybackStorageMedia</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>RecMedia</name>
+                    <direction>out</direction>                    <relatedStateVariable>PossibleRecordStorageMedia</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>RecQualityModes</name>
+                    <direction>out</direction>                    <relatedStateVariable>PossibleRecordQualityModes</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>GetTransportSettings</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>PlayMode</name>
+                    <direction>out</direction>                    <relatedStateVariable>CurrentPlayMode</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>RecQualityMode</name>
+                    <direction>out</direction>                 <relatedStateVariable>CurrentRecordQualityMode</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>Stop</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>Play</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Speed</name>
+                    <direction>in</direction>                    <relatedStateVariable>TransportPlaySpeed</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>	<Optional/>
+            <name>Pause</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>	<Optional/>
+            <name>Record</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>Seek</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Unit</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_SeekMode</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Target</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_SeekTarget</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>Next</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>Previous</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>	<Optional/>
+            <name>SetPlayMode</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>NewPlayMode</name>
+                    <direction>in</direction>                    <relatedStateVariable>CurrentPlayMode</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>	<Optional/>
+            <name>SetRecordQualityMode</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>NewRecordQualityMode</name>
+                    <direction>in</direction>                    <relatedStateVariable>CurrentRecordQualityMode</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+
+        <action>	<Optional/>
+            <name>GetCurrentTransportActions</name>
+            <argumentList>
+                <argument>
+                    <name>InstanceID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Actions</name>
+                    <direction>out</direction>                    <relatedStateVariable>CurrentTransportActions</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+    </actionList>
+</scpd>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/AVTransport2.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,788 @@
+<!--============================================================
+Title: UPnP AV AV-Transport Service (AVT) Template
+
+Purpose:
+To identify the required/optional actions and state variables
+and the required allowed values defined by this service type.
+
+Note:
+This file uses tabs (not spaces) for block indentation.
+Any updates to this file should maintain this convention.
+This includes disabling any automatic tab-to-space conversion
+feature provided by your editor. 
+================================================================-->
+<scpd>
+	<serviceStateTable>
+		<stateVariable>
+			<name>TransportState</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>STOPPED</allowedValue>
+				<allowedValue>PLAYING</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>TransportStatus</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>OK</allowedValue>
+				<allowedValue>ERROR_OCCURRED</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentMediaCategory</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>NO_MEDIA</allowedValue>
+				<allowedValue>TRACK_AWARE</allowedValue>
+				<allowedValue>TRACK_UNAWARE</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>PlaybackStorageMedium</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>RecordStorageMedium</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+		
+		<stateVariable>
+			<name>PossiblePlaybackStorageMedia</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>PossibleRecordStorageMedia</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentPlayMode</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>NORMAL</allowedValue>
+			</allowedValueList>
+			<defaultValue>NORMAL</defaultValue>
+		</stateVariable>
+
+		<stateVariable>
+			<name>TransportPlaySpeed</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>1</allowedValue>
+			</allowedValueList>
+			<defaultValue>1</defaultValue>
+		</stateVariable>
+
+		<stateVariable>
+			<name>RecordMediumWriteStatus</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentRecordQualityMode</name>
+			<sendEventsAttribute>no</sendEventsAttribute>	
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>PossibleRecordQualityModes</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>NumberOfTracks</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentTrack</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentTrackDuration</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentMediaDuration</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentTrackMetaData</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentTrackURI</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>AVTransportURI</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>AVTransportURIMetaData</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>NextAVTransportURI</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>NextAVTransportURIMetaData</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>RelativeTimePosition</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>AbsoluteTimePosition</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>RelativeCounterPosition</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>AbsoluteCounterPosition</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>CurrentTransportActions</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>LastChange</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>DRMState</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>OK</allowedValue>
+			</allowedValueList>
+			<defaultValue>UNKNOWN</defaultValue>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_SeekMode</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>TRACK_NR</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_SeekTarget</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_InstanceID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_DeviceUDN</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_ServiceType</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_ServiceID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_StateVariableValuePairs</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_StateVariableList</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+	</serviceStateTable>
+
+	<actionList>
+		<action>
+			<name>SetAVTransportURI</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentURI</name>
+					<direction>in</direction>
+					<relatedStateVariable>AVTransportURI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentURIMetaData</name>
+					<direction>in</direction>
+					<relatedStateVariable>AVTransportURIMetaData</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetNextAVTransportURI</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NextURI</name>
+					<direction>in</direction>
+					<relatedStateVariable>NextAVTransportURI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NextURIMetaData</name>
+					<direction>in</direction>
+					<relatedStateVariable>NextAVTransportURIMetaData</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetMediaInfo</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NrTracks</name>
+					<direction>out</direction>
+					<relatedStateVariable>NumberOfTracks</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>MediaDuration</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentMediaDuration</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentURI</name>
+					<direction>out</direction>
+					<relatedStateVariable>AVTransportURI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentURIMetaData</name>
+					<direction>out</direction>
+					<relatedStateVariable>AVTransportURIMetaData</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NextURI</name>
+					<direction>out</direction>
+					<relatedStateVariable>NextAVTransportURI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NextURIMetaData</name>
+					<direction>out</direction>
+					<relatedStateVariable>NextAVTransportURIMetaData</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PlayMedium</name>
+					<direction>out</direction>
+					<relatedStateVariable>PlaybackStorageMedium</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RecordMedium</name>
+					<direction>out</direction>
+					<relatedStateVariable>RecordStorageMedium</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>WriteStatus</name>
+					<direction>out</direction>
+					<relatedStateVariable>RecordMediumWriteStatus</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetMediaInfo_Ext</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentType</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentMediaCategory</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NrTracks</name>
+					<direction>out</direction>
+					<relatedStateVariable>NumberOfTracks</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>MediaDuration</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentMediaDuration</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentURI</name>
+					<direction>out</direction>
+					<relatedStateVariable>AVTransportURI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentURIMetaData</name>
+					<direction>out</direction>
+					<relatedStateVariable>AVTransportURIMetaData</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NextURI</name>
+					<direction>out</direction>
+					<relatedStateVariable>NextAVTransportURI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NextURIMetaData</name>
+					<direction>out</direction>
+					<relatedStateVariable>NextAVTransportURIMetaData</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PlayMedium</name>
+					<direction>out</direction>
+					<relatedStateVariable>PlaybackStorageMedium</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RecordMedium</name>
+					<direction>out</direction>
+					<relatedStateVariable>RecordStorageMedium</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>WriteStatus</name>
+					<direction>out</direction>
+					<relatedStateVariable>RecordMediumWriteStatus</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetTransportInfo</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentTransportState</name>
+					<direction>out</direction>
+					<relatedStateVariable>TransportState</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentTransportStatus</name>
+					<direction>out</direction>
+					<relatedStateVariable>TransportStatus</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentSpeed</name>
+					<direction>out</direction>
+					<relatedStateVariable>TransportPlaySpeed</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetPositionInfo</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Track</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentTrack</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TrackDuration</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentTrackDuration</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TrackMetaData</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentTrackMetaData</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TrackURI</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentTrackURI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RelTime</name>
+					<direction>out</direction>
+					<relatedStateVariable>RelativeTimePosition</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>AbsTime</name>
+					<direction>out</direction>
+					<relatedStateVariable>AbsoluteTimePosition</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RelCount</name>
+					<direction>out</direction>
+					<relatedStateVariable>RelativeCounterPosition</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>AbsCount</name>
+					<direction>out</direction>
+					<relatedStateVariable>AbsoluteCounterPosition</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetDeviceCapabilities</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PlayMedia</name>
+					<direction>out</direction>
+					<relatedStateVariable>PossiblePlaybackStorageMedia</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RecMedia</name>
+					<direction>out</direction>
+					<relatedStateVariable>PossibleRecordStorageMedia</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RecQualityModes</name>
+					<direction>out</direction>
+					<relatedStateVariable>PossibleRecordQualityModes</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetTransportSettings</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PlayMode</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentPlayMode</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RecQualityMode</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentRecordQualityMode</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>Stop</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>Play</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Speed</name>
+					<direction>in</direction>
+					<relatedStateVariable>TransportPlaySpeed</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>Pause</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>Record</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>Seek</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Unit</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_SeekMode</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Target</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_SeekTarget</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>Next</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>Previous</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetPlayMode</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NewPlayMode</name>
+					<direction>in</direction>
+					<relatedStateVariable>CurrentPlayMode</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetRecordQualityMode</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NewRecordQualityMode</name>
+					<direction>in</direction>
+					<relatedStateVariable>CurrentRecordQualityMode</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetCurrentTransportActions</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Actions</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentTransportActions</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetDRMState</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentDRMState</name>
+					<direction>out</direction>
+					<relatedStateVariable>DRMState</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetStateVariables</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateVariableList</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_StateVariableList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateVariableValuePairs</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_StateVariableValuePairs</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetStateVariables</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>AVTransportUDN</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_DeviceUDN</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ServiceType</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ServiceType</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ServiceId</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ServiceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateVariableValuePairs</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_StateVariableValuePairs</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateVariableList</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_StateVariableList</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+	</actionList>
+</scpd>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ConnectionManager1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,170 @@
+<scpd>
+    <serviceStateTable>
+        <stateVariable>
+            <name>SourceProtocolInfo</name>
+            <sendEventsAttribute>yes</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>SinkProtocolInfo</name>
+            <sendEventsAttribute>yes</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>CurrentConnectionIDs</name>
+            <sendEventsAttribute>yes</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_ConnectionStatus</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+            <allowedValueList>
+                <allowedValue>OK</allowedValue>
+                <allowedValue>ContentFormatMismatch</allowedValue>
+                <allowedValue>InsufficientBandwidth</allowedValue>
+                <allowedValue>UnreliableChannel</allowedValue>
+                <allowedValue>Unknown</allowedValue>
+            </allowedValueList>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_ConnectionManager</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_Direction</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+            <allowedValueList>
+                <allowedValue>Input</allowedValue>
+                <allowedValue>Output</allowedValue>
+            </allowedValueList>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_ProtocolInfo</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>string</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_ConnectionID</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>i4</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_AVTransportID</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>i4</dataType>
+        </stateVariable>
+        <stateVariable>
+            <name>A_ARG_TYPE_RcsID</name>
+            <sendEventsAttribute>no</sendEventsAttribute>
+            <dataType>i4</dataType>
+        </stateVariable>
+    </serviceStateTable>
+<actionList>
+        <action>
+            <name>GetProtocolInfo</name>
+            <argumentList>
+                <argument>
+                    <name>Source</name>
+                    <direction>out</direction>               <relatedStateVariable>SourceProtocolInfo</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Sink</name>
+                    <direction>out</direction>               <relatedStateVariable>SinkProtocolInfo</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+	  <action>
+	  <Optional/>
+            <name>PrepareForConnection</name>
+            <argumentList>
+                <argument>
+                    <name>RemoteProtocolInfo</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_ProtocolInfo</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>PeerConnectionManager</name>
+                    <direction>in</direction>                  <relatedStateVariable>A_ARG_TYPE_ConnectionManager</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>PeerConnectionID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Direction</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_Direction</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>ConnectionID</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>AVTransportID</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_AVTransportID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>RcsID</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_RcsID</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+	  <Optional/>
+            <name>ConnectionComplete</name>
+            <argumentList>
+                <argument>
+                    <name>ConnectionID</name>
+                    <direction>in</direction>                    <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>GetCurrentConnectionIDs</name>
+            <argumentList>
+                <argument>
+                    <name>ConnectionIDs</name>
+                    <direction>out</direction>                    <relatedStateVariable>CurrentConnectionIDs</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+        <action>
+            <name>GetCurrentConnectionInfo</name>
+            <argumentList>
+                <argument>
+                    <name>ConnectionID</name>
+                    <direction>in</direction>                   <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>RcsID</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_RcsID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>AVTransportID</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_AVTransportID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>ProtocolInfo</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_ProtocolInfo</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>PeerConnectionManager</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_ConnectionManager</relatedStateVariable>
+                </argument>
+             <argument>
+                    <name>PeerConnectionID</name>
+                    <direction>out</direction>                   <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Direction</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_Direction</relatedStateVariable>
+                </argument>
+                <argument>
+                    <name>Status</name>
+                    <direction>out</direction>                    <relatedStateVariable>A_ARG_TYPE_ConnectionStatus</relatedStateVariable>
+                </argument>
+            </argumentList>
+        </action>
+    </actionList>
+</scpd>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ConnectionManager2.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,215 @@
+<!--============================================================
+Title: UPnP AV Connection Manager Service (CM) Template
+
+Purpose:
+To identify the required/optional actions and state variables
+and the required allowed values defined by this service type.
+
+Note:
+This file uses tabs (not spaces) for block indentation.
+Any updates to this file should maintain this convention.
+This includes disabling any automatic tab-to-space conversion
+feature provided by your editor. 
+================================================================--><scpd>
+	<serviceStateTable>
+		<stateVariable>
+			<name>SourceProtocolInfo</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>SinkProtocolInfo</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>CurrentConnectionIDs</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_ConnectionStatus</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>OK</allowedValue>
+				<allowedValue>ContentFormatMismatch</allowedValue>
+				<allowedValue>InsufficientBandwidth</allowedValue>
+				<allowedValue>UnreliableChannel</allowedValue>
+				<allowedValue>Unknown</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_ConnectionManager</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_Direction</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>Input</allowedValue>
+				<allowedValue>Output</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_ProtocolInfo</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_ConnectionID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_AVTransportID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_RcsID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+	</serviceStateTable>
+
+	<actionList>
+		<action>
+			<name>GetProtocolInfo</name>
+			<argumentList>
+				<argument>
+					<name>Source</name>
+					<direction>out</direction>
+					<relatedStateVariable>SourceProtocolInfo</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Sink</name>
+					<direction>out</direction>
+					<relatedStateVariable>SinkProtocolInfo</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>PrepareForConnection</name>
+			<argumentList>
+				<argument>
+					<name>RemoteProtocolInfo</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ProtocolInfo</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PeerConnectionManager</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ConnectionManager</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PeerConnectionID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Direction</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Direction</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ConnectionID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>AVTransportID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_AVTransportID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RcsID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_RcsID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>ConnectionComplete</name>
+			<argumentList>
+				<argument>
+					<name>ConnectionID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetCurrentConnectionIDs</name>
+			<argumentList>
+				<argument>
+					<name>ConnectionIDs</name>
+					<direction>out</direction>
+					<relatedStateVariable>CurrentConnectionIDs</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetCurrentConnectionInfo</name>
+			<argumentList>
+				<argument>
+					<name>ConnectionID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RcsID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_RcsID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>AVTransportID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_AVTransportID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ProtocolInfo</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ProtocolInfo</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PeerConnectionManager</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ConnectionManager</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PeerConnectionID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Direction</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Direction</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Status</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ConnectionStatus</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+	</actionList>
+</scpd>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ContentDirectory1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,405 @@
+<scpd>
+  <serviceStateTable>
+    <stateVariable> <Optional/>
+      <name>TransferIDs</name>
+<sendEventsAttribute>yes</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>A_ARG_TYPE_ObjectID</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>A_ARG_TYPE_Result</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable> <Optional/>
+      <name>A_ARG_TYPE_SearchCriteria</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>A_ARG_TYPE_BrowseFlag</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+<allowedValueList>
+        <allowedValue>BrowseMetadata</allowedValue>
+        <allowedValue>BrowseDirectChildren</allowedValue>
+      </allowedValueList>
+    </stateVariable>
+    <stateVariable> 
+      <name>A_ARG_TYPE_Filter</name>
+<sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>A_ARG_TYPE_SortCriteria</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>A_ARG_TYPE_Index</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui4</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>A_ARG_TYPE_Count</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui4</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>A_ARG_TYPE_UpdateID</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui4</dataType>
+    </stateVariable>
+    <stateVariable> <Optional/>
+      <name>A_ARG_TYPE_TransferID</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui4</dataType>
+    </stateVariable>
+    <stateVariable> <Optional/>
+      <name>A_ARG_TYPE_TransferStatus</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+      <allowedValueList>
+        <allowedValue>COMPLETED</allowedValue>
+        <allowedValue>ERROR</allowedValue>
+        <allowedValue>IN_PROGRESS</allowedValue>
+        <allowedValue>STOPPED</allowedValue>
+      </allowedValueList>
+    </stateVariable>
+    <stateVariable> <Optional/>
+      <name>A_ARG_TYPE_TransferLength</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable> <Optional/>
+      <name>A_ARG_TYPE_TransferTotal</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable> <Optional/>
+      <name>A_ARG_TYPE_TagValueList</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable> <Optional/>
+      <name>A_ARG_TYPE_URI</name> 
+<sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>uri</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>SearchCapabilities</name>
+<sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>SortCapabilities</name>
+<sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>SystemUpdateID</name>
+<sendEventsAttribute>yes</sendEventsAttribute>
+      <dataType>ui4</dataType>
+    </stateVariable>
+    <stateVariable> <Optional/>
+      <name>ContainerUpdateIDs</name>
+<sendEventsAttribute>yes</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+  </serviceStateTable>
+  <actionList>
+    <action>
+    <name>GetSearchCapabilities</name>
+      <argumentList>
+        <argument>
+          <name>SearchCaps</name>
+          <direction>out</direction>
+          <relatedStateVariable>SearchCapabilities </relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action>
+    <name>GetSortCapabilities</name>
+      <argumentList>
+        <argument>
+          <name>SortCaps</name>
+          <direction>out</direction>
+          <relatedStateVariable>SortCapabilities</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action>
+    <name>GetSystemUpdateID</name>
+      <argumentList>
+        <argument>
+          <name>Id</name>
+          <direction>out</direction>
+          <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action>
+    <name>Browse</name>
+      <argumentList>
+        <argument>
+          <name>ObjectID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>BrowseFlag</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Filter</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>StartingIndex</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>RequestedCount</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>SortCriteria</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Result</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>NumberReturned</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>TotalMatches</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>UpdateID</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>Search</name>
+      <argumentList>
+        <argument>
+          <name>ContainerID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>SearchCriteria</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_SearchCriteria </relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Filter</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>StartingIndex</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>RequestedCount</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>SortCriteria</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Result</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>NumberReturned</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>TotalMatches</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>UpdateID</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>CreateObject</name>
+      <argumentList>
+        <argument>
+          <name>ContainerID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Elements</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>ObjectID</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Result</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>DestroyObject</name>
+      <argumentList>
+        <argument>
+          <name>ObjectID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>UpdateObject</name>
+      <argumentList>
+        <argument>
+          <name>ObjectID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentTagValue</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_TagValueList </relatedStateVariable>
+        </argument>
+        <argument>
+          <name>NewTagValue</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_TagValueList </relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>ImportResource</name>
+      <argumentList>
+        <argument>
+          <name>SourceURI</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DestinationURI</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>TransferID</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_TransferID </relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>ExportResource</name>
+      <argumentList>
+        <argument>
+          <name>SourceURI</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DestinationURI</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>TransferID</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_TransferID </relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>StopTransferResource</name>
+      <argumentList>
+        <argument>
+          <name>TransferID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_TransferID </relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetTransferProgress</name>
+      <argumentList>
+        <argument>
+          <name>TransferID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_TransferID </relatedStateVariable>
+        </argument>
+        <argument>
+          <name>TransferStatus</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_TransferStatus </relatedStateVariable>
+        </argument>
+        <argument>
+          <name>TransferLength</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_TransferLength </relatedStateVariable>
+        </argument>
+        <argument>
+          <name>TransferTotal</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>DeleteResource</name>
+      <argumentList>
+        <argument>
+          <name>ResourceURI</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>CreateReference</name>
+      <argumentList>
+        <argument>
+          <name>ContainerID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>ObjectID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+  	<argument>
+          <name>NewID</name>
+          <direction>out</direction>
+          <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+  </actionList>
+
+</scpd>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ContentDirectory2.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,539 @@
+<!--============================================================
+Title: UPnP AV Content Directory Service (CDS) Template
+
+Purpose:
+To identify the required/optional actions and state variables
+and the required allowed values defined by this service type.
+
+Note:
+This file uses tabs (not spaces) for block indentation.
+Any updates to this file should maintain this convention.
+This includes disabling any automatic tab-to-space conversion
+feature provided by your editor. 
+================================================================-->
+<scpd>
+	<serviceStateTable>
+		<stateVariable>
+			<name>SearchCapabilities</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>SortCapabilities</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>SortExtensionCapabilities</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>SystemUpdateID</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>ContainerUpdateIDs</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>TransferIDs</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>FeatureList</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_ObjectID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_Result</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_SearchCriteria</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_BrowseFlag</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>BrowseMetadata</allowedValue>
+				<allowedValue>BrowseDirectChildren</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_Filter</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_SortCriteria</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_Index</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_Count</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_UpdateID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_TransferID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_TransferStatus</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>COMPLETED</allowedValue>
+				<allowedValue>ERROR</allowedValue>
+				<allowedValue>IN_PROGRESS</allowedValue>
+				<allowedValue>STOPPED</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_TransferLength</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_TransferTotal</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_TagValueList</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_URI</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>uri</dataType>
+		</stateVariable>
+	</serviceStateTable>
+
+	<actionList>
+		<action>
+			<name>GetSearchCapabilities</name>
+			<argumentList>
+				<argument>
+					<name>SearchCaps</name>
+					<direction>out</direction>
+					<relatedStateVariable>SearchCapabilities</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetSortCapabilities</name>
+			<argumentList>
+				<argument>
+					<name>SortCaps</name>
+					<direction>out</direction>
+					<relatedStateVariable>SortCapabilities</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetSortExtensionCapabilities</name>
+			<argumentList>
+				<argument>
+					<name>SortExtensionCaps</name>
+					<direction>out</direction>
+					<relatedStateVariable>SortExtensionCapabilities</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetFeatureList</name>
+			<argumentList>
+				<argument>
+					<name>FeatureList</name>
+					<direction>out</direction>
+					<relatedStateVariable>FeatureList</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetSystemUpdateID</name>
+			<argumentList>
+				<argument>
+					<name>Id</name>
+					<direction>out</direction>
+					<relatedStateVariable>SystemUpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>Browse</name>
+			<argumentList>
+				<argument>
+					<name>ObjectID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>BrowseFlag</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Filter</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StartingIndex</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RequestedCount</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>SortCriteria</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Result</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NumberReturned</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TotalMatches</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>Search</name>
+			<argumentList>
+				<argument>
+					<name>ContainerID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>SearchCriteria</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Filter</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StartingIndex</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RequestedCount</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>SortCriteria</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Result</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NumberReturned</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TotalMatches</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>CreateObject</name>
+			<argumentList>
+				<argument>
+					<name>ContainerID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Elements</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ObjectID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Result</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>DestroyObject</name>
+			<argumentList>
+				<argument>
+					<name>ObjectID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>UpdateObject</name>
+			<argumentList>
+				<argument>
+					<name>ObjectID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentTagValue</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NewTagValue</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>MoveObject</name>
+			<argumentList>
+				<argument>
+					<name>objectID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NewParentID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NewObjectID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>ImportResource</name>
+			<argumentList>
+				<argument>
+					<name>SourceURI</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DestinationURI</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TransferID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>ExportResource</name>
+			<argumentList>
+				<argument>
+					<name>SourceURI</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DestinationURI</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TransferID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>DeleteResource</name>
+			<argumentList>
+				<argument>
+					<name>ResourceURI</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>StopTransferResource</name>
+			<argumentList>
+				<argument>
+					<name>TransferID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetTransferProgress</name>
+			<argumentList>
+				<argument>
+					<name>TransferID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TransferStatus</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TransferLength</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TransferTotal</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>CreateReference</name>
+			<argumentList>
+				<argument>
+					<name>ContainerID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ObjectID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NewID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+	</actionList>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/Feeder1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,184 @@
+<scpd>
+	<serviceStateTable>
+		<stateVariable>
+			<optional/>
+			<name>Model</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>State</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>Unloaded</defaultValue>
+			<allowedValueList>
+				<allowedValue>Unloaded</allowedValue>
+				<allowedValue>Loaded</allowedValue>
+				<allowedValue>Busy</allowedValue>
+				<allowedValue>Erred</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>FailureCode</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>None</defaultValue>
+			<allowedValueList>
+				<allowedValue>None</allowedValue>
+				<allowedValue>Jammed</allowedValue>
+				<allowedValue>Timeout</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>MorePages</name>
+			<optional/>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>boolean</dataType>
+			<defaultValue>0</defaultValue>
+		</stateVariable>
+		<stateVariable>
+			<name>FeederMode</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>Simplex</defaultValue>
+			<allowedValueList>
+				<allowedValue>Simplex</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>JobID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+			<defaultValue>0</defaultValue>
+		</stateVariable>
+		<stateVariable>
+			<name>SheetWidth</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>SheetHeight</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>InputJustification</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>EntireDocument</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>1</defaultValue>
+			<allowedValueList>
+				<allowedValue>1</allowedValue>
+				<allowedValue>0</allowedValue>
+				<allowedValue>device-setting</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>Timeout</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+	</serviceStateTable>
+	<actionList>
+		<action>
+			<name>Load</name>
+			<argumentList>
+				<argument>
+					<name>JobIDIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>JobID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>State</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+		<action>
+			<name>Eject</name>
+			<argumentList>
+				<argument>
+					<name>JobIDIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>JobID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>EntireDocumentIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>EntireDocument</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>State</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+		<action>
+			<name>Reset</name>
+			<argumentList>
+				<argument>
+					<name>JobIDIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>JobID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>State</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+		<action>
+			<name>GetState</name>
+			<argumentList>
+				<argument>
+					<name>StateOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>State</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>MorePagesOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>MorePages</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>FailureCodeOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>FailureCode</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+		<action>
+			<optional/>
+			<name>SetFeederMode</name>
+			<argumentList>
+				<argument>
+					<name>JobIDIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>JobID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>FeederModeIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>FeederMode</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+		<action>
+			<name>GetFeederMode</name>
+			<argumentList>
+				<argument>
+					<name>FeederModeOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>FeederMode</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+	</actionList>
+</scpd>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/RenderingControl1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,718 @@
+<scpd>
+  <serviceStateTable>
+    <stateVariable>
+      <name>PresetNameList</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable> 
+      <name>LastChange</name> <sendEventsAttribute>yes</sendEventsAttribute>
+      <dataType>string</dataType>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>Brightness</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>Contrast</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>Sharpness</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>RedVideoGain</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>GreenVideoGain</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>BlueVideoGain</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>RedVideoBlackLevel</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>GreenVideoBlackLevel</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>BlueVideoBlackLevel</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>ColorTemperature</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>HorizontalKeystone</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>i2</dataType>
+	<allowedValueRange>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>VerticalKeystone</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>i2</dataType>
+	<allowedValueRange>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>Mute</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>boolean</dataType>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>Volume</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui2</dataType>
+	<allowedValueRange>
+		<minimum>0</minimum>
+		<step>1</step>
+	</allowedValueRange>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>VolumeDB</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>i2</dataType>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>Loudness</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>boolean</dataType>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>A_ARG_TYPE_Channel</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+      <allowedValueList>
+        <allowedValue>Master</allowedValue>
+      </allowedValueList>
+    </stateVariable>
+    <stateVariable><Optional/>
+      <name>A_ARG_TYPE_InstanceID</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>ui4</dataType>
+    </stateVariable>
+    <stateVariable>
+      <name>A_ARG_TYPE_PresetName</name> <sendEventsAttribute>no</sendEventsAttribute>
+      <dataType>string</dataType>
+      <allowedValueList>
+        <allowedValue>FactoryDefaults</allowedValue>
+      </allowedValueList>
+    </stateVariable>
+  </serviceStateTable>
+  <actionList>
+    <action>
+    <name>ListPresets</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentPresetNameList</name>
+          <direction>out</direction>
+          <relatedStateVariable>PresetNameList</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action>
+    <name>SelectPreset</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>PresetName</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_PresetName</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetBrightness</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentBrightness</name>
+          <direction>out</direction>
+          <relatedStateVariable>Brightness</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetBrightness</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredBrightness</name>
+          <direction>in</direction>
+          <relatedStateVariable>Brightness</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetContrast</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentContrast</name>
+          <direction>out</direction>
+          <relatedStateVariable>Contrast</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetContrast</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredContrast</name>
+          <direction>in</direction>
+          <relatedStateVariable>Contrast</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetSharpness</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentSharpness</name>
+          <direction>out</direction>
+          <relatedStateVariable>Sharpness</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetSharpness</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredSharpness</name>
+          <direction>in</direction>
+          <relatedStateVariable>Sharpness</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetRedVideoGain</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentRedVideoGain</name>
+          <direction>out</direction>
+          <relatedStateVariable>RedVideoGain</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetRedVideoGain</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredRedVideoGain</name>
+          <direction>in</direction>
+          <relatedStateVariable>RedVideoGain</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetGreenVideoGain</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentGreenVideoGain</name>
+          <direction>out</direction>
+          <relatedStateVariable>GreenVideoGain</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetGreenVideoGain</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredGreenVideoGain</name>
+          <direction>in</direction>
+          <relatedStateVariable>GreenVideoGain</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetBlueVideoGain</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentBlueVideoGain</name>
+          <direction>out</direction>
+          <relatedStateVariable>BlueVideoGain</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetBlueVideoGain</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredBlueVideoGain</name>
+          <direction>in</direction>
+          <relatedStateVariable>BlueVideoGain</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+   <action><Optional/>
+    <name>GetRedVideoBlackLevel</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentRedVideoBlackLevel</name>
+          <direction>out</direction>
+          <relatedStateVariable>RedVideoBlackLevel</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetRedVideoBlackLevel</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredRedVideoBlackLevel</name>
+          <direction>in</direction>
+          <relatedStateVariable>RedVideoBlackLevel</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetGreenVideoBlackLevel</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentGreenVideoBlackLevel</name>
+          <direction>out</direction>
+          <relatedStateVariable>GreenVideoBlackLevel</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetGreenVideoBlackLevel</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredGreenVideoBlackLevel</name>
+          <direction>in</direction>
+          <relatedStateVariable>GreenVideoBlackLevel</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetBlueVideoBlackLevel</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentBlueVideoBlackLevel</name>
+          <direction>out</direction>
+          <relatedStateVariable>BlueVideoBlackLevel</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetBlueVideoBlackLevel</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredBlueVideoBlackLevel</name>
+    <direction>in</direction>
+  <relatedStateVariable>BlueVideoBlackLevel</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetColorTemperature </name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentColorTemperature</name>
+          <direction>out</direction>
+          <relatedStateVariable>ColorTemperature</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetColorTemperature</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredColorTemperature</name>
+          <direction>in</direction>
+          <relatedStateVariable>ColorTemperature</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetHorizontalKeystone</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentHorizontalKeystone</name>
+          <direction>out</direction>
+          <relatedStateVariable>HorizontalKeystone</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetHorizontalKeystone</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredHorizontalKeystone</name>
+          <direction>in</direction>
+          <relatedStateVariable>HorizontalKeystone</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetVerticalKeystone</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentVerticalKeystone</name>
+          <direction>out</direction>
+          <relatedStateVariable>VerticalKeystone</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetVerticalKeystone</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredVerticalKeystone</name>
+          <direction>in</direction>
+          <relatedStateVariable>VerticalKeystone</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetMute</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentMute</name>
+          <direction>out</direction>
+          <relatedStateVariable>Mute</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetMute</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredMute</name>
+          <direction>in</direction>
+          <relatedStateVariable>Mute</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetVolume</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentVolume</name>
+          <direction>out</direction>
+          <relatedStateVariable>Volume</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetVolume</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredVolume</name>
+          <direction>in</direction>
+          <relatedStateVariable>Volume</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetVolumeDB</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentVolume</name>
+          <direction>out</direction>
+          <relatedStateVariable>VolumeDB</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetVolumeDB</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredVolume</name>
+          <direction>in</direction>
+          <relatedStateVariable>VolumeDB</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetVolumeDBRange</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>MinValue</name>
+          <direction>out</direction>
+          <relatedStateVariable>VolumeDB</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>MaxValue</name>
+          <direction>out</direction>
+          <relatedStateVariable>VolumeDB</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>GetLoudness</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>CurrentLoudness</name>
+          <direction>out</direction>
+          <relatedStateVariable>Loudness</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+    <action><Optional/>
+    <name>SetLoudness</name>
+      <argumentList>
+        <argument>
+          <name>InstanceID</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>Channel</name>
+          <direction>in</direction>
+          <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+        </argument>
+        <argument>
+          <name>DesiredLoudness</name>
+          <direction>in</direction>
+          <relatedStateVariable>Loudness</relatedStateVariable>
+        </argument>
+      </argumentList>
+    </action>
+  </actionList>
+</scpd>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/RenderingControl2.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,953 @@
+<!--============================================================
+Title: UPnP AV Rendering Control Service (RCS) Template
+
+Purpose:
+To identify the required/optional actions and state variables
+and the required allowed values defined by this service type.
+
+Note:
+This file uses tabs (not spaces) for block indentation.
+Any updates to this file should maintain this convention.
+This includes disabling any automatic tab-to-space conversion
+feature provided by your editor. 
+================================================================-->
+<scpd>
+	<serviceStateTable>
+		<stateVariable>
+			<name>LastChange</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>PresetNameList</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>Brightness</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>Contrast</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>Sharpness</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>RedVideoGain</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>GreenVideoGain</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>BlueVideoGain</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>RedVideoBlackLevel</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>GreenVideoBlackLevel</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>BlueVideoBlackLevel</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>ColorTemperature</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>HorizontalKeystone</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i2</dataType>
+			<allowedValueRange>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>VerticalKeystone</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i2</dataType>
+			<allowedValueRange>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>Mute</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>boolean</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>Volume</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui2</dataType>
+			<allowedValueRange>
+				<minimum>0</minimum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>VolumeDB</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i2</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>Loudness</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>boolean</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_Channel</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>Master</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_InstanceID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_PresetName</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>FactoryDefaults</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_DeviceUDN</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_ServiceType</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_ServiceID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_StateVariableValuePairs</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_StateVariableList</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+	</serviceStateTable>
+
+	<actionList>
+		<action>
+			<name>ListPresets</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentPresetNameList</name>
+					<direction>out</direction>
+					<relatedStateVariable>PresetNameList</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>SelectPreset</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PresetName</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_PresetName</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetBrightness</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentBrightness</name>
+					<direction>out</direction>
+					<relatedStateVariable>Brightness</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetBrightness</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredBrightness</name>
+					<direction>in</direction>
+					<relatedStateVariable>Brightness</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetContrast</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentContrast</name>
+					<direction>out</direction>
+					<relatedStateVariable>Contrast</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action><Optional/>
+		<name>SetContrast</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredContrast</name>
+					<direction>in</direction>
+					<relatedStateVariable>Contrast</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetSharpness</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentSharpness</name>
+					<direction>out</direction>
+					<relatedStateVariable>Sharpness</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetSharpness</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredSharpness</name>
+					<direction>in</direction>
+					<relatedStateVariable>Sharpness</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetRedVideoGain</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentRedVideoGain</name>
+					<direction>out</direction>
+					<relatedStateVariable>RedVideoGain</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetRedVideoGain</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredRedVideoGain</name>
+					<direction>in</direction>
+					<relatedStateVariable>RedVideoGain</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetGreenVideoGain</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentGreenVideoGain</name>
+					<direction>out</direction>
+					<relatedStateVariable>GreenVideoGain</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetGreenVideoGain</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredGreenVideoGain</name>
+					<direction>in</direction>
+					<relatedStateVariable>GreenVideoGain</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetBlueVideoGain</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentBlueVideoGain</name>
+					<direction>out</direction>
+					<relatedStateVariable>BlueVideoGain</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetBlueVideoGain</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredBlueVideoGain</name>
+					<direction>in</direction>
+					<relatedStateVariable>BlueVideoGain</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetRedVideoBlackLevel</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentRedVideoBlackLevel</name>
+					<direction>out</direction>
+					<relatedStateVariable>RedVideoBlackLevel</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetRedVideoBlackLevel</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredRedVideoBlackLevel</name>
+					<direction>in</direction>
+					<relatedStateVariable>RedVideoBlackLevel</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetGreenVideoBlackLevel</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentGreenVideoBlackLevel</name>
+					<direction>out</direction>
+					<relatedStateVariable>GreenVideoBlackLevel</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetGreenVideoBlackLevel</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredGreenVideoBlackLevel</name>
+					<direction>in</direction>
+					<relatedStateVariable>GreenVideoBlackLevel</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetBlueVideoBlackLevel</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentBlueVideoBlackLevel</name>
+					<direction>out</direction>
+					<relatedStateVariable>BlueVideoBlackLevel</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetBlueVideoBlackLevel</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredBlueVideoBlackLevel</name>
+					<direction>in</direction>
+					<relatedStateVariable>BlueVideoBlackLevel</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetColorTemperature</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentColorTemperature</name>
+					<direction>out</direction>
+					<relatedStateVariable>ColorTemperature</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetColorTemperature</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredColorTemperature</name>
+					<direction>in</direction>
+					<relatedStateVariable>ColorTemperature</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetHorizontalKeystone</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentHorizontalKeystone</name>
+					<direction>out</direction>
+					<relatedStateVariable>HorizontalKeystone</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetHorizontalKeystone</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredHorizontalKeystone</name>
+					<direction>in</direction>
+					<relatedStateVariable>HorizontalKeystone</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetVerticalKeystone</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentVerticalKeystone</name>
+					<direction>out</direction>
+					<relatedStateVariable>VerticalKeystone</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetVerticalKeystone</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredVerticalKeystone</name>
+					<direction>in</direction>
+					<relatedStateVariable>VerticalKeystone</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetMute</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentMute</name>
+					<direction>out</direction>
+					<relatedStateVariable>Mute</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetMute</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredMute</name>
+					<direction>in</direction>
+					<relatedStateVariable>Mute</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetVolume</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentVolume</name>
+					<direction>out</direction>
+					<relatedStateVariable>Volume</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetVolume</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredVolume</name>
+					<direction>in</direction>
+					<relatedStateVariable>Volume</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetVolumeDB</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentVolume</name>
+					<direction>out</direction>
+					<relatedStateVariable>VolumeDB</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetVolumeDB</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredVolume</name>
+					<direction>in</direction>
+					<relatedStateVariable>VolumeDB</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetVolumeDBRange</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>MinValue</name>
+					<direction>out</direction>
+					<relatedStateVariable>VolumeDB</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>MaxValue</name>
+					<direction>out</direction>
+					<relatedStateVariable>VolumeDB</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetLoudness</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CurrentLoudness</name>
+					<direction>out</direction>
+					<relatedStateVariable>Loudness</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetLoudness</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Channel</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>DesiredLoudness</name>
+					<direction>in</direction>
+					<relatedStateVariable>Loudness</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetStateVariables</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateVariableList</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_StateVariableList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateVariableValuePairs</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_StateVariableValuePairs</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>SetStateVariables</name>
+			<argumentList>
+				<argument>
+					<name>InstanceID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RenderingControlUDN</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_DeviceUDN</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ServiceType</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ServiceType</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ServiceId</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ServiceID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateVariableValuePairs</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_StateVariableValuePairs</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateVariableList</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_StateVariableList</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+	</actionList>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/Scan1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,446 @@
+<scpd>
+	<serviceStateTable>
+		<stateVariable>
+			<optional/>
+			<name>JobName</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>FailureCode</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>No Error</defaultValue>
+			<allowedValueList>
+				<allowedValue>No Error</allowedValue>
+				<allowedValue>Jammed</allowedValue>
+				<allowedValue>Timeout Reached</allowedValue>
+				<allowedValue>ErredTimeout Reached</allowedValue>
+				<allowedValue>Destination Not Reachable</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>State</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>Idle</defaultValue>
+			<allowedValueList>
+				<allowedValue>Idle</allowedValue>
+				<allowedValue>Reserved</allowedValue>
+				<allowedValue>NotReady</allowedValue>
+				<allowedValue>Pending</allowedValue>
+				<allowedValue>Scanning</allowedValue>
+				<allowedValue>Finishing</allowedValue>
+				<allowedValue>Erred</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>StateReason</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>ImageFormat</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>image/jpeg</defaultValue>
+			<allowedValueList>
+				<allowedValue>device-setting</allowedValue>
+				<allowedValue>image/jpeg</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>CompressionFactor</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+			<defaultValue>100</defaultValue>
+			<allowedValueRange>
+				<minimum>-1</minimum>
+				<maximum>100</maximum>
+				<step>1</step>
+			</allowedValueRange>
+		</stateVariable>
+		<stateVariable>
+			<name>ImageType</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>Mixed</defaultValue>
+			<allowedValueList>
+				<allowedValue>device-setting</allowedValue>
+				<allowedValue>Mixed</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>ColorType</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>Color</defaultValue>
+			<allowedValueList>
+				<allowedValue>device-setting</allowedValue>
+				<allowedValue>Color</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>BitDepth</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>8</defaultValue>
+			<allowedValueList>
+				<allowedValue>device-setting</allowedValue>
+				<allowedValue>8</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>ColorSpace</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>sRGB</defaultValue>
+			<allowedValueList>
+				<allowedValue>device-setting</allowedValue>
+				<allowedValue>sRGB</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>UseFeeder</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>0</defaultValue>
+			<allowedValueList>
+				<allowedValue>device-setting</allowedValue>
+				<allowedValue>0</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>BaseName</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>pull-relative</defaultValue>
+		</stateVariable>
+		<stateVariable>
+			<name>AppendSideNumber</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<defaultValue>0</defaultValue>
+			<allowedValueList>
+				<allowedValue>device-setting</allowedValue>
+				<allowedValue>0</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+		<stateVariable>
+			<name>SideCount</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+			<defaultValue>0</defaultValue>
+		</stateVariable>
+		<stateVariable>
+			<name>SideNumber</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>i4</dataType>
+			<defaultValue>1</defaultValue>
+		</stateVariable>
+		<stateVariable>
+			<name>Destination</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>Timeout</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>ErrorTimeout</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>Resolution</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>ScanLength</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>i4</dataType>
+			<defaultValue>0</defaultValue>
+		</stateVariable>
+		<stateVariable>
+			<name>DeviceID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>HeightLimit</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>WidthLimit</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>XValueLimit</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>YValueLimit</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>i4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>RegistrationID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>JobID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+		<stateVariable>
+			<name>DestinationID</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+	</serviceStateTable>
+	<actionList>
+		<action>
+			<name>StartScan</name>
+			<argumentList>
+				<argument>
+					<name>RegistrationIDIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>RegistrationID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UseFeederIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>UseFeeder</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>SideCountIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>SideCount</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>JobNameIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>JobName</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ResolutionIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>Resolution</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageXOffsetIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>XValueLimit </relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageYOffsetIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>YValueLimit </relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageWidthIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>WidthLimit</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageHeightIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>HeightLimit</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageFormatIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>ImageFormat</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CompressionFactorIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>CompressionFactor </relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageTypeIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>ImageType</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ColorTypeIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>ColorType</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>BitDepthIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>BitDepth</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ColorSpaceIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>ColorSpace</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>BaseNameIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>BaseName</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>AppendSideNumberIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>AppendSideNumber </relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TimeoutIn</name>
+					<direction>in</direction>
+					<relatedStateVariable>Timeout</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ActualTimeoutOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>Timeout</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>JobIDOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>JobID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ActualWidthOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>WidthLimit</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ActualHeightOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>HeightLimit</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+		<action>
+			<name>GetConfiguration</name>
+			<argumentList>
+				<argument>
+					<name>JobNameOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>JobName</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ResolutionOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>Resolution</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageXOffsetOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>XValueLimit</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageYOffsetOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>YValueLimit</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageWidthOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>WidthLimit</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageHeightOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>HeightLimit</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageFormatOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>ImageFormat</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>CompressionFactorOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>CompressionFactor </relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ImageTypeOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>ImageType</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ColorTypeOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>ColorType</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>BitDepthOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>BitDepth</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ColorSpaceOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>ColorSpace</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>BaseNameOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>BaseName</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>AppendSideNumberOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>AppendSideNumber </relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TimeoutOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>Timeout</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+		<action>
+			<name>GetSideInformation</name>
+			<argumentList>
+				<argument>
+					<name>SideNumberOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>SideNumber</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>SideCountOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>SideCount</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>ScanLengthOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>ScanLength</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+		<action>
+			<name>GetState</name>
+			<argumentList>
+				<argument>
+					<name>StateOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>State</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StateReasonOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateReason</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>FailureCodeOut</name>
+					<direction>out</direction>
+					<relatedStateVariable>FailureCode</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+	</actionList>
+</scpd>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Data_Files/xmldatafiles/service/ScheduledRecording1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,481 @@
+<!--============================================================
+TITLE: UPnP AV Scheduled Recording Service (SRS) Template
+
+Purpose:
+To identify the required/optional actions and state variables
+and the required allowed values defined by this service type.
+
+Note:
+This file uses tabs (not spaces) for block indentation.
+Any updates to this file should maintain this convention.
+This includes disabling any automatic tab-to-space conversion
+feature provided by your editor. 
+================================================================-->
+<scpd>
+	<serviceStateTable>
+		<stateVariable>
+			<name>SortCapabilities</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>SortLevelCapability</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>StateUpdateID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>LastChange</name>
+			<sendEventsAttribute>yes</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_PropertyList</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_DataTypeID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+			<allowedValueList>
+				<allowedValue>A_ARG_TYPE_RecordSchedule</allowedValue>
+				<allowedValue>A_ARG_TYPE_RecordTask</allowedValue>
+				<allowedValue>A_ARG_TYPE_RecordScheduleParts</allowedValue>
+			</allowedValueList>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_ObjectID</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<Optional/>
+			<name>A_ARG_TYPE_ObjectIDList</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_PropertyInfo</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_Index</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_Count</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>ui4</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_SortCriteria</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_RecordSchedule</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_RecordTask</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+
+		<stateVariable>
+			<name>A_ARG_TYPE_RecordScheduleParts</name>
+			<sendEventsAttribute>no</sendEventsAttribute>
+			<dataType>string</dataType>
+		</stateVariable>
+	</serviceStateTable>
+	
+	<actionList>
+		<action>
+			<name>GetSortCapabilities</name>
+			<argumentList>
+				<argument>
+					<name>SortCaps</name>
+					<direction>out</direction>
+					<relatedStateVariable>SortCapabilities</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>SortLevelCap</name>
+					<direction>out</direction>
+					<relatedStateVariable>SortLevelCapability</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetPropertyList</name>
+			<argumentList>
+				<argument>
+					<name>DataTypeID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_DataTypeID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PropertyList</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_PropertyList</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetAllowedValues</name>
+			<argumentList>
+				<argument>
+					<name>DataTypeID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_DataTypeID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Filter</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_PropertyList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>PropertyInfo</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_PropertyInfo</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetStateUpdateID</name>
+			<argumentList>
+				<argument>
+					<name>Id</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateUpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>BrowseRecordSchedules</name>
+			<argumentList>
+				<argument>
+					<name>Filter</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_PropertyList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StartingIndex</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RequestedCount</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>SortCriteria</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Result</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_RecordSchedule</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NumberReturned</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TotalMatches</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateUpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>BrowseRecordTasks</name>
+			<argumentList>
+				<argument>
+					<name>RecordScheduleID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Filter</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_PropertyList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>StartingIndex</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RequestedCount</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>SortCriteria</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Result</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_RecordTask</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>NumberReturned</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>TotalMatches</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateUpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>CreateRecordSchedule</name>
+			<argumentList>
+				<argument>
+					<name>Elements</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_RecordScheduleParts</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RecordScheduleID</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Result</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_RecordSchedule</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateUpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>DeleteRecordSchedule</name>
+			<argumentList>
+				<argument>
+					<name>RecordScheduleID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetRecordSchedule</name>
+			<argumentList>
+				<argument>
+					<name>RecordScheduleID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Filter</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_PropertyList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Result</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_RecordSchedule</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateUpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>EnableRecordSchedule</name>
+			<argumentList>
+				<argument>
+					<name>RecordScheduleID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>DisableRecordSchedule</name>
+			<argumentList>
+				<argument>
+					<name>RecordScheduleID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>DeleteRecordTask</name>
+			<argumentList>
+				<argument>
+					<name>RecordTaskID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>GetRecordTask</name>
+			<argumentList>
+				<argument>
+					<name>RecordTaskID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Filter</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_PropertyList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>Result</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_RecordTask</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateUpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>EnableRecordTask</name>
+			<argumentList>
+				<argument>
+					<name>RecordTaskID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>DisableRecordTask</name>
+			<argumentList>
+				<argument>
+					<name>RecordTaskID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<name>ResetRecordTask</name>
+			<Optional/>
+			<argumentList>
+				<argument>
+					<name>RecordTaskID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetRecordScheduleConflicts</name>
+			<argumentList>
+				<argument>
+					<name>RecordScheduleID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RecordScheduleConflictIDList</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectIDList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateUpdateID</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+
+		<action>
+			<Optional/>
+			<name>GetRecordTaskConflicts</name>
+			<argumentList>
+				<argument>
+					<name>RecordTaskID</name>
+					<direction>in</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>RecordTaskConflictIDList</name>
+					<direction>out</direction>
+					<relatedStateVariable>A_ARG_TYPE_ObjectIDList</relatedStateVariable>
+				</argument>
+				<argument>
+					<name>UpdateID</name>
+					<direction>out</direction>
+					<relatedStateVariable>StateUpdateID
+					</relatedStateVariable>
+				</argument>
+			</argumentList>
+		</action>
+	</actionList>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/canceldiscovery.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,122 @@
+//canceldiscovery.ini
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0001
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[canceldiscovery]
+listofsequences=delay_0001,cpstatus_0001,discover_0001,Print_0001
+
+[canceldiscovery_server]
+listofsequences=publish_0001,delay_three_minutes
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0001]
+operationtype=publishdevice
+BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:1
+FriendlyName=TestDevice1
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP TESTDEVICE Ver1
+ModelName=IWS-UPNP-TESTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+//Must be less than 64 characters
+SerialNumber=UPNP0123456789012345678901234567890123456789012345678901234567
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a650
+UPC=123456789012
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_0001]
+othermachine=TRUE
+listofmxtimes=50,30
+listofservicetypes=ssdp:all,urn:schemas-upnp-org:device:TestDevice:1
+operationtype=discovery
+duplicateuri=TRUE
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+canceldiscover=TRUE
+refersection=cancel_0001
+
+[cancel_0001]
+servicetype=ssdp:all
+
+[Print_0001]
+othermachine=TRUE
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//NEGATIVE CASE -- Cancel discovery without discover
+//Do a Cancel discovery without doing a discovery
+//
+//
+//////////////////////////////////////////////////////////////////
+[upnp_cancel_discovery_0001]
+listofsequences=cpstatus_0001,canceldiscovery_0001
+
+[upnp_cancel_discovery_0001_server]
+listofsequences=publish_0001,delay_three_minutes
+
+[canceldiscovery_0001]
+operationtype=canceldiscovery
+servicetype=ssdp:all
+stopscheduler=FALSE
+
+//////////////////////////////////////////////////////////////////
+//NEGATIVE CASE -- Cancel discovery giving a junk uri
+//
+//
+//////////////////////////////////////////////////////////////////
+
+[canceldiscovery_1]
+listofsequences=delay_0001_1,cpstatus_0001_1,discover_0002,canceldiscovery_0002,Print_0001_1
+[canceldiscovery_1_server]
+listofsequences=delay_0001_1,cpstatus_0001_1,discover_0002,canceldiscovery_0002,Print_0001_1
+
+// Giving junk uri in the cancelDiscovery paramset.
+[cpstatus_0001_1]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0001_1]
+operationtype=starttimer
+waittime=10000000
+
+[discover_0002]
+othermachine=TRUE
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:device:TestDevice:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[canceldiscovery_0002]
+operationtype=canceldiscovery
+servicetype=urn:schemas-upnp-org:device:JunkDevice:2
+stopscheduler=FALSE
+
+[Print_0001_1]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/canceldiscovery_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,123 @@
+//canceldiscovery_rev.ini
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0001
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[canceldiscovery_rev]
+listofsequences=publish_0001_rev,delay_three_minutes_rev
+
+[canceldiscovery_rev_server]
+listofsequences=delay_0001_rev,cpstatus_0001_rev,discover_0001_rev,Print_0001_rev
+
+[delay_three_minutes_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001_rev]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0001_rev]
+operationtype=publishdevice
+BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:1
+FriendlyName=TestDevice1
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP TESTDEVICE Ver1
+ModelName=IWS-UPNP-TESTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+//Must be less than 64 characters
+SerialNumber=UPNP0123456789012345678901234567890123456789012345678901234567
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a650
+UPC=123456789012
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_0001_rev]
+othermachine=TRUE
+listofmxtimes=50,30
+listofservicetypes=ssdp:all,urn:schemas-upnp-org:device:TestDevice:1
+duplicateuri=TRUE
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+canceldiscover=TRUE
+refersection=cancel_0001_rev
+
+[cancel_0001_rev]
+servicetype=ssdp:all
+
+[Print_0001_rev]
+othermachine=TRUE
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//NEGATIVE CASE -- Cancel discovery without discover
+//Do a Cancel discovery without doing a discovery
+//
+//
+//////////////////////////////////////////////////////////////////
+[upnp_cancel_discovery_0001_rev]
+listofsequences=publish_0001_rev,delay_three_minutes_rev
+
+[upnp_cancel_discovery_0001_rev_server]
+listofsequences=cpstatus_0001_rev,canceldiscovery_0001_rev
+
+[canceldiscovery_0001_rev]
+operationtype=canceldiscovery
+servicetype=ssdp:all
+stopscheduler=FALSE
+
+//////////////////////////////////////////////////////////////////
+//NEGATIVE CASE -- Cancel discovery giving a junk uri
+//
+//
+//////////////////////////////////////////////////////////////////
+[canceldiscovery_1_rev]
+listofsequences=delay_0001_1_rev,cpstatus_0001_rev,discover_0002_rev,canceldiscovery_0001_rev,Print_0001_rev
+
+[canceldiscovery_1_server_rev]
+listofsequences=delay_0001_1_rev,cpstatus_0001_rev,discover_0002_rev,canceldiscovery_0001_rev,Print_0001_rev
+
+// Giving junk uri in the cancelDiscovery paramset.
+[cpstatus_0001_1_rev]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0001_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[discover_0002_rev]
+othermachine=TRUE
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:device:TestDevice:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[canceldiscovery_0001_rev]
+operationtype=canceldiscovery
+servicetype=urn:schemas-upnp-org:device:JunkDevice:2
+stopscheduler=FALSE
+
+[Print_0001_1_rev]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,739 @@
+//describe.ini
+
+//////////////////////////////////////////////////////////////////
+//Positive case
+//Publish service, and describe
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_001]
+listofsequences=publish_001_1,describe_001_1,Print_001_1
+
+[publish_001_1]
+operationtype=publishservice
+description=ServiceControlPoint
+servicetype=urn:schemas-upnp-org:service:bulb:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:51743/_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[describe_001_1]
+descriptionpath=http://127.0.0.1:80/
+//remove this later -->//http://10.192.196.237:80/ //http://127.0.0.1:80/
+
+operationtype=describe
+positivecase=TRUE
+
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+
+readini = TRUE
+
+[Print_001_1]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case
+//Publish service,describe,Publish device and describe
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_002]
+listofsequences=publish_002_1,describe_002_1,publish_002_2,describe_002_1,Print_002_1
+
+[publish_002_1]
+operationtype=publishservice
+description=ServiceControlPoint
+servicetype=urn:schemas-upnp-org:service:bulb:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:51743/_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[publish_002_2]
+operationtype=publishdevice
+BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:1
+FriendlyName=TestDevice1
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP TESTDEVICE Ver1
+ModelName=IWS-UPNP-TESTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+//Must be less than 64 characters
+SerialNumber=UPNP0123456789012345678901234567890123456789012345678901234567
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a628
+UPC=123456789012
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[describe_002_1]
+descriptionpath=http://127.0.0.1:80/
+operationtype=describe
+positivecase=TRUE
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+readini = TRUE
+
+[Print_002_1]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case
+//Publish service, Discover and describe
+//
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_003]
+listofsequences=publish_003_1,discover_003_1,describe_003_1,Print_003_1
+
+[publish_003_1]
+operationtype=publishservice
+description=ServiceControlPoint
+servicetype=urn:schemas-upnp-org:service:bulb:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:51743/_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[discover_003_1]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+//urn:schemas-upnp-org:device:BinaryLight:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+[describe_003_1]
+operationtype=describe
+positivecase=TRUE
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+readini = FALSE
+
+[Print_003_1]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case
+//Publish service, Discover,describe, describeservice
+/////////////////////////////////////////////////////////////////
+[UPnP_DescribeService_004]
+listofsequences=publish_004_1,discover_004_1,describe_004_1,describeservice_004_1,Print_004_1
+
+[publish_004_1]
+operationtype=publishservice
+description=ServiceControlPoint
+servicetype=urn:schemas-upnp-org:service:bulb:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:51743/_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[discover_004_1]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+//urn:schemas-upnp-org:device:BinaryLight:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+[describe_004_1]
+operationtype=describe
+positivecase=TRUE
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+readini = FALSE
+
+[describeservice_004_1]
+operationtype=describeservice
+
+[Print_004_1]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+[multiplemachinemode]
+inifilepath=z:\upnp\testupnp\client\testdata\ini_files\describe.ini
+multimachinemode=TRUE
+
+////////////////////////////////////////////////////////////////////
+//Needs to work from here
+//MALLIK--Begin
+//z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+//z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+//z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+//z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+//z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+//MALLIK--End
+////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//--------------UPNP_VENDOR_SERVICE_DESCRIPTION_0031--------------------------//
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -1 UPNP_VENDOR_SERVICE_DESCRIPTION_0031
+//PUBLISH A SERVICE IN ROOT DEVICE
+//DISCOVER THE SAME 
+//AND DO DESCRIBE
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_Vendor_Root_Service]
+listofsequences=publish_vendor_root_service,discover_vendor_root_service,describe_vendor_root_service,Print_vendor_root_service
+
+[publish_vendor_root_service]
+operationtype=publishservice
+description=ServiceControlPoint
+servicetype=urn:symbian.com:service:TestVendorService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[discover_vendor_root_service]
+listofmxtimes=30
+listofservicetypes=urn:symbian.com:service:TestVendorService:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+
+[describe_vendor_root_service]
+operationtype=describeservice
+positivecase=TRUE
+
+[Print_vendor_root_service]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 2-- UPNP_VENDOR_SERVICE_DESCRIPTION_0031
+//PUBLISH MANY SERVICES IN ROOT DEVICE, 
+//DISCOVER ALL PUBLISHED SERVICES
+//AND DO DESCRIBE FOR THE SAME.
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_vendor_Root_MltplServices]
+listofsequences=publish_vendor_root_mltplservices_1,publish_vendor_root_mltplservices_2,publish_vendor_root_mltplservices_3,publish_vendor_root_mltplservices_4,publish_vendor_root_mltplservices_5,discover_vendor_root_mltplservices,describe_vendor_root_mltplservices,Print_vendor_root_mltplservices
+
+//Publish vendor service 1 in root
+[publish_vendor_root_mltplservices_1]
+operationtype=publishservice
+description=ServiceControlPoint1
+servicetype=urn:symbian.com:service:TestVendorService1:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish vendor service 2 in root
+[publish_vendor_root_mltplservices_2]
+operationtype=publishservice
+description=ServiceControlPoint2
+servicetype=urn:symbian.com:service:TestVendorService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish vendor service 3 in root
+[publish_vendor_root_mltplservices_3]
+operationtype=publishservice
+description=ServiceControlPoint3
+servicetype=urn:symbian.com:service:TestVendorService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish vendor service 4 in root
+[publish_vendor_root_mltplservices_4]
+operationtype=publishservice
+description=ServiceControlPoint4
+servicetype=urn:symbian.com:service:TestVendorService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish vendor service 5 in root
+[publish_vendor_root_mltplservices_5]
+operationtype=publishservice
+description=ServiceControlPoint5
+servicetype=urn:symbian.com:service:TestVendorService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Discover all vendor services published
+[discover_vendor_root_mltplservices]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:symbian.com:service:TestVendorService1:1,urn:symbian.com:service:TestVendorService2:1,urn:symbian.com:service:TestVendorService3:1,urn:symbian.com:service:TestVendorService4:1,urn:symbian.com:service:TestVendorService5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+
+//describe all services discovered
+[describe_vendor_root_mltplservices]
+operationtype=describeservice
+positivecase=TRUE
+
+//print the results
+[Print_vendor_root_mltplservices]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-3 UPNP_VENDOR_SERVICE_DESCRIPTION_0031
+//PUBLISHING A 5 EMBEDDED DEVICES "IN LEVEL - 1"
+//AND PUBLISHING A SERVICE IN IN "LAST EMBEDDED DEVICE of LEVEL - 1 "
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_embedded_device_vendor_service_level1_description]
+listofsequences=publish_embd_vendor_dev_1,publish_embd_vendor_dev_2,publish_embd_vendor_dev_3,publish_embd_vendor_dev_4,publish_embd_vendor_dev_5,publish_embd_vendor_srvs_desc_5,discover_embd_vendor_srvs_desc_1,describe_embd_vendor_srvs_desc_1,Print_embd_vendor_srvs_desc_1
+
+[publish_embd_vendor_dev_1]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-1
+UPC=123456789012
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_embd_vendor_dev_2]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-2
+UPC=123456789034
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_embd_vendor_dev_3]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-3
+UPC=123456789045
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_embd_vendor_dev_4]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-4
+UPC=123456789045
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_embd_vendor_dev_5]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-5
+UPC=123456789045
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+//Publishing  e vendor service in level-5 embedded device
+[publish_embd_vendor_srvs_desc_5]
+operationtype=publishservice
+description=ServiceControlPoint5
+servicetype=urn:symbian.com:service:TestVendorService5:1
+usn=uuid:25a0be80-8775-4988-b628-Child-5
+cachecontrol=1810
+positivecase=TRUE
+
+[discover_embd_vendor_srvs_desc_1]
+listofmxtimes=30
+listofservicetypes=urn:symbian.com:service:TestVendorService5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_embd_vendor_srvs_desc_1]
+descriptionpath=http://127.0.0.1:80/
+operationtype=describe
+positivecase=TRUE
+readini = TRUE
+
+[Print_embd_vendor_srvs_desc_1]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-4 UPNP_VENDOR_SERVICE_DESCRIPTION_0031
+//PUBLISHING A EMBEDDED DEVICES IN 5 LEVELS
+//PUBLSHING A VENDOR SERVICE IN "EMBEDDED LEVEL 5 DEVICE"
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_embedded_devices_5levels_vendor_service_description]
+listofsequences=publish_vendor_embed_level_1,publish_vendor_embed_level_2,publish_vendor_embed_level_3,publish_vendor_embed_level_4,publish_vendor_embed_level_5,publish_vendor_service_level_5,discover_vendor_service_level_5,describe_vendor_service_level_5,Print_vendor_service_level_5
+
+[publish_vendor_embed_level_1]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_embed_level_2]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_embed_level_3]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_embed_level_4]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_embed_level_5]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+UPC=123456789045
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_service_level_5]
+operationtype=publishservice
+description=ServiceControlPoint5
+servicetype=urn:symbian.com:service:TestVendorServiceInLevel5:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+cachecontrol=1810
+positivecase=TRUE
+
+[discover_vendor_service_level_5]
+listofmxtimes=30
+listofservicetypes=urn:symbian.com:service:TestVendorServiceInLevel5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_service_level_5]
+descriptionpath=http://127.0.0.1:80/
+operationtype=describe
+positivecase=TRUE
+readini = TRUE
+
+[Print_vendor_service_level_5]
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-5 UPNP_VENDOR_SERVICE_DESCRIPTION_0031
+//PUBLISHING A EMBEDDED DEVICES IN 3 LEVELS
+//PUBLSHING A VENDOR SERVICE IN  Each level 
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_embd_devices_3levels_multiple_vendor_service_description]
+listofsequences=publish_embd_vend_dev_level_1,publish_embd_vend_dev_level_2,publish_embd_vend_dev_level_3,publish_vend_srvs_level1_1,publish_vend_srvs_level1_2,publish_vend_srvs_level2,publish_vend_srvs_level3,discover_vend_embed_services,describe_vend_embed_services,Print_vend_embed_services
+
+[publish_embd_vend_dev_level_1]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+//First vendor service in embedded device level-1
+[publish_vend_srvs_level1_1]
+operationtype=publishservice
+description=ServiceControlPoint1_1
+servicetype=urn:symbian.com:service:TestVendorService1InLevel1:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Second vendor service in embedded device level-1
+[publish_vend_srvs_level1_2]
+operationtype=publishservice
+description=ServiceControlPoint1_2
+servicetype=urn:symbian.com:service:TestVendorService2InLevel1:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+cachecontrol=1810
+positivecase=TRUE
+
+//First embedded device in level - 2
+[publish_embd_vend_dev_level_2]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+//First vendor service in level2 embedded device
+[publish_vend_srvs_level2]
+operationtype=publishservice
+description=ServiceControlPoint2_1
+servicetype=urn:symbian.com:service:TestVendorService1InLevel2:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+cachecontrol=1810
+positivecase=TRUE
+
+//First embedded device in level - 3
+[publish_embd_vend_dev_level_3]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+schedulerstart=TRUE
+Description_Path=
+positivecase=TRUE
+cachecontrol=1810
+
+//First vendor service in level-3 embedded device
+[publish_vend_srvs_level3]
+operationtype=publishservice
+description=ServiceControlPoint3_1
+servicetype=urn:symbian.com:service:TestVendorService1InLevel3:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+cachecontrol=1810
+positivecase=TRUE
+
+[discover_vend_embed_services]
+listofmxtimes=30,50,40,70
+listofservicetypes=urn:symbian.com:service:TestVendorService1InLevel1:1,urn:symbian.com:service:TestVendorService2InLevel1:1,urn:symbian.com:service:TestVendorService1InLevel2:1,urn:symbian.com:service:TestVendorService1InLevel3:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vend_embed_services]
+descriptionpath=http://127.0.0.1:80/
+operationtype=describe
+positivecase=TRUE
+readini = TRUE
+
+[Print_vend_embed_services]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0029.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,690 @@
+//describe_0029.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////--------------UPNP_VENDOR_DEVICE_DESCRIPTION_0029--------------------------////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[multiplemachinemode]
+inifilepath=z:\upnp\testupnp\client\testdata\ini_files\describe_0029.ini
+multimachinemode=TRUE
+
+///////////////////////////////////////////////////////////////////////////////
+//////CONTROL POINT ON REMOTE MACHINE  AND SERVICE POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0001
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0001]
+listofsequences=publish_vendor_device_0001_1,delay_1Min_1
+
+[upnp_vendor_device_description_0001_server]
+listofsequences=delay_0001,cpstatus_0001_1,discover_vendor_0001_1,describe_vendor_0001_1,Print_vendor_0001_1
+
+[cpstatus_0001_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_1Min_1]
+operationtype=starttimer
+waittime=100000000
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0001_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0001_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0001_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0002
+//Publishing a embedded device level-2
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0002]
+listofsequences=publish_vendor_device_0002_1,publish_vendor_device_0002_2,delay_1Min_2
+
+[upnp_vendor_device_description_0002_server]
+listofsequences=delay_0002,cpstatus_0002_1,discover_vendor_0002_1,describe_vendor_0002_1,Print_vendor_0002_1
+
+[delay_1Min_2]
+operationtype=starttimer
+waittime=100000000
+
+[cpstatus_0002_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0002_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0002_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0002_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0002_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0002_1]
+othermachine=TRUE
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0003]
+listofsequences=publish_vendor_device_0003_1,publish_vendor_device_0003_2,publish_vendor_device_0003_3,delay_1Min_3
+
+[upnp_vendor_device_description_0003_server]
+listofsequences=delay_0003,cpstatus_0003_1,discover_vendor_0003_1,describe_vendor_0003_1,Print_vendor_0003_1
+
+[cpstatus_0003_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0003]
+operationtype=starttimer
+waittime=10000000
+
+[delay_1Min_3]
+operationtype=starttimer
+waittime=100000000
+
+[publish_vendor_device_0003_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0003_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0003_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0003_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0003_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0003_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0004
+//Publishing a embedded device level-4
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0004]
+listofsequences=publish_vendor_device_0004_1,publish_vendor_device_0004_2,publish_vendor_device_0004_3,publish_vendor_device_0004_4,delay_1Min_4
+
+[upnp_vendor_device_description_0004_server]
+listofsequences=delay_0004,cpstatus_0004_1,discover_vendor_0004_1,describe_vendor_0004_1,Print_vendor_0004_1
+
+[cpstatus_0004_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0004]
+operationtype=starttimer
+waittime=10000000
+
+[delay_1Min_4]
+operationtype=starttimer
+waittime=100000000
+
+[publish_vendor_device_0004_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0004_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0004_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0004_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0004_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0004_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0004_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0005
+//Publishing a embedded device level-5
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0005]
+listofsequences=publish_vendor_device_0005_1,publish_vendor_device_0005_2,publish_vendor_device_0005_3,publish_vendor_device_0005_4,publish_vendor_device_0005_5,delay_1Min_5
+
+[upnp_vendor_device_description_0005_server]
+listofsequences=delay_0005,cpstatus_0005_1,discover_vendor_0005_1,describe_vendor_0005_1,Print_vendor_0005_1
+
+[cpstatus_0005_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_1Min_5]
+operationtype=starttimer
+waittime=100000000
+
+[delay_0005]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0005_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0005_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0005_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0005_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0005_5]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0005_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0005_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0005_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0006
+//PUBLISHING A 5 EMBEDDED DEVICE IN LEVEL - 1
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0006]
+listofsequences=publish_vendor_device_0006_1,publish_vendor_device_0006_2,publish_vendor_device_0006_3,publish_vendor_device_0006_4,publish_vendor_device_0006_5,delay_1Min_6
+
+[upnp_vendor_device_description_0006_server]
+listofsequences=delay_0006,cpstatus_0006_1,discover_vendor_0006_1,describe_vendor_0006_1,Print_vendor_0006_1
+
+[cpstatus_0006_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0006]
+operationtype=starttimer
+waittime=10000000
+
+[delay_1Min_6]
+operationtype=starttimer
+waittime=100000000
+
+[publish_vendor_device_0006_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_device_0006_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_device_0006_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_device_0006_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-4
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_vendor_device_0006_5]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-5
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0006_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-Child-5
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0006_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0006_1]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0029_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,676 @@
+//describe_0029_rev.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////--------------UPNP_VENDOR_DEVICE_DESCRIPTION_0029--------------------------////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+//////SERVICE POINT ON REMOTE MACHINE  AND CONTROL POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0001
+//PUBLISHING A EMBEDDED DEVICE LEVEL-1
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0001_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_1_rev,discover_vendor_0001_1_rev,describe_vendor_0001_1_rev,Print_vendor_0001_1_rev
+
+[upnp_vendor_device_description_0001_rev_server]
+listofsequences=publish_vendor_device_0001_1_rev,delay_3Min_1
+
+[delay_3Min_1]
+operationtype=starttimer
+waittime=200000000
+
+[cpstatus_0001_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publishing one device
+[publish_vendor_device_0001_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0001_1_rev]
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0001_1_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0001_1_rev]
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0002
+//Publishing a embedded device level-2
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0002_rev]
+listofsequences=delay_0002_rev,cpstatus_0002_1_rev,discover_vendor_0002_1_rev,describe_vendor_0002_1_rev,Print_vendor_0002_1_rev
+
+[upnp_vendor_device_description_0002_rev_server]
+listofsequences=publish_vendor_device_0002_1_rev,publish_vendor_device_0002_2_rev,delay_3Min_2
+
+[delay_3Min_2]
+operationtype=starttimer
+waittime=200000000
+
+[cpstatus_0002_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002_rev]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0002_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0002_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0002_1_rev]
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0002_1_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0002_1_rev]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0003_rev]
+listofsequences=delay_0003_rev,cpstatus_0003_1_rev,discover_vendor_0003_1_rev,describe_vendor_0003_1_rev,Print_vendor_0003_1_rev
+
+[upnp_vendor_device_description_0003_rev_server]
+listofsequences=publish_vendor_device_0003_1_rev,publish_vendor_device_0003_2_rev,publish_vendor_device_0003_3_rev,delay_3Min_3
+
+[cpstatus_0003_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0003_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_3]
+operationtype=starttimer
+waittime=200000000
+
+[publish_vendor_device_0003_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0003_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0003_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0003_1_rev]
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0003_1_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0003_1_rev]
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0004
+//Publishing a embedded device level-4
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0004_rev]
+listofsequences=delay_0004_rev,cpstatus_0004_1_rev,discover_vendor_0004_1_rev,describe_vendor_0004_1_rev,Print_vendor_0004_1_rev
+
+[upnp_vendor_device_description_0004_rev_server]
+listofsequences=publish_vendor_device_0004_1_rev,publish_vendor_device_0004_2_rev,publish_vendor_device_0004_3_rev,publish_vendor_device_0004_4_rev,delay_3Min_4
+
+[cpstatus_0004_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0004_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_4]
+operationtype=starttimer
+waittime=200000000
+
+[publish_vendor_device_0004_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0004_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0004_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0004_4_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0004_1_rev]
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0004_1_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0004_1_rev]
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0005
+//Publishing a embedded device level-5
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0005_rev]
+listofsequences=delay_0005_rev,cpstatus_0005_1_rev,discover_vendor_0005_1_rev,describe_vendor_0005_1_rev,Print_vendor_0005_1_rev
+
+[upnp_vendor_device_description_0005_rev_server]
+listofsequences=publish_vendor_device_0005_1_rev,publish_vendor_device_0005_2_rev,publish_vendor_device_0005_3_rev,publish_vendor_device_0005_4_rev,publish_vendor_device_0005_5_rev,delay_3Min_5
+
+[cpstatus_0005_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0005_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_5]
+operationtype=starttimer
+waittime=200000000
+
+[publish_vendor_device_0005_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0005_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0005_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0005_4_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0005_5_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0005_1_rev]
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0005_1_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0005_1_rev]
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0006
+//PUBLISHING A 5 EMBEDDED DEVICE IN LEVEL - 1
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_vendor_device_description_0006_rev]
+listofsequences=delay_0006_rev,cpstatus_0006_1_rev,discover_vendor_0006_1_rev,describe_vendor_0006_1_rev,Print_vendor_0006_1_rev
+
+[upnp_vendor_device_description_0006_rev_server]
+listofsequences=publish_vendor_device_0006_1_rev,publish_vendor_device_0006_2_rev,publish_vendor_device_0006_3_rev,publish_vendor_device_0006_4_rev,publish_vendor_device_0006_5_rev,delay_3Min_6
+
+[cpstatus_0006_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0006_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_6]
+operationtype=starttimer
+waittime=200000000
+
+//First embedded device -- 1 of 5 in Level 1
+[publish_vendor_device_0006_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+
+//Second embedded device -- 2 of 5  in Level 1
+[publish_vendor_device_0006_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+
+//Third embedded device -- 3 of 5 in Level 1
+[publish_vendor_device_0006_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+//Fourth embedded device -- 4 of 5 in Level 1
+[publish_vendor_device_0006_4_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-4
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+//Fifth embedded device -- 5 of 5 in Level 1
+[publish_vendor_device_0006_5_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-5
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+//Discover the 5th Embedded device
+[discover_vendor_0006_1_rev]
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-Child-5
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//Describe the 5th Embedded device
+[describe_vendor_0006_1_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0006_1_rev]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0030.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,671 @@
+//describe_0030.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////--------------UPNP_STANDARD_SERVICE_DESCRIPTION_0030--------------------------////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//////SERVICE POINT ON REMOTE MACHINE  AND CONTROL POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+[multiplemachinemode]
+inifilepath=z:\upnp\testupnp\client\testdata\ini_files\describe_0030.ini
+multimachinemode=TRUE
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -1 UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISH A SERVICE IN ROOT DEVICE
+//DISCOVER THE SAME 
+//AND DO DESCRIBE
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_Standard_Root_Service]
+listofsequences=delay_DesStdRoot,cpstatus_DesStdRoot_1,discover_standard_root_service,describe_std_root_1,describe_standard_root_service,Print_standard_root_service
+
+[UPnP_Describe_Standard_Root_Service_server]
+listofsequences=publish_standard_root_service,delay_3Min_1
+
+[delay_3Min_1]
+operationtype=starttimer
+waittime=200000000
+
+[cpstatus_DesStdRoot_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_DesStdRoot]
+operationtype=starttimer
+waittime=10000000
+
+[publish_standard_root_service]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_standard_root_service]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+
+[describe_std_root_1]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+
+[describe_standard_root_service]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_standard_root_service]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 2-- UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISH MANY SERVICES IN ROOT DEVICE, 
+//DISCOVER ALL PUBLISHED SERVICES
+//AND DO DESCRIBE FOR THE SAME.
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_Std_Root_MltplServices]
+listofsequences=delay_DesStdRootMltServs,cpstatus_DesStdRootMltServs_2,discover_std_root_mltplservices,describe_std_root_2,describe_std_root_mltplservices,Print_std_root_mltplservices
+
+[UPnP_Describe_Std_Root_MltplServices_server]
+listofsequences=publish_std_root_mltplservices_1,publish_std_root_mltplservices_2,publish_std_root_mltplservices_3,publish_std_root_mltplservices_4,publish_std_root_mltplservices_5,delay_3Min_2
+
+[cpstatus_DesStdRootMltServs_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_DesStdRootMltServs]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_2]
+operationtype=starttimer
+waittime=200000000
+
+[publish_std_root_mltplservices_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_std_root_mltplservices_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_std_root_mltplservices_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_std_root_mltplservices_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_std_root_mltplservices_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_std_root_mltplservices]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+
+[describe_std_root_2]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+expecteddescriptions=3
+cancelall=TRUE
+
+[describe_std_root_mltplservices]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_std_root_mltplservices]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-3 UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISHING A 5 EMBEDDED DEVICES "IN LEVEL - 1"
+//AND PUBLISHING A SERVICE IN IN "LAST EMBEDDED DEVICE of LEVEL - 1 "
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+
+[upnp_embedded_device_std_service_level1_description]
+listofsequences=delay_DesStdlevel1Servs,cpstatus_DesStdlevel1Servs_3,discover_embd_std_srvs_desc_1,describe_std_root_3,describe_embd_std_srvs_desc_1,Print_embd_std_srvs_desc_1
+
+[upnp_embedded_device_std_service_level1_description_server]
+listofsequences=publish_embd_std_dev_1,publish_embd_std_dev_2,publish_embd_std_dev_3,publish_embd_std_dev_4,publish_embd_std_dev_5,publish_embd_std_srvs_desc_5,delay_3Min_3
+
+[cpstatus_DesStdlevel1Servs_3]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_DesStdlevel1Servs]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_3]
+operationtype=starttimer
+waittime=200000000
+
+//First embedded device -- 1 of 5 in Level 1
+[publish_embd_std_dev_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+
+//Second embedded device -- 2 of 5  in Level 1
+[publish_embd_std_dev_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+
+
+//Third embedded device -- 3 of 5 in Level 1
+[publish_embd_std_dev_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+//Fourth embedded device -- 4 of 5 in Level 1
+[publish_embd_std_dev_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+//Fifth embedded device -- 5 of 5 in Level 1
+[publish_embd_std_dev_5]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+UPC=123456789045
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+cachecontrol=1810
+
+//Service 1 in 5th embedded device
+[publish_embd_std_srvs_desc_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService1in5:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover the service
+[discover_embd_std_srvs_desc_1]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService1in5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_std_root_3]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+
+//Describe the Service discovered
+[describe_embd_std_srvs_desc_1]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_embd_std_srvs_desc_1]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-4 UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISHING A EMBEDDED DEVICES IN 5 LEVELS
+//PUBLSHING A SERVICE IN "EMBEDDED LEVEL 5 DEVICE"
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_embedded_devices_5levels_std_service_description]
+listofsequences=delay_DesStd5levelServs,cpstatus_DesStd5levelServs_4,discover_service_level_5,describe_std_root_4,describe_service_level_5,Print_service_level_5
+
+[upnp_embedded_devices_5levels_std_service_description_server]
+listofsequences=publish_embed_level_1,publish_embed_level_2,publish_embed_level_3,publish_embed_level_4,publish_embed_level_5,publish_service_level_5,delay_3Min_4
+
+[cpstatus_DesStd5levelServs_4]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_DesStd5levelServs]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_4]
+operationtype=starttimer
+waittime=200000000
+
+//First Embedded device in Level -1
+[publish_embed_level_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Embedded device in Level - 2
+[publish_embed_level_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Embedded device in Level - 3
+[publish_embed_level_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Embedded device in Level - 4
+[publish_embed_level_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Embedded device in Level - 5
+[publish_embed_level_5]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Service in embedded device level 5
+[publish_service_level_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestServiceInLevel5:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+//Discover the published service
+[discover_service_level_5]
+listofmxtimes=40
+listofservicetypes=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestServiceInLevel5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_std_root_4]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+
+//Describe the published service
+[describe_service_level_5]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_service_level_5]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-5 UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISHING A EMBEDDED DEVICES IN 3 LEVELS
+//PUBLSHING A SERVICE IN  Each level 
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_embd_devices_3levels_multiple_service_description]
+listofsequences=delay_Des3levelMltplServs,cpstatus_Des3levelMltplServs_5,discover_embedded_services,describe_std_root_5,describe_embedded_services,Print_embedded_services
+
+[upnp_embd_devices_3levels_multiple_service_description_server]
+listofsequences=publish_embd_dev_level_1,publish_embd_dev_level_2,publish_embd_dev_level_3,publish_srvs_level1_1,publish_srvs_level1_2,publish_srvs_level2_1,publish_srvs_level3_1,delay_3Min_5
+
+[cpstatus_Des3levelMltplServs_5]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_Des3levelMltplServs]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_5]
+operationtype=starttimer
+waittime=200000000
+
+//First Embedded device in Level -1
+[publish_embd_dev_level_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First service in embedded device level-1
+[publish_srvs_level1_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService1InLevel1:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Second service in embedded device level-1
+[publish_srvs_level1_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService2InLevel1:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First embedded device in level - 2
+[publish_embd_dev_level_2]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First service in level2 embedded device
+[publish_srvs_level2_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService1InLevel2:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First embedded device in level - 3
+[publish_embd_dev_level_3]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First service in level-3 embedded device
+[publish_srvs_level3_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService1InLevel3:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all published services
+[discover_embedded_services]
+listofmxtimes=30
+//,50,40,70
+listofservicetypes=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService1InLevel1:1
+//,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService2InLevel1:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService1InLevel2:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService1InLevel3:1,
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+
+[describe_std_root_5]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+
+//Describe all discovered services
+[describe_embedded_services]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_embedded_services]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0030_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,670 @@
+//describe_0030_rev.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////--------------UPNP_STANDARD_SERVICE_DESCRIPTION_0030--------------------------////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//////CONTROL POINT ON REMOTE MACHINE  AND  SERVICE POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+[multiplemachinemode]
+inifilepath=z:\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini
+multimachinemode=TRUE
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -1 UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISH A SERVICE IN ROOT DEVICE
+//DISCOVER THE SAME 
+//AND DO DESCRIBE
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_Standard_Root_Service_rev]
+listofsequences=publish_standard_root_service_rev,delay_3Min_1
+
+[UPnP_Describe_Standard_Root_Service_rev_server]
+listofsequences=delay_DesStdRoot_rev,cpstatus_DesStdRoot_rev_1,discover_standard_root_service_rev,describe_std_root_1_rev,describe_std_root_1_rev,describe_standard_root_service_rev,Print_standard_root_service_rev
+
+[cpstatus_DesStdRoot_rev_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_3Min_1]
+operationtype=starttimer
+waittime=200000000
+
+[delay_DesStdRoot_rev]
+operationtype=starttimer
+waittime=10000000
+
+[describe_std_root_1_rev]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+
+[publish_standard_root_service_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_standard_root_service_rev]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+
+[describe_standard_root_service_rev]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_standard_root_service_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 2-- UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISH MANY SERVICES IN ROOT DEVICE_rev, 
+//DISCOVER ALL PUBLISHED SERVICES
+//AND DO DESCRIBE FOR THE SAME.
+/////////////////////////////////////////////////////////////////
+[UPnP_Describe_Std_Root_MltplServices_rev]
+listofsequences=publish_std_root_mltplservices_1_rev,publish_std_root_mltplservices_2_rev,publish_std_root_mltplservices_3_rev,publish_std_root_mltplservices_4_rev,publish_std_root_mltplservices_5_rev,delay_3Min_2
+
+[UPnP_Describe_Std_Root_MltplServices_rev_server]
+listofsequences=delay_DesStdRootMltServs_rev,cpstatus_DesStdRootMltServs_rev_2,discover_std_root_mltplservices_rev,describe_std_root_2_rev,describe_std_root_mltplservices_rev,Print_std_root_mltplservices_rev
+
+[cpstatus_DesStdRootMltServs_rev_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[describe_std_root_2_rev]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+expecteddescriptions=3
+
+[delay_3Min_2]
+operationtype=starttimer
+waittime=200000000
+
+[delay_DesStdRootMltServs_rev]
+operationtype=starttimer
+waittime=10000000
+
+[publish_std_root_mltplservices_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_std_root_mltplservices_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_std_root_mltplservices_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_std_root_mltplservices_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_std_root_mltplservices_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+schedulerstart=TRUE
+stopscheduler=TRUE
+cachecontrol=1810
+positivecase=TRUE
+
+[discover_std_root_mltplservices_rev]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+
+[describe_std_root_mltplservices_rev]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_std_root_mltplservices_rev]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-3 UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISHING A 5 EMBEDDED DEVICES "IN LEVEL - 1"
+//AND PUBLISHING A SERVICE IN IN "LAST EMBEDDED DEVICE of LEVEL - 1 "
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+
+[upnp_embedded_device_std_service_level1_description_rev]
+listofsequences=publish_embd_std_dev_1_rev,publish_embd_std_dev_2_rev,publish_embd_std_dev_3_rev,publish_embd_std_dev_4_rev,publish_embd_std_dev_5_rev,publish_embd_std_srvs_desc_5_rev,delay_3Min_3
+
+[upnp_embedded_device_std_service_level1_description_rev_server]
+listofsequences=delay_DesStdlevel1Servs_rev,cpstatus_DesStdlevel1Servs_rev_3,discover_embd_std_srvs_desc_1_rev,describe_std_root_3_rev,describe_embd_std_srvs_desc_1_rev,Print_embd_std_srvs_desc_1_rev
+
+[cpstatus_DesStdlevel1Servs_rev_3]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[describe_std_root_3_rev]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+
+[delay_DesStdlevel1Servs_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_3]
+operationtype=starttimer
+waittime=200000000
+
+//First embedded device -- 1 of 5 in Level 1
+[publish_embd_std_dev_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+
+
+//Second embedded device -- 2 of 5  in Level 1
+[publish_embd_std_dev_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+
+
+//Third embedded device -- 3 of 5 in Level 1
+[publish_embd_std_dev_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+//Fourth embedded device -- 4 of 5 in Level 1
+[publish_embd_std_dev_4_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+//Fifth embedded device -- 5 of 5 in Level 1
+[publish_embd_std_dev_5_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+
+//Service 1 in 5th embedded device
+[publish_embd_std_srvs_desc_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService1in5:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover the service
+[discover_embd_std_srvs_desc_1_rev]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService1in5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//Describe the Service discovered
+[describe_embd_std_srvs_desc_1_rev]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_embd_std_srvs_desc_1_rev]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-4 UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISHING A EMBEDDED DEVICES IN 5 LEVELS
+//PUBLSHING A SERVICE IN "EMBEDDED LEVEL 5 DEVICE"
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_embedded_devices_5levels_std_service_description_rev]
+listofsequences=publish_embed_level_1_rev,publish_embed_level_2_rev,publish_embed_level_3_rev,publish_embed_level_4_rev,publish_embed_level_5_rev,publish_service_level_5_rev,delay_3Min_4
+
+[upnp_embedded_devices_5levels_std_service_description_rev_server]
+listofsequences=delay_DesStd5levelServs_rev,cpstatus_DesStd5levelServs_rev_4,discover_service_level_5_rev,describe_std_root_4_rev,describe_service_level_5_rev,Print_service_level_5_rev
+
+[cpstatus_DesStd5levelServs_rev_4]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[describe_std_root_4_rev]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+
+[delay_DesStd5levelServs_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_4]
+operationtype=starttimer
+waittime=200000000
+
+//First Embedded device in Level -1
+[publish_embed_level_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Embedded device in Level - 2
+[publish_embed_level_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Embedded device in Level - 3
+[publish_embed_level_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Embedded device in Level - 4
+[publish_embed_level_4_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Embedded device in Level - 5
+[publish_embed_level_5_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First Service in embedded device level 5
+[publish_service_level_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestServiceInLevel5:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+//Discover the published service
+[discover_service_level_5_rev]
+listofmxtimes=40
+listofservicetypes=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestServiceInLevel5:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//Describe the published service
+[describe_service_level_5_rev]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_service_level_5_rev]
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE-5 UPNP_STANDARD_SERVICE_DESCRIPTION_0030
+//PUBLISHING A EMBEDDED DEVICES IN 3 LEVELS
+//PUBLSHING A SERVICE IN  Each level 
+//DISCOVER THE SAME
+//DO DESCRIBE THE SAME
+//////////////////////////////////////////////////////////////////
+[upnp_embd_devices_3levels_multiple_service_description_rev]
+listofsequences=publish_embd_dev_level_1_rev,publish_embd_dev_level_2_rev,publish_embd_dev_level_3_rev,publish_srvs_level1_1_rev,publish_srvs_level1_2_rev,publish_srvs_level2_1_rev,publish_srvs_level3_1_rev,delay_3Min_5
+
+[upnp_embd_devices_3levels_multiple_service_description_rev_server]
+listofsequences=delay_Des3levelMltplServs_rev,cpstatus_Des3levelMltplServs_rev_5,discover_embedded_services_rev,describe_std_root_5_rev,describe_embedded_services_rev,Print_embedded_services_rev
+
+[cpstatus_Des3levelMltplServs_rev_5]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[describe_std_root_5_rev]
+operationtype=describe
+readini=FALSE
+positivecase=TRUE
+cancelall=TRUE
+
+[delay_Des3levelMltplServs_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_5]
+operationtype=starttimer
+waittime=200000000
+
+//First Embedded device in Level -1
+[publish_embd_dev_level_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First service in embedded device level-1
+[publish_srvs_level1_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService1InLevel1:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Second service in embedded device level-1
+[publish_srvs_level1_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService2InLevel1:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First embedded device in level - 2
+[publish_embd_dev_level_2_rev]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First service in level2 embedded device
+[publish_srvs_level2_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService1InLevel2:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First embedded device in level - 3
+[publish_embd_dev_level_3_rev]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//First service in level-3 embedded device
+[publish_srvs_level3_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService1InLevel3:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all published services
+[discover_embedded_services_rev]
+listofmxtimes=30
+//,50,40,70
+listofservicetypes=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService1InLevel1:1
+//,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService2InLevel1:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService1InLevel2:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService1InLevel3:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+waittime=50000000
+
+//Describe all discovered services
+[describe_embedded_services_rev]
+operationtype=describeservice
+positivecase=TRUE
+cancelallservicedescription=TRUE
+
+[Print_embedded_services_rev]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0060.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,382 @@
+//describe_0060.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////--------------UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0060-----------------////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//////CONTROL POINT ON REMOTE MACHINE  AND SERVICE POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0001
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//Devicetype <= 64 characters 
+//Input given here 65 characters 
+//Wrong URI for description. It should be http
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_1]
+listofsequences=publish_root_service,delay_1Min_1
+
+[upnp_validate_describe_requests_headers_0060_1_server]
+listofsequences=delay_0001,cpstatus_0001_1,discover_0001_1,describe_0001_1,Print_0001_1
+
+[cpstatus_0001_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_1Min_1]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+
+//ServiceType <= 64 characters
+//Input given 65 characters
+[publish_root_service]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService245678901234567890123456789012345678901234:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+
+[discover_0001_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//Wrong URI for description. It should be http
+[describe_0001_1]
+operationtype=describe
+readini=TRUE
+descriptionpath=htt://10.192.196.165:80/
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0001_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0002
+//Publishing a embedded device level-2
+//Discover the same
+//Do describe the same
+//Friendly name < 64characters
+// Input given here 64 characters
+//Wrong URI for description. It should start with http
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_2]
+listofsequences=publish_device_0002_1,delay_2Min_2
+
+[upnp_validate_describe_requests_headers_0060_2_server]
+listofsequences=delay_0002,cpstatus_0002_1,discover_0002_1,describe_0002_1,Print_0002_1
+
+[delay_2Min_2]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0002_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002]
+operationtype=starttimer
+waittime=10000000
+
+//Friendly name < 64characters
+// Input given here 64 characters
+[publish_device_0002_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice19012345678901234567890123456789012345678901234
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[discover_0002_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=upnp:rootdevice
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//Wrong URI for description. It should start with http
+[describe_0002_1]
+operationtype=describe
+readini=TRUE
+descriptionpath=://10.192.196.165:80/
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0002_1]
+othermachine=TRUE
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//Manufacturer < 64characters
+// Input given here 64 characters
+//instead of this schemas-upnp-org -- given schemasupnporg in uri
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_3]
+listofsequences=publish_device_0003_1,delay_2Min_3
+
+[upnp_validate_describe_requests_headers_0060_3_server]
+listofsequences=delay_0003,cpstatus_0003_1,discover_0003_1,describe_0003_1,Print_0003_1
+
+[cpstatus_0003_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0003]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_3]
+operationtype=starttimer
+waittime=120000000
+
+//Manufacturer < 64characters
+// Input given here 64 characters
+[publish_device_0003_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian890123456789012345678901234567890123456789012345678901234
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[discover_0003_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//Wrong scheme
+[describe_0003_1]
+operationtype=describe
+readini=TRUE
+descriptionpath=htttp://10.192.196.165:80/urn:schemasupnporg:service:AVTRANSPORTTestService245678901234567890123456789012345678901234:1
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0003_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0004
+//Publishing a embedded device level-4
+//Discover the same
+//Do describe the same
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//In put given here 128, 32 and 32 respectively for above fields
+//describe uri is given wrong
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_4]
+listofsequences=publish_device_0004_1,delay_2Min_4
+
+[upnp_validate_describe_requests_headers_0060_4_server]
+listofsequences=delay_0004,cpstatus_0004_1,discover_0004_1,describe_0004_1,Print_0004_1
+
+[cpstatus_0004_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0004]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_4]
+operationtype=starttimer
+waittime=120000000
+
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//In put given here 128, 32 and 32 respectively for above fields
+[publish_device_0004_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnPFIRSTDEVICEVer20123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
+ModelName=IWS-UPNP-FIRSTDEVICE-23456789012
+ModelNumber=IWS-UPNP-TESTDEVICE-223456789012
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+positivecase=FALSE
+cachecontrol=1810
+
+[discover_0004_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_0004_1]
+operationtype=describe
+readini=TRUE
+descriptionpath=http_://10.192.196.165:80/
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0004_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0005
+//Publishing a embedded device level-5
+//Discover the same
+//Do describe the same
+//ModelURL is optional --> so input is empty string
+//SerialNumber < 64 characters --> so input is given 64 characters
+//UPC is optional -if exist it should be 12 numeric --> so input is given 12 alpha numeric
+//Wrong description Uri is given
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_5]
+listofsequences=publish_device_0005_1,publish_device_0005_2,publish_device_0005_3,publish_device_0005_4,publish_device_0005_5,delay_3Min_5
+
+[upnp_validate_describe_requests_headers_0060_5_server]
+listofsequences=delay_0005,cpstatus_0005_1,discover_0005_1,describe_0005_1,Print_0005_1
+
+[cpstatus_0005_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_3Min_5]
+operationtype=starttimer
+waittime=200000000
+
+[delay_0005]
+operationtype=starttimer
+waittime=10000000
+
+//ModelURL is optional --> so input is empty string
+//SerialNumber < 64 characters --> so input is given 64 characters
+//UPC is optional -if exist it should be 12 numeric --> so input is given 12 alpha numeric
+[publish_device_0005_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP567890123456789012345678901234567890123456789012345678901234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=abcdefghi012
+positivecase=TRUE
+cachecontrol=1810
+positivecase=FALSE
+cachecontrol=1810
+
+[discover_0005_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_0005_1]
+operationtype=describe
+readini=TRUE
+descriptionpath=http123://10.192.196.165:80/
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0005_1]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/describe_0060_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,383 @@
+//describe_0060.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////--------------UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0060-----------------////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//////CONTROL POINT ON REMOTE MACHINE  AND SERVICE POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0001
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//Devicetype <= 64 characters 
+//Input given here 65 characters 
+//Wrong URI for description. It should be http
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_1_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_1_rev,discover_0001_1_rev,describe_0001_1_rev,Print_0001_1_rev
+
+[upnp_validate_describe_requests_headers_0060_1_rev_server]
+listofsequences=publish_root_service_rev,delay_1Min_1_rev
+
+[cpstatus_0001_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_1Min_1_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+//ServiceType <= 64 characters
+//Input given 64characters
+[publish_root_service_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService245678901234567890123456789012345678901234:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_0001_1_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//Wrong URI for description. It should be http
+[describe_0001_1_rev]
+operationtype=describe
+readini=TRUE
+descriptionpath=htt://10.192.196.165:80/
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0001_1_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0002
+//Publishing a embedded device level-2
+//Discover the same
+//Do describe the same
+//Friendly name < 64characters
+// Input given here 64 characters
+//Wrong URI for description. It should start with http
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_2_rev]
+listofsequences=delay_0002_rev,cpstatus_0002_1_rev,discover_0002_1_rev,describe_0002_1_rev,Print_0002_1_rev
+
+[upnp_validate_describe_requests_headers_0060_2_rev_server]
+listofsequences=publish_device_0002_1_rev,delay_2Min_2_rev
+
+[delay_2Min_2_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0002_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Friendly name < 64characters
+// Input given here 64 characters
+[publish_device_0002_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice19012345678901234567890123456789012345678901234
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[discover_0002_1_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=upnp:rootdevice
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//Wrong URI for description. It should start with http
+[describe_0002_1_rev]
+operationtype=describe
+readini=TRUE
+descriptionpath=://10.192.196.165:80/
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0002_1_rev]
+othermachine=TRUE
+operationtype=printresults
+
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//Manufacturer < 64characters
+// Input given here 64 characters
+//instead of this schemas-upnp-org -- given schemasupnporg in uri
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_3_rev]
+listofsequences=delay_0003_rev,cpstatus_0003_1_rev,discover_0003_1_rev,describe_0003_1_rev,Print_0003_1_rev
+
+[upnp_validate_describe_requests_headers_0060_3_rev_server]
+listofsequences=publish_device_0003_1_rev,delay_2Min_3_rev
+
+
+[cpstatus_0003_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0003_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_3_rev]
+operationtype=starttimer
+waittime=120000000
+
+//Manufacturer < 64characters
+// Input given here 64 characters
+[publish_device_0003_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian890123456789012345678901234567890123456789012345678901234
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[discover_0003_1_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+//wrong scheme
+[describe_0003_1_rev]
+operationtype=describe
+readini=TRUE
+descriptionpath=htttp://10.192.196.165:80/urn:schemasupnporg:service:AVTRANSPORTTestService245678901234567890123456789012345678901234:1
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+
+[Print_0003_1_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0004
+//Publishing a embedded device level-4
+//Discover the same
+//Do describe the same
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//In put given here 128, 32 and 32 respectively for above fields
+//describe uri is given wrong
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_4_rev]
+listofsequences=delay_0004_rev,cpstatus_0004_1_rev,discover_0004_1_rev,describe_0004_1_rev,Print_0004_1_rev
+
+[upnp_validate_describe_requests_headers_0060_4_rev_server]
+listofsequences=publish_device_0004_1_rev,delay_2Min_4_rev
+
+[cpstatus_0004_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0004_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_4_rev]
+operationtype=starttimer
+waittime=120000000
+
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//In put given here 128_rev, 32 and 32 respectively for above fields
+[publish_device_0004_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnPFIRSTDEVICEVer20123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
+ModelName=IWS-UPNP-FIRSTDEVICE-23456789012
+ModelNumber=IWS-UPNP-TESTDEVICE-223456789012
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+positivecase=FALSE
+cachecontrol=1810
+
+[discover_0004_1_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_0004_1_rev]
+operationtype=describe
+readini=TRUE
+descriptionpath=http_://10.192.196.165:80/
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0004_1_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0005
+//Publishing a embedded device level-5
+//Discover the same
+//Do describe the same
+//ModelURL is optional --> so input is empty string
+//SerialNumber < 64 characters --> so input is given 64 characters
+//UPC is optional -if exist it should be 12 numeric --> so input is given 12 alpha numeric
+//Wrong description Uri is given
+//////////////////////////////////////////////////////////////////
+[upnp_validate_describe_requests_headers_0060_5_rev]
+listofsequences=delay_0005_rev,cpstatus_0005_1_rev,discover_0005_1_rev,describe_0005_1_rev,Print_0005_1_rev
+
+[upnp_validate_describe_requests_headers_0060_5_rev_server]
+listofsequences=publish_device_0005_1_rev,delay_3Min_5_rev
+
+[cpstatus_0005_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_3Min_5_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_0005_rev]
+operationtype=starttimer
+waittime=10000000
+
+//ModelURL is optional --> so input is empty string
+//SerialNumber < 64 characters --> so input is given 64 characters
+//UPC is optional -if exist it should be 12 numeric --> so input is given 12 alpha numeric
+[publish_device_0005_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP567890123456789012345678901234567890123456789012345678901234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=abcdefghi012
+positivecase=TRUE
+cachecontrol=1810
+positivecase=FALSE
+cachecontrol=1810
+
+[discover_0005_1_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_0005_1_rev]
+operationtype=describe
+readini=TRUE
+descriptionpath=http123://10.192.196.165:80/
+expecteddescriptions=0
+positivecase=FALSE
+schedulerstart=FALSE
+
+[Print_0005_1_rev]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discover_low_ver.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,261 @@
+//discover_low_ver.ini
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -21 UPNP_DISCOVER_LOW_VER_SERVICES_0021
+//Publish 3 services in Different levels which includes a service with two different versions
+// discover for a lower version of service  should return both higher and lower version of service
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_discover_low_ver_0021]
+listofsequences=delay_0021_1,cpstatus_0021_1,discover_0021,Print_0021
+
+[UPnP_discover_low_ver_0021_server]
+listofsequences=publish_embedded_device_0021_1,publish_service_0021_1,publish_service_0021_2,publish_service_0021_3,delay_1Min_21
+
+[cpstatus_0021_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0021_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_1Min_21]
+operationtype=starttimer
+waittime=60000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0021_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Publish a service in a root device version 2 of avtransport
+[publish_service_0021_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:2
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1 of version 1 of avtransport
+[publish_service_0021_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0021_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0021]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+[Print_0021]
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////
+
+[UPnP_discover_low_ver_0022]
+listofsequences=delay_0022_1,cpstatus_0022_1,discover_0022,Print_0022
+
+[UPnP_discover_low_ver_0022_server]
+listofsequences=publish_embedded_device_0022_1,publish_service_0022_1,publish_service_0022_2,publish_service_0022_3,delay_1Min_22
+
+[cpstatus_0022_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0022_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_1Min_22]
+operationtype=starttimer
+waittime=60000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0022_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Publish a service in a root device version 2 of avtransport
+[publish_service_0022_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:2
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1 of version 1 of avtransport
+[publish_service_0022_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0022_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0022]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:2
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+[Print_0022]
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////
+
+[UPnP_discover_low_ver_0023]
+listofsequences=delay_0023_1,cpstatus_0023_1,discover_0023,Print_0023
+
+[UPnP_discover_low_ver_0023_server]
+listofsequences=publish_embedded_device_0023_1,publish_service_0023_1,publish_service_0023_2,publish_service_0023_3,delay_1Min_23
+
+[cpstatus_0023_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0023_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_1Min_23]
+operationtype=starttimer
+waittime=60000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0023_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Publish a service in a root device version 2 of avtransport
+[publish_service_0023_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:2
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1 of version 1 of avtransport
+[publish_service_0023_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0023_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0023]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:3
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+[Print_0023]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,280 @@
+//discovery.ini
+
+////////////////////////////////////////////////////////////////////
+//Positive test case
+//search for ALL devices
+////////////////////////////////////////////////////////////////////
+[UPnP_Discover_all_001]
+//later introduce Publish first and then do discovery
+listofsequences=discover_all_001,print_disc_all_001
+
+[discover_all_001]
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[print_disc_all_001]
+operationtype=printresults
+//This may be modified later
+resultscount=0
+
+
+////////////////////////////////////////////////////////////////////
+//Positive test case
+//search for ROOT devices
+////////////////////////////////////////////////////////////////////
+[UPnP_Discover_root_001]
+//later introduce Publish first and then do discovery
+listofsequences=discover_root_001,print_disc_root_001
+
+[discover_root_001]
+listofmxtimes=10
+listofservicetypes=upnp:rootdevice
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+
+[print_disc_root_001]
+operationtype=printresults
+//This may be modified later
+resultscount=0
+
+
+////////////////////////////////////////////////////////////////////
+//Negative test case
+//servicetype= "upnp:root" instead of "upnp:rootdevice"
+////////////////////////////////////////////////////////////////////
+[UPnP_Discover_all_100]
+//later introduce Publish first and then do discovery
+listofsequences=discover_all_100,print_disc_all_100
+
+[discover_all_100]
+listofmxtimes=10
+listofservicetypes=upnp:root
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+
+[print_disc_all_100]
+operationtype=printresults
+//This may be modified later
+resultscount=0
+
+////////////////////////////////////////////////////////////////////
+//Negative test case
+//servicetype= "upnp:root" instead of "upnp:rootdevice"
+////////////////////////////////////////////////////////////////////
+[UPnP_Discover_all_101]
+//later introduce Publish first and then do discovery
+listofsequences=discover_all_101,print_disc_all_101
+
+[discover_all_101]
+listofmxtimes=10,20,30
+listofservicetypes=ssdp:all,ssdp:all,upnp:rootdevice
+operationtype=discovery
+duplicateuri=TRUE
+schedulerstatus=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+
+[print_disc_all_101]
+operationtype=printresults
+//This may be modified later
+resultscount=0
+
+//////////////////////////////////////////////////////////////
+[UPnP_Discover_0001]
+
+listofsequences=discover_0_1,startscheduler_0_1,print_0_1
+
+[discover_0_1]
+responsetime=50
+servicetype=ssdp:all
+threadname=control_1
+operationtype=discovery
+delayenabled=TRUE
+waittime=50000000
+canceldiscovery=TRUE
+
+[canceldiscover_0_1]
+servicetype=ssdp:all
+operationtype=canceldiscovery
+
+
+[startscheduler_0_1]
+operationtype=startscheduler
+
+
+
+[Print_0_1]
+operationtype=printdiscover
+
+
+[delay_0_1]
+delayenabled=TRUE
+waittime=50000000
+operationtype=starttimer
+
+[validate_0_1]
+threadname=control_1
+operationtype=validatediscoveryresults
+signalmanager=TRUE
+
+[discoveryresponse_0_1]
+//Expected response from observer 
+//cachecontrol or maxage
+expirytime=1800
+location = http://10.192.196.185:58168/  
+//searchtarget
+uri=ssdp:rootdevice	
+usn=uuid:c7cdd26d-a060-4c66-90bb-cd1031c76f58
+
+[discoveryresponse_0_2]
+//Expected response from observer 
+//cachecontrol or maxage
+expirytime=1800
+location = http://10.192.196.185:58168/  
+//searchtarget
+uri=ssdp:rootdevice	
+usn=uuid:c7cdd26d-a060-4c66-90bb-cd1031c76f58
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Discover_0002]
+
+listofcontrolPointServices=CP_0_1
+listofsequences=discover_0_1,waitonsemaphore_0_1,Print_0_1
+
+[CP_0_1]
+threadname=control_1
+controlpoint=TRUE
+servicepoint=FALSE
+
+
+[discover_0_1]
+responsetime=10
+servicetype=urn:schemas-upnp-org:device:BinaryLight:1
+threadname=control_1
+operationtype=discovery
+
+[waitonsemaphore_0_1]
+waitonsemaphore=TRUE
+waitcount=1
+signalmanager=TRUE
+
+[Print_0_1]
+threadname=control_1
+operationtype=print
+signalmanager=TRUE
+
+
+[delay_0_1]
+delayenabled=TRUE
+waittime=50000000
+
+[validate_0_1]
+threadname=control_1
+operationtype=validatediscoveryresults
+signalmanager=TRUE
+
+[discoveryresponse_0_1]
+//Expected response from observer 
+//cachecontrol or maxage
+expirytime=1800
+location = http://10.192.196.185:58168/  
+//searchtarget
+uri=ssdp:rootdevice	
+usn=uuid:c7cdd26d-a060-4c66-90bb-cd1031c76f58
+
+[discoveryresponse_0_2]
+//Expected response from observer 
+//cachecontrol or maxage
+expirytime=1800
+location = http://10.192.196.185:58168/  
+//searchtarget
+uri=ssdp:rootdevice	
+usn=uuid:c7cdd26d-a060-4c66-90bb-cd1031c76f58
+/////////////////////////////////////////////////////////////////////////////////////////////
+
+
+[UPnP_Discover_Multiple_0001]
+listofcontrolPointServices=CP_0_1,CP_0_2
+listofsequences=discover_0_2,waitonsemaphore_0_1,Print_0_1
+
+[CP_0_1]
+threadname=control_1
+controlpoint=TRUE
+servicepoint=FALSE
+
+[CP_0_2]
+threadname=control_2
+controlpoint=TRUE
+servicepoint=FALSE
+
+[discover_0_1]
+responsetime=10
+servicetype=ssdp:all
+threadname=control_1
+operationtype=discovery
+
+[discover_0_2]
+responsetime=100
+servicetype=upnp::rootdevice
+threadname=control_2
+operationtype=discovery
+
+
+[waitonsemaphore_0_1]
+waitonsemaphore=TRUE
+waitcount=1
+signalmanager=TRUE
+
+[Print_0_1]
+threadname=control_2
+operationtype=print
+signalmanager=TRUE
+
+[Print_0_2]
+threadname=control_1
+operationtype=print
+signalmanager=TRUE
+
+[delay_0_1]
+delayenabled=TRUE
+waittime=50000000
+
+[validate_0_1]
+threadname=control_1
+operationtype=validatediscoveryresults
+signalmanager=TRUE
+
+[discoveryresponse_0_1]
+//Expected response from observer 
+//cachecontrol or maxage
+expirytime=1800
+location = http://10.192.196.185:58168/  
+//searchtarget
+uri=ssdp:rootdevice	
+usn=uuid:c7cdd26d-a060-4c66-90bb-cd1031c76f58
+
+[discoveryresponse_0_2]
+//Expected response from observer 
+//cachecontrol or maxage
+expirytime=1800
+location = http://10.192.196.185:58168/  
+//searchtarget
+uri=ssdp:rootdevice	
+usn=uuid:c7cdd26d-a060-4c66-90bb-cd1031c76f58
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0001.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,90 @@
+//discovery0001.ini
+
+
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0001
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0001]
+listofsequences=publish_vendor_device_0001_1,delay_three_minutes
+publisherclose=TRUE
+
+
+[discovery_0001_server]
+listofsequences=delay_0001,cpstatus_0001,discover_vendor_0001_1,describe_vendor_0001_1,describe_vendor_icons_0001_1,Print_vendor_0001_1
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+iconRefer=icon1
+
+[icon1]
+mimetype=image/png
+width=120
+height=120
+depth=64
+url=/icons/playstation3.png
+iconRefer=icon2
+
+[icon2]
+mimetype=image/png
+width=120
+height=120
+depth=64
+url=icons/playstation4.png
+
+[discover_vendor_0001_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0001_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0001_1]
+othermachine=TRUE
+operationtype=printresults
+
+[describe_vendor_icons_0001_1]
+operationtype=describeicon
+expecteddescriptions=4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0002.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,173 @@
+//discovery0002.ini
+
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0002
+//Publishing a embedded device level-2
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0002]
+listofsequences=publish_vendor_device_0002_1,publish_vendor_device_0002_2,delay_three_minutes
+
+[discovery_0002_server]
+listofsequences=delay_0002,cpstatus_0001,discover_vendor_0002_1,describe_vendor_0002_1,Print_vendor_0002_1
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0002]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0002_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0002_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0002_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0002_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0002_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0002
+//Publishing a embedded device level-2
+//Discover the same with first having more timeout than second
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0002_1]
+listofsequences=publish_vendor_device_0002_3,publish_vendor_device_0002_4,delay_three_minutes_1
+
+[discovery_0002_1_server]
+listofsequences=delay_0002_1,cpstatus_0001_1,discover_vendor_0002_2,describe_vendor_0002_2,Print_vendor_0002_2
+
+[publish_vendor_device_0002_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0002_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[delay_three_minutes_1]
+operationtype=starttimer
+waittime=120000000
+
+[delay_0002_1]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0001_1]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[discover_vendor_0002_2]
+othermachine=TRUE
+listofmxtimes=120,15
+listofservicetypes=urn:symbian.com:device:FirstVendorDevice:1,urn:symbian.com:device:SecondVendorDevice:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0002_2]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0002_2]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0003.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,107 @@
+//discovery0003.ini
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0003]
+listofsequences=publish_vendor_device_0003_1,publish_vendor_device_0003_2,publish_vendor_device_0003_3,delay_three_minutes
+
+[discovery_0003_server]
+listofsequences=delay_0003,cpstatus_0001,discover_vendor_0003_1,Print_vendor_0003_1
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0003]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0003_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0003_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0003_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0003_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0003_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0003_1]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0004.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+//discovery0001.ini
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0001
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0004]
+listofsequences=publish_0001,delay_three_minutes
+
+[discovery_0004_server]
+listofsequences=delay_0001,cpstatus_0001,discover_0001,Print_0001_1
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0001]
+operationtype=publishdevice
+BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:1
+FriendlyName=TestDevice1
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP TESTDEVICE Ver1
+ModelName=IWS-UPNP-TESTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+//Must be less than 64 characters
+SerialNumber=UPNP0123456789012345678901234567890123456789012345678901234567
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a650
+UPC=123456789012
+Description_Path=
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_0001]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:device:TestDevice:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+
+[Print_0001_1]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0005.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,78 @@
+//discovery0005.ini
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0002
+//Publishing a embedded device level-2
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0005]
+listofsequences=publish_0002_1,publish_0002_2,delay_three_minutes
+
+[discovery_0005_server]
+listofsequences=delay_0002,cpstatus_0001,discover_0002,Print_0002
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0002]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0002_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a660
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_0002_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:2
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a661
+UPC=123456789034
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_0002]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:device:TestDevice:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0002]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0006.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,97 @@
+//discovery0006.ini
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0006]
+listofsequences=publish_0003_1,publish_0003_2,publish_0003_3,delay_three_minutes
+
+[discovery_0006_server]
+listofsequences=delay_0003,cpstatus_0001,discover_0003,Print_0003
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0003]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0003_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a670
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_0003_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a671
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_0003_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a671
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a672
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_0003]
+othermachine=TRUE
+listofmxtimes=20,40
+listofservicetypes=uuid:25a0be80-8775-4988-b627-720fbd44a672,uuid:25a0be80-8775-4988-b627-720fbd44a627
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0003]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0007.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,61 @@
+//discovery0007.ini
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0007]
+listofsequences=publish_0007_1,publish_0007_2,delay_three_minutes
+
+[discovery_0007_server]
+listofsequences=delay_0007,cpstatus_0001,discover_0007,Print_0007
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0007]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0007_1]
+type=service
+index=0
+servicetype=urn:schemas-upnp-org:service:Scan1:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:12345/_urn:upnp-org:service:Scan1.0001_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\Scan1.xml
+operationtype=publishservice
+
+
+[publish_0007_2]
+servicetype=urn:schemas-upnp-org:service:Feeder:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:12345/_urn:upnp-org:service:Feeder1.0002_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\Feeder1.xml
+operationtype=publishservice
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[discover_0007]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:Feeder:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0003]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0008.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,92 @@
+//discovery0008.ini
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0008]
+listofsequences=publish_0008_1,publish_0008_2,delay_three_minutes
+
+[discovery_0008_server]
+listofsequences=delay_0008,cpstatus_0001,discover_0008,Print_0008
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0008]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0008_1]
+type=service
+index=0
+servicetype=urn:schemas-upnp-org:service:RenderingControl:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:12345/_urn:upnp-org:service:RenderingControl1.0001_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\renderingcontrol1.xml
+operationtype=publishservice
+
+
+[publish_0008_2]
+servicetype=urn:schemas-upnp-org:service:RenderingControl:2
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:12345/_urn:upnp-org:service:RenderingControl2.0002_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+operationtype=publishservice
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[discover_0008]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:RenderingControl:2
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0008]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Discover the same but with duplicate uris
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0008_1]
+listofsequences=cpstatus_0001_1,discover_0008_1,Print_0008_1
+
+[discovery_0008_1_server]
+listofsequences=cpstatus_0001_1,discover_0008_1,Print_0008_1
+
+[cpstatus_0001_1]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[discover_0008_1]
+othermachine=TRUE
+listofmxtimes=30,30
+listofservicetypes=urn:schemas-upnp-org:service:RenderingControl:2,urn:schemas-upnp-org:service:RenderingControl:2
+duplicateuri=TRUE
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0008_1]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0009.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,92 @@
+//discovery0009.ini
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0009]
+listofsequences=publish_0009_1,publish_0009_2,publish_0009_3,delay_three_minutes
+
+[discovery_0009_server]
+listofsequences=delay_0009,cpstatus_0001,discover_0009,describe_0009,Print_0009
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0009]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0009_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[publish_0009_2]
+type=service
+index=0
+servicetype=urn:symbian:service:Scan1:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+location=http://10.192.196.235:12345/_urn:upnp-org:service:Scan1.0001_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\Scan1.xml
+operationtype=publishservice
+
+
+[publish_0009_3]
+servicetype=urn:symbian:service:Feeder:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+location=http://10.192.196.235:12345/_urn:upnp-org:service:Feeder1.0002_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\Feeder1.xml
+operationtype=publishservice
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[discover_0009]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:symbian:service:Feeder:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_0009]
+descriptionpath=http://10.192.196.198:80/
+operationtype=describe
+positivecase=TRUE
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+readini = FALSE
+
+
+[Print_0009]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0010.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,83 @@
+//discovery0010.ini
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0010]
+listofsequences=publish_0010_1,publish_0010_2,publish_0010_3,delay_three_minutes
+
+[discovery_0010_server]
+listofsequences=delay_0010,cpstatus_0001,discover_0010,Print_0010
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0010]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0010_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[publish_0010_2]
+type=service
+index=0
+servicetype=urn:symbian:service:RenderingControl:1
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+location=http://10.192.196.235:12345/_urn:upnp-org:service:RenderingControl1.0001_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\RenderingControl1.xml
+operationtype=publishservice
+
+
+[publish_0010_3]
+servicetype=urn:symbian:service:RenderingControl:2
+usn=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+location=http://10.192.196.235:12345/_urn:upnp-org:service:RenderingControl2.0002_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\RenderingControl2.xml
+operationtype=publishservice
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[discover_0010]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:symbian:service:RenderingControl:2
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0010]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0011.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,85 @@
+//discovery0011.ini
+
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0011
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0011]
+listofsequences=delay_0011,cpstatus_0011,discover_vendor_0011_1,describe_vendor_0011_1,describe_vendor_icons_0011_1,Print_vendor_0011_1
+
+[discovery_0011_server]
+listofsequences=publish_vendor_device_0011_1,delay_three_minutes
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0011]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0011]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0011_1]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+iconRefer=icon1
+
+[icon1]
+mimetype=image/png
+width=120
+height=120
+depth=64
+url=/icons/playstation3.png
+iconRefer=icon2
+
+[icon2]
+mimetype=image/png
+width=120
+height=120
+depth=64
+url=icons/playstation4.png
+
+[discover_vendor_0011_1]
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0011_1]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0011_1]
+operationtype=printresults
+
+[describe_vendor_icons_0011_1]
+operationtype=describeicon
+expecteddescriptions=4
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0012.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,169 @@
+//discovery0012.ini
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0012
+//Publishing a embedded device level-2
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0012]
+listofsequences=delay_0012,cpstatus_0001,discover_vendor_0012_1,describe_vendor_0012_1,Print_vendor_0012_1
+
+[discovery_0012_server]
+listofsequences=publish_vendor_device_0012_1,publish_vendor_device_0012_2,delay_three_minutes
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0012]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0012_1]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0012_2]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0012_1]
+listofmxtimes=50
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0012_1]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0012_1]
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0002
+//Publishing a embedded device level-2
+//Discover the same with first having more timeout than second
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0012_1]
+listofsequences=delay_0012_1,cpstatus_0001_1,discover_vendor_0012_2,describe_vendor_0012_2,Print_vendor_0012_2
+
+[discovery_0012_1_server]
+listofsequences=publish_vendor_device_0012_3,publish_vendor_device_0012_4,delay_three_minutes_1
+
+[delay_0012_1]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0001_1]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[discover_vendor_0012_2]
+othermachine=TRUE
+listofmxtimes=120,15
+listofservicetypes=urn:symbian.com:device:FirstVendorDevice:1,urn:symbian.com:device:SecondVendorDevice:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0012_2]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[delay_three_minutes_1]
+operationtype=starttimer
+waittime=120000000
+
+[publish_vendor_device_0012_3]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[publish_vendor_device_0012_4]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[Print_vendor_0012_2]
+operationtype=printresults
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0013.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,108 @@
+//discovery0013.ini
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0013
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0013]
+listofsequences=delay_0013,cpstatus_0001,discover_vendor_0013_1,Print_vendor_0013_1 
+
+[discovery_0013_server]
+listofsequences=publish_vendor_device_0013_1,publish_vendor_device_0013_2,publish_vendor_device_0013_3,delay_three_minutes
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0013]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0013_1]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[publish_vendor_device_0013_2]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[publish_vendor_device_0013_3]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0013_1]
+listofmxtimes=50
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0013_1]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[Print_vendor_0013_1]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0014.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,62 @@
+//discovery0014.ini
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0014
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0014]
+listofsequences=delay_0014,delay_0014,cpstatus_0014,discover_0014,Print_0014_1
+
+[discovery_0014_server]
+listofsequences=publish_0014,delay_three_minutes
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0014]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0014]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0014]
+othermachine=TRUE
+operationtype=publishdevice
+BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:1
+FriendlyName=TestDevice1
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP TESTDEVICE Ver1
+ModelName=IWS-UPNP-TESTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+//Must be less than 64 characters
+SerialNumber=UPNP0123456789012345678901234567890123456789012345678901234567
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a650
+UPC=123456789012
+Description_Path=
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_0014]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:device:TestDevice:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+
+[Print_0014_1]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0015.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,79 @@
+//discovery0015.ini
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0002
+//Publishing a embedded device level-2
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0015]
+listofsequences=delay_0015,cpstatus_0015,discover_0015,Print_0015
+
+[discovery_0015_server]
+listofsequences=publish_0015_1,publish_0015_2,delay_three_minutes
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0015]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0015]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0015_1]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a660
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_0015_2]
+othermachine=TRUE
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:TestDevice:2
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a661
+UPC=123456789034
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_0015]
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:device:TestDevice:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0015]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0016.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,98 @@
+//discovery0016.ini
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0016]
+listofsequences=delay_0003,cpstatus_0001,discover_0003,Print_0003
+
+
+[discovery_0016_server]
+listofsequences=publish_0003_1,publish_0003_2,publish_0003_3,delay_three_minutes
+
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0003]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0003_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a670
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_0003_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a671
+UPC=123456789034
+positivecase=TRUE
+cachecontrol=1810
+
+[publish_0003_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a671
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a672
+UPC=123456789045
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_0003]
+othermachine=TRUE
+listofmxtimes=30,50
+listofservicetypes=uuid:25a0be80-8775-4988-b627-720fbd44a672,uuid:25a0be80-8775-4988-b627-720fbd44a627
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0003]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0017.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,61 @@
+//discovery0017.ini
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0017]
+listofsequences=delay_0007,cpstatus_0001,discover_0007,Print_0007
+
+
+[discovery_0017_server]
+listofsequences=publish_0007_1,publish_0007_2,delay_three_minutes
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0007]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0007_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_0007_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[discover_0007]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0003]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0018.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,95 @@
+//discovery0018.ini
+
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Publishing a embedded device level-3
+//Discover the same
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0018]
+listofsequences=delay_0008,cpstatus_0001,discover_0008,Print_0008
+
+
+[discovery_0018_server]
+listofsequences=publish_0008_1,publish_0008_2,delay_three_minutes
+
+
+[delay_three_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0008]
+operationtype=starttimer
+waittime=10000000
+
+[publish_0008_1]
+type=service
+index=0
+servicetype=urn:schemas-upnp-org:service:RenderingControl:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:12345/_urn:upnp-org:service:RenderingControl1.0001_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\renderingcontrol1.xml
+operationtype=publishservice
+
+
+[publish_0008_2]
+servicetype=urn:schemas-upnp-org:service:RenderingControl:2
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:12345/_urn:upnp-org:service:RenderingControl2.0002_scpd.xml
+cachecontrol=1810
+Description_Path=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+operationtype=publishservice
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+[discover_0008]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:RenderingControl:2
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0008]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VENDOR_DEVICE_DESCRIPTION_0003
+//Discover the same but with duplicate uris
+//Do describe the same
+//////////////////////////////////////////////////////////////////
+[discovery_0018_1]
+listofsequences=cpstatus_0002,discover_0008_1,Print_0008_1
+
+[discovery_0018_1_server]
+listofsequences=cpstatus_0002,discover_0008_1,Print_0008_1
+
+[cpstatus_0002]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[discover_0008_1]
+othermachine=TRUE
+listofmxtimes=30,30
+listofservicetypes=urn:schemas-upnp-org:service:RenderingControl:2,urn:schemas-upnp-org:service:RenderingControl:2
+duplicateuri=TRUE
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0008_1]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0019.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,82 @@
+//discovery0017.ini
+
+[multiplemachinemode]
+inifilepath=z:\upnp\testupnp\client\testdata\ini_files\discovery0017.ini
+serverport=32244
+serveripaddress=10.192.196.249
+
+[stopserver]
+stopserver=TRUE
+othermachine=TRUE
+
+// Test data for Searching non-existent device type  .
+//UPnP-NEG-0017 to UPnP-NEG-19
+[UPnP_Discover_0017]
+listofsequences=publish_0017_1,publish_0017_2,discovery_0017_1,discovery_0017_2,discovery_0017_3,Print_0017,stopserver
+
+
+
+[publish_0017_1]
+type=service
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:AAcPlayer:1
+FriendlyName=AAcPlayer
+Manufacturer=symbian
+ManufacturerURL=www.symbian.com
+ModelDescription=software emulated AAC player
+ModelName=Symbian Os AAC player
+ModelNumber=1
+ModelURL=http://www.symbian.com
+PresentationURL=/
+SerialNumber=12345
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a630
+UPC=1
+Description_Path=/
+operationtype=publishdevice
+
+
+[publish_0017_2]
+type=service
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:AAcPlayer:2
+FriendlyName=AAcPlayer
+Manufacturer=symbian
+ManufacturerURL=www.symbian.com
+ModelDescription=software emulated AAC player
+ModelName=Symbian Os AAC player
+ModelNumber=1
+ModelURL=http://www.symbian.com
+PresentationURL=/
+SerialNumber=12345
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a631
+UPC=1
+Description_Path=/
+operationtype=publishdevice
+
+
+//Search for non existant device
+
+[discovery_0017_1]
+othermachine=TRUE
+responsetime=10
+servicetype=urn:schemas-upnp-org:device:BBcPlayer:1
+operationtype=discovery
+
+//Search for higher version of non existant device
+
+[discovery_0017_2]
+othermachine=TRUE
+responsetime=10
+servicetype=urn:schemas-upnp-org:device:BBcPlayer:3
+operationtype=discovery
+
+//Search for higher version of non existant service
+
+[discovery_0017_3]
+othermachine=TRUE
+responsetime=10
+servicetype=urn:schemas-upnp-org:service:BBcPlayer:4
+operationtype=discovery
+
+
+[Print_0017]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery0020.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,79 @@
+//discovery0018.ini
+
+[multiplemachinemode]
+inifilepath=z:\upnp\testupnp\client\testdata\ini_files\discovery0018.ini
+serverport=32244
+serveripaddress=10.192.196.249
+
+[stopserver]
+stopserver=TRUE
+othermachine=TRUE
+
+// Test data for Searching non-existent device type Second Version .
+//UPnP-NEG-0017 to UPnP-NEG-0019
+[UPnP_Discover_0018]
+listofsequences=publish_0018_1,publish_0018_2,discovery_0018_1,discovery_0018_2,discovery_0018_3,Print_0018,stopserver
+
+
+
+[publish_0018_1]
+othermachine=TRUE
+type=service
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:AAcPlayer:1
+FriendlyName=AAcPlayer
+Manufacturer=symbian
+ManufacturerURL=www.symbian.com
+ModelDescription=software emulated AAC player
+ModelName=Symbian Os AAC player
+ModelNumber=1
+ModelURL=http://www.symbian.com
+PresentationURL=/
+SerialNumber=12345
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a630
+UPC=1
+Description_Path=/
+operationtype=publishdevice
+
+
+[publish_0018_2]
+othermachine=TRUE
+type=service
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:AAcPlayer:2
+FriendlyName=AAcPlayer
+Manufacturer=symbian
+ManufacturerURL=www.symbian.com
+ModelDescription=software emulated AAC player
+ModelName=Symbian Os AAC player
+ModelNumber=1
+ModelURL=http://www.symbian.com
+PresentationURL=/
+SerialNumber=12345
+UDN=uuid:25a0be80-8775-4988-b627-720fbd44a631
+UPC=1
+Description_Path=/
+operationtype=publishdevice
+
+
+//Dearch for non-existant device
+[discovery_0018_1]
+responsetime=10
+servicetype=urn:schemas-upnp-org:device:BBcPlayer:1
+operationtype=discovery
+
+//Search for higher version of non-existant device
+[discovery_0018_2]
+responsetime=10
+servicetype=urn:schemas-upnp-org:device:BBcPlayer:3
+operationtype=discovery
+
+//Search for higher version of non-existant service
+[discovery_0018_3]
+responsetime=10
+servicetype=urn:schemas-upnp-org:service:BBcPlayerService:3
+operationtype=discovery
+
+
+
+[Print_0018]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery_0048.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,171 @@
+//discovery_0048.ini
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_INVALID_DISCOVERY_REQUESTS_0048
+//Publishing a embedded device level-1
+//Discover the same
+//////////////////////////////////////////////////////////////////
+[upnp_invalid_discovery_requests_0048_1]
+listofsequences=publish_vendor_device_0048_1,delay_two_minutes,Print_vendor_0048_1
+
+[upnp_invalid_discovery_requests_0048_1_server]
+listofsequences=delay_0048,cpstatus_0048,discover_vendor_0048_1,Print_vendor_0048_1
+
+[delay_two_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0048]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0048]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0048_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+//Giving wrong Input
+//instead of ssdp:all --> Try giving upnp:all
+[discover_vendor_0048_1]
+othermachine=TRUE
+listofmxtimes=120
+listofservicetypes=upnp:all
+operationtype=discovery
+schedulerstart=FALSE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+positivecase=FALSE
+
+[Print_vendor_0048_1]
+operationtype=printresults
+
+
+////////////////////////////////////////////////////////////////////////
+[upnp_invalid_discovery_requests_0048_2]
+listofsequences=publish_vendor_device_0048_2,delay_two_minutes,Print_vendor_0048_2
+
+[upnp_invalid_discovery_requests_0048_2_server]
+listofsequences=delay_0048,cpstatus_0048,discover_vendor_0048_2,Print_vendor_0048_2
+
+[delay_two_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0048]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0048]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0048_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+//Giving wrong Input
+//instead of ssdp:all --> Try giving upnp:all
+[discover_vendor_0048_2]
+othermachine=TRUE
+listofmxtimes=120,110,110,110
+listofservicetypes=upnp:all,ssdp:root,ssdp:al,SSDP:ALL
+operationtype=discovery
+schedulerstart=FALSE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+positivecase=FALSE
+
+[Print_vendor_0048_2]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////
+[upnp_invalid_discovery_requests_0048_3]
+listofsequences=publish_vendor_device_0048_3,delay_two_minutes,Print_vendor_0048_3
+
+[upnp_invalid_discovery_requests_0048_3_server]
+listofsequences=delay_0048,cpstatus_0048,discover_vendor_0048_3,Print_vendor_0048_3
+
+[delay_two_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0048]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0048]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0048_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+//Giving wrong Input
+//instedof ssdp:all --> Try giving upnp:all
+[discover_vendor_0048_3]
+othermachine=TRUE
+listofmxtimes=120
+listofservicetypes=upnp:all
+operationtype=discovery
+schedulerstart=FALSE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+positivecase=FALSE
+
+[Print_vendor_0048_3]
+operationtype=printresults
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery_0048_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,171 @@
+//discovery_0048_rev.ini
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_INVALID_DISCOVERY_REQUESTS_0048
+//Publishing a embedded device level-1
+//Discover the same
+//////////////////////////////////////////////////////////////////
+[upnp_invalid_discovery_requests_0048_1_rev]
+listofsequences=delay_0048_rev,cpstatus_0048_rev,discover_vendor_0048_1_rev,Print_vendor_0048_1_rev
+
+[upnp_invalid_discovery_requests_0048_1_rev_server]
+listofsequences=publish_vendor_device_0048_1_rev,delay_two_minutes_rev,Print_vendor_0048_1_rev
+
+[delay_two_minutes_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0048_rev]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0048_rev]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0048_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+//Giving wrong Input
+//instead of ssdp:all --> Try giving upnp:all
+[discover_vendor_0048_1_rev]
+othermachine=TRUE
+listofmxtimes=120
+listofservicetypes=upnp:all
+operationtype=discovery
+schedulerstart=FALSE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+positivecase=FALSE
+
+[Print_vendor_0048_1_rev]
+operationtype=printresults
+
+
+////////////////////////////////////////////////////////////////////////
+[upnp_invalid_discovery_requests_0048_2_rev]
+listofsequences=delay_0048_rev,cpstatus_0048_rev,discover_vendor_0048_2_rev,Print_vendor_0048_2_rev
+
+[upnp_invalid_discovery_requests_0048_2_rev_server]
+listofsequences=publish_vendor_device_0048_2_rev,delay_two_minutes_rev,Print_vendor_0048_2_rev
+
+[delay_two_minutes_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0048_rev]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0048_rev]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0048_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+//Giving wrong Input
+//instead of ssdp:all --> Try giving upnp:all
+[discover_vendor_0048_2_rev]
+othermachine=TRUE
+listofmxtimes=120,110,110,110
+listofservicetypes=upnp:all,ssdp:root,ssdp:al,SSDP:ALL
+operationtype=discovery
+schedulerstart=FALSE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+positivecase=FALSE
+
+[Print_vendor_0048_2_rev]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////
+[upnp_invalid_discovery_requests_0048_3_rev]
+listofsequences=delay_0048_rev,cpstatus_0048_rev,discover_vendor_0048_3_rev,Print_vendor_0048_3_rev
+
+[upnp_invalid_discovery_requests_0048_3_rev_server]
+listofsequences=publish_vendor_device_0048_3_rev,delay_two_minutes_rev,Print_vendor_0048_3_rev
+
+[delay_two_minutes_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0048_rev]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0048_rev]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0048_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+//Giving wrong Input
+//instedof ssdp:all --> Try giving upnp:all
+[discover_vendor_0048_3_rev]
+othermachine=TRUE
+listofmxtimes=120
+listofservicetypes=upnp:all
+operationtype=discovery
+schedulerstart=FALSE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+positivecase=FALSE
+
+[Print_vendor_0048_3_rev]
+operationtype=printresults
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery_0049.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,60 @@
+//discovery_0049.ini
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0049
+//Publishing a embedded device level-1
+//Discover the same with response time more than 120 sec
+//////////////////////////////////////////////////////////////////
+[upnp_validate_discovery_response_time_0049_1]
+listofsequences=publish_vendor_device_0049_1,delay_two_minutes,Print_vendor_0049_1
+
+[upnp_validate_discovery_response_time_0049_1_server]
+listofsequences=delay_0049,cpstatus_0049,discover_vendor_0049_1,Print_vendor_0049_1
+
+[delay_two_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0049]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0049]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0049_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0049_1]
+othermachine=TRUE
+listofmxtimes=140
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+positivecase=FALSE
+
+[Print_vendor_0049_1]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/discovery_0049_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,60 @@
+//discovery_0049.ini
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE -- UPNP_VENDOR_DEVICE_DESCRIPTION_0049
+//Publishing a embedded device level-1
+//Discover the same with response time more than 120 sec
+//////////////////////////////////////////////////////////////////
+[upnp_validate_discovery_response_time_0049_1_rev]
+listofsequences=delay_0049,cpstatus_0049,discover_vendor_0049_1,Print_vendor_0049_1
+
+[upnp_validate_discovery_response_time_0049_1_rev_server]
+listofsequences=publish_vendor_device_0049_1,delay_two_minutes,Print_vendor_0049_1
+
+[delay_two_minutes]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0049]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0049]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0049_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0049_1]
+othermachine=TRUE
+listofmxtimes=140
+listofservicetypes=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+positivecase=FALSE
+
+[Print_vendor_0049_1]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/initiateaction_0019.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+[initiateaction_0019]
+listofsequences=delay_0019,cpstatus_0019_1,discover_vendor_0019_1,describe_vendor_0019_1,action_0019,Print_vendor_0019_1
+
+[initiateaction_0019_server]
+listofsequences=publish_service_0019_1,delay_3Min_1
+
+[cpstatus_0019_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_3Min_1]
+operationtype=starttimer
+waittime=200000000
+
+[delay_0019]
+operationtype=starttimer
+waittime=10000000
+
+[publish_service_0019_1]
+operationtype=publishservice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+Description_Path=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+operationtype=publishservice
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0019_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:ContentDirectory:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0019_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[action_0019]
+operationtype=initiateaction
+
+[Print_vendor_0019_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+[initiateaction_0019_2]
+listofsequences=delay_0019_2,cpstatus_0019_2_1,discover_vendor_0019_2_1,describe_vendor_0019_2_1,action_0019_2,delay_1Min_2,Print_vendor_0019_2_1
+
+[initiateaction_0019_2_server]
+listofsequences=publish_service_0019_2_1,delay_3Min_2
+
+[cpstatus_0019_2_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_3Min_2]
+operationtype=starttimer
+waittime=200000000
+
+[delay_1Min_2]
+operationtype=starttimer
+waittime=100000000
+
+[delay_0019_2]
+operationtype=starttimer
+waittime=10000000
+
+[publish_service_0019_2_1]
+operationtype=publishservice
+Description_Path=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_vendor_0019_2_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0019_2_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[action_0019_2]
+operationtype=initiateaction
+
+[Print_vendor_0019_2_1]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/initiateaction_0019_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,111 @@
+[initiateaction_0019_rev]
+listofsequences=publish_service_0019_1
+
+[initiateaction_0019_rev_server]
+listofsequences=delay_0019,cpstatus_0019_1,discover_vendor_0019_1,describe_vendor_0019_1,action_0019,Print_vendor_0019_1
+
+
+[cpstatus_0019_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_3Min_1]
+operationtype=starttimer
+waittime=200000000
+
+[delay_0019]
+operationtype=starttimer
+waittime=10000000
+
+[publish_service_0019_1]
+operationtype=publishservice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+Description_Path=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+operationtype=publishservice
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+cachecontrol=1810
+
+[discover_vendor_0019_1]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:ContentDirectory:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0019_1]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[action_0019]
+operationtype=initiateaction
+
+[Print_vendor_0019_1]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+[initiateaction_0019_2_rev]
+listofsequences=publish_service_0019_2_1_rev,delay_3Min_2_rev
+
+[initiateaction_0019_2_rev_server]
+listofsequences=delay_0019_2_rev,cpstatus_0019_2_1_rev,discover_vendor_0019_2_1_rev,describe_vendor_0019_2_1_rev,action_0019_2_rev,delay_1Min_2_rev,Print_vendor_0019_2_1_rev
+
+[cpstatus_0019_2_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_3Min_2_rev]
+operationtype=starttimer
+waittime=150000000
+
+[delay_1Min_2_rev]
+operationtype=starttimer
+waittime=100000000
+
+[delay_0019_2_rev]
+operationtype=starttimer
+waittime=10000000
+
+[publish_service_0019_2_1_rev]
+operationtype=publishservice
+Description_Path=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[discover_vendor_0019_2_1_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[describe_vendor_0019_2_1_rev]
+othermachine=TRUE
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+[action_0019_2_rev]
+operationtype=initiateaction
+
+[Print_vendor_0019_2_1_rev]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/multiplemachines.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,15 @@
+[clientdata]
+clientenabled=TRUE
+serverport=32244
+serveripaddress=10.192.196.165
+
+[serverdata]
+clientenabled=FALSE
+serverport=32244
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/opendiscovery_001.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,32 @@
+//opendiscovery_001.ini
+
+
+
+//////////////////////////////////////////////////////////////////
+//NEGATIVE CASE 
+//Open the discovery two times
+//It should return KErrAlreadyExists
+//
+//////////////////////////////////////////////////////////////////
+[discovery_001]
+listofsequences=publish_vendor_device_0001_1,publish_vendor_device_0001_1
+
+
+[discovery_001_server]
+listofsequences=delay_0001,cpstatus_0001,cpstatus_0001
+
+[delay_one_minute]
+operationtype=starttimer
+waittime=60000000
+
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0001_1]
+operationtype=openpublisher
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/opendiscovery_001_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,32 @@
+//opendiscovery_001_rev.ini
+
+
+
+//////////////////////////////////////////////////////////////////
+//NEGATIVE CASE 
+//Open the discovery two times
+//It should return KErrAlreadyExists
+//
+//////////////////////////////////////////////////////////////////
+[discovery_001_rev]
+listofsequences=delay_0001,cpstatus_0001,cpstatus_0001
+
+
+[discovery_001_server_rev]
+listofsequences=publish_vendor_device_0001_1,publish_vendor_device_0001_1
+
+[delay_one_minute]
+operationtype=starttimer
+waittime=60000000
+
+
+[cpstatus_0001]
+operationtype=opendiscoverer
+cpstatus=TRUE
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[publish_vendor_device_0001_1]
+operationtype=openpublisher
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,432 @@
+//publish.ini
+
+///////////////////////////////////////////////////////////////////////////////////////
+//////////////////////UPNP_PUBLISH_REGRESSION.SCRIPT///////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 1 -- UPNP_PUBLISH_REGRESSION 
+//PUBLISHING A EMBEDDED DEVICE LEVEL-1
+//////////////////////////////////////////////////////////////////
+[multiplemachinemode]
+inifilepath=z:\upnp\testupnp\client\testdata\ini_files\publish.ini
+multimachinemode=TRUE
+serverport=32244
+serveripaddress=10.192.196.165
+
+[publishtest_0001]
+listofsequences=publishtest_0001_1,Print_vendor_0001_1
+listofserversequence=
+
+[publishtest_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+schedulerstatus=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+[Print_vendor_0001_1]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 2 -- UPNP_PUBLISH_REGRESSION 
+//PUBLISHING A EMBEDDED DEVICE LEVEL-2
+//////////////////////////////////////////////////////////////////
+[publishtest_0002]
+listofsequences=publishtest_0002_1,publishtest_0002_2,Print_vendor_0002_1
+listofserversequence=
+
+[publishtest_0002_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+
+[publishtest_0002_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+schedulerstatus=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+[Print_vendor_0002_1]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 3 -- UPNP_PUBLISH_REGRESSION 
+//PUBLISHING A EMBEDDED DEVICE LEVEL-3
+//////////////////////////////////////////////////////////////////
+[publishtest_0003]
+listofsequences=publishtest_0003_1,publishtest_0003_2,publishtest_0003_3,Print_vendor_0003_1
+listofserversequence=
+
+[publishtest_0003_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+
+[publishtest_0003_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+
+
+[publishtest_0003_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+schedulerstatus=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+[Print_vendor_0003_1]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 4 -- UPNP_PUBLISH_REGRESSION 
+//PUBLISHING A EMBEDDED DEVICE LEVEL-4
+//////////////////////////////////////////////////////////////////
+[publishtest_0004]
+listofsequences=publishtest_0004_1,publishtest_0004_2,publishtest_0004_3,publishtest_0004_4,Print_vendor_0004_1
+listofserversequence=
+
+[publishtest_0004_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+
+[publishtest_0004_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+
+[publishtest_0004_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+
+[publishtest_0004_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+schedulerstatus=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+[Print_vendor_0004_1]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 5 -- UPNP_PUBLISH_REGRESSION 
+//PUBLISHING A EMBEDDED DEVICE LEVEL-5
+//////////////////////////////////////////////////////////////////
+[publishtest_0005]
+listofsequences=publishtest_0005_1,publishtest_0005_2,publishtest_0005_3,publishtest_0005_4,publishtest_0005_5,Print_vendor_0005_1
+listofserversequence=
+
+[publishtest_0005_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+
+[publishtest_0005_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+UPC=123456789034
+positivecase=TRUE
+
+[publishtest_0005_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-2
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+UPC=123456789045
+positivecase=TRUE
+
+[publishtest_0005_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-3
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+UPC=123456789045
+positivecase=TRUE
+
+[publishtest_0005_5]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-ChildLevel-4
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-5
+UPC=123456789045
+schedulerstatus=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+[Print_vendor_0005_1]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//POSITIVE CASE 6 -- UPNP_PUBLISH_REGRESSION 
+//PUBLISHING A 5 EMBEDDED DEVICE IN LEVEL - 1
+//////////////////////////////////////////////////////////////////
+[publishtest_0006]
+listofsequences=publishtest_0006_1,publishtest_0006_2,publishtest_0006_3,publishtest_0006_4,publishtest_0006_5,Print_vendor_0006_1
+listofserversequence=
+
+[publishtest_0006_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-1
+UPC=123456789012
+positivecase=TRUE
+
+[publishtest_0006_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:SecondVendorDevice:1
+FriendlyName=SecondVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SECONDDEVICE Ver1
+ModelName=IWS-UPNP-SECONDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-2
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-2
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-2
+UPC=123456789034
+positivecase=TRUE
+
+[publishtest_0006_3]
+operationtype=publishdevice
+//Base URL is not a must????? 
+//BaseURL=http://10.192.197.28/device.xml
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:ThirdVendorDevice:1
+FriendlyName=ThirdVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP THIRDDEVICE Ver1
+ModelName=IWS-UPNP-THIRDDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-3
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-3
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-3
+UPC=123456789045
+positivecase=TRUE
+
+[publishtest_0006_4]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FourthVendorDevice:1
+FriendlyName=FourthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FOURTHDEVICE Ver1
+ModelName=IWS-UPNP-FOURTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-4
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-4
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-4
+UPC=123456789045
+positivecase=TRUE
+
+[publishtest_0006_5]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FifthVendorDevice:1
+FriendlyName=FifthVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIFTHDEVICE Ver1
+ModelName=IWS-UPNP-FIFTHDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-5
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-5
+SerialNumber=UPNPSecond012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-Child-5
+UPC=123456789045
+schedulerstatus=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+[Print_vendor_0006_1]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0001.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,91 @@
+//publish_0001.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////
+//NEGATIVE CASE -- UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0001
+//Publishing a embedded device level-1
+//Discover the same
+//Do describe the same
+//Devicetype <= 64 characters 
+//Input given here 65 characters 
+//Wrong URI for description. It should be http
+//////////////////////////////////////////////////////////////////
+[upnp_validate_root_0001_1]
+listofsequences=publish_device_0001_1,publish_service_0001_1,delay_1Min_1
+
+[upnp_validate_root_0001_1_server]
+listofsequences=delay_0001,cpstatus_0001_1,discover_0001_1,Print_0001_1
+
+[cpstatus_0001_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_1Min_1]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+//Devicetype <= 64 characters 
+//ParentDeviceUid is Blank....to set this as a root device
+[publish_device_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=
+DeviceType=urn:symbian.com:device:FirstVendorDevice19012345678901234567890123456789012345678901234:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+//Publish a service in a root device version 2 of avtransport
+[publish_service_0001_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:2
+usn=
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[discover_0001_1]
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+
+[Print_0001_1]
+operationtype=printresults
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0001_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,82 @@
+//publish_0001_rev.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////
+//NEGATIVE CASE -- UPNP_VALIDATE_DESCRIBE_REQUESTS_HEADERS_0001
+//Publishing a root device -- apart from  
+//Discover the same
+//Do describe the same
+//Devicetype <= 64 characters 
+//Input given here 65 characters 
+//Wrong URI for description. It should be http
+//////////////////////////////////////////////////////////////////
+[upnp_validate_root_0001_1_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_1_rev,discover_0001_1_rev,Print_0001_1_rev
+
+[upnp_validate_root_0001_1_rev_server]
+listofsequences=publish_device_0001_1_rev,delay_1Min_1_rev
+
+[cpstatus_0001_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_1Min_1_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Devicetype <= 64 characters 
+//ParentDeviceUid is Blank....to set this as a root device
+[publish_device_0001_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=
+DeviceType=urn:symbian.com:device:FirstVendorDevice19012345678901234567890123456789012345678901234:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+
+[discover_0001_1_rev]
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+
+[Print_0001_1_rev]
+operationtype=printresults
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0061.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,980 @@
+//publish_0061.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//UDN must start with uuid:
+//cachecontrol should be >= 1800
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////--------------UPNP_VALIDATE_DEVICE_REGISTRATION_0061-----------------////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//////CONTROL POINT ON REMOTE MACHINE  AND SERVICE POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061
+//Publishing a embedded device level-1
+//Discover all
+//Friendly name < 64characters
+// Input given here 64 characters
+//////////////////////////////////////////////////////////////////
+
+[upnp_validate_device_registration_0061_1]
+listofsequences=publish_device_0001,delay_1Min_0001
+
+[upnp_validate_device_registration_0061_1_server]
+listofsequences=delay_0001,cpstatus_0001,discover_0001,Print_0001
+
+//Friendly name < 64characters
+// Input given here 64 characters
+//Publish Bad friendly name
+[publish_device_0001]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice19012345678901234567890123456789012345678901234
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0001]
+operationtype=starttimer
+waittime=60000000
+
+[cpstatus_0001]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[discover_0001]
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0001]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_2
+//Publishing a embedded device level-1
+//Discover all
+//Friendly name < 64characters
+// Input given here 0 characters
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_2]
+listofsequences=publish_device_0002,delay_1Min_0002
+
+[upnp_validate_device_registration_0061_2_server]
+listofsequences=delay_0002,cpstatus_0002,discover_0002,Print_0002
+
+//Friendly name < 64characters
+// Input given here 0 characters
+[publish_device_0002]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0002]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0002]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0002]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0002]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0002]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_3
+//Publishing a embedded device level-1
+//Discover all
+//ModelDescription < 128
+// Input given here 128 characters
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_3]
+listofsequences=publish_device_0003,delay_1Min_0003
+
+[upnp_validate_device_registration_0061_3_server]
+listofsequences=delay_0003,cpstatus_0003,discover_0003,Print_0003
+
+//ModelDescription < 128
+// Input given here 128 characters
+[publish_device_0003]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnPFIRSTDEVICE17890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0003]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0003]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0003]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0003]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0003]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_4
+//Publishing a embedded device level-1
+//Discover all
+//ModelNumber < 32
+// Input given here 32 characters
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_4]
+listofsequences=publish_device_0004,delay_1Min_0004
+
+[upnp_validate_device_registration_0061_4_server]
+listofsequences=delay_0004,cpstatus_0004,discover_0004,Print_0004
+
+//ModelNumber < 32
+// Input given here 32 characters --is invalid
+//Model description Can be 0 characters - this is valid
+[publish_device_0004]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=12345678901234567890123456789012
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0004]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0004]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0004]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0004]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0004]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_5
+//Publishing a embedded device level-1
+//Discover all
+//SerialNumber Must be less than 64 characters
+// Input given here 64 characters
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_5]
+listofsequences=publish_device_0005,delay_1Min_0005
+
+[upnp_validate_device_registration_0061_5_server]
+listofsequences=delay_0005,cpstatus_0005,discover_0005,Print_0005
+
+//SerialNumber Must be less than 64 characters
+// Input given here 64 characters
+//ModelNumber Can be 0 characters - this is valid
+[publish_device_0005]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP567890123456789012345678901234567890123456789012345678901234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0005]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0005]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0005]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0005]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0005]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_6
+//Publishing a embedded device level-1
+//Discover all
+//SerialNumber can be 0 characters 
+//UPC is optional - 12 numeric 
+//Input given here 13 characters length
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_6]
+listofsequences=publish_device_0006,delay_1Min_0006
+
+[upnp_validate_device_registration_0061_6_server]
+listofsequences=delay_0006,cpstatus_0006,discover_0006,Print_0006
+
+//SerialNumber can be 0 characters  -- valid
+//UPC is optional - 12 numeric 
+//Input given here 13 characters length --Invalid
+[publish_device_0006]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0006]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0006]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0006]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0006]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0006]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_7
+//Publishing a embedded device level-1
+//Discover all
+//Manufacturer < 64characters
+//Input given here 64 characters length
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_7]
+listofsequences=publish_device_0007,delay_1Min_0007
+
+[upnp_validate_device_registration_0061_7_server]
+listofsequences=delay_0007,cpstatus_0007,discover_0007,Print_0007
+
+//Manufacturer < 64characters
+//Input given here 64 characters length
+[publish_device_0007]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian890123456789012345678901234567890123456789012345678901234
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0007]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0007]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0007]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0007]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0007]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_8
+//Publishing a embedded device level-1
+//Discover all
+//Manufacturer < 64characters
+//Input given here 0 characters length
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_8]
+listofsequences=publish_device_0008,delay_1Min_0008
+
+[upnp_validate_device_registration_0061_8_server]
+listofsequences=delay_0008,cpstatus_0008,discover_0008,Print_0008
+
+//Manufacturer < 64characters
+//Input given here 0 characters length
+[publish_device_0008]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0008]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0008]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0008]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0008]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0008]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_9
+//Publishing a embedded device level-1
+//Discover all
+//ModelName < 32
+//Input given here 32 characters length
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_9]
+listofsequences=publish_device_0009,delay_1Min_0009
+
+[upnp_validate_device_registration_0061_9_server]
+listofsequences=delay_0009,cpstatus_0009,discover_0009,Print_0009
+
+//ModelName < 32
+//Input given here 32 characters length
+[publish_device_0009]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-12456789012
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0009]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0009]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0009]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0009]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0009]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_10
+//Publishing a embedded device level-1
+//Discover all
+//ModelName < 32
+//Input given here 0 characters length, it should be non zero characters length
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_10]
+listofsequences=publish_device_0010,delay_1Min_0010
+
+[upnp_validate_device_registration_0061_10_server]
+listofsequences=delay_0010,cpstatus_0010,discover_0010,Print_0010
+
+//ModelName < 32
+//Input given here 0 characters length
+[publish_device_0010]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0010]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0010]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0010]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0010]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0010]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_11
+//Publishing a embedded device level-1
+//Discover all
+//Devicetype <= 64 characters not counting the version suffix and seperating colon
+//Input given here 65 characters length
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_11]
+listofsequences=publish_device_0011,delay_1Min_0011
+
+[upnp_validate_device_registration_0061_11_server]
+listofsequences=delay_0011,cpstatus_0011,discover_0011,Print_0011
+
+//Devicetype <= 64 characters not counting the version suffix and seperating colon
+//Input given here 65 characters length
+[publish_device_0011]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice190123456789012345678901234567890123456789012345:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0011]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0011]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0011]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0011]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0011]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_12
+//Publishing a embedded device level-1
+//Discover all
+//Devicetype <= 64 characters not counting the version suffix and seperating colon
+//Input given here 0 characters length
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_12]
+listofsequences=publish_device_0012,delay_1Min_0012
+
+[upnp_validate_device_registration_0061_12_server]
+listofsequences=delay_0012,cpstatus_0012,discover_0012,Print_0012
+
+//Devicetype <= 64 characters not counting the version suffix and seperating colon
+//Input given here 0 characters length
+[publish_device_0012]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device::1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0012]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0012]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0012]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0012]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0012]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_13
+//Publishing a embedded device level-1
+//Discover all
+//Devicetype must start with urn:
+//Input given here abc: characters length
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_13]
+listofsequences=publish_device_0013,delay_1Min_0013
+
+[upnp_validate_device_registration_0061_13_server]
+listofsequences=delay_0013,cpstatus_0013,discover_0013,Print_0013
+
+//Devicetype must start with urn:
+//Input given here abc: characters length
+[publish_device_0013]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=abc:symbian.com:device:12345678901234567890123456789012345678901234567890:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0013]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0013]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0013]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0013]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0013]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_14
+//Publishing a embedded device level-1
+//Discover all
+//UDN must start with uuid:
+//Input given here abcd: 
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_14]
+listofsequences=publish_device_0014,delay_1Min_0014
+
+[upnp_validate_device_registration_0061_14_server]
+listofsequences=delay_0014,cpstatus_0014,discover_0014,Print_0014
+
+//UDN must start with uuid:
+//Input given here abcd: 
+[publish_device_0014]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:12345678901234567890123456789012345678901234567890:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=abcd:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0014]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0014]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0014]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0014]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0014]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_15
+//Publishing a embedded device level-1
+//Discover all
+//UDN must start with uuid:
+//Input given here uuuid: 
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_15]
+listofsequences=publish_device_0015,delay_1Min_0015
+
+[upnp_validate_device_registration_0061_15_server]
+listofsequences=delay_0015,cpstatus_0015,discover_0015,Print_0015
+
+//UDN must start with uuid:
+//Input given here uuuid: 
+[publish_device_0015]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:12345678901234567890123456789012345678901234567890:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0015]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0015]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0015]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0015]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0015]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_16
+//Publishing a embedded device level-1
+//Discover all
+//cachecontrol should be >= 1800
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_16]
+listofsequences=publish_device_0016,delay_1Min_0016
+
+[upnp_validate_device_registration_0061_16_server]
+listofsequences=delay_0016,cpstatus_0016,discover_0016,Print_0016
+
+//cachecontrol should be >= 1800
+//Input given here 1799
+//May be in production code its set to 1800 by supressing the error
+[publish_device_0016]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:12345678901234567890123456789012345678901234567890:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1799
+
+[delay_1Min_0016]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0016]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0016]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0016]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0016]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0061_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,986 @@
+//publish_0061_rev.ini
+
+//////////////////////////////////////////////////////////////////
+// ParentDeviceUid is the UID specified in device.xml
+//Devicetype <= 64 characters
+//Friendly name < 64characters
+//Manufacturer < 64characters
+//ManufacturerURL optional
+//ModelDescription < 128
+//ModelName < 32
+//ModelNumber < 32
+//ModelURL is optional
+//SerialNumber Must be less than 64 characters
+//UPC is optional - 12 numeric 
+//UDN must start with uuid:
+//cachecontrol should be >= 1800
+//ServiceType <= 64 characters
+//DeviceType <= 64 characters
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////--------------UPNP_VALIDATE_DEVICE_REGISTRATION_0061-----------------////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//////SERVICE POINT ON REMOTE MACHINE  AND CONTROL POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061
+//Publishing a embedded device level-1
+//Discover all
+//Friendly name < 64characters
+// Input given here 64 characters
+//////////////////////////////////////////////////////////////////
+
+[upnp_validate_device_registration_0061_1_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_rev,discover_0001_rev,Print_0001_rev
+
+[upnp_validate_device_registration_0061_1_rev_server]
+listofsequences=publish_device_0001_rev,delay_1Min_0001_rev
+
+//Friendly name < 64characters
+// Input given here 64 characters
+//Publish Bad friendly name
+[publish_device_0001_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice19012345678901234567890123456789012345678901234
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0001_rev]
+operationtype=starttimer
+waittime=60000000
+
+[cpstatus_0001_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+[discover_0001_rev]
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0001_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_2
+//Publishing a embedded device level-1
+//Discover all
+//Friendly name < 64characters
+// Input given here 0 characters
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_2_rev]
+listofsequences=delay_0002_rev,cpstatus_0002_rev,discover_0002_rev,Print_0002_rev
+
+[upnp_validate_device_registration_0061_2_rev_server]
+listofsequences=publish_device_0002_rev,delay_1Min_0002_rev
+
+
+//Friendly name < 64characters
+// Input given here 0 characters
+[publish_device_0002_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0002_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0002_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0002_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0002_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0002_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_3
+//Publishing a embedded device level-1
+//Discover all
+//ModelDescription < 128
+// Input given here 128 characters
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_3_rev]
+listofsequences=delay_0003_rev,cpstatus_0003_rev,discover_0003_rev,Print_0003_rev
+
+[upnp_validate_device_registration_0061_3_rev_server]
+listofsequences=publish_device_0003_rev,delay_1Min_0003_rev
+
+//ModelDescription < 128
+// Input given here 128 characters
+[publish_device_0003_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnPFIRSTDEVICE17890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0003_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0003_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0003_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0003_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0003_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_4
+//Publishing a embedded device level-1
+//Discover all
+//ModelNumber < 32
+// Input given here 32 characters
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_4_rev]
+listofsequences=delay_0004_rev,cpstatus_0004_rev,discover_0004_rev,Print_0004_rev
+
+[upnp_validate_device_registration_0061_4_rev_server]
+listofsequences=publish_device_0004_rev,delay_1Min_0004_rev
+
+//ModelNumber < 32
+// Input given here 32 characters --is invalid
+//Model description Can be 0 characters - this is valid
+[publish_device_0004_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=12345678901234567890123456789012
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0004_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0004_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0004_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0004_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0004_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_5
+//Publishing a embedded device level-1
+//Discover all
+//SerialNumber Must be less than 64 characters
+// Input given here 64 characters
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_5_rev]
+listofsequences=delay_0005_rev,cpstatus_0005_rev,discover_0005_rev,Print_0005_rev
+
+[upnp_validate_device_registration_0061_5_rev_server]
+listofsequences=publish_device_0005_rev,delay_1Min_0005_rev
+
+
+//SerialNumber Must be less than 64 characters
+// Input given here 64 characters
+//ModelNumber Can be 0 characters - this is valid
+[publish_device_0005_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP567890123456789012345678901234567890123456789012345678901234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0005_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0005_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0005_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0005_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0005_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_6
+//Publishing a embedded device level-1
+//Discover all
+//SerialNumber can be 0 characters 
+//UPC is optional - 12 numeric 
+//Input given here 13 characters length
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_6_rev]
+listofsequences=delay_0006_rev,cpstatus_0006_rev,discover_0006_rev,Print_0006_rev
+
+[upnp_validate_device_registration_0061_6_rev_server]
+listofsequences=publish_device_0006_rev,delay_1Min_0006_rev
+
+//SerialNumber can be 0 characters  -- valid
+//UPC is optional - 12 numeric 
+//Input given here 13 characters length --Invalid
+[publish_device_0006_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0006_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0006_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0006_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0006_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0006_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_7
+//Publishing a embedded device level-1
+//Discover all
+//Manufacturer < 64characters
+//Input given here 64 characters length
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_7_rev]
+listofsequences=delay_0007_rev,cpstatus_0007_rev,discover_0007_rev,Print_0007_rev
+
+[upnp_validate_device_registration_0061_7_rev_server]
+listofsequences=publish_device_0007_rev,delay_1Min_0007_rev
+
+//Manufacturer < 64characters
+//Input given here 64 characters length
+[publish_device_0007_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian890123456789012345678901234567890123456789012345678901234
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0007_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0007_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0007_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0007_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0007_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_8
+//Publishing a embedded device level-1
+//Discover all
+//Manufacturer < 64characters
+//Input given here 0 characters length
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_8_rev]
+listofsequences=delay_0008_rev,cpstatus_0008_rev,discover_0008_rev,Print_0008_rev
+
+[upnp_validate_device_registration_0061_8_rev_server]
+listofsequences=publish_device_0008_rev,delay_1Min_0008_rev
+
+//Manufacturer < 64characters
+//Input given here 0 characters length
+[publish_device_0008_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0008_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0008_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0008_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0008_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0008_rev]
+othermachine=TRUE
+operationtype=printresults
+
+/////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_9
+//Publishing a embedded device level-1
+//Discover all
+//ModelName < 32
+//Input given here 32 characters length
+//////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_9_rev]
+listofsequences=delay_0009_rev,cpstatus_0009_rev,discover_0009_rev,Print_0009_rev
+
+[upnp_validate_device_registration_0061_9_rev_server]
+listofsequences=publish_device_0009_rev,delay_1Min_0009_rev
+
+
+//ModelName < 32
+//Input given here 32 characters length
+[publish_device_0009_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=IWS-UPNP-FIRSTDEVICE-12456789012
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0009_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0009_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0009_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0009_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0009_rev]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_10
+//Publishing a embedded device level-1
+//Discover all
+//ModelName < 32
+//Input given here 0 characters length_rev, it should be non zero characters length
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_10_rev]
+listofsequences=delay_0010_rev,cpstatus_0010_rev,discover_0010_rev,Print_0010_rev
+
+[upnp_validate_device_registration_0061_10_rev_server]
+listofsequences=publish_device_0010_rev,delay_1Min_0010_rev
+
+
+//ModelName < 32
+//Input given here 0 characters length
+[publish_device_0010_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=1234567890123
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0010_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0010_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0010_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0010_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0010_rev]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_11
+//Publishing a embedded device level-1
+//Discover all
+//Devicetype <= 64 characters not counting the version suffix and seperating colon
+//Input given here 65 characters length
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_11_rev]
+listofsequences=delay_0011_rev,cpstatus_0011_rev,discover_0011_rev,Print_0011_rev
+
+[upnp_validate_device_registration_0061_11_rev_server]
+listofsequences=publish_device_0011_rev,delay_1Min_0011_rev
+
+
+//Devicetype <= 64 characters not counting the version suffix and seperating colon
+//Input given here 65 characters length
+[publish_device_0011_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice190123456789012345678901234567890123456789012345:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0011_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0011_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0011_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0011_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0011_rev]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_12
+//Publishing a embedded device level-1
+//Discover all
+//Devicetype <= 64 characters not counting the version suffix and seperating colon
+//Input given here 0 characters length
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_12_rev]
+listofsequences=delay_0012_rev,cpstatus_0012_rev,discover_0012_rev,Print_0012_rev
+
+[upnp_validate_device_registration_0061_12_rev_server]
+listofsequences=publish_device_0012_rev,delay_1Min_0012_rev
+
+//Devicetype <= 64 characters not counting the version suffix and seperating colon
+//Input given here 0 characters length
+[publish_device_0012_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device::1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0012_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0012_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0012_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0012_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0012_rev]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_13
+//Publishing a embedded device level-1
+//Discover all
+//Devicetype must start with urn:
+//Input given here abc: characters length
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_13_rev]
+listofsequences=delay_0013_rev,cpstatus_0013_rev,discover_0013_rev,Print_0013_rev
+
+[upnp_validate_device_registration_0061_13_rev_server]
+listofsequences=publish_device_0013_rev,delay_1Min_0013_rev
+
+
+//Devicetype must start with urn:
+//Input given here abc: characters length
+[publish_device_0013_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=abc:symbian.com:device:12345678901234567890123456789012345678901234567890:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0013_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0013_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0013_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0013_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0013_rev]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_14
+//Publishing a embedded device level-1
+//Discover all
+//UDN must start with uuid:
+//Input given here abcd: 
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_14_rev]
+listofsequences=delay_0014_rev,cpstatus_0014_rev,discover_0014_rev,Print_0014_rev
+
+[upnp_validate_device_registration_0061_14_rev_server]
+listofsequences=publish_device_0014_rev,delay_1Min_0014_rev
+
+//UDN must start with uuid:
+//Input given here abcd: 
+[publish_device_0014_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:12345678901234567890123456789012345678901234567890:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=abcd:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0014_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0014_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0014_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0014_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0014_rev]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_15
+//Publishing a embedded device level-1
+//Discover all
+//UDN must start with uuid:
+//Input given here uuuid: 
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_15_rev]
+listofsequences=delay_0015_rev,cpstatus_0015_rev,discover_0015_rev,Print_0015_rev
+
+[upnp_validate_device_registration_0061_15_rev_server]
+listofsequences=publish_device_0015_rev,delay_1Min_0015_rev
+
+//UDN must start with uuid:
+//Input given here uuuid: 
+[publish_device_0015_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:12345678901234567890123456789012345678901234567890:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1810
+
+[delay_1Min_0015_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0015_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0015_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0015_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0015_rev]
+othermachine=TRUE
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+//NEGATIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0061_16
+//Publishing a embedded device level-1
+//Discover all
+//cachecontrol should be >= 1800
+////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0061_16_rev]
+listofsequences=delay_0016_rev,cpstatus_0016_rev,discover_0016_rev,Print_0016_rev
+
+[upnp_validate_device_registration_0061_16_rev_server]
+listofsequences=publish_device_0016_rev,delay_1Min_0016_rev
+
+//cachecontrol should be >= 1800
+//Input given here 1799
+//May be in production code its set to 1800 by supressing the error
+[publish_device_0016_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:12345678901234567890123456789012345678901234567890:1
+FriendlyName=FirstVendorDevice
+Manufacturer=symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=112345
+ModelName=sfsdfsd
+ModelNumber=4234234
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=4234
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=FALSE
+cachecontrol=1799
+
+[delay_1Min_0016_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0016_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0016_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0016_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0016_rev]
+othermachine=TRUE
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0062.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,63 @@
+//publish_0062.ini
+//////////////////////////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0062_1
+//Publishing a embedded device level-1
+//Discover the same
+//ModelDescription < 128
+// Input given here 0 characters --this filed is Recommeneded filed and not mnadatory
+//////////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0062_1]
+listofsequences=publish_device_0001,delay_1Min_0001
+
+[upnp_validate_device_registration_0062_1_server]
+listofsequences=delay_0001,cpstatus_0001,discover_0001,Print_0001
+
+//ModelDescription < 128
+// ModelDescription given here 0 characters
+//ModelNumber can be of 0 length
+//SerialNumber can be of 0 length
+//UPC field can be Optional
+[publish_device_0001]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+[delay_1Min_0001]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0001]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0001]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0001]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/publish_0062_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,63 @@
+//publish_0062_rev.ini
+//////////////////////////////////////////////////////////////////////////////////////
+//POSITIVE CASE--UPNP_VALIDATE_DEVICE_REGISTRATION_0062_1
+//Publishing a embedded device level-1
+//Discover the same
+//ModelDescription < 128
+// Input given here 0 characters --this filed is Recommeneded filed and not mnadatory
+//////////////////////////////////////////////////////////////////////////////////////
+[upnp_validate_device_registration_0062_1_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_rev,discover_0001_rev,Print_0001_rev
+
+[upnp_validate_device_registration_0062_1_rev_server]
+listofsequences=publish_device_0001_rev,delay_1Min_0001_rev
+
+//ModelDescription < 128
+// ModelDescription given here 0 characters
+//ModelNumber can be of 0 length
+//SerialNumber can be of 0 length
+//UPC field can be Optional
+[publish_device_0001_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=
+schedulerstart=TRUE
+stopscheduler=TRUE
+positivecase=TRUE
+
+[delay_1Min_0001_rev]
+operationtype=starttimer
+waittime=60000000
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+[cpstatus_0001_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[discover_0001_rev]
+othermachine=TRUE
+listofmxtimes=30
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstart=TRUE
+delayenabled=FALSE
+//wait time in Tics
+waittime=50000000
+
+[Print_0001_rev]
+othermachine=TRUE
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/refresh_adv_0045.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,253 @@
+//refresh_adv_0045.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////--------------UPNP_REFRESH_ADVERTISEMENT_0045--------------------------//////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+///CONTROL POINT ON REMOTE MACHINE  AND SERVICE POINT ON LOACL MACHINE/////////
+///DISCOVERY, DESCRIBE AND SUBSCRIBE HAPPENS AT CONTROL POINT//////////////////
+///ONLY PUBLISH AND SENDING NOTIFICATION SENT FROM SERVICE POINT///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////
+//Positive case -1 UPNP_REFRESH_ADVERTISEMENT_0045
+//This test will run for 11 Minutes
+//Publish service,discover all, describe, subscribe and delay for 10 min
+//////////////////////////////////////////////////////////////////////////
+
+[UPnP_Refresh_Advertisement_0001]
+listofsequences=publish_service_0001,delay_11Min_1
+
+[UPnP_Refresh_Advertisement_0001_server]
+listofsequences=delay_0001,cpstatus_0001_1,discover_0001,describe_0001,subscribe_0001,delay_0001_2,Print_0001
+
+[cpstatus_0001_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0001_2]
+operationtype=starttimer
+waittime=600000000
+
+[delay_11Min_1]
+operationtype=starttimer
+waittime=660000000
+
+//Publish a service in a root device
+[publish_service_0001]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0001]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0001]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0001]
+subscriptionduration=400
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0001
+[unsubscribe_0001]
+readini = FALSE
+
+[Print_0001]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -2 UPNP_REFRESH_ADVERTISEMENT_0045
+//At service point
+//PUBLISH 11 SERVICES IN FISRT LEVEL OF EMBEDDED DEVICE, and wait for 11 minutes
+//At control point Do register notify fro ssdp:all and wait for 11 min.
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Refresh_Advertisement_0002]
+listofsequences=delay_0002_1,publish_embedded_device_0002_1,publish_service_0002_1,publish_service_0002_2,publish_service_0002_3,publish_service_0002_4,publish_service_0002_5,publish_service_0002_6,publish_service_0002_7,publish_service_0002_8,publish_service_0002_9,publish_service_0002_10,publish_service_0002_11,delay_11Min_2_1
+
+[UPnP_Refresh_Advertisement_0002_server]
+listofsequences=cpstatus_0002_2,register_0002_2,delay_11Min_2_2,Print_0002
+
+[cpstatus_0002_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[register_0002_2]
+listofuritypes=ssdp:all
+operationtype=registernotify
+schedulerstart=FALSE
+
+//Delay for 11 min at CP
+[delay_11Min_2_2]
+operationtype=starttimer
+waittime=660000000
+
+//delay for 10 sec at SP
+[delay_0002_1]
+operationtype=starttimer
+waittime=10000000
+
+//Delay for 11 min at SP after Publish
+[delay_11Min_2_1]
+operationtype=starttimer
+waittime=660000000
+
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0002_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Publish a service1 in a embedded device -1
+[publish_service_0002_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service2 in embedded dev-1
+[publish_service_0002_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service3 in embedded dev-1
+[publish_service_0002_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service4 in embedded dev-1
+[publish_service_0002_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service5 in embedded dev-1
+[publish_service_0002_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service6 in embedded dev-1
+[publish_service_0002_6]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol1.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service7 in embedded dev-1
+[publish_service_0002_7]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scan1.xml
+servicetype=urn:schemas-upnp-org:service:SCAN1TestService7:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service8 in embedded dev-1
+[publish_service_0002_8]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\feeder1.xml
+servicetype=urn:schemas-upnp-org:service:FEEDER1TestService8:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service9 in embedded dev-1
+[publish_service_0002_9]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service10 in embedded dev-1
+[publish_service_0002_10]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml 
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service11 in embedded dev-1
+[publish_service_0002_11]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[Print_0002]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/refresh_adv_0045_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,253 @@
+//refresh_adv_0045_rev.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////--------------UPNP_REFRESH_ADVERTISEMENT_0045_REV--------------------------//////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+///CONTROL POINT ON REMOTE MACHINE  AND SERVICE POINT ON LOACL MACHINE/////////
+///DISCOVERY_rev, DESCRIBE AND SUBSCRIBE HAPPENS AT CONTROL POINT//////////////////
+///ONLY PUBLISH AND SENDING NOTIFICATION SENT FROM SERVICE POINT///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////
+//Positive case -1 UPNP_REFRESH_ADVERTISEMENT_0045
+//This test will run for 11 Minutes
+//Publish service_rev,discover all_rev, describe_rev, subscribe and delay for 10 min
+//////////////////////////////////////////////////////////////////////////
+
+[UPnP_Refresh_Advertisement_0001_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_1_rev,discover_0001_rev,describe_0001_rev,subscribe_0001_rev,delay_0001_2_rev,Print_0001_rev
+
+[UPnP_Refresh_Advertisement_0001_server_rev]
+listofsequences=publish_service_0001_rev,delay_11Min_1_rev
+
+[cpstatus_0001_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0001_2_rev]
+operationtype=starttimer
+waittime=600000000
+
+[delay_11Min_1_rev]
+operationtype=starttimer
+waittime=660000000
+
+//Publish a service in a root device
+[publish_service_0001_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0001_rev]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0001_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0001_rev]
+subscriptionduration=400
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0001
+[unsubscribe_0001_rev]
+readini = FALSE
+
+[Print_0001_rev]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -2 UPNP_REFRESH_ADVERTISEMENT_0045
+//At service point
+//PUBLISH 11 SERVICES IN FISRT LEVEL OF EMBEDDED DEVICE_rev, and wait for 11 minutes
+//At control point Do register notify fro ssdp:all and wait for 11 min.
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Refresh_Advertisement_0002_rev]
+listofsequences=cpstatus_0002_2_rev,register_0002_2_rev,delay_11Min_2_2_rev,Print_0002_rev
+
+[UPnP_Refresh_Advertisement_0002_server_rev]
+listofsequences=delay_0002_1_rev,publish_embedded_device_0002_1_rev,publish_service_0002_1_rev,publish_service_0002_2_rev,publish_service_0002_3_rev,publish_service_0002_4_rev,publish_service_0002_5_rev,publish_service_0002_6_rev,publish_service_0002_7_rev,publish_service_0002_8_rev,publish_service_0002_9_rev,publish_service_0002_10_rev,publish_service_0002_11_rev,delay_11Min_2_1_rev
+
+[cpstatus_0002_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[register_0002_2_rev]
+listofuritypes=ssdp:all
+operationtype=registernotify
+schedulerstart=FALSE
+
+//Delay for 11 min at CP
+[delay_11Min_2_2_rev]
+operationtype=starttimer
+waittime=660000000
+
+//delay for 10 sec at SP
+[delay_0002_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Delay for 11 min at SP after Publish
+[delay_11Min_2_1_rev]
+operationtype=starttimer
+waittime=660000000
+
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0002_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Publish a service1 in a embedded device -1
+[publish_service_0002_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service2 in embedded dev-1
+[publish_service_0002_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service3 in embedded dev-1
+[publish_service_0002_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service4 in embedded dev-1
+[publish_service_0002_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service5 in embedded dev-1
+[publish_service_0002_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service6 in embedded dev-1
+[publish_service_0002_6_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol1.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service7 in embedded dev-1
+[publish_service_0002_7_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scan1.xml
+servicetype=urn:schemas-upnp-org:service:SCAN1TestService7:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service8 in embedded dev-1
+[publish_service_0002_8_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\feeder1.xml
+servicetype=urn:schemas-upnp-org:service:FEEDER1TestService8:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service9 in embedded dev-1
+[publish_service_0002_9_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service10 in embedded dev-1
+[publish_service_0002_10_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml 
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service11 in embedded dev-1
+[publish_service_0002_11_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[Print_0002_rev]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,34 @@
+//register.ini
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+// 1. Register Notify and Do not start Scheduler
+// 2. Publish and Do Start Scheduler
+// 3. OnPnPEvent of Publish Response... Donot Stop Scheduler
+// 4. In Presence announcements Close Service point that you opened
+// 5. In Absence announcements Stop (now you are expected to get the Bye bye) Scheduler
+// 6. Now you may validate against expected results
+/////////////////////////////////////////////////////////////////////////////////////////////
+[UPnP_RegisterAnnouncements_0]
+listofsequences=register_0_1,publishService_0_1,Print_0_1
+
+[publishService_0_1]
+operationtype=publishservice
+description=ServiceControlPoint
+servicetype=urn:schemas-upnp-org:service:TestBulb:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+location=http://10.192.196.235:51743/_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstatus=TRUE
+stopscheduler=FALSE
+
+[register_0_1]
+uri=ssdp:all
+operationtype=registernotify
+schedulerstatus=FALSE
+
+[Print_0_1]
+operationtype=printresults
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register_0036.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,347 @@
+//register_0036.ini
+//upnp_register_notify_0036.script
+/////////////////////////////////////////////////////////////////////////////////////////////
+// 1. Register Notify and Do not start Scheduler
+// 2. Publish and Do Start Scheduler
+// 3. OnPnPEvent of Publish Response... Donot Stop Scheduler
+// 4. In Presence announcements Close Service point that you opened
+// 5. In Absence announcements Stop (now you are expected to get the Bye bye) Scheduler
+// 6. Now you may validate against expected results
+/////////////////////////////////////////////////////////////////////////////////////////////
+[upnp_register_notify_0036_1]
+listofsequences=cpstatus_0036_1,register_0036_1,delay_3Min_0036_1,Print_0036_1
+
+[upnp_register_notify_0036_1_server]
+listofsequences=delay_0036_1,publishService_0036_1,delay_2Min_0036_1
+
+[delay_3Min_0036_1]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_1]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_1]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_1]
+listofuritypes=ssdp:all,upnp:rootdevice,urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_1]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+[upnp_register_notify_0036_2]
+listofsequences=cpstatus_0036_2,register_0036_2,delay_3Min_0036_2,Print_0036_2
+
+[upnp_register_notify_0036_2_server]
+listofsequences=delay_0036_2,publishService_0036_2,delay_2Min_0036_2
+
+[delay_3Min_0036_2]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_2]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_2]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_2]
+listofuritypes=upnp:rootdevice
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_2]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+[upnp_register_notify_0036_3]
+listofsequences=cpstatus_0036_3,register_0036_3,delay_3Min_0036_3,Print_0036_3
+
+[upnp_register_notify_0036_3_server]
+listofsequences=delay_0036_3,publishService_0036_3,delay_2Min_0036_3
+
+[delay_3Min_0036_3]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_3]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_3]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_3]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_3]
+listofuritypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_3]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+[upnp_register_notify_0036_4]
+listofsequences=cpstatus_0036_4,register_0036_4,delay_3Min_0036_4,Print_0036_4
+
+[upnp_register_notify_0036_4_server]
+listofsequences=delay_0036_4,publishService_0036_4,delay_2Min_0036_4
+
+[delay_3Min_0036_4]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_4]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_4]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_4]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_4]
+listofuritypes=uuid:25a0be80-8775-4988-b627-720fbd44a627
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_4]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+[upnp_register_notify_0036_5]
+listofsequences=cpstatus_0036_5,register_0036_5_1,register_0036_5_2,register_0036_5_3,delay_3Min_0036_5,Print_0036_5
+
+[upnp_register_notify_0036_5_server]
+listofsequences=delay_0036_5,publishService_0036_5,delay_2Min_0036_5
+
+[delay_3Min_0036_5]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_5]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_5]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_5]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_5_1]
+listofuritypes=upnp:rootdevice
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_5_2]
+listofuritypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_5_3]
+listofuritypes=uuid:25a0be80-8775-4988-b627-720fbd44a627
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_5]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+[upnp_register_notify_0036_6]
+listofsequences=cpstatus_0036_6,register_0036_6_1,register_0036_6_2,register_0036_6_3,register_0036_6_4,delay_3Min_0036_6,Print_0036_6
+
+[upnp_register_notify_0036_6_server]
+listofsequences=delay_0036_6,publishService_0036_6,delay_2Min_0036_6
+
+[delay_3Min_0036_6]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_6]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_6]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_6]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_6]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_6_1]
+listofuritypes=upnp:rootdevice
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_6_2]
+listofuritypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_6_3]
+listofuritypes=uuid:25a0be80-8775-4988-b627-720fbd44a627
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_6_4]
+listofuritypes=ssdp:all,upnp:rootdevice,urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_6]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+[upnp_validate_3+2d+k]
+listofsequences=cpstatus,register,Print
+
+[upnp_validate_3+2d+k_server]
+listofsequences=delay,publishService,delay_3Min
+
+[delay_2Min]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register]
+listofuritypes=ssdp:all
+operationtype=registernotify
+schedulerstatus=FALSE
+
+[Print]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register_0036_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,305 @@
+//register_0036.ini
+//upnp_register_notify_0036.script
+/////////////////////////////////////////////////////////////////////////////////////////////
+// 1. Register Notify and Do not start Scheduler
+// 2. Publish and Do Start Scheduler
+// 3. OnPnPEvent of Publish Response... Donot Stop Scheduler
+// 4. In Presence announcements Close Service point that you opened
+// 5. In Absence announcements Stop (now you are expected to get the Bye bye) Scheduler
+// 6. Now you may validate against expected results
+/////////////////////////////////////////////////////////////////////////////////////////////
+[upnp_register_notify_0036_1_rev]
+listofsequences=delay_0036_1_rev,publishService_0036_1_rev,delay_2Min_0036_1_rev
+
+[upnp_register_notify_0036_1_rev_server]
+listofsequences=cpstatus_0036_1_rev,register_0036_1_rev,delay_3Min_0036_1_rev,Print_0036_1_rev
+
+[delay_3Min_0036_1_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_1_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_1_rev]
+listofuritypes=ssdp:all,upnp:rootdevice,urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstatus=FALSE
+
+[Print_0036_1_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+[upnp_register_notify_0036_2_rev]
+listofsequences=delay_0036_2_rev,publishService_0036_2_rev,delay_2Min_0036_2_rev
+
+[upnp_register_notify_0036_2_rev_server]
+listofsequences=cpstatus_0036_2_rev,register_0036_2_rev,delay_3Min_0036_2_rev,Print_0036_2_rev
+
+[delay_3Min_0036_2_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_2_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_2_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_2_rev]
+listofuritypes=upnp:rootdevice
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_2_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+[upnp_register_notify_0036_3_rev]
+listofsequences=delay_0036_3_rev,publishService_0036_3_rev,delay_2Min_0036_3_rev
+
+[upnp_register_notify_0036_3_rev_server]
+listofsequences=cpstatus_0036_3_rev,register_0036_3_rev,delay_3Min_0036_3_rev,Print_0036_3_rev
+
+[delay_3Min_0036_3_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_3_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_3_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_3_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_3_rev]
+listofuritypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_3_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+[upnp_register_notify_0036_4_rev]
+listofsequences=delay_0036_4_rev,publishService_0036_4_rev,delay_2Min_0036_4_rev
+
+[upnp_register_notify_0036_4_rev_server]
+listofsequences=cpstatus_0036_4_rev,register_0036_4_rev,delay_3Min_0036_4_rev,Print_0036_4_rev
+
+[delay_3Min_0036_4_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_4_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_4_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_4_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_4_rev]
+listofuritypes=uuid:25a0be80-8775-4988-b627-720fbd44a627
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_4_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+[upnp_register_notify_0036_5_rev]
+listofsequences=delay_0036_5_rev,publishService_0036_5_rev,delay_2Min_0036_5_rev
+
+[upnp_register_notify_0036_5_rev_server]
+listofsequences=cpstatus_0036_5_rev,register_0036_5_1_rev,register_0036_5_2_rev,register_0036_5_3_rev,delay_3Min_0036_5_rev,Print_0036_5_rev
+
+[delay_3Min_0036_5_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_5_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_5_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_5_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_5_1_rev]
+listofuritypes=upnp:rootdevice
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_5_2_rev]
+listofuritypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_5_3_rev]
+listofuritypes=uuid:25a0be80-8775-4988-b627-720fbd44a627
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_5_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+[upnp_register_notify_0036_6_rev]
+listofsequences=delay_0036_6_rev,publishService_0036_6_rev,delay_2Min_0036_6_rev
+
+[upnp_register_notify_0036_6_rev_server]
+listofsequences=cpstatus_0036_6_rev,register_0036_6_1_rev,register_0036_6_2_rev,register_0036_6_3_rev,register_0036_6_4_rev,delay_3Min_0036_6_rev,Print_0036_6_rev
+
+[delay_3Min_0036_6_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_2Min_0036_6_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0036_6_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0036_6_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0036_6_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0036_6_1_rev]
+listofuritypes=upnp:rootdevice
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_6_2_rev]
+listofuritypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_6_3_rev]
+listofuritypes=uuid:25a0be80-8775-4988-b627-720fbd44a627
+operationtype=registernotify
+schedulerstart=FALSE
+
+[register_0036_6_4_rev]
+listofuritypes=ssdp:all,upnp:rootdevice,urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstart=FALSE
+
+[Print_0036_6_rev]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register_0037.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,103 @@
+//register_0037.ini
+/////////////////////////////////////////////////////////////////////////////////////////////
+// 1. Register Notify and Do not start Scheduler
+// 2. Publish and Do Start Scheduler
+// 3. OnPnPEvent of Publish Response... Donot Stop Scheduler
+// 4. In Presence announcements Close Service point that you opened
+// 5. In Absence announcements Stop (now you are expected to get the Bye bye) Scheduler
+// 6. Now you may validate against expected results
+/////////////////////////////////////////////////////////////////////////////////////////////
+[upnp_cancel_register_notify_0037_1]
+listofsequences=cpstatus_0037_1,register_0037_1,delay_1Min_0037_1,cancel_register_0037_1,Print_0037_1
+
+[upnp_cancel_register_notify_0037_1_server]
+listofsequences=delay_0037_1,publishService_0037_1,delay_2Min_0037_1
+
+[delay_1Min_0037_1]
+operationtype=starttimer
+waittime=60000000
+
+[cancel_register_0037_1]
+operationtype=cancelnotify
+uri=ssdp:all
+[delay_2Min_0037_1]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0037_1]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0037_1]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0037_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0037_1]
+listofuritypes=ssdp:all,upnp:rootdevice,urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstatus=FALSE
+
+[Print_0037_1]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////
+[upnp_cancel_register_notify_0037_2]
+listofsequences=cpstatus_0037_2,register_0037_2,delay_1Min_0037_2,cancel_register_0037_2,Print_0037_2
+
+[upnp_cancel_register_notify_0037_2_server]
+listofsequences=delay_0037_2,publishService_0037_2,delay_2Min_0037_2
+
+[delay_1Min_0037_2]
+operationtype=starttimer
+waittime=60000000
+
+[cancel_register_0037_2]
+operationtype=cancelnotify
+uri=ssdp:all
+[delay_2Min_0037_2]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0037_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0037_2]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0037_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0037_2]
+listofuritypes=ssdp:all,upnp:rootdevice,urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstatus=FALSE
+
+[Print_0037_2]
+operationtype=printresults
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/register_0037_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,105 @@
+//register_0037_rev.ini
+//upnp_register_notify_0037.script
+/////////////////////////////////////////////////////////////////////////////////////////////
+// 1. Register Notify and Do not start Scheduler
+// 2. Publish and Do Start Scheduler
+// 3. OnPnPEvent of Publish Response... Donot Stop Scheduler
+// 4. In Presence announcements Close Service point that you opened
+// 5. In Absence announcements Stop (now you are expected to get the Bye bye) Scheduler
+// 6. Now you may validate against expected results
+/////////////////////////////////////////////////////////////////////////////////////////////
+[upnp_cancel_register_notify_0037_1_rev]
+listofsequences=delay_0037_1_rev,publishService_0037_1_rev,delay_2Min_0037_1_rev
+
+[upnp_cancel_register_notify_0037_1_rev_server]
+listofsequences=cpstatus_0037_1_rev,register_0037_1_rev,delay_1Min_0037_1_rev,cancel_register_0037_1_rev,Print_0037_1_rev
+
+[delay_1Min_0037_1_rev]
+operationtype=starttimer
+waittime=60000000
+
+[cancel_register_0037_1_rev]
+operationtype=cancelnotify
+uri=ssdp:all
+[delay_2Min_0037_1_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0037_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0037_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0037_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0037_1_rev]
+listofuritypes=ssdp:all,upnp:rootdevice,urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstatus=FALSE
+
+[Print_0037_1_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////
+[upnp_cancel_register_notify_0037_2_rev]
+listofsequences=delay_0037_2_rev,publishService_0037_2_rev,delay_2Min_0037_2_rev
+
+[upnp_cancel_register_notify_0037_2_rev_server]
+listofsequences=cpstatus_0037_2_rev,register_0037_2_rev,delay_1Min_0037_2_rev,cancel_register_0037_2_rev,Print_0037_2_rev
+
+
+[delay_1Min_0037_2_rev]
+operationtype=starttimer
+waittime=60000000
+
+[cancel_register_0037_2_rev]
+operationtype=cancelnotify
+uri=ssdp:allout
+[delay_2Min_0037_2_rev]
+operationtype=starttimer
+waittime=120000000
+
+[cpstatus_0037_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0037_2_rev]
+operationtype=starttimer
+waittime=10000000
+
+//Publish a standrad root service
+[publishService_0037_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[register_0037_2_rev]
+listofuritypes=ssdp:all,upnp:rootdevice,urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=registernotify
+schedulerstatus=FALSE
+
+[Print_0037_2_rev]
+operationtype=printresults
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/sendnotify.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,123 @@
+//sendnotify.ini
+
+[SendNotify_0001]
+listofsequences=publishdevice_1,publish_service_1,publish_service_2,publish_service_3,publish_service_4,publish_service_5,delay_2Min_1,Print_1
+
+[SendNotify_0001_server]
+listofsequences=delay_0001,cpstatus_0001,discover_0001,describe_device_0001,subscribe_0001,delay_1Min_1,Print_1
+
+[delay_0001]
+operationtype=starttimer
+waittime=30000000
+
+[cpstatus_0001]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_2Min_1]
+operationtype=starttimer
+waittime=120000000
+
+[delay_1Min_1]
+operationtype=starttimer
+waittime=60000000
+
+//Discover all
+[discover_0001]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_device_0001]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+cancelall=TRUE
+
+//Extracts EVENT SUB URLs and subscribe
+//This Subscription valid tll timeout
+[subscribe_0001]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0001
+
+[unsubscribe_0001]
+readini = FALSE
+
+[publishdevice_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+positivecase=TRUE
+
+[publish_service_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+
+[publish_service_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+
+[publish_service_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+
+[publish_service_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+
+[publish_service_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+expectednotifications=5
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[Print_1]
+operationtype=printresults
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/sendnotify_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,123 @@
+//sendnotify_rev.ini
+
+[SendNotify_0001_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_rev,discover_0001_rev,describe_device_0001_rev,subscribe_0001_rev,delay_1Min_1_rev,Print_1_rev
+
+[SendNotify_0001_rev_server]
+listofsequences=publishdevice_1_rev,publish_service_1_rev,publish_service_2_rev,publish_service_3_rev,publish_service_4_rev,publish_service_5_rev,delay_2Min_1_rev,Print_1_rev
+
+[cpstatus_0001_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=30000000
+
+[delay_2Min_1_rev]
+operationtype=starttimer
+waittime=120000000
+
+[delay_1Min_1_rev]
+operationtype=starttimer
+waittime=60000000
+
+//Discover all
+[discover_0001_rev]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_device_0001_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+cancelall=TRUE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0001_rev]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0001_rev
+
+[unsubscribe_0001_rev]
+readini = FALSE
+
+[publishdevice_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:symbian.com:device:FirstVendorDevice:1
+FriendlyName=FirstVendorDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FIRSTDEVICE Ver1
+ModelName=IWS-UPNP-FIRSTDEVICE-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-TESTDEVICE-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ChildLevel-1
+UPC=123456789012
+sendnotifications=TRUE
+positivecase=TRUE
+
+[publish_service_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+
+[publish_service_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+
+[publish_service_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+
+[publish_service_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+
+[publish_service_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+sendnotifications=TRUE
+expectednotifications=5
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+[Print_1_rev]
+operationtype=printresults
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0038.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1748 @@
+//subscribe_0038.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////--------------UPNP_REGISTER_STATE_CHANGE_SERVICES_0038--------------------------//////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+///CONTROL POINT ON REMOTE MACHINE  AND SERVICE POINT ON LOACL MACHINE/////////
+///DISCOVERY, DESCRIBE AND SUBSCRIBE HAPPENS AT CONTROL POINT//////////////////
+///ONLY PUBLISH AND SENDING NOTIFICATION SENT FROM SERVICE POINT///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//Positive case -1 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service,discover all, describe, subscribe
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0001]
+listofsequences=publish_service_0001,delay_3Min_1
+
+[UPnP_Subscribe_0001_server]
+listofsequences=delay_0001,cpstatus_0001_2,discover_0001,describe_0001,subscribe_0001,Print_0001
+
+[cpstatus_0001_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_1]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0001]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0001]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0001]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0001]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0001
+[unsubscribe_0001]
+readini = FALSE
+
+[Print_0001]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -2 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service,discover service published, describe, subscribe
+// also introduced
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0002]
+listofsequences=publish_service_0002,delay_3Min_2
+
+[UPnP_Subscribe_0002_server]
+listofsequences=delay_0002_1,cpstatus_0002_2,discover_0002,describe_0002,subscribe_0002,Print_0002
+//delay_0002_2,
+[cpstatus_0002_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0002_2]
+operationtype=starttimer
+waittime=100000000
+
+[delay_3Min_2]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0002]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0002]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0002]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0002]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0002
+[unsubscribe_0002]
+readini = FALSE
+
+[Print_0002]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -3 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root ,discover service published, describe, subscribe
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0003]
+listofsequences=publish_service_0003_1,publish_service_0003_2,publish_service_0003_3,publish_service_0003_4,publish_service_0003_5,delay_3Min_3
+
+[UPnP_Subscribe_0003_server]
+listofsequences=delay_0003_1,cpstatus_0003_2,discover_0003,describe_0003,subscribe_0003,Print_0003
+
+[cpstatus_0003_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0003_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_3]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0003_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[publish_service_0003_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0003_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0003_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0003_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0003]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0003]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0003]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0003
+[unsubscribe_0003]
+readini = FALSE
+
+[Print_0003]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -4 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root ,discover service published, describe, subscribe, delay for 3 min
+//There is only difference between Case 3 and 4 is Delay @ end at Control point side
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0004]
+listofsequences=publish_service_0004_1,publish_service_0004_2,publish_service_0004_3,publish_service_0004_4,publish_service_0004_5,delay_3Min_4
+
+[UPnP_Subscribe_0004_server]
+listofsequences=delay_0004_1,cpstatus_0004_2,discover_0004,describe_0004,subscribe_0004,delay_0004_2,Print_0004
+
+[cpstatus_0004_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0004_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0004_2]
+operationtype=starttimer
+waittime=150000000
+
+[delay_3Min_4]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0004_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+[publish_service_0004_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0004]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0004]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0004]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0004
+[unsubscribe_0004]
+readini = FALSE
+
+[Print_0004]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -5 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device ,
+//discover service published, describe, subscribe, delay for 3 min
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0005]
+listofsequences=publish_embedded_device_0001_1,publish_service_0005_1,publish_service_0005_2,publish_service_0005_3,delay_3Min_4
+
+[UPnP_Subscribe_0005_server]
+listofsequences=delay_0005_1,cpstatus_0005_2,discover_0005,describe_0005,subscribe_0005,delay_0005_2,Print_0005
+
+[cpstatus_0005_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0005_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0005_2]
+operationtype=starttimer
+waittime=150000000
+
+[delay_3Min_4]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0005_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0005_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0005_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0005]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0005]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0005]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0005
+[unsubscribe_0005]
+readini = FALSE
+
+[Print_0005]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -6 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish a service in root ,discover service published, describe, subscribe
+// AFTER SUBSCRIBE RESPONSE OF INITIAL EVENT MESSAGE CLOSE CONTROL POINT ABRUPTLY
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0006]
+listofsequences=publish_service_0006,delay_3Min_6
+
+[UPnP_Subscribe_0006_server]
+listofsequences=delay_0006_1,cpstatus_0006_2,discover_0006,describe_0006,subscribe_0006,Print_0006
+
+[cpstatus_0006_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0006_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_6]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0006]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0006]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0006]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0006]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+abruptclosecp=TRUE
+refersection=unsubscribe_0006
+[unsubscribe_0006]
+readini = FALSE
+
+[Print_0006]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -7 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root ,discover service published, describe, subscribe
+// AFTER SUBSCRIBE RESPONSE OF INITIAL EVENT MESSAGE CLOSE CONTROL POINT ABRUPTLY
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0007]
+listofsequences=publish_service_0007_1,publish_service_0007_2,publish_service_0007_3,publish_service_0007_4,publish_service_0007_5,delay_3Min_7
+
+[UPnP_Subscribe_0007_server]
+listofsequences=delay_0007_1,cpstatus_0007_2,discover_0007,describe_0007,subscribe_0007,Print_0007
+
+[cpstatus_0007_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0007_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_7]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0007_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[publish_service_0007_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0007_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0007_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0007_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0007]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0007]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0007]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+abruptclosecp=TRUE
+refersection=unsubscribe_0007
+[unsubscribe_0007]
+readini = FALSE
+
+[Print_0007]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -8 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device ,
+//discover service published, describe, subscribe, delay for 3 min
+//TRY WITH OUT DEALY AFTER SUBSCRIPTION REQUESTS  
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0008]
+listofsequences=publish_embedded_device_0001_1,publish_service_0008_1,publish_service_0008_2,publish_service_0008_3,delay_3Min_4
+
+[UPnP_Subscribe_0008_server]
+listofsequences=delay_0008_1,cpstatus_0008_2,discover_0008,describe_0008,subscribe_0008,Print_0008
+
+[cpstatus_0008_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0008_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_4]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0008_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0008_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0008_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0008]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0008]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0008]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0008
+[unsubscribe_0008]
+readini = FALSE
+
+[Print_0008]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -9 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device ,
+//discover service published, describe, subscribe, delay for 3 min
+// AFTER SUBSCRIBE RESPONSE OF INITIAL EVENT MESSAGE CLOSE CONTROL POINT ABRUPTLY
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0009]
+listofsequences=publish_embedded_device_0001_1,publish_service_0009_1,publish_service_0009_2,publish_service_0009_3,delay_3Min_4
+
+[UPnP_Subscribe_0009_server]
+listofsequences=delay_0009_1,cpstatus_0009_2,discover_0009,describe_0009,subscribe_0009,Print_0009
+
+[cpstatus_0009_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0009_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_4]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0009_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0009_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0009_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0009]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0009]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0009]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+abruptclosecp=TRUE
+refersection=unsubscribe_0009
+[unsubscribe_0009]
+readini = FALSE
+
+[Print_0009]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -10 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels ,discover service published, describe, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0010]
+listofsequences=publish_embedded_device_0010_1,publish_embedded_device_0010_2,publish_embedded_device_0010_3,publish_service_0010_1,publish_service_0010_2,publish_service_0010_3,publish_service_0010_4,publish_service_0010_5,delay_3Min_10
+
+[UPnP_Subscribe_0010_server]
+listofsequences=delay_0010_1,cpstatus_0010_2,discover_0010,describe_0010,subscribe_0010,Print_0010
+//delay_0010_2,
+[cpstatus_0010_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0010_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0010_2]
+operationtype=starttimer
+waittime=120000000
+
+[delay_3Min_10]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0010_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0010_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0010_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0010_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0010_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0010_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-2
+[publish_service_0010_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-3
+[publish_service_0010_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0010]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0010]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0010]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0010
+[unsubscribe_0010]
+readini = FALSE
+
+[Print_0010]
+operationtype=printresults
+
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -11 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels ,discover service published, describe, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS WITHOUT DELAY AFTER SUSBCRIPTION
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0011]
+listofsequences=publish_embedded_device_0011_1,publish_embedded_device_0011_2,publish_embedded_device_0011_3,publish_service_0011_1,publish_service_0011_2,publish_service_0011_3,publish_service_0011_4,publish_service_0011_5,delay_3Min_11
+
+[UPnP_Subscribe_0011_server]
+listofsequences=delay_0011_1,cpstatus_0011_2,discover_0011,describe_0011,subscribe_0011,Print_0011
+
+[cpstatus_0011_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0011_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_11]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0011_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0011_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0011_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0011_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0011_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0011_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-2
+[publish_service_0011_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-3
+[publish_service_0011_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0011]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0011]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0011]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0011
+[unsubscribe_0011]
+readini = FALSE
+
+[Print_0011]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -12 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels ,discover service published, describe, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS 
+// AND CLOSE ABRUPTLY AFTER RECEIVING INITIAL EVENT MESSAGES
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0012]
+listofsequences=publish_embedded_device_0012_1,publish_embedded_device_0012_2,publish_embedded_device_0012_3,publish_service_0012_1,publish_service_0012_2,publish_service_0012_3,publish_service_0012_4,publish_service_0012_5,delay_3Min_12
+
+[UPnP_Subscribe_0012_server]
+listofsequences=delay_0012_1,cpstatus_0012_2,discover_0012,describe_0012,subscribe_0012,Print_0012
+
+[cpstatus_0012_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0012_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_12]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0012_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0012_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0012_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0012_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0012_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0012_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-2
+[publish_service_0012_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-3
+[publish_service_0012_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0012]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0012]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//CLOSE ABRUPTLY AFTER INITIAL EVENT MESSAGE
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0012]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+abruptclosecp=TRUE
+refersection=unsubscribe_0012
+[unsubscribe_0012]
+readini = FALSE
+
+[Print_0012]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -13 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//PUBLISH 11 SERVICES IN FISRT LEVEL OF EMBEDDED DEVICE,
+//Discover service published, describe, subscribe
+//Delay after subsriptions is introduced to receive notifications
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0013]
+listofsequences=publish_embedded_device_0013_1,publish_service_0013_1,publish_service_0013_2,publish_service_0013_3,publish_service_0013_4,publish_service_0013_5,publish_service_0013_6,publish_service_0013_7,publish_service_0013_8,publish_service_0013_9,publish_service_0013_10,publish_service_0013_11,delay_4Min_13
+
+[UPnP_Subscribe_0013_server]
+listofsequences=delay_0013_1,cpstatus_0013_2,discover_0013,describe_0013,subscribe_0013,delay_0013_2,Print_0013
+
+[cpstatus_0013_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0013_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0013_2]
+operationtype=starttimer
+waittime=200000000
+
+[delay_4Min_13]
+operationtype=starttimer
+waittime=240000000
+
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0013_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service1 in a embedded device -1
+[publish_service_0013_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service2 in embedded dev-1
+[publish_service_0013_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service3 in embedded dev-1
+[publish_service_0013_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service4 in embedded dev-1
+[publish_service_0013_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service5 in embedded dev-1
+[publish_service_0013_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service6 in embedded dev-1
+[publish_service_0013_6]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol1.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service7 in embedded dev-1
+[publish_service_0013_7]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scan1.xml
+servicetype=urn:schemas-upnp-org:service:SCAN1TestService7:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service8 in embedded dev-1
+[publish_service_0013_8]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\feeder1.xml
+servicetype=urn:schemas-upnp-org:service:FEEDER1TestService8:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service9 in embedded dev-1
+[publish_service_0013_9]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service10 in embedded dev-1
+[publish_service_0013_10]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml 
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service11 in embedded dev-1
+[publish_service_0013_11]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0013]
+listofmxtimes=30,35,40,45,50,55,60,65,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1,urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1,urn:schemas-upnp-org:service:SCAN1TestService7:1,urn:schemas-upnp-org:service:FEEDER1TestService8:1,urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1,urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1,urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0013]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0013]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0013
+[unsubscribe_0013]
+readini = FALSE
+
+[Print_0013]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -14 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service,discover all, describe, subscribe with duplicate bundle
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0014]
+listofsequences=publish_service_0014,delay_3Min_14
+
+[UPnP_Subscribe_0014_server]
+listofsequences=delay_0014,cpstatus_0014,discover_0014,describe_0014,subscribe_0014_1,subscribe_0014_2,Print_0014
+
+[cpstatus_0014]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0014]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_14]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0014]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0014]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0014]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0014_1]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=FALSE
+stopscheduler=TRUE
+refersection=unsubscribe_0014
+[unsubscribe_0014]
+readini = FALSE
+
+[subscribe_0014_2]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0014_2
+[unsubscribe_0014_2]
+readini = FALSE
+
+[Print_0014]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -15 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service,discover all, describe, subscribe with duplicate bundle
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0015]
+listofsequences=publish_service_0015,delay_3Min_15
+
+[UPnP_Subscribe_0015_server]
+listofsequences=delay_0015,cpstatus_0015,discover_0015,describe_0015,subscribe_0015_1,subscribe_0015_2,Print_0015
+
+[cpstatus_0015]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0015]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_15]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0015]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0015]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0015]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0015_1]
+subscriptionduration=60
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=FALSE
+stopscheduler=TRUE
+refersection=unsubscribe_0015
+[unsubscribe_0015]
+readini = FALSE
+
+[subscribe_0015_2]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = TRUE
+subscriptionuri = http://www.google.com/dummyurl
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0015_2
+[unsubscribe_0015_2]
+readini = FALSE
+
+[Print_0015]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0038_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1760 @@
+//subscribe_0038_rev.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////--------------UPNP_REGISTER_STATE_CHANGE_SERVICES_0038--------------------------//////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//////SERVICE POINT ON REMOTE MACHINE  AND CONTROL POINT ON LOACL MACHINE//////
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+///CONTROL POINT ON REMOTE MACHINE  AND SERVICE POINT ON LOACL MACHINE/////////
+///DISCOVERY_rev, DESCRIBE AND SUBSCRIBE HAPPENS AT CONTROL POINT//////////////////
+///ONLY PUBLISH AND SENDING NOTIFICATION SENT FROM SERVICE POINT///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//Positive case -1 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service_rev,discover all_rev, describe_rev, subscribe
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0001_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_1_rev,discover_0001_rev,describe_0001_rev,subscribe_0001_rev,Print_0001_rev
+
+[UPnP_Subscribe_0001_rev_server]
+listofsequences=publish_service_0001_rev,delay_3Min_1
+
+[cpstatus_0001_1_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_1]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0001_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0001_rev]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0001_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0001_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0001_rev
+[unsubscribe_0001_rev]
+readini = FALSE
+
+[Print_0001_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -2 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service_rev,discover service published_rev, describe_rev, subscribe
+//
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0002_rev]
+listofsequences=delay_0002_1_rev,cpstatus_0002_2_rev,discover_0002_rev,describe_0002_rev,subscribe_0002_rev,Print_0002_rev
+
+//,delay_0002_2_rev
+
+[UPnP_Subscribe_0002_rev_server]
+listofsequences=publish_service_0002_rev,delay_3Min_2_rev
+
+[cpstatus_0002_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0002_2_rev]
+operationtype=starttimer
+waittime=100000000
+
+[delay_3Min_2_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0002_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0002_rev]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0002_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0002_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0002_rev
+[unsubscribe_0002_rev]
+readini = FALSE
+
+[Print_0002_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -3 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root _rev,discover service published_rev, describe_rev, subscribe
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0003_rev]
+listofsequences=delay_0003_1_rev,cpstatus_0003_2_rev,discover_0003_rev,describe_0003_rev,subscribe_0003_rev,Print_0003_rev
+
+[UPnP_Subscribe_0003_rev_server]
+listofsequences=publish_service_0003_1_rev,publish_service_0003_2_rev,publish_service_0003_3_rev,publish_service_0003_4_rev,publish_service_0003_5_rev,delay_3Min_3_rev
+
+[cpstatus_0003_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0003_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_3_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0003_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[publish_service_0003_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0003_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0003_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0003_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0003_rev]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0003_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0003_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0003_rev
+[unsubscribe_0003_rev]
+readini = FALSE
+
+[Print_0003_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -4 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root _rev,discover service published_rev, describe_rev, subscribe_rev, delay for 3 min
+//There is only difference between Case 3 and 4 is Delay @ end at Control point side
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0004_rev]
+listofsequences=delay_0004_1_rev,cpstatus_0004_2_rev,discover_0004_rev,describe_0004_rev,subscribe_0004_rev,delay_0004_2_rev,Print_0004_rev
+
+[UPnP_Subscribe_0004_rev_server]
+listofsequences=publish_service_0004_1_rev,publish_service_0004_2_rev,publish_service_0004_3_rev,publish_service_0004_4_rev,publish_service_0004_5_rev,delay_3Min_4_rev
+
+[cpstatus_0004_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0004_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0004_2_rev]
+operationtype=starttimer
+waittime=150000000
+
+[delay_3Min_4_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0004_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+[publish_service_0004_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+
+//Discover published service
+[discover_0004_rev]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0004_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0004_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0004_rev
+[unsubscribe_0004_rev]
+readini = FALSE
+
+[Print_0004_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -5 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device _rev,
+//discover service published_rev, describe_rev, subscribe_rev, delay for 3 min
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0005_rev]
+listofsequences=delay_0005_1_rev,cpstatus_0005_2_rev,discover_0005_rev,describe_0005_rev,subscribe_0005_rev,delay_0005_2_rev,Print_0005_rev
+
+[UPnP_Subscribe_0005_rev_server]
+listofsequences=publish_embedded_device_0001_1_rev,publish_service_0005_1_rev,publish_service_0005_2_rev,publish_service_0005_3_rev,delay_3Min_4_rev
+
+[cpstatus_0005_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0005_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0005_2_rev]
+operationtype=starttimer
+waittime=150000000
+
+[delay_3Min_4_rev]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0005_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0005_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0005_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0005_rev]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0005_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0005_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0005_rev
+[unsubscribe_0005_rev]
+readini = FALSE
+
+[Print_0005_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -6 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish a service in root _rev,discover service published_rev, describe_rev, subscribe
+// AFTER SUBSCRIBE RESPONSE OF INITIAL EVENT MESSAGE CLOSE CONTROL POINT ABRUPTLY
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0006_rev]
+listofsequences=delay_0006_1_rev,cpstatus_0006_2_rev,discover_0006_rev,describe_0006_rev,subscribe_0006_rev,Print_0006_rev
+
+[UPnP_Subscribe_0006_rev_server]
+listofsequences=publish_service_0006_rev,delay_3Min_6_rev
+
+[cpstatus_0006_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0006_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_6_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0006_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0006_rev]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0006_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0006_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+abruptclosecp=TRUE
+refersection=unsubscribe_0006_rev
+[unsubscribe_0006_rev]
+readini = FALSE
+
+[Print_0006_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -7 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root _rev,discover service published_rev, describe_rev, subscribe
+// AFTER SUBSCRIBE RESPONSE OF INITIAL EVENT MESSAGE CLOSE CONTROL POINT ABRUPTLY
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0007_rev]
+listofsequences=delay_0007_1_rev,cpstatus_0007_2_rev,discover_0007_rev,describe_0007_rev,subscribe_0007_rev,Print_0007_rev
+
+[UPnP_Subscribe_0007_rev_server]
+listofsequences=publish_service_0007_1_rev,publish_service_0007_2_rev,publish_service_0007_3_rev,publish_service_0007_4_rev,publish_service_0007_5_rev,delay_3Min_7_rev
+
+[cpstatus_0007_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0007_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_7_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0007_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+[publish_service_0007_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0007_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0007_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+[publish_service_0007_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0007_rev]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0007_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0007_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+abruptclosecp=TRUE
+refersection=unsubscribe_0007_rev
+[unsubscribe_0007_rev]
+readini = FALSE
+
+[Print_0007_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -8 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device _rev,
+//discover service published_rev, describe_rev, subscribe_rev, delay for 3 min
+//TRY WITH OUT DEALY AFTER SUBSCRIPTION REQUESTS  
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0008_rev]
+listofsequences=delay_0008_1_rev,cpstatus_0008_2_rev,discover_0008_rev,describe_0008_rev,subscribe_0008_rev,Print_0008_rev
+
+[UPnP_Subscribe_0008_rev_server]
+listofsequences=publish_embedded_device_0001_1_rev,publish_service_0008_1_rev,publish_service_0008_2_rev,publish_service_0008_3_rev,delay_3Min_4_rev
+
+[cpstatus_0008_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0008_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_4_rev]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0008_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0008_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0008_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0008_rev]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0008_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0008_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0008_rev
+[unsubscribe_0008_rev]
+readini = FALSE
+
+[Print_0008_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -9 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device _rev,
+//discover service published_rev, describe_rev, subscribe_rev, delay for 3 min
+// AFTER SUBSCRIBE RESPONSE OF INITIAL EVENT MESSAGE CLOSE CONTROL POINT ABRUPTLY
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0009_rev]
+listofsequences=delay_0009_1_rev,cpstatus_0009_2_rev,discover_0009_rev,describe_0009_rev,subscribe_0009_rev,Print_0009_rev
+
+[UPnP_Subscribe_0009_rev_server]
+listofsequences=publish_embedded_device_0001_1_rev,publish_service_0009_1_rev,publish_service_0009_2_rev,publish_service_0009_3_rev,delay_3Min_4_rev
+
+[cpstatus_0009_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0009_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_4_rev]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0009_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0009_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in a MediaServer device
+[publish_service_0009_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0009_rev]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0009_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0009_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+abruptclosecp=TRUE
+refersection=unsubscribe_0009_rev
+[unsubscribe_0009_rev]
+readini = FALSE
+
+[Print_0009_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -10 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels _rev,discover service published_rev, describe_rev, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0010_rev]
+listofsequences=delay_0010_1_rev,cpstatus_0010_2_rev,discover_0010_rev,describe_0010_rev,subscribe_0010_rev,Print_0010_rev
+
+//delay_0010_2_rev,
+
+[UPnP_Subscribe_0010_rev_server]
+listofsequences=publish_embedded_device_0010_1_rev,publish_embedded_device_0010_2_rev,publish_embedded_device_0010_3_rev,publish_service_0010_1_rev,publish_service_0010_2_rev,publish_service_0010_3_rev,publish_service_0010_4_rev,publish_service_0010_5_rev,delay_3Min_10_rev
+
+[cpstatus_0010_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0010_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0010_2_rev]
+operationtype=starttimer
+waittime=120000000
+
+[delay_3Min_10_rev]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0010_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0010_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0010_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0010_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0010_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0010_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-2
+[publish_service_0010_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-3
+[publish_service_0010_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0010_rev]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0010_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0010_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0010_rev
+[unsubscribe_0010_rev]
+readini = FALSE
+
+[Print_0010_rev]
+operationtype=printresults
+
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -11 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels _rev,discover service published_rev, describe_rev, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS WITHOUT DELAY AFTER SUSBCRIPTION
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0011_rev]
+listofsequences=delay_0011_1_rev,cpstatus_0011_2_rev,discover_0011_rev,describe_0011_rev,subscribe_0011_rev,Print_0011_rev
+
+[UPnP_Subscribe_0011_rev_server]
+listofsequences=publish_embedded_device_0011_1_rev,publish_embedded_device_0011_2_rev,publish_embedded_device_0011_3_rev,publish_service_0011_1_rev,publish_service_0011_2_rev,publish_service_0011_3_rev,publish_service_0011_4_rev,publish_service_0011_5_rev,delay_3Min_11_rev
+
+[cpstatus_0011_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0011_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_11_rev]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0011_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0011_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0011_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0011_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0011_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0011_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-2
+[publish_service_0011_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-3
+[publish_service_0011_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0011_rev]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0011_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0011_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0011_rev
+[unsubscribe_0011_rev]
+readini = FALSE
+
+[Print_0011_rev]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -12 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels _rev,discover service published_rev, describe_rev, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS 
+// AND CLOSE ABRUPTLY AFTER RECEIVING INITIAL EVENT MESSAGES
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0012_rev]
+listofsequences=delay_0012_1_rev,cpstatus_0012_2_rev,discover_0012_rev,describe_0012_rev,subscribe_0012_rev,Print_0012_rev
+
+[UPnP_Subscribe_0012_rev_server]
+listofsequences=publish_embedded_device_0012_1_rev,publish_embedded_device_0012_2_rev,publish_embedded_device_0012_3_rev,publish_service_0012_1_rev,publish_service_0012_2_rev,publish_service_0012_3_rev,publish_service_0012_4_rev,publish_service_0012_5_rev,delay_3Min_12_rev
+
+[cpstatus_0012_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0012_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_12_rev]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0012_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0012_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0012_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0012_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0012_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-1
+[publish_service_0012_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-2
+[publish_service_0012_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in embedded dev-3
+[publish_service_0012_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0012_rev]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0012_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//CLOSE ABRUPTLY AFTER INITIAL EVENT MESSAGE
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0012_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+abruptclosecp=TRUE
+refersection=unsubscribe_0012_rev
+[unsubscribe_0012_rev]
+readini = FALSE
+
+[Print_0012_rev]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -13 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//PUBLISH 11 SERVICES IN FISRT LEVEL OF EMBEDDED DEVICE_rev,
+//Discover service published_rev, describe_rev, subscribe
+//Delay after subsriptions is introduced to receive notifications
+//
+////////////////////////////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0013_rev]
+listofsequences=delay_0013_1_rev,cpstatus_0013_2_rev,discover_0013_rev,describe_0013_rev,subscribe_0013_rev,delay_0013_2_rev,Print_0013_rev
+
+[UPnP_Subscribe_0013_rev_server]
+listofsequences=publish_embedded_device_0013_1_rev,publish_service_0013_1_rev,publish_service_0013_2_rev,publish_service_0013_3_rev,publish_service_0013_4_rev,publish_service_0013_5_rev,publish_service_0013_6_rev,publish_service_0013_7_rev,publish_service_0013_8_rev,publish_service_0013_9_rev,publish_service_0013_10_rev,publish_service_0013_11_rev,delay_4Min_13_rev
+
+[cpstatus_0013_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0013_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0013_2_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_4Min_13_rev]
+operationtype=starttimer
+waittime=240000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0013_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service1 in a embedded device -1
+[publish_service_0013_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service2 in embedded dev-1
+[publish_service_0013_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service3 in embedded dev-1
+[publish_service_0013_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service4 in embedded dev-1
+[publish_service_0013_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service5 in embedded dev-1
+[publish_service_0013_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service6 in embedded dev-1
+[publish_service_0013_6_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol1.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service7 in embedded dev-1
+[publish_service_0013_7_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scan1.xml
+servicetype=urn:schemas-upnp-org:service:SCAN1TestService7:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service8 in embedded dev-1
+[publish_service_0013_8_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\feeder1.xml
+servicetype=urn:schemas-upnp-org:service:FEEDER1TestService8:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service9 in embedded dev-1
+[publish_service_0013_9_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service10 in embedded dev-1
+[publish_service_0013_10_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml 
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service11 in embedded dev-1
+[publish_service_0013_11_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Discover published service
+[discover_0013_rev]
+listofmxtimes=30,35,40,45,50,55,60,65,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1,urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1,urn:schemas-upnp-org:service:SCAN1TestService7:1,urn:schemas-upnp-org:service:FEEDER1TestService8:1,urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1,urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1,urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0013_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0013_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0013
+[unsubscribe_0013_rev]
+readini = FALSE
+
+[Print_0013_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -14 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service,discover all, describe, subscribe with duplicate bundle
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0014_rev]
+listofsequences=delay_0014_rev,cpstatus_0014_rev,discover_0014_rev,describe_0014_rev,subscribe_0014_1_rev,subscribe_0014_2_rev,Print_0014_rev
+
+[UPnP_Subscribe_0014_server_rev]
+listofsequences=publish_service_0014_rev,delay_3Min_14_rev
+
+[cpstatus_0014_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0014_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_14_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0014_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0014_rev]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0014_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0014_1_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=FALSE
+stopscheduler=TRUE
+refersection=unsubscribe_0014
+[unsubscribe_0014_rev]
+readini = FALSE
+
+[subscribe_0014_2_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0014_2
+[unsubscribe_0014_2_rev]
+readini = FALSE
+
+[Print_0014_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -15 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service,discover all, describe, subscribe with duplicate bundle
+/////////////////////////////////////////////////////////////////
+
+[UPnP_Subscribe_0015_rev]
+listofsequences=delay_0015_rev,cpstatus_0015_rev,discover_0015_rev,describe_0015_rev,subscribe_0015_1_rev,subscribe_0015_2_rev,Print_0015_rev
+
+[UPnP_Subscribe_0015_server_rev]
+listofsequences=publish_service_0015_rev,delay_3Min_15_rev
+
+[cpstatus_0015_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0015_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_15_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0015_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0015_rev]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0015_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0015_1_rev]
+subscriptionduration=60
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=FALSE
+stopscheduler=TRUE
+refersection=unsubscribe_0015
+[unsubscribe_0015_rev]
+readini = FALSE
+
+[subscribe_0015_2_rev]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = TRUE
+subscriptionuri = http://www.google.com/dummyurl
+schedulerstart=TRUE
+stopscheduler=TRUE
+refersection=unsubscribe_0015_2
+[unsubscribe_0015_2_rev]
+readini = FALSE
+
+[Print_0015_rev]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0039.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1222 @@
+//subscribe_0039.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_1]
+listofsequences=publish_service_0039_1,delay_3Min_1
+
+[upnp_renew_subscription_0039_1_server]
+listofsequences=delay_0039_1,cpstatus_0039_1_2,discover_0039_1,describe_0039_1,subscribe_0039_1,Print_0039_1
+
+[cpstatus_0039_1_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0039_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_1]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0039_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0039_1]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0039_1]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+//Also specifies info for Renew subscriptions
+[subscribe_0039_1]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+unsubscribeflag=FALSE
+renewflag=TRUE
+refersection=unsubscribe_0039_1
+
+[unsubscribe_0039_1]
+readini = FALSE
+unsubscribeflag=TRUE
+
+[Print_0039_1]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -2 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service,discover service published, describe, subscribe
+/////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_2]
+listofsequences=publish_service_0002,delay_3Min_2
+
+[upnp_renew_subscription_0039_2_server]
+listofsequences=delay_0002_1,cpstatus_0002_2,discover_0002,describe_0002,subscribe_0002,delay_0002_2,Print_0002
+
+[cpstatus_0002_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0002_2]
+operationtype=starttimer
+waittime=100000000
+
+[delay_3Min_2]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0002]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0002]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0002]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0002]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0002
+[unsubscribe_0002]
+readini = FALSE
+
+[Print_0002]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -3 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root ,discover service published, describe, subscribe
+/////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_3]
+listofsequences=publish_service_0003_1,publish_service_0003_2,publish_service_0003_3,publish_service_0003_4,publish_service_0003_5,delay_3Min_3
+
+[upnp_renew_subscription_0039_3_server]
+listofsequences=delay_0003_1,cpstatus_0003_2,discover_0003,describe_0003,subscribe_0003,Print_0003
+
+[cpstatus_0003_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0003_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_3]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0003_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+
+[publish_service_0003_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0003_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0003_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0003_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0003]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+
+//Describe the Dev.Locations
+[describe_0003]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0003]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0003
+[unsubscribe_0003]
+readini = FALSE
+
+[Print_0003]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -4 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root ,discover service published, describe, subscribe, delay for 3 min
+//There is only difference between Case 3 and 4 is Delay @ end at Control point side
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_4]
+listofsequences=publish_service_0004_1,publish_service_0004_2,publish_service_0004_3,publish_service_0004_4,publish_service_0004_5,delay_3Min_4
+
+[upnp_renew_subscription_0039_4_server]
+listofsequences=delay_0004_1,cpstatus_0004_2,discover_0004,describe_0004,subscribe_0004,delay_0004_2,Print_0004
+
+[cpstatus_0004_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0004_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0004_2]
+operationtype=starttimer
+waittime=150000000
+
+[delay_3Min_4]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0004_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+[publish_service_0004_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0004]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0004]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0004]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0004
+[unsubscribe_0004]
+readini = FALSE
+
+[Print_0004]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -5 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device ,
+//discover service published, describe, subscribe, delay for 3 min
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_5]
+listofsequences=publish_embedded_device_0001_1,publish_service_0005_1,publish_service_0005_2,publish_service_0005_3,delay_3Min_5
+
+[upnp_renew_subscription_0039_5_server]
+listofsequences=delay_0005_1,cpstatus_0005_2,discover_0005,describe_0005,subscribe_0005,delay_0005_2,Print_0005
+
+[cpstatus_0005_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0005_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0005_2]
+operationtype=starttimer
+waittime=150000000
+
+[delay_3Min_5]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0005_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0005_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0005_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0005]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0005]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0005]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0005
+[unsubscribe_0005]
+readini = FALSE
+
+[Print_0005]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -6 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device ,
+//discover service published, describe, subscribe, delay for 3 min
+//TRY WITH OUT DEALY AFTER SUBSCRIPTION REQUESTS  
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_6]
+listofsequences=publish_embedded_device_0001_1,publish_service_0006_1,publish_service_0006_2,publish_service_0006_3,delay_3Min_6
+
+[upnp_renew_subscription_0039_6_server]
+listofsequences=delay_0006_1,cpstatus_0006_2,discover_0006,describe_0006,subscribe_0006,Print_0006
+
+[cpstatus_0006_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0006_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_6]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0006_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0006_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0006_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0006]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+
+//Describe the Dev.Locations
+[describe_0006]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0006]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0006
+[unsubscribe_0006]
+readini = FALSE
+
+[Print_0006]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -7 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels ,discover service published, describe, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS
+/////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_7]
+listofsequences=publish_embedded_device_0007_1,publish_embedded_device_0007_2,publish_embedded_device_0007_3,publish_service_0007_1,publish_service_0007_2,publish_service_0007_3,publish_service_0007_4,publish_service_0007_5,delay_3Min_7
+
+[upnp_renew_subscription_0039_7_server]
+listofsequences=delay_0007_1,cpstatus_0007_2,discover_0007,describe_0007,subscribe_0007,Print_0007
+
+//delay_0007_2,
+
+[cpstatus_0007_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0007_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0007_2]
+operationtype=starttimer
+waittime=120000000
+
+[delay_3Min_7]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0007_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0007_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0007_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0007_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-1
+[publish_service_0007_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-1
+[publish_service_0007_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-2
+[publish_service_0007_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-3
+[publish_service_0007_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0007]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0007]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0007]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0007
+[unsubscribe_0007]
+readini = FALSE
+
+[Print_0007]
+operationtype=printresults
+
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -8 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels ,discover service published, describe, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS WITHOUT DELAY AFTER SUSBCRIPTION
+////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_8]
+listofsequences=publish_embedded_device_0008_1,publish_embedded_device_0008_2,publish_embedded_device_0008_3,publish_service_0008_1,publish_service_0008_2,publish_service_0008_3,publish_service_0008_4,publish_service_0008_5,delay_3Min_8
+
+[upnp_renew_subscription_0039_8_server]
+listofsequences=delay_0008_1,cpstatus_0008_2,discover_0008,describe_0008,subscribe_0008,Print_0008
+
+[cpstatus_0008_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0008_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_8]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0008_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0008_2]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0008_3]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0008_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-1
+[publish_service_0008_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-1
+[publish_service_0008_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-2
+[publish_service_0008_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-3
+[publish_service_0008_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+
+//Discover published service
+[discover_0008]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0008]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0008]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0008
+[unsubscribe_0008]
+readini = FALSE
+
+[Print_0008]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -9 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//PUBLISH 11 SERVICES IN FISRT LEVEL OF EMBEDDED DEVICE,
+//Discover service published, describe, subscribe
+//Delay after subsriptions is introduced to receive notifications
+////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_9]
+listofsequences=publish_embedded_device_0009_1,publish_service_0009_1,publish_service_0009_2,publish_service_0009_3,publish_service_0009_4,publish_service_0009_5,publish_service_0009_6,publish_service_0009_7,publish_service_0009_8,publish_service_0009_9,publish_service_0009_10,publish_service_0009_11,delay_4Min_9
+
+[upnp_renew_subscription_0039_9_server]
+listofsequences=delay_0009_1,cpstatus_0009_2,discover_0009,describe_0009,subscribe_0009,delay_0009_2,Print_0009
+
+[cpstatus_0009_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0009_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0009_2]
+operationtype=starttimer
+waittime=200000000
+
+[delay_4Min_9]
+operationtype=starttimer
+waittime=240000000
+
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0009_1]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service1 in a embedded device -1
+[publish_service_0009_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service2 in embedded dev-1
+[publish_service_0009_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service3 in embedded dev-1
+[publish_service_0009_3]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service4 in embedded dev-1
+[publish_service_0009_4]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service5 in embedded dev-1
+[publish_service_0009_5]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service6 in embedded dev-1
+[publish_service_0009_6]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol1.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service7 in embedded dev-1
+[publish_service_0009_7]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scan1.xml
+servicetype=urn:schemas-upnp-org:service:SCAN1TestService7:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service8 in embedded dev-1
+[publish_service_0009_8]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\feeder1.xml
+servicetype=urn:schemas-upnp-org:service:FEEDER1TestService8:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service9 in embedded dev-1
+[publish_service_0009_9]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service10 in embedded dev-1
+[publish_service_0009_10]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml 
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service11 in embedded dev-1
+[publish_service_0009_11]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0009]
+listofmxtimes=30,35,40,45,50,55,60,65,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1,urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1,urn:schemas-upnp-org:service:SCAN1TestService7:1,urn:schemas-upnp-org:service:FEEDER1TestService8:1,urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1,urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1,urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0009]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0009]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0009
+[unsubscribe_0009]
+readini = FALSE
+
+[Print_0009]
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+///In discovery "ssdp:all" and descibe and subscribe the same
+//////////////////////////////////////////////////////////////////////////////
+[upnp_renew_subscription_0039_10]
+listofsequences=publish_service_0039_10,delay_3Min_10
+
+[upnp_renew_subscription_0039_10_server]
+listofsequences=delay_0039_10,cpstatus_0039_10_10,discover_0039_10,describe_0039_10,subscribe_0039_10,Print_0039_10
+
+[cpstatus_0039_10_10]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0039_10]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_10]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0039_10]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0039_10]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0039_10]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+//Also specifies info for Renew subscriptions
+[subscribe_0039_10]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+unsubscribeflag=FALSE
+renewflag=TRUE
+refersection=unsubscribe_0039_10
+
+[unsubscribe_0039_10]
+readini = FALSE
+
+[Print_0039_10]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0039_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1223 @@
+//subscribe_0039_rev.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_1_rev]
+listofsequences=delay_0039_1_rev,cpstatus_0039_1_2_rev,discover_0039_1_rev,describe_0039_1_rev,subscribe_0039_1_rev,Print_0039_1_rev
+
+[upnp_renew_subscription_0039_1_rev_server]
+listofsequences=publish_service_0039_1_rev,delay_3Min_1_rev
+
+[cpstatus_0039_1_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0039_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_1_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0039_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0039_1_rev]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0039_1_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+//Also specifies info for Renew subscriptions
+[subscribe_0039_1_rev]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+unsubscribeflag=FALSE
+renewflag=TRUE
+refersection=unsubscribe_0039_1_rev
+
+[unsubscribe_0039_1_rev]
+readini = FALSE
+unsubscribeflag=TRUE
+
+[Print_0039_1_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////
+//Positive case -2 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service_rev,discover service published_rev, describe_rev, subscribe
+/////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_2_rev]
+listofsequences=delay_0002_1_rev,cpstatus_0002_2_rev,discover_0002_rev,describe_0002_rev,subscribe_0002_rev,delay_0002_2_rev,Print_0002_rev
+
+[upnp_renew_subscription_0039_2_rev_server]
+listofsequences=publish_service_0002_rev,delay_3Min_2_rev
+
+[cpstatus_0002_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0002_2_rev]
+operationtype=starttimer
+waittime=100000000
+
+[delay_3Min_2_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0002_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0002_rev]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0002_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0002_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0002
+[unsubscribe_0002_rev]
+readini = FALSE
+
+[Print_0002_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -3 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root _rev,discover service published_rev, describe_rev, subscribe
+/////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_3_rev]
+listofsequences=delay_0003_1_rev,cpstatus_0003_2_rev,discover_0003_rev,describe_0003_rev,subscribe_0003_rev,Print_0003_rev
+
+[upnp_renew_subscription_0039_3_rev_server]
+listofsequences=publish_service_0003_1_rev,publish_service_0003_2_rev,publish_service_0003_3_rev,publish_service_0003_4_rev,publish_service_0003_5_rev,delay_3Min_3_rev
+
+[cpstatus_0003_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0003_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_3_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0003_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+
+[publish_service_0003_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0003_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0003_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0003_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0003_rev]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+
+//Describe the Dev.Locations
+[describe_0003_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0003_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0003
+[unsubscribe_0003_rev]
+readini = FALSE
+
+[Print_0003_rev]
+operationtype=printresults
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -4 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Root _rev,discover service published_rev, describe_rev, subscribe_rev, delay for 3 min
+//There is only difference between Case 3 and 4 is Delay @ end at Control point side
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_4_rev]
+listofsequences=delay_0004_1_rev,cpstatus_0004_2_rev,discover_0004_rev,describe_0004_rev,subscribe_0004_rev,delay_0004_2_rev,Print_0004_rev
+
+[upnp_renew_subscription_0039_4_rev_server]
+listofsequences=publish_service_0004_1_rev,publish_service_0004_2_rev,publish_service_0004_3_rev,publish_service_0004_4_rev,publish_service_0004_5_rev,delay_3Min_4_rev
+
+[cpstatus_0004_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0004_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0004_2_rev]
+operationtype=starttimer
+waittime=150000000
+
+[delay_3Min_4_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0004_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+[publish_service_0004_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+
+[publish_service_0004_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+
+//Discover published service
+[discover_0004_rev]
+listofmxtimes=30,40,50,60,70
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0004_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0004_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0004
+[unsubscribe_0004_rev]
+readini = FALSE
+
+[Print_0004_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -5 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device _rev,
+//discover service published_rev, describe_rev, subscribe_rev, delay for 3 min
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_5_rev]
+listofsequences=delay_0005_1_rev,cpstatus_0005_2_rev,discover_0005_rev,describe_0005_rev,subscribe_0005_rev,delay_0005_2_rev,Print_0005_rev
+
+[upnp_renew_subscription_0039_5_rev_server]
+listofsequences=publish_embedded_device_0001_1_rev,publish_service_0005_1_rev,publish_service_0005_2_rev,publish_service_0005_3_rev,delay_3Min_5_rev
+
+[cpstatus_0005_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0005_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0005_2_rev]
+operationtype=starttimer
+waittime=150000000
+
+[delay_3Min_5_rev]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0005_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0005_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0005_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0005_rev]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0005_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0005_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0005
+[unsubscribe_0005_rev]
+readini = FALSE
+
+[Print_0005_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Positive case -6 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 3 services in embedded device _rev,
+//discover service published_rev, describe_rev, subscribe_rev, delay for 3 min
+//TRY WITH OUT DEALY AFTER SUBSCRIPTION REQUESTS  
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_6_rev]
+listofsequences=delay_0006_1_rev,cpstatus_0006_2_rev,discover_0006_rev,describe_0006_rev,subscribe_0006_rev,Print_0006_rev
+
+[upnp_renew_subscription_0039_6_rev_server]
+listofsequences=publish_embedded_device_0001_1_rev,publish_service_0006_1_rev,publish_service_0006_2_rev,publish_service_0006_3_rev,delay_3Min_6_rev
+
+[cpstatus_0006_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0006_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_6_rev]
+operationtype=starttimer
+waittime=150000000
+
+//MediaServer -- embedded device
+[publish_embedded_device_0001_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:MediaServer:1
+FriendlyName=MediaServer
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP MediaServer Ver1
+ModelName=IWS-UPNP-MEDIASERVER-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-MEDIASERVER-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-MediaServer-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0006_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTransport:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0006_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml
+servicetype=urn:schemas-upnp-org:service:ContentDirectory:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in a MediaServer device
+[publish_service_0006_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:ConnectionManager:1
+usn=uuid:25a0be80-8775-4988-b628-MediaServer-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0006_rev]
+listofmxtimes=30,40,50
+listofservicetypes=urn:schemas-upnp-org:service:AVTransport:1,urn:schemas-upnp-org:service:ContentDirectory:1,urn:schemas-upnp-org:service:ConnectionManager:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+
+//Describe the Dev.Locations
+[describe_0006_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0006_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0006
+[unsubscribe_0006_rev]
+readini = FALSE
+
+[Print_0006_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -7 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels _rev,discover service published_rev, describe_rev, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS
+/////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_7_rev]
+listofsequences=delay_0007_1_rev,cpstatus_0007_2_rev,discover_0007_rev,describe_0007_rev,subscribe_0007_rev,Print_0007_rev
+//delay_0007_2_rev,
+
+[upnp_renew_subscription_0039_7_rev_server]
+listofsequences=publish_embedded_device_0007_1_rev,publish_embedded_device_0007_2_rev,publish_embedded_device_0007_3_rev,publish_service_0007_1_rev,publish_service_0007_2_rev,publish_service_0007_3_rev,publish_service_0007_4_rev,publish_service_0007_5_rev,delay_3Min_7_rev
+
+[cpstatus_0007_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0007_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0007_2_rev]
+operationtype=starttimer
+waittime=120000000
+
+[delay_3Min_7_rev]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0007_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0007_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0007_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0007_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-1
+[publish_service_0007_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-1
+[publish_service_0007_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-2
+[publish_service_0007_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-3
+[publish_service_0007_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+//Discover published service
+[discover_0007_rev]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0007_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0007_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0007
+[unsubscribe_0007_rev]
+readini = FALSE
+
+[Print_0007_rev]
+operationtype=printresults
+
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -8 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish 5 services in Different levels _rev,discover service published_rev, describe_rev, subscribe
+// SUBSCRIBE TO SERVICES PUBLISHED IN DIFFERENT LEVELS WITHOUT DELAY AFTER SUSBCRIPTION
+////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_8_rev]
+listofsequences=delay_0008_1_rev,cpstatus_0008_2_rev,discover_0008_rev,describe_0008_rev,subscribe_0008_rev,Print_0008_rev
+
+[upnp_renew_subscription_0039_8_rev_server]
+listofsequences=publish_embedded_device_0008_1_rev,publish_embedded_device_0008_2_rev,publish_embedded_device_0008_3_rev,publish_service_0008_1_rev,publish_service_0008_2_rev,publish_service_0008_3_rev,publish_service_0008_4_rev,publish_service_0008_5_rev,delay_3Min_8_rev
+
+
+[cpstatus_0008_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0008_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_8_rev]
+operationtype=starttimer
+waittime=150000000
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0008_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//SecondDevice -- embedded device
+[publish_embedded_device_0008_2_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+DeviceType=urn:schemas-upnp-org:device:SecondDevice:1
+FriendlyName=SecondDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP SecondDevice Ver1
+ModelName=IWS-UPNP-SecondDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-SecondDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//ThirdDevice -- embedded device
+[publish_embedded_device_0008_3_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+DeviceType=urn:schemas-upnp-org:device:ThirdDevice:1
+FriendlyName=ThirdDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP ThirdDevice Ver1
+ModelName=IWS-UPNP-ThirdDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-ThirdDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service in a root device
+[publish_service_0008_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-1
+[publish_service_0008_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-1
+[publish_service_0008_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-2
+[publish_service_0008_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-SecondDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+
+//Publish a service in embedded dev-3
+[publish_service_0008_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-ThirdDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+
+
+//Discover published service
+[discover_0008_rev]
+listofmxtimes=30,50,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0008_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0008_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0008
+[unsubscribe_0008_rev]
+readini = FALSE
+
+[Print_0008_rev]
+operationtype=printresults
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Positive case -9 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//PUBLISH 11 SERVICES IN FISRT LEVEL OF EMBEDDED DEVICE_rev,
+//Discover service published_rev, describe_rev, subscribe
+//Delay after subsriptions is introduced to receive notifications
+////////////////////////////////////////////////////////////////////////////////////////
+
+[upnp_renew_subscription_0039_9_rev]
+listofsequences=delay_0009_1_rev,cpstatus_0009_2_rev,discover_0009_rev,describe_0009_rev,subscribe_0009_rev,delay_0009_2_rev,Print_0009_rev
+
+[upnp_renew_subscription_0039_9_rev_server]
+listofsequences=publish_embedded_device_0009_1_rev,publish_service_0009_1_rev,publish_service_0009_2_rev,publish_service_0009_3_rev,publish_service_0009_4_rev,publish_service_0009_5_rev,publish_service_0009_6_rev,publish_service_0009_7_rev,publish_service_0009_8_rev,publish_service_0009_9_rev,publish_service_0009_10_rev,publish_service_0009_11_rev,delay_4Min_9_rev
+
+[cpstatus_0009_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0009_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_0009_2_rev]
+operationtype=starttimer
+waittime=200000000
+
+[delay_4Min_9_rev]
+operationtype=starttimer
+waittime=240000000
+
+
+//FirstDevice -- embedded device
+[publish_embedded_device_0009_1_rev]
+operationtype=publishdevice
+ParentDeviceUid=uuid:25a0be80-8775-4988-b627-720fbd44a627
+DeviceType=urn:schemas-upnp-org:device:FirstDevice:1
+FriendlyName=FirstDevice
+Manufacturer=Symbian
+ManufacturerURL=http://www.symbian.com/
+ModelDescription=UPnP FirstDevice Ver1
+ModelName=IWS-UPNP-FirstDevice-1
+ModelNumber=IWS-UPNP-TESTDEVICE-1
+ModelURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+PresentationURL=http://www.symbian.com/IWS-UPNP-FirstDevice-1
+SerialNumber=UPNP0123456789012345678901234567890123456789
+UDN=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+UPC=123456789012
+positivecase=TRUE
+cachecontrol=1810
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+
+//Publish a service1 in a embedded device -1
+[publish_service_0009_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+period=180
+positivecase=TRUE
+
+//Publish a service2 in embedded dev-1
+[publish_service_0009_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager2.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service3 in embedded dev-1
+[publish_service_0009_3_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory2.xml
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service4 in embedded dev-1
+[publish_service_0009_4_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service5 in embedded dev-1
+[publish_service_0009_5_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+servicetype=urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service6 in embedded dev-1
+[publish_service_0009_6_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol1.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service7 in embedded dev-1
+[publish_service_0009_7_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\scan1.xml
+servicetype=urn:schemas-upnp-org:service:SCAN1TestService7:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service8 in embedded dev-1
+[publish_service_0009_8_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\feeder1.xml
+servicetype=urn:schemas-upnp-org:service:FEEDER1TestService8:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service9 in embedded dev-1
+[publish_service_0009_9_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport1.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service10 in embedded dev-1
+[publish_service_0009_10_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\contentdirectory1.xml 
+servicetype=urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service11 in embedded dev-1
+[publish_service_0009_11_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\connectionmanager1.xml
+servicetype=urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+usn=uuid:25a0be80-8775-4988-b628-FirstDevice-1
+cachecontrol=1810
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover published service
+[discover_0009_rev]
+listofmxtimes=30,35,40,45,50,55,60,65,70,90,110
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1,urn:schemas-upnp-org:service:CONNECTIONMANAGERTestService2:1,urn:schemas-upnp-org:service:CONTENTDIRECTORYTestService3:1,urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1,urn:schemas-upnp-org:service:SCHEDULEDRECORDINGTestService5:1,urn:schemas-upnp-org:service:RENDERINGCONTROL1TestService6:1,urn:schemas-upnp-org:service:SCAN1TestService7:1,urn:schemas-upnp-org:service:FEEDER1TestService8:1,urn:schemas-upnp-org:service:AVTRANSPORT1TestService9:1,urn:schemas-upnp-org:service:CONTENTDIRECTORY1TestService10:1,urn:schemas-upnp-org:service:CONNECTIONMANAGER1TestService11:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0009_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+
+//Extracts EVENT SUB URLs and subscribe
+[subscribe_0009_rev]
+subscriptionduration=40
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+renewflag=TRUE
+refersection=unsubscribe_0009
+[unsubscribe_0009_rev]
+readini = FALSE
+
+[Print_0009_rev]
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+///In discovery "ssdp:all" and descibe and subscribe the same
+//////////////////////////////////////////////////////////////////////////////
+[upnp_renew_subscription_0039_10_rev]
+listofsequences=delay_0039_10_rev,cpstatus_0039_10_10_rev,discover_0039_10_rev,describe_0039_10_rev,subscribe_0039_10_rev,Print_0039_10_rev
+
+[upnp_renew_subscription_0039_10_rev_server]
+listofsequences=publish_service_0039_10_rev,delay_3Min_10_rev
+
+[cpstatus_0039_10_10_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0039_10_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_3Min_10_rev]
+operationtype=starttimer
+waittime=150000000
+
+//Publish a service in a root device
+[publish_service_0039_10_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0039_10_rev]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0039_10_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+
+//Extracts EVENT SUB URLs and subscribe
+//Also specifies info for Renew subscriptions
+[subscribe_0039_10_rev]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+unsubscribeflag=FALSE
+renewflag=TRUE
+refersection=unsubscribe_0039_10
+
+[unsubscribe_0039_10_rev]
+readini = FALSE
+
+[Print_0039_10_rev]
+operationtype=printresults
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0042.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,157 @@
+//subscribe_0042.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+[upnp_unsubscribe_0042_1]
+listofsequences=publish_service_0042_1,delay_2Min_1
+
+[upnp_unsubscribe_0042_1_server]
+listofsequences=delay_0042_1,cpstatus_0042_1_2,discover_0042_1,describe_0042_1,subscribe_0042_1,Print_0042_1
+
+[cpstatus_0042_1_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0042_1]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_1]
+operationtype=starttimer
+waittime=100000000
+
+//Publish a service in a root device
+[publish_service_0042_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0042_1]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0042_1]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+cancelall=TRUE
+expecteddescriptions=1
+
+//Extracts EVENT SUB URLs and subscribe
+//Also specifies info for unsubscribe
+[subscribe_0042_1]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+unsubscribeflag=TRUE
+refersection=unsubscribe_0042_1
+renewflag=FALSE
+
+[unsubscribe_0042_1]
+readini = FALSE
+
+[Print_0042_1]
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+///In discovery "ssdp:all" and descibe and subscribe the same
+//////////////////////////////////////////////////////////////////////////////
+
+[upnp_unsubscribe_0042_2]
+listofsequences=publish_service_0042_2_1,publish_service_0042_2_2,delay_2Min_1
+
+[upnp_unsubscribe_0042_2_server]
+listofsequences=delay_0042_2,cpstatus_0042_2_2,discover_0042_2,describe_0042_2,subscribe_0042_2,Print_0042_2
+
+[cpstatus_0042_2_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0042_2]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_1]
+operationtype=starttimer
+waittime=100000000
+
+//First sevice
+[publish_service_0042_2_1]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in a root device
+[publish_service_0042_2_2]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0042_2]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0042_2]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+cancelall=TRUE
+expecteddescriptions=1
+
+//Extracts EVENT SUB URLs and subscribe
+//Also specifies info for unsubscribe
+[subscribe_0042_2]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+unsubscribeflag=TRUE
+refersection=unsubscribe_0042_2
+renewflag=FALSE
+
+[unsubscribe_0042_2]
+readini = FALSE
+
+[Print_0042_2]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/subscribe_0042_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,157 @@
+//subscribe_0042_rev.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+[upnp_unsubscribe_0042_1_rev]
+listofsequences=delay_0042_1_rev,cpstatus_0042_1_2_rev,discover_0042_1_rev,describe_0042_1_rev,subscribe_0042_1_rev,Print_0042_1_rev
+
+[upnp_unsubscribe_0042_1_rev_server]
+listofsequences=publish_service_0042_1_rev,delay_2Min_1_rev
+
+[cpstatus_0042_1_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0042_1_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_1_rev]
+operationtype=starttimer
+waittime=100000000
+
+//Publish a service in a root device
+[publish_service_0042_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0042_1_rev]
+listofmxtimes=50
+listofservicetypes=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0042_1_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+cancelall=TRUE
+expecteddescriptions=1
+
+//Extracts EVENT SUB URLs and subscribe
+//Also specifies info for unsubscribe
+[subscribe_0042_1_rev]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+unsubscribeflag=TRUE
+refersection=unsubscribe_0042_1_rev
+renewflag=FALSE
+
+[unsubscribe_0042_1_rev]
+readini = FALSE
+
+[Print_0042_1_rev]
+operationtype=printresults
+
+////////////////////////////////////////////////////////////////////////////////
+///In discovery "ssdp:all" and descibe and subscribe the same
+//////////////////////////////////////////////////////////////////////////////
+
+[upnp_unsubscribe_0042_2_rev]
+listofsequences=delay_0042_2_rev,cpstatus_0042_2_2_rev,discover_0042_2_rev,describe_0042_2_rev,subscribe_0042_2_rev,Print_0042_2_rev
+
+[upnp_unsubscribe_0042_2_rev_server]
+listofsequences=publish_service_0042_2_1_rev,publish_service_0042_2_2_rev,delay_2Min_1_rev
+
+[cpstatus_0042_2_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0042_2_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_1_rev]
+operationtype=starttimer
+waittime=100000000
+
+//First sevice
+[publish_service_0042_2_1_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+servicetype=urn:schemas-upnp-org:service:RENDERINGCONTROLTestService4:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+positivecase=TRUE
+
+//Publish a service in a root device
+[publish_service_0042_2_2_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0042_2_rev]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+//Describe the Dev.Locations
+[describe_0042_2_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+cancelall=TRUE
+expecteddescriptions=1
+
+//Extracts EVENT SUB URLs and subscribe
+//Also specifies info for unsubscribe
+[subscribe_0042_2_rev]
+subscriptionduration=20
+operationtype=subscribe
+positivecase=TRUE
+readini = FALSE
+schedulerstart=TRUE
+stopscheduler=TRUE
+unsubscribeflag=TRUE
+refersection=unsubscribe_0042_2_rev
+renewflag=FALSE
+
+[unsubscribe_0042_2_rev]
+readini = FALSE
+
+[Print_0042_2_rev]
+operationtype=printresults
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/upnp_abruptclosecp.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,116 @@
+//upnp_abruptclosecp.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//Positive case -1 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service,discover all and close abruptly after getting a response
+/////////////////////////////////////////////////////////////////
+
+[UPnP_AbruptClose_Discovery_0001]
+listofsequences=publish_service_0001,delay_2Min_1
+
+[UPnP_AbruptClose_Discovery_0001_server]
+listofsequences=delay_0001,cpstatus_0001_2,discover_0001,Print_0001
+
+[cpstatus_0001_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_1]
+operationtype=starttimer
+waittime=120000000
+
+//Publish a service in a root device
+[publish_service_0001]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0001]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+abruptdiscoveryclosecp=TRUE
+
+[Print_0001]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -2 
+//Publish service,discover all, describe and close abruptly after getting a response
+/////////////////////////////////////////////////////////////////
+
+[UPnP_AbruptClose_Describe_0001]
+listofsequences=publish_service_0002,delay_2Min_2
+
+[UPnP_AbruptClose_Describe_0001_server]
+listofsequences=delay_0002,cpstatus_0002_2,discover_0002,describe_0002,Print_0002
+
+[cpstatus_0002_2]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_2]
+operationtype=starttimer
+waittime=120000000
+
+//Publish a service in a root device
+[publish_service_0002]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0002]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+
+//Describe the Dev.Locations
+[describe_0002]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+abruptdescribeclosecp=TRUE
+
+
+[Print_0002]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/TestData/Ini_Files/upnp_abruptclosecp_rev.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,117 @@
+//upnp_abruptclosecp_rev.ini
+
+////////////////////////////////////////////////////////////////////////////////
+//1.readini = TRUE means giving uri value from ini 
+//2.readini = FALSE means it'll take value from Discovery results
+//3.In case 2_rev, Before describe there must be Discover opeartion to be executed.
+////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////
+//Positive case -1 UPNP_REGISTER_STATE_CHANGE_SERVICES_0038
+//Publish service_rev,discover all and close abruptly after getting a response
+/////////////////////////////////////////////////////////////////
+
+[UPnP_AbruptClose_Discovery_0001_rev]
+listofsequences=delay_0001_rev,cpstatus_0001_2_rev,discover_0001_rev,Print_0001_rev
+
+[UPnP_AbruptClose_Discovery_0001_rev_server]
+listofsequences=publish_service_0001_rev,delay_2Min_1_rev
+
+
+[cpstatus_0001_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0001_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_1_rev]
+operationtype=starttimer
+waittime=120000000
+
+//Publish a service in a root device
+[publish_service_0001_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0001_rev]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+abruptdiscoveryclosecp=TRUE
+
+[Print_0001_rev]
+operationtype=printresults
+
+
+//////////////////////////////////////////////////////////////////
+//Positive case -2 
+//Publish service_rev,discover all_rev, describe and close abruptly after getting a response
+/////////////////////////////////////////////////////////////////
+
+[UPnP_AbruptClose_Describe_0001_rev]
+listofsequences=delay_0002_rev,cpstatus_0002_2_rev,discover_0002_rev,describe_0002_rev,Print_0002_rev
+
+[UPnP_AbruptClose_Describe_0001_server_rev]
+listofsequences=publish_service_0002_rev,delay_2Min_2_rev
+
+[cpstatus_0002_2_rev]
+cpstatus=TRUE
+operationtype=opendiscoverer
+
+[delay_0002_rev]
+operationtype=starttimer
+waittime=10000000
+
+[delay_2Min_2_rev]
+operationtype=starttimer
+waittime=120000000
+
+//Publish a service in a root device
+[publish_service_0002_rev]
+operationtype=publishservice
+description=z:\upnp\testupnp\client\testdata\service\avtransport2.xml
+servicetype=urn:schemas-upnp-org:service:AVTRANSPORTTestService:1
+usn=uuid:25a0be80-8775-4988-b627-720fbd44a627
+cachecontrol=1810
+period=180
+positivecase=TRUE
+schedulerstart=TRUE
+stopscheduler=TRUE
+
+//Discover all
+[discover_0002_rev]
+listofmxtimes=50
+listofservicetypes=ssdp:all
+operationtype=discovery
+schedulerstatus=TRUE
+delayenabled=FALSE
+waittime=50000000
+canceldiscovery=FALSE
+positivecase=TRUE
+
+
+//Describe the Dev.Locations
+[describe_0002_rev]
+operationtype=describe
+positivecase=TRUE
+readini = FALSE
+abruptdescribeclosecp=TRUE
+
+
+[Print_0002_rev]
+operationtype=printresults
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,505 @@
+// 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:
+//
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+multiple_machines_client.iby  /epoc32/rom/include/multiple_machines_client.iby
+multiple_machines_server.iby  /epoc32/rom/include/multiple_machines_server.iby
+
+//Client scripts
+../Scripts/client/UPnP_Discovery_0001.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0001.script
+../Scripts/client/UPnP_Discovery_0002.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0002.script
+../Scripts/client/UPnP_Discovery_0003.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0003.script
+../Scripts/client/UPnP_Discovery_0004.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0004.script
+../Scripts/client/UPnP_Discovery_0005.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0005.script
+../Scripts/client/UPnP_Discovery_0006.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0006.script
+../Scripts/client/UPnP_Discovery_0007.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0007.script
+../Scripts/client/UPnP_Discovery_0008.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0008.script
+../Scripts/client/UPnP_Discovery_0009.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0009.script
+../Scripts/client/UPnP_Discovery_0010.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0010.script
+../Scripts/client/UPnP_Discovery_0011.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0011.script
+../Scripts/client/UPnP_Discovery_0012.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0012.script
+../Scripts/client/UPnP_Discovery_0013.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0013.script
+../Scripts/client/UPnP_Discovery_0014.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0014.script
+../Scripts/client/UPnP_Discovery_0015.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0015.script
+../Scripts/client/UPnP_Discovery_0016.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0016.script
+../Scripts/client/UPnP_Discovery_0017.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0017.script
+../Scripts/client/UPnP_Discovery_0018.script		z:/upnp/testupnp/client/scripts/upnp_discovery_0018.script
+../Scripts/client/upnp_open_discovery_001.script	z:/upnp/testupnp/client/scripts/upnp_open_discovery_001.script
+../Scripts/client/upnp_open_discovery_001_rev.script z:/upnp/testupnp/client/scripts/upnp_open_discovery_001_rev.script
+../Scripts/client/upnp_initiateaction_0019.script	z:/upnp/testupnp/client/scripts/upnp_initiateaction_0019.script
+../Scripts/client/upnp_initiateaction_0019_rev.script	z:/upnp/testupnp/client/scripts/upnp_initiateaction_0019_rev.script
+../Scripts/client/upnp_cancel_discovery_0001.script		z:/upnp/testupnp/client/scripts/upnp_cancel_discovery_0001.script
+../Scripts/client/upnp_cancel_discovery_0001_rev.script	z:/upnp/testupnp/client/scripts/upnp_cancel_discovery_0001_rev.script
+../Scripts/client/upnp_cancel_discovery.script		z:/upnp/testupnp/client/scripts/upnp_cancel_discovery.script
+../Scripts/client/upnp_cancel_discovery_rev.script	z:/upnp/testupnp/client/scripts/upnp_cancel_discovery_rev.script
+../Scripts/client/upnp_publish_regression.script									       z:/upnp/testupnp/client/scripts/upnp_publish_regression.script
+../Scripts/client/upnp_vendor_service_description_0031.script                             z:/upnp/testupnp/client/scripts/upnp_vendor_service_description_0031.script
+../Scripts/client/upnp_register_notify_0036.script	                                       z:/upnp/testupnp/client/scripts/upnp_register_notify_0036.script	
+../Scripts/client/upnp_validate_discovery_response_time_0049_1.script                     z:/upnp/testupnp/client/scripts/upnp_validate_discovery_response_time_0049_1.script
+../Scripts/client/upnp_validate_discovery_response_time_0049_1_rev.script                     z:/upnp/testupnp/client/scripts/upnp_validate_discovery_response_time_0049_1_rev.script
+../Scripts/client/upnp_validate_3+2d+k_advertisements_0051.script                         z:/upnp/testupnp/client/scripts/upnp_validate_3+2d+k_advertisements_0051.script
+../Scripts/client/upnp_vendor_device_description_0029_1.script		                       z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_1.script
+../Scripts/client/upnp_vendor_device_description_0029_1_rev.script 					   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_1_rev.script
+../Scripts/client/upnp_vendor_device_description_0029_2.script						       z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_2.script
+../Scripts/client/upnp_vendor_device_description_0029_2_rev.script 					   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_2_rev.script
+../Scripts/client/upnp_vendor_device_description_0029_3.script 					   	   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_3.script
+../Scripts/client/upnp_vendor_device_description_0029_3_rev.script						   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_3_rev.script
+../Scripts/client/upnp_vendor_device_description_0029_4.script 					   	   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_4.script
+../Scripts/client/upnp_vendor_device_description_0029_4_rev.script						   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_4_rev.script
+../Scripts/client/upnp_vendor_device_description_0029_5.script 					   	   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_5.script
+../Scripts/client/upnp_vendor_device_description_0029_5_rev.script 					   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_5_rev.script
+../Scripts/client/upnp_vendor_device_description_0029_6.script 					   	   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_6.script
+../Scripts/client/upnp_vendor_device_description_0029_6_rev.script						   z:/upnp/testupnp/client/scripts/upnp_vendor_device_description_0029_6_rev.script
+../Scripts/client/upnp_standard_service_description_0030_1.script                          z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_1.script
+../Scripts/client/upnp_standard_service_description_0030_1_rev.script                      z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_1_rev.script
+../Scripts/client/upnp_standard_service_description_0030_2.script                          z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_2.script
+../Scripts/client/upnp_standard_service_description_0030_2_rev.script                      z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_2_rev.script
+../Scripts/client/upnp_standard_service_description_0030_3.script                          z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_3.script
+../Scripts/client/upnp_standard_service_description_0030_3_rev.script                      z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_3_rev.script
+../Scripts/client/upnp_standard_service_description_0030_4.script                          z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_4.script
+../Scripts/client/upnp_standard_service_description_0030_4_rev.script                      z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_4_rev.script
+../Scripts/client/upnp_standard_service_description_0030_5.script                          z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_5.script
+../Scripts/client/upnp_standard_service_description_0030_5_rev.script                      z:/upnp/testupnp/client/scripts/upnp_standard_service_description_0030_5_rev.script
+../Scripts/client/upnp_register_notify_0036_1.script	                                   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_1.script	
+../Scripts/client/upnp_register_notify_0036_1_rev.script	                               z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_1_rev.script	
+../Scripts/client/upnp_register_notify_0036_2.script                                   	   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_2.script
+../Scripts/client/upnp_register_notify_0036_2_rev.script	                       		   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_2_rev.script
+../Scripts/client/upnp_register_notify_0036_3.script                                   	   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_3.script
+../Scripts/client/upnp_register_notify_0036_3_rev.script	                       		   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_3_rev.script
+../Scripts/client/upnp_register_notify_0036_4.script                                   	   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_4.script
+../Scripts/client/upnp_register_notify_0036_4_rev.script	                       		   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_4_rev.script
+../Scripts/client/upnp_register_notify_0036_5.script                                   	   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_5.script
+../Scripts/client/upnp_register_notify_0036_5_rev.script	                       		   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_5_rev.script
+../Scripts/client/upnp_register_notify_0036_6.script                                   	   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_6.script
+../Scripts/client/upnp_register_notify_0036_6_rev.script	                       		   z:/upnp/testupnp/client/scripts/upnp_register_notify_0036_6_rev.script
+
+../Scripts/client/upnp_cancel_register_notify_0037_1.script	                                z:/upnp/testupnp/client/scripts/upnp_cancel_register_notify_0037_1.script
+../Scripts/client/upnp_cancel_register_notify_0037_1_rev.script                             z:/upnp/testupnp/client/scripts/upnp_cancel_register_notify_0037_1_rev.script
+../Scripts/client/upnp_register_state_change_services_0038_1.script                         z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_1.script
+../Scripts/client/upnp_register_state_change_services_0038_1_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_1_rev.script
+../Scripts/client/upnp_register_state_change_services_0038_2.script                         z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_2.script
+../Scripts/client/upnp_register_state_change_services_0038_2_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_2_rev.script
+../Scripts/client/upnp_renew_subscription_0039_1.script										z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_1.script
+../Scripts/client/upnp_renew_subscription_0039_1_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_1_rev.script
+../Scripts/client/upnp_renew_subscription_0039_2.script										z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_2.script
+../Scripts/client/upnp_renew_subscription_0039_2_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_2_rev.script
+../Scripts/client/upnp_unsubscribe_0042_1.script                                            z:/upnp/testupnp/client/scripts/upnp_unsubscribe_0042_1.script
+../Scripts/client/upnp_unsubscribe_0042_1_rev.script   										z:/upnp/testupnp/client/scripts/upnp_unsubscribe_0042_1_rev.script                                 
+../Scripts/client/upnp_unsubscribe_0042_2.script                                            z:/upnp/testupnp/client/scripts/upnp_unsubscribe_0042_2.script
+../Scripts/client/upnp_unsubscribe_0042_2_rev.script   										z:/upnp/testupnp/client/scripts/upnp_unsubscribe_0042_2_rev.script 
+../Scripts/client/upnp_send_notify_1.script                                            		z:/upnp/testupnp/client/scripts/upnp_send_notify_1.script
+../Scripts/client/upnp_send_notify_1_rev.script   											z:/upnp/testupnp/client/scripts/upnp_send_notify_1_rev.script 
+../Scripts/client/upnp_validate_root_0001_1.script                                          z:/upnp/testupnp/client/scripts/upnp_validate_root_0001_1.script
+../Scripts/client/upnp_validate_root_0001_1_rev.script   									z:/upnp/testupnp/client/scripts/upnp_validate_root_0001_1_rev.script
+../Scripts/client/upnp_invalid_discovery_requests_0048_1.script                       	    z:/upnp/testupnp/client/scripts/upnp_invalid_discovery_requests_0048_1.script
+../Scripts/client/upnp_invalid_discovery_requests_0048_2.script                       	    z:/upnp/testupnp/client/scripts/upnp_invalid_discovery_requests_0048_2.script
+../Scripts/client/upnp_invalid_discovery_requests_0048_3.script                             z:/upnp/testupnp/client/scripts/upnp_invalid_discovery_requests_0048_3.script
+../Scripts/client/upnp_invalid_discovery_requests_0048_1_rev.script                       	z:/upnp/testupnp/client/scripts/upnp_invalid_discovery_requests_0048_1_rev.script
+../Scripts/client/upnp_invalid_discovery_requests_0048_2_rev.script                       	z:/upnp/testupnp/client/scripts/upnp_invalid_discovery_requests_0048_2_rev.script
+../Scripts/client/upnp_invalid_discovery_requests_0048_3_rev.script                         z:/upnp/testupnp/client/scripts/upnp_invalid_discovery_requests_0048_3_rev.script
+../Scripts/client/upnp_validate_describe_requests_headers_0060_1.script                     z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_1.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_1_rev.script                 z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_1_rev.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_2.script                     z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_2.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_2_rev.script                 z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_2_rev.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_3.script                     z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_3.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_3_rev.script                 z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_3_rev.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_4.script                     z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_4.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_4_rev.script                 z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_4_rev.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_5.script                     z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_5.script  
+../Scripts/client/upnp_validate_describe_requests_headers_0060_5_rev.script                 z:/upnp/testupnp/client/scripts/upnp_validate_describe_requests_headers_0060_5_rev.script  
+
+../Scripts/client/upnp_validate_device_registration_0061_1.script			z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_1.script
+../Scripts/client/upnp_validate_device_registration_0061_2.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_2.script
+../Scripts/client/upnp_validate_device_registration_0061_3.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_3.script
+../Scripts/client/upnp_validate_device_registration_0061_4.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_4.script
+../Scripts/client/upnp_validate_device_registration_0061_5.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_5.script
+../Scripts/client/upnp_validate_device_registration_0061_6.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_6.script
+../Scripts/client/upnp_validate_device_registration_0061_7.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_7.script
+../Scripts/client/upnp_validate_device_registration_0061_8.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_8.script
+../Scripts/client/upnp_validate_device_registration_0061_9.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_9.script
+../Scripts/client/upnp_validate_device_registration_0061_10.script          z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_10.script
+../Scripts/client/upnp_validate_device_registration_0061_11.script          z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_11.script
+../Scripts/client/upnp_validate_device_registration_0061_12.script          z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_12.script
+../Scripts/client/upnp_validate_device_registration_0061_13.script          z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_13.script
+../Scripts/client/upnp_validate_device_registration_0061_14.script          z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_14.script
+../Scripts/client/upnp_validate_device_registration_0061_15.script          z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_15.script
+../Scripts/client/upnp_validate_device_registration_0061_16.script          z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_16.script
+../Scripts/client/upnp_validate_device_registration_0062_1.script           z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0062_1.script
+
+../Scripts/client/upnp_validate_device_registration_0062_1_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0062_1_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_1_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_1_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_2_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_2_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_3_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_3_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_4_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_4_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_5_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_5_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_6_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_6_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_7_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_7_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_8_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_8_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_9_rev.script       z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_9_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_10_rev.script      z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_10_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_11_rev.script      z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_11_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_12_rev.script      z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_12_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_13_rev.script      z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_13_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_14_rev.script      z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_14_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_15_rev.script      z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_15_rev.script
+../Scripts/client/upnp_validate_device_registration_0061_16_rev.script      z:/upnp/testupnp/client/scripts/upnp_validate_device_registration_0061_16_rev.script
+
+../Scripts/client/upnp_register_state_change_services_0038_3.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_3.script
+../Scripts/client/upnp_register_state_change_services_0038_4.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_4.script
+../Scripts/client/upnp_register_state_change_services_0038_5.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_5.script
+../Scripts/client/upnp_register_state_change_services_0038_6.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_6.script
+../Scripts/client/upnp_register_state_change_services_0038_7.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_7.script
+../Scripts/client/upnp_register_state_change_services_0038_8.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_8.script
+../Scripts/client/upnp_register_state_change_services_0038_9.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_9.script
+../Scripts/client/upnp_register_state_change_services_0038_10.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_10.script
+../Scripts/client/upnp_register_state_change_services_0038_11.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_11.script
+../Scripts/client/upnp_register_state_change_services_0038_12.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_12.script
+../Scripts/client/upnp_register_state_change_services_0038_13.script      	z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_13.script
+../Scripts/client/upnp_abruptclose_discovery_43_1.script			      	z:/upnp/testupnp/client/scripts/upnp_abruptclose_discovery_43_1.script
+../Scripts/client/upnp_abruptclose_describe_44_1.script			      		z:/upnp/testupnp/client/scripts/upnp_abruptclose_describe_44_1.script
+../Scripts/client/upnp_renew_subscription_0039_3.script						z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_3.script
+../Scripts/client/upnp_renew_subscription_0039_4.script						z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_4.script
+../Scripts/client/upnp_renew_subscription_0039_5.script						z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_5.script
+../Scripts/client/upnp_renew_subscription_0039_6.script						z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_6.script
+../Scripts/client/upnp_renew_subscription_0039_7.script						z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_7.script
+../Scripts/client/upnp_renew_subscription_0039_8.script						z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_8.script
+../Scripts/client/upnp_renew_subscription_0039_9.script						z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_9.script
+../Scripts/client/upnp_renew_subscription_0039_10.script					z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_10.script
+
+
+../Scripts/client/upnp_register_state_change_services_0038_3_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_3_rev.script 
+../Scripts/client/upnp_register_state_change_services_0038_4_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_4_rev.script 
+../Scripts/client/upnp_register_state_change_services_0038_5_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_5_rev.script 
+../Scripts/client/upnp_register_state_change_services_0038_6_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_6_rev.script 
+../Scripts/client/upnp_register_state_change_services_0038_7_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_7_rev.script 
+../Scripts/client/upnp_register_state_change_services_0038_8_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_8_rev.script 
+../Scripts/client/upnp_register_state_change_services_0038_9_rev.script                     z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_9_rev.script 
+../Scripts/client/upnp_register_state_change_services_0038_10_rev.script                    z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_10_rev.script
+../Scripts/client/upnp_register_state_change_services_0038_11_rev.script                    z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_11_rev.script
+../Scripts/client/upnp_register_state_change_services_0038_12_rev.script                    z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_12_rev.script
+../Scripts/client/upnp_register_state_change_services_0038_13_rev.script                    z:/upnp/testupnp/client/scripts/upnp_register_state_change_services_0038_13_rev.script
+../Scripts/client/upnp_abruptclose_discovery_43_1_rev.script			      				z:/upnp/testupnp/client/scripts/upnp_abruptclose_discovery_43_1_rev.script
+../Scripts/client/upnp_abruptclose_describe_44_1_rev.script			      					z:/upnp/testupnp/client/scripts/upnp_abruptclose_describe_44_1_rev.script
+../Scripts/client/upnp_renew_subscription_0039_3_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_3_rev.script
+../Scripts/client/upnp_renew_subscription_0039_4_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_4_rev.script
+../Scripts/client/upnp_renew_subscription_0039_5_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_5_rev.script
+../Scripts/client/upnp_renew_subscription_0039_6_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_6_rev.script
+../Scripts/client/upnp_renew_subscription_0039_7_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_7_rev.script
+../Scripts/client/upnp_renew_subscription_0039_8_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_8_rev.script
+../Scripts/client/upnp_renew_subscription_0039_9_rev.script									z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_9_rev.script
+../Scripts/client/upnp_renew_subscription_0039_10_rev.script								z:/upnp/testupnp/client/scripts/upnp_renew_subscription_0039_10_rev.script
+../Scripts/client/upnp_initiateaction_0019_2.script											z:/upnp/testupnp/client/scripts/upnp_initiateaction_0019_2.script
+../Scripts/client/upnp_refresh_advertisement_0045_1.script									z:/upnp/testupnp/client/scripts/upnp_refresh_advertisement_0045_1.script
+../Scripts/client/upnp_refresh_advertisement_0045_2.script									z:/upnp/testupnp/client/scripts/upnp_refresh_advertisement_0045_2.script
+../Scripts/client/upnp_initiateaction_0019_2_rev.script										z:/upnp/testupnp/client/scripts/upnp_initiateaction_0019_2_rev.script
+../Scripts/client/upnp_refresh_advertisement_0045_1_rev.script								z:/upnp/testupnp/client/scripts/upnp_refresh_advertisement_0045_1_rev.script
+../Scripts/client/upnp_refresh_advertisement_0045_2_rev.script								z:/upnp/testupnp/client/scripts/upnp_refresh_advertisement_0045_2_rev.script
+
+//Server scripts
+../Scripts/server/UPnP_Discovery_0001.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0001.script
+../Scripts/server/UPnP_Discovery_0002.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0002.script
+../Scripts/server/UPnP_Discovery_0003.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0003.script
+../Scripts/server/UPnP_Discovery_0004.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0004.script
+../Scripts/server/UPnP_Discovery_0005.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0005.script
+../Scripts/server/UPnP_Discovery_0006.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0006.script
+../Scripts/server/UPnP_Discovery_0007.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0007.script
+../Scripts/server/UPnP_Discovery_0008.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0008.script
+../Scripts/server/UPnP_Discovery_0009.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0009.script
+../Scripts/server/UPnP_Discovery_0010.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0010.script
+../Scripts/server/UPnP_Discovery_0011.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0011.script
+../Scripts/server/UPnP_Discovery_0012.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0012.script
+../Scripts/server/UPnP_Discovery_0013.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0013.script
+../Scripts/server/UPnP_Discovery_0014.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0014.script
+../Scripts/server/UPnP_Discovery_0015.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0015.script
+../Scripts/server/UPnP_Discovery_0016.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0016.script
+../Scripts/server/UPnP_Discovery_0017.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0017.script
+../Scripts/server/UPnP_Discovery_0018.script		z:/upnp/testupnp/server/scripts/upnp_discovery_0018.script
+
+../Scripts/server/upnp_open_discovery_001.script	z:/upnp/testupnp/server/scripts/upnp_open_discovery_001.script
+../Scripts/server/upnp_open_discovery_001_rev.script z:/upnp/testupnp/server/scripts/upnp_open_discovery_001_rev.script
+../Scripts/server/upnp_initiateaction_0019.script	z:/upnp/testupnp/server/scripts/upnp_initiateaction_0019.script
+../Scripts/server/upnp_initiateaction_0019_rev.script	z:/upnp/testupnp/server/scripts/upnp_initiateaction_0019_rev.script
+../Scripts/server/upnp_cancel_discovery.script		z:/upnp/testupnp/server/scripts/upnp_cancel_discovery.script
+../Scripts/server/upnp_cancel_discovery_rev.script	z:/upnp/testupnp/server/scripts/upnp_cancel_discovery_rev.script
+../Scripts/server/upnp_cancel_discovery_0001.script		z:/upnp/testupnp/server/scripts/upnp_cancel_discovery_0001.script
+../Scripts/server/upnp_cancel_discovery_0001_rev.script	z:/upnp/testupnp/server/scripts/upnp_cancel_discovery_0001_rev.script
+../Scripts/server/upnp_publish_regression.script									       z:/upnp/testupnp/server/scripts/upnp_publish_regression.script
+../Scripts/server/upnp_vendor_service_description_0031.script                             z:/upnp/testupnp/server/scripts/upnp_vendor_service_description_0031.script
+../Scripts/server/upnp_register_notify_0036.script	                                       z:/upnp/testupnp/server/scripts/upnp_register_notify_0036.script	
+../Scripts/server/upnp_validate_discovery_response_time_0049_1.script                  	  z:/upnp/testupnp/server/scripts/upnp_validate_discovery_response_time_0049_1.script
+../Scripts/server/upnp_validate_discovery_response_time_0049_1_rev.script                  	  z:/upnp/testupnp/server/scripts/upnp_validate_discovery_response_time_0049_1_rev.script
+../Scripts/server/upnp_vendor_device_description_0029_1.script		                       z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_1.script
+../Scripts/server/upnp_vendor_device_description_0029_1_rev.script 					   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_1_rev.script
+../Scripts/server/upnp_vendor_device_description_0029_2.script						       z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_2.script
+../Scripts/server/upnp_vendor_device_description_0029_2_rev.script 					   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_2_rev.script
+../Scripts/server/upnp_vendor_device_description_0029_3.script 					   	   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_3.script
+../Scripts/server/upnp_vendor_device_description_0029_3_rev.script						   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_3_rev.script
+../Scripts/server/upnp_vendor_device_description_0029_4.script 					   	   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_4.script
+../Scripts/server/upnp_vendor_device_description_0029_4_rev.script						   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_4_rev.script
+../Scripts/server/upnp_vendor_device_description_0029_5.script 					   	   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_5.script
+../Scripts/server/upnp_vendor_device_description_0029_5_rev.script 					   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_5_rev.script
+../Scripts/server/upnp_vendor_device_description_0029_6.script 					   	   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_6.script
+../Scripts/server/upnp_vendor_device_description_0029_6_rev.script						   z:/upnp/testupnp/server/scripts/upnp_vendor_device_description_0029_6_rev.script
+../Scripts/server/upnp_standard_service_description_0030_1.script                          z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_1.script
+../Scripts/server/upnp_standard_service_description_0030_1_rev.script                      z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_1_rev.script
+../Scripts/server/upnp_standard_service_description_0030_2.script                          z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_2.script
+../Scripts/server/upnp_standard_service_description_0030_2_rev.script                      z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_2_rev.script
+../Scripts/server/upnp_standard_service_description_0030_3.script                          z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_3.script
+../Scripts/server/upnp_standard_service_description_0030_3_rev.script                      z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_3_rev.script
+../Scripts/server/upnp_standard_service_description_0030_4.script                          z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_4.script
+../Scripts/server/upnp_standard_service_description_0030_4_rev.script                      z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_4_rev.script
+../Scripts/server/upnp_standard_service_description_0030_5.script                          z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_5.script
+../Scripts/server/upnp_standard_service_description_0030_5_rev.script                      z:/upnp/testupnp/server/scripts/upnp_standard_service_description_0030_5_rev.script
+../Scripts/server/upnp_register_notify_0036_1.script                                   	   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_1.script
+../Scripts/server/upnp_register_notify_0036_1_rev.script	                       		   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_1_rev.script
+../Scripts/server/upnp_register_notify_0036_2.script                                   	   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_2.script
+../Scripts/server/upnp_register_notify_0036_2_rev.script	                       		   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_2_rev.script
+../Scripts/server/upnp_register_notify_0036_3.script                                   	   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_3.script
+../Scripts/server/upnp_register_notify_0036_3_rev.script	                       		   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_3_rev.script
+../Scripts/server/upnp_register_notify_0036_4.script                                   	   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_4.script
+../Scripts/server/upnp_register_notify_0036_4_rev.script	                       		   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_4_rev.script
+../Scripts/server/upnp_register_notify_0036_5.script                                   	   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_5.script
+../Scripts/server/upnp_register_notify_0036_5_rev.script	                       		   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_5_rev.script
+../Scripts/server/upnp_register_notify_0036_6.script                                   	   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_6.script
+../Scripts/server/upnp_register_notify_0036_6_rev.script	                       		   z:/upnp/testupnp/server/scripts/upnp_register_notify_0036_6_rev.script
+../Scripts/server/upnp_cancel_register_notify_0037_1.script	                                z:/upnp/testupnp/server/scripts/upnp_cancel_register_notify_0037_1.script
+../Scripts/server/upnp_cancel_register_notify_0037_1_rev.script                             z:/upnp/testupnp/server/scripts/upnp_cancel_register_notify_0037_1_rev.script
+../Scripts/server/upnp_register_state_change_services_0038_1.script                         z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_1.script
+../Scripts/server/upnp_register_state_change_services_0038_1_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_1_rev.script
+../Scripts/server/upnp_register_state_change_services_0038_2.script                         z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_2.script
+../Scripts/server/upnp_register_state_change_services_0038_2_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_2_rev.script
+../Scripts/server/upnp_renew_subscription_0039_1.script										z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_1.script
+../Scripts/server/upnp_renew_subscription_0039_1_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_1_rev.script
+../Scripts/server/upnp_renew_subscription_0039_2.script										z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_2.script
+../Scripts/server/upnp_renew_subscription_0039_2_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_2_rev.script
+../Scripts/server/upnp_unsubscribe_0042_1.script                                            z:/upnp/testupnp/server/scripts/upnp_unsubscribe_0042_1.script
+../Scripts/server/upnp_unsubscribe_0042_1_rev.script   										z:/upnp/testupnp/server/scripts/upnp_unsubscribe_0042_1_rev.script                                 
+../Scripts/server/upnp_unsubscribe_0042_2.script                                            z:/upnp/testupnp/server/scripts/upnp_unsubscribe_0042_2.script
+../Scripts/server/upnp_unsubscribe_0042_2_rev.script   										z:/upnp/testupnp/server/scripts/upnp_unsubscribe_0042_2_rev.script 
+../Scripts/server/upnp_send_notify_1.script                                            		z:/upnp/testupnp/server/scripts/upnp_send_notify_1.script
+../Scripts/server/upnp_send_notify_1_rev.script   											z:/upnp/testupnp/server/scripts/upnp_send_notify_1_rev.script 
+../Scripts/server/upnp_validate_root_0001_1.script                                          z:/upnp/testupnp/server/scripts/upnp_validate_root_0001_1.script
+../Scripts/server/upnp_validate_root_0001_1_rev.script   									z:/upnp/testupnp/server/scripts/upnp_validate_root_0001_1_rev.script
+../Scripts/server/upnp_invalid_discovery_requests_0048_1.script                       	    z:/upnp/testupnp/server/scripts/upnp_invalid_discovery_requests_0048_1.script
+../Scripts/server/upnp_invalid_discovery_requests_0048_2.script                       	    z:/upnp/testupnp/server/scripts/upnp_invalid_discovery_requests_0048_2.script
+../Scripts/server/upnp_invalid_discovery_requests_0048_3.script                             z:/upnp/testupnp/server/scripts/upnp_invalid_discovery_requests_0048_3.script
+../Scripts/server/upnp_invalid_discovery_requests_0048_1_rev.script                       	z:/upnp/testupnp/server/scripts/upnp_invalid_discovery_requests_0048_1_rev.script
+../Scripts/server/upnp_invalid_discovery_requests_0048_2_rev.script                       	z:/upnp/testupnp/server/scripts/upnp_invalid_discovery_requests_0048_2_rev.script
+../Scripts/server/upnp_invalid_discovery_requests_0048_3_rev.script                         z:/upnp/testupnp/server/scripts/upnp_invalid_discovery_requests_0048_3_rev.script
+../Scripts/server/upnp_validate_describe_requests_headers_0060_1.script                     z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_1.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_1_rev.script                 z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_1_rev.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_2.script                     z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_2.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_2_rev.script                 z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_2_rev.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_3.script                     z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_3.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_3_rev.script                 z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_3_rev.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_4.script                     z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_4.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_4_rev.script                 z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_4_rev.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_5.script                     z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_5.script  
+../Scripts/server/upnp_validate_describe_requests_headers_0060_5_rev.script                 z:/upnp/testupnp/server/scripts/upnp_validate_describe_requests_headers_0060_5_rev.script  
+
+../Scripts/server/upnp_validate_device_registration_0061_1.script			z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_1.script
+../Scripts/server/upnp_validate_device_registration_0061_2.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_2.script
+../Scripts/server/upnp_validate_device_registration_0061_3.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_3.script
+../Scripts/server/upnp_validate_device_registration_0061_4.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_4.script
+../Scripts/server/upnp_validate_device_registration_0061_5.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_5.script
+../Scripts/server/upnp_validate_device_registration_0061_6.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_6.script
+../Scripts/server/upnp_validate_device_registration_0061_7.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_7.script
+../Scripts/server/upnp_validate_device_registration_0061_8.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_8.script
+../Scripts/server/upnp_validate_device_registration_0061_9.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_9.script
+../Scripts/server/upnp_validate_device_registration_0061_10.script          z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_10.script
+../Scripts/server/upnp_validate_device_registration_0061_11.script          z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_11.script
+../Scripts/server/upnp_validate_device_registration_0061_12.script          z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_12.script
+../Scripts/server/upnp_validate_device_registration_0061_13.script          z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_13.script
+../Scripts/server/upnp_validate_device_registration_0061_14.script          z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_14.script
+../Scripts/server/upnp_validate_device_registration_0061_15.script          z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_15.script
+../Scripts/server/upnp_validate_device_registration_0061_16.script          z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_16.script
+../Scripts/server/upnp_validate_device_registration_0062_1.script           z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0062_1.script
+
+../Scripts/server/upnp_validate_device_registration_0062_1_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0062_1_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_1_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_1_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_2_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_2_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_3_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_3_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_4_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_4_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_5_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_5_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_6_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_6_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_7_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_7_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_8_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_8_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_9_rev.script       z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_9_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_10_rev.script      z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_10_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_11_rev.script      z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_11_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_12_rev.script      z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_12_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_13_rev.script      z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_13_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_14_rev.script      z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_14_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_15_rev.script      z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_15_rev.script
+../Scripts/server/upnp_validate_device_registration_0061_16_rev.script      z:/upnp/testupnp/server/scripts/upnp_validate_device_registration_0061_16_rev.script
+
+../Scripts/server/upnp_register_state_change_services_0038_3.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_3.script
+../Scripts/server/upnp_register_state_change_services_0038_4.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_4.script
+../Scripts/server/upnp_register_state_change_services_0038_5.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_5.script
+../Scripts/server/upnp_register_state_change_services_0038_6.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_6.script
+../Scripts/server/upnp_register_state_change_services_0038_7.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_7.script
+../Scripts/server/upnp_register_state_change_services_0038_8.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_8.script
+../Scripts/server/upnp_register_state_change_services_0038_9.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_9.script
+../Scripts/server/upnp_register_state_change_services_0038_10.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_10.script
+../Scripts/server/upnp_register_state_change_services_0038_11.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_11.script
+../Scripts/server/upnp_register_state_change_services_0038_12.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_12.script
+../Scripts/server/upnp_register_state_change_services_0038_13.script      	z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_13.script
+
+../Scripts/server/upnp_abruptclose_discovery_43_1.script			      					z:/upnp/testupnp/server/scripts/upnp_abruptclose_discovery_43_1.script
+../Scripts/server/upnp_abruptclose_describe_44_1.script			      						z:/upnp/testupnp/server/scripts/upnp_abruptclose_describe_44_1.script
+../Scripts/server/upnp_renew_subscription_0039_3.script						z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_3.script
+../Scripts/server/upnp_renew_subscription_0039_4.script						z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_4.script
+../Scripts/server/upnp_renew_subscription_0039_5.script						z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_5.script
+../Scripts/server/upnp_renew_subscription_0039_6.script						z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_6.script
+../Scripts/server/upnp_renew_subscription_0039_7.script						z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_7.script
+../Scripts/server/upnp_renew_subscription_0039_8.script						z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_8.script
+../Scripts/server/upnp_renew_subscription_0039_9.script						z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_9.script
+../Scripts/server/upnp_renew_subscription_0039_10.script					z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_10.script
+
+
+../Scripts/server/upnp_register_state_change_services_0038_3_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_3_rev.script 
+../Scripts/server/upnp_register_state_change_services_0038_4_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_4_rev.script 
+../Scripts/server/upnp_register_state_change_services_0038_5_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_5_rev.script 
+../Scripts/server/upnp_register_state_change_services_0038_6_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_6_rev.script 
+../Scripts/server/upnp_register_state_change_services_0038_7_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_7_rev.script 
+../Scripts/server/upnp_register_state_change_services_0038_8_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_8_rev.script 
+../Scripts/server/upnp_register_state_change_services_0038_9_rev.script                     z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_9_rev.script 
+../Scripts/server/upnp_register_state_change_services_0038_10_rev.script                    z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_10_rev.script
+../Scripts/server/upnp_register_state_change_services_0038_11_rev.script                    z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_11_rev.script
+../Scripts/server/upnp_register_state_change_services_0038_12_rev.script                    z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_12_rev.script
+../Scripts/server/upnp_register_state_change_services_0038_13_rev.script                    z:/upnp/testupnp/server/scripts/upnp_register_state_change_services_0038_13_rev.script
+../Scripts/server/upnp_abruptclose_discovery_43_1_rev.script			      				z:/upnp/testupnp/server/scripts/upnp_abruptclose_discovery_43_1_rev.script
+../Scripts/server/upnp_abruptclose_describe_44_1_rev.script			      					z:/upnp/testupnp/server/scripts/upnp_abruptclose_describe_44_1_rev.script
+../Scripts/server/upnp_renew_subscription_0039_3_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_3_rev.script
+../Scripts/server/upnp_renew_subscription_0039_4_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_4_rev.script
+../Scripts/server/upnp_renew_subscription_0039_5_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_5_rev.script
+../Scripts/server/upnp_renew_subscription_0039_6_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_6_rev.script
+../Scripts/server/upnp_renew_subscription_0039_7_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_7_rev.script
+../Scripts/server/upnp_renew_subscription_0039_8_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_8_rev.script
+../Scripts/server/upnp_renew_subscription_0039_9_rev.script									z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_9_rev.script
+../Scripts/server/upnp_renew_subscription_0039_10_rev.script								z:/upnp/testupnp/server/scripts/upnp_renew_subscription_0039_10_rev.script
+../Scripts/server/upnp_initiateaction_0019_2.script											z:/upnp/testupnp/server/scripts/upnp_initiateaction_0019_2.script
+../Scripts/server/upnp_refresh_advertisement_0045_1.script									z:/upnp/testupnp/server/scripts/upnp_refresh_advertisement_0045_1.script
+../Scripts/server/upnp_refresh_advertisement_0045_2.script									z:/upnp/testupnp/server/scripts/upnp_refresh_advertisement_0045_2.script
+../Scripts/server/upnp_initiateaction_0019_2_rev.script										z:/upnp/testupnp/server/scripts/upnp_initiateaction_0019_2_rev.script
+../Scripts/server/upnp_refresh_advertisement_0045_1_rev.script								z:/upnp/testupnp/server/scripts/upnp_refresh_advertisement_0045_1_rev.script
+../Scripts/server/upnp_refresh_advertisement_0045_2_rev.script								z:/upnp/testupnp/server/scripts/upnp_refresh_advertisement_0045_2_rev.script
+../Scripts/client/discover_low_ver.script 													z:/upnp/testupnp/client/scripts/discover_low_ver.script
+../Scripts/client/discover_low_ver_1.script 												z:/upnp/testupnp/client/scripts/discover_low_ver_1.script
+../Scripts/client/discover_low_ver_2.script 												z:/upnp/testupnp/client/scripts/discover_low_ver_2.script
+../Scripts/server/discover_low_ver.script 													z:/upnp/testupnp/server/scripts/discover_low_ver.script
+../Scripts/server/discover_low_ver_1.script 												z:/upnp/testupnp/server/scripts/discover_low_ver_1.script
+../Scripts/server/discover_low_ver_2.script 												z:/upnp/testupnp/server/scripts/discover_low_ver_2.script
+
+
+
+//ini files
+../TestData/Ini_Files/discovery0001.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0001.ini
+../TestData/Ini_Files/discovery0002.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0002.ini
+../TestData/Ini_Files/discovery0003.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0003.ini
+../TestData/Ini_Files/discovery0004.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0004.ini
+../TestData/Ini_Files/discovery0005.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0005.ini
+../TestData/Ini_Files/discovery0006.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0006.ini
+../TestData/Ini_Files/discovery0007.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0007.ini
+../TestData/Ini_Files/discovery0008.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0008.ini
+../TestData/Ini_Files/discovery0009.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0009.ini
+../TestData/Ini_Files/discovery0010.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0010.ini
+../TestData/Ini_Files/discovery0011.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0011.ini
+../TestData/Ini_Files/discovery0012.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0012.ini
+../TestData/Ini_Files/discovery0013.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0013.ini
+../TestData/Ini_Files/discovery0014.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0014.ini
+../TestData/Ini_Files/discovery0015.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0015.ini
+../TestData/Ini_Files/discovery0016.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0016.ini
+../TestData/Ini_Files/discovery0017.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0017.ini
+../TestData/Ini_Files/discovery0018.ini				z:/upnp/testupnp/client/testdata/ini_files/discovery0018.ini
+../TestData/Ini_Files/opendiscovery_001.ini			z:/upnp/testupnp/client/testdata/ini_files/opendiscovery_001.ini
+../TestData/Ini_Files/opendiscovery_001_rev.ini 	z:/upnp/testupnp/client/testdata/ini_files/opendiscovery_001_rev.ini
+../TestData/Ini_Files/describe.ini					z:/upnp/testupnp/client/testdata/ini_files/describe.ini
+../TestData/Ini_Files/initiateaction_0019.ini   	z:/upnp/testupnp/client/testdata/ini_files/initiateaction_0019.ini
+../TestData/Ini_Files/initiateaction_0019_rev.ini   z:/upnp/testupnp/client/testdata/ini_files/initiateaction_0019_rev.ini
+
+../TestData/Ini_Files/canceldiscovery.ini			z:/upnp/testupnp/client/testdata/ini_files/canceldiscovery.ini
+../TestData/Ini_Files/canceldiscovery_rev.ini		z:/upnp/testupnp/client/testdata/ini_files/canceldiscovery_rev.ini
+
+../TestData/Ini_Files/publish.ini					z:/upnp/testupnp/client/testdata/ini_files/publish.ini
+../TestData/Ini_Files/describe_0029.ini				z:/upnp/testupnp/client/testdata/ini_files/describe_0029.ini
+../TestData/Ini_Files/describe_0029_rev.ini			z:/upnp/testupnp/client/testdata/ini_files/describe_0029_rev.ini
+../TestData/Ini_Files/describe_0030.ini				z:/upnp/testupnp/client/testdata/ini_files/describe_0030.ini
+../TestData/Ini_Files/describe_0030_rev.ini			z:/upnp/testupnp/client/testdata/ini_files/describe_0030_rev.ini
+../TestData/Ini_Files/register_0036.ini				z:/upnp/testupnp/client/testdata/ini_files/register_0036.ini
+../TestData/Ini_Files/register_0036_rev.ini			z:/upnp/testupnp/client/testdata/ini_files/register_0036_rev.ini
+../TestData/Ini_Files/register_0037.ini				z:/upnp/testupnp/client/testdata/ini_files/register_0037.ini
+../TestData/Ini_Files/register_0037_rev.ini			z:/upnp/testupnp/client/testdata/ini_files/register_0037_rev.ini
+../TestData/Ini_Files/subscribe_0038.ini			z:/upnp/testupnp/client/testdata/ini_files/subscribe_0038.ini
+../TestData/Ini_Files/subscribe_0038_rev.ini 		z:/upnp/testupnp/client/testdata/ini_files/subscribe_0038_rev.ini
+../TestData/Ini_Files/subscribe_0039.ini	 		z:/upnp/testupnp/client/testdata/ini_files/subscribe_0039.ini
+../TestData/Ini_Files/subscribe_0039_rev.ini 		z:/upnp/testupnp/client/testdata/ini_files/subscribe_0039_rev.ini
+../TestData/Ini_Files/subscribe_0042.ini	 		z:/upnp/testupnp/client/testdata/ini_files/subscribe_0042.ini
+../TestData/Ini_Files/subscribe_0042_rev.ini 		z:/upnp/testupnp/client/testdata/ini_files/subscribe_0042_rev.ini
+../TestData/Ini_Files/sendnotify.ini		 		z:/upnp/testupnp/client/testdata/ini_files/sendnotify.ini
+../TestData/Ini_Files/sendnotify_rev.ini	 		z:/upnp/testupnp/client/testdata/ini_files/sendnotify_rev.ini
+../TestData/Ini_Files/publish_0001.ini		 		z:/upnp/testupnp/client/testdata/ini_files/publish_0001.ini
+../TestData/Ini_Files/publish_0001_rev.ini	 		z:/upnp/testupnp/client/testdata/ini_files/publish_0001_rev.ini
+../TestData/Ini_Files/discovery_0048.ini	 		z:/upnp/testupnp/client/testdata/ini_files/discovery_0048.ini
+../TestData/Ini_Files/discovery_0048_rev.ini		z:/upnp/testupnp/client/testdata/ini_files/discovery_0048_rev.ini
+../TestData/Ini_Files/discovery_0049.ini	 		z:/upnp/testupnp/client/testdata/ini_files/discovery_0049.ini
+../TestData/Ini_Files/discovery_0049_rev.ini	 	z:/upnp/testupnp/client/testdata/ini_files/discovery_0049_rev.ini
+../TestData/Ini_Files/describe_0060.ini				z:/upnp/testupnp/client/testdata/ini_files/describe_0060.ini
+../TestData/Ini_Files/describe_0060_rev.ini			z:/upnp/testupnp/client/testdata/ini_files/describe_0060_rev.ini
+../TestData/Ini_Files/multiplemachines.ini			z:/upnp/testupnp/server/testdata/ini_files/multiplemachines.ini
+
+../TestData/Ini_Files/upnp_abruptclosecp.ini        z:/upnp/testupnp/client/testdata/ini_files/upnp_abruptclosecp.ini 
+../TestData/Ini_Files/publish_0061.ini				z:/upnp/testupnp/client/testdata/ini_files/publish_0061.ini		
+../TestData/Ini_Files/publish_0061_rev.ini          z:/upnp/testupnp/client/testdata/ini_files/publish_0061_rev.ini  
+../TestData/Ini_Files/publish_0062.ini              z:/upnp/testupnp/client/testdata/ini_files/publish_0062.ini      
+../TestData/Ini_Files/publish_0062_rev.ini          z:/upnp/testupnp/client/testdata/ini_files/publish_0062_rev.ini 
+../TestData/Ini_Files/upnp_abruptclosecp_rev.ini    z:/upnp/testupnp/client/testdata/ini_files/upnp_abruptclosecp_rev.ini 
+../TestData/Ini_Files/refresh_adv_0045.ini    		z:/upnp/testupnp/client/testdata/ini_files/refresh_adv_0045.ini 
+../TestData/Ini_Files/refresh_adv_0045_rev.ini   	z:/upnp/testupnp/client/testdata/ini_files/refresh_adv_0045_rev.ini 
+
+../TestData/Data_Files/xmldatafiles/service/AVTransport2.xml			z:/upnp/testupnp/client/testdata/service/avtransport2.xml
+../TestData/Data_Files/xmldatafiles/service/ConnectionManager2.xml		z:/upnp/testupnp/client/testdata/service/connectionmanager2.xml
+../TestData/Data_Files/xmldatafiles/service/ContentDirectory2.xml		z:/upnp/testupnp/client/testdata/service/contentdirectory2.xml
+../TestData/Data_Files/xmldatafiles/service/RenderingControl2.xml		z:/upnp/testupnp/client/testdata/service/renderingcontrol2.xml
+../TestData/Data_Files/xmldatafiles/service/ScheduledRecording1.xml		z:/upnp/testupnp/client/testdata/service/scheduledrecording1.xml
+../TestData/Data_Files/xmldatafiles/service/RenderingControl1.xml		z:/upnp/testupnp/client/testdata/service/renderingcontrol1.xml
+../TestData/Data_Files/xmldatafiles/service/Scan1.xml					z:/upnp/testupnp/client/testdata/service/scan1.xml
+../TestData/Data_Files/xmldatafiles/service/Feeder1.xml					z:/upnp/testupnp/client/testdata/service/feeder1.xml
+../TestData/Data_Files/xmldatafiles/action.xml							z:/upnp/testupnp/client/testdata/action.xml
+../TestData/Data_Files/xmldatafiles/actionresponse.xml					z:/upnp/testupnp/client/testdata/actionresponse.xml
+
+../TestData/Data_Files/xmldatafiles/service/AVTransport1.xml			z:/upnp/testupnp/client/testdata/service/avtransport1.xml		
+../TestData/Data_Files/xmldatafiles/service/ContentDirectory1.xml       z:/upnp/testupnp/client/testdata/service/contentdirectory1.xml 
+../TestData/Data_Files/xmldatafiles/service/ConnectionManager1.xml      z:/upnp/testupnp/client/testdata/service/connectionmanager1.xml
+
+../TestData/Ini_Files/discover_low_ver.ini 								z:/upnp/testupnp/client/testdata/ini_files/discover_low_ver.ini
+
+../TestData/Data_Files/iconfiles/playstation1.png      z:/resource/upnp/icons/playstation1.png
+../TestData/Data_Files/iconfiles/playstation2.png      z:/resource/upnp/icons/playstation2.png
+../TestData/Data_Files/iconfiles/playstation3.png      z:/resource/upnp/icons/playstation3.png
+../TestData/Data_Files/iconfiles/playstation4.png      z:/resource/upnp/icons/playstation4.png
+
+
+PRJ_TESTMMPFILES
+multiple_machines_client.mmp
+multiple_machines_server.mmp
+single_machine.mmp
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/multiple_machines_client.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,308 @@
+// 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 __MULTIPLE_MACHINES_CLIENT_IBY__
+#define __MULTIPLE_MACHINES_CLIENT_IBY__
+
+#include <testexecute.iby>
+// Product code iby files
+
+file=ABI_DIR\BUILD_DIR\multiple_machines_client.exe		                 Sys\Bin\multiple_machines_client.exe	
+
+//Client scripts
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0001.script		                                                     upnp\testupnp\client\scripts\upnp_discovery_0001.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0002.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0002.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0002_1.script                                                           upnp\testupnp\client\scripts\upnp_discovery_0002_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0003.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0003.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0004.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0004.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0005.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0005.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0006.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0006.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0007.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0007.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0008.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0008.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0008_1.script                                                           upnp\testupnp\client\scripts\upnp_discovery_0008_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0009.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0009.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0010.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0010.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0011.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0011.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0012.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0012.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0012_1.script                                                           upnp\testupnp\client\scripts\upnp_discovery_0012_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0013.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0013.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0014.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0014.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0015.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0015.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0016.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0016.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0017.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0017.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0018.script                                                             upnp\testupnp\client\scripts\upnp_discovery_0018.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_discovery_0018_1.script                                                           upnp\testupnp\client\scripts\upnp_discovery_0018_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_open_discovery_001.script                                                         upnp\testupnp\client\scripts\upnp_open_discovery_001.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_open_discovery_001_rev.script                                                     upnp\testupnp\client\scripts\upnp_open_discovery_001_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_initiateaction_0019.script                                                        upnp\testupnp\client\scripts\upnp_initiateaction_0019.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_initiateaction_0019_rev.script                                                    upnp\testupnp\client\scripts\upnp_initiateaction_0019_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_cancel_discovery.script                                                           upnp\testupnp\client\scripts\upnp_cancel_discovery.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_cancel_discovery_rev.script                                                       upnp\testupnp\client\scripts\upnp_cancel_discovery_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_cancel_discovery_1.script                                                         upnp\testupnp\client\scripts\upnp_cancel_discovery_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_cancel_discovery_1_rev.script                                                       upnp\testupnp\client\scripts\upnp_cancel_discovery_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_cancel_discovery_0001.script                                                      upnp\testupnp\client\scripts\upnp_cancel_discovery_0001.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_cancel_discovery_0001_rev.script                                                  upnp\testupnp\client\scripts\upnp_cancel_discovery_0001_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_publish_regression.script                                                         upnp\testupnp\client\scripts\upnp_publish_regression.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_service_description_0031.script                                            upnp\testupnp\client\scripts\upnp_vendor_service_description_0031.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036.script	                                                     upnp\testupnp\client\scripts\upnp_register_notify_0036.script	
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_discovery_response_time_0049_1.script                                    upnp\testupnp\client\scripts\upnp_validate_discovery_response_time_0049_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_discovery_response_time_0049_1_rev.script                                upnp\testupnp\client\scripts\upnp_validate_discovery_response_time_0049_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_3+2d+k_advertisements_0051.script                                        upnp\testupnp\client\scripts\upnp_validate_3+2d+k_advertisements_0051.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_1.script                                           upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_1_rev.script                                       upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_2.script                                           upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_2_rev.script                                       upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_3.script                                           upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_3_rev.script                                       upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_4.script                                           upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_4_rev.script                                       upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_5.script                                           upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_5_rev.script                                       upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_6.script                                           upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_6_rev.script                                       upnp\testupnp\client\scripts\upnp_vendor_device_description_0029_6_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_1.script                                        upnp\testupnp\client\scripts\upnp_standard_service_description_0030_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_1_rev.script                                    upnp\testupnp\client\scripts\upnp_standard_service_description_0030_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_2.script                                        upnp\testupnp\client\scripts\upnp_standard_service_description_0030_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_2_rev.script                                    upnp\testupnp\client\scripts\upnp_standard_service_description_0030_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_3.script                                        upnp\testupnp\client\scripts\upnp_standard_service_description_0030_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_3_rev.script                                    upnp\testupnp\client\scripts\upnp_standard_service_description_0030_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_4.script                                        upnp\testupnp\client\scripts\upnp_standard_service_description_0030_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_4_rev.script                                    upnp\testupnp\client\scripts\upnp_standard_service_description_0030_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_5.script                                        upnp\testupnp\client\scripts\upnp_standard_service_description_0030_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_standard_service_description_0030_5_rev.script                                    upnp\testupnp\client\scripts\upnp_standard_service_description_0030_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_1.script	                                                 upnp\testupnp\client\scripts\upnp_register_notify_0036_1.script	
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_1_rev.script	                                             upnp\testupnp\client\scripts\upnp_register_notify_0036_1_rev.script	
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_2.script                                                     upnp\testupnp\client\scripts\upnp_register_notify_0036_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_2_rev.script                                                 upnp\testupnp\client\scripts\upnp_register_notify_0036_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_3.script                                                     upnp\testupnp\client\scripts\upnp_register_notify_0036_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_3_rev.script                                                 upnp\testupnp\client\scripts\upnp_register_notify_0036_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_4.script                                                     upnp\testupnp\client\scripts\upnp_register_notify_0036_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_4_rev.script                                                 upnp\testupnp\client\scripts\upnp_register_notify_0036_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_5.script                                                     upnp\testupnp\client\scripts\upnp_register_notify_0036_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_5_rev.script                                                 upnp\testupnp\client\scripts\upnp_register_notify_0036_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_6.script                                                     upnp\testupnp\client\scripts\upnp_register_notify_0036_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_6_rev.script                                                 upnp\testupnp\client\scripts\upnp_register_notify_0036_6_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_7.script                                                     upnp\testupnp\client\scripts\upnp_register_notify_0036_7.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_notify_0036_7_rev.script                                                 upnp\testupnp\client\scripts\upnp_register_notify_0036_7_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_cancel_register_notify_0037_1.script                                              upnp\testupnp\client\scripts\upnp_cancel_register_notify_0037_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_cancel_register_notify_0037_1_rev.script                                          upnp\testupnp\client\scripts\upnp_cancel_register_notify_0037_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_1.script                                      upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_1_rev.script                                  upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_2.script                                      upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_2_rev.script                                  upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_1.script         										upnp\testupnp\client\scripts\upnp_renew_subscription_0039_1.script                                     
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_1_rev.script                                             upnp\testupnp\client\scripts\upnp_renew_subscription_0039_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_2.script                                                 upnp\testupnp\client\scripts\upnp_renew_subscription_0039_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_2_rev.script                                             upnp\testupnp\client\scripts\upnp_renew_subscription_0039_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_unsubscribe_0042_1.script                                                        upnp\testupnp\client\scripts\upnp_unsubscribe_0042_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_unsubscribe_0042_1_rev.script                                                    upnp\testupnp\client\scripts\upnp_unsubscribe_0042_1_rev.script                         
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_unsubscribe_0042_2.script                                                        upnp\testupnp\client\scripts\upnp_unsubscribe_0042_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_unsubscribe_0042_2_rev.script                                                    upnp\testupnp\client\scripts\upnp_unsubscribe_0042_2_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_send_notify_1.script                                                             upnp\testupnp\client\scripts\upnp_send_notify_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_send_notify_1_rev.script                                                         upnp\testupnp\client\scripts\upnp_send_notify_1_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_root_0001_1.script                                                      upnp\testupnp\client\scripts\upnp_validate_root_0001_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_root_0001_1_rev.script                                                  upnp\testupnp\client\scripts\upnp_validate_root_0001_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_1.script                                         upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_2.script                                         upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_3.script                                         upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_1_rev.script                                     upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_2_rev.script                                     upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_3_rev.script                                     upnp\testupnp\client\scripts\upnp_invalid_discovery_requests_0048_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_1.script                                 upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_1.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_1_rev.script                             upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_1_rev.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_2.script                                 upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_2.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_2_rev.script                             upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_2_rev.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_3.script                                 upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_3.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_3_rev.script                             upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_3_rev.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_4.script                                 upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_4.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_4_rev.script                             upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_4_rev.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_5.script                                 upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_5.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_5_rev.script                             upnp\testupnp\client\scripts\upnp_validate_describe_requests_headers_0060_5_rev.script  
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_11.script                          			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_11.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_12.script                          			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_12.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_13.script                          			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_13.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_14.script                          			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_14.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_15.script                          			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_15.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_16.script                          			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_16.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0062_1.script                           			upnp\testupnp\client\scripts\upnp_validate_device_registration_0062_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0062_1_rev.script                       			upnp\testupnp\client\scripts\upnp_validate_device_registration_0062_1_rev.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_11_rev.script                      			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_11_rev.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_12_rev.script                      			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_12_rev.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_13_rev.script                      			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_13_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_14_rev.script                      			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_14_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_15_rev.script                      			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_15_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_16_rev.script                      			upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_16_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_3.script										upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_4.script                                     upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_5.script                                     upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_6.script                                     upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_7.script                                     upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_7.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_8.script                                     upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_8.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_9.script                                     upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_9.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_10.script                                    upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_10.script               
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_11.script                                    upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_11.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_12.script                                    upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_12.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_13.script                                    upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_13.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_3_rev.script                                 upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_4_rev.script                                 upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_4_rev.script                  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_5_rev.script                                 upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_6_rev.script                                 upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_6_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_7_rev.script                                 upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_7_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_8_rev.script                                 upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_8_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_9_rev.script                                 upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_9_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_10_rev.script                                upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_10_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_11_rev.script                                upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_11_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_12_rev.script                                upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_12_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_13_rev.script                                upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_13_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_14_rev.script                                upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_14_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_15_rev.script                                upnp\testupnp\client\scripts\upnp_register_state_change_services_0038_15_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_abruptclose_discovery_43_1.script                                                upnp\testupnp\client\scripts\upnp_abruptclose_discovery_43_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_abruptclose_describe_44_1.script                                                 upnp\testupnp\client\scripts\upnp_abruptclose_describe_44_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_abruptclose_discovery_43_1_rev.script                                            upnp\testupnp\client\scripts\upnp_abruptclose_discovery_43_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_abruptclose_describe_44_1_rev.script                                             upnp\testupnp\client\scripts\upnp_abruptclose_describe_44_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_3.script                                                 upnp\testupnp\client\scripts\upnp_renew_subscription_0039_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_4.script                                                 upnp\testupnp\client\scripts\upnp_renew_subscription_0039_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_5.script                                                 upnp\testupnp\client\scripts\upnp_renew_subscription_0039_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_6.script                                                 upnp\testupnp\client\scripts\upnp_renew_subscription_0039_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_7.script                                                 upnp\testupnp\client\scripts\upnp_renew_subscription_0039_7.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_8.script                                                 upnp\testupnp\client\scripts\upnp_renew_subscription_0039_8.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_9.script                                                 upnp\testupnp\client\scripts\upnp_renew_subscription_0039_9.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_10.script                                                upnp\testupnp\client\scripts\upnp_renew_subscription_0039_10.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_3_rev.script	                                            upnp\testupnp\client\scripts\upnp_renew_subscription_0039_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_4_rev.script	                                            upnp\testupnp\client\scripts\upnp_renew_subscription_0039_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_5_rev.script	                                            upnp\testupnp\client\scripts\upnp_renew_subscription_0039_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_6_rev.script	                                            upnp\testupnp\client\scripts\upnp_renew_subscription_0039_6_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_7_rev.script	                                            upnp\testupnp\client\scripts\upnp_renew_subscription_0039_7_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_8_rev.script	                                            upnp\testupnp\client\scripts\upnp_renew_subscription_0039_8_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_9_rev.script	                                            upnp\testupnp\client\scripts\upnp_renew_subscription_0039_9_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_renew_subscription_0039_10_rev.script                                            upnp\testupnp\client\scripts\upnp_renew_subscription_0039_10_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_refresh_advertisement_0045_1.script	                                            upnp\testupnp\client\scripts\upnp_refresh_advertisement_0045_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_refresh_advertisement_0045_2.script	                                            upnp\testupnp\client\scripts\upnp_refresh_advertisement_0045_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_refresh_advertisement_0045_1_rev.script	                                        upnp\testupnp\client\scripts\upnp_refresh_advertisement_0045_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_refresh_advertisement_0045_2_rev.script	                                        upnp\testupnp\client\scripts\upnp_refresh_advertisement_0045_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_initiateaction_0019_2.script                                                     upnp\testupnp\client\scripts\upnp_initiateaction_0019_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_initiateaction_0019_2_rev.script                                                 upnp\testupnp\client\scripts\upnp_initiateaction_0019_2_rev.script
+
+//The following tests to be executed only in UDEB mode                                                                                
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_1.script							upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_2.script                           upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_3.script                           upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_4.script                           upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_5.script                           upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_6.script                           upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_7.script                           upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_7.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_8.script                           upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_8.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_9.script                           upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_9.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_10.script                          upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_10.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_1_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_2_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_3_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_4_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_5_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_6_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_6_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_7_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_7_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_8_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_8_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_9_rev.script                       upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_9_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_10_rev.script                      upnp\testupnp\client\scripts\upnp_validate_device_registration_0061_10_rev.script
+
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\discover_low_ver.script                      upnp\testupnp\client\scripts\discover_low_ver.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\discover_low_ver_1.script                      upnp\testupnp\client\scripts\discover_low_ver_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\scripts\discover_low_ver_2.script                      upnp\testupnp\client\scripts\discover_low_ver_2.script
+                                                                                                                                   
+//ini files
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0001.ini															upnp\testupnp\client\testdata\ini_files\discovery0001.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0002.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0002.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0003.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0003.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0004.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0004.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0005.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0005.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0006.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0006.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0007.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0007.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0008.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0008.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0009.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0009.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0010.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0010.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0011.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0011.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0012.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0012.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0013.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0013.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0014.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0014.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0015.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0015.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0016.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0016.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0017.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0017.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery0018.ini                                                          upnp\testupnp\client\testdata\ini_files\discovery0018.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\opendiscovery_001.ini                                                      upnp\testupnp\client\testdata\ini_files\opendiscovery_001.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\opendiscovery_001_rev.ini                                                  upnp\testupnp\client\testdata\ini_files\opendiscovery_001_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\describe.ini                  												upnp\testupnp\client\testdata\ini_files\describe.ini                                        
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\initiateaction_0019.ini                                                    upnp\testupnp\client\testdata\ini_files\initiateaction_0019.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\initiateaction_0019_rev.ini                                                upnp\testupnp\client\testdata\ini_files\initiateaction_0019_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\canceldiscovery.ini                                                        upnp\testupnp\client\testdata\ini_files\canceldiscovery.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\canceldiscovery_rev.ini                                                    upnp\testupnp\client\testdata\ini_files\canceldiscovery_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\publish.ini                  												upnp\testupnp\client\testdata\ini_files\publish.ini                                         
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\describe_0029.ini                                                          upnp\testupnp\client\testdata\ini_files\describe_0029.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini                                                      upnp\testupnp\client\testdata\ini_files\describe_0029_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\describe_0030.ini                                                          upnp\testupnp\client\testdata\ini_files\describe_0030.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini                                                      upnp\testupnp\client\testdata\ini_files\describe_0030_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\register_0036.ini                                                          upnp\testupnp\client\testdata\ini_files\register_0036.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini                                                      upnp\testupnp\client\testdata\ini_files\register_0036_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\register_0037.ini                                                          upnp\testupnp\client\testdata\ini_files\register_0037.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\register_0037_rev.ini                                                      upnp\testupnp\client\testdata\ini_files\register_0037_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini                                                         upnp\testupnp\client\testdata\ini_files\subscribe_0038.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini                                                     upnp\testupnp\client\testdata\ini_files\subscribe_0038_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini                                                         upnp\testupnp\client\testdata\ini_files\subscribe_0039.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini                                                     upnp\testupnp\client\testdata\ini_files\subscribe_0039_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\subscribe_0042.ini                                                         upnp\testupnp\client\testdata\ini_files\subscribe_0042.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\subscribe_0042_rev.ini                                                     upnp\testupnp\client\testdata\ini_files\subscribe_0042_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\sendnotify.ini                                                             upnp\testupnp\client\testdata\ini_files\sendnotify.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\sendnotify_rev.ini                                                         upnp\testupnp\client\testdata\ini_files\sendnotify_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\publish_0001.ini                                                           upnp\testupnp\client\testdata\ini_files\publish_0001.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\publish_0001_rev.ini                                                       upnp\testupnp\client\testdata\ini_files\publish_0001_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery_0048.ini                                                         upnp\testupnp\client\testdata\ini_files\discovery_0048.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery_0048_rev.ini                                                     upnp\testupnp\client\testdata\ini_files\discovery_0048_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery_0049.ini  														upnp\testupnp\client\testdata\ini_files\discovery_0049.ini                                                  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discovery_0049_rev.ini  													upnp\testupnp\client\testdata\ini_files\discovery_0049_rev.ini                                                  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\describe_0060.ini                                                          upnp\testupnp\client\testdata\ini_files\describe_0060.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini                                                      upnp\testupnp\client\testdata\ini_files\describe_0060_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\publish_0061.ini															upnp\testupnp\client\testdata\ini_files\publish_0061.ini	
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini  														upnp\testupnp\client\testdata\ini_files\publish_0061_rev.ini  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\publish_0062.ini                          									upnp\testupnp\client\testdata\ini_files\publish_0062.ini      
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\publish_0062_rev.ini                       								upnp\testupnp\client\testdata\ini_files\publish_0062_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp.ini                     								upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp_rev.ini                 								upnp\testupnp\client\testdata\ini_files\upnp_abruptclosecp_rev.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045.ini                     									upnp\testupnp\client\testdata\ini_files\refresh_adv_0045.ini
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\refresh_adv_0045_rev.ini                 									upnp\testupnp\client\testdata\ini_files\refresh_adv_0045_rev.ini
+
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\ini_files\discover_low_ver.ini                 									upnp\testupnp\client\testdata\ini_files\discover_low_ver.ini
+
+//service-xml files
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\avtransport2.xml                                                             upnp\testupnp\client\testdata\service\avtransport2.xml
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\connectionmanager2.xml                                                       upnp\testupnp\client\testdata\service\connectionmanager2.xml
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\contentdirectory2.xml                                                        upnp\testupnp\client\testdata\service\contentdirectory2.xml
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\renderingcontrol2.xml                                                        upnp\testupnp\client\testdata\service\renderingcontrol2.xml
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\scheduledrecording1.xml                                                      upnp\testupnp\client\testdata\service\scheduledrecording1.xml
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\renderingcontrol1.xml   														upnp\testupnp\client\testdata\service\renderingcontrol1.xml																						                                                
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\scan1.xml  																	upnp\testupnp\client\testdata\service\scan1.xml
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\feeder1.xml																	upnp\testupnp\client\testdata\service\feeder1.xml
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\action.xml         																	upnp\testupnp\client\testdata\action.xml
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\actionresponse.xml 																	upnp\testupnp\client\testdata\actionresponse.xml
+
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\avtransport1.xml																upnp\testupnp\client\testdata\service\avtransport1.xml		
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\contentdirectory1.xml                                                        upnp\testupnp\client\testdata\service\contentdirectory1.xml 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\client\testdata\service\connectionmanager1.xml                                                       upnp\testupnp\client\testdata\service\connectionmanager1.xml
+
+data=EPOCROOT##epoc32\data\z\resource\upnp\icons\playstation1.png      \resource\upnp\icons\playstation1.png
+data=EPOCROOT##epoc32\data\z\resource\upnp\icons\playstation2.png      \resource\upnp\icons\playstation2.png
+data=EPOCROOT##epoc32\data\z\resource\upnp\icons\playstation3.png      \resource\upnp\icons\playstation3.png
+data=EPOCROOT##epoc32\data\z\resource\upnp\icons\playstation4.png      \resource\upnp\icons\playstation4.png
+
+                                                                                                                                                                                
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/multiple_machines_client.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,53 @@
+// 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:
+//
+
+TARGET      	multiple_machines_client.exe
+TARGETTYPE  	exe
+UID		0x1000007A 0xA0009306
+VENDORID 	0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+
+SOURCE 			testupnp.cpp
+SOURCE 			testupnpmanager.cpp
+SOURCE			testrcontrolchannel.cpp
+
+
+USERINCLUDE		../inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/upnp
+SYSTEMINCLUDE		/epoc32/include/test
+SYSTEMINCLUDE		/epoc32/include/ecom
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			pnp.lib
+LIBRARY			esock.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+LIBRARY			upnputils.lib
+LIBRARY			inetprotutil.lib
+LIBRARY         insock.lib
+LIBRARY         commdb.lib
+LIBRARY			cinidata.lib
+LIBRARY			upnpdescription.lib
+LIBRARY         netmeta.lib
+LIBRARY         nodemessages.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/multiple_machines_server.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,229 @@
+// 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 __MULTIPLE_MACHINES_SERVER_IBY__
+#define __MULTIPLE_MACHINES_SERVER_IBY__
+
+#include <testexecute.iby>
+// Product code iby files
+
+file=ABI_DIR\BUILD_DIR\multiple_machines_server.exe		                 Sys\Bin\multiple_machines_server.exe	
+
+//server scripts
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0001.script																					upnp\testupnp\server\scripts\upnp_discovery_0001.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0002.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0002.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0002_1.script                                                                                  upnp\testupnp\server\scripts\upnp_discovery_0002_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0003.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0003.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0004.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0004.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0005.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0005.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0006.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0006.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0007.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0007.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0008.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0008.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0008_1.script                                                                                  upnp\testupnp\server\scripts\upnp_discovery_0008_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0009.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0009.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0010.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0010.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0011.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0011.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0012.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0012.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0012_1.script                                                                                  upnp\testupnp\server\scripts\upnp_discovery_0012_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0013.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0013.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0014.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0014.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0015.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0015.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0016.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0016.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0017.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0017.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0018.script                                                                                    upnp\testupnp\server\scripts\upnp_discovery_0018.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_discovery_0018_1.script                                                                                  upnp\testupnp\server\scripts\upnp_discovery_0018_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_open_discovery_001.script                                                         						upnp\testupnp\server\scripts\upnp_open_discovery_001.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_open_discovery_001_rev.script                                                     						upnp\testupnp\server\scripts\upnp_open_discovery_001_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_initiateaction_0019.script                                                                               upnp\testupnp\server\scripts\upnp_initiateaction_0019.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_initiateaction_0019_rev.script                                                                           upnp\testupnp\server\scripts\upnp_initiateaction_0019_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_cancel_discovery.script                                                                                  upnp\testupnp\server\scripts\upnp_cancel_discovery.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_cancel_discovery_rev.script                                                                              upnp\testupnp\server\scripts\upnp_cancel_discovery_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_cancel_discovery_1.script                                                                                upnp\testupnp\server\scripts\upnp_cancel_discovery_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_cancel_discovery_1_rev.script                                                                            upnp\testupnp\server\scripts\upnp_cancel_discovery_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_cancel_discovery_0001.script                                                                             upnp\testupnp\server\scripts\upnp_cancel_discovery_0001.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_cancel_discovery_0001_rev.script                                                                         upnp\testupnp\server\scripts\upnp_cancel_discovery_0001_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_publish_regression.script                                                                                upnp\testupnp\server\scripts\upnp_publish_regression.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_service_description_0031.script                                                                   upnp\testupnp\server\scripts\upnp_vendor_service_description_0031.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036.script	                                                                            upnp\testupnp\server\scripts\upnp_register_notify_0036.script	
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_discovery_response_time_0049_1.script                                                           upnp\testupnp\server\scripts\upnp_validate_discovery_response_time_0049_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_discovery_response_time_0049_1_rev.script                                                       upnp\testupnp\server\scripts\upnp_validate_discovery_response_time_0049_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_1.script                                                                  upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_1_rev.script                                                              upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_2.script                                                                  upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_2_rev.script                                                              upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_3.script                                                                  upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_3_rev.script                                                              upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_4.script                                                                  upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_4_rev.script                                                              upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_5.script                                                                  upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_5_rev.script                                                              upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_6.script                                                                  upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_6_rev.script                                                              upnp\testupnp\server\scripts\upnp_vendor_device_description_0029_6_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_1.script                                                               upnp\testupnp\server\scripts\upnp_standard_service_description_0030_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_1_rev.script                                                           upnp\testupnp\server\scripts\upnp_standard_service_description_0030_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_2.script                                                               upnp\testupnp\server\scripts\upnp_standard_service_description_0030_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_2_rev.script                                                           upnp\testupnp\server\scripts\upnp_standard_service_description_0030_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_3.script                                                               upnp\testupnp\server\scripts\upnp_standard_service_description_0030_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_3_rev.script                                                           upnp\testupnp\server\scripts\upnp_standard_service_description_0030_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_4.script                                                               upnp\testupnp\server\scripts\upnp_standard_service_description_0030_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_4_rev.script                                                           upnp\testupnp\server\scripts\upnp_standard_service_description_0030_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_5.script                                                               upnp\testupnp\server\scripts\upnp_standard_service_description_0030_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_standard_service_description_0030_5_rev.script                                                           upnp\testupnp\server\scripts\upnp_standard_service_description_0030_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_1.script                                                                            upnp\testupnp\server\scripts\upnp_register_notify_0036_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_1_rev.script                                                                        upnp\testupnp\server\scripts\upnp_register_notify_0036_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_2.script                                                                            upnp\testupnp\server\scripts\upnp_register_notify_0036_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_2_rev.script                                                                        upnp\testupnp\server\scripts\upnp_register_notify_0036_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_3.script                                                                            upnp\testupnp\server\scripts\upnp_register_notify_0036_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_3_rev.script                                                                        upnp\testupnp\server\scripts\upnp_register_notify_0036_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_4.script                                                                            upnp\testupnp\server\scripts\upnp_register_notify_0036_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_4_rev.script                                                                        upnp\testupnp\server\scripts\upnp_register_notify_0036_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_5.script                                                                            upnp\testupnp\server\scripts\upnp_register_notify_0036_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_5_rev.script                                                                        upnp\testupnp\server\scripts\upnp_register_notify_0036_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_6.script                                                                            upnp\testupnp\server\scripts\upnp_register_notify_0036_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_6_rev.script                                                                        upnp\testupnp\server\scripts\upnp_register_notify_0036_6_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_7.script                                                                            upnp\testupnp\server\scripts\upnp_register_notify_0036_7.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_notify_0036_7_rev.script                                                                        upnp\testupnp\server\scripts\upnp_register_notify_0036_7_rev.script
+
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_cancel_register_notify_0037_1.script                                                                     upnp\testupnp\server\scripts\upnp_cancel_register_notify_0037_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_cancel_register_notify_0037_1_rev.script                                                                 upnp\testupnp\server\scripts\upnp_cancel_register_notify_0037_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_1.script                                                             upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_1_rev.script                                                         upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_2.script                                                             upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_2_rev.script                                                         upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_1.script                                                                         upnp\testupnp\server\scripts\upnp_renew_subscription_0039_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_1_rev.script                                                                     upnp\testupnp\server\scripts\upnp_renew_subscription_0039_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_2.script                                                                         upnp\testupnp\server\scripts\upnp_renew_subscription_0039_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_2_rev.script                                                                     upnp\testupnp\server\scripts\upnp_renew_subscription_0039_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_unsubscribe_0042_1.script                                                                                upnp\testupnp\server\scripts\upnp_unsubscribe_0042_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_unsubscribe_0042_1_rev.script                                                                            upnp\testupnp\server\scripts\upnp_unsubscribe_0042_1_rev.script                        
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_unsubscribe_0042_2.script                                                                                upnp\testupnp\server\scripts\upnp_unsubscribe_0042_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_unsubscribe_0042_2_rev.script                                                                            upnp\testupnp\server\scripts\upnp_unsubscribe_0042_2_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_send_notify_1.script                                                                                     upnp\testupnp\server\scripts\upnp_send_notify_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_send_notify_1_rev.script                                                                                 upnp\testupnp\server\scripts\upnp_send_notify_1_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_root_0001_1.script                                                                              upnp\testupnp\server\scripts\upnp_validate_root_0001_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_root_0001_1_rev.script		                                                                    upnp\testupnp\server\scripts\upnp_validate_root_0001_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_1.script                                                                 upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_2.script                                                                 upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_3.script                                                                 upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_1_rev.script                                                             upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_2_rev.script                                                             upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_3_rev.script                                                             upnp\testupnp\server\scripts\upnp_invalid_discovery_requests_0048_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_1.script                                                         upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_1.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_1_rev.script                                                     upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_1_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_2.script                                                         upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_2.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_2_rev.script                                                     upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_2_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_3.script                                                         upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_3.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_3_rev.script                                                     upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_3_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_4.script                                                         upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_4.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_4_rev.script                                                     upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_4_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_5.script                                                         upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_5.script  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_5_rev.script                                                     upnp\testupnp\server\scripts\upnp_validate_describe_requests_headers_0060_5_rev.script 
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_11.script                          upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_11.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_12.script                          upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_12.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_13.script                          upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_13.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_14.script                          upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_14.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_15.script                          upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_15.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_16.script                          upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_16.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0062_1.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0062_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0062_1_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0062_1_rev.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_11_rev.script                      upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_11_rev.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_12_rev.script                      upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_12_rev.script
+//data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_13_rev.script                      upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_13_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_14_rev.script                      upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_14_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_15_rev.script                      upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_15_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_16_rev.script                      upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_16_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_3.script										upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_4.script                                     upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_5.script                                     upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_6.script                                     upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_7.script                                     upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_7.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_8.script                                     upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_8.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_9.script                                     upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_9.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_10.script                                    upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_10.script               
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_11.script                                    upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_11.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_12.script                                    upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_12.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_13.script                                    upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_13.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_3_rev.script                                 upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_4_rev.script                                 upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_4_rev.script                  
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_5_rev.script                                 upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_6_rev.script                                 upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_6_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_7_rev.script                                 upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_7_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_8_rev.script                                 upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_8_rev.script 
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_9_rev.script                                 upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_9_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_10_rev.script                                upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_10_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_11_rev.script                                upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_11_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_12_rev.script                                upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_12_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_13_rev.script                                upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_13_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_14_rev.script                                upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_14_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_15_rev.script                                upnp\testupnp\server\scripts\upnp_register_state_change_services_0038_15_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_abruptclose_discovery_43_1.script                                                upnp\testupnp\server\scripts\upnp_abruptclose_discovery_43_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_abruptclose_describe_44_1.script                                                 upnp\testupnp\server\scripts\upnp_abruptclose_describe_44_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_abruptclose_discovery_43_1_rev.script                                            upnp\testupnp\server\scripts\upnp_abruptclose_discovery_43_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_abruptclose_describe_44_1_rev.script                                             upnp\testupnp\server\scripts\upnp_abruptclose_describe_44_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_3.script                                                 upnp\testupnp\server\scripts\upnp_renew_subscription_0039_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_4.script                                                 upnp\testupnp\server\scripts\upnp_renew_subscription_0039_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_5.script                                                 upnp\testupnp\server\scripts\upnp_renew_subscription_0039_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_6.script                                                 upnp\testupnp\server\scripts\upnp_renew_subscription_0039_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_7.script                                                 upnp\testupnp\server\scripts\upnp_renew_subscription_0039_7.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_8.script                                                 upnp\testupnp\server\scripts\upnp_renew_subscription_0039_8.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_9.script                                                 upnp\testupnp\server\scripts\upnp_renew_subscription_0039_9.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_10.script                                                upnp\testupnp\server\scripts\upnp_renew_subscription_0039_10.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_3_rev.script	                                            upnp\testupnp\server\scripts\upnp_renew_subscription_0039_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_4_rev.script	                                            upnp\testupnp\server\scripts\upnp_renew_subscription_0039_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_5_rev.script	                                            upnp\testupnp\server\scripts\upnp_renew_subscription_0039_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_6_rev.script	                                            upnp\testupnp\server\scripts\upnp_renew_subscription_0039_6_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_7_rev.script	                                            upnp\testupnp\server\scripts\upnp_renew_subscription_0039_7_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_8_rev.script	                                            upnp\testupnp\server\scripts\upnp_renew_subscription_0039_8_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_9_rev.script	                                            upnp\testupnp\server\scripts\upnp_renew_subscription_0039_9_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_renew_subscription_0039_10_rev.script                                            upnp\testupnp\server\scripts\upnp_renew_subscription_0039_10_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_refresh_advertisement_0045_1.script	                                            upnp\testupnp\server\scripts\upnp_refresh_advertisement_0045_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_refresh_advertisement_0045_2.script	                                            upnp\testupnp\server\scripts\upnp_refresh_advertisement_0045_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_refresh_advertisement_0045_1_rev.script	                                        upnp\testupnp\server\scripts\upnp_refresh_advertisement_0045_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_refresh_advertisement_0045_2_rev.script	                                        upnp\testupnp\server\scripts\upnp_refresh_advertisement_0045_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_initiateaction_0019_2.script                                                     upnp\testupnp\server\scripts\upnp_initiateaction_0019_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_initiateaction_0019_2_rev.script                                                 upnp\testupnp\server\scripts\upnp_initiateaction_0019_2_rev.script
+
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\discover_low_ver.script                                                 upnp\testupnp\server\scripts\discover_low_ver.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\discover_low_ver_1.script                                                 upnp\testupnp\server\scripts\discover_low_ver_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\discover_low_ver_2.script                                                 upnp\testupnp\server\scripts\discover_low_ver_2.script
+
+//The following tests to be executed only in UDEB mode
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_1.script							upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_1.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_2.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_2.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_3.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_3.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_4.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_4.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_5.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_5.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_6.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_6.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_7.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_7.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_8.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_8.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_9.script                           upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_9.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_10.script                          upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_10.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_1_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_1_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_2_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_2_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_3_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_3_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_4_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_4_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_5_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_5_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_6_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_6_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_7_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_7_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_8_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_8_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_9_rev.script                       upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_9_rev.script
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_10_rev.script                      upnp\testupnp\server\scripts\upnp_validate_device_registration_0061_10_rev.script
+
+
+//ini file
+data=EPOCROOT##epoc32\data\z\upnp\testupnp\server\testdata\ini_files\multiplemachines.ini                                                       			upnp\testupnp\server\testdata\ini_files\multiplemachines.ini
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/multiple_machines_server.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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:
+//
+
+TARGET      	multiple_machines_server.exe
+TARGETTYPE  	exe
+UID		0x1000007A 0xA0009307
+VENDORID 	0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+
+SOURCE 			testupnp.cpp
+SOURCE 			testupnpmanager.cpp
+SOURCE			testrcontrolchannel.cpp
+
+
+USERINCLUDE		../inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/upnp
+SYSTEMINCLUDE		/epoc32/include/test
+SYSTEMINCLUDE		/epoc32/include/ecom
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			pnp.lib
+LIBRARY			esock.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+LIBRARY			upnputils.lib
+LIBRARY			inetprotutil.lib
+LIBRARY        	insock.lib
+LIBRARY        	commdb.lib
+LIBRARY			cinidata.lib
+LIBRARY			upnpdescription.lib
+LIBRARY         netmeta.lib
+LIBRARY         nodemessages.lib
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/group/single_machine.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+// 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:
+//
+
+TARGET      	single_machine.exe
+TARGETTYPE  	exe
+UID		0x1000007A 0xA0009308
+VENDORID 	0x70000001
+CAPABILITY   	All -TCB
+
+SOURCEPATH		../src
+
+SOURCE 			testupnp.cpp
+SOURCE 			testupnpmanager.cpp
+SOURCE			testrcontrolchannel.cpp
+
+
+USERINCLUDE		../inc
+
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/upnp
+SYSTEMINCLUDE		/epoc32/include/test
+SYSTEMINCLUDE		/epoc32/include/ecom
+
+LIBRARY			euser.lib
+LIBRARY			etext.lib
+LIBRARY			efsrv.lib
+LIBRARY			bafl.lib
+LIBRARY			pnp.lib
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib 
+LIBRARY			upnputils.lib
+LIBRARY			inetprotutil.lib
+LIBRARY         esock.lib 
+LIBRARY         insock.lib
+LIBRARY         commdb.lib
+LIBRARY			cinidata.lib
+LIBRARY			upnpdescription.lib
+LIBRARY         netmeta.lib
+LIBRARY         nodemessages.lib
+
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/constants.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,156 @@
+// 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:
+// Contains constants refered in test code
+// 
+//
+
+#ifndef __CONSTANTS_H__
+#define __CONSTANTS_H__
+
+// Constant literals
+_LIT(KTestUPnPManager, "TestUPnPManager");
+_LIT(KTestRControlChannel, "TestRControlChannel");
+
+
+const TInt KMaxLogSize 		= 1024;
+const TInt KMaxUriSize 		= 1024;
+const TUint KTierId 		= 0x2000D054;
+
+//Constants
+_LIT(KDiscovery, 			"discovery");
+_LIT(KDescribe, 			"describe");
+_LIT(KSubscribe, 			"subscribe");
+_LIT(KRegisterAnnouncement, "registernotify");
+_LIT(KUnsubscribe, 			"unsubscribe");
+_LIT(KPublishService, 		"publishservice");
+_LIT(KPublishDevice, 		"publishdevice");
+_LIT(KNotify, 				"notify");
+_LIT(KCancelDiscover, 		"canceldiscovery");
+_LIT(KCancelDescribe, 		"canceldescribe");
+_LIT(KCancelNotify,			"cancelnotify");
+_LIT(KUnKnown, 				"unknown");
+_LIT(KStartScheduler,		"startscheduler");
+_LIT(KStopScheduler,		"stopscheduler");
+_LIT(KPrintResults,			"printresults");
+_LIT(KPrintAnnouncements,	"printannouncements");
+_LIT(KStartTimer,			"starttimer");
+_LIT(KReadIni,				"readini");
+_LIT(KInitiateControl,		"initiateaction");
+_LIT(KDescribeService,		"describeservice");
+_LIT(KOpenDiscoverer,		"opendiscoverer");
+_LIT(KOpenPublisher,		"openpublisher");
+_LIT(KDefaultFileFormat,	"%c:\\describeoutput_");
+_LIT(KDefaultExtension, 	".txt");
+_LIT(KCancelAll,			"cancelall");
+_LIT(KCancelAllService,		"cancelallservicedescription");
+_LIT(KExpctedDescriptions,	"expecteddescriptions");
+_LIT(KPositiveCase,			"positivecase");
+_LIT(KServiceMaxDuration, 	"serviceduration");
+_LIT(KDescribeIcon, 		"describeicon");
+
+//Constant literals -- Discovery response 
+_LIT(KLocation,				"location");
+_LIT(KSearchTarget,			"searchtarget");
+_LIT(KServiceType,			"servicetype");
+_LIT(KCacheControl,			"cachecontrol");
+_LIT(KExpiryTime, 			"expirytime");
+_LIT(KDate,					"date");
+_LIT(KExtResponse,			"extresponse");
+_LIT(KServer,				"server");
+_LIT(KUsn,					"usn");
+_LIT(KOkResponse,			"okresponse");
+_LIT(KResponseTime, 		"responsetime");
+_LIT(KUSN, 					"usn");
+_LIT(KDescription, 			"description");
+_LIT(KServiceDescription, 	"servicedescription");
+_LIT(KDescriptionPath, 		"descriptionpath");
+_LIT(KTimeOut, 				"timeout");
+_LIT(KSid, 					"sid");
+_LIT(KNotification,			"notification");
+_LIT(KUri, 					"uri");
+_LIT(KSubscriptionUri, 		"subscriptionuri");
+_LIT(KDuration, 			"duration");
+_LIT8(KSsdpall,				"ssdp:all");
+_LIT(KOperationType,		"operationtype");
+_LIT8(KHeaderValue,			"%S:%d");
+_LIT(KIconRefer,			"iconRefer");
+_LIT(KMimeType,			"mimetype");
+_LIT(KWidth,				"width");
+_LIT(KHeight,				"height");
+_LIT(KDepth,				"depth");
+_LIT(KUrl,					"url");
+
+const TInt KMaxBufLength = 256;
+
+// constants for Device Register params
+
+_LIT(KBaseURL, "BaseURL");
+_LIT(KParentDeviceUid, "ParentDeviceUid");
+_LIT(KDeviceType, "DeviceType");
+_LIT(KFriendlyName, "FriendlyName");
+_LIT(KManufacturer, "Manufacturer");
+_LIT(KManufacturerURL, "ManufacturerURL");
+_LIT(KModelDescription, "ModelDescription");
+_LIT(KModelName, "ModelName");
+_LIT(KModelNumber, "ModelNumber");
+_LIT(KModelURL, "ModelURL");
+_LIT(KPresentationURL, "PresentationURL");
+_LIT(KSerialNumber, "SerialNumber");
+_LIT(KUDN, "UDN");
+_LIT(KUPC, "UPC");
+_LIT(KDescription_Path,"Description_Path %d");
+
+//Cntrl Url
+_LIT8(KStartCntrlUrl, "<controlURL>");
+_LIT8(KEndCntrlUrl, "</controlURL>");
+const TInt cntrlLength = 12;// 12 is the length of the <controlURL>
+
+_LIT8(KStartScpdUrl, "<SCPDURL>");
+_LIT8(KEndScpdUrl, "</SCPDURL>");
+const TInt scpdLength = 9;// 9 is the length of the <SCPDURL>
+
+//Event Url
+_LIT8(KStartEventUrl, "<eventSubURL>");
+_LIT8(KEndEventUrl, "</eventSubURL>");
+const TInt eventLength = 13;// 9 is the length of the <eventSubURL>
+
+_LIT8(KSlash, "/");
+_LIT8(KColonSlashSlash, "://");
+_LIT8(KColon, ":");
+
+
+//Panics
+_LIT(KDescribeTestPanicCategory,"Describe");
+_LIT(KDescoveryTestPanicCategory, "Discovery");
+
+_LIT(KExpectedURL, "expectedurl");
+_LIT(KExpectedCount, "expectedcount");
+	
+enum TestUPnPError
+	{
+	//No Description path found
+	KErrNoDescriptionPath 			= -1,
+	KErrNODiscoveryResponse 		= -2,
+	KErrNoServiceUris 				= -3,
+	KErrMissingURiOrResponceTime 	= -4
+	};
+
+enum TPublisherControl
+	{
+	KDevice,
+	KService,
+	KErrNoControl = -1
+	};
+
+#endif //__CONSTANTS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/testrcontrolchannel.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,143 @@
+// 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:
+// testcontrolchannel.h
+// Contains declarations of CTestRControlChannel class
+// 
+//
+
+#ifndef __TEST_RCONTROL_CHANNEL_H__
+#define __TEST_RCONTROL_CHANNEL_H__
+
+// System Includes
+#include <testexecutestepbase.h>
+#include <e32base.h>
+#include <e32cmn.h>
+#include <e32std.h>
+#include <upnpparamset.h>
+#include <upnp/rpnpservicediscovery.h>
+#include <upnp/rpnpservicepublisher.h>
+#include <upnpparamset.h>
+#include <upnp/mpnpobserver.h>
+#include <upnp/pnpparameterbundle.h>
+#include <uri8.h>
+#include <inetprottextutils.h>
+#include <f32file.h>
+#include <upnp/rcontrolchannel.h>
+
+
+// User Includes
+#include "constants.h"
+
+class CRControlChannelObserver;
+class CUPnPRControlChannelAO;
+
+/*
+CTestRControlChannel class which is derived from the CTestStep and provides the
+functionalities to perform Create (and open) an individual TestStep (testcase or part testcase), Run a TestStep
+with defined pre and post processing, Abort a TestStep, Close a TestStep session.
+Also performed to run as control point or service point, performs a sequence of upnp operations
+and get back the results to compare them against expected results.
+*/
+class CTestRControlChannel : public CTestStep
+	{
+public:
+	CTestRControlChannel();
+	~CTestRControlChannel();
+
+	virtual TVerdict doTestStepPreambleL();
+	virtual TVerdict doTestStepPostambleL();
+	virtual TVerdict doTestStepL();
+
+
+private:
+	void InitializeL();
+	void SequenceOperationsL();
+	void PerformDesiredOperationsL(const TDesC& aSequence);
+
+	void OpenPublisherL();
+	void PublishDeviceL (TDesC& aOperationType);
+	void PublishServiceL (const TDesC& aOperationType);
+	void ExtractServiceDescriptionL (const TDesC& aConfigSection, CUPnPServiceRegisterParamSet& aServiceRegisterParamSet);
+	void TokenizeStringL(const TDesC& aString, RArray<TPtrC>& aList, TChar aSeparator = ',');
+	void SendNotificationsL();
+	void InitiateControlL();
+	void CleanUpObserverArray();
+	void SavePreviousLogFileL();
+	
+private:
+	TBuf<KMaxBufLength> 				iScriptName;
+	RPnPServicePublisher				iPublisher;
+	RPointerArray<CRControlChannelObserver>	 	iObserverArray;
+	CPeriodic*			             	iTimer;
+	CActiveScheduler*					iScheduler;
+	
+	RConnection							iConnection;
+	RSocketServ							iSocketServ;
+	};
+
+/*
+CRControlChannelObserver class which is derived from CBase and MPnPObserver to provide the
+following functionalities. It supports the methods capture the results when an
+upnp event is hit after performing any upnp operation.
+*/
+class CRControlChannelObserver: public CBase, MPnPObserver
+	{
+public:
+	static CRControlChannelObserver* NewL(CTestRControlChannel* aManager);
+	~CRControlChannelObserver();
+	void OnPnPEventL (RPnPParameterBundleBase& aServiceEventInfo);
+	void OnPnPError (TInt aError);
+	CTestRControlChannel& Manager();
+	void CopyResultBundlesL(const RPnPParameterBundle& aPnpBundle);
+private:
+	CRControlChannelObserver();
+	void ConstructL(CTestRControlChannel* aManager);
+
+private:
+	CTestRControlChannel* 					iManager;
+	};
+
+
+class CUPnPRControlChannelAO:public CActive
+    {
+public:
+     
+     CUPnPRControlChannelAO(RControlChannel& aControlChannel,CTestRControlChannel* aManager);
+     ~ CUPnPRControlChannelAO(); 
+     void ExtractSoapResponse(RBuf8& aSoapResponse);        
+	 void RecvdataL();
+	 void SenddataL();
+	 void RunL();
+	 void DoCancel();     
+    static TInt TimerCallbackL ( TAny* aPtr );
+    
+private:
+     enum Tstate
+	 {
+    	 ERecv,
+    	 EStop
+	 };
+         
+     Tstate iState;
+     RControlChannel& iControlChannel;
+     TControlMessage 		iInComingAction;
+     RBuf8 iIncomingActionBuffer;
+     RBuf8 iOutgoingActionBuffer;
+     RBuf8 iCompleteBuffer;
+     TInt  iExepecteBufLen;
+	CTestRControlChannel* 	iManager; 
+	CPeriodic*				iTimer;
+    };
+
+#endif //__TEST_RCONTROL_CHANNEL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/testupnp.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+// 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:
+// Contains declarations of CTestUPnP class
+// 
+//
+
+#ifndef __TEST_UPNP_H__
+#define __TEST_UPNP_H__
+#include <testexecuteserverbase.h>
+
+/*
+CTestUPnP class which is derived from the Test server and provides the functionalities to 
+perform ability to run individual test steps (test cases or part testcases) either sequentially 
+or concurrently within scripts (test harnesses). 
+*/
+
+class CTestUPnP : public CTestServer
+	{
+public:
+	static CTestUPnP* NewL();
+	// Base class pure virtual override
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+
+protected:
+	CTestStep*    CreateTestStepL(const TDesC& aStepName);
+	};
+
+#endif // __TEST_UPNP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/testupnpmanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,314 @@
+// 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:
+// Contains declaration of CTestUPnPManager, CUPnPObserver, CUPnPTimer, 
+// and CAction classes
+// 
+//
+
+#ifndef __TEST_UPNP_MANAGER_H__
+#define __TEST_UPNP_MANAGER_H__
+
+// System Includes
+#include <testexecutestepbase.h>
+#include <e32base.h>
+#include <e32cmn.h>
+#include <e32std.h>
+#include <upnpparamset.h>
+#include <upnp/rpnpservicediscovery.h>
+#include <upnp/rpnpservicepublisher.h>
+#include <upnpparamset.h>
+#include <upnp/mpnpobserver.h>
+#include <upnp/pnpparameterbundle.h>
+#include <uri8.h>
+#include <inetprottextutils.h>
+#include <f32file.h>
+#include <es_sock.h>
+#include <in_sock.h>
+#include <commdbconnpref.h>
+#include <e32des8.h>
+#include <cinidata.h>
+#include <upnpdescriptionschema.h>
+#include <cstringpoolmanager.h>
+#include <cupnpdescriptionparser.h>
+
+
+
+// User Includes
+#include "constants.h"
+
+
+// Forward declarations
+class CUPnPObserver;
+class CAction;
+
+
+/*
+CTestUPnPManager class which is derived from the CTestStep and provides the
+functionalities to perform Create (and open) an individual TestStep (testcase or part testcase), Run a TestStep
+with defined pre and post processing, Abort a TestStep, Close a TestStep session.
+Also performs the creation control point or service point, performs a sequence of upnp operations
+and get back the results to compare them against expected results.
+*/
+class CTestUPnPManager : public CTestStep
+	{
+public:
+	CTestUPnPManager();
+	~CTestUPnPManager();
+
+	virtual TVerdict doTestStepPreambleL();
+	virtual TVerdict doTestStepPostambleL();
+	virtual TVerdict doTestStepL();
+
+	void SetCurrentSection(const TDesC& aCurrentSection);
+	TDesC& GetCurrentSection();
+	
+	// Operation  related functions
+	void InitializeL();
+	void SequenceOperationsL();
+	void PerformDesiredOperationsL(const TDesC& aSequence);
+
+	// UPnP API related functions
+	TInt OpenPublisherL();
+	void OpenMultiplePublisherL();	
+	void OpenDiscovererL();
+	void ClosePublisher();
+	void DiscoverL(const TDesC& aOperationType);
+	void PublishDeviceL(const TDesC& aOperationType);
+	void PublishServiceL(const TDesC& aOperationType);
+	void DescribeL();
+	void DescribeServiceL();
+	void DescribeIconL();
+	void RegisterForAnnouncementsL(const TDesC& aOperationType);
+	void InitiateActionL(const TDesC& aOperationType);
+	void SubscribeForStateChangeNotificationsL();
+	void ReSubscribeForStateChangeNotificationsL();
+	TBool SendNotificationsL (CUPnPObserver* aObserver);
+
+	// Cancellation related functions
+	void CancelPublish();
+	void CancelDiscoverL(const TDesC& aOperationType);
+	void CancelNotifyAnnouncementL (const TDesC& aOperationType);
+	void UnsubscribeForStateChangeNotificationsL(const TDesC& aOperationType);
+	void CancelDescribeL(const TDesC& aOperationType);
+	void CancelAllDeviceDescribeL();
+	void CancelAllServiceDescribeL();
+
+	// Cleanup related functions
+	void CleanUpObserverArray();
+	void CloseDiscoverer();
+	void ScpdUriArrayCleanUp();
+	void ControlUriArrayCleanUp();
+	void EventUriArrayCleanUp();
+	void DeleteSeriveUrlsList(TInt aIndex);
+	void CleanUpResultsArray();
+
+	// Utility functions
+	void ResolveAllUrisL();
+	void ResolveScpdUrisL(TInt aIndex);
+	void ResolveEventUrisL(TInt aIndex);
+	void ResolveControlUrisL(TInt aIndex);
+	void AppendScpdUriL(RBuf8& aScpdUri);
+	void AppendEventUriL(RBuf8& aEventUri);
+	void AppendControlUriL(RBuf8& aControlUri);
+	void DescriptionSuiteCleanUp();
+	void GetServiceUrlsListL(TInt aIndex);
+	void GetEmbeddedDeviceServicesL(TInt aIndex, CUPnPDevice* aDevice);
+	void GetServiceValuesL(TInt aIndex, CUPnPDevice* aDevice);
+	void ExtractServiceDescriptionL (const TDesC& aConfigSection, CUPnPServiceRegisterParamSet& aServiceRegisterParamSet);
+	void TokenizeStringL(const TDesC& aString, RArray<TPtrC>& aList, TChar aSeparator = ',');
+	void StartTimerL(const TDesC& aOperationType);
+	void AppendBundlesL(RPnPParameterBundleBase& aPnPBundle);
+	//void AppendBundlesL(CPnPParameterBundleBase* aPnPBundle);
+	void AppendDeviceLocationL(TDesC8& aDevLocPointer);
+	void AppendDescriptionL(RBuf8& aBaseUri,RBuf8& aDescription);
+	TInt GetPublisherIndex (TInt aObserverIndex);
+	TPublisherControl GetPublisherControl (TInt aObserverIndex);
+	TInt NotifyCount();
+	void SavePreviousLogFileL();
+	const TDesC& ScriptFileName();
+	
+	void GetIconUrlsL (  TInt aBaseDescIdx, CUPnPDevice* aRootDevice );
+	void ResolveIconUrlL ( TInt aBaseDescIdx, const TDesC8& aUrl );
+	
+	// Functions related to Server
+	void  OpenServerL();
+	void  ListenL();
+	void  RecvDataL();
+	void  SendDataL();
+
+	// Functions related to Client
+	void OpenSocketL();
+	void DoConnectL();
+	void SendClientDataL(RSocket& aSocket);
+	void RecvClientDataL(RSocket& aSocket);
+
+	// Print related functions
+	//void PrintDiscoveryResultsL(CUPnPParameterFamily* aParamFamily);
+	void PrintDiscoveryResultsL(RParameterFamily& aParamFamily);
+	void PrintAndValidateResultsL(const TDesC& aOperationType);
+	void SetDiscoveryStatus(TBool aSuccess);
+	TBool IsDiscoverySuccess();
+	// Validation related functions
+	void ValidateDiscoveryResultsL(const TDesC& aOperationType);
+	TPublisherControl PublisherType (TInt aPublisherIndex);
+	
+private:
+	struct TPublisherObserverMap
+		{
+		TInt 				iPublisherIndex;
+		TInt 				iObserverIndex;
+		TPublisherControl	iPublisherControl;
+		};
+
+	struct TServiceUrl
+		{
+		RBuf8 serviceType;
+		RBuf8 scpdUrl;
+		RBuf8 controlUrl;
+		RBuf8 eventSubUrl;
+		};
+
+	struct TDescriptionSuite
+		{
+		//Base Url for which Description is retrieved
+		RBuf8 							iBaseUrl;
+		//Description of the url
+		RBuf8							iDescription;
+		//Retrieved urls from description
+		RArray<TServiceUrl> 			iServiceUrls;
+		};
+	
+	RArray<TPublisherObserverMap>			iPublisherObserverMap;
+	RArray<TDescriptionSuite>				iDescriptionSuiteArray;
+	RStringPool								iStringPool;
+    CStringPoolManager* 					iStringPoolMgr;
+	RPnPServiceDiscovery					iControlPoint;
+	RArray<RPnPServicePublisher>			iPublisherArray;
+	RControlChannel							iControlChannel;
+	RPointerArray<CUPnPObserver>	 		iObserverArray;
+	RArray<RPnPParameterBundleBase>		iResultsArray;
+	CIniData*								iCIniDataHandle;
+	CAction*								iAction;
+	TInt									iNotifyCount;
+	TBool									iDiscoverySuccess;
+public:
+	CActiveScheduler*					iScheduler;
+	TBuf<KMaxBufLength>					iCurrentSection;
+	TBuf<KMaxBufLength> 				iScriptName;
+	TBool								iExpectedData;
+	RArray<TPtrC8>						iDeviceLocationArray;
+	RArray<RBuf8>						iScpdUriArray;
+	RArray<RBuf8>						iControlUriArray;
+	RArray<RBuf8>						iEventUriArray;
+	RArray<RBuf8>						iIconUriArray;
+	TBool								iCancelDiscovery;
+	TInt								iPublishCount;
+	TInt								iDescribeResponseCount;
+	TInt 								iRenewCount;
+	TInt 								iFailedNumUris;
+	
+	RConnection							iConnection;
+	RSocketServ							iSocketServ;
+	};
+
+/*
+CPnPObserver class which is derived from CBase and MPnPObserver to provide the
+following functionalities. It supports the methods capture the results when an
+upnp event is hit after performing any upnp operation.
+*/
+class CUPnPObserver: public CBase, MPnPObserver
+	{
+public:
+	static CUPnPObserver* NewL(CTestUPnPManager* aManager);
+	~CUPnPObserver();
+	void OnPnPEventL (RPnPParameterBundleBase& aServiceEventInfo);
+	void OnPnPError (TInt aError);
+	CTestUPnPManager& Manager();
+	void CopyResultBundlesL(const RPnPParameterBundleBase& aPnpBundle);
+	void SequenceOperationsL();
+	void ExecuteL(const TDesC& aSequence);
+
+private:
+	CUPnPObserver();
+	void ConstructL(CTestUPnPManager* aManager);
+
+private:
+	CTestUPnPManager* 					iManager;
+	TUint								iSequence;
+	TInt 								iResultsCount;
+	RFs 								iFileServ;
+	};
+
+class TestUtils
+	{
+public:
+	void static LoadESockL ( RSocketServ& aSocketServ, RConnection& aConnection );
+	};
+
+/*
+CUPnPTimer class is derived from CActive. It to provides a Timer AO
+*/
+class CUPnPTimer:public CActive
+	{
+public:
+	static CUPnPTimer* NewL (CTestUPnPManager* aManager);
+	~CUPnPTimer();
+	void IssueRequestL(TTimeIntervalMicroSeconds32 anInterval);
+
+	void RunL();
+	void DoCancel();
+
+private:
+	CUPnPTimer(CTestUPnPManager* aManager);
+	void ConstructL();
+
+private:
+	RTimer iTimer;
+	CTestUPnPManager* 	iManager;
+	};
+
+
+
+class CAction : public CActive
+	{
+public:
+	enum TActionState
+		{
+		ESendData,
+		EReceiveData
+		};
+	static CAction* NewL(CTestUPnPManager* aManager);
+	~CAction();
+	void RunL()	;
+	void InitiateActionControlL(TDesC8& aUri,RPnPServiceDiscovery& aControlPoint);
+
+private:
+	CAction(CTestUPnPManager* aManager);
+	void ConstructL();
+	void DoCancel();
+
+private:
+	CTestUPnPManager* 	iManager;
+	RControlChannel 	iControlChannel;
+	TActionState 		iActionState;
+	TControlMessage 	iCtrlMsg;
+	RBuf8 				iIncomingActionBuffer;
+    RBuf8 				iOutgoingActionBuffer;
+    RBuf8 				iCompleteBuffer;
+	RFs 				iFs;
+    RFile				iFile;
+	};
+
+#endif //__TEST_UPNP_MANAGER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/src/testrcontrolchannel.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,645 @@
+// 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:
+// testupnpmanager.cpp
+// Contains implementation of CTestRControlChannel class
+// 
+//
+
+/**
+ @file
+ @internalTechnology
+*/
+
+#include "testrcontrolchannel.h"
+#include "testupnpmanager.h"
+#include <e32base.h>
+
+/*
+  Constructor:
+  @internalTechnology
+  @test
+*/
+CTestRControlChannel::CTestRControlChannel()
+:	CTestStep()
+	{
+	}
+
+/*
+   Initializes all member vaiables.
+   @param		None.
+   @return		None.
+*/
+void CTestRControlChannel::InitializeL()
+	{
+	_LIT(KInfoLogFile, "CTestRControlChannel::InitializeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	iScheduler = new (ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iScheduler);
+	iTimer = NULL;
+	iTimer  = CPeriodic::NewL(CActive::EPriorityStandard);
+	}
+
+/*
+   Destructor
+   @internalTechnology
+   @test
+*/
+CTestRControlChannel::~CTestRControlChannel()
+	{
+	_LIT(KInfoLogFile, "~CTestRControlChannel().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	iPublisher.Close();
+//	CActiveScheduler::Install(NULL); //Testing for ONB hangs
+	delete iScheduler;
+	iScheduler = NULL;
+	_LIT(KInfoLogFile1, "CTestRControlChannel active Scheduler.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	CleanUpObserverArray();
+	if (iTimer != NULL)
+		{
+		delete iTimer;
+		iTimer = NULL;
+		}
+	_LIT(KInfoLogFile2, "~CTestRControlChannel() End.... \n");
+	INFO_PRINTF1(KInfoLogFile2);
+	
+	iConnection.Close ();
+	iSocketServ.Close ();
+	}
+
+void CTestRControlChannel::SavePreviousLogFileL()
+	{
+	_LIT(KInfoLogFile, "Saving Previous logs If any.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RFs fileserv;
+	TInt error = fileserv.Connect();
+	if(!error)
+		{
+		_LIT(KlogFile, "C:\\logs\\log.txt");
+		_LIT(KPrefixLog, "C:\\logs\\");
+		_LIT(KSuffix, "_UDEB");
+		_LIT(KExtn, ".txt");
+		
+		CFileMan* fMan = NULL;
+		TRAP_IGNORE(fMan = CFileMan::NewL(fileserv));
+		if(fMan != NULL)
+			{
+			CleanupStack::PushL(fMan);
+			RBuf newFileName;
+			const TInt KTwenty = 20;
+			newFileName.Create(ConfigSection().Length() + KTwenty );
+			newFileName.Copy(KPrefixLog);
+			//Script file name
+			iScriptName.Copy(ConfigSection());
+			newFileName.Append(iScriptName);
+			newFileName.Append(KSuffix);
+			newFileName.Append(KExtn);
+			
+			TInt error = fMan->Rename(KlogFile, newFileName);
+			if (error != KErrNone)
+				{
+				_LIT(KErrInfo, "Unable to Save Previous logs...May be NO Previous logs exist \n");
+				ERR_PRINTF1(KErrInfo);
+				}
+			else
+				{
+				_LIT(KSavingInfo, "Saved Previous logs with File Name: %S \n");
+				INFO_PRINTF2(KSavingInfo, &newFileName);
+				}
+			CleanupStack::PopAndDestroy(fMan);
+			newFileName.Close();
+			}
+		}
+	fileserv.Close();
+	_LIT(KInfoLogFile1, "Saving Previous logs End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestRControlChannel::CleanUpObserverArray()
+	{
+	_LIT(KInfoLogFile, "CleanUpObserverArray....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	if (iObserverArray.Count() > 0 )
+		{
+		iObserverArray.ResetAndDestroy();
+		}
+	else
+		{
+		iObserverArray.Close();
+		}
+	_LIT(KInfoLogFile1, "CleanUpObserverArray End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+   Implementation of CTestStep base class virtual and this is used for doing all
+   initialisation common
+    to derived classes here.
+   @param  None
+   @return TVerdict
+ */
+TVerdict CTestRControlChannel::doTestStepPreambleL()
+	{
+	InitializeL();
+	SavePreviousLogFileL();
+	return CTestStep::doTestStepPreambleL();
+	}
+
+/*
+   Implementation of CTestStep base class virtual and it is used for doing all
+   after test treatment common to derived classes in here.
+   @return TVerdict
+ */
+TVerdict CTestRControlChannel::doTestStepPostambleL()
+	{
+	return CTestStep::doTestStepPostambleL();
+	}
+
+
+/*
+	Opens a handle to a RPnPServicePublisher object and append the same to Publisher array
+	@param			None.
+	@return			None.
+ */
+TVerdict CTestRControlChannel::doTestStepL()
+	{
+	SequenceOperationsL();
+	return TestStepResult();
+	}
+	
+void CTestRControlChannel::InitiateControlL()
+	{
+	RControlChannel controlChannel;
+	TInt err =-1;
+	err = iPublisher.InitiateControl(controlChannel);
+	_LIT(KInfoLogFile, "Initiating Publisher control returned value %d .... \n");
+	INFO_PRINTF2(KInfoLogFile,err);
+	CUPnPRControlChannelAO *rControlAO;
+    rControlAO = new(ELeave) CUPnPRControlChannelAO(controlChannel,this);
+	rControlAO->RecvdataL();
+   	CActiveScheduler::Start();
+	_LIT(KInfoLogFile1, "CTestRControlChannel::doTestStepL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	controlChannel.Close();
+//	delete rControlAO;
+
+	}
+/*
+   This function performs operations based on sequence specified in the ini file
+   @param  None
+   @return None
+*/
+void CTestRControlChannel::SequenceOperationsL()
+	{
+	_LIT(KInfoLogFile, "CTestRControlChannel::SequenceOperationsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RArray<TPtrC> sequenceList;
+	CleanupClosePushL(sequenceList);
+	TPtrC listOfSequences;
+	_LIT(KListOfSequences, "listofsequences");
+	GetStringFromConfig(ConfigSection(), KListOfSequences, listOfSequences);
+
+	TokenizeStringL(listOfSequences, sequenceList);
+	TInt numOperations = sequenceList.Count();
+
+	for(TInt i(0); i < numOperations; i++)
+		{
+//		SetCurrentSection(sequenceList[i]);
+		PerformDesiredOperationsL(sequenceList[i]);
+		}
+	CleanupStack::PopAndDestroy(); 
+	_LIT(KInfoLogFile1, "CTestRControlChannel::SequenceOperationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+	
+	
+/*
+   Parses a comma separated string and constructs a list out of the values
+   @param	aString a reference to a string to be tokenized
+   @param	aList is an out parameter to store a list of tokens in an arry
+   @param	aSeparator is a character used to delimit the tokens
+  */
+void CTestRControlChannel::TokenizeStringL(const TDesC& aString, RArray<TPtrC>& aList, TChar aSeparator)
+	{
+	TLex lexer(aString);
+
+	while(!lexer.Eos())
+		{
+		lexer.SkipSpaceAndMark();
+
+		while(!lexer.Eos() && lexer.Get() != aSeparator)
+			{
+			}
+
+		if(!lexer.Eos())
+			{
+			lexer.UnGet();
+			}
+		aList.AppendL(lexer.MarkedToken());
+		lexer.Inc();
+		}
+	}
+	
+/*
+   This function performs desired operations specified as a parameter
+   @param  aOperation string representing operation to be performed
+   @return None
+*/
+void CTestRControlChannel::PerformDesiredOperationsL(const TDesC& aOperation)
+	{
+	const TInt KMatch = 0;
+	TPtrC operationType;
+	_LIT(KOperationType, "operationtype");
+	GetStringFromConfig(aOperation, KOperationType, operationType);
+
+	if ( iConnection.SubSessionHandle () == 0 )
+		{
+		TestUtils::LoadESockL ( iSocketServ, iConnection );
+		}
+		
+	if(operationType.Compare(KPublishService) == KMatch)
+		{
+		PublishServiceL(aOperation);
+		}
+	}
+
+
+void CTestRControlChannel::OpenPublisherL()
+	{
+	_LIT(KInfoLogFile, "CTestRControlChannel::OpenPublisherL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+ 	
+	TInt openStatus = 0;
+	for(TInt i=0;i<3;i++)	
+		{
+		openStatus = iPublisher.Open(KTierId);
+		if(openStatus == KErrNone)
+			{
+			break;
+			}
+		}
+	if( openStatus != KErrNone ) 
+		{
+		_LIT(KOpenDiscovererFailed, "Publisher open failed with error %d :");
+		ERR_PRINTF2(KOpenDiscovererFailed, openStatus);
+		}
+	else
+		{
+		_LIT(KOpenPublisherSuccess, "Service publisher was successfully started with return value %d :");
+		INFO_PRINTF2(KOpenPublisherSuccess, openStatus);
+		}
+	}
+
+/*
+	Tests whether Publishing a Service/Device is performing as specified in UPnP specifications.
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void CTestRControlChannel::PublishServiceL (const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "CTestRControlChannel::PublishServiceL ().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CRControlChannelObserver* upnpObserver = CRControlChannelObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	iObserverArray.Append(upnpObserver);
+
+	RPnPParameterBundle pnpBundle ;
+	pnpBundle.Open();
+    CleanupClosePushL( pnpBundle );
+    pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+    RParameterFamily family = pnpBundle.CreateFamilyL(EUPnPServiceRegisterParamSet);
+   	CUPnPServiceRegisterParamSet* registerServiceParamSet = CUPnPServiceRegisterParamSet::NewL(family );
+
+   	_LIT(KParentDeviceUid, "ParentDeviceUid");
+   	TPtrC parentDeviceUid;
+	GetStringFromConfig(aOperationType, KParentDeviceUid, parentDeviceUid);
+
+	RBuf8 parentDeviceUidBuf;
+	parentDeviceUidBuf.Create(parentDeviceUid.Length());
+	parentDeviceUidBuf.Copy(parentDeviceUid);
+	registerServiceParamSet->SetDeviceUidL (parentDeviceUidBuf);
+
+
+	TPtrC serviceType;
+	GetStringFromConfig(aOperationType, KServiceType, serviceType);
+	RBuf8 serviceTypeBuf;
+	serviceTypeBuf.Create(serviceType.Length());
+	serviceTypeBuf.Copy(serviceType);
+	registerServiceParamSet->SetUriL ( serviceTypeBuf );
+
+
+	TInt duration;
+	GetIntFromConfig(aOperationType, KCacheControl, duration);
+	registerServiceParamSet->SetCacheControlData (duration);
+
+	ExtractServiceDescriptionL (aOperationType, *registerServiceParamSet);
+
+	_LIT8(KInitialMessage, "Initial notification message");
+	registerServiceParamSet->SetInitialMessageL(KInitialMessage);
+	
+	OpenPublisherL();
+
+	iPublisher.Publish( pnpBundle );
+	CActiveScheduler::Start();
+
+	serviceTypeBuf.Close();
+	parentDeviceUidBuf.Close();
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CleanupStack::Pop( upnpObserver );
+	
+	InitiateControlL();
+	_LIT(KInfoLogFile1, "CTestRControlChannel::PublishServiceL () Stop.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	}
+
+
+/*
+	Extract service description available in a file, copy it to the buffer and append the same to service register paramset.
+	@param			aConfigSection - reference to a section name in ini file where required parameters that needs to be referred for this operation.
+					aServiceRegisterParamSet - Storage for the description buffer
+	@return			None.
+ */
+
+void CTestRControlChannel::ExtractServiceDescriptionL (const TDesC& aConfigSection, CUPnPServiceRegisterParamSet& aServiceRegisterParamSet)
+	{
+	RFs fs;
+	RFile file;
+	RBuf8 buf;
+
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+
+	TPtrC descriptionPath;
+	_LIT(KDescriptionPath, "Description_Path");
+	GetStringFromConfig(aConfigSection, KDescriptionPath, descriptionPath);
+
+	TInt err = file.Open(fs, descriptionPath, EFileShareReadersOnly);
+	
+	// For Hardware system path is c:, so descriptionPath value present in '.ini' is referring 'c:'
+	if ( err == KErrPathNotFound )
+		{				
+		RBuf fileName;
+		TDriveName aSystemDrive;
+		TDriveUnit driveunit(RFs::GetSystemDrive());
+		aSystemDrive.Zero();
+		aSystemDrive=driveunit.Name();				
+		fileName.CreateL ( descriptionPath.Length () );
+		fileName.Zero();
+		fileName.Append(aSystemDrive);
+		fileName.Append ( descriptionPath.Mid ( aSystemDrive.Length () ) );				
+		
+		err = file.Open(fs, fileName, EFileShareReadersOnly);
+		}
+	if (err != KErrNone)
+		{
+		User::LeaveIfError(err);
+		}
+
+	CleanupClosePushL(file);
+	TInt fileSize = 0;
+	file.Size(fileSize);
+
+	buf.Create(fileSize);
+
+	err = file.Read(buf, fileSize);
+	aServiceRegisterParamSet.SetServiceDescriptionL ( buf );
+
+	CleanupStack::PopAndDestroy(2 );
+	buf.Close();
+	_LIT(KInfoLogFile, "CRControlChannelObserver::ExtractServiceDescriptionL End.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	}
+
+
+CUPnPRControlChannelAO::CUPnPRControlChannelAO(RControlChannel& aControlChannel,CTestRControlChannel* aManager)
+	:CActive(EPriorityStandard),iControlChannel(aControlChannel),iManager(aManager)
+    {
+	CActiveScheduler::Add(this);
+    }    
+
+void CUPnPRControlChannelAO::RecvdataL()
+    {
+    // create the timer object
+	iTimer = CPeriodic::NewL ( CActive::EPriorityLow );
+	
+	_LIT(KInfoLogFile, "CUPnPRControlChannelAO::RecvdataL().... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile);
+    iIncomingActionBuffer.CreateMaxL( 1024 );
+   	iInComingAction.SetMessageDes (iIncomingActionBuffer);
+	iControlChannel.Recv(iInComingAction, iStatus);
+	iState = ERecv;
+	SetActive();
+	
+	TCallBack callback ( &CUPnPRControlChannelAO::TimerCallbackL, this );
+	const TInt timeout = 60436607; // rounded-conversion of 600seconds to clockticks
+	iTimer->Start( TTimeIntervalMicroSeconds32 ( timeout ), TTimeIntervalMicroSeconds32 ( timeout ), callback );
+	
+	_LIT(KInfoLogFile1, "CUPnPRControlChannelAO::RecvdataL() End.... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile1);
+    }
+
+TInt CUPnPRControlChannelAO::TimerCallbackL ( TAny* aPtr )
+	{
+	CUPnPRControlChannelAO* self = static_cast<CUPnPRControlChannelAO*> ( aPtr );
+	if ( self->iState == ERecv )
+		{
+		CActiveScheduler::Stop ();
+		_LIT ( KInfoLogFile1, "CUPnPRControlChannelAO::RunL() Stop.... \n" );
+		self->iManager->INFO_PRINTF1 ( KInfoLogFile1 );
+		self->iTimer->Cancel ();
+		}
+		
+	return KErrNone;
+	}
+	
+
+void CUPnPRControlChannelAO::SenddataL()
+    {
+	_LIT(KInfoLogFile, "CUPnPRControlChannelAO::SenddataL().... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile);
+    ExtractSoapResponse(iOutgoingActionBuffer);
+    iInComingAction.SetMessageDes (iOutgoingActionBuffer);
+    iInComingAction.SetLast();
+    TInt newLen = iOutgoingActionBuffer.Length( );
+    iInComingAction.SetMaxLength(newLen);
+    iControlChannel.Send(iInComingAction, iStatus);
+	SetActive();
+	_LIT(KInfoLogFile1, "CUPnPRControlChannelAO::SenddataL() End.... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile1);
+    }
+
+CUPnPRControlChannelAO::~CUPnPRControlChannelAO()
+    {
+    iTimer->Cancel ();
+	delete iTimer;	
+    }
+
+void CUPnPRControlChannelAO::RunL()
+    {
+     switch ( iState )
+    	 {
+	     case ERecv:
+	    	 {
+	    	 iTimer->Cancel ();
+	    	 if( iInComingAction.MaxLength() != KErrUnknown )
+	             {
+	             if ( iCompleteBuffer.Length() == 0 )
+		       		{
+		    		iCompleteBuffer.CreateL(iInComingAction.MessageDes().Length());
+		   	       	}
+		   	     else
+		   	     	{
+		   	     	TInt oldLen = iCompleteBuffer.Length();
+		   	     	iCompleteBuffer.ReAlloc ( oldLen + iInComingAction.MessageDes().Length() );
+		   	     	}
+	    	     iCompleteBuffer.Append(iInComingAction.MessageDes());
+	
+	    	     if( iCompleteBuffer.Length() == iInComingAction.MaxLength() )
+	    	       	{
+					iInComingAction.ClearFlags();
+	    	       	SenddataL();
+	    	       	iState = EStop;
+	    	       	}
+	    	     else
+	    	       	{
+	    	       	iControlChannel.Recv(iInComingAction, iStatus);
+	    	       	iState = ERecv;
+	    	       	SetActive();
+	    	       	}
+	             }
+	          else
+	    	     {
+	    	     iExepecteBufLen = iInComingAction.MaxLength();
+	    	     RBuf8 completeData;
+	    	     completeData.CreateL( iExepecteBufLen );
+	    	     completeData.Append(iInComingAction.MessageDes());
+	    	     iControlChannel.Recv(iInComingAction, iStatus);
+	    	     SenddataL();
+	    	     iState = EStop;
+	    	     }
+			_LIT(KInfoLogFile, "CUPnPRControlChannelAO::RunL().... \n");
+			iManager->INFO_PRINTF1(KInfoLogFile);
+	    	 }
+	    break;
+
+       case EStop:
+    	   {
+			CActiveScheduler::Stop();
+			_LIT(KInfoLogFile1, "CUPnPRControlChannelAO::RunL() Stop.... \n");
+			iManager->INFO_PRINTF1(KInfoLogFile1);    	   
+    	   }
+        break;
+        }
+    }
+
+
+void CUPnPRControlChannelAO::DoCancel()
+	{
+	//Nothing
+	}
+
+void CUPnPRControlChannelAO::ExtractSoapResponse(RBuf8& aSoapResponse)
+	{
+	aSoapResponse.Create(iCompleteBuffer);
+	}
+
+
+/*
+  Constructor:
+  @internalTechnology
+  @test
+*/
+CRControlChannelObserver::CRControlChannelObserver()
+	{
+	}
+
+/*
+  Destructor
+  @internalTechnology
+  @test
+*/
+CRControlChannelObserver::~CRControlChannelObserver()
+	{
+	}
+
+
+/*
+	Static factory constructor. Uses two phase construction and leaves nothing on the
+	CleanupStack. Creates a CTestControlPointService object.
+	@param			aManager	A pointer to a CTestRControlChannel object.
+	@return			A pointer to the newly created CPnPObserver object.
+	@post			A fully constructed and initialized CPnPObserver object.
+ */
+
+CRControlChannelObserver* CRControlChannelObserver::NewL(CTestRControlChannel* aManager)
+	{
+	CRControlChannelObserver* self = new(ELeave) CRControlChannelObserver;
+	CleanupStack::PushL(self);
+	self->ConstructL(aManager);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+/*
+	Second phase of two-phase construction method. Does any allocations required to fully construct
+	the object.
+	@pre 		First phase of construction is complete.
+	@param		aManager	A pointer to a CTestRControlChannel object.
+	@post		The object is fully constructed and initialized.
+ */
+void CRControlChannelObserver::ConstructL(CTestRControlChannel* aManager)
+	{
+	iManager = aManager;
+	}
+
+
+
+/*
+   This method returns a reference to the CTestRControlChannel object.
+   @param None
+   return a reference to the CTestRControlChannel object
+ */
+CTestRControlChannel& CRControlChannelObserver::Manager()
+	{
+	return *iManager;
+	}
+
+/*
+   This is called when callback hits. And this method stores the bundle results
+   and meta information related to that results into results array
+   @param  aParameterBundle a reference to CPnPParameterBundleBase
+   @return None
+ */
+void CRControlChannelObserver::OnPnPEventL ( RPnPParameterBundleBase& aParameterBundle)
+	{
+	RParameterFamily family = aParameterBundle.GetFamilyAtIndex(0);	
+	_LIT(KInfoLogFile, "Service Published successfully...\n");
+	Manager().INFO_PRINTF1(KInfoLogFile);
+
+	CActiveScheduler::Stop();
+	_LIT(KInfoLogFile1, "CRControlChannelObserver::OnPnPEventL.... \n");
+	Manager().INFO_PRINTF1(KInfoLogFile1);
+	}
+
+
+void CRControlChannelObserver::OnPnPError(TInt aError)
+	{
+	TInt error = aError;
+	_LIT(KErrorMessage, "Error occurred in the UPnP Observer : %d \n");
+	Manager().INFO_PRINTF2(KErrorMessage, error);
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/src/testupnp.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,124 @@
+// 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:
+// Contains implementation of CTestUPnPManager class
+// 
+//
+
+#include "testupnp.h"
+#include "testupnpmanager.h"
+#include "testrcontrolchannel.h"
+
+/*
+	Static factory constructor. Uses two phase construction and leaves nothing on the 
+	CleanupStack. Creates a CTestUPnP object.
+	@param  None
+	@return Instance of the test server
+ */
+CTestUPnP* CTestUPnP::NewL()
+	{
+	CTestUPnP *	server = new (ELeave) CTestUPnP();
+	CleanupStack::PushL(server);
+	// CServer base class call
+	RProcess	handle = RProcess();
+	TParsePtrC	serverName(handle.FileName());
+	server->ConstructL(serverName.Name());
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+/*
+   Function to create and start the CTestServer derived server.
+   Secure variant.Much simpler, uses the new Rendezvous() call to sync with the client
+   @param  None
+   @return None
+*/
+LOCAL_C void MainL()
+	{
+	// Leave the hooks in for platform security
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().DataCaging(RProcess::ESecureApiOn);
+	CActiveScheduler* sched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CTestUPnP*	server = NULL;
+	// Create the CTestServer derived server
+	TRAPD(err,server = CTestUPnP::NewL());
+	if(err == KErrNone)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+/**
+   Secure variant only
+   Process entry point. Called by client using RProcess API.	
+   @param  None
+   @return Standard Epoc error code on process exit
+ */
+GLDEF_C TInt E32Main()
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD( error, MainL() );
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return error;
+    }
+
+
+CTestStep* CTestUPnP::CreateTestStep(const TDesC& aStepName)
+	{
+	CTestStep* testStep = NULL;
+	TRAPD(err,testStep=CreateTestStepL(aStepName));
+	if(err == KErrNone)
+		{
+		return testStep;
+		}
+	else
+		{
+		return NULL;
+		}
+	}
+
+/**
+   Secure and non-secure variants
+   Implementation of CTestServer pure virtual
+   @param  aStepName a reference to string
+   @return A CTestStep derived instance
+ */
+CTestStep* CTestUPnP::CreateTestStepL(const TDesC& aStepName)
+	{
+	CTestStep* testStep = NULL;
+	// They are created "just in time" when the worker thread is created
+	// More test steps can be added below
+	if(aStepName == KTestUPnPManager)
+		{
+		testStep = new CTestUPnPManager();
+        }
+    if(aStepName == KTestRControlChannel)
+		{
+		testStep = new CTestRControlChannel();
+        }
+	return testStep;
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/src/testupnpmanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,3558 @@
+// 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:
+// Contains implementation of CTestUPnPManager class
+// Contains implemenatation of CTestUPnPManager, CUPnPObserver, CUPnPTimer, 
+// and CAction classes
+// 
+//
+
+#include "testupnpmanager.h"
+
+
+/*
+  Constructor:
+  @internalTechnology
+  @test
+*/
+CTestUPnPManager::CTestUPnPManager()
+:	CTestStep()
+	{
+	iCancelDiscovery = EFalse;
+	iExpectedData = EFalse;
+	iDiscoverySuccess = EFalse;
+	iNotifyCount = 0;
+	iPublishCount = 0;
+	iDescribeResponseCount = 0;
+	iRenewCount = 0;
+	iFailedNumUris = 0;
+	}
+
+/*
+   Initializes all member vaiables.
+   @param		None.
+   @return		None.
+*/
+void CTestUPnPManager::InitializeL()
+	{
+	iScheduler = new (ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iScheduler);
+	}
+
+/*
+   Destructor
+   @internalTechnology
+   @test
+*/
+CTestUPnPManager::~CTestUPnPManager()
+	{
+	_LIT(KInfoDesctructorBegin, "Begin: In Destructor CTestUpnPanager....\n");
+	INFO_PRINTF1(KInfoDesctructorBegin);
+	if(iStringPoolMgr)
+		{
+		iStringPoolMgr->Release();
+		//this will tkae care of clean up of iStringPool
+		}
+	_LIT(KInfoDesctructorBegin2, "Releasing String Pool Manager....\n");
+	INFO_PRINTF1(KInfoDesctructorBegin2);
+		
+	CleanUpObserverArray();
+	iDeviceLocationArray.Close();
+	CleanUpResultsArray();
+	DescriptionSuiteCleanUp();
+	ScpdUriArrayCleanUp();
+	ControlUriArrayCleanUp();
+	EventUriArrayCleanUp();
+	CloseDiscoverer();
+	//#ifdef _DEBUG
+		ClosePublisher();
+		CActiveScheduler::Install(NULL); //Testing for ONB hangs
+		_LIT(KInfoDesctructorBegin1, "Deleting the Active Schedulers....\n");
+		INFO_PRINTF1(KInfoDesctructorBegin1);
+		delete iScheduler;
+		iScheduler = NULL;	
+	//#endif //_Debug
+
+	iPublisherObserverMap.Close();	
+	_LIT(KInfoDesctructorEnd, "End: ....In Destructor CTestUpnPanager\n");
+	INFO_PRINTF1(KInfoDesctructorEnd);
+	
+	//iConnection.Close ();
+	//iSocketServ.Close ();
+	}
+
+void CTestUPnPManager::ClosePublisher()
+	{
+	_LIT(KInfoLogFile, "ClosePublisher....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	CancelPublish();
+	}
+
+void CTestUPnPManager::CloseDiscoverer()
+	{
+	iControlPoint.Close();
+	}
+
+void CTestUPnPManager::CleanUpObserverArray()
+	{
+	_LIT(KInfoLogFile, "CleanUpObserverArray....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	if (iObserverArray.Count() > 0 )
+		{
+		iObserverArray.ResetAndDestroy();
+		}
+	else
+		{
+		iObserverArray.Close();
+		}
+	_LIT(KInfoLogFile1, "CleanUpObserverArray End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::CleanUpResultsArray()
+	{
+	_LIT(KInfoLogFile, "CleanUpResultsArray....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iResultsArray.Count();
+		for (TInt index(0); index < count ; index++ )
+			{
+			iResultsArray[index].Close();
+			}
+	iResultsArray.Close();
+	_LIT(KInfoLogFile1, "CleanUpResultsArray End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::DescriptionSuiteCleanUp()
+	{
+	_LIT(KInfoLogFile, "DescriptionSuiteCleanUp....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iDescriptionSuiteArray.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iDescriptionSuiteArray[index].iBaseUrl.Close();
+		iDescriptionSuiteArray[index].iDescription.Close();
+		DeleteSeriveUrlsList(index);
+		}
+	iDescriptionSuiteArray.Close();
+	_LIT(KInfoLogFile1, "DescriptionSuiteCleanUp End...\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ScpdUriArrayCleanUp()
+	{
+	_LIT(KInfoLogFile, "ScpdUriArrayCleanUp....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iScpdUriArray.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iScpdUriArray[index].Close();
+		}
+	iScpdUriArray.Close();
+	
+	count = iIconUriArray.Count ();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iIconUriArray[index].Close();
+		}
+	iIconUriArray.Close();	
+	
+	_LIT(KInfoLogFile1, "ScpdUriArrayCleanUp End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::EventUriArrayCleanUp()
+	{
+	_LIT(KInfoLogFile, "EventUriArrayCleanUp....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iEventUriArray.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iEventUriArray[index].Close();
+		}
+	iEventUriArray.Close();
+	_LIT(KInfoLogFile1, "EventUriArrayCleanUp End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ControlUriArrayCleanUp()
+	{
+	_LIT(KInfoLogFile, "ControlUriArrayCleanUp....\n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iControlUriArray.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		iControlUriArray[index].Close();
+		}
+	iControlUriArray.Close();
+	_LIT(KInfoLogFile1, "ControlUriArrayCleanUp End....\n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+   Implementation of CTestStep base class virtual and this is used for doing all
+   initialisation common
+    to derived classes here.
+   @param  None
+   @return TVerdict
+ */
+TVerdict CTestUPnPManager::doTestStepPreambleL()
+	{
+	InitializeL();
+	SavePreviousLogFileL();
+	return CTestStep::doTestStepPreambleL();
+	}
+
+/*
+ Save the previous log file...if any
+*/
+void CTestUPnPManager::SavePreviousLogFileL()
+	{
+	_LIT(KInfoLogFile, "Saving Previous logs If any.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RFs fileserv;
+	TInt error = fileserv.Connect();
+	if(!error)
+		{
+		_LIT(KlogFile, "C:\\logs\\log.txt");
+		_LIT(KPrefixLog, "C:\\upnplogs\\");
+		_LIT(KSuffix, "_UDEB");
+		_LIT(KExtn, ".txt");
+		
+		CFileMan* fMan = NULL;
+		TRAP_IGNORE(fMan = CFileMan::NewL(fileserv));
+		if(fMan != NULL)
+			{
+			CleanupStack::PushL(fMan);
+			RBuf newFileName, traceFileName ;
+			const TInt KTwentyFour = 24;
+			newFileName.Create(ConfigSection().Length() + KTwentyFour );
+			newFileName.Copy(KPrefixLog);
+			//Script file name
+			iScriptName.Copy(ConfigSection());
+			newFileName.Append(iScriptName);
+			newFileName.Append(KSuffix);
+			newFileName.Append(KExtn);
+			TInt error = fMan->Rename(KlogFile, newFileName);			
+						
+			if (error != KErrNone)
+				{
+				_LIT(KErrInfo, "Unable to Save Previous logs...May be NO Previous logs exist \n");
+				ERR_PRINTF1(KErrInfo);
+				}
+			else
+				{
+				_LIT(KSavingInfo, "<font color=0000ff><b>Saved Previous logs with File Name: <u>%S</u> </b></font> \n");
+				INFO_PRINTF2(KSavingInfo, &newFileName);
+				
+				//btracelog
+				_LIT(KBtracelogFile, "C:\\logs\\btrace.log");
+				_LIT(KBTrace, "btrace.log");				
+				traceFileName.Create(KPrefixLog().Length() + iScriptName.Length() + KBTrace().Length() );
+	  			traceFileName.Copy(KPrefixLog);
+	  			traceFileName.Append(iScriptName);
+	  			traceFileName.Append(KBTrace);	  			
+	  			error = fMan->Rename(KBtracelogFile, traceFileName);				
+	  			if ( error == KErrNone )
+		  			{
+		  			_LIT(KBtraceInfo, "<font color=0000ff><b>Saved Previous btrace logs with File Name: <u>%S</u> </b></font> \n");		  			
+					INFO_PRINTF2(KBtraceInfo, &traceFileName);
+		  			}				
+				}
+			CleanupStack::PopAndDestroy(fMan);
+			newFileName.Close();
+			traceFileName.Close ();
+			}
+		}
+	fileserv.Close();
+	_LIT(KInfoLogFile1, "Saving Previous logs End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+ return Script File name..if any
+*/
+const TDesC& CTestUPnPManager::ScriptFileName()
+	{
+	return iScriptName;
+	}
+
+/*
+   Implementation of CTestStep base class virtual and it is used for doing all
+   after test treatment common to derived classes in here.
+   @return TVerdict
+ */
+TVerdict CTestUPnPManager::doTestStepPostambleL()
+	{
+	return CTestStep::doTestStepPostambleL();
+	}
+
+
+TVerdict CTestUPnPManager::doTestStepL()
+	{
+	SequenceOperationsL();
+	return TestStepResult();
+	}
+
+/*
+   This function performs operations based on sequence specified in the ini file
+   @param  None
+   @return None
+*/
+void CTestUPnPManager::SequenceOperationsL()
+	{
+	_LIT(KInfoLogFile, "SequenceOperationsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RArray<TPtrC> sequenceList;
+	CleanupClosePushL(sequenceList);
+	TPtrC listOfSequences;
+	_LIT(KListOfSequences, "listofsequences");
+	GetStringFromConfig(ConfigSection(), KListOfSequences, listOfSequences);
+
+	TokenizeStringL(listOfSequences, sequenceList);
+	TInt numOperations = sequenceList.Count();
+
+	for(TInt i(0); i < numOperations; i++)
+		{
+		SetCurrentSection(sequenceList[i]);
+		PerformDesiredOperationsL(sequenceList[i]);
+		}
+	CleanupStack::PopAndDestroy(); 
+	_LIT(KInfoLogFile1, "SequenceOperationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void TestUtils::LoadESockL ( RSocketServ& aSocketServ, RConnection& aConnection )
+	{
+	User::LeaveIfError ( aSocketServ.Connect () );
+	User::LeaveIfError ( aConnection.Open ( aSocketServ ) );
+	TRequestStatus status;
+	aConnection.Start ( status );
+	User::WaitForRequest ( status );
+	User::LeaveIfError ( status.Int () );
+	aConnection.CancelAllInterfaceNotification ();
+	aConnection.CancelProgressNotification ();
+	aConnection.CancelServiceChangeNotification ();
+	aConnection.CancelAllSubConnectionNotification ();
+	}
+
+/*
+   This function performs desired operations specified as a parameter
+   @param  aOperation string representing operation to be performed
+   @return None
+*/
+void CTestUPnPManager::PerformDesiredOperationsL(const TDesC& aOperation)
+	{
+	const TInt KMatch = 0;
+	TPtrC operationType;
+	_LIT(KOperationType, "operationtype");
+	GetStringFromConfig(aOperation, KOperationType, operationType);
+	
+	/*if ( iConnection.SubSessionHandle () == 0 )
+		{
+		TestUtils::LoadESockL ( iSocketServ, iConnection );
+		}*/
+
+	if(operationType.Compare(KOpenDiscoverer) == KMatch)
+		{
+		OpenDiscovererL();
+		}
+	else if(operationType.Compare(KOpenPublisher) == KMatch)
+		{
+		OpenMultiplePublisherL();
+		}
+	else if(operationType.Compare(KDiscovery) == KMatch)
+		{
+		DiscoverL(aOperation);
+		}
+	else if(operationType.Compare(KCancelDiscover) == KMatch)
+		{
+		CancelDiscoverL(aOperation);
+		}
+	else if(operationType.Compare(KCancelDescribe) == KMatch)
+		{
+		CancelDescribeL(aOperation);
+		}
+	else if(operationType.Compare(KPublishService) == KMatch)
+		{
+		PublishServiceL(aOperation);
+		}
+	else if(operationType.Compare(KPublishDevice) == KMatch)
+		{
+		PublishDeviceL(aOperation);
+		}
+	else if(operationType.Compare(KDescribe) == 0)
+		{
+		DescribeL();
+		}
+	else if(operationType.Compare(KDescribeService) == 0)
+		{
+		DescribeServiceL();
+		}
+	else if(operationType.Compare(KSubscribe) == 0)
+		{
+		SubscribeForStateChangeNotificationsL();
+		}
+	else if(operationType.Compare(KUnsubscribe) == 0)
+		{
+		UnsubscribeForStateChangeNotificationsL(aOperation);
+		}
+	else if(operationType.Compare(KRegisterAnnouncement) == KMatch)
+		{
+		RegisterForAnnouncementsL(aOperation);
+		}
+	else if(operationType.Compare(KCancelNotify) == KMatch)
+		{
+		CancelNotifyAnnouncementL(aOperation);
+		}
+	else if(operationType.Compare(KInitiateControl) == KMatch)
+		{
+		InitiateActionL(aOperation);
+		}
+	else if ( operationType.Compare(KDescribeIcon) == KMatch)
+		{
+		DescribeIconL();
+		}
+	else if(operationType.Compare(KStartScheduler) == KMatch)
+		{
+		CActiveScheduler::Start();
+		}
+	else if(operationType.Compare(KStopScheduler) == KMatch)
+		{
+		CActiveScheduler::Stop();
+		}
+	else if(operationType.Compare(KStartTimer) == KMatch)
+		{
+		StartTimerL(aOperation);
+		}
+	else if(operationType.Compare(KPrintResults) == 0)
+		{
+		PrintAndValidateResultsL(aOperation);
+		}
+	}
+
+/*
+   Parses a comma separated string and constructs a list out of the values
+   @param	aString a reference to a string to be tokenized
+   @param	aList is an out parameter to store a list of tokens in an arry
+   @param	aSeparator is a character used to delimit the tokens
+  */
+void CTestUPnPManager::TokenizeStringL(const TDesC& aString, RArray<TPtrC>& aList, TChar aSeparator)
+	{
+	TLex lexer(aString);
+
+	while(!lexer.Eos())
+		{
+		lexer.SkipSpaceAndMark();
+
+		while(!lexer.Eos() && lexer.Get() != aSeparator)
+			{
+			}
+
+		if(!lexer.Eos())
+			{
+			lexer.UnGet();
+			}
+		aList.AppendL(lexer.MarkedToken());
+		lexer.Inc();
+		}
+	}
+
+/*
+   Starts a timer for a wait time and triggers CallBack function as timer expires.
+   @param	None
+   @return	None
+ */
+void CTestUPnPManager::StartTimerL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "StartTimerL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	_LIT(KWaitTime,"waittime");
+	TInt waitTime = 0;
+	GetIntFromConfig(aOperationType, KWaitTime, waitTime);
+//	TTimeIntervalMicroSeconds32 interval(waitTime);
+	CUPnPTimer* timer = CUPnPTimer::NewL(this);
+	CleanupStack::PushL(timer);
+	timer->IssueRequestL(waitTime);
+	CActiveScheduler::Start();
+	CleanupStack::PopAndDestroy(timer);
+	_LIT(KInfoLogFile1, "StartTimerL End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+   Sets the current config section.
+   @param	aCurrentSection - a reference string that represent current config section
+   @return	None
+ */
+void CTestUPnPManager::SetCurrentSection(const TDesC& aCurrentSection)
+	{
+	iCurrentSection = aCurrentSection;
+	}
+
+/*
+   Retrieve the current config section.
+   @param
+   @return	Reference to current config section
+ */
+TDesC& CTestUPnPManager::GetCurrentSection()
+	{
+	return	iCurrentSection;
+	}
+
+/*
+	Tests whether discovering services/devices is performing as specified in UPnP specifications.
+	@param		aOperationType is reference to a section name in ini file where required parameters
+				needs to be referred for this operation.
+	@return		None.
+ */
+void CTestUPnPManager::DiscoverL(const TDesC& aOperationType)
+	{
+	RArray<TPtrC> serviceTypeList;
+	RArray<TPtrC> mxTimeList;
+	TPtrC listOfServiceTypes;
+	TPtrC listOfMxTimes;
+	_LIT(KListOfServiceTypes, "listofservicetypes");
+	_LIT(KListOfMxTimes, "listofmxtimes");
+	_LIT(KInfoLogFile, "DiscoverL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.Open ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPDiscoverRequestParamSet);
+	if(!GetStringFromConfig(GetCurrentSection(), KListOfServiceTypes, listOfServiceTypes)
+			|| !GetStringFromConfig(GetCurrentSection(), KListOfMxTimes, listOfMxTimes))
+		{
+		_LIT(KErrInfo, "Problem in reading values from ini. \n Expected fields are: \n%S, \n%S \n");
+		ERR_PRINTF3( KErrInfo, &KListOfServiceTypes, &KListOfMxTimes );
+		//SetTestStepResult(EFail);
+		return;
+		}
+
+	TokenizeStringL(listOfServiceTypes, serviceTypeList);
+	TokenizeStringL(listOfMxTimes, mxTimeList);
+	TInt numUris = serviceTypeList.Count();
+	iFailedNumUris = serviceTypeList.Count(); //This should be of Unique Uri's count
+	TInt numMxs = mxTimeList.Count();
+	TLex responseTimeObj;
+	//__ASSERT_DEBUG ( numUris == numMxs, User::Panic (KDescoveryTestPanicCategory, KErrMissingURiOrResponceTime ) );
+	RBuf8 buf;
+	buf.Create(KMaxUriSize);
+	for(TInt i(0); i < numUris; i++)
+		{
+		CUPnPDiscoverRequestParamSet* discoverParamSet = CUPnPDiscoverRequestParamSet::NewL(pnpFamily );
+		buf.Copy(serviceTypeList[i]);
+		discoverParamSet->SetUriL( buf );
+		//response time
+		responseTimeObj.Assign(mxTimeList[i]);
+		TInt responseTime(0);
+		responseTimeObj.Val(responseTime);
+		discoverParamSet->SetResponseTime(responseTime);
+		}
+	buf.Close();
+	mxTimeList.Close();
+	serviceTypeList.Close();
+	iControlPoint.Discover(pnpBundle);
+
+	TBool delayEnabled = EFalse;
+	_LIT(KDelayEnabled, "delayenabled");
+	GetBoolFromConfig(GetCurrentSection(), KDelayEnabled, delayEnabled);
+
+	TBool SchedulerStatus = ETrue;
+	_LIT(KSchedulerStatus, "schedulerstart");
+	GetBoolFromConfig(GetCurrentSection(), KSchedulerStatus, SchedulerStatus);
+
+	if(SchedulerStatus)
+		{
+		CActiveScheduler::Start();
+		}
+
+	if(!IsDiscoverySuccess() && iFailedNumUris <= 0 )
+		{
+		//In Case of failure of Discovery....Trying once more to Discover.
+		//Retrty Discovery only if and only if All Uri's Timedout
+		_LIT(KInfoDiscoverRetry, "<font color=00ff00><b><u>Retrying Discovery....</u></b></font> \n");
+		INFO_PRINTF1(KInfoDiscoverRetry );
+		SetDiscoveryStatus(ETrue);
+		iControlPoint.Discover(pnpBundle);
+		if(SchedulerStatus)
+			{
+			CActiveScheduler::Start();
+			}
+		}
+	if(delayEnabled)
+		{
+		StartTimerL(aOperationType);
+		}
+	_LIT(KInfoLogFile1, "DiscoverL End... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	}
+
+TBool CTestUPnPManager::IsDiscoverySuccess()
+	{
+	return iDiscoverySuccess;
+	}
+
+void CTestUPnPManager::SetDiscoveryStatus(TBool aSuccess)
+	{
+	_LIT(KInfoDiscoverSetStatus, "Setting iDiscoverySuccesss Flag to %d \n");
+	INFO_PRINTF2(KInfoDiscoverSetStatus, aSuccess );
+	iDiscoverySuccess = aSuccess;
+	}
+
+/*
+	Tests whether Publishing a Service/Device is performing as specified in UPnP specifications.
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void CTestUPnPManager::PublishServiceL (const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "PublishServiceL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	//To keep track of mapping between Observer and Publisher
+	TInt observerIndex = iObserverArray.Count() - 1;
+	RPnPParameterBundle pnpBundle ;
+	pnpBundle.Open();
+	
+    CleanupClosePushL( pnpBundle );
+    pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+    RParameterFamily family = pnpBundle.CreateFamilyL(EUPnPServiceRegisterParamSet);
+    
+	
+   	CUPnPServiceRegisterParamSet* registerServiceParamSet = CUPnPServiceRegisterParamSet::NewL(family );
+	TPtrC serviceType;
+	GetStringFromConfig(aOperationType, KServiceType, serviceType);
+	RBuf8 serviceTypeBuf;
+	serviceTypeBuf.Create(serviceType.Length());
+	serviceTypeBuf.Copy(serviceType);
+
+	TPtrC usn;
+	GetStringFromConfig(aOperationType, KUSN, usn);
+	RBuf8 usnBuf;
+	usnBuf.Create(usn.Length());
+	usnBuf.Copy(usn);
+
+	TInt duration;
+	GetIntFromConfig(aOperationType, KCacheControl, duration);
+
+	TPtrC description;
+	GetStringFromConfig(aOperationType, KDescription, description);
+	RBuf8 descriptionBuf;
+	descriptionBuf.Create(description.Length());
+	descriptionBuf.Copy(description);
+
+	TInt serviceduration =  300;
+	GetIntFromConfig(aOperationType, KServiceMaxDuration, serviceduration);
+		
+	registerServiceParamSet->SetUriL ( serviceTypeBuf );
+	registerServiceParamSet->SetDeviceUidL ( usnBuf );
+	registerServiceParamSet->SetCacheControlData ( duration );
+	registerServiceParamSet->SetSubscriptionDuration(serviceduration);
+	
+	ExtractServiceDescriptionL (aOperationType, *registerServiceParamSet);
+
+	_LIT8(KInitialMessage, "Initial Service Message");
+	registerServiceParamSet->SetInitialMessageL(KInitialMessage);
+
+	//To keep track of mapping between Observer and Publisher
+	TInt publisherIndex = OpenPublisherL();
+	//Create mapping of Publsiher and observer
+	TPublisherObserverMap publisherObserverMapElement;
+	publisherObserverMapElement.iPublisherIndex = publisherIndex;
+	publisherObserverMapElement.iObserverIndex =  observerIndex;
+	publisherObserverMapElement.iPublisherControl = KService;
+	iPublisherObserverMap.Append(publisherObserverMapElement);
+
+	//Publish service nad update publish count
+	iPublishCount++;
+	iPublisherArray[publisherIndex].Publish( pnpBundle );
+
+	TBool SchedulerStart = EFalse;
+	_LIT(KSchedulerStart, "schedulerstart");
+	GetBoolFromConfig(aOperationType, KSchedulerStart, SchedulerStart);
+	if(SchedulerStart)
+		{
+		CActiveScheduler::Start();
+		}
+	_LIT(KInfoLogFile1, "PublishServiceL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	descriptionBuf.Close();
+	usnBuf.Close();
+	serviceTypeBuf.Close();
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	}
+	
+/*
+ * Get publisher mapping index for the given observer index
+ */
+TInt CTestUPnPManager::GetPublisherIndex (TInt aObserverIndex)
+	{
+	_LIT(KInfoLogFile, "GetPublisherIndex.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt count = iPublisherObserverMap.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		if (iPublisherObserverMap[index].iObserverIndex == aObserverIndex)
+			{
+			return iPublisherObserverMap[index].iPublisherIndex;
+			}
+		}
+	return KErrNotFound;
+	}
+
+/*
+ * Gets publisher control i.e, Device/Service for the given observer index
+ */
+TPublisherControl CTestUPnPManager::GetPublisherControl (TInt aObserverIndex)
+	{
+	_LIT(KInfoLogFile, "GetPublisherControl.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt count = iPublisherObserverMap.Count();
+	for (TInt index(0); index < count ; index++ )
+		{
+		if (iPublisherObserverMap[index].iObserverIndex == aObserverIndex)
+			{
+			return iPublisherObserverMap[index].iPublisherControl;
+			}
+		}
+	return KErrNoControl;
+	}
+
+/*
+ * Gets publisher control i.e, Device/Service for the given observer index
+ */
+TPublisherControl CTestUPnPManager::PublisherType (TInt aPublisherIndex)
+	{
+	_LIT(KInfoLogFile, "PublisherType.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iPublisherObserverMap.Count();
+	TPublisherControl publisherControl = KErrNoControl;
+	for (TInt index(0); index < count ; index++ )
+		{
+		if (iPublisherObserverMap[index].iPublisherIndex == aPublisherIndex)
+			{
+			switch (iPublisherObserverMap[index].iPublisherControl)
+				{
+				case KService:
+					{
+					publisherControl = KService;
+					break;
+					}
+				case KDevice:
+					{
+					publisherControl = KDevice;
+					break;
+					}
+				default :
+					{
+					publisherControl = KErrNoControl;
+					break;
+					}
+				}
+			}
+		}
+	_LIT(KInfoLogFile2, "PublisherType....End \n");
+	INFO_PRINTF1(KInfoLogFile2);
+	return publisherControl;
+	}
+
+TInt CTestUPnPManager::NotifyCount()
+	{
+	return iNotifyCount;
+	}
+
+TBool CTestUPnPManager::SendNotificationsL (CUPnPObserver* aObserver)
+	{
+	_LIT(KInfoLogFile, "SendNotificationsL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+    TInt observerIndex = iObserverArray.Find(aObserver);
+    TInt publisherIndex = GetPublisherIndex(observerIndex);
+    TPublisherControl publisherControl = GetPublisherControl(observerIndex);
+
+    if(publisherControl != KService)
+    	{
+    	_LIT(KSendNotifyErr,"SEND NOTIFY NOT EXECUTED -- Can be Executed only ON Services...\n");
+    	ERR_PRINTF1(KSendNotifyErr);
+    	return EFalse;
+    	}
+    RPnPParameterBundle pnpBundle;
+    pnpBundle.Open();   
+    CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)this);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL(EUPnPServiceNotificationParamSet);
+    CUPnPServiceNotificationParamSet* ServiceNotifyParamSet = CUPnPServiceNotificationParamSet::NewL (pnpFamily );
+
+	RBuf8 notificationDataBuf;
+	notificationDataBuf.CreateL(_L8("notification"));
+
+	ServiceNotifyParamSet->SetNotificationL (notificationDataBuf );
+	iNotifyCount++;
+	if(publisherIndex >= 0)
+		{
+		iPublisherArray[publisherIndex].SendNotify( pnpBundle );
+		_LIT(KSendNotify,"Info: SEND NOTIFY SUCCESSFUL...\n");
+		INFO_PRINTF1(KSendNotify);
+		}
+	else
+		{
+		_LIT(KSendNotifyFailed,"Err: SEND NOTIFY UNSUCCESSFUL...\n");
+		ERR_PRINTF1(KSendNotifyFailed);
+		}
+
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	notificationDataBuf.Close();
+	_LIT(KInfoLogFile1, "SendNotificationsL End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	return ETrue;
+	}
+
+/*
+	Extract service description available in a file, copy it to the buffer and append the same to service register paramset.
+	@param			aConfigSection - reference to a section name in ini file where required parameters that needs to be referred for this operation.
+					aServiceRegisterParamSet - Storage for the description buffer
+	@return			None.
+ */
+
+void CTestUPnPManager::ExtractServiceDescriptionL (const TDesC& aConfigSection, CUPnPServiceRegisterParamSet& aServiceRegisterParamSet)
+	{
+	_LIT(KInfoLogFile, "ExtractServiceDescriptionL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TPtrC descriptionPath;
+	_LIT(KDescriptionPath, "Description_Path");
+	GetStringFromConfig(aConfigSection, KDescriptionPath, descriptionPath);
+	
+	TPtrC description;
+	_LIT(KDescription, "description");
+	GetStringFromConfig(aConfigSection, KDescription, description);
+
+	if((descriptionPath == KNullDesC) && (description == KNullDesC)) 
+		{
+		_LIT8(KDefaultServiceDescription, "defaultservicedescription");
+		TBuf8<KMaxBufLength> descBuf;
+		descBuf.Copy(KDefaultServiceDescription);
+		aServiceRegisterParamSet.SetServiceDescriptionL (descBuf);
+		return;
+		}
+	else
+		{
+		RFs fs;
+		RFile file;
+		TInt err;
+		RBuf8 buf;
+		User::LeaveIfError(fs.Connect());
+		CleanupClosePushL(fs);
+		if(descriptionPath != KNullDesC)
+			{
+			err = file.Open(fs, descriptionPath, EFileShareReadersOnly);
+			
+			// For Hardware system path is c:, so descriptionPath value present in '.ini' is referring 'c:'
+			if ( err == KErrPathNotFound )
+				{				
+				RBuf fileName;
+				TDriveName aSystemDrive;
+				TDriveUnit driveunit(RFs::GetSystemDrive());
+				aSystemDrive.Zero();
+				aSystemDrive=driveunit.Name();				
+				fileName.CreateL ( descriptionPath.Length () );
+				fileName.Zero();
+				fileName.Append(aSystemDrive);
+				fileName.Append ( descriptionPath.Mid ( aSystemDrive.Length () ) );				
+				
+				err = file.Open(fs, fileName, EFileShareReadersOnly);
+				}
+			}
+		else 
+			{
+			err = file.Open(fs, description, EFileShareReadersOnly);
+			
+			// For Hardware system path is c:, so description value present in '.ini' is referring 'c:'
+			if ( err == KErrPathNotFound )
+				{
+				RBuf fileName;
+				TDriveName aSystemDrive;
+				TDriveUnit driveunit(RFs::GetSystemDrive());
+				aSystemDrive.Zero();
+				aSystemDrive=driveunit.Name();
+				fileName.CreateL ( description.Length () );
+				fileName.Zero();
+				fileName.Append(aSystemDrive);
+				fileName.Append ( description.Mid ( aSystemDrive.Length () ) );				
+				
+				err = file.Open(fs, fileName, EFileShareReadersOnly);
+				}
+			}
+
+		if (err != KErrNone)
+			{
+			User::LeaveIfError(err);
+			}
+		CleanupClosePushL(file);
+		TInt fileSize = 0;
+		file.Size(fileSize);
+		buf.Create(fileSize);
+		err = file.Read(buf, fileSize);
+		aServiceRegisterParamSet.SetServiceDescriptionL ( buf );
+		_LIT(KServiceDescription, "ServiceDescription is.... %S \n");
+		INFO_PRINTF2(KServiceDescription, &buf);
+		CleanupStack::PopAndDestroy(2);
+		buf.Close();
+		}
+	_LIT(KInfoLogFile1, "ExtractServiceDescriptionL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ResolveScpdUrisL(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "ResolveScpdUrisL .... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	if ( aIndex < 0 )
+		{
+		_LIT(KBadIndex, "BadIndex...ResolveScpdUrisL Cannot be executed \n");
+		ERR_PRINTF1(KBadIndex);
+		return;
+		}
+	const TInt KSlashLenghth = 1;
+	TUriParser8 uri;
+	uri.Parse(iDescriptionSuiteArray[aIndex].iBaseUrl);
+	TBuf8<KMaxUriSize> buf;
+	buf.Copy(uri.Extract(EUriScheme));
+
+	buf.Append(KColonSlashSlash);
+	buf.Append(uri.Extract(EUriHost));
+
+	buf.Append(KColon);
+	buf.Append(uri.Extract(EUriPort));
+
+	TInt count = iDescriptionSuiteArray[aIndex].iServiceUrls.Count();
+	for (TInt scpdIndex(0); scpdIndex < count; scpdIndex++ )
+		{
+		RBuf8 scpdUri;
+		scpdUri.Create(buf.Length() + KSlashLenghth + iDescriptionSuiteArray[aIndex].iServiceUrls[scpdIndex].scpdUrl.Length());
+		scpdUri.Copy(buf);
+		 if (iDescriptionSuiteArray[aIndex].iServiceUrls[scpdIndex].scpdUrl.Find(KSlash)!=0)
+			 {
+			 scpdUri.Append(KSlash);
+			 }
+		 scpdUri.Append(iDescriptionSuiteArray[aIndex].iServiceUrls[scpdIndex].scpdUrl);
+		 AppendScpdUriL(scpdUri);
+		}
+	_LIT(KInfoLogFile1, "ResolveScpdUrisL End .... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ResolveEventUrisL(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "ResolveEventUrisL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	if ( aIndex < 0 )
+		{
+		_LIT(KBadIndex, "BadIndex...ResolveEventUrisL Cannot be executed \n");
+		ERR_PRINTF1(KBadIndex);
+		return;
+		}
+	const TInt KSlashLenghth = 1;
+	TUriParser8 uri;
+	uri.Parse(iDescriptionSuiteArray[aIndex].iBaseUrl);
+	TBuf8<KMaxUriSize> buf;
+	buf.Copy(uri.Extract(EUriScheme));
+
+	buf.Append(KColonSlashSlash);
+	buf.Append(uri.Extract(EUriHost));
+
+	buf.Append(KColon);
+	buf.Append(uri.Extract(EUriPort));
+
+	TInt count = iDescriptionSuiteArray[aIndex].iServiceUrls.Count();
+	for (TInt eventIndex(0); eventIndex < count; eventIndex++ )
+		{
+		RBuf8 eventUri;
+		eventUri.Create(buf.Length() + KSlashLenghth + iDescriptionSuiteArray[aIndex].iServiceUrls[eventIndex].eventSubUrl.Length());
+		eventUri.Copy(buf);
+		 if (iDescriptionSuiteArray[aIndex].iServiceUrls[eventIndex].eventSubUrl.Find(KSlash)!=0)
+			 {
+			 eventUri.Append(KSlash);
+			 }
+		 eventUri.Append(iDescriptionSuiteArray[aIndex].iServiceUrls[eventIndex].eventSubUrl);
+		 AppendEventUriL(eventUri);
+		}
+	_LIT(KInfoLogFile1, "ResolveEventUrisL End.... \n"); 
+	INFO_PRINTF1(KInfoLogFile1);
+		
+	}
+
+void CTestUPnPManager::ResolveControlUrisL(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "ResolveControlUrisL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	if ( aIndex < 0 )
+		{
+		_LIT(KBadIndex, "BadIndex...ResolveControlUrisL Cannot be executed \n");
+		ERR_PRINTF1(KBadIndex);
+		return;
+		}
+	const TInt KSlashLenghth = 1;
+	TUriParser8 uri;
+	uri.Parse(iDescriptionSuiteArray[aIndex].iBaseUrl);
+	TBuf8<KMaxUriSize> buf;
+	buf.Copy(uri.Extract(EUriScheme));
+
+	buf.Append(KColonSlashSlash);
+	buf.Append(uri.Extract(EUriHost));
+
+	buf.Append(KColon);
+	buf.Append(uri.Extract(EUriPort));
+
+	TInt count = iDescriptionSuiteArray[aIndex].iServiceUrls.Count();
+	for (TInt ControlIndex(0); ControlIndex < count; ControlIndex++ )
+		{
+		RBuf8 controlUri;
+		controlUri.Create(buf.Length() + KSlashLenghth + iDescriptionSuiteArray[aIndex].iServiceUrls[ControlIndex].controlUrl.Length());
+		controlUri.Copy(buf);
+		 if (iDescriptionSuiteArray[aIndex].iServiceUrls[ControlIndex].controlUrl.Find(KSlash)!=0)
+			 {
+			 controlUri.Append(KSlash);
+			 }
+		 controlUri.Append(iDescriptionSuiteArray[aIndex].iServiceUrls[ControlIndex].controlUrl);
+		 AppendControlUriL(controlUri);
+		}
+	_LIT(KInfoLogFile1, "ResolveControlUrisL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::ResolveIconUrlL ( TInt aBaseDescIdx, const TDesC8& aUrl )
+	{
+	_LIT(KInfoLogFile, "ResolveIconUrlL.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	const TInt KSlashLength = 1;
+	TUriParser8 uri;
+	uri.Parse(iDescriptionSuiteArray[aBaseDescIdx].iBaseUrl);
+	TBuf8<KMaxUriSize> buf;
+	buf.Copy(uri.Extract(EUriScheme));
+	
+	buf.Append(KColonSlashSlash);
+	buf.Append(uri.Extract(EUriHost));
+	
+	buf.Append(KColon);
+	buf.Append(uri.Extract(EUriPort));	
+	
+	RBuf8 iconUri;
+	if ( aUrl[0] == TChar('/') )
+		{
+		iconUri.Create(buf.Length() + aUrl.Length());
+		iconUri.Copy(buf);
+		iconUri.Append (aUrl);
+		}
+	else
+		{
+		iconUri.Create(buf.Length() + KSlashLength + aUrl.Length());
+		iconUri.Copy(buf);
+		iconUri.Append(KSlash);
+		iconUri.Append (aUrl);
+		}
+	
+	iIconUriArray.Append (iconUri);
+	
+	_LIT(KInfoLogFile1, "ResolveIconUrlL End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+	Opens a handle to a RPnPServiceDiscovery object
+	@param			None.
+	@return			None.
+ */
+void CTestUPnPManager::OpenDiscovererL()
+	{
+	_LIT(KInfoLogFile, "OpenDiscovererL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TBool cpStatus = EFalse;
+	TInt openStatus = 0;
+	_LIT(KCpStatus, "cpstatus");
+	GetBoolFromConfig(GetCurrentSection(), KCpStatus, cpStatus);
+	if(!cpStatus)
+		{
+		_LIT(KInfoDiscoverer, "Control Point should not be Created \n");
+		INFO_PRINTF1(KInfoDiscoverer);
+		return;
+		}
+	for(TInt i=0;i<3;i++)	
+		{
+		openStatus = iControlPoint.Open(KTierId);
+		if(openStatus == KErrNone)
+			{
+			break;
+			}
+		}
+	if(openStatus != KErrNone) 
+		{
+		_LIT(KOpenDiscovererFailed, "Control Point discovery open failed with error %d ");
+		ERR_PRINTF2(KOpenDiscovererFailed, openStatus);
+		SetTestStepError(openStatus);
+		//SetTestStepResult(EFail); 
+		}
+	else
+		{
+		_LIT(KOpenDiscovererSuccess, "Control Point Discovery was successfully started with return value %d :");
+		INFO_PRINTF2(KOpenDiscovererSuccess, openStatus);
+		}
+	}
+
+/*
+	Opens a handle to a RPnPServicePublisher object and append the same to Publisher array
+	@param			None.
+	@return			TBool representing success or failure of the operation.
+ */
+TInt CTestUPnPManager::OpenPublisherL()
+	{
+	_LIT(KInfoLogFile, "OpenPublisherL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+  	RPnPServicePublisher publisher;
+	TInt openStatus = 0;
+	for(TInt i=0;i<3;i++)	
+		{
+		openStatus = publisher.Open(KTierId);
+		if(openStatus == KErrNone)
+			{
+			break;
+			}
+		}
+  	if( openStatus != KErrNone )
+  		{
+ 		_LIT(KOpenDiscovererFailed, "Publisher open failed with error %d ");
+ 		ERR_PRINTF2(KOpenDiscovererFailed, openStatus);
+ 		//SetTestStepResult(EFail);
+ 		}
+ 	else
+ 		{
+ 		_LIT(KOpenPublisherSuccess, "Service publisher was successfully started with return value %d :");
+  		INFO_PRINTF2(KOpenPublisherSuccess, openStatus);
+ 		}
+	iPublisherArray.Append(publisher);
+	TInt index = iPublisherArray.Count() - 1;
+	return index;
+	}
+	
+/*
+	Opens a handle to a RPnPServicePublisher object and append the same to Publisher array
+	@param			None.
+	@return			TBool representing success or failure of the operation.
+ */
+void CTestUPnPManager::OpenMultiplePublisherL()
+	{
+	_LIT(KInfoLogFile, "MultipleOpenPublisherL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+  	static RPnPServicePublisher publisher;
+	TInt openStatus = 0;
+	for(TInt i=0;i<3;i++)	
+		{
+		openStatus = publisher.Open(KTierId);
+		if(openStatus == KErrNone)
+			{
+			break;
+			}
+		}
+  	if( openStatus != KErrNone )
+  		{
+ 		_LIT(KOpenDiscovererFailed, "Publisher open failed with error %d ");
+ 		ERR_PRINTF2(KOpenDiscovererFailed, openStatus);
+ 		SetTestStepError(openStatus);
+ 		//SetTestStepResult(EFail); 
+ 		}
+ 	else
+ 		{
+ 		_LIT(KOpenPublisherSuccess, "Service publisher was successfully started with return value %d :");
+  		INFO_PRINTF2(KOpenPublisherSuccess, openStatus);
+ 		}
+	}
+
+
+
+/*
+	Publishing of device as per UPnP specifications.
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+
+void CTestUPnPManager::PublishDeviceL (const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "PublishDeviceL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+
+	//To keep track of mapping between Observer and Publisher
+	TInt observerIndex = iObserverArray.Count() - 1;
+
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.Open();	
+	
+    CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL(EUPnPDeviceRegisterParamSet);
+	CUPnPDeviceRegisterParamSet* registerDeviceParamSet = CUPnPDeviceRegisterParamSet::NewL(pnpFamily );
+   	TPtrC parentdeviceuid;
+	GetStringFromConfig(aOperationType, KParentDeviceUid, parentdeviceuid);
+	RBuf8 parentdeviceuidBuf;
+	parentdeviceuidBuf.Create(parentdeviceuid.Length());
+	parentdeviceuidBuf.Copy(parentdeviceuid);
+
+	TPtrC devicetype;
+	GetStringFromConfig(aOperationType, KDeviceType, devicetype);
+	RBuf8 devicetypeBuf;
+	devicetypeBuf.Create(devicetype.Length());
+	devicetypeBuf.Copy(devicetype);
+
+	TPtrC friendlyname;
+	GetStringFromConfig(aOperationType, KFriendlyName, friendlyname);
+	RBuf8 friendlynameBuf;
+	friendlynameBuf.Create(friendlyname.Length());
+	friendlynameBuf.Copy(friendlyname);
+
+	TPtrC manufacturer;
+	GetStringFromConfig(aOperationType, KManufacturer, manufacturer);
+	RBuf8 manufacturerBuf;
+	manufacturerBuf.Create(manufacturer.Length());
+	manufacturerBuf.Copy(manufacturer);
+
+	TPtrC manufacturerurl;
+	GetStringFromConfig(aOperationType, KManufacturerURL, manufacturerurl);
+	RBuf8 manufacturerurlBuf;
+	manufacturerurlBuf.Create(manufacturerurl.Length());
+	manufacturerurlBuf.Copy(manufacturerurl);
+
+	TPtrC modeldescription;
+	GetStringFromConfig(aOperationType, KModelDescription, modeldescription);
+	RBuf8 modeldescriptionBuf;
+	modeldescriptionBuf.Create(modeldescription.Length());
+	modeldescriptionBuf.Copy(modeldescription);
+
+	TPtrC modelname;
+	GetStringFromConfig(aOperationType, KModelName, modelname);
+	RBuf8 modelnameBuf;
+	modelnameBuf.Create(modelname.Length());
+	modelnameBuf.Copy(modelname);
+
+	TPtrC modelnumber;
+	GetStringFromConfig(aOperationType, KModelNumber, modelnumber);
+	RBuf8 modelnumberBuf;
+	modelnumberBuf.Create(modelnumber.Length());
+	modelnumberBuf.Copy(modelnumber);
+
+
+	TPtrC modelurl;
+	GetStringFromConfig(aOperationType, KModelURL, modelurl);
+	RBuf8 modelurlBuf;
+	modelurlBuf.Create(modelurl.Length());
+	modelurlBuf.Copy(modelurl);
+
+	TPtrC presentationurl;
+	GetStringFromConfig(aOperationType, KPresentationURL, presentationurl);
+	RBuf8 presentationurlBuf;
+	presentationurlBuf.Create(presentationurl.Length());
+	presentationurlBuf.Copy(presentationurl);
+
+	TPtrC serialnumber;
+	GetStringFromConfig(aOperationType, KSerialNumber, serialnumber);
+	RBuf8 serialnumberBuf;
+	serialnumberBuf.Create(serialnumber.Length());
+	serialnumberBuf.Copy(serialnumber);
+
+	TPtrC udn;
+	GetStringFromConfig(aOperationType, KUDN, udn);
+	RBuf8 udnBuf;
+	udnBuf.Create(udn.Length());
+	udnBuf.Copy(udn);
+
+	TPtrC upc;
+	GetStringFromConfig(aOperationType, KUPC, upc);
+	RBuf8 upcBuf;
+	upcBuf.Create(upc.Length());
+	upcBuf.Copy(upc);
+
+	TInt duration;
+	GetIntFromConfig(aOperationType, KCacheControl, duration);
+
+	TPtrC iconRefer;	
+	if ( GetStringFromConfig(aOperationType, KIconRefer, iconRefer) )
+		{
+		
+		//iconRead:
+		do
+			{
+			TPtrC mimeType;
+			GetStringFromConfig(iconRefer, KMimeType, mimeType);
+			RBuf8 typeBuf;
+			typeBuf.Create(mimeType.Length());
+			typeBuf.Copy(mimeType);
+			
+			TPtrC url;
+			GetStringFromConfig(iconRefer, KUrl, url);
+			RBuf8 urlBuf;
+			urlBuf.Create(url.Length());
+			urlBuf.Copy(url);
+			
+			TInt width;
+			GetIntFromConfig(iconRefer, KWidth, width);
+			
+			TInt height;
+			GetIntFromConfig(iconRefer, KHeight, height);
+			
+			TInt depth;
+			GetIntFromConfig(iconRefer, KDepth, depth);
+			
+			CUPnPIconParams* icon = CUPnPIconParams::NewL ();
+			icon->SetMimeTypeL (typeBuf);
+			icon->SetUrlL (urlBuf);
+			icon->SetWidth (width);
+			icon->SetHeight (height);
+			icon->SetDepth (depth);
+			
+			registerDeviceParamSet->SetIconInfoL (icon);
+			typeBuf.Close ();
+			urlBuf.Close ();
+			}while ( GetStringFromConfig(iconRefer, KIconRefer, iconRefer) );
+/*			
+		if ( GetStringFromConfig(iconRefer, KIconRefer, iconRefer) )
+			{
+			goto iconRead;
+			}*/
+		}
+
+	registerDeviceParamSet-> SetParentDeviceUidL(parentdeviceuidBuf);
+	registerDeviceParamSet-> SetUriL (devicetypeBuf);
+	registerDeviceParamSet-> SetFriendlyNameL (friendlynameBuf);
+	registerDeviceParamSet-> SetManufacturerL (manufacturerBuf );
+	registerDeviceParamSet-> SetManufactureUrlL (manufacturerurlBuf);
+	registerDeviceParamSet-> SetModelDescL (modeldescriptionBuf);
+	registerDeviceParamSet-> SetModelNameL (modelnameBuf);
+	registerDeviceParamSet-> SetModelNumberL (modelnumberBuf);
+	registerDeviceParamSet-> SetModelUriL (modelurlBuf);
+	registerDeviceParamSet-> SetPresentationL (presentationurlBuf);
+	registerDeviceParamSet-> SetSerialNumberL (serialnumberBuf);
+	registerDeviceParamSet-> SetUDNL (udnBuf);
+	registerDeviceParamSet-> SetUPCL (upcBuf);
+	registerDeviceParamSet-> SetCacheControlData (duration);
+
+	//To keep track of mapping between Observer and Publisher
+	TInt publisherIndex = OpenPublisherL();
+	//Create mapping of Publsiher and observer
+	TPublisherObserverMap publisherObserverMapElement;
+	publisherObserverMapElement.iPublisherIndex = publisherIndex;
+	publisherObserverMapElement.iObserverIndex =  observerIndex;
+	publisherObserverMapElement.iPublisherControl = KDevice;
+	iPublisherObserverMap.Append(publisherObserverMapElement);
+
+	//Publish Device and update publish count
+	iPublishCount++;
+	iPublisherArray[publisherIndex].Publish( pnpBundle );
+
+	TBool SchedulerStart = EFalse;
+	_LIT(KSchedulerStart, "schedulerstart");
+	GetBoolFromConfig(aOperationType, KSchedulerStart, SchedulerStart);
+	if(SchedulerStart)
+		{
+		CActiveScheduler::Start();
+		}
+
+	upcBuf.Close();
+	udnBuf.Close();
+	serialnumberBuf.Close();
+	presentationurlBuf.Close();
+	modelurlBuf.Close();
+	modelnumberBuf.Close();
+	modelnameBuf.Close();
+	manufacturerurlBuf.Close();
+	manufacturerBuf.Close();
+	friendlynameBuf.Close();
+	devicetypeBuf.Close();
+	parentdeviceuidBuf.Close();
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	_LIT(KInfoLogFile1, "PublishDeviceL End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+Test for Register announcements ssdp:alive and ssdp:byebye messages
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+*/
+void  CTestUPnPManager::RegisterForAnnouncementsL (const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "RegisterForAnnouncementsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	RArray<TPtrC> uriTypeList;
+	TPtrC listOfUriTypes;
+	_LIT(KListOfUriTypes, "listofuritypes");
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPRegisterAnnouncementParamSet);
+	
+	if(!GetStringFromConfig(GetCurrentSection(), KListOfUriTypes, listOfUriTypes))
+		{
+		_LIT(KErrInfo, "Problem in reading values from ini. \n Expected fields are: %S \n");
+		ERR_PRINTF2( KErrInfo, &KListOfUriTypes);
+		return;
+		}
+
+	TokenizeStringL(listOfUriTypes, uriTypeList);
+	TInt numUris = uriTypeList.Count();
+	RBuf8 buf;
+	buf.Create(KMaxUriSize);
+	for(TInt i(0); i < numUris; i++)
+		{
+		CUPnPRegisterAnnouncementParamSet* announcementParamSet = CUPnPRegisterAnnouncementParamSet::NewL( pnpFamily ); 
+		buf.Copy(uriTypeList[i]);
+		announcementParamSet->SetUriL( buf ); 
+		}
+	buf.Close();
+	uriTypeList.Close();
+	iControlPoint.RegisterNotify( pnpBundle );
+	TBool schedulerStart = EFalse;
+	_LIT(KSchedulerStart, "schedulerstart");
+	GetBoolFromConfig(aOperationType, KSchedulerStart, schedulerStart);
+	if(schedulerStart)
+		{
+		CActiveScheduler::Start();
+		}
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	_LIT(KInfoLogFile1, "RegisterForAnnouncementsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	
+	}
+
+/*
+	Tests whether subscribtion to event change notifications is performing as specified in UPnP specifications.
+	@param			None.
+	@return			None.
+ */
+void  CTestUPnPManager::SubscribeForStateChangeNotificationsL()
+	{
+	_LIT(KInfoLogFile, "SubscribeForStateChangeNotificationsL() start.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPSubscribeRequestParamSet);
+	
+	TInt subscriptionDuration;
+    _LIT(KSubscriptionDuration, "subscriptionduration");
+	GetIntFromConfig(GetCurrentSection(), KSubscriptionDuration, subscriptionDuration);
+	TBool readIni = EFalse;
+	GetBoolFromConfig(GetCurrentSection(), KReadIni, readIni);
+	if(readIni)
+		{
+		CUPnPSubscribeRequestParamSet * subscribeParamSet = CUPnPSubscribeRequestParamSet::NewL (pnpFamily ); 
+		TPtrC subscriptionUri;
+		GetStringFromConfig(GetCurrentSection(), KSubscriptionUri, subscriptionUri);
+		RBuf8 subscriptionUriBuf;
+		subscriptionUriBuf.Create(subscriptionUri.Length());
+		subscriptionUriBuf.Copy(subscriptionUri);
+		subscribeParamSet->SetDuration(subscriptionDuration);	
+		subscribeParamSet->SetUriL(subscriptionUriBuf);	
+		subscriptionUriBuf.Close();
+		}
+	else
+		{
+		//Multiple uri's can be submitted for description
+		ResolveAllUrisL();
+		TInt eventUriCount = iEventUriArray.Count();
+		if ( eventUriCount==0 )
+			{
+			_LIT(KEventSubscription,"Event Subscription Cannot be performed \n");
+			INFO_PRINTF1(KEventSubscription);
+			CleanupStack::PopAndDestroy( &pnpBundle );
+			CleanupStack::PopAndDestroy( upnpObserver );
+			//SetTestStepResult(EFail);
+			return;
+			}
+		for(TInt index(0); index < eventUriCount ; index++)
+			{
+			//for (TInt j(0); j < 10 ; j++)
+			//{//Pass Duplicate subscritption reuqest multiple times in single bundle
+				CUPnPSubscribeRequestParamSet * subscribeParamSet = CUPnPSubscribeRequestParamSet::NewL (pnpFamily ); 
+				subscribeParamSet->SetUriL(iEventUriArray[index]);	
+				subscribeParamSet->SetDuration(subscriptionDuration);	
+				RBuf eventUri16;
+				eventUri16.Create(iEventUriArray[index].Length());
+				eventUri16.Copy(iEventUriArray[index]);
+				_LIT(KEventSubUriInfo,"Event Uri Submitted for Subscription Request is: %S \n");
+				INFO_PRINTF2(KEventSubUriInfo, &eventUri16);
+				eventUri16.Close();
+			//	}
+			}
+		}
+	iControlPoint.Subscribe( pnpBundle );
+	TBool schedulerStart = EFalse;
+	_LIT(KSchedulerStart, "schedulerstart");
+	GetBoolFromConfig(GetCurrentSection(), KSchedulerStart, schedulerStart);
+	if(schedulerStart)
+		{
+		CActiveScheduler::Start();
+		}
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	_LIT(KInfoLogFile1, "SubscribeForStateChangeNotificationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void  CTestUPnPManager::ReSubscribeForStateChangeNotificationsL()
+	{
+	_LIT(KInfoLogFile, "Re-SubscribeForStateChangeNotificationsL() start.... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPSubscribeRequestParamSet	);
+	TInt subscriptionDuration;
+    _LIT(KSubscriptionDuration, "subscriptionduration");
+	GetIntFromConfig(GetCurrentSection(), KSubscriptionDuration, subscriptionDuration);
+	
+	TInt eventUriCount = iEventUriArray.Count();
+	if ( eventUriCount==0 )
+		{
+		_LIT(KEventSubscription,"Event Subscription Cannot be performed \n");
+		INFO_PRINTF1(KEventSubscription);
+		CleanupStack::PopAndDestroy( &pnpBundle );
+		CleanupStack::PopAndDestroy( upnpObserver );
+		//SetTestStepResult(EFail);
+		return;
+		}
+	for(TInt index(0); index < eventUriCount ; index++)
+		{
+		CUPnPSubscribeRequestParamSet * subscribeParamSet = CUPnPSubscribeRequestParamSet::NewL (pnpFamily );
+		subscribeParamSet->SetUriL(iEventUriArray[index]);
+		subscribeParamSet->SetDuration(20); 	
+		RBuf eventUri16;
+		eventUri16.Create(iEventUriArray[index].Length());
+		eventUri16.Copy(iEventUriArray[index]);
+		_LIT(KEventSubUriInfo,"Event Uri Submitted for Re-Subscription  is: %S \n");
+		INFO_PRINTF2(KEventSubUriInfo, &eventUri16);
+		eventUri16.Close();
+		}
+	iControlPoint.Subscribe( pnpBundle );
+	CActiveScheduler::Start();
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	_LIT(KInfoLogFile1, "Re-SubscribeForStateChangeNotificationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+/*
+	Tests whether unsubscribtion to subscribed events is performing as specified in UPnP specifications.
+	@param			None
+	@return			None.
+ */
+void  CTestUPnPManager::UnsubscribeForStateChangeNotificationsL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "UnsubscribeForStateChangeNotificationsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPCancelSubscribeParamSet);
+	
+	TBool readIni = EFalse;
+	GetBoolFromConfig(aOperationType, KReadIni, readIni);
+	if(readIni)
+		{
+	CUPnPCancelSubscribeParamSet * unsubscribeParamSet = CUPnPCancelSubscribeParamSet::NewL(pnpFamily); 
+	TPtrC unsubscribepath;
+	_LIT(KUnsubscribePath, "unsubscribepath");
+		GetStringFromConfig(aOperationType, KUnsubscribePath, unsubscribepath);
+	RBuf8 unsubscribepathBuf;
+	unsubscribepathBuf.Create(unsubscribepath.Length());
+	unsubscribepathBuf.Copy(unsubscribepath);
+	unsubscribeParamSet->SetUriL(unsubscribepathBuf);
+	_LIT(KCanCelSubscribeInfo,"Executing Cancel Subscribe for URI:  %S \n");
+	INFO_PRINTF2(KCanCelSubscribeInfo, &unsubscribepath);
+	
+	iControlPoint.Cancel( pnpBundle );
+	unsubscribepathBuf.Close();
+	}
+	else
+	{
+		TInt eventUriCount = iEventUriArray.Count();
+		if ( eventUriCount==0 )
+			{
+			_LIT(KEventUnSubscription,"Event UnSubscription Cannot be performed \n");
+			INFO_PRINTF1(KEventUnSubscription);
+			CleanupStack::PopAndDestroy( &pnpBundle );
+			return;
+			}
+		for(TInt index(0); index < eventUriCount ; index++)//eventUriCount
+			{
+			CUPnPCancelSubscribeParamSet * unsubscribeParamSet = CUPnPCancelSubscribeParamSet::NewL(pnpFamily); 
+			unsubscribeParamSet ->SetUriL(iEventUriArray[index]); 
+			RBuf eventUri16;
+			eventUri16.Create(iEventUriArray[index].Length());
+			eventUri16.Copy(iEventUriArray[index]);
+			_LIT(KEventSubUriInfo,"Event Uri Submitted for UnSubscription Request is: %S \n");
+			INFO_PRINTF2(KEventSubUriInfo, &eventUri16);
+			eventUri16.Close();
+			}iControlPoint.Cancel( pnpBundle );
+	
+			}
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	_LIT(KInfoLogFile1, "UnsubscribeForStateChangeNotificationsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+	Test for Intiatting a Control Action from Control Point side
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void CTestUPnPManager::InitiateActionL(const TDesC& /* aOperationType */)
+	{
+	_LIT(KInfoLogFile, "InitiateActionL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	ResolveAllUrisL();
+	if(!iAction)
+		{
+		iAction= CAction::NewL(this);
+		}
+	for(TInt i(0); i < iControlUriArray.Count(); i++)
+		{
+		RBuf controlUri16;
+		controlUri16.Create(iControlUriArray[i].Length());
+		controlUri16.Copy(iControlUriArray[i]);
+		_LIT(KContolUri, "<font color=00ff00><b><u>Control Uri Submitted is: %S </b></u></font>");
+		INFO_PRINTF2(KContolUri, &controlUri16);
+		iAction->InitiateActionControlL(iControlUriArray[i],iControlPoint);
+		controlUri16.Close();		
+		}
+	_LIT(KInfoLogFile1, "InitiateActionL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+	Test for Cancelling Discovery Operation
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void CTestUPnPManager::CancelDiscoverL(const TDesC& aOperationType)
+	{
+	iCancelDiscovery = ETrue;
+	const TInt KBufLength = 1000;
+	_LIT(KInfoLogFile, "CancelDiscoverL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);	
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPCancelDiscoverParamSet);
+	
+	CUPnPCancelDiscoverParamSet* cancelDiscoverParamSet = CUPnPCancelDiscoverParamSet::NewL(pnpFamily ); 
+	TPtrC serviceType;
+	GetStringFromConfig(aOperationType, KServiceType, serviceType);
+	_LIT(KCanCelDiscoveryInfo,"Executing Cancel Discovery for URI:  %S \n");
+	INFO_PRINTF2(KCanCelDiscoveryInfo, &serviceType);
+	RBuf8 buf;
+	buf.Create(KBufLength);
+	buf.Copy(serviceType);
+	cancelDiscoverParamSet->SetUriL( buf ); 
+	iControlPoint.Cancel ( pnpBundle );
+	buf.Close();
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	
+	TBool flag=ETrue;
+	_LIT(KStopScheduler,"stopscheduler");
+	GetBoolFromConfig(aOperationType,KStopScheduler,flag);
+	if(flag)		
+		{
+		CActiveScheduler::Stop();	
+		}
+	_LIT(KInfoLogFile1, "CancelDiscoverL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::CancelDescribeL(const TDesC& aOperationType)
+	{
+	//Modify this later
+	const TInt KBufLength = 1000;
+	_LIT(KInfoLogFile, "CancelDescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);	
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPCancelDescribeParamSet);
+	
+	CUPnPCancelDescribeParamSet* cancelDescribeParamSet = CUPnPCancelDescribeParamSet::NewL( pnpFamily ); 
+	TPtrC serviceType;
+	GetStringFromConfig(aOperationType, KServiceType, serviceType);
+	_LIT(KCanCelDiscoveryInfo,"Executing Cancel Describe for URI:  %S \n");
+	INFO_PRINTF2(KCanCelDiscoveryInfo, &serviceType);
+	RBuf8 buf;
+	buf.Create(KBufLength);
+	buf.Copy(serviceType);
+	cancelDescribeParamSet->SetUriL( buf ); 
+	iControlPoint.Cancel ( pnpBundle );
+	buf.Close();
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	_LIT(KInfoLogFile1, "CancelDescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+ Cancells all persistent Device Description Requests.
+*/
+void CTestUPnPManager::CancelAllDeviceDescribeL()
+	{
+	_LIT(KInfoLogFile, "CancelAllDeviceDescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	//this perofrms only Cancellation of all Device descriptions only
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+		
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPCancelDescribeParamSet);
+	TInt DevLocCount = iDeviceLocationArray.Count();
+	for(TInt index(0); index < DevLocCount  ; index++)
+		{
+		TBuf8<256> url;
+		TUriParser8 uri;
+		uri.Parse(iDeviceLocationArray[index]);
+		url.Copy(_L8("http://"));
+		const TDesC8& scheme = uri.Extract(EUriScheme);
+		_LIT8(KScheme, "http");
+		//Uri must be of scheme "http" only
+		if (scheme.CompareF(KScheme) == 0)
+			{
+			const TDesC8& host = uri.Extract(EUriHost);
+			url.Append(host);
+			url.Append(_L8(":"));
+			const TDesC8& portStr = uri.Extract ( EUriPort );
+			url.Append(portStr);
+			url.Append(_L8("/")) ;
+			CUPnPCancelDescribeParamSet* cancelDescribeParamSet = CUPnPCancelDescribeParamSet::NewL(pnpFamily ); 
+			cancelDescribeParamSet->SetUriL(url); 
+			RBuf uri16;
+			uri16.Create(url.Length());
+			uri16.Copy(url);
+			_LIT(KCanCelDescribeInfo,"Executing Cancel Describe for URI:  %S \n");
+			INFO_PRINTF2(KCanCelDescribeInfo, &uri16);
+			uri16.Close();
+			}
+		}
+	iControlPoint.Cancel ( pnpBundle );
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CActiveScheduler::Stop();
+	_LIT(KInfoLogFile1, "CancelAllDeviceDescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	}
+
+/*
+ * this perofrms only Cancellation of all Service descriptions only
+*/
+void CTestUPnPManager::CancelAllServiceDescribeL()
+	{
+	_LIT(KInfoLogFile, "CancelAllServiceDescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPCancelDescribeParamSet);
+	TInt scpdCount = iScpdUriArray.Count();
+	for(TInt index(0); index < scpdCount  ; index++)
+		{
+		RBuf uri16;
+		uri16.Create(iScpdUriArray[index].Length());
+		uri16.Copy(iScpdUriArray[index]);
+		_LIT(KCanCelDescribeServiceInfo,"Executing Cancel DescribeService for URI:  %S \n");
+		INFO_PRINTF2(KCanCelDescribeServiceInfo, &uri16);
+		uri16.Close();
+		CUPnPCancelDescribeParamSet* cancelDescribeParamSet = CUPnPCancelDescribeParamSet::NewL(pnpFamily ); 
+		cancelDescribeParamSet->SetUriL(iScpdUriArray[index]);
+		}
+	iControlPoint.Cancel ( pnpBundle );
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CActiveScheduler::Stop();
+	_LIT(KInfoLogFile1, "CancelAllServiceDescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	}
+
+/*
+	Test for Cancelling Register Announcement
+	@param			aOperationType is reference to a section name in ini file where required parameters
+					needs to be referred for this operation.
+	@return			None.
+ */
+void  CTestUPnPManager::CancelNotifyAnnouncementL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "CancelNotifyAnnouncementL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	iObserverArray.Append(upnpObserver);
+		
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL ( EUPnPCancelRegisterNotifyParamSet );
+	
+	CUPnPCancelRegisterNotifyParamSet * cancelNotifyParamSet = CUPnPCancelRegisterNotifyParamSet::NewL(pnpFamily);
+	TPtrC uri;
+	GetStringFromConfig(aOperationType, KUri, uri);
+	RBuf8 buf;
+	buf.Create(uri.Length());
+	buf.Copy(uri);
+	cancelNotifyParamSet->SetUriL(buf);
+	iControlPoint.Cancel ( pnpBundle);
+	buf.Close();
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	_LIT(KInfoLogFile1, "CancelNotifyAnnouncementL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::AppendBundlesL(RPnPParameterBundleBase& aPnPBundle)
+	{
+	iResultsArray.AppendL(aPnPBundle);
+	}
+
+/*
+   Validates the discovery response received from the callback against the expected discovery response.
+   @param	aIndex is an integer refers to an index in the ResultsArray of CResults object.
+   @param	aResultsList is an array for section names for expected results section.
+   @param	aExpctedResults is an array of Bools and each of the element indicates whether the expected results
+   			in each section are matched against actual results.
+   @return	None
+ */
+
+void CTestUPnPManager::PrintAndValidateResultsL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "PrintAndValidateResultsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt resultsCount = 0;
+	const TInt bundleCount = iResultsArray.Count();
+	_LIT(KPrintStatement, "printing results \n");
+	_LIT(KPrintDesign,"	\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \n");
+	INFO_PRINTF1(KPrintStatement);
+	INFO_PRINTF1(KPrintDesign);
+	for(TInt i(0); i < bundleCount; i++)
+		{
+		RParameterFamily paramFamily =  iResultsArray[i].GetFamilyAtIndex(0);	
+		if( !paramFamily.IsNull() )
+			{
+			switch ( paramFamily.Id() )
+				{
+				case EUPnPDiscoverResponseParamSet:
+					{
+					PrintDiscoveryResultsL(paramFamily);
+					ValidateDiscoveryResultsL(aOperationType);
+					}
+				break;
+
+				case EUPnPPresenceAnnouncementParamSet:
+					{					
+					CUPnPPresenceAnnouncementParamSet* paramSet  = NULL;
+					TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;					
+					for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+					{
+						paramSet = static_cast<CUPnPPresenceAnnouncementParamSet*>( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ));
+						
+						//Paramset at current position						
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KRegisterAliveFailed,"Failed to Send Register Alive Notifications with...Error Code  = %d \n");
+							ERR_PRINTF2(KRegisterAliveFailed, error);
+							//SetTestStepResult(EFail); 							
+							continue;
+							}
+						TPtrC8 serviceLocation(paramSet->ServiceLocation());
+						HBufC* devloc = HBufC::NewLC(serviceLocation.Length());	//1
+						devloc->Des().Copy(serviceLocation);
+						TPtrC devLocPointer (devloc->Des());
+						_LIT(KInfoUri,"The URI found is %S \n");
+						INFO_PRINTF2(KInfoUri, &devLocPointer);
+
+						TInt availabilityDuration = 0;
+						availabilityDuration = paramSet->Duration();
+						_LIT(KInfoDuration,"The service availability duration is %d \n");
+						INFO_PRINTF2(KInfoDuration, &availabilityDuration);
+
+						_LIT(KInfoAlive,"ssdp:alive notification got from %S AND Duration is %d\n");
+						INFO_PRINTF3(KInfoAlive, &devLocPointer, &availabilityDuration);
+
+						TPtrC8 usn(paramSet->USN());
+						HBufC* usnVal = HBufC::NewLC(usn.Length());	//2
+						usnVal->Des().Copy(usn);
+						TPtrC usnValPointer (usnVal->Des());
+						_LIT(KInfoUSN,"The USN found is %S \n");
+						INFO_PRINTF2(KInfoUSN, &usnValPointer);
+
+						TPtrC8 uri(paramSet->Uri());
+						HBufC* uriVal = HBufC::NewLC(uri.Length());	//3
+						uriVal->Des().Copy(uri);
+						TPtrC uriValPointer (uriVal->Des());
+						_LIT(KInfoURI,"The Uri found is %S \n");
+						INFO_PRINTF2(KInfoURI, &uriValPointer);
+						resultsCount++;
+						CleanupStack::PopAndDestroy(uriVal);
+						CleanupStack::PopAndDestroy(usnVal);
+						CleanupStack::PopAndDestroy(devloc);						
+						}
+					}
+				break;
+				case EUPnPDescribeResponseParamSet:
+					{					
+					CUPnPDescribeResponseParamSet* paramSet  = NULL;
+					TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;					
+					for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+					{
+						paramSet = static_cast<CUPnPDescribeResponseParamSet*>( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ));
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KDescribeFailed,"Failed to Describe with...Error Code  = %d \n");
+							ERR_PRINTF2(KDescribeFailed, error);
+							//SetTestStepResult(EFail); 
+							return;
+							}
+						TPtrC8 description(paramSet->Description());
+						HBufC* descriptionValue = HBufC::NewLC(description.Length());
+						descriptionValue->Des().Copy(description);
+						TPtrC descriptionPointer (descriptionValue->Des());
+						_LIT(KInfoDescribe,"content is  %S \n");
+						INFO_PRINTF2(KInfoDescribe, &descriptionPointer);
+						CleanupStack::PopAndDestroy(descriptionValue);					
+						resultsCount++;
+						}
+					//Reached Eof the Bundles
+					}
+				break;
+				case EUPnPAbsenceAnnouncementParamSet:
+					{					
+					CUPnPAbsenceAnnouncementParamSet* paramSet  = NULL;
+					TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;					
+					for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+					{
+						paramSet = static_cast<CUPnPAbsenceAnnouncementParamSet*> (paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ));
+						//Paramset at current position					
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KRegisterByeByeFailed,"Failed to Send Register ByeBye Notifications with...Error Code  = %d \n");
+							ERR_PRINTF2(KRegisterByeByeFailed, error);
+							//SetTestStepResult(EFail); 							
+							continue;
+							}
+						TPtrC8 usn(paramSet->USN());
+						HBufC* usnVal = HBufC::NewLC(usn.Length());
+						usnVal->Des().Copy(usn);
+						TPtrC usnValPointer (usnVal->Des());
+
+						_LIT(KInfoBye,"ssdp:byebye notification received from %S \n");
+						INFO_PRINTF2(KInfoBye, &usnValPointer);
+						resultsCount++;
+						CleanupStack::PopAndDestroy(usnVal);						
+						}
+					}
+				break;
+				case EUPnPSubscribeResponseParamSet:
+					{
+					
+					CUPnPSubscribeResponseParamSet* paramSet  = NULL;
+					TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;					
+					for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+					{
+					paramSet = static_cast<CUPnPSubscribeResponseParamSet*> (paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ));
+						RBuf subscriptionUri16;
+						subscriptionUri16.Create(paramSet->Uri().Length());
+						subscriptionUri16.Copy(paramSet->Uri());
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							_LIT(KInfoSubscribeFailed, "Err: Failed to Subscribe.\n %S \n");
+							INFO_PRINTF2(KInfoSubscribeFailed,&subscriptionUri16);
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KErrSubscribe,"Failed to Subscribe with...Error Code  = %d \n");
+							ERR_PRINTF2(KErrSubscribe, error);
+							//SetTestStepResult(EFail); 
+							}
+						else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESubscriptionTimeout)
+							{
+							_LIT(KInfoSubscribeTimedOut, "Info: SubscribeTimed out \n %S \n");
+							INFO_PRINTF2(KInfoSubscribeTimedOut,&subscriptionUri16);
+							}
+						else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+							{
+							_LIT(KInfoSubscribeSuccess, "<font color=00ff00><b><u>Info: Subscribtion SUCCESS</u></b></font>\n %S \n");
+							INFO_PRINTF2(KInfoSubscribeSuccess,&subscriptionUri16);
+							}
+						subscriptionUri16.Close();				
+						}
+					}
+				break;
+				case EUPnPNotifyEventParamSet:
+					{//receives event notifications sent at client
+					
+					CUPnPNotifyEventParamSet* paramSet  = NULL;
+					TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;					
+					for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+					{
+					paramSet = static_cast<CUPnPNotifyEventParamSet*> (paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ));
+						RBuf subscriptionUri16;
+						subscriptionUri16.Create(paramSet->Uri().Length());
+						subscriptionUri16.Copy(paramSet->Uri());
+						if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+							{
+							_LIT(KInfoNotificationsFailed, "Err: Failed to Get Event notifications \n %S \n");
+							INFO_PRINTF2(KInfoNotificationsFailed,&subscriptionUri16);
+							TInt error = paramSet->UPnPEvent().iErrorCode;
+							_LIT(KNotificationsFailed,"Failed to Receive Notifications with...Error Code  = %d \n");
+							ERR_PRINTF2(KNotificationsFailed, error);
+							//SetTestStepResult(EFail); 
+							}
+						else if (paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+							{
+							_LIT(KInfoNotifications, "Notifications for subscribed Uri: %S \t is received \n");
+							INFO_PRINTF2(KInfoNotifications, &subscriptionUri16);
+							}
+						subscriptionUri16.Close();
+						}
+					}
+				break;
+				default:
+					{
+					//Do Nothing
+					}
+				break;
+				}
+			}
+		}
+	_LIT(KEndPrintStatement,"Done with printing results \n");
+	INFO_PRINTF1(KEndPrintStatement);
+	INFO_PRINTF1(KPrintDesign);
+	}
+
+/*
+  Constructor:
+*/
+CUPnPObserver::CUPnPObserver()
+	:iSequence(0),iResultsCount(0)
+	{
+	}
+
+/*
+  Destructor
+*/
+CUPnPObserver::~CUPnPObserver()
+	{
+	iFileServ.Close();
+	}
+
+
+/*
+	Static factory constructor. Uses two phase construction and leaves nothing on the
+	CleanupStack. Creates a CTestControlPointService object.
+	@param			aManager	A pointer to a CTestUPnPManager object.
+	@return			A pointer to the newly created CPnPObserver object.
+	@post			A fully constructed and initialized CPnPObserver object.
+ */
+CUPnPObserver* CUPnPObserver::NewL(CTestUPnPManager* aManager)
+	{
+	CUPnPObserver* self = new(ELeave) CUPnPObserver;
+	CleanupStack::PushL(self);
+	self->ConstructL(aManager);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+/*
+	Second phase of two-phase construction method. Does any allocations required to fully construct
+	the object.
+	@pre 		First phase of construction is complete.
+	@param		aManager	A pointer to a CTestUPnPManager object.
+	@post		The object is fully constructed and initialized.
+ */
+void CUPnPObserver::ConstructL(CTestUPnPManager* aManager)
+	{
+	iManager = aManager;
+	User::LeaveIfError(iFileServ.Connect());
+	}
+
+
+
+/*
+   This method returns a reference to the CTestUPnPManager object.
+   @param None
+   return a reference to the CTestUPnPManager object
+ */
+CTestUPnPManager& CUPnPObserver::Manager()
+	{
+	return *iManager;
+	}
+
+/*
+   This is called when callback hits. And this method stores the bundle results
+   and meta information related to that results into results array maintained by manager
+   for later verification.
+   @param  aParameterBundle a reference to CPnPParameterBundleBase
+   @return None
+ */
+void CUPnPObserver::OnPnPEventL ( RPnPParameterBundleBase& aParameterBundle)
+	{
+	_LIT(KInfoLogFile, "OnPnPEventL ().... \n");
+	Manager().INFO_PRINTF1(KInfoLogFile);
+	
+	CopyResultBundlesL(aParameterBundle);
+	RParameterFamily paramFamily = aParameterBundle.GetFamilyAtIndex(0);
+	TRAPD ( err, paramFamily.CheckOpenL () );
+
+	if( err == KErrNone)
+		{
+		switch ( paramFamily.Id() )
+			{
+			case EUPnPDiscoverResponseParamSet:
+				{				
+				CUPnPDiscoverResponseParamSet* paramSet  = NULL;				
+				_LIT(KDiscoverResponse,"Discover Response is: \n");
+				Manager().INFO_PRINTF1(KDiscoverResponse);
+				TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;
+				for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+				   {
+				   paramSet = static_cast<CUPnPDiscoverResponseParamSet*> ( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+					//Printig of Search target
+					TPtrC8 uriST(paramSet->Uri());
+					HBufC* stUri = HBufC::NewLC(uriST.Length());
+					stUri->Des().Copy(uriST);
+					TPtrC uriStPtr (stUri->Des());
+					_LIT(KInfoST,"<b>The SerachTarget given was <u>%S</u> </b>\n");
+					Manager().INFO_PRINTF2(KInfoST, &uriStPtr);
+					CleanupStack::PopAndDestroy(stUri);
+					
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EDiscoveryTimeout)
+						{
+						_LIT(KDiscoverTimeOut,"Discover Response TimeOut: TUPnPEvent::EDiscoveryTimeout \n");
+						Manager().INFO_PRINTF1(KDiscoverTimeOut);
+
+						_LIT(KInfoLogFile, "EUPnPDiscoverResponseParamSet TimeOut.... \n");
+						Manager().INFO_PRINTF1(KInfoLogFile);
+						_LIT(KDuplicateUri, "duplicateuri");
+						TBool duplicateUri = EFalse;
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KDuplicateUri,duplicateUri );
+						
+						if(duplicateUri)
+						{
+						
+						CActiveScheduler::Stop();	
+						_LIT(KInfoRetry, "Discovery Success with results.... \n");
+						Manager().INFO_PRINTF1(KInfoRetry);
+						Manager().SetDiscoveryStatus(ETrue);
+						return;
+						}
+						
+						//Found valid discovery  responses
+						if (Manager().iDeviceLocationArray.Count() > 0)
+							{
+							CActiveScheduler::Stop();
+							_LIT(KInfoRetry, "Discovery Success with results.... \n");
+							Manager().INFO_PRINTF1(KInfoRetry);
+							Manager().SetDiscoveryStatus(ETrue);
+							}
+						else if(Manager().IsDiscoverySuccess() && Manager().iFailedNumUris <= 1)
+							{
+							// Discovery Retry also Failured  
+							CActiveScheduler::Stop();
+							_LIT(KInfoFail, "Discovery Failed.... \n");
+							Manager().ERR_PRINTF1(KInfoFail);
+							//Manager().SetTestStepResult(EFail);
+							}
+						else if(Manager().iFailedNumUris >= 1 )
+							{
+							//Retrty Discovery only if and only if All Uri's Timedout 
+							Manager().iFailedNumUris--;
+							TInt failedUriCount = Manager().iFailedNumUris;
+							if ( failedUriCount == 0 )
+								{
+								CActiveScheduler::Stop();
+								}
+							_LIT(KInfoRetry, "<font color=00ff00><b><u>Waiting responses from  %d Uris</u></b></font> \n");
+							Manager().INFO_PRINTF2(KInfoRetry, Manager().iFailedNumUris );
+							}
+						return;
+						}
+					else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KDiscoverFail,"Discover Response Fail: TUPnPEvent::EFail Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KDiscoverFail, error);
+						CActiveScheduler::Stop();
+						//To eliminate the repetition of Discovery
+						Manager().SetDiscoveryStatus(ETrue);
+						_LIT(KInfoLogFile, "EUPnPDiscoverResponseParamSet EFail.... \n");
+						Manager().INFO_PRINTF1(KInfoLogFile);
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+						{
+						//opt for Abrupt close of CP
+						TBool abruptDiscoveryCloseCP = EFalse;
+						_LIT(KAbruptDiscoveryCloseCP,"abruptdiscoveryclosecp");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KAbruptDiscoveryCloseCP,abruptDiscoveryCloseCP );
+						if(abruptDiscoveryCloseCP)
+							{
+							//Closing Control point Abruptly
+							_LIT(KInfoSubScribe, "In Discovery Response \n");
+							_LIT(KInfoCloseCP, "Closing Control point Abruptly....\n");
+							Manager().INFO_PRINTF1(KInfoSubScribe);
+							Manager().INFO_PRINTF1(KInfoCloseCP);
+							CActiveScheduler::Stop();
+							Manager().CloseDiscoverer();
+							return;
+							}
+						//Printing of Loaction
+						TPtrC8 deviceLocation(paramSet->DeviceLocation());
+						HBufC* devloc = HBufC::NewLC(deviceLocation.Length()); //1
+						devloc->Des().Copy(deviceLocation);
+						TPtrC devLocPointer (devloc->Des());
+						_LIT(KInfoUri,"The Location: %S \n");
+						Manager().INFO_PRINTF2(KInfoUri, &devLocPointer);
+						 //Storing Device location to array
+						 Manager().AppendDeviceLocationL(deviceLocation);
+						TPtrC8 usn(paramSet->USN());
+						HBufC* usnVal = HBufC::NewLC(usn.Length()); //2
+						usnVal->Des().Copy(usn);
+						TPtrC usnValPointer (usnVal->Des());
+						_LIT(KInfoUSN,"The USN found is %S \n");
+						Manager().INFO_PRINTF2(KInfoUSN, &usnValPointer);
+
+						TInt expiryTime = paramSet->ExpiryTime();
+						_LIT(KInfoexpiryTime,"The Expiry Time is %d \n");
+						Manager().INFO_PRINTF2(KInfoexpiryTime, expiryTime);
+						CleanupStack::PopAndDestroy(usnVal);
+						CleanupStack::PopAndDestroy(devloc);				
+
+						//Cancel discovery
+						TBool cancelDiscovery= EFalse;
+						_LIT(KCancelDiscover, "canceldiscover");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KCancelDiscover,cancelDiscovery);
+						//Eliminate multiple Cancel Discovery 
+						//To not to execute Activescheduler::stop many times
+						if (cancelDiscovery && !Manager().iCancelDiscovery)
+							{
+							TPtrC referSection;
+							_LIT(KReferSection,"refersection");
+							Manager().GetStringFromConfig(Manager().GetCurrentSection(),KReferSection,referSection );
+
+							_LIT(KInfoCancelDiscovery,"Cancel Discovery is executed \n");
+							Manager().INFO_PRINTF1(KInfoCancelDiscovery);
+							Manager().CancelDiscoverL(referSection);
+							//To eliminate the repetition of Discovery
+							Manager().SetDiscoveryStatus(ETrue);
+							}
+							_LIT(KInfoLogFile, "EUPnPDiscoverResponseParamSet Success.... \n");
+							Manager().INFO_PRINTF1(KInfoLogFile);
+						}
+					}
+				}
+			break;
+			case EUPnPPresenceAnnouncementParamSet:
+				{
+				CUPnPPresenceAnnouncementParamSet* paramSet  = NULL;				
+				TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;
+				for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+				  {			
+				  paramSet = static_cast<CUPnPPresenceAnnouncementParamSet*> ( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+					//Printig of Search target
+					TPtrC8 uriST(paramSet->Uri());
+					HBufC* stUri = HBufC::NewLC(uriST.Length());
+					stUri->Des().Copy(uriST);
+					TPtrC uriStPtr (stUri->Des());
+					_LIT(KInfoST,"<b>The RegisterNotify URI was:  <u>%S</u> </b>\n");
+					Manager().INFO_PRINTF2(KInfoST, &uriStPtr);
+					CleanupStack::PopAndDestroy(stUri);
+					
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KRegisterNotifyFail,"Resgitser Notify Failed: TUPnPEvent::EFail Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KRegisterNotifyFail,error);
+						CActiveScheduler::Stop();
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					TPtrC8 serviceLocation(paramSet->ServiceLocation());
+					HBufC* servloc = HBufC::NewLC(serviceLocation.Length()); //1
+					servloc->Des().Copy(serviceLocation);
+					TPtrC servlocPointer (servloc->Des());
+					TInt duration = paramSet->Duration();
+					_LIT(KInfoAlive,"<font color=1f6633><b>ssdp:alive notification got from %S AND Duration is %d </b></font>\n");
+					iManager->INFO_PRINTF3(KInfoAlive, &servlocPointer, &duration);
+					CleanupStack::PopAndDestroy(servloc);					
+					iResultsCount++;
+					}
+				_LIT(KInfoLogFile, "EUPnPPresenceAnnouncementParamSet.... \n");
+				Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+
+			case EUPnPAbsenceAnnouncementParamSet:
+				{				
+				CUPnPAbsenceAnnouncementParamSet* paramSet  = NULL;				
+				TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;
+					
+				for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+				   {		
+				   paramSet = static_cast<CUPnPAbsenceAnnouncementParamSet*> ( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+					//Printig of Search target
+					TPtrC8 uriST(paramSet->Uri());
+					HBufC* stUri = HBufC::NewLC(uriST.Length());
+					stUri->Des().Copy(uriST);
+					TPtrC uriStPtr (stUri->Des());
+					_LIT(KInfoST,"<b>The RegisterNotify URI was:  <u>%S</u> </b>\n");
+					Manager().INFO_PRINTF2(KInfoST, &uriStPtr);
+					CleanupStack::PopAndDestroy(stUri);
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KRegisterNotifyByeByeFail,"Resgitser Notify ByeBye Failed: TUPnPEvent::EFail Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KRegisterNotifyByeByeFail, error);
+						CActiveScheduler::Stop();
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					TPtrC8 usn(paramSet->USN());
+					HBufC* usnvalue = HBufC::NewLC(usn.Length());	//1
+					usnvalue->Des().Copy(usn);
+					TPtrC usnPointer (usnvalue->Des());
+					_LIT(KInfoBye,"<font color=33121f><b>ssdp:byebye notification received from %S </b></font>\n");
+					iManager->INFO_PRINTF2(KInfoBye, &usnPointer);
+					CleanupStack::PopAndDestroy(usnvalue);					
+					}
+					_LIT(KInfoLogFile, "EUPnPAbsenceAnnouncementParamSet.... \n");
+					Manager().INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+
+			case EUPnPPublishResponseParamSet:
+				{
+				TBool flag=EFalse;
+				_LIT(KStopScheduler,"stopscheduler");
+				TInt responseCount = 0;
+				CUPnPPublishResponseParamSet* paramSet  = NULL;
+				Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KStopScheduler,flag);
+				_LIT(KExpectedPublishEesponseCount,"expectedpublishresponsecount");
+				Manager().GetIntFromConfig(Manager().GetCurrentSection(),KExpectedPublishEesponseCount,responseCount);
+				TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;
+					
+				for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+				   {
+				   paramSet = static_cast<CUPnPPublishResponseParamSet*> ( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+					Manager().iPublishCount--;
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+						{
+						TBool sendNotify= EFalse;
+						TInt notifyCount(0);
+						_LIT(KInfoPublish, "Info: Succesfully Published a Device/Service.");
+						Manager().INFO_PRINTF1(KInfoPublish);
+						_LIT(KSendNotify,"sendnotifications");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KSendNotify,sendNotify);
+
+						if(sendNotify)
+							{
+							RBuf16 descriptionBaseUri;
+							descriptionBaseUri.Create(paramSet->Uri().Length());
+							descriptionBaseUri.Copy(paramSet->Uri());
+							_LIT(KInfoSendNotify, "Info: Calling Send Notify on Uri %S \n");
+							Manager().INFO_PRINTF2(KInfoSendNotify, &descriptionBaseUri);
+							descriptionBaseUri.Close();
+							Manager().SendNotificationsL(this);
+							}
+						_LIT(KExpctedNotifications,"expectednotifications");
+						Manager().GetIntFromConfig(Manager().GetCurrentSection(),KExpctedNotifications,notifyCount);
+						TInt publishCount = Manager().iPublishCount;
+						if(flag && notifyCount == Manager().NotifyCount()&& publishCount <= 0 )
+							{
+							_LIT(KInfoLogFile, "EUPnPPublishResponseParamSet Success....And Stopping Active Scheduler after %d Publishes \n");
+							Manager().INFO_PRINTF2(KInfoLogFile, publishCount );
+							CActiveScheduler::Stop();
+							}
+						}
+					else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KErrPublish,"Failed to Published a Device/Service...Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KErrPublish, error);
+						CActiveScheduler::Stop();
+						_LIT(KInfoLogFile, "EUPnPPublishResponseParamSet Fail.... \n");
+						Manager().INFO_PRINTF1(KInfoLogFile);
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					}
+				}
+			break;
+
+			case EUPnPDescribeResponseParamSet:
+				{
+				//abruptdescribeclosecp
+				//opt for Abrupt close of CP
+				TBool abruptDiscribeCloseCP = EFalse;
+				_LIT(KAbruptDiscribeCloseCP,"abruptdescribeclosecp");
+				Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KAbruptDiscribeCloseCP,abruptDiscribeCloseCP );
+				if(abruptDiscribeCloseCP)
+					{
+					//Closing Control point Abruptly
+					_LIT(KInfoSubScribe, "In Describe Response \n");
+					_LIT(KInfoCloseCP, "Closing Control point Abruptly.... \n");
+					Manager().INFO_PRINTF1(KInfoSubScribe);
+					Manager().INFO_PRINTF1(KInfoCloseCP);
+					CActiveScheduler::Stop();
+					Manager().CloseDiscoverer();
+					return;
+					}
+				
+				
+				CUPnPDescribeResponseParamSet* paramSet  = NULL;
+				TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;
+					
+				for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+				   {
+					//Only one response expected for Describe and no iter increment is required
+					//Paramset at current position			
+				   paramSet = static_cast<CUPnPDescribeResponseParamSet*> ( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+					RBuf8 descriptionBuf;
+					RBuf8 descriptionBaseUri;
+					descriptionBaseUri.Create(paramSet->Uri());
+					descriptionBuf.Create(paramSet->Description());
+
+					RBuf description16;
+					description16.Create(descriptionBuf.Length());
+					description16.Copy(descriptionBuf);
+
+					RBuf descriptionUri16;
+					descriptionUri16.Create(descriptionBaseUri.Length());
+					descriptionUri16.Copy(descriptionBaseUri);
+
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KDescribeFail,"Describe Response Fail: TUPnPEvent::EFail...Error Code is = %d \n");
+						Manager().ERR_PRINTF2(KDescribeFail, error);
+						_LIT(KDescriptionUri,"Description Uri is  %S \n");
+						Manager().ERR_PRINTF1(KDescribeFail);
+						Manager().INFO_PRINTF2(KDescriptionUri, &descriptionUri16  );
+						_LIT(KInfoLogFile, "EUPnPDescribeResponseParamSet Fail.... \n");
+						Manager().INFO_PRINTF1(KInfoLogFile);
+						CActiveScheduler::Stop();
+						descriptionBuf.Close();
+						descriptionBaseUri.Close();
+						description16.Close();
+						descriptionUri16.Close();
+						//Manager().SetTestStepResult(EFail);
+						return;
+						}
+					Manager().AppendDescriptionL(descriptionBaseUri, descriptionBuf);
+					TFileName filename;
+					filename.Format(KDefaultFileFormat, 'C');
+					TBuf<KMaxBufLength> filenameBuffer(filename);
+					//get scriptName
+					filenameBuffer.Append(Manager().ScriptFileName());
+					_LIT(KUnderScore, "_");
+					filenameBuffer.Append(KUnderScore);
+					filenameBuffer.AppendNumFixedWidth(iSequence,EDecimal, 4);
+					iSequence++;
+					filenameBuffer.Append(KDefaultExtension);
+					RFile file;
+					TInt err=file.Replace(iFileServ,filenameBuffer,EFileRead|EFileWrite|EFileShareAny);
+					if (err == KErrNone)
+						{
+						TInt writeErr= file.Write(descriptionBuf);
+						if(writeErr != KErrNone )
+							{
+							_LIT(KErrWrite,"Unable to Write the description to the File \n");
+							Manager().ERR_PRINTF1(KErrWrite);
+							}
+						_LIT(KDescriptionUri,"Description Uri is  %S \n");
+						_LIT(KInfoDescribe,"content is  %S \n");
+						Manager().INFO_PRINTF2(KDescriptionUri, &descriptionUri16  );
+						Manager().INFO_PRINTF2(KInfoDescribe, &description16);
+						Manager().iDescribeResponseCount++;
+						}
+					descriptionBuf.Close();
+					descriptionBaseUri.Close();
+					description16.Close();
+					descriptionUri16.Close();
+					file.Close();
+					iResultsCount++;
+					}
+				TBool cancelAll = EFalse;
+				Manager().GetBoolFromConfig(Manager().GetCurrentSection(), KCancelAll, cancelAll );
+				TBool cancelAllService = EFalse;
+				Manager().GetBoolFromConfig(Manager().GetCurrentSection(), KCancelAllService, cancelAllService );
+				TInt descCount = 1;
+				Manager().GetIntFromConfig(Manager().GetCurrentSection(), KExpctedDescriptions, descCount );
+
+				if(Manager().iDescribeResponseCount >= descCount )// Modify this later
+					{
+					if(cancelAll)
+						{
+						Manager().CancelAllDeviceDescribeL();
+						return;
+						}
+					else if(cancelAllService)
+						{
+						Manager().CancelAllServiceDescribeL();
+						return;
+					}
+					else
+					{
+					CActiveScheduler::Stop();
+					_LIT(KInfoLogFile, "EUPnPDescribeResponseParamSet.... \n");
+					Manager().INFO_PRINTF1(KInfoLogFile);
+					return;
+					}
+				}
+				}
+			break;
+			case EUPnPSubscribeResponseParamSet:
+				{
+				
+				CUPnPSubscribeResponseParamSet* paramSet  = NULL;
+				TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;					
+				for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+				   {
+				   paramSet = static_cast<CUPnPSubscribeResponseParamSet*> ( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+					//Paramset at current position					
+					RBuf subscriptionUri16;
+					subscriptionUri16.Create(paramSet->Uri().Length());
+					subscriptionUri16.Copy(paramSet->Uri());
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						_LIT(KInfoSubscribeFailed, "Info: Failed to Subscribe.\n %S \n");
+						Manager().INFO_PRINTF2(KInfoSubscribeFailed,&subscriptionUri16);
+						subscriptionUri16.Close();
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KSubscribeFailed,"Failed to Subscribe with...Error Code  = %d \n");
+						Manager().ERR_PRINTF2(KSubscribeFailed, error);
+						CActiveScheduler::Stop();
+						_LIT(KInfoLogFile, "EUPnPSubscribeResponseParamSet Fail.... \n");
+						Manager().INFO_PRINTF1(KInfoLogFile);
+						//Manager().SetTestStepResult(EFail); 
+						return;
+						}
+					else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESubscriptionTimeout)
+						{
+						_LIT(KInfoSubscribeTimeOut, "Info: Subscription about to expire\n %S \n");
+						Manager().INFO_PRINTF2(KInfoSubscribeTimeOut, &subscriptionUri16);
+						subscriptionUri16.Close();
+						_LIT(KInfoSubscribeTimeOut3, "subscription uri deleted\n");
+						Manager().INFO_PRINTF1(KInfoSubscribeTimeOut3);
+						
+						//Implementation of Resubscribe is here
+						TBool renewFlag = EFalse;
+						_LIT(KRenewFlag,"renewflag");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KRenewFlag,renewFlag );
+						
+						_LIT(KInfoSubscribeTimeOut1, "renew flag value %d renew count   %d  \n");
+						Manager().INFO_PRINTF3(KInfoSubscribeTimeOut1, renewFlag,Manager().iRenewCount);
+
+						RDebug::Print( _L( "checked ini to subscribe or resubscribe" ));
+
+						if( renewFlag && Manager().iRenewCount == 0)
+							{//go to renew here only once
+							RDebug::Print( _L( "Go to renew here - Stopping Scheduler" ));
+							subscriptionUri16.Close();//cleanup activity
+							CActiveScheduler::Stop();//this is for start made in prev subscribe
+							_LIT(KInfoLogFile, "EUPnPSubscribeResponseParamSet Timeout1.... \n");
+							Manager().INFO_PRINTF1(KInfoLogFile);
+							Manager().iRenewCount++;
+							//renew subscriptions
+							_LIT(KInfoSubscribeTimeOut2, "renew count %d \n");
+							Manager().INFO_PRINTF2(KInfoSubscribeTimeOut2,Manager().iRenewCount);
+							_LIT(KInfoReSubscribe, "Request to RESUBSCRIPTION is Executed\n");
+							Manager().INFO_PRINTF1(KInfoReSubscribe);
+							Manager().SubscribeForStateChangeNotificationsL();
+							return;
+							}
+						else
+							{
+							//Unsubscribe before closing
+							RDebug::Print( _L( "Unsubscribe before closing" ));
+							_LIT(KInfoUnSubscribe, "Request to UNSUBSCRIPTION is Executed As Subscription TIMED OUT \n");
+							Manager().INFO_PRINTF1(KInfoUnSubscribe);
+							TPtrC referSection;
+							_LIT(KReferSection,"refersection");
+							Manager().GetStringFromConfig(Manager().GetCurrentSection(),KReferSection,referSection );
+							RDebug::Print( _L( "Before calling UnsubscribeForStateChangeNotificationsL" ));
+							Manager().UnsubscribeForStateChangeNotificationsL(referSection);
+							RDebug::Print( _L( "After calling UnsubscribeForStateChangeNotificationsL" ));
+							subscriptionUri16.Close();//cleanup activity
+							CActiveScheduler::Stop();
+							_LIT(KInfoLogFile, "EUPnPSubscribeResponseParamSet Timeout2.... \n");
+							Manager().INFO_PRINTF1(KInfoLogFile);
+							return;
+							}
+						}
+					else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+						{
+						_LIT(KInfoSubscribeSuccess, "Info: SUBSCRIPTION REQUEST IS ACCEPTED FOR SUBSCRIPTION\n %S \n");
+						Manager().INFO_PRINTF2(KInfoSubscribeSuccess, &subscriptionUri16);
+						
+						//opt for Abrupt close of CP
+						TBool abruptCloseCP = EFalse;
+						_LIT(KAbruptCloseCP,"abruptclosecp");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KAbruptCloseCP,abruptCloseCP );
+						if(abruptCloseCP)
+							{
+							//Closing Control point Abruptly
+							_LIT(KInfoSubScribe, "In Subscribe Response \n");
+							_LIT(KInfoCloseCP, "Closing Control point Abruptly.... \n");
+							Manager().INFO_PRINTF1(KInfoSubScribe);
+							Manager().INFO_PRINTF1(KInfoCloseCP);
+							CActiveScheduler::Stop();
+							Manager().CloseDiscoverer();
+							return;
+							}
+						//Opt for Unsubscribe
+						TBool unSubscribeFlag = EFalse;
+						_LIT(KUnsubscribeFlag,"unsubscribeflag");
+						Manager().GetBoolFromConfig(Manager().GetCurrentSection(),KUnsubscribeFlag,unSubscribeFlag );
+						if ( Manager().iRenewCount > 0 )
+							{
+							TPtrC referSection;
+							_LIT(KReferSection,"refersection");
+							Manager().GetStringFromConfig(Manager().GetCurrentSection(),KReferSection,referSection );
+							Manager().GetBoolFromConfig(referSection,KUnsubscribeFlag,unSubscribeFlag );
+							if ( unSubscribeFlag )	
+								{
+								_LIT(KInfoUnSubscribe, "Request to UNSUBSCRIPTION is Executed After Renew Subscription Success\n  \n");
+								Manager().INFO_PRINTF1(KInfoUnSubscribe);
+								}
+							}
+						if(unSubscribeFlag)
+							{//go to unsubscribe here
+							_LIT(KInfoUnSubscribe, "Request to UNSUBSCRIPTION is Executed Before Subscription Expiry\n  \n");
+							Manager().INFO_PRINTF1(KInfoUnSubscribe);
+							TPtrC referSection;
+							_LIT(KReferSection,"refersection");
+							Manager().GetStringFromConfig(Manager().GetCurrentSection(),KReferSection,referSection );
+							//Unsubscribe
+							Manager().UnsubscribeForStateChangeNotificationsL(referSection);
+							subscriptionUri16.Close();//cleanup activity
+							CActiveScheduler::Stop();//this is for start made in prev subscribe
+							_LIT(KInfoLogFile, "EUPnPSubscribeResponseParamSet Success.... \n");
+							Manager().INFO_PRINTF1(KInfoLogFile);
+							return;
+							}
+						else
+							{
+							
+							RDebug::Print( _L("Not going to unsubscribe,waiting for timeout Notifications"));
+							}
+				
+						}
+					}
+				}
+			break;
+			case EUPnPNotifyEventParamSet:
+				{//receives event notifications sent at client
+				_LIT(KInfoLogFile, "EUPnPNotifyEventParamSet.... \n");
+				Manager().INFO_PRINTF1(KInfoLogFile);
+				
+				
+				CUPnPNotifyEventParamSet* paramSet  = NULL;
+				TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;
+					
+				for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+				   {
+				   paramSet = static_cast<CUPnPNotifyEventParamSet*> ( paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ) );
+					//Paramset at current position
+					
+					RBuf subscriptionUri16;
+					subscriptionUri16.Create(paramSet->Uri().Length());
+					subscriptionUri16.Copy(paramSet->Uri());
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{						
+						_LIT(KInfoNotificationsFailed, "Info: Failed to Get Event notifications\n %S \n");
+						Manager().INFO_PRINTF2(KInfoNotificationsFailed,&subscriptionUri16);
+						subscriptionUri16.Close();
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KNotificationsFailed,"Failed to Receive Notifications with...Error Code  = %d \n");
+						Manager().ERR_PRINTF2(KNotificationsFailed, error);
+						//Manager().SetTestStepResult(EFail);
+						return;
+						}
+					else if (paramSet->UPnPEvent().iStatus == TUPnPEvent::ESuccess)
+						{
+						_LIT(KInfoNotifications, "Notifications for subscribed Uri: %S \t is received \n");
+						Manager().INFO_PRINTF2(KInfoNotifications, &subscriptionUri16);
+						subscriptionUri16.Close();//cleanup activity
+						}
+					}
+				_LIT(KInfoLogFile1, "EUPnPNotifyEventParamSet End.... \n");
+				Manager().INFO_PRINTF1(KInfoLogFile1);
+				}
+			break;
+			default:
+				{
+				//Do Nothing
+				}
+			break;
+			}
+		}
+	}
+
+/*
+   Error handling,asynchronous one.
+   @param  aError Error Code
+   @return None
+ */
+void CUPnPObserver::OnPnPError(TInt aError)
+	{
+	_LIT(KPositiveCase,"positivecase");
+	TBool positiveCase = ETrue;
+	Manager().GetBoolFromConfig(Manager().GetCurrentSection(), KPositiveCase, positiveCase);
+	// Note down the error and stop scheduler
+	//If not postive case, client.dll will come back before active scheduler start
+	//so, don't execute activescheduler::stop
+	if (positiveCase)
+		{
+		CActiveScheduler::Stop();
+		}
+	_LIT(KErrorMessage, "Error occurred in the UPnP Observer : %d \n");
+	Manager().ERR_PRINTF2(KErrorMessage, aError);
+	//Manager().SetTestStepResult(EFail);
+	}
+
+/*
+   This function copies result bundles into results array, which inturn is used in printing results
+   @param  aPnpBundle a reference to CPnPParameterBundleBase
+   @return None
+ */
+void CUPnPObserver::CopyResultBundlesL(const RPnPParameterBundleBase& aPnpBundle)
+	{
+	_LIT(KInfoLogFile, "CUPnPObserver::CopyResultBundlesL().... \n");
+	Manager().INFO_PRINTF1(KInfoLogFile);
+	
+	HBufC8* holdBundle = HBufC8::NewLC(aPnpBundle.Length());
+
+	if (!holdBundle)
+        {
+        User::Leave(KErrNoMemory);
+        }
+
+    TPtr8 storePtr(holdBundle->Des());
+	TInt retOnStore = aPnpBundle.Store(storePtr);
+	User::LeaveIfError(retOnStore);
+
+	TPtrC8 loadPtr(holdBundle->Des());
+	RPnPParameterBundleBase newPnpBundle;
+	newPnpBundle.CreateL();
+	TInt retOnLoad = newPnpBundle.Load(loadPtr);
+	User::LeaveIfError(retOnLoad);
+	CleanupStack::PushL( &newPnpBundle);
+	Manager().AppendBundlesL(newPnpBundle);
+	CleanupStack::Pop(&newPnpBundle);
+	CleanupStack::PopAndDestroy(holdBundle);
+	_LIT(KInfoLogFile1, "CUPnPObserver::CopyResultBundlesL() End.... \n");
+	Manager().INFO_PRINTF1(KInfoLogFile1);
+	}
+
+/*
+   This function Prints Discovery results by getting it from Results bundle
+   @param  aParamFamily a pointer to CUPnPParameterFamily
+   @return None
+ */
+void CTestUPnPManager::PrintDiscoveryResultsL(RParameterFamily& aParamFamily)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::PrintDiscoveryResultsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+
+	_LIT(KPrintStatement, "printing results \n");
+	_LIT(KPrintDesign,"	\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \n");
+
+	INFO_PRINTF1(KPrintStatement);
+	INFO_PRINTF1(KPrintDesign);
+	
+	TUint count = aParamFamily.CountParameterSets ( RParameterFamily::ERequested ) ;
+	CUPnPDiscoverResponseParamSet* paramSet  = NULL;
+	
+	for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+		{
+		paramSet = static_cast<CUPnPDiscoverResponseParamSet*>(aParamFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ));
+		
+		if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+			{
+			TInt error = paramSet->UPnPEvent().iErrorCode;
+			_LIT(KDiscoverFailed,"Failed to Discover with...Error Code  = %d \n");
+			ERR_PRINTF2(KDiscoverFailed, error);		
+			continue;
+			}
+		else if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EDiscoveryTimeout)
+			{
+			_LIT(KDiscoverTimeOut,"Discover Response TimeOut: TUPnPEvent::EDiscoveryTimeout \n");
+			INFO_PRINTF1(KDiscoverTimeOut);			
+			continue;
+			}
+		TPtrC8 deviceLocation(paramSet->DeviceLocation());
+		HBufC* devloc = HBufC::NewLC(deviceLocation.Length());	//1
+		devloc->Des().Copy(deviceLocation);
+		TPtrC devLocPointer (devloc->Des());
+		_LIT(KInfoUri,"The Location: %S \n");
+		INFO_PRINTF2(KInfoUri, &devLocPointer);
+
+		TPtrC8 usn(paramSet->USN());
+		HBufC* usnVal = HBufC::NewLC(usn.Length());	//2
+		usnVal->Des().Copy(usn);
+		TPtrC usnValPointer (usnVal->Des());
+		_LIT(KInfoUSN,"The USN found is %S \n");
+		INFO_PRINTF2(KInfoUSN, &usnValPointer);
+
+		TInt expiryTime = paramSet->ExpiryTime();
+		_LIT(KInfoexpiryTime,"The Expiry Time or CACHE-CONTROL: max-age =  %d \n");
+		INFO_PRINTF2(KInfoexpiryTime, expiryTime);
+
+		CleanupStack::PopAndDestroy(usnVal);
+		CleanupStack::PopAndDestroy(devloc);		
+		continue;
+		}
+	_LIT(KEndPrintStatement,"Done with printing results \n");
+	INFO_PRINTF1(KEndPrintStatement);
+	INFO_PRINTF1(KPrintDesign);
+	}
+
+void CTestUPnPManager::ValidateDiscoveryResultsL(const TDesC& aOperationType)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::ValidateDiscoveryResultsL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt DeviceLocationCount = NULL;
+	TPtrC ExpectedURL;
+	GetStringFromConfig(aOperationType, KExpectedURL, ExpectedURL);
+
+	TInt totalCount(0);
+	GetIntFromConfig(aOperationType, KExpectedCount, totalCount);
+	const TInt bundleCount = iResultsArray.Count();
+
+	for(TInt i(0); i < bundleCount; i++)
+		{
+		RParameterFamily paramFamily = iResultsArray[i].GetFamilyAtIndex(0);
+		if( !paramFamily.IsNull() )
+			{
+	 		if(paramFamily.Id() ==EUPnPDiscoverResponseParamSet)
+				{
+				
+				CUPnPDiscoverResponseParamSet* paramSet  = NULL;
+			
+				TUint count = paramFamily.CountParameterSets ( RParameterFamily::ERequested ) ;
+				
+				for ( TInt paramIndex = count - 1; paramIndex >= 0; paramIndex-- )
+					{
+					paramSet = static_cast<CUPnPDiscoverResponseParamSet*>(paramFamily.GetParameterSetAtIndex ( paramIndex, RParameterFamily::ERequested ));
+										
+					if(paramSet->UPnPEvent().iStatus == TUPnPEvent::EFail)
+						{
+						TInt error = paramSet->UPnPEvent().iErrorCode;
+						_LIT(KDiscoverFailed,"Failed to Discover with...Error Code  = %d \n");
+						ERR_PRINTF2(KDiscoverFailed, error);						
+						continue;
+						}
+					TPtrC8 deviceLocation(paramSet->DeviceLocation());
+					HBufC* devloc = HBufC::NewLC(deviceLocation.Length());
+					devloc->Des().Copy(deviceLocation);
+					TPtrC devLocPointer (devloc->Des());
+					DeviceLocationCount++;
+					if((ExpectedURL!=KNullDesC) && (ExpectedURL.Compare(devLocPointer) == KErrNone))
+						{
+						SetTestStepResult(EPass);
+						}
+					CleanupStack::PopAndDestroy(devloc);					
+					continue;
+					}
+				}
+			}
+		}
+	if((DeviceLocationCount != NULL) &&(DeviceLocationCount == totalCount))
+		{
+		SetTestStepResult(EPass);
+		}
+	_LIT(KInfoLogFile1, "CTestUPnPManager::ValidateDiscoveryResultsL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::CancelPublish()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::CancelPublish() Begin....  \n");
+	INFO_PRINTF1(KInfoLogFile);
+	TInt count = iPublisherArray.Count();
+	for(TInt i(count - 1); i >= 0 ; i--)
+		{
+		TPublisherControl publisherType = PublisherType(i);
+		_LIT(KInfoCancelLog, "CTestUPnPManager::CancelPublish()...Closing Publisher....  %d\n");
+		INFO_PRINTF2(KInfoCancelLog,i);
+		switch(publisherType)
+			{
+			case KService:
+				{
+				_LIT(KInfoService, "Closing Publisher.... of Type---->SERVICE\n");
+				INFO_PRINTF1(KInfoService);
+				break;
+				}
+			case KDevice:
+				{
+				_LIT(KInfoDevice, "Closing Publisher.... of Type---->DEVICE\n");
+				INFO_PRINTF1(KInfoDevice);
+				break;
+				}
+			default :
+				{
+				_LIT(KInfoErr, "Closing Publisher.... of Type---->InValid\n");
+				ERR_PRINTF1(KInfoErr);
+				break;
+				}
+			}
+		iPublisherArray[i].Close();
+		}
+	_LIT(KInfoLogFile2, "CancelPublish() Array Closed.... \n");
+	INFO_PRINTF1(KInfoLogFile2);
+	iPublisherArray.Close();
+	_LIT(KInfoLogFile3, "CTestUPnPManager::CancelPublish() End.... \n");
+	INFO_PRINTF1(KInfoLogFile3);
+	}
+
+void CTestUPnPManager::DescribeServiceL()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::DescribeServiceL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	ResolveAllUrisL();
+	TInt scpdUriCount = iScpdUriArray.Count();
+	//__ASSERT_DEBUG ( scpdUriCount > 0, User::Panic (KDescribeTestPanicCategory,KErrNoDescriptionPath ) );
+	if ( scpdUriCount==0 )
+		{
+		_LIT(KDescription,"Description Cannot be performed \n");
+		INFO_PRINTF1(KDescription);
+		//SetTestStepResult(EFail);
+		return;
+		}
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );	
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPDescribeRequestParamSet);
+
+	// Read the ScpdUrl from ScpdUri Array
+	//Make sure that Before this Describe Device, and Discovery is executes Succesfully.
+	for(TInt index(0); index < scpdUriCount ; index++)//scpdUriCount
+		{
+		CUPnPDescribeRequestParamSet* describeParamSet = CUPnPDescribeRequestParamSet::NewL (pnpFamily );
+		describeParamSet->SetUriL(iScpdUriArray[index]);	
+		RBuf scpdUri16;
+		scpdUri16.Create(iScpdUriArray[index].Length());
+		scpdUri16.Copy(iScpdUriArray[index]);
+		_LIT(KScpdUriInfo,"SCPD Uri Submitted for Description Request is: %S \n");
+		INFO_PRINTF2(KScpdUriInfo, &scpdUri16);
+		scpdUri16.Close();
+		}
+	iControlPoint.Describe( pnpBundle );
+	CActiveScheduler::Start();
+	_LIT(KInfoLogFile1, "CTestUPnPManager::DescribeServiceL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	}
+	
+void CTestUPnPManager::DescribeIconL()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::DescribeIconL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	ResolveAllUrisL();
+	TInt uriCount = iIconUriArray.Count();
+	if ( uriCount==0 )
+		{
+		_LIT(KIconDescription,"Description Cannot be performed \n");
+		INFO_PRINTF1(KIconDescription);		
+		return;
+		}
+	
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+	
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPDescribeRequestParamSet);
+	
+	//Make sure that Before this Describe Device, and Discovery is executes Succesfully.
+	for(TInt index(0); index < uriCount ; index++)
+		{
+		CUPnPDescribeRequestParamSet* describeParamSet = CUPnPDescribeRequestParamSet::NewL (pnpFamily );
+		describeParamSet->SetUriL(iIconUriArray[index]);
+		RBuf uri16;
+		uri16.Create(iIconUriArray[index].Length());
+		uri16.Copy(iIconUriArray[index]);
+		_LIT(KScpdUriInfo,"SCPD Uri Submitted for Description Request is: %S \n");
+		INFO_PRINTF2(KScpdUriInfo, &uri16);
+		uri16.Close();
+		}
+	iControlPoint.Describe(pnpBundle );
+	CActiveScheduler::Start();
+	_LIT(KInfoLogFile1, "CTestUPnPManager::DescribeServiceL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	}
+ 
+void CTestUPnPManager::DescribeL()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::DescribeL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPObserver* upnpObserver = CUPnPObserver::NewL(this);
+	CleanupStack::PushL( upnpObserver );
+	
+	RPnPParameterBundle pnpBundle;
+	pnpBundle.CreateL ();
+	CleanupClosePushL( pnpBundle );
+	pnpBundle.SetPnPObserver((MPnPObserver*)upnpObserver);
+	
+	RParameterFamily pnpFamily = pnpBundle.CreateFamilyL (EUPnPDescribeRequestParamSet);	
+	RBuf8 descriptionPathBuf;
+
+	TBool readIni = ETrue;
+	GetBoolFromConfig(GetCurrentSection(), KReadIni, readIni);
+	if(readIni)
+		{
+		// Get the Description path from .ini File
+		TPtrC descriptionPath;
+		GetStringFromConfig(GetCurrentSection(), KDescriptionPath, descriptionPath);
+		CUPnPDescribeRequestParamSet* describeParamSet = CUPnPDescribeRequestParamSet::NewL (pnpFamily );	
+		descriptionPathBuf.Create(descriptionPath.Length());
+		descriptionPathBuf.Copy(descriptionPath);
+		describeParamSet->SetUriL(descriptionPathBuf);	
+		descriptionPathBuf.Close();
+		iControlPoint.Describe( pnpBundle );
+		TBool SchedulerStatus = ETrue;
+		_LIT(KSchedulerStatus, "schedulerstart");
+		GetBoolFromConfig(GetCurrentSection(), KSchedulerStatus, SchedulerStatus);
+		if(SchedulerStatus)
+			{
+			CActiveScheduler::Start();
+			}
+		}
+	else
+		{
+		// Read the Description path from DevLoaction array
+		//Make sure that Before this Describe, Successful Discovery is happend.
+		TInt DevLocCount = iDeviceLocationArray.Count();
+		if ( DevLocCount==0 )
+			{
+			_LIT(KDescription,"Description Cannot be performed as NO Uri available to Describe\n");
+			INFO_PRINTF1(KDescription);
+			CleanupStack::PopAndDestroy( &pnpBundle );
+			CleanupStack::PopAndDestroy( upnpObserver );
+			//SetTestStepResult(EFail);
+			return;
+			}
+
+		//__ASSERT_DEBUG ( DevLocCount > 0, User::Panic (KDescribeTestPanicCategory,KErrNoDescriptionPath ) );
+
+		for(TInt iter(0); iter < DevLocCount  ; iter++)
+			{
+			TBuf8<256> url;
+			TUriParser8 uri;
+			uri.Parse(iDeviceLocationArray[iter]);
+			const TDesC8& scheme = uri.Extract(EUriScheme);
+			_LIT8(KScheme, "http");
+			//Uri must be of scheme "http" only
+			if (scheme.CompareF(KScheme) == 0)
+				{
+				url.Copy(iDeviceLocationArray[iter]);
+				CUPnPDescribeRequestParamSet* describeParamSet = CUPnPDescribeRequestParamSet::NewL ( pnpFamily );
+				describeParamSet->SetUriL(url);	
+				}
+			else
+				{
+				_LIT(KInavlidUri, "Describe Request for InvalidURi");
+				INFO_PRINTF1(KInavlidUri);
+				return;
+				}
+			}
+			
+		iControlPoint.Describe(pnpBundle );
+		TBool SchedulerStatus = ETrue;
+		_LIT(KSchedulerStatus, "schedulerstart");
+		GetBoolFromConfig(GetCurrentSection(), KSchedulerStatus, SchedulerStatus);
+		if(SchedulerStatus)
+			{
+			CActiveScheduler::Start();
+			}
+		}
+	_LIT(KInfoLogFile1, "CTestUPnPManager::DescribeL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	CleanupStack::PopAndDestroy( &pnpBundle );
+	CleanupStack::PopAndDestroy( upnpObserver );
+	}
+
+void CTestUPnPManager::ResolveAllUrisL()
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::ResolveAllUrisL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TInt count = iDescriptionSuiteArray.Count();
+	//__ASSERT_DEBUG ( count > 0, User::Panic (KDescribeTestPanicCategory, KErrNoServiceUris ) );
+	if( count <=0 )
+		{
+		_LIT(KErrResolve, "No Description is exist to Resolve URIs");
+		ERR_PRINTF1(KErrResolve);
+		return;
+		}
+	//Fill the all types of Uris for each base Uri
+	for (TInt index(0); index < count ; index++ )
+		{
+		GetServiceUrlsListL(index);
+		ResolveScpdUrisL(index);
+		ResolveEventUrisL(index);
+		ResolveControlUrisL(index);
+		}
+	}
+
+void CTestUPnPManager::GetServiceUrlsListL(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::GetServiceUrlsListL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	CUPnPDeviceDescription*	rootDeviceDescription = NULL;
+	//Release the content of StringPool if any
+	if(iStringPoolMgr)
+		iStringPoolMgr->Release();
+	DeleteSeriveUrlsList(aIndex);
+
+	 iStringPoolMgr = CStringPoolManager::NewL();
+	 //Store the Parsed node info
+	 iStringPool = iStringPoolMgr->StringPool();
+	_LIT(KInfoLogFile4, "Creating Stringpool and its manager.... \n");
+	INFO_PRINTF1(KInfoLogFile4);
+	
+	//Parse the device description
+    CUPnPDescriptionParser* app = CUPnPDescriptionParser::NewL( iStringPool, CUPnPDescriptionParser::EDevice);
+	_LIT(KInfoLogFile2, "CTestUPnPManager::CUpnpDeviceXmlParser::NewL().... \n");
+	INFO_PRINTF1(KInfoLogFile2);
+    TRAPD(error,(rootDeviceDescription = static_cast<CUPnPDeviceDescription*>(app->ParseDescriptionBufL(iDescriptionSuiteArray[aIndex].iDescription))));
+	if (error != KErrNone)
+		{
+		_LIT(KErrLogFile1, "CTestUPnPManager::GetServiceUrlsListL() is Terminating.... And Error is %d \n");
+		ERR_PRINTF2(KErrLogFile1, error);
+		return;
+		}
+	_LIT(KInfoLogFile3, "rootDeviceDescription.... \n");
+	INFO_PRINTF1(KInfoLogFile3);
+	
+   
+    
+    delete app;
+	app = NULL;
+	_LIT(KInfoLogFile5, "Deleting CUpnpDeviceXmlParser().... \n");
+	INFO_PRINTF1(KInfoLogFile5);
+
+    //Retrieve the Tag for Base
+    RString string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EUrlBase,iStringPoolMgr->GetUPnPTable());
+    //Get the node info for the Base i.e., value between the start and end Base tags
+    //If BaseUri exist in Description replace already existing BaseUri
+	if(rootDeviceDescription->Property(string).Compare(KNullDesC8)>0)
+		{
+		//Delete already stored Base uri
+		iDescriptionSuiteArray[aIndex].iBaseUrl.Close();
+		iDescriptionSuiteArray[aIndex].iBaseUrl.Create(rootDeviceDescription->Property(string).Length());
+		iDescriptionSuiteArray[aIndex].iBaseUrl.Copy(rootDeviceDescription->Property(string));
+		}
+
+	//Catch hold of first level of Device
+	CUPnPDevice* device = rootDeviceDescription->DeviceObject();
+
+	TInt count =device->CountOfEmbeddedDeviceInfoTable();
+	if(count>0)
+		{
+		for(TInt i=0;i<count;i++)
+			{
+			GetEmbeddedDeviceServicesL(aIndex,device->AtEmbeddedDeviceInfoTable(i));
+			}
+		}
+	GetServiceValuesL(aIndex, device);
+	
+	GetIconUrlsL( aIndex, device);
+	
+	_LIT(KInfoLogFile6, "Finished GetServiceValuesL.... \n");
+	INFO_PRINTF1(KInfoLogFile6);
+	delete rootDeviceDescription;
+	rootDeviceDescription = NULL;
+	_LIT(KInfoLogFile1, "CTestUPnPManager::GetServiceUrlsListL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+	
+void CTestUPnPManager::GetIconUrlsL ( TInt aBaseDescIdx, CUPnPDevice* aRootDevice )
+	{	
+	RString strF = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EUrl,iStringPoolMgr->GetUPnPTable());
+	
+	for ( TInt i = 0; i < aRootDevice->CountOfIconInfoTable (); i++ )
+		{
+		CUPnPIconInfo* iconInfo = aRootDevice->AtIconInfoTable(i);
+		ResolveIconUrlL ( aBaseDescIdx, iconInfo->Property(strF) );
+		}
+	for ( TInt i = 0; i < aRootDevice->CountOfEmbeddedDeviceInfoTable(); i++ )
+		{
+		GetIconUrlsL ( aBaseDescIdx, aRootDevice->AtEmbeddedDeviceInfoTable(i) );
+		}
+	}
+
+void CTestUPnPManager::DeleteSeriveUrlsList(TInt aIndex)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::DeleteSeriveUrlsList().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	for(TInt i=0;i<iDescriptionSuiteArray[aIndex].iServiceUrls.Count();i++)
+		{
+		iDescriptionSuiteArray[aIndex].iServiceUrls[i].serviceType.Close();
+		iDescriptionSuiteArray[aIndex].iServiceUrls[i].scpdUrl.Close();
+		iDescriptionSuiteArray[aIndex].iServiceUrls[i].controlUrl.Close();
+		iDescriptionSuiteArray[aIndex].iServiceUrls[i].eventSubUrl.Close();		
+		}
+	iDescriptionSuiteArray[aIndex].iServiceUrls.Close();
+	_LIT(KInfoLogFile1, "CTestUPnPManager::DeleteSeriveUrlsList() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+void CTestUPnPManager::GetEmbeddedDeviceServicesL(TInt aIndex, CUPnPDevice* aDevice)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::GetEmbeddedDeviceServicesL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	if(aDevice->CountOfEmbeddedDeviceInfoTable() > 0)
+		{
+		for(TInt i=0;i<aDevice->CountOfEmbeddedDeviceInfoTable();i++)
+			{
+			GetEmbeddedDeviceServicesL(aIndex, aDevice->AtEmbeddedDeviceInfoTable(i));
+			GetServiceValuesL(aIndex, aDevice);
+			}
+		}
+	else
+		{
+		GetServiceValuesL(aIndex, aDevice);
+		}
+	}
+
+
+void CTestUPnPManager::AppendDeviceLocationL(TDesC8& aDevLocPointer)
+	{
+	User::LeaveIfError(	iDeviceLocationArray.Append(aDevLocPointer) );
+	}
+
+void CTestUPnPManager::AppendScpdUriL(RBuf8& aScpdUri)
+	{
+	User::LeaveIfError(	iScpdUriArray.Append(aScpdUri) );
+	}
+
+void CTestUPnPManager::AppendEventUriL(RBuf8& aEventUri)
+	{
+	User::LeaveIfError(	iEventUriArray.Append(aEventUri) );
+	}
+
+void CTestUPnPManager::AppendControlUriL(RBuf8& aControlUri)
+	{
+	User::LeaveIfError(	iControlUriArray.Append(aControlUri) );
+	}
+
+void CTestUPnPManager::AppendDescriptionL(RBuf8& aBaseUri,RBuf8& aDescription)
+	{
+	TDescriptionSuite buf;
+	buf.iDescription.CreateL(aDescription);
+	buf.iBaseUrl.CreateL(aBaseUri);
+	iDescriptionSuiteArray.Append(buf);
+	}
+
+void CTestUPnPManager::GetServiceValuesL(TInt aIndex, CUPnPDevice* aDevice)
+	{
+	_LIT(KInfoLogFile, "CTestUPnPManager::GetServiceValuesL().... \n");
+	INFO_PRINTF1(KInfoLogFile);
+	
+	TUint count;
+	const CUPnPServiceInfo* servInfo = NULL;
+	TServiceUrl serviceurl;
+	count = aDevice->CountOfServiceInfoTable();
+	if(count > 0)
+		{
+		for(TInt i = 0;  i< aDevice->CountOfServiceInfoTable(); i++)
+			{
+			servInfo = aDevice->AtServiceInfoTable(i);
+
+			RString string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EServiceType, iStringPoolMgr->GetUPnPTable());
+			serviceurl.serviceType.Create(servInfo->Property(string).Length());
+			serviceurl.serviceType.Copy(servInfo->Property(string));
+
+			string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EScpdUrl, iStringPoolMgr->GetUPnPTable());
+			serviceurl.scpdUrl.Create(servInfo->Property(string).Length());
+			serviceurl.scpdUrl.Copy(servInfo->Property(string));
+
+			string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EContorlUrl, iStringPoolMgr->GetUPnPTable());
+			serviceurl.controlUrl.Create(servInfo->Property(string).Length());
+			serviceurl.controlUrl.Copy(servInfo->Property(string));
+
+			string = iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EEventSubUrl, iStringPoolMgr->GetUPnPTable());
+			serviceurl.eventSubUrl.Create(servInfo->Property(string).Length());
+			serviceurl.eventSubUrl.Copy(servInfo->Property(string));
+
+			iDescriptionSuiteArray[aIndex].iServiceUrls.AppendL(serviceurl);
+			}
+		}
+	_LIT(KInfoLogFile1, "CTestUPnPManager::GetServiceValuesL() End.... \n");
+	INFO_PRINTF1(KInfoLogFile1);
+	}
+
+
+CUPnPTimer::CUPnPTimer(CTestUPnPManager* aManager)
+: CActive(EPriorityHigh),iManager(aManager)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+
+CUPnPTimer::~CUPnPTimer()
+    {
+	Cancel();
+    }
+
+
+CUPnPTimer* CUPnPTimer::NewL(CTestUPnPManager* aManager)
+    {
+	CUPnPTimer* self = new (ELeave) CUPnPTimer(aManager);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+    }
+
+void CUPnPTimer::ConstructL()
+	{
+	}
+
+
+void CUPnPTimer::IssueRequestL(TTimeIntervalMicroSeconds32 anInterval)
+    {
+	iTimer.CreateLocal();
+    iTimer.After(iStatus, anInterval);
+    SetActive();
+	_LIT(KInfoLogFile, "CUPnPTimer::IssueRequestL() End.... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile);
+    }
+
+
+void CUPnPTimer::RunL()
+	{
+	CActiveScheduler::Stop();
+	_LIT(KInfoLogFile, "CUPnPTimer::RunL() End.... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile);
+	
+	}
+
+void CUPnPTimer::DoCancel()
+	{
+	iTimer.Cancel();
+	}
+
+CAction* CAction::NewL(CTestUPnPManager* aManager)
+	{
+	CAction* self = new (ELeave) CAction(aManager);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+
+	}
+
+CAction::CAction(CTestUPnPManager* aManager)
+: CActive(CActive::EPriorityStandard),iManager(aManager)
+	{
+
+	}
+
+CAction::~CAction()
+	{
+	Cancel();
+	iFile.Close ( );
+	iFs.Close ( );
+	}
+
+void CAction::ConstructL()
+	{
+	_LIT(KInfoLogFile, "CAction::ConstructL() .... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile);
+	CActiveScheduler::Add(this);
+	_LIT(KPath, "c:\\upnp\\testupnp\\client\\testdata\\");
+	_LIT(KFile, "c:\\upnp\\testupnp\\client\\testdata\\actionresponse.xml");
+	User::LeaveIfError ( iFs.Connect ( ) );
+    TInt err = iFile.Open ( iFs, KFile, EFileWrite );
+    if(err == KErrNotFound)
+		{
+		err = iFile.Create(iFs,KFile,EFileWrite);
+		}
+	else if(err == KErrPathNotFound)
+		{
+		err= iFs.MkDirAll(KPath);
+		if(err==KErrNone || err== KErrAlreadyExists)
+			{
+			iFile.Create(iFs,KFile,EFileWrite);
+			}
+		}
+	else
+    	{
+    	User::LeaveIfError(err);
+    	}
+	}
+
+void CAction::RunL()
+	{
+	switch(iActionState)
+		{
+		case ESendData:
+			iActionState = EReceiveData;
+			iControlChannel.Recv ( iCtrlMsg, iStatus );
+			SetActive();
+			_LIT(KInfoLogFile, "CAction::RunL Send Data.... \n");
+			iManager->INFO_PRINTF1(KInfoLogFile);
+			break;
+		case EReceiveData:
+		    TInt err = iFile.Write(iCtrlMsg.MessageDes ());
+		    if ( !iCtrlMsg.IsLast () )
+		    	{
+				iCtrlMsg.ClearFlags();
+		    	iControlChannel.Recv ( iCtrlMsg, iStatus );
+				SetActive();
+				_LIT(KInfoLogFile, "CAction::RunL Receive Data... \n");
+				iManager->INFO_PRINTF1(KInfoLogFile);
+		    	}
+			else
+				{
+				iControlChannel.Close( );
+				CActiveScheduler::Stop();
+				_LIT(KInfoLogFile, "CAction::RunL End.... \n");
+				iManager->INFO_PRINTF1(KInfoLogFile);
+				}
+			break;
+		}
+	}
+
+void CAction::DoCancel()
+	{
+	}
+
+void CAction::InitiateActionControlL(TDesC8& aUri,RPnPServiceDiscovery& aControlPoint)
+	{
+	RFs fs;
+    RFile	file;
+    TInt err;
+    RBuf8 buf;
+	_LIT(KInfoLogFile2, "InitiateActionControlL .... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile2);
+
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+    err = file.Open(fs,_L("z:\\upnp\\testupnp\\client\\testdata\\action.xml"),EFileRead);
+	if (err != KErrNone)
+	    {
+	    User::LeaveIfError(err);
+	    }
+	CleanupClosePushL(file);
+	TInt fileSize = 0;
+	file.Size(fileSize);
+	buf.Create(fileSize);
+	err = file.Read(buf, fileSize);
+	err= -1;
+	err = aControlPoint.InitiateControl ( iControlChannel, aUri );
+	_LIT(KInfoLogFile, "InitiateControl() on Control Point Done with %d.... \n");
+	iManager->INFO_PRINTF2(KInfoLogFile,err);
+	iCtrlMsg.SetMessageDes ( buf );
+	iCtrlMsg.SetLast ();
+	TInt newLen = buf.Length();
+	iCtrlMsg.SetMaxLength (newLen);
+	iControlChannel.Send ( iCtrlMsg, iStatus );
+	SetActive();
+	CActiveScheduler::Start();
+	_LIT(KInfoLogFile1, "InitiateActionControlL End.... \n");
+	iManager->INFO_PRINTF1(KInfoLogFile1);
+	CleanupStack::PopAndDestroy(2 );
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/bwins/appprotintfmsgsu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,19 @@
+EXPORTS
+	?DeRegister@TAppProtIntfMessage@@SAXXZ @ 1 NONAME ; void TAppProtIntfMessage::DeRegister(void)
+	?GetAttribPtr@TSigIntSockMBufChain@@UBEPAEH@Z @ 2 NONAME ; unsigned char * TSigIntSockMBufChain::GetAttribPtr(int) const
+	?GetAttribPtr@TSigMBufChain@@UBEPAEH@Z @ 3 NONAME ; unsigned char * TSigMBufChain::GetAttribPtr(int) const
+	?GetAttribPtr@TSigSockAddr@@UBEPAEH@Z @ 4 NONAME ; unsigned char * TSigSockAddr::GetAttribPtr(int) const
+	?GetAttribPtr@TSigSockAddrMBufChain@@UBEPAEH@Z @ 5 NONAME ; unsigned char * TSigSockAddrMBufChain::GetAttribPtr(int) const
+	?GetVDataTable@TSigIntSockMBufChain@@UBEPBUSVDataTableEntry@Meta@@XZ @ 6 NONAME ; struct Meta::SVDataTableEntry const * TSigIntSockMBufChain::GetVDataTable(void) const
+	?GetVDataTable@TSigMBufChain@@UBEPBUSVDataTableEntry@Meta@@XZ @ 7 NONAME ; struct Meta::SVDataTableEntry const * TSigMBufChain::GetVDataTable(void) const
+	?GetVDataTable@TSigSockAddr@@UBEPBUSVDataTableEntry@Meta@@XZ @ 8 NONAME ; struct Meta::SVDataTableEntry const * TSigSockAddr::GetVDataTable(void) const
+	?GetVDataTable@TSigSockAddrMBufChain@@UBEPBUSVDataTableEntry@Meta@@XZ @ 9 NONAME ; struct Meta::SVDataTableEntry const * TSigSockAddrMBufChain::GetVDataTable(void) const
+	?GetVDataTableStatic@TSigIntSockMBufChain@@SAPBUSVDataTableEntry@Meta@@XZ @ 10 NONAME ; struct Meta::SVDataTableEntry const * TSigIntSockMBufChain::GetVDataTableStatic(void)
+	?GetVDataTableStatic@TSigMBufChain@@SAPBUSVDataTableEntry@Meta@@XZ @ 11 NONAME ; struct Meta::SVDataTableEntry const * TSigMBufChain::GetVDataTableStatic(void)
+	?GetVDataTableStatic@TSigSockAddr@@SAPBUSVDataTableEntry@Meta@@XZ @ 12 NONAME ; struct Meta::SVDataTableEntry const * TSigSockAddr::GetVDataTableStatic(void)
+	?GetVDataTableStatic@TSigSockAddrMBufChain@@SAPBUSVDataTableEntry@Meta@@XZ @ 13 NONAME ; struct Meta::SVDataTableEntry const * TSigSockAddrMBufChain::GetVDataTableStatic(void)
+	?RegisterL@TAppProtIntfMessage@@SAXXZ @ 14 NONAME ; void TAppProtIntfMessage::RegisterL(void)
+	?GetAttribPtr@TAppProtIntfQuery@@UBEPAEH@Z @ 15 NONAME ; unsigned char * TAppProtIntfQuery::GetAttribPtr(int) const
+	?GetVDataTable@TAppProtIntfQuery@@UBEPBUSVDataTableEntry@Meta@@XZ @ 16 NONAME ; struct Meta::SVDataTableEntry const * TAppProtIntfQuery::GetVDataTable(void) const
+	?GetVDataTableStatic@TAppProtIntfQuery@@SAPBUSVDataTableEntry@Meta@@XZ @ 17 NONAME ; struct Meta::SVDataTableEntry const * TAppProtIntfQuery::GetVDataTableStatic(void)
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/eabi/appprotintfmsgsu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+EXPORTS
+	_ZN12TSigSockAddr19GetVDataTableStaticEv @ 1 NONAME
+	_ZN13TSigMBufChain19GetVDataTableStaticEv @ 2 NONAME
+	_ZN17TAppProtIntfQuery19GetVDataTableStaticEv @ 3 NONAME
+	_ZN19TAppProtIntfMessage10DeRegisterEv @ 4 NONAME
+	_ZN19TAppProtIntfMessage9RegisterLEv @ 5 NONAME
+	_ZN20TSigIntSockMBufChain19GetVDataTableStaticEv @ 6 NONAME
+	_ZN21TSigSockAddrMBufChain19GetVDataTableStaticEv @ 7 NONAME
+	_ZNK12TSigSockAddr12GetAttribPtrEi @ 8 NONAME
+	_ZNK12TSigSockAddr13GetVDataTableEv @ 9 NONAME
+	_ZNK13TSigMBufChain12GetAttribPtrEi @ 10 NONAME
+	_ZNK13TSigMBufChain13GetVDataTableEv @ 11 NONAME
+	_ZNK17TAppProtIntfQuery12GetAttribPtrEi @ 12 NONAME
+	_ZNK17TAppProtIntfQuery13GetVDataTableEv @ 13 NONAME
+	_ZNK20TSigIntSockMBufChain12GetAttribPtrEi @ 14 NONAME
+	_ZNK20TSigIntSockMBufChain13GetVDataTableEv @ 15 NONAME
+	_ZNK21TSigSockAddrMBufChain12GetAttribPtrEi @ 16 NONAME
+	_ZNK21TSigSockAddrMBufChain13GetVDataTableEv @ 17 NONAME
+	_ZTI12TSigSockAddr @ 18 NONAME
+	_ZTI13TSigMBufChain @ 19 NONAME
+	_ZTI17TAppProtIntfQuery @ 20 NONAME
+	_ZTI20TSigIntSockMBufChain @ 21 NONAME
+	_ZTI21TSigSockAddrMBufChain @ 22 NONAME
+	_ZTIN4Meta5TMetaI10RMBufChainEE @ 23 NONAME
+	_ZTIN4Meta5TMetaI12TAppProtAddrEE @ 24 NONAME
+	_ZTIN4Meta5TMetaI15RInternalSocketEE @ 25 NONAME
+	_ZTIN4Meta5TMetaIiEE @ 26 NONAME
+	_ZTV12TSigSockAddr @ 27 NONAME
+	_ZTV13TSigMBufChain @ 28 NONAME
+	_ZTV17TAppProtIntfQuery @ 29 NONAME
+	_ZTV20TSigIntSockMBufChain @ 30 NONAME
+	_ZTV21TSigSockAddrMBufChain @ 31 NONAME
+	_ZTVN4Meta5TMetaI10RMBufChainEE @ 32 NONAME
+	_ZTVN4Meta5TMetaI12TAppProtAddrEE @ 33 NONAME
+	_ZTVN4Meta5TMetaI15RInternalSocketEE @ 34 NONAME
+	_ZTVN4Meta5TMetaIiEE @ 35 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/group/appprotintf.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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:
+// appprotinf.mmp
+// 
+//
+
+TARGET		appprotintf.dll
+TARGETTYPE	plugin
+CAPABILITY	CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+UID             0x10009D8D 0x2000D05C
+VENDORID 	0x70000001
+
+SOURCEPATH ../src
+SOURCE app_protintf.cpp
+SOURCE app_protintf_base.cpp
+SOURCE app_protintf_fact.cpp
+SOURCE app_protintf_tcp.cpp
+SOURCE app_protintf_udp.cpp
+
+USERINCLUDE ../inc
+USERINCLUDE ../../../SocketHandler/inc
+
+SYSTEMINCLUDE /epoc32/include 
+SYSTEMINCLUDE /epoc32/include/comms-infras
+
+START RESOURCE 2000D05C.rss
+TARGET appprotintf.rsc
+END
+
+LIBRARY euser.lib
+LIBRARY esock.lib 
+LIBRARY esocksvr.lib 
+LIBRARY mbufmgr.lib
+LIBRARY sockethandler.lib
+LIBRARY netmeta.lib
+LIBRARY commsfw.lib
+LIBRARY appprotinfmsgs.lib
+LIBRARY insock.lib 
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/group/appprotintfmsgs.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+// 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:
+// appprotinfmsgs.mmp
+// 
+//
+
+
+TARGET		appprotinfmsgs.dll
+TARGETTYPE	DLL
+CAPABILITY	CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+UID             0x2000D055
+VENDORID 	0x70000001
+
+SOURCEPATH ../src
+SOURCE app_protintf_msgs.cpp
+
+USERINCLUDE ../inc
+
+SYSTEMINCLUDE /epoc32/include 
+SYSTEMINCLUDE /epoc32/include/comms-infras
+
+LIBRARY euser.lib 
+LIBRARY esocksvr.lib 
+LIBRARY mbufmgr.lib
+LIBRARY netmeta.lib
+LIBRARY commsfw.lib
+LIBRARY insock.lib
+LIBRARY nodemessages.lib
+LIBRARY meshmachine.lib
+LIBRARY virtualconstructors.lib
+
+DEFFILE		appprotintfmsgs.def
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+// 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:
+//
+
+
+
+PRJ_TESTMMPFILES
+appprotintfmsgs.mmp
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,14 @@
+// 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:
+//
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_base.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,135 @@
+// 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 __APP_PROTINF_BASE_H__
+#define __APP_PROTINF_BASE_H__
+
+#include <comms-infras/ss_subconnflow.h>
+#include <rsockethandler.h>
+#include <csocketopener.h>
+#include <appprotintf/genericcontainer.h>
+
+_LIT ( KAppProtIntfInvalidRealmId, " RealmId is invalid " );
+
+enum TAppProtIntfPanic
+	{
+	KInvalidReamId
+	};
+	
+// Forward declarations
+class CApplicationProtocolIntfFactory;
+
+class CApplicationProtocolIntfBase : public CFactoryObject,
+									public MSocketHandlerObserver
+	{
+public:
+
+	inline TUint Port () const;
+	virtual TUint Protocol () const =0;
+	virtual ~CApplicationProtocolIntfBase ();
+
+protected:
+
+	enum
+		{
+		ERecvFrom = 1
+		};
+
+	typedef Messages::TMessageSigVoid < ERecvFrom, ESock::TCFMessage::ERealmId > TRecvFrom;
+
+	CApplicationProtocolIntfBase ( TUint aPort, TInt aProtocolType );
+
+	void JoinCompleted ();
+	void PostToLink ( const Messages::TNodeCtxId& aRecipient, const Messages::TSignatureBase& aMessage );
+	void PostToLink ( const Messages::RNodeInterface& aRecipient, const Messages::TSignatureBase& aMessage );
+	void PostToAllLinks ( const Messages::TSignatureBase& aMessage );
+
+	void InitiateLinkL ( const Messages::TNodeCtxId& aSender, TUint aSockType, TUint aProtocol );
+	void HandleClientLeavingRequest ( const Messages::TNodeCtxId&  aSender );
+	void CloseLink ( const Messages::TNodeId& aSender );
+
+	TInt OpenSocket ( TUint aAddrFamily, TUint aSockType, TUint aProtocol );
+
+	virtual TInt Startup () =0;
+	virtual void Shutdown ();
+
+	// From ANodeIdBase
+	virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	virtual void OpenComplete ( RInternalSocket& aSocket );
+	inline virtual void ConnectComplete ();
+	inline virtual void AcceptComplete ( RInternalSocket& aSocket );
+	inline virtual void SendComplete ( TInt aLength );
+	inline virtual void SendToComplete ( TInt aLength );
+	inline virtual void RecvComplete ( RMBufChain& aData );
+	inline virtual void RecvFromComplete ( RMBufChain& aData, const TSockAddr& aAddr );
+//	virtual void IoctlComplete ();
+	virtual void Error ( TOperation aOperation, TInt aError  );
+
+protected:
+	TInt AddLink ( const Messages::TNodeId& aSender );
+	TInt RemoveLink ( const Messages::TNodeId& aSender );
+	TInt FindLink ( const Messages::TNodeId& aSender );
+
+protected:
+	RArray<Messages::RNodeInterface>	iLinks;
+	RSocketHandler		iSocketHandler;
+	RInternalSocket 	iSocket;
+private:
+	TUint 				iPort;
+	CSocketOpener*		iSocketOpener;
+	};
+
+
+TUint CApplicationProtocolIntfBase::Port () const
+	{
+	return iPort;
+	}
+
+void CApplicationProtocolIntfBase::ConnectComplete ()
+	{
+
+	}
+
+void CApplicationProtocolIntfBase::AcceptComplete ( RInternalSocket& /* aSocket */ )
+	{
+	}
+
+/*void CApplicationProtocolIntfBase::IoctlComplete ()
+	{
+	}
+*/
+void CApplicationProtocolIntfBase::RecvComplete ( RMBufChain& /* aData */ )
+	{
+
+	}
+
+void CApplicationProtocolIntfBase::RecvFromComplete ( RMBufChain& /* aData */, const TSockAddr& /* aAddr */ )
+	{
+
+	}
+
+void CApplicationProtocolIntfBase::SendComplete ( TInt /* aLength */ )
+	{
+
+	}
+
+void CApplicationProtocolIntfBase::SendToComplete ( TInt /* aLength */ )
+	{
+
+	}
+
+#endif // __APP_PROTINF_BASE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_fact.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+// 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 __APP_PROTINF_FACT_H__
+#define __APP_PROTINF_FACT_H__
+
+#include <elements/factory.h>
+#include "app_protintf_base.h"
+
+class CApplicationProtocolIntfFactory : public CFactory
+	{
+	public:
+		// ECOM interface implementation ID
+		static const TInt iUid = 0x2000D05B;
+		static CApplicationProtocolIntfFactory* NewL ( );
+		~CApplicationProtocolIntfFactory ();		
+
+	protected:
+		CApplicationProtocolIntfFactory ( );
+		
+		// From CFactory
+		CFactoryObject* DoCreateFactoryObjectL ( Factories::MFactoryQuery& aFactoryQuery );
+		
+	
+	private:
+		void ConstructL ();
+	};
+#endif // __APP_PROTINF_FACT_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_msgs.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,128 @@
+// 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 __APP_PROTINTFMESSAGE_H__
+#define __APP_PROTINTFMESSAGE_H__
+
+#include <e32base.h>
+#include <comms-infras/ss_nodemessages.h>
+#include <elements/factory.h>
+#include <comms-infras/eintsock.h>
+#include <es_mbuf.h>
+#include <in_sock.h>
+//#include <appprotintf/app_protintf_base.h>
+
+using namespace Messages;
+
+const TInt KAppProtIntfMessagesImplementationUid = 0x2001DC6B;
+class TAppProtAddr
+   	{
+public:
+   	TAppProtAddr ( )
+   		{
+   		}
+   	TAppProtAddr ( TUint32 aAddr,	TUint aPort )
+   		:iAddr ( aAddr ), iPort ( aPort  )
+   		{
+  		}
+ 	TBool operator== ( const TAppProtAddr& aAppProtAddr ) const
+ 		{
+ 		return iAddr == aAppProtAddr.iAddr && iPort == aAppProtAddr.iPort ? ETrue : EFalse;
+ 		}
+
+   	TUint32 iAddr;
+   	TUint 	iPort;
+   	};
+
+
+// Application Protocol Interface custom messages
+DECLARE_MESSAGE_SIG_1(SigSockAddr, TAppProtAddr, Addr)
+DECLARE_MESSAGE_SIG_2(SigSockAddrMBufChain, TAppProtAddr, Addr, RMBufChain, Data )
+DECLARE_MESSAGE_SIG_1(SigMBufChain, RMBufChain, Data)
+DECLARE_MESSAGE_SIG_2(SigIntSockMBufChain, RInternalSocket, Socket, RMBufChain, Data)
+
+
+struct TAppProtIntfQuery : public ESock::TFactoryQueryBase
+	{
+public:
+	inline TAppProtIntfQuery() {}
+	explicit TAppProtIntfQuery ( TUint aProtocol, TUint aPort ): iProtocol(aProtocol),iPort(aPort)
+			{
+			}
+
+public:
+	Factories::MFactoryQuery::TMatchResult Match(Factories::TFactoryObjectInfo& /*aObjectInfo*/ )
+		{
+//		CApplicationProtocolIntfBase* appProtIntfObj = static_cast< CApplicationProtocolIntfBase* >( aObjectInfo.iInfo.iFactoryObject );
+//		return ( appProtIntfObj->Protocol() == iProtocol &&  appProtIntfObj->Port() == iPort ) ?
+//				MCommsFactoryQuery::EMatch : MCommsFactoryQuery::EContinue;
+	return (TMatchResult)0;
+		}
+
+public:
+	TUint iProtocol;
+	TUint iPort;
+
+   DECLARE_MVIP_CTR( TAppProtIntfQuery )
+   EXPORT_DATA_VTABLE_AND_FN
+	};
+
+NONSHARABLE_CLASS(TAppProtIntfMessage)
+	{
+	private:
+
+	enum
+		{
+		EJoin =1,
+		EJoinWithMulticastAddress =2,
+		EClientLeavingRequest =3,
+		ELeaveComplete =4,
+		EJoinComplete =5,
+		EDataReceived =6,
+		ENewConnection =7,
+		EAcceptConnection =8,
+		ERejectConnection =9,
+		EMoreData =10,
+		ETransferConnection =11,
+		EError =12,
+		EFindOrCreateAppProtIntf =13,
+		EAppProtIntfCreated =14,
+		EDestroy = 15,
+		};
+
+	public:
+	IMPORT_C static void RegisterL ();	// Register the messages with COMMS transport
+	IMPORT_C static void DeRegister ();  // De-register the messages with the COMMS transport
+
+	public:
+
+	enum { ERealmId = 0x2000D055 };
+
+	typedef TMessageSigVoid < EJoin, TAppProtIntfMessage::ERealmId > TJoin;
+	typedef TMessageSigSockAddr < EJoinWithMulticastAddress, TAppProtIntfMessage::ERealmId > TJoinWithMulticastAddress;
+	typedef TMessageSigVoid < EClientLeavingRequest, TAppProtIntfMessage::ERealmId > TClientLeavingRequest;
+    typedef TMessageSigVoid < ELeaveComplete, TAppProtIntfMessage::ERealmId > TLeaveComplete;
+	typedef TMessageSigVoid < EJoinComplete, TAppProtIntfMessage::ERealmId > TJoinComplete;
+	typedef TMessageSigSockAddrMBufChain < EDataReceived, TAppProtIntfMessage::ERealmId > TDataReceived;
+	typedef TMessageSigMBufChain < ENewConnection, TAppProtIntfMessage::ERealmId > TNewConnection;
+	typedef TMessageSigVoid < EAcceptConnection, TAppProtIntfMessage::ERealmId > TAcceptConnection;
+	typedef TMessageSigMBufChain < ERejectConnection, TAppProtIntfMessage::ERealmId > TRejectConnection;
+	typedef TMessageSigVoid < EMoreData, TAppProtIntfMessage::ERealmId > TMoreData;
+	typedef TMessageSigIntSockMBufChain < ETransferConnection, TAppProtIntfMessage::ERealmId > TTransferConnection;
+	typedef TMessageSigNumber < EError, TAppProtIntfMessage::ERealmId > TError;
+	typedef TMessageSigVoid < EDestroy, TAppProtIntfMessage::ERealmId > TDestroy;
+	};
+
+#endif // __APP_PROTINTFMESSAGE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_tcp.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,58 @@
+// 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 __APP_PROTINTF_TCP_H__
+#define __APP_PROTINTF_TCP_H__
+
+#include <in_sock.h>
+#include <es_mbuf.h>
+#include "app_protintf_base.h"
+
+class RMBufChain;
+
+class CApplicationProtocolIntfTcp : public CApplicationProtocolIntfBase
+	{
+	public:
+	static CApplicationProtocolIntfBase* NewL ( TInt aPort );
+	inline virtual TUint Protocol () const;
+	~CApplicationProtocolIntfTcp ();
+	
+	protected:
+	virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	private:
+	CApplicationProtocolIntfTcp ( TInt aPort );
+	virtual TInt Startup ();
+	virtual void Shutdown ();
+	
+	void DoAccept ();	
+
+	virtual void AcceptComplete ( RInternalSocket& aSocket );
+	virtual void RecvComplete ( RMBufChain& aData );
+	virtual void SendComplete ( TInt aLength );
+	virtual void Error ( TOperation aOperation, TInt aError );
+	private:
+	
+	RInternalSocket iAcceptedSocket;
+	RSocketHandler	iAcceptedSocketHandler;	
+	RMBufChain 		iReceivedData;
+	};
+	
+TUint CApplicationProtocolIntfTcp::Protocol () const
+	{
+	return KProtocolInetTcp;
+	}
+	
+#endif // __APP_PROTINTF_TCP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/inc/app_protintf_udp.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+// 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 __APP_PROTINTF_UDP_H__
+#define __APP_PROTINTF_UDP_H__
+
+#include "app_protintf_base.h"
+#include <appprotintf/app_protintf_msgs.h>
+
+class CApplicationProtocolIntfUdp : public CApplicationProtocolIntfBase
+	{
+	public:
+	static CApplicationProtocolIntfBase* NewL ( TInt aPort );
+	~CApplicationProtocolIntfUdp();
+	inline virtual TUint Protocol () const;
+
+	protected:
+	virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );	
+
+	private:
+	CApplicationProtocolIntfUdp ( TInt aPort );
+	
+	virtual TInt Startup ();
+	virtual void Shutdown ();
+		
+	virtual void RecvFromComplete ( RMBufChain& aData, const TSockAddr& aAddr );
+
+	private:	
+	TAppProtAddr	iMulticastAddr;	
+	};
+	
+TUint CApplicationProtocolIntfUdp::Protocol () const
+	{
+	return KProtocolInetUdp;
+	}
+	
+#endif // __APP_PROTINTF_UDP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/2000D05C.rss	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// @file
+// Registry info for Application Protocol Interface ECOM plug-in
+// 
+//
+
+#include <ecom/registryinfo.rh>
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x2000D05C;
+interfaces = 
+    {
+    INTERFACE_INFO
+        {//Right now using subconnection flow factory container uid, once comms genereic flow factory 
+         // container is ready should be replaced with that UID, 
+        interface_uid = 0x10281C33; //subconnflow interface UID
+        implementations = 
+            {
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D05B;
+                version_no = 1;
+                display_name = "Application Protocol Interface Factory";
+                default_data = "ApplicationProtocolIntfFactory";
+                }
+            };
+        }	 
+    };
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+// 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 "app_protintf_fact.h"
+
+const TImplementationProxy KImplementationTable[] = 
+	{
+	IMPLEMENTATION_PROXY_ENTRY( CApplicationProtocolIntfFactory::iUid, CApplicationProtocolIntfFactory::NewL ),
+	};
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+	{
+	aTableCount = sizeof(KImplementationTable) / sizeof(TImplementationProxy);
+	return KImplementationTable;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_base.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,207 @@
+// 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 "app_protintf_base.h"
+#include "app_protintf_fact.h"
+#include "app_protintf_msgs.h"
+#include <in_sock.h>
+
+using namespace ESock;
+using namespace Messages;
+
+CApplicationProtocolIntfBase::CApplicationProtocolIntfBase ( TUint aPort, TInt aProtocolType )
+	: CFactoryObject ( aProtocolType ),
+ 	iSocketHandler ( *this ),
+	iPort ( aPort )
+	{
+
+	}
+
+CApplicationProtocolIntfBase::~CApplicationProtocolIntfBase ()
+	{
+	delete iSocketOpener;
+	iLinks.Close ();
+	Shutdown();
+	}
+
+void CApplicationProtocolIntfBase::Shutdown ()
+	{
+	iSocketHandler.CancelAll();
+	iSocket.Close ();
+	}
+
+void CApplicationProtocolIntfBase::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	switch ( aMessage.MessageId ().MessageId () )
+		{
+		case TAppProtIntfMessage::TClientLeavingRequest::EId:
+			{
+			HandleClientLeavingRequest ( address_cast<TNodeCtxId>(aSender) );
+			}
+			break;
+
+		case TAppProtIntfMessage::TDestroy::EId:
+			{
+			CloseLink ( address_cast<TNodeId>(aSender) );
+			}
+		break;
+		}
+	}
+
+
+// MSocketHandlerObserver
+void CApplicationProtocolIntfBase::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	TInetAddr addr ( iPort );
+
+	addr.SetAddress ( KInetAddrAny );
+	TInt err = aSocket.Bind ( addr );
+
+	if ( err == KErrNone )
+		err = Startup ();
+
+	if ( err == KErrNone )
+		{
+		// Post to all all links that we have successfully opened and bound to the socket. ie; Join is
+		// successful
+		JoinCompleted ();
+		}
+	else
+		{
+		// Post the error to all links
+		CApplicationProtocolIntfBase::Error ( EOpenByProtocol, err );
+		}
+	}
+
+void CApplicationProtocolIntfBase::Error ( TOperation /* aOperation */, TInt aError  )
+	{
+	// This error means something went seriously wrong. We will close down everything and post
+	// an error to all links.
+	TAppProtIntfMessage::TError msg ( aError );
+	PostToAllLinks ( msg );
+
+	// no other new link should get access to this object. So mark for deletion
+	// MarkMeForDeletion ();
+	Shutdown ();
+	}
+
+void CApplicationProtocolIntfBase::JoinCompleted ()
+	{	
+	PostToAllLinks ( TAppProtIntfMessage::TJoinComplete ().CRef () );
+	}
+
+TInt CApplicationProtocolIntfBase::AddLink ( const TNodeId& aSender )
+	{
+	if ( KErrNotFound == FindLink ( aSender ) )
+		{
+		RNodeInterface newLink;
+    	newLink.Open ( aSender );
+    	iLinks.Append ( newLink );
+		}
+
+	return iLinks.Count ();
+	}
+
+TInt CApplicationProtocolIntfBase::FindLink ( const TNodeId& aSender )
+	{
+	for ( TInt i = 0; i < iLinks.Count(); ++i )
+		{
+		if ( aSender == iLinks[i].RecipientId () )
+			{
+			return i;
+			}
+		}
+	return KErrNotFound;
+	}
+
+TInt CApplicationProtocolIntfBase::RemoveLink ( const TNodeId& aSender )
+	{
+	for ( TInt i = 0; i < iLinks.Count(); ++i )
+		{
+		if ( aSender == iLinks[i].RecipientId () )
+			{
+			iLinks.Remove (i);
+			break;
+			}
+		}
+	return iLinks.Count();
+	}
+
+void CApplicationProtocolIntfBase::PostToLink ( const TNodeCtxId& aRecipient, const TSignatureBase& aMessage )
+	{
+	RClientInterface::OpenPostMessageClose ( NodeId (), aRecipient, aMessage );
+	}
+
+void CApplicationProtocolIntfBase::PostToLink (const RNodeInterface& aRecipient, const TSignatureBase& aMessage )
+	{
+	RClientInterface::OpenPostMessageClose ( NodeId (), aRecipient.RecipientId (), aMessage );	
+	}
+
+void CApplicationProtocolIntfBase::PostToAllLinks ( const TSignatureBase& aMessage )
+	{
+	for ( TInt i = 0; i < iLinks.Count(); ++i )
+		{
+		// PostTo links
+		PostToLink ( iLinks[i], aMessage );
+		}
+	}
+
+TInt CApplicationProtocolIntfBase::OpenSocket ( TUint aAddrFamily, TUint aSockType, TUint aProtocol )
+	{
+	TInt err = KErrNone;
+	if ( NULL == iSocketOpener )
+		{
+		TRAP ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );
+		}
+
+	if ( err == KErrNone )
+		iSocketOpener->MakeSocket ( aAddrFamily, aSockType, aProtocol );
+
+	return err;
+	}
+
+void CApplicationProtocolIntfBase::InitiateLinkL ( const TNodeCtxId& aSender, TUint aSockType, TUint aProtocol )
+	{
+	const TInt KFirstLink = 1;
+	if ( AddLink ( aSender ) == KFirstLink )
+		{
+		// Open the socket
+		User::LeaveIfError( OpenSocket ( KAfInet, aSockType, aProtocol ) );
+		}
+	else
+		{		
+		PostToLink ( aSender, TAppProtIntfMessage::TJoinComplete ().CRef () );
+		}
+	}
+
+void CApplicationProtocolIntfBase::HandleClientLeavingRequest ( const TNodeCtxId& aSender )
+	{
+	// set client flags to leaving and post leave complete
+	TInt idx = FindLink ( aSender );
+	__ASSERT_DEBUG ( idx != KErrNotFound, User::Invariant() );
+
+	iLinks[idx].SetFlags ( TClientType::ELeaving );
+	PostToLink ( aSender, TAppProtIntfMessage::TLeaveComplete ().CRef () ); // activity id is missing
+	}
+
+void CApplicationProtocolIntfBase::CloseLink ( const TNodeId& aSender )
+	{
+	if ( RemoveLink ( aSender ) == 0 )
+		{
+		delete this; // Do a self destruction now.
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_fact.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,70 @@
+// 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 "app_protintf_fact.h"
+#include "app_protintf_msgs.h"
+//#include <ss_fact2.h>
+#include <in_sock.h>
+#include "app_protintf_tcp.h"
+#include "app_protintf_udp.h"
+
+//using namespace ESock;
+
+CApplicationProtocolIntfFactory* CApplicationProtocolIntfFactory::NewL ( )
+	{
+	CApplicationProtocolIntfFactory* self = new (ELeave) CApplicationProtocolIntfFactory( );
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop ();
+	return self;
+	}
+
+void CApplicationProtocolIntfFactory::ConstructL ()	
+	{
+	TAppProtIntfMessage::RegisterL (); // Register the message with COMMS transport		
+	}
+
+CApplicationProtocolIntfFactory::~CApplicationProtocolIntfFactory ()
+	{
+	TAppProtIntfMessage::DeRegister	();
+	}
+
+CApplicationProtocolIntfFactory::CApplicationProtocolIntfFactory ( )
+	{
+	}
+
+// From CFactory
+CFactoryObject* CApplicationProtocolIntfFactory::DoCreateFactoryObjectL ( Factories::MFactoryQuery& aFactoryQuery )
+	{
+	const TAppProtIntfQuery& query = static_cast < const TAppProtIntfQuery& > ( aFactoryQuery );
+	CFactoryObject* obj = NULL;
+	// Factory is having the knowledge of how to create concrete factory objects
+	switch ( query.iProtocol )
+		{
+		case KProtocolInetTcp:
+		obj = CApplicationProtocolIntfTcp::NewL ( query.iPort );
+		break;
+		
+		case KProtocolInetUdp:
+		obj = CApplicationProtocolIntfUdp::NewL ( query.iPort );		
+		break;
+		
+		default:
+		User::Leave ( KErrNotSupported );
+		break;
+		}
+	return 	obj;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_msgs.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,81 @@
+// 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 <comms-infras/metatype.h>
+#include <elements/vc.h>
+
+#include "app_protintf_msgs.h"
+
+using namespace Messages;
+
+
+// Application Protocol Signatures
+enum 
+	{
+	ESigSockAddr					=0,
+	ESigSockAddrMBufChain			=1,
+	ESigMBufChain					=2, 
+	ESigIntSockMBufChain			=3,
+	EAppProtIntfQuery				=4,
+	};
+	
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN(TSigSockAddr, KAppProtIntfMessagesImplementationUid, ESigSockAddr)
+	REGISTER_ATTRIBUTE(TSigSockAddr, iAddr, TMeta<TAppProtAddr>)
+END_ATTRIBUTE_TABLE_BASE(TSignatureBase, 0)
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN(TSigSockAddrMBufChain, KAppProtIntfMessagesImplementationUid, ESigSockAddrMBufChain)
+	REGISTER_ATTRIBUTE(TSigSockAddrMBufChain, iAddr, TMeta<TAppProtAddr>)	
+	REGISTER_ATTRIBUTE(TSigSockAddrMBufChain, iData, TMeta<RMBufChain>)
+END_ATTRIBUTE_TABLE_BASE(TSignatureBase, 0)
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN(TSigMBufChain, KAppProtIntfMessagesImplementationUid, ESigMBufChain)
+	REGISTER_ATTRIBUTE(TSigMBufChain, iData, TMeta<RMBufChain>)
+END_ATTRIBUTE_TABLE_BASE(TSignatureBase, 0)
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN(TSigIntSockMBufChain, KAppProtIntfMessagesImplementationUid, ESigIntSockMBufChain)
+	REGISTER_ATTRIBUTE(TSigIntSockMBufChain, iSocket, TMeta<RInternalSocket>)	
+	REGISTER_ATTRIBUTE(TSigIntSockMBufChain, iData, TMeta<RMBufChain>)	
+END_ATTRIBUTE_TABLE_BASE(TSignatureBase, 0)
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN(TAppProtIntfQuery, KAppProtIntfMessagesImplementationUid, EAppProtIntfQuery)
+	REGISTER_ATTRIBUTE (TAppProtIntfQuery, iProtocol, TMetaNumber)
+	REGISTER_ATTRIBUTE(TAppProtIntfQuery, iPort, TMetaNumber)
+END_ATTRIBUTE_TABLE()
+
+
+DEFINE_MVIP_CTR(TSigSockAddr);
+DEFINE_MVIP_CTR(TSigSockAddrMBufChain);
+DEFINE_MVIP_CTR(TSigMBufChain);
+DEFINE_MVIP_CTR(TSigIntSockMBufChain);
+DEFINE_MVIP_CTR(TAppProtIntfQuery);
+
+const TImplementationProxy SignatureImplementationTable[] = 
+	{
+	MVIP_CTR_ENTRY(ESigSockAddr, TSigSockAddr),
+	MVIP_CTR_ENTRY(ESigSockAddrMBufChain, TSigSockAddrMBufChain),
+	MVIP_CTR_ENTRY(ESigMBufChain, TSigMBufChain),
+	MVIP_CTR_ENTRY(ESigIntSockMBufChain, TSigIntSockMBufChain),
+	MVIP_CTR_ENTRY(EAppProtIntfQuery, TAppProtIntfQuery),
+	};
+
+EXPORT_C void TAppProtIntfMessage::RegisterL()
+	{
+	TlsGlobals::Get().RegisterInterfaceL(TUid::Uid(KAppProtIntfMessagesImplementationUid), sizeof(SignatureImplementationTable) / sizeof(SignatureImplementationTable[0]), SignatureImplementationTable);
+	}
+
+EXPORT_C void TAppProtIntfMessage::DeRegister()
+	{
+	TlsGlobals::Get().DeregisterInterface(TUid::Uid(KAppProtIntfMessagesImplementationUid));
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_tcp.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,171 @@
+// 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 "app_protintf_tcp.h"
+#include <in_sock.h>
+#include "app_protintf_msgs.h"
+const TInt KListenQSize = 5;
+
+using namespace Messages;
+
+CApplicationProtocolIntfBase* CApplicationProtocolIntfTcp::NewL ( TInt aPort )
+	{
+	CApplicationProtocolIntfTcp* self = new (ELeave)CApplicationProtocolIntfTcp( aPort );
+	return self;	
+	}
+
+CApplicationProtocolIntfTcp::CApplicationProtocolIntfTcp ( TInt aPort )
+: CApplicationProtocolIntfBase ( aPort, KProtocolInetTcp ),iAcceptedSocketHandler (*this)
+	{
+	LOG_NODE_CREATE ( KESockFlowTag, CApplicationProtocolIntfTcp );	
+	}
+
+CApplicationProtocolIntfTcp::~CApplicationProtocolIntfTcp ()
+	{
+	Shutdown();
+	LOG_NODE_DESTROY(KESockFlowTag, CApplicationProtocolIntfTcp);
+	}
+
+void CApplicationProtocolIntfTcp::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	__ASSERT_DEBUG ( aMessage.MessageId ().Realm () == TAppProtIntfMessage::ERealmId, User::Panic ( KAppProtIntfInvalidRealmId, KInvalidReamId ) );
+	
+	CApplicationProtocolIntfBase::ReceivedL ( aSender, aRecipient, aMessage );
+	switch ( aMessage.MessageId ().MessageId () )
+		{
+		case TAppProtIntfMessage::TJoin::EId:
+			{
+			InitiateLinkL ( address_cast<TNodeCtxId> ( aSender ), KSockStream, KProtocolInetTcp );
+			}
+			break;
+		
+		case TAppProtIntfMessage::TAcceptConnection::EId:
+			{
+			// Transfer the connection
+			TAppProtIntfMessage::TTransferConnection msg ( iAcceptedSocket, iReceivedData );
+			PostToLink ( address_cast<TNodeCtxId> ( aSender ), msg );
+			
+			RInternalSocket sock;
+			iAcceptedSocket = sock;	 // Empty the accepted socket, as ownership is transferred
+			iReceivedData.Init (); // Empty the received data
+			DoAccept ();
+			__ASSERT_DEBUG ( iReceivedData.IsEmpty(), User::Invariant() );
+			}
+			break;
+			
+		case TAppProtIntfMessage::TRejectConnection::EId:
+			{
+			// Note: If there is a rejection e should send the data to next links till last, one by one.
+			// Currently we have only one link. Noone is there to accept this connection. So close the accepted socket
+			// and keep in accept modefor new connections
+			
+			// The link should sent rejected data. If the rejected data is sent and we don't have any more links
+			// we will send the rejected data and go into an accepting mode. 
+			// If there is no rejected data we will close the accepted socket && directly go into an accepting mode 
+			
+			// For example: In the case of HTTP the link will send an internal error 500 or not found 400 response
+						
+			TAppProtIntfMessage::TRejectConnection& msg = message_cast < TAppProtIntfMessage::TRejectConnection > ( aMessage );
+			iReceivedData.Free ();
+			if ( msg.iData.Length() > 0 )
+				{
+				iAcceptedSocketHandler.Send ( msg.iData );
+				}
+			else
+				{						
+				iAcceptedSocket.Close();
+				DoAccept ();
+				}
+			}
+			break;
+			
+		case TAppProtIntfMessage::TMoreData::EId:
+			{
+			iReceivedData.Init();
+			iAcceptedSocketHandler.Recv();
+			break;
+			}
+		}
+	}
+
+void CApplicationProtocolIntfTcp::DoAccept ()
+	{
+	iSocketHandler.Accept();		
+	}
+
+TInt CApplicationProtocolIntfTcp::Startup ()
+	{
+	// Start listening and accepting for new connections
+	TInt err = iSocket.Listen( KListenQSize ); 
+	if ( err == KErrNone )
+		DoAccept ();
+	return err;		
+	}
+
+void CApplicationProtocolIntfTcp::Shutdown ()
+	{	
+	iAcceptedSocketHandler.CancelAll ();
+	iAcceptedSocket.Close ();
+	CApplicationProtocolIntfBase::Shutdown ();
+	}
+
+void CApplicationProtocolIntfTcp::AcceptComplete ( RInternalSocket& aSocket )
+	{
+	iAcceptedSocket = aSocket;
+	iAcceptedSocketHandler.Attach ( aSocket );
+	
+	iAcceptedSocketHandler.Recv(); // Start receiving the data
+	}
+
+void CApplicationProtocolIntfTcp::RecvComplete ( RMBufChain& aData )
+	{
+	// Post the data to the link. We should do this one by one. But for the timebeing we
+	// are keeping it simple. ie; one link is attached with us.
+	__ASSERT_DEBUG ( iLinks.Count() > 0, User::Invariant() );
+	
+	if ( iLinks[0].Flags() != TClientType::ELeaving )
+		{
+		iReceivedData.Append ( aData );
+		
+		TAppProtIntfMessage::TNewConnection msg ( iReceivedData );
+		PostToLink ( iLinks[0], msg );
+		}
+	else
+		{
+		iAcceptedSocket.Close ();
+		aData.Free ();
+		}
+	}
+
+void CApplicationProtocolIntfTcp::SendComplete ( TInt /* aLength */ )
+	{
+	// we will send data only for the accepted socket. Send complete means, we don't have anyone to accept
+	// our connection and typically a error response ( protocol dependent ) will be send to the client and 
+	// we will close the connection.
+	// Send completed. Close the accepted socket and move into an accepting mode
+	iAcceptedSocket.Close ();
+	DoAccept ();
+	}
+
+void CApplicationProtocolIntfTcp::Error ( TOperation aOperation, TInt aError )
+	{
+	// If we have a recv/send failure we should handle it here. otherwise allow the base class to handle the error
+	if ( ( aOperation == SockHandler::ERecv ) || ( aOperation == SockHandler::EMBufSend ) )
+		{
+		DoAccept ();
+		return;
+		}
+	CApplicationProtocolIntfBase::Error ( aOperation, aError );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/AppProtIntf/src/app_protintf_udp.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,143 @@
+// 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 "app_protintf_udp.h"
+#include <in_sock.h>
+
+using namespace Messages;
+
+
+CApplicationProtocolIntfBase* CApplicationProtocolIntfUdp::NewL ( TInt aPort )
+	{
+	CApplicationProtocolIntfUdp* self = new (ELeave)CApplicationProtocolIntfUdp( aPort );
+	return self;			
+	}
+
+CApplicationProtocolIntfUdp::CApplicationProtocolIntfUdp ( TInt aPort )
+: CApplicationProtocolIntfBase ( aPort, KProtocolInetUdp )
+	{
+	LOG_NODE_CREATE ( KESockFlowTag, CApplicationProtocolIntfUdp );	
+	}
+CApplicationProtocolIntfUdp::~CApplicationProtocolIntfUdp()
+	{
+	Shutdown();
+	LOG_NODE_DESTROY(KESockFlowTag, CApplicationProtocolIntfUdp);
+	}
+	
+void CApplicationProtocolIntfUdp::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	if ( aMessage.MessageId().Realm() == TAppProtIntfMessage::ERealmId )
+		{
+		CApplicationProtocolIntfBase::ReceivedL ( aSender, aRecipient, aMessage );
+		switch ( aMessage.MessageId().MessageId() )
+			{
+			case TAppProtIntfMessage::TJoinWithMulticastAddress::EId:
+				{
+				const TAppProtIntfMessage::TJoinWithMulticastAddress& msg = message_cast<const TAppProtIntfMessage::TJoinWithMulticastAddress> ( aMessage );
+				iMulticastAddr = msg.iAddr;				
+				InitiateLinkL ( address_cast<TNodeCtxId> ( aSender ), KSockDatagram, KProtocolInetUdp );
+				}
+				break;
+			}
+		}
+	
+	// The below message are self posted. Just to keep the operation to continue.
+	if ( aMessage.MessageId().Realm() == ESock::TCFMessage::ERealmId )
+		{
+		switch ( aMessage.MessageId ().MessageId () )
+			{
+			case CApplicationProtocolIntfBase::TRecvFrom::EId:
+				{
+				__ASSERT_DEBUG ( iLinks.Count() > 0, User::Invariant() );
+				if ( iLinks[0].Flags () != TClientType::ELeaving )
+					{
+					iSocketHandler.RecvFrom ();
+					}
+				}
+			break;
+			
+			}
+		}
+	}
+
+TInt CApplicationProtocolIntfUdp::Startup ()
+	{
+	TInt ret = KErrNone;	
+	TInetAddr addr;
+  	addr.SetAddress ( iMulticastAddr.iAddr );
+  	addr.SetPort ( iMulticastAddr.iPort );
+
+	if ( addr.IsMulticast() )
+		{
+		if ( addr.Family() != KAfInet6 )
+			{
+			addr.ConvertToV4Mapped();				
+			}
+		TPckgBuf<TIp6Mreq> mReqBuf;
+		mReqBuf().iAddr = addr.Ip6Address();
+		mReqBuf().iInterface = 0;
+		
+		ret = iSocket.SetOpt( KSoIp6JoinGroup, KSolInetIp, mReqBuf ); // Join the multicast group
+		}
+	iSocketHandler.RecvFrom(); // Start the receive
+	return ret;	
+	}
+	
+void CApplicationProtocolIntfUdp::Shutdown ()
+	{
+	TInetAddr addr;
+  	addr.SetAddress ( iMulticastAddr.iAddr );
+  	addr.SetPort ( iMulticastAddr.iPort );
+
+	if ( addr.IsMulticast() )
+		{
+		if ( addr.Family() != KAfInet6 )
+			{
+			addr.ConvertToV4Mapped();				
+			}
+		TPckgBuf<TIp6Mreq> mReqBuf;
+		mReqBuf().iAddr = addr.Ip6Address();
+		mReqBuf().iInterface = 0;
+		
+		TInt ret = iSocket.SetOpt( KSoIp6LeaveGroup, KSolInetIp, mReqBuf ); // leave the multicast group
+		ASSERT ( ret == KErrNone );
+		}
+		
+	CApplicationProtocolIntfBase::Shutdown ();	
+	}
+	
+void CApplicationProtocolIntfUdp::RecvFromComplete ( RMBufChain& aData, const TSockAddr& aAddr )
+	{
+	__ASSERT_DEBUG ( iLinks.Count() > 0, User::Invariant() );
+	
+	// if client is in leaving state, no need of any posts
+	if ( iLinks[0].Flags() != TClientType::ELeaving )
+		{
+		TInetAddr inetAddr ( aAddr );
+  		TAppProtAddr protAddr ( inetAddr.Address(), inetAddr.Port() );
+		
+		TAppProtIntfMessage::TDataReceived msg ( protAddr, aData );
+		
+		PostToLink ( iLinks[0], msg ); // We do assume that we have only one link ( atleast for the timebeing ).
+		// Note: If we have more link then we need to make copies of RMBufChain before posting. Otherwise the ownership
+		// of the RMBufChain will be an issue?			
+		TNodeCtxId ctx ( MeshMachine::KActivityNull, NodeId () );
+		PostToLink ( ctx, CApplicationProtocolIntfBase::TRecvFrom ().CRef () ); // Self post to keep continue with the receiving
+		}
+	else
+		{
+		aData.Free ();
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpcpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,73 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#ifndef __UPNPCPR_H_
+#define __UPNPCPR_H_
+
+#include <comms-infras/corecpr.h>
+#include <cchunkmanager.h>
+#include <rmemchunk.h>
+
+using namespace ESock;
+
+class CUPnPConnectionProvider : public CCoreConnectionProvider,
+								public MPlatsecApiExt,										
+								public ITFHIERARCHY_1 ( CUPnPConnectionProvider, MPlatsecApiExt )
+
+	{
+public:
+	typedef ITFHIERARCHY_1 ( CUPnPConnectionProvider, MPlatsecApiExt ) TIfStaticFetcherNearestInHierarchy;
+	
+	void ReturnInterfacePtrL ( MPlatsecApiExt*& aInterface );
+	virtual ~CUPnPConnectionProvider();
+	CChunkManager* MemoryManager ( );
+	RMemoryAllocator& MemoryAllocator();
+	const TDesC8& RootDeviceLocation ( );
+protected:
+	CUPnPConnectionProvider ( CConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap );
+	inline virtual TInt SecureId ( TSecureId& aResult ) const;
+    inline virtual TInt VendorId ( TVendorId& aResult ) const;
+    inline virtual TBool HasCapabilityL ( const TCapability aCapability ) const;
+    TInt CheckPolicy ( const TSecurityPolicy& aPolicy ) const;   
+
+protected:
+	MPlatsecApiExt* 			iPlatsecApiExt;
+	RMemoryAllocator 			iAllocator;
+	};
+
+TInt CUPnPConnectionProvider::SecureId ( TSecureId& aResult ) const
+	{	
+	ASSERT ( iPlatsecApiExt );
+	return iPlatsecApiExt->SecureId ( aResult );
+	}
+
+TInt CUPnPConnectionProvider::VendorId ( TVendorId& aResult ) const
+	{	
+	ASSERT ( iPlatsecApiExt );
+	return iPlatsecApiExt->VendorId ( aResult );
+	}
+
+TBool CUPnPConnectionProvider::HasCapabilityL ( const TCapability aCapability ) const
+	{
+	ASSERT ( iPlatsecApiExt );
+	return iPlatsecApiExt->HasCapabilityL ( aCapability );
+	}
+
+
+#endif /*__UPNPCPR_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlcpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPCONTROLCPR_H
+#define __UPNPCONTROLCPR_H
+
+#include <comms-infras/corecpr.h>
+#include <comms-infras/ss_api_ext.h>
+#include <comms-infras/ss_platsec_apiext.h>
+#include "upnpcpr.h"
+
+
+using namespace ESock;
+
+class CUPnPControlConnectionProvider : 	public CUPnPConnectionProvider 
+	{
+public:
+	static CUPnPControlConnectionProvider* NewL ( CConnectionProviderFactoryBase& aFactory );
+	virtual ~CUPnPControlConnectionProvider ( );	
+	
+private:
+	CUPnPControlConnectionProvider ( CConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap );
+	void ConstructL ( );
+    virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+#ifdef SYMBIAN_NETWORKING_UPS
+    TInt GetProcessAndThreadId ( TProcessId& aProcessId, TThreadId& aThreadId ) const;
+#endif
+			
+	};
+	
+	
+#endif // UPNPCONTROLCPR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlcpractivities.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPCONTROLCPRACTIVITIES_H
+#define __UPNPCONTROLCPRACTIVITIES_H
+
+#include <comms-infras/corecpractivities.h>
+#include <elements/sm_statetriple.h>
+
+#include "upnpctrlcpr.h"
+
+namespace UPnPControlCprActivities
+{
+typedef MeshMachine::TNodeContext<CUPnPControlConnectionProvider, CprStates::TContext> TContext;
+
+DECLARE_SMELEMENT_HEADER( RequestLocalHost, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL();
+DECLARE_SMELEMENT_FOOTER( RequestLocalHost )
+
+DECLARE_SMELEMENT_HEADER( AwaitingLocalHostFromMCpr, MeshMachine::TState<TContext>, NetStateMachine::MState, TContext )
+	virtual TBool Accept();
+DECLARE_SMELEMENT_FOOTER( AwaitingLocalHostFromMCpr )
+
+
+DECLARE_ACTIVITY_MAP(activityMap)
+}
+
+#endif // UPNPCONTROLCPRACTIVITIES_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlcprfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPCONTROLCPRFACTORY_H
+#define __UPNPCONTROLCPRFACTORY_H
+
+#include <comms-infras/ss_connprov.h>
+
+class CUPnPControlConnectionProviderFactory : public ESock::CConnectionProviderFactoryBase
+	{		
+public:
+	// ECOM interface implementation ID
+	static const TUint iUid = 0x2000D056;
+
+public:
+	static CUPnPControlConnectionProviderFactory* NewL(TAny* aParentContainer);
+
+protected:
+	CUPnPControlConnectionProviderFactory(
+		TUid aFactoryId, 
+		ESock::CConnectionFactoryContainer& aParentContainer);
+
+protected:
+    // CConnectionProviderFactoryBase overrides
+    virtual ESock::ACommsFactoryNodeId* DoCreateObjectL(ESock::TFactoryQueryBase& aQuery);	
+	};
+	
+#endif // UPNPCONTROLCPRFACTORY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrldeftscpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPCONTROLDEFAULTSCPR_H
+#define __UPNPCONTROLDEFAULTSCPR_H
+
+#include <comms-infras/corescpr.h>
+#include "upnpscpr.h"
+
+class CUPnPControlDefaultSubConnectionProvider : public CUPnPSubConnectionProvider
+	{	
+public:
+	static CUPnPControlDefaultSubConnectionProvider* NewL(ESock::CSubConnectionProviderFactoryBase& aFactory);
+	virtual ~CUPnPControlDefaultSubConnectionProvider(); 	
+ 	
+protected:
+	CUPnPControlDefaultSubConnectionProvider(ESock::CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap);
+	void ConstructL();
+	virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	};
+	
+#endif //UPNPCONTROLDEFAULTSCPR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrldeftscpractivities.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,53 @@
+// 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:
+// UPnPControlDeftScprActivities.h
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPCONTROLDEFAULTSCPRACTIVITIES_H
+#define __UPNPCONTROLDEFAULTSCPRACTIVITIES_H
+
+#include "upnpctrldeftscpr.h"
+#include <comms-infras/corescprstates.h>
+#include <comms-infras/corescpractivities.h>
+
+
+using namespace ESock;
+
+
+namespace UPnPControlDefaultSCprActivities
+	{
+	DECLARE_ACTIVITY_MAP(activityMap)
+	}
+
+namespace UPnPDefaultSCprLeaveActivity
+	{
+ 	typedef MeshMachine::TNodeContext<CUPnPControlDefaultSubConnectionProvider, CoreStates::TContext> TContext;
+
+	DECLARE_SMELEMENT_HEADER ( TNoTagOrDataClientIdle, MeshMachine::TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+    	virtual TInt TransitionTag ( );    	
+	DECLARE_SMELEMENT_FOOTER ( TNoTagOrDataClientIdle )    
+
+    DECLARE_AGGREGATED_TRANSITION2 (
+       TProcessClientLeave,
+       MeshMachine::TRemoveClient,
+       CoreNetStates::TSendLeaveCompleteIfRequest       
+	   )
+
+	}
+
+
+#endif // UPNPCONTROLDEFAULTSCPRACTIVITIES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlscpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,194 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPCONTROLSCPR_H
+#define __UPNPCONTROLSCPR_H
+
+#include <comms-infras/corescpr.h>
+#include <comms-infras/ss_nodemessages.h>
+
+#include <upnpparamset.h>
+#include <upnp/pnpextparameterfamily.h>
+#include <rmemchunk.h>
+
+#include "upnpctrlcpr.h"
+#include "upnpscpr.h"
+
+using namespace Messages;
+
+
+//Forward Declarations
+namespace UPnPControlSCprStates
+	{
+	class TStoreRequestParams;
+	class TSendRequestParamResponse;
+	class TInitiateActivities;
+	}
+
+
+// Subscription Information Element
+class CSubscriptionInfo: public CBase
+	{
+public:
+	CSubscriptionInfo ( TNodeId& aFlowId )
+		: iSeqKey ( -1 ), iDataClient ( aFlowId )
+		{  }
+		
+	~CSubscriptionInfo ( )
+		{
+		iPublishUrl.Close ( );
+		iSid.Close ( );
+		}
+		
+	void SetPublishUrlL ( const TDesC8& aUrl )
+		{
+		iPublishUrl.Close ( );
+		iPublishUrl.CreateL ( aUrl );
+		}
+		
+	void SetSidL ( RMemChunk& aSid )
+		{
+		iSid.CreateMaxL ( aSid.Length ( ) );
+		aSid.CopyOut ( iSid );
+		}
+	
+	TInt		iSeqKey;
+	TNodeId 	iDataClient;
+	RBuf8 		iPublishUrl;
+	RBuf8	 	iSid;
+	};
+
+class CUPnPControlSubConnectionProvider : public CUPnPSubConnectionProvider										  
+	{
+	friend class UPnPControlSCprStates::TStoreRequestParams;
+	friend class UPnPControlSCprStates::TSendRequestParamResponse;
+	friend class UPnPControlSCprStates::TInitiateActivities;	
+	
+public:
+	static CUPnPControlSubConnectionProvider* NewL ( CSubConnectionProviderFactoryBase& aFactory );
+	virtual ~CUPnPControlSubConnectionProvider ( );     
+    
+    
+    TNodeId UdpClientFlow ( );
+	TNodeId UdpServerFlow ( );
+	TNodeId TcpServerFlow ( );
+	void SetUdpServerFlow ( const TNodeId& aCommsId );
+	void SetTcpServerFlow ( const TNodeId& aCommsId );
+	void SetUdpClientFlow ( const TNodeId& aCommsId );
+	
+	inline TBool SetClosing ( );
+	inline TBool IsClosing ( );
+	inline const TDesC8& Callback() const;
+	
+	void AddResponseParamSetL ( XParameterSetBase* aResponseSet, const TUint32 aFamilyId);
+	
+	void AddSubscriptionInfoL(CSubscriptionInfo* aSubscriptionInfo);	
+	void RemoveSubscriptionInfo ( const TDesC8& aSid );
+	CSubscriptionInfo* GetSubscriptionInfoByUrl( const TDesC8& aPublishUrl );
+	CSubscriptionInfo* GetSubscriptionInfoBySid ( const TDesC8& aSid );
+	CUPnPControlConnectionProvider& ConnectionProvider ( );	
+	
+private:
+	CUPnPControlSubConnectionProvider ( CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap );
+	void ConstructL ( );
+	virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+    void HandlePassThroughMessage ( MeshMachine::TNodeContextBase& aContext );
+    
+    void InitiateActivitiesL ( );
+    void InitiateRequestL ( RParameterFamily& aReqFamily );
+    void ClearResponseParamL ( );
+    void NotifySubConnectionIfResultsAvailable ( );
+    TBool CheckForResultsAvailability ( TUint32& aFamilyId );
+	RParameterFamily GetUPnPFamilyById ( TUint32 aFamilyId );
+	void CleanupEventQueuedResponses ( const TDesC8& aUrl, TUint aFamilyId );
+	
+	// Enqueue's event for CSubConnection, if not closing
+	void NotifySubConnectionL ( const TUint32 aResponseFamilyId );
+	
+	void GenerateCallbackUrlL ( );
+	
+public:
+	struct TFlowInfo
+		{
+		TAppProtAddr iAppProtAddr;
+		TNodeId	 	 iDataClient;
+		};
+	RArray<TFlowInfo>	iFlowInfo;
+	TBool		iTcpSrvFlowCreateRequested;
+	
+private:
+	RCFParameterFamilyBundle	iResponseBundle;
+	RParameterFamilyBundle	iRequestBundle;
+	RParameterFamilyBundle 	iQueueBundle;
+
+	
+	TBool 	iResponseBlocked;
+	TNodeId	iUdpClientFlow;
+	TNodeId	iUdpServerFlow;	
+	TNodeId	iTcpServerFlow;
+		
+	RBuf8								iCallbackUrl;
+	RPointerArray<CSubscriptionInfo>	iSubscriptions;
+};
+
+inline TNodeId CUPnPControlSubConnectionProvider::UdpClientFlow ( )
+	{
+	return iUdpClientFlow;
+	}
+
+inline void CUPnPControlSubConnectionProvider::SetUdpClientFlow ( const TNodeId& aCommsId )
+	{
+	iUdpClientFlow = aCommsId;
+	}
+	
+inline TNodeId CUPnPControlSubConnectionProvider::UdpServerFlow ( )
+	{
+	return iUdpServerFlow;
+	}
+	
+inline void CUPnPControlSubConnectionProvider::SetUdpServerFlow ( const TNodeId& aCommsId )
+	{
+	iUdpServerFlow = aCommsId;
+	}
+	
+inline TNodeId CUPnPControlSubConnectionProvider::TcpServerFlow ( )
+	{
+	return iTcpServerFlow;
+	}
+	
+inline void CUPnPControlSubConnectionProvider::SetTcpServerFlow ( const TNodeId& aCommsId )
+	{
+	iTcpServerFlow = aCommsId;
+	}
+	
+const TDesC8& CUPnPControlSubConnectionProvider::Callback ( ) const
+	{
+	return iCallbackUrl;
+	}
+	
+TBool CUPnPControlSubConnectionProvider::IsClosing ( )
+	{
+	// Note: this API is not helping as UPnP parallel activities
+	// may have same id value
+	// return CountActivities ( ECFActivityDestroy ) == 1 ? ETrue : EFalse;
+	// check if control client i.e CSubConnection is joined or not
+	RNodeInterface* cc = GetFirstClient<TDefaultClientMatchPolicy> ( TCFClientType::ECtrl );		
+	return cc == NULL ? ETrue : EFalse;
+	}	
+
+#endif // UPNPCONTROLSCPR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlscpractivities.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,329 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPCONTROLSCPRACTIVITIES_H
+#define __UPNPCONTROLSCPRACTIVITIES_H
+
+#include <comms-infras/corescpractivities.h>
+#include <comms-infras/ss_nodemessages.h>
+#include <comms-infras/ss_corepractivities.h>
+#include <http/thttptable.h>
+
+#include "upnpctrlscpr.h"
+#include "upnp_cf_msgs.h"
+
+
+using namespace ESock;
+using namespace MeshMachine;
+
+namespace UPnPControlSCprActivities
+	{	
+	DECLARE_ACTIVITY_MAP ( activityMap )
+	}
+
+class CUPnPActivityBase : public CNodeParallelActivityBase
+	{
+protected:
+	CUPnPActivityBase ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivitiesCount )
+		:CNodeParallelActivityBase ( aActivitySig, aNode, aActivitiesCount )	
+		{ }
+	
+	~CUPnPActivityBase ( ); 	
+ 	virtual TBool Next ( TNodeContextBase& aContext );
+ 
+ public:
+ 	TNodeId iFlowId;
+ 	CUPnPRequestParamSetBase* iRequestParamSet;
+ 
+ public:
+ 	typedef TNodeContext<CUPnPControlSubConnectionProvider, CoreStates::TContext> TContext;
+ 	
+ 	//States
+	DECLARE_SMELEMENT_HEADER ( TStopCurrentActivities, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPActivityBase::TContext )
+    	virtual void DoL ( );    	
+    DECLARE_SMELEMENT_FOOTER ( TStopCurrentActivities)    
+   
+	//TState Forks
+	DECLARE_SMELEMENT_HEADER ( TStopActivityOrStopDataClient, TStateFork<TContext>, NetStateMachine::MStateFork, CUPnPActivityBase::TContext )
+		virtual TInt TransitionTag ( );
+	DECLARE_SMELEMENT_FOOTER ( TStopActivityOrStopDataClient )	
+
+	//Transitions
+	DECLARE_SMELEMENT_HEADER ( TAwaitingResponseToStopActivities, TState<TContext>, NetStateMachine::MState, CUPnPActivityBase::TContext )
+		virtual TBool Accept ( );
+	DECLARE_SMELEMENT_FOOTER ( TAwaitingResponseToStopActivities )
+
+    DECLARE_AGGREGATED_TRANSITION2(
+       TProcessClientLeave,
+       TRemoveClient,
+       CoreNetStates::TSendLeaveCompleteIfRequest
+	   )
+	};
+//---------------------------------------Control Point Search Request Activity-------------------------------------
+class CUPnPSearchActivity: public CUPnPActivityBase							 
+	{
+public:	    
+	static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+	~CUPnPSearchActivity ( );
+     
+private:
+	CUPnPSearchActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivitiesCount )
+		:CUPnPActivityBase ( aActivitySig, aNode, aActivitiesCount )
+	  	{	  	
+	  	}		
+		
+public:
+ 	typedef TNodeContext<CUPnPControlSubConnectionProvider, CoreStates::TContext> TContext;
+ 
+	//States
+	typedef TAwaitingMessageState<TUpnpMessage::TSearchRequest> TAwaitingSearchRequest;
+
+	DECLARE_SMELEMENT_HEADER ( TAwaitingReceiveSearchResponse, TState<TContext>, NetStateMachine::MState, CUPnPSearchActivity::TContext )
+	virtual TBool Accept ( );
+	DECLARE_SMELEMENT_FOOTER ( TAwaitingReceiveSearchResponse )
+	
+	typedef TAwaiting2MessagesState<TUpnpMessage::TCancelled, TUpnpMessage::TUPnPSearchResponse> TAwaitingDataClientStopResponse;
+
+	//Transitions
+    DECLARE_SMELEMENT_HEADER ( TSendSearchRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPSearchActivity::TContext )
+    	virtual void DoL ( );    	
+    DECLARE_SMELEMENT_FOOTER ( TSendSearchRequest )    
+	
+	DECLARE_SMELEMENT_HEADER ( TProcessResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPSearchActivity::TContext )
+    	virtual void DoL ( );    	
+    DECLARE_SMELEMENT_FOOTER ( TProcessResponse )    
+
+	DECLARE_SMELEMENT_HEADER ( TCleanupActivity, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPSearchActivity::TContext )
+    	virtual void DoL ( );    	
+	DECLARE_SMELEMENT_FOOTER ( TCleanupActivity)    
+
+	DECLARE_SMELEMENT_HEADER ( TCancelSearchRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPSearchActivity::TContext )
+    	virtual void DoL ( );
+	DECLARE_SMELEMENT_FOOTER ( TCancelSearchRequest )
+ 	};
+
+//---------------------------------------Control Point Register Notify Request Activity-------------------------------------
+class CUPnPRegisterNotifyActivity: public CUPnPActivityBase							 
+	{
+public:	    
+	static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+	~CUPnPRegisterNotifyActivity ( );
+     
+private:
+	CUPnPRegisterNotifyActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivitiesCount )
+		:CUPnPActivityBase ( aActivitySig, aNode, aActivitiesCount )
+	  	{	  	
+	  	}		
+		
+public:
+	typedef TNodeContext<CUPnPControlSubConnectionProvider, CoreStates::TContext> TContext;
+ 
+	//States
+	typedef TAwaitingMessageState<TUpnpMessage::TRegisterNotifyRequest> TAwaitingRegisterNotifyRequest;
+
+	DECLARE_SMELEMENT_HEADER ( TAwaitingReceiveNotifivation, TState<TContext>, NetStateMachine::MState, CUPnPRegisterNotifyActivity::TContext )
+	virtual TBool Accept ( );
+	DECLARE_SMELEMENT_FOOTER ( TAwaitingReceiveNotifivation )
+	
+	typedef TAwaitingMessageState<TCFDataClient::TStarted> TAwaitingServerStarted;
+	typedef TAwaiting2MessagesState<TUpnpMessage::TCancelled, TUpnpMessage::TUPnPSearchResponse> TAwaitingDataClientStopResponse;
+	
+	//Transitions        
+    DECLARE_SMELEMENT_HEADER ( TStartServer, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+    	virtual void DoL ( );
+    DECLARE_SMELEMENT_FOOTER ( TStartServer )    
+
+	DECLARE_SMELEMENT_HEADER ( TSendRegisterRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+    	virtual void DoL ( );    	
+    DECLARE_SMELEMENT_FOOTER ( TSendRegisterRequest )    
+
+	DECLARE_SMELEMENT_HEADER ( TProcessNotification, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+    	virtual void DoL ( );    	
+    DECLARE_SMELEMENT_FOOTER ( TProcessNotification )    
+
+	DECLARE_SMELEMENT_HEADER ( TCancelRegisterRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+    	virtual void DoL ( );    	
+    DECLARE_SMELEMENT_FOOTER ( TCancelRegisterRequest )    
+
+ 	DECLARE_SMELEMENT_HEADER ( TCleanupActivity, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+    	virtual void DoL ( );    	
+	DECLARE_SMELEMENT_FOOTER ( TCleanupActivity )
+	};
+
+//---------------------------------------Control Point Describe Request Activity-------------------------------------
+class CUpnpDescribeActivity: public CUPnPActivityBase
+	{
+public:
+	static CNodeActivityBase* NewL( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+	~CUpnpDescribeActivity();
+	
+private:
+	CUpnpDescribeActivity( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount )
+		:CUPnPActivityBase ( aActivitySig, aNode, aActivityCount )
+		{ }
+		
+public:
+	typedef TNodeContext<CUPnPControlSubConnectionProvider, CoreStates::TContext> TContext;
+ 
+ 	// States
+	typedef TAwaitingMessageState<TUpnpMessage::TDescribeRequest> TAwaitingDescribeRequest;
+	
+	DECLARE_SMELEMENT_HEADER( TAwaitingErrorOrResponseOrCancel, TState<TContext>, NetStateMachine::MState, CUpnpDescribeActivity::TContext )
+		TBool Accept();
+	DECLARE_SMELEMENT_FOOTER ( TAwaitingErrorOrResponseOrCancel )
+
+	DECLARE_SMELEMENT_HEADER ( TAwaitingDataClientStopResponse, TState<TContext>, NetStateMachine::MState, CUPnPRegisterNotifyActivity::TContext )
+		virtual TBool Accept ( );
+	DECLARE_SMELEMENT_FOOTER ( TAwaitingDataClientStopResponse )
+
+	// Transitions
+	DECLARE_SMELEMENT_HEADER ( TSendDescribeRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TSendDescribeRequest )
+
+	DECLARE_SMELEMENT_HEADER ( TProcessResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+		void DoL();
+		void Error( TInt aError );
+	DECLARE_SMELEMENT_FOOTER ( TProcessResponse )
+
+	DECLARE_SMELEMENT_HEADER ( TReportError, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TReportError )
+
+	DECLARE_SMELEMENT_HEADER ( TCleanupActivity, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TCleanupActivity )
+
+	DECLARE_SMELEMENT_HEADER ( TDataClientStop, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+    	virtual void DoL ( );    	
+	DECLARE_SMELEMENT_FOOTER ( TDataClientStop)    
+	};
+
+
+//---------------------------------------Control Point Subscribe Request Activity-------------------------------------
+class CUpnpSubscribeActivity: public CUPnPActivityBase
+	{
+public:
+	static CNodeActivityBase* NewL( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+	~CUpnpSubscribeActivity();
+	
+private:
+	CUpnpSubscribeActivity( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount )
+		:CUPnPActivityBase ( aActivitySig, aNode, aActivityCount )
+		{ }
+	
+public :
+	CSubscriptionInfo*  iSubscriptionInfo; // Not owned
+	
+public: // States	
+	typedef TNodeContext<CUPnPControlSubConnectionProvider, CoreStates::TContext> TContext;
+ 
+	typedef TAwaitingMessageState<TUpnpMessage::TSubscribeRequest> TAwaitingSubscribeRequest;
+			
+	DECLARE_SMELEMENT_HEADER ( TAwaitingErrorOrResponseOrCancel, TState<TContext>, NetStateMachine::MState, CUpnpSubscribeActivity::TContext )
+		TBool Accept();
+	DECLARE_SMELEMENT_FOOTER ( TAwaitingErrorOrResponseOrCancel )
+
+public: // Transitions
+	DECLARE_SMELEMENT_HEADER ( TSendSubscribeRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TSendSubscribeRequest )
+
+	DECLARE_SMELEMENT_HEADER ( TProcessSubscribeResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+		void DoL();
+		void Error( TInt aError );
+	DECLARE_SMELEMENT_FOOTER ( ProcessSubscribeResponse )
+
+	DECLARE_SMELEMENT_HEADER ( TReportError, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TReportError )
+	
+	DECLARE_SMELEMENT_HEADER ( TSendUnsubscribeRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TSendUnsubscribeRequest )
+	
+	DECLARE_SMELEMENT_HEADER ( TProcessUnsubscribeResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER ( TProcessUnsubscribeResponse )
+	};
+
+class CUpnpUnSubscribeActivity: public CUPnPActivityBase
+	{
+public:
+	static CNodeActivityBase* NewL( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+	~CUpnpUnSubscribeActivity();
+		
+private:
+	CUpnpUnSubscribeActivity( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount )
+		:CUPnPActivityBase ( aActivitySig, aNode, aActivityCount )
+		{ }
+	
+private:
+	CSubscriptionInfo*  iSubscriptionInfo; // Not Owned
+	
+public:
+	typedef TNodeContext<CUPnPControlSubConnectionProvider, CoreStates::TContext> TContext;
+
+	// States
+	DECLARE_SMELEMENT_HEADER ( TAwaitingUnSubscribeRequest, TState<TContext>, NetStateMachine::MState, CUpnpUnSubscribeActivity::TContext )
+		TBool Accept();
+	DECLARE_SMELEMENT_FOOTER( TAwaitingUnSubscribeRequest )
+	
+	typedef TAwaiting2MessagesState<TEBase::TError, TUpnpMessage::TResponse> TAwaitingErrorOrResponse;
+
+public: // Transitions				
+	DECLARE_SMELEMENT_HEADER ( TSendUnSubscribeRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpUnSubscribeActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TSendUnSubscribeRequest )
+
+	DECLARE_SMELEMENT_HEADER ( TProcessResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpUnSubscribeActivity::TContext )
+		void DoL();		
+	DECLARE_SMELEMENT_FOOTER ( TProcessResponse )
+	};
+
+	
+class CUpnpNotificationActivity: public CNodeParallelActivityBase
+	{
+public:
+	static CNodeActivityBase* NewL( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+	~CUpnpNotificationActivity();
+	
+private:
+	CUpnpNotificationActivity( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount );
+	
+private:
+	RBuf8	   iBodyBuf;
+	TPtrC8	   iPublisherUrl;
+	CTransaction* iTransaction;
+	TInt		iResponseStatus;
+	
+private: // Context
+	typedef TNodeContext<CUPnPControlSubConnectionProvider, CoreStates::TContext> TContext;
+
+public: 
+	// Transitions
+	DECLARE_SMELEMENT_HEADER ( TProcessNotifyRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpNotificationActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TProcessNotifyRequest )
+
+	DECLARE_SMELEMENT_HEADER ( TSendResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpNotificationActivity::TContext )
+		void DoL();
+	DECLARE_SMELEMENT_FOOTER( TSendResponse )	
+	};	
+ 
+#endif // UPNPCONTROLSCPRACTIVITIES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlscprfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPCONTROLSCPRFACTORY_H
+#define __UPNPCONTROLSCPRFACTORY_H
+
+#include <comms-infras/ss_subconnprov.h>
+
+class CUPnPControlSubConnectionProviderFactory : public ESock::CSubConnectionProviderFactoryBase
+	{		
+public:
+	// ECOM interface implementation ID
+	static const TUint iUid = 0x2000D057;
+
+public:
+	static CUPnPControlSubConnectionProviderFactory* NewL(TAny* aParentContainer);
+
+protected:
+	CUPnPControlSubConnectionProviderFactory(
+		TUid aFactoryId, 
+		ESock::CSubConnectionFactoryContainer& aParentContainer);
+
+protected:
+    // CSubConnectionProviderFactoryBase overrides
+	virtual ESock::ACommsFactoryNodeId* DoCreateObjectL(ESock::TFactoryQueryBase& aQuery);
+	};
+
+#endif // UPNPCONTROLSCPRFACTORY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpctrlscprstates.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,164 @@
+// 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 __UPNPCONTROLSCPRSTATES_H
+#define __UPNPCONTROLSCPRSTATES_H
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/corescprstates.h>
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_corepractivities.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <ss_glob.h>
+
+//Local Includes
+#include "upnpctrlscpr.h"
+#include "upnpservicescpr.h"
+#include "upnpservicedeftscpr.h"
+#include "upnpflowfactory.h"
+#include "upnpflowbase.h"
+
+
+using namespace MeshMachine;
+
+	
+
+namespace UPnPControlSCprStates
+{
+typedef TNodeContext<CUPnPControlSubConnectionProvider, SCprStates::TContext> TContext;
+
+//-------------------------------------------------States-----------------------------------------------------
+
+DECLARE_SMELEMENT_HEADER ( TAwaitingDataClientJoin, TState<TContext>, NetStateMachine::MState, TContext )
+	virtual TBool Accept ( );
+DECLARE_SMELEMENT_FOOTER ( TAwaitingDataClientJoin )
+
+	
+//---------------------------------------------Transitions-----------------------------------------------------
+DECLARE_SMELEMENT_HEADER ( TStoreRequestParams, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreRequestParams )
+
+DECLARE_SMELEMENT_HEADER ( TSendRequestParamResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TSendRequestParamResponse )
+
+DECLARE_AGGREGATED_TRANSITION2 (
+	TStoreParamsAndSendResponse,
+   	TStoreRequestParams,
+   	TSendRequestParamResponse
+   	)
+
+DECLARE_SMELEMENT_HEADER ( TInitiateActivities, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TInitiateActivities )
+     
+DECLARE_SMELEMENT_HEADER ( TCreateControlDataClient, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( ); 
+DECLARE_SMELEMENT_FOOTER ( TCreateControlDataClient )
+
+DECLARE_SMELEMENT_HEADER ( TProcessCallbackDataClient, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TProcessCallbackDataClient )
+
+DECLARE_SMELEMENT_HEADER ( TSendActivityStopped, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TSendActivityStopped )
+
+DECLARE_SMELEMENT_HEADER ( TFindOrCreateHttpClientFlow, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+		void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TFindOrCreateHttpClientFlow )
+
+DECLARE_SMELEMENT_HEADER ( TProcessHttpDataClient, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+		void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TProcessHttpDataClient )
+
+//--------------------------------------------State Forks--------------------------------------------
+DECLARE_SMELEMENT_HEADER ( TFindHttpClientFlowOrSendRequest, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TFindHttpClientFlowOrSendRequest )
+
+
+} //end of UPnPControlSCprStates
+
+namespace UPnPSearchStates
+{
+typedef TNodeContext<CUPnPControlSubConnectionProvider, SCprStates::TContext> TContext;
+//Search Request 
+DECLARE_SMELEMENT_HEADER ( TFindUdpClientFlowOrSendRequest, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TFindUdpClientFlowOrSendRequest )
+
+DECLARE_SMELEMENT_HEADER ( TStoreUdpClientFlowAndSendRequest, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreUdpClientFlowAndSendRequest )
+
+DECLARE_SMELEMENT_HEADER ( TCancelSearchOrProcessResponseTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TCancelSearchOrProcessResponseTag )	
+
+DECLARE_SMELEMENT_HEADER ( TNoTagOrResponseTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TNoTagOrResponseTag )	
+
+}//end of UPnP Search states.
+
+
+namespace UPnPRegisterNotifyStates
+{
+typedef TNodeContext<CUPnPControlSubConnectionProvider, SCprStates::TContext> TContext;
+//RegisterNotify Request 
+DECLARE_SMELEMENT_HEADER ( TFindMUdpFlowOrSendRequest, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TFindMUdpFlowOrSendRequest )
+
+DECLARE_SMELEMENT_HEADER ( TStoreMUdpFlowAndStartServer, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreMUdpFlowAndStartServer )
+
+DECLARE_SMELEMENT_HEADER ( TCancelRegisterOrProcessResponseTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TCancelRegisterOrProcessResponseTag )	
+
+DECLARE_SMELEMENT_HEADER ( TNoTagOrResponseTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TNoTagOrResponseTag )	
+
+}//end of Register Notify states.
+
+namespace UPnPDescribeStates
+{
+typedef TNodeContext<CUPnPControlSubConnectionProvider, SCprStates::TContext> TContext;
+
+DECLARE_SMELEMENT_HEADER ( TCancelDescribeOrProcessResponseTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TCancelDescribeOrProcessResponseTag )	
+}
+
+namespace UPnPSubscribeStates
+{
+typedef TNodeContext<CUPnPControlSubConnectionProvider, SCprStates::TContext> TContext;
+
+DECLARE_SMELEMENT_HEADER ( TErrorOrProcessResponseTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TErrorOrProcessResponseTag )
+
+DECLARE_SMELEMENT_HEADER ( TNoTagOrCancelSubscribe, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TNoTagOrCancelSubscribe )
+}
+
+#endif // UPNPCONTROLSCPRSTATES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpmcpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,86 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPMCPR_H
+#define __UPNPMCPR_H
+
+#include <comms-infras/coremcpr.h>
+#include <rsockethandler.h>
+#include <csocketopener.h>
+#include <in_sock.h>
+#include <cchunkmanager.h>
+
+class CUPnPMetaConnectionProvider : public CCoreMetaConnectionProvider,
+								public MSocketHandlerObserver
+	{
+public:
+	static CUPnPMetaConnectionProvider* NewL (
+		ESock::CMetaConnectionProviderFactoryBase& aFactory, 
+		const ESock::TProviderInfo& aProviderInfo );
+	virtual ~CUPnPMetaConnectionProvider ();
+		
+	const TDesC8& DeviceLocationUrl ();	
+	CChunkManager* ChunkManager();
+private:
+	CUPnPMetaConnectionProvider (
+		ESock::CMetaConnectionProviderFactoryBase& aFactory, 
+		const ESock::TProviderInfo& aProviderInfo, 
+		const MeshMachine::TNodeActivityMap& aActivityMap );
+	void ConstructL ();
+
+private:
+    virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );    
+	void FindLocalHost ();
+	TInt GenerateDeviceLocation ( const TInetAddr& aAddr );
+	
+	//From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	inline void ConnectComplete ();
+	inline void AcceptComplete ( RInternalSocket& aSocket );
+	inline void SendComplete ( TInt aLength );
+	inline void SendToComplete ( TInt aLength );
+	inline void RecvComplete ( RMBufChain& aData );
+	inline void RecvFromComplete ( RMBufChain& aData, const TSockAddr& aAddr );
+	void Error ( TOperation aOperation, TInt aError  );
+	
+private:
+	CSocketOpener*	iSocketOpener;
+	RInternalSocket iSocket;
+	RBuf8			iDeviceLocation;
+	CChunkManager*  iChunkManager;
+	};
+
+
+void CUPnPMetaConnectionProvider::ConnectComplete ()
+	{ }
+	
+void CUPnPMetaConnectionProvider::AcceptComplete ( RInternalSocket& /*aSocket*/ )
+	{ }
+
+void CUPnPMetaConnectionProvider::SendComplete ( TInt /*aLength*/ )
+	{ }
+	
+void CUPnPMetaConnectionProvider::SendToComplete ( TInt /*aLength*/ )
+	{ }
+
+void CUPnPMetaConnectionProvider::RecvComplete ( RMBufChain& /*aData*/ )
+	{ }
+	
+void CUPnPMetaConnectionProvider::RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{ }
+#endif // UPNPMCPR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpmcpractivities.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,29 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPMCPRACTIVITIES_H
+#define __UPNPMCPRACTIVITIES_H
+
+#include <comms-infras/coremcpractivities.h>
+
+namespace UPnPMCprActivities
+{
+	DECLARE_ACTIVITY_MAP(activityMap)
+}
+
+#endif // UPNPMCPRACTIVITIES_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpmcprfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPMCPRFACTORY_H
+#define __UPNPMCPRFACTORY_H
+
+#include <comms-infras/ss_metaconnprov.h>
+
+class CUPnPMetaConnectionProviderFactory : public ESock::CMetaConnectionProviderFactoryBase
+	{		
+public:
+	// ECOM interface implementation ID
+	static const TUint iUid = 0x2000D055;
+
+public:
+	static CUPnPMetaConnectionProviderFactory* NewL(TAny* aParentContainer);
+	
+protected:
+	CUPnPMetaConnectionProviderFactory(
+		TUid aFactoryId, 
+		ESock::CMetaConnectionFactoryContainer& aParentContainer);
+
+protected:
+	// CMetaConnectionProviderFactoryBase overrides
+	ESock::ACommsFactoryNodeId* DoCreateObjectL(ESock::TFactoryQueryBase& aQuery);
+	};
+
+#endif // UPNPMCPRFACTORY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpscpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSCPR_H_
+#define __UPNPSCPR_H_
+
+#include <comms-infras/corescpr.h>
+#include "upnpcpr.h"
+
+class CUPnPSubConnectionProvider : public CCoreSubConnectionProvider
+	{
+public:
+	
+	virtual ~CUPnPSubConnectionProvider();
+	CUPnPConnectionProvider& BaseConnectionProvider ( );
+protected:
+	CUPnPSubConnectionProvider(ESock::CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap);
+	
+	};
+
+
+#endif /*__UPNPSCPR_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnpstatemachine.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,255 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSTATEMACHINE_H_
+#define __UPNPSTATEMACHINE_H_
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/corescprstates.h>
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_corepractivities.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <ss_glob.h>
+
+//Local Includes
+#include "upnpctrlscpr.h"
+#include "upnpservicescpr.h"
+#include "upnpservicedeftscpr.h"
+#include "upnpflowfactory.h"
+#include "upnpflowbase.h"
+
+namespace UPnPStateMachine
+{
+	//Should never be used except for the MM itself
+	const TInt KSendRequest 		= NetStateMachine::KExecuteAlways - 5;	
+	const TInt KProcessResponse		= NetStateMachine::KExecuteAlways - 6;
+	const TInt KDescribeRequest   	= NetStateMachine::KExecuteAlways - 7;
+	const TInt KSubscribeRequest  	= NetStateMachine::KExecuteAlways - 8;
+	const TInt KUnsubscribeRequest	= NetStateMachine::KExecuteAlways - 9;
+	const TInt KNotifyRequest     	= NetStateMachine::KExecuteAlways - 10;
+	const TInt KDeviceTag	     	= NetStateMachine::KExecuteAlways - 11;
+	const TInt KServiceTag			= NetStateMachine::KExecuteAlways - 12;
+	const TInt KRootRegisteredTag	= NetStateMachine::KExecuteAlways - 13;	
+	const TInt KStart				= NetStateMachine::KExecuteAlways - 14;	
+	const TInt KStop				= NetStateMachine::KExecuteAlways - 15;
+	const TInt KActivityStop		= NetStateMachine::KExecuteAlways - 16;
+	const TInt KCreateIconTag		= NetStateMachine::KExecuteAlways - 17;
+	const TInt KIconCreatedTag		= NetStateMachine::KExecuteAlways - 18;
+	const TInt KIconRequest		= NetStateMachine::KExecuteAlways - 19;
+	
+enum TUpnpServerFlowType
+	{
+	ECallback,
+	ERootDescription,
+	EDescription,
+	ESubscription,
+	EControl,
+	};
+
+typedef TNodeContext<CUPnPSubConnectionProvider, PRStates::TContext> TContext;
+
+DECLARE_SMELEMENT_HEADER ( TAwaitingSetParamRequest, TState<TContext>, NetStateMachine::MState, TContext )
+	virtual TBool Accept ( );
+DECLARE_SMELEMENT_FOOTER ( TAwaitingSetParamRequest )
+	
+typedef TAwaitingMessageState<TUpnpMessage::TCreateServerFlow> TAwaitingServerFlowRequest;
+typedef TAwaitingMessageState<TUpnpMessage::TUPnPRequestInfo> TAwaitingUpnpRequestInfo;
+typedef TAwaiting2MessagesState<TUpnpMessage::TLocalHost, TEBase::TError> TAwaitingLocalHostFromMCpr;
+typedef TAwaitingMessageState<TUpnpMessage::TUPnPSearchRequest> TAwaitingSearchRequest;
+
+
+DECLARE_SMELEMENT_HEADER ( TFindOrCreateUdpClientFlow, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TFindOrCreateUdpClientFlow )
+
+
+DECLARE_SMELEMENT_HEADER ( TFindOrCreateUdpServerFlow, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TFindOrCreateUdpServerFlow )
+
+	
+template<TUpnpServerFlowType FLOWTYPE>
+class TCreateServerFlow : public TStateTransition<PRStates::TContext>
+    {
+public:
+	NETSM_TPL_DECLARE_CTR ( TCreateServerFlow, NetStateMachine::MStateTransition, PRStates::TContext )
+
+    TCreateServerFlow ( PRStates::TContext& aContext )
+    	: TStateTransition<PRStates::TContext> ( aContext )
+        {
+        }
+        
+	virtual void DoL ( )
+		{
+		ASSERT ( this->iContext.iNodeActivity );
+		
+		const TUint8* uriPtr = NULL;
+		TUint size = 0;
+		switch ( FLOWTYPE )
+			{
+		case ECallback:
+			{
+			CUPnPControlSubConnectionProvider& node = static_cast<CUPnPControlSubConnectionProvider&> ( iContext.Node() );
+			uriPtr = node.Callback( ).Ptr ( );
+			size = node.Callback( ).Size ( );
+			}
+			break;
+				
+		case EDescription:
+			{
+			CUPnPServiceSubConnectionProvider& node1 = static_cast<CUPnPServiceSubConnectionProvider&> ( iContext.Node ( ) );
+			uriPtr = node1.Key ( ).Ptr ( );
+			size = node1.Key ( ).Size ( );
+			}
+			break;
+				
+		case ESubscription:
+			{
+			CUPnPServiceSubConnectionProvider& node2 = static_cast<CUPnPServiceSubConnectionProvider&> ( iContext.Node ( ) );
+			uriPtr = node2.EventUrl ( ).Ptr ( );
+			size = node2.EventUrl ( ).Size ( );
+			}
+			break;
+				
+		case EControl:
+			{
+			CUPnPServiceSubConnectionProvider& node3 = static_cast<CUPnPServiceSubConnectionProvider&> ( iContext.Node ( ) );
+			uriPtr = node3.ControlUrl ( ).Ptr ( );
+			size = node3.ControlUrl ( ).Size ( );
+			}
+			break;
+				
+		case ERootDescription:
+			{
+			CUPnPServiceDefaultSubConnectionProvider& node4 = static_cast<CUPnPServiceDefaultSubConnectionProvider&> (iContext.Node());
+			uriPtr = node4.Key ( ).Ptr ( );
+			size = node4.Key ( ).Size ( );		
+			}
+			break;
+				
+		default:
+			break;
+			}
+			
+		const TUid requestedUid = { CUPnPFlowFactory::iUid };
+		THttpServerFlowQuery flowQuery ( uriPtr,
+										 size,
+										 iContext.NodeId (),
+										 EHttpServerFlow );
+		
+		ESock::TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery );
+		
+		TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+		Messages::TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+		iContext.iNodeActivity->PostRequestTo( factoryContainer, msg );
+		}
+    };
+
+
+DECLARE_SMELEMENT_HEADER ( TStartServerFlow, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStartServerFlow )
+    
+DECLARE_AGGREGATED_TRANSITION2 (
+	TProcessServerFlowCreation,
+	PRStates::TProcessDataClientCreation,
+	TStartServerFlow	
+	)
+
+DECLARE_SMELEMENT_HEADER ( THandleControlChannelDataClientIdle, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( THandleControlChannelDataClientIdle )
+		
+	
+DECLARE_SMELEMENT_HEADER ( TRequestLocalHost, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TRequestLocalHost )
+
+
+DECLARE_SMELEMENT_HEADER ( TSendIgnoreResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TSendIgnoreResponse )
+
+    
+DECLARE_SMELEMENT_HEADER ( TRequestOrIgnoreTag, TStateFork<PRStates::TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TRequestOrIgnoreTag )
+
+
+DECLARE_SMELEMENT_HEADER ( TDiscardSearchRequestData, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TDiscardSearchRequestData )
+
+
+DECLARE_SMELEMENT_HEADER ( TDestroyDataClients, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TDestroyDataClients )
+
+
+DECLARE_SMELEMENT_HEADER ( TStopDataClients, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStopDataClients )
+	
+
+DECLARE_SMELEMENT_HEADER ( TAwaitingToStopDataClients, TState<TContext>, NetStateMachine::MState, TContext )
+	virtual TBool Accept ( );
+DECLARE_SMELEMENT_FOOTER ( TAwaitingToStopDataClients )
+
+DECLARE_SMELEMENT_HEADER ( TAwaitingBindToComplete, TState<TContext>, NetStateMachine::MState, TContext )
+virtual TBool Accept ( );
+DECLARE_SMELEMENT_FOOTER ( TAwaitingBindToComplete )
+
+DECLARE_SMELEMENT_HEADER ( TStoreBindToOriginator, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreBindToOriginator )
+
+
+
+
+// State Forks..
+
+struct TCheckIfAllActivitiesStopped
+	{
+	// graceful closing of activites is not needed in case of service point,
+	// since the State machines are simple and there are no lo
+	static TBool IsBlocked ( TNodeContextBase& aContext )
+		{
+		// wait untill all upnp activites are done with protocol specific transactions
+		return aContext.iNode.CountAllActivities ( ) == 1 ? EFalse : ETrue;
+		}
+	};
+	
+DECLARE_SERIALIZABLE_STATE(
+	TBlockedByAllActivitiesStopped,
+    TCheckIfAllActivitiesStopped,
+    TNoTag    
+    )
+
+// Utiliy API's
+class CUPnPUtils
+	{
+public:
+	static TInt ExtractVersionNumber ( const TDesC8& aSearchTarget, TInt& aUriIndex );	
+	static void CleanupMBufChain ( TAny* aAny );
+	static void FindAndSendIconDataL ( CTransaction* aTransaction, TInt& aStatus, RMemoryAllocator& aAllocator );
+	};
+
+}
+
+#endif /*__UPNPSTATEMACHINE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnptiermanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPTIERMANAGER_H
+#define __UPNPTIERMANAGER_H
+
+#include <comms-infras/coretiermanager.h>
+
+
+class CUPnPTierManager : public CCoreTierManager
+	{
+public:		
+	static CUPnPTierManager* NewL(ESock::CTierManagerFactoryBase& aFactory);
+	virtual ~CUPnPTierManager();
+
+protected:
+	CUPnPTierManager(ESock::CTierManagerFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap);
+	virtual ESock::MProviderSelector* DoCreateProviderSelectorL(const Meta::SMetaData& aSelectionPreferences);
+	virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
+	};
+	
+#endif // UPNPTIERMANAGER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnptiermanageractivities.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,29 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPTIERMANAGERACTIVITIES_H
+#define __UPNPTIERMANAGERACTIVITIES_H
+
+#include <comms-infras/coretiermanageractivities.h>
+
+namespace UPnPTierManagerActivities
+{
+	DECLARE_ACTIVITY_MAP(activityMap)
+}
+
+#endif // UPNPTIERMANAGERACTIVITIES_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnptiermanagerfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPTIERMANAGERFACTORY_H
+#define __UPNPTIERMANAGERFACTORY_H
+
+#include <comms-infras/ss_tiermanager.h>
+
+class CUPnPTierManagerFactory : public ESock::CTierManagerFactoryBase
+	{		
+public:
+	// ECOM interface implementation ID
+	static const TUint iUid = 0x2000D054;
+
+public:
+	static CUPnPTierManagerFactory* NewL(TAny* aParentContainer);
+
+protected:
+	CUPnPTierManagerFactory(
+		TUid aFactoryId, 
+		ESock::CTierManagerFactoryContainer& aParentContainer);
+
+protected:
+    // CTierManagerFactoryBase overrides    
+    ESock::ACommsFactoryNodeId* DoCreateObjectL(ESock::TFactoryQueryBase& /* aQuery */);
+	};
+	
+#endif // UPNPTIERMANAGERFACTORY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/inc/upnptiermanagerselector.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#ifndef __UPNPTIERMANAGERSELECTOR_H
+#define __UPNPTIERMANAGERSELECTOR_H
+
+#include <comms-infras/simpleselectorbase.h>
+
+class TUPnPProviderSelectorFactory
+	{
+public:
+	static ESock::MProviderSelector* NewSelectorL(const Meta::SMetaData& aSelectionPreferences);
+	};
+	
+class CUPnPProviderSelector : public CBase, public ASimpleSelectorBase
+	{
+public:
+	explicit CUPnPProviderSelector(const Meta::SMetaData& aSelectionPreferences);
+
+private:
+	virtual void SelectL(ESock::ISelectionNotify& aSelectionNotify);
+	};
+
+#endif // UPNPTIERMANAGERSELECTOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/ecom_impl.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,50 @@
+// 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:
+// ECOM Implementation for the UPnP Comms Framework Factories
+// @file
+// @internalComponent
+// 
+//
+
+#include <ecom/implementationproxy.h>
+#include <ecom/ecom.h>
+
+#include "upnptiermanagerfactory.h"
+#include "upnpmcprfactory.h"
+#include "upnpctrlcprfactory.h"
+#include "upnpctrlscprfactory.h"
+#include "upnpservicecprfactory.h"
+#include "upnpservicescprfactory.h"
+#include "upnpflowfactory.h"
+#include "app_protintf_fact.h"
+
+
+const TImplementationProxy ImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY(CUPnPTierManagerFactory::iUid, CUPnPTierManagerFactory::NewL),
+	IMPLEMENTATION_PROXY_ENTRY(CUPnPMetaConnectionProviderFactory::iUid, CUPnPMetaConnectionProviderFactory::NewL),
+	IMPLEMENTATION_PROXY_ENTRY(CUPnPControlConnectionProviderFactory::iUid, CUPnPControlConnectionProviderFactory::NewL),
+    IMPLEMENTATION_PROXY_ENTRY(CUPnPControlSubConnectionProviderFactory::iUid, CUPnPControlSubConnectionProviderFactory::NewL),
+	IMPLEMENTATION_PROXY_ENTRY(CUPnPServiceConnectionProviderFactory::iUid, CUPnPServiceConnectionProviderFactory::NewL),
+    IMPLEMENTATION_PROXY_ENTRY(CUPnPServiceSubConnectionProviderFactory::iUid, CUPnPServiceSubConnectionProviderFactory::NewL),
+    IMPLEMENTATION_PROXY_ENTRY(CUPnPFlowFactory::iUid, CUPnPFlowFactory::NewL),    
+	IMPLEMENTATION_PROXY_ENTRY( CApplicationProtocolIntfFactory::iUid, CApplicationProtocolIntfFactory::NewL )
+    };
+
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+    {
+    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpcpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,85 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "upnp_cf_msgs.h"
+#include "upnpcpr.h"
+#include "upnpmcpr.h"
+
+using namespace ESock;
+using namespace MeshMachine;
+
+CUPnPConnectionProvider::CUPnPConnectionProvider ( CConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap )
+	: CCoreConnectionProvider ( aFactory, aActivityMap ), 
+	TIfStaticFetcherNearestInHierarchy ( this )
+	{
+	
+	}
+
+CUPnPConnectionProvider::~CUPnPConnectionProvider()
+	{
+	
+	}
+
+CChunkManager* CUPnPConnectionProvider::MemoryManager ( )
+	{
+#if !defined(__GCCXML__)
+	CMetaConnectionProviderBase& mcprBase = mnode_cast<CMetaConnectionProviderBase>(ControlProvider()->RecipientId().Node());	
+#else
+	CMetaConnectionProviderBase& mcprBase =
+			reinterpret_cast<CMetaConnectionProviderBase&> ( ControlProvider()->RecipientId().Node() );
+#endif
+
+	CUPnPMetaConnectionProvider& mcpr = static_cast<CUPnPMetaConnectionProvider&> ( mcprBase );
+	return mcpr.ChunkManager();
+	}
+
+RMemoryAllocator& CUPnPConnectionProvider::MemoryAllocator()
+	{
+	iAllocator.SetChunkManager(MemoryManager());
+	return iAllocator;
+	}
+
+TInt CUPnPConnectionProvider::CheckPolicy ( const TSecurityPolicy& aPolicy ) const
+	{		
+	ASSERT ( iPlatsecApiExt );
+	return iPlatsecApiExt->CheckPolicy ( aPolicy );
+	}
+
+const TDesC8& CUPnPConnectionProvider::RootDeviceLocation ( )
+	{
+#if !defined(__GCCXML__)
+	CMetaConnectionProviderBase& mcprBase = mnode_cast<CMetaConnectionProviderBase>(ControlProvider()->RecipientId().Node());	
+#else
+	CMetaConnectionProviderBase& mcprBase =
+			reinterpret_cast<CMetaConnectionProviderBase&> ( ControlProvider()->RecipientId().Node() );
+#endif
+
+	CUPnPMetaConnectionProvider& mcpr = static_cast<CUPnPMetaConnectionProvider&> ( mcprBase );
+	return mcpr.DeviceLocationUrl ();
+	}
+
+void CUPnPConnectionProvider::ReturnInterfacePtrL ( MPlatsecApiExt*& aInterface )
+  	{
+  	aInterface = this;
+  	}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlcpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,79 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <comms-infras/ss_msgintercept.h>
+
+#include "upnpctrlcpractivities.h"
+#include "upnpmcpr.h"
+
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPCprTag KESockConnectionTag
+#endif
+
+using namespace Messages;
+using namespace MeshMachine;
+using namespace ESock;
+using namespace NetInterfaces;
+
+CUPnPControlConnectionProvider* CUPnPControlConnectionProvider::NewL ( CConnectionProviderFactoryBase& aFactory )
+	{
+    CUPnPControlConnectionProvider* provider = new ( ELeave ) CUPnPControlConnectionProvider ( aFactory, UPnPControlCprActivities::activityMap::Self() );
+    CleanupStack::PushL ( provider );
+    provider->ConstructL ( );
+    CleanupStack::Pop ( provider );
+	return provider;
+	}
+
+CUPnPControlConnectionProvider::~CUPnPControlConnectionProvider ( )
+	{	
+	LOG_NODE_DESTROY ( KUPnPCprTag, CUPnPControlConnectionProvider );		
+	}
+
+CUPnPControlConnectionProvider::CUPnPControlConnectionProvider ( CConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap )
+	: CUPnPConnectionProvider ( aFactory, aActivityMap )
+	{
+	LOG_NODE_CREATE ( KUPnPCprTag, CUPnPControlConnectionProvider );	
+	}
+
+void CUPnPControlConnectionProvider::ConstructL ( )
+	{		
+	CCoreConnectionProvider::ConstructL ( );
+	}
+
+#ifdef SYMBIAN_NETWORKING_UPS
+TInt CUPnPControlConnectionProvider::GetProcessAndThreadId ( TProcessId& aProcessId, TThreadId& aThreadId ) const
+	{
+	return iPlatsecApiExt->GetProcessAndThreadId ( aProcessId, aThreadId );	
+	}
+#endif	
+
+void CUPnPControlConnectionProvider::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	TNodeContext<CUPnPControlConnectionProvider> ctx(*this, aMessage, aSender, aRecipient);	
+	ESOCK_DEBUG_MESSAGE_INTERCEPT ( aSender, aMessage, aRecipient );
+	if ( aMessage.IsMessage<TCFServiceProvider::TStart> ( ) || aMessage.IsMessage<TCFServiceProvider::TStop> ( ) )
+		{
+		iPlatsecApiExt = reinterpret_cast<MPlatsecApiExt*> ( address_cast<TNodeId> ( aSender ).Node ( ).FetchNodeInterfaceL ( MPlatsecApiExt::KInterfaceId ) );
+		}
+	CCoreConnectionProvider::ReceivedL ( aSender, aRecipient, aMessage );
+	User::LeaveIfError ( ctx.iReturn );
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlcpractivities.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+// 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:
+// UPnPCtrCprActivities.cpp
+// @file
+// @internalComponent
+// 
+//
+
+#include <comms-infras/ss_corepractivities.h>
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_nodemessages_internal_esock.h>
+
+#include "upnpctrlcpractivities.h"
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+#include "upnp_cf_msgs.h"
+
+
+using namespace CoreNetStates;
+using namespace CoreStates;
+using namespace MeshMachine;
+using namespace UPnPControlCprActivities;
+
+namespace UPnPControlCprStartActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivityStart, UPnPControlCprStart, TCFServiceProvider::TStart, PRActivities::CStartActivity::NewL)
+    FIRST_NODEACTIVITY_ENTRY(CoreNetStates::TAwaitingStart, CoreNetStates::TNoTagOrBearerPresentBlockedByStop)    
+	NODEACTIVITY_ENTRY(KBearerPresent, CoreNetStates::TBindSelfToPresentBearer, CoreNetStates::TAwaitingBindToComplete, TTag<KBearerPresent>)
+	NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendNoBearer, MeshMachine::TAwaitingMessageState<TCFControlProvider::TBearer>, TTag<KBearerPresent>)
+
+	//Start the service provider, use the default cancellation.
+	//Forward TCancel to the service provider, wait for TStarted or TError (via the Error Activity)
+	//When TStarted arrives after TCancel the activity will move to the nearest KErrorTag
+	NODEACTIVITY_ENTRY(KBearerPresent, CoreNetStates::TStartServiceProviderRetry, CoreNetStates::TAwaitingStarted, TNoTagOrErrorTag)
+	LAST_NODEACTIVITY_ENTRY(KErrorTag, MeshMachine::TDoNothing)
+	//Start data clients, use the default cancellation.
+	//Forward TCancel to the self, wait for TDataClientStarted or TError (via the Error Activity)
+	//When TDataClientStarted arrives after TCancel the activity will move to the nearest KErrorTag
+	NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TStartSelf, CoreNetStates::TAwaitingDataClientStarted, TNoTagOrErrorTag)
+	NODEACTIVITY_ENTRY(KNoTag, UPnPStateMachine::TRequestLocalHost, UPnPStateMachine::TAwaitingLocalHostFromMCpr, TNoTagOrErrorTag)
+	
+	NODEACTIVITY_ENTRY(KErrorTag, CoreNetStates::TStopSelf, CoreNetStates::TAwaitingDataClientStopped, TErrorTag)
+	LAST_NODEACTIVITY_ENTRY(KErrorTag, MeshMachine::TDoNothing)
+	
+	LAST_NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendStarted)
+NODEACTIVITY_END()
+}
+
+namespace UPnPControlCprActivities
+{
+	DEFINE_ACTIVITY_MAP(activityMap)
+	ACTIVITY_MAP_ENTRY(UPnPControlCprStartActivity, UPnPControlCprStart)
+	ACTIVITY_MAP_END_BASE(CprActivities, coreCprActivities)
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlcprfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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 <comms-infras/ss_msgintercept.h>
+
+#include "upnpctrlcprfactory.h"
+#include "upnpctrlcpr.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPCprFactoryTag KESockConnectionTag
+#endif
+
+CUPnPControlConnectionProviderFactory* CUPnPControlConnectionProviderFactory::NewL(TAny* aParentContainer)
+	{
+	return new (ELeave) CUPnPControlConnectionProviderFactory(
+		TUid::Uid(CUPnPControlConnectionProviderFactory::iUid), 
+		*reinterpret_cast<CConnectionFactoryContainer*>(aParentContainer));
+	}
+	
+CUPnPControlConnectionProviderFactory::CUPnPControlConnectionProviderFactory(TUid aFactoryId, CConnectionFactoryContainer& aParentContainer)
+	: CConnectionProviderFactoryBase(aFactoryId, aParentContainer)
+    {
+//	LOG_NODE_CREATE(KUPnPCprFactoryTag, CUPnPControlConnectionProviderFactory);
+    }
+
+ACommsFactoryNodeId* CUPnPControlConnectionProviderFactory::DoCreateObjectL(ESock::TFactoryQueryBase& /*aQuery*/)	
+    {    
+    CConnectionProviderBase* provider = CUPnPControlConnectionProvider::NewL(*this);    
+	ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
+    return provider;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrldeftscpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_msgintercept.h>
+
+//Local Includes
+#include "upnpctrldeftscpr.h"
+#include "upnpctrldeftscpractivities.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPDefaultSCprTag KESockSubConnectionTag
+#endif
+
+using namespace ESock;
+using namespace Messages;
+
+CUPnPControlDefaultSubConnectionProvider* CUPnPControlDefaultSubConnectionProvider::NewL(ESock::CSubConnectionProviderFactoryBase& aFactory)
+	{
+	CUPnPControlDefaultSubConnectionProvider* provider = new (ELeave) CUPnPControlDefaultSubConnectionProvider(aFactory, UPnPControlDefaultSCprActivities::activityMap::Self());
+	CleanupStack::PushL(provider);
+	provider->ConstructL();
+	CleanupStack::Pop(provider);
+	return provider;
+	}
+
+CUPnPControlDefaultSubConnectionProvider::~CUPnPControlDefaultSubConnectionProvider()
+	{
+	LOG_NODE_DESTROY(KUPnPDefaultSCprTag, CUPnPControlDefaultSubConnectionProvider);
+	}
+
+CUPnPControlDefaultSubConnectionProvider::CUPnPControlDefaultSubConnectionProvider(ESock::CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap)
+	: CUPnPSubConnectionProvider(aFactory, aActivityMap)
+	{
+	LOG_NODE_CREATE(KUPnPDefaultSCprTag, CUPnPControlDefaultSubConnectionProvider);    
+	}
+
+void CUPnPControlDefaultSubConnectionProvider::ConstructL()
+	{
+	CCoreSubConnectionProvider::ConstructL();
+	}
+
+void CUPnPControlDefaultSubConnectionProvider::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	ESOCK_DEBUG_MESSAGE_INTERCEPT(aSender, aMessage, aRecipient);
+	MeshMachine::TNodeContext<CUPnPControlDefaultSubConnectionProvider> ctx(*this, aMessage, aSender, aRecipient);	    
+	CCoreSubConnectionProvider::ReceivedL(aSender, aRecipient, aMessage);
+	User::LeaveIfError(ctx.iReturn);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrldeftscpractivities.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,89 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_corepractivities.h>
+
+//Local Includes
+#include "upnpctrldeftscpractivities.h"
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+#include "upnpctrlscpractivities.h"
+using namespace ESock;
+using namespace MeshMachine;
+using namespace CoreActivities;
+using namespace CoreNetStates;
+using namespace CoreStates;
+using namespace UPnPStateMachine;
+using namespace PRActivities;
+
+namespace UPnPDefaultSCprBindToActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( ECFActivityBindTo, UPnPDefaultSCprBindToRequest, TCFDataClient::TBindTo, PRActivities::CBindToActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CoreNetStates::TAwaitingBindTo, PRActivities::CBindToActivity::TNoTagOrBearerReady )
+    
+    THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TStoreBindToOriginator, TNoTag )
+    NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TSendControlClientJoinRequest, CoreStates::TAwaitingJoinComplete, TNoTag )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TFindOrCreateUdpClientFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, TTag<KBindToComplete> )
+	
+	LAST_NODEACTIVITY_ENTRY ( KBindToComplete, ABindingActivity::TSendBindToComplete )
+
+	NODEACTIVITY_ENTRY ( KErrorTag, CoreNetStates::TSendClientLeavingRequestToServiceProvider, CoreStates::TAwaitingLeaveComplete, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TRaiseAndClearActivityError )		
+NODEACTIVITY_END ( )
+}
+
+namespace UPnPCtrlDeftScprLeaveActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityClientLeave, UPnPCtrlDeftScprLeave, TNodeSignal::TNullMessageId ) //May be waiting for both messages
+	FIRST_NODEACTIVITY_ENTRY ( CoreStates::TAwaitingClientLeave, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, UPnPDefaultSCprLeaveActivity::TProcessClientLeave, UPnPDefaultSCprLeaveActivity::TNoTagOrDataClientIdle )
+	THROUGH_NODEACTIVITY_ENTRY ( KDataClientIdle, CoreNetStates::TSendDataClientIdle, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TDoNothing )
+NODEACTIVITY_END ()
+}
+
+namespace UPnPCtrlDeftScprDestroyActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( ECFActivityDestroy, UPnPCtrlDeftScprDestroy, TEChild::TDestroy, CoreActivities::CDestroyActivity::New )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingDestroy, TNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, UPnPStateMachine::TStopDataClients, UPnPStateMachine::TAwaitingToStopDataClients, CoreNetStates::TNoTagOrUnbindOnStop )
+	NODEACTIVITY_ENTRY ( CoreNetStates::KUnbind, CoreNetStates::TSendClientLeavingRequestToServiceProvider, CoreStates::TAwaitingLeaveComplete, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TSendClientLeavingAndRemoveControlProvider )
+NODEACTIVITY_END ( )
+}
+
+namespace UPnPControlDefaultSCprActivities
+{
+DEFINE_ACTIVITY_MAP ( activityMap )
+	ACTIVITY_MAP_ENTRY ( UPnPDefaultSCprBindToActivity, UPnPDefaultSCprBindToRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPCtrlDeftScprLeaveActivity, UPnPCtrlDeftScprLeave )
+	ACTIVITY_MAP_ENTRY ( UPnPCtrlDeftScprDestroyActivity, UPnPCtrlDeftScprDestroy )
+ACTIVITY_MAP_END_BASE ( SCprActivities, coreSCprActivities )
+}
+
+
+DEFINE_SMELEMENT ( UPnPDefaultSCprLeaveActivity::TNoTagOrDataClientIdle, NetStateMachine::MStateFork, UPnPDefaultSCprLeaveActivity::TContext )
+TInt UPnPDefaultSCprLeaveActivity::TNoTagOrDataClientIdle::TransitionTag ( )
+	{
+	TUint ccCount = iContext.Node ( ).CountClients<TDefaultClientMatchPolicy> ( TClientType ( TCFClientType::ECtrl ) );
+	return ccCount == 0 ? KDataClientIdle : KNoTag;	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlscpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,476 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <comms-infras/ss_msgintercept.h>
+#include "upnp_cf_msgs.h"
+#include "upnpsubconnevents.h"
+#include "upnpctrlscpractivities.h"
+#include "upnpuuid.h"
+#include "upnplog.h"
+#include "upnpcpr.h"
+
+__FLOG_STMT(_LIT8(KComponent,"UPnPCtrlScpr");)
+
+using namespace ESock;
+
+CUPnPControlSubConnectionProvider* CUPnPControlSubConnectionProvider::NewL ( CSubConnectionProviderFactoryBase& aFactory )
+	{
+	CUPnPControlSubConnectionProvider* provider = new (ELeave) CUPnPControlSubConnectionProvider ( aFactory, UPnPControlSCprActivities::activityMap::Self() );
+	CleanupStack::PushL ( provider );
+	provider->ConstructL ( );
+	CleanupStack::Pop ( provider );
+	return provider;
+	}
+
+CUPnPControlSubConnectionProvider::~CUPnPControlSubConnectionProvider ( )
+	{
+	LOG_NODE_DESTROY(KSubsysCtrlScpr, CUPnPControlSubConnectionProvider);	
+	iResponseBundle.Close( );	
+	iFlowInfo.Reset ( );
+	iSubscriptions.ResetAndDestroy();
+	iCallbackUrl.Close();
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("Destroyed CUPnPControlSubConnectionProvider")));
+	}
+
+
+CUPnPControlSubConnectionProvider::CUPnPControlSubConnectionProvider ( CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap )
+	: CUPnPSubConnectionProvider ( aFactory, aActivityMap ),
+	iTcpSrvFlowCreateRequested ( EFalse ), iResponseBlocked ( EFalse ), iUdpClientFlow ( TNodeId::NullId ( ) ), iUdpServerFlow ( TNodeId::NullId ( ) ), iTcpServerFlow ( TNodeId::NullId ( ) )
+	{
+	LOG_NODE_CREATE(KSubsysCtrlScpr, CUPnPControlSubConnectionProvider);    
+	}
+
+void CUPnPControlSubConnectionProvider::ConstructL ( )
+	{
+	CCoreSubConnectionProvider::ConstructL();	
+	// make sure bundle constructs are initialised.
+	iResponseBundle.CreateL ();	
+	iResponseBundle.Open ();
+	
+	iRequestBundle.CreateL ();
+	iQueueBundle.CreateL ();
+		
+	RParameterFamily discover = iQueueBundle.CreateFamilyL ( EUPnPDiscoverResponseParamSet );
+	RParameterFamily presenceNotify = iQueueBundle.CreateFamilyL ( EUPnPPresenceAnnouncementParamSet );
+	RParameterFamily absenceNotify =  iQueueBundle.CreateFamilyL ( EUPnPAbsenceAnnouncementParamSet );
+	RParameterFamily describe =  iQueueBundle.CreateFamilyL ( EUPnPDescribeResponseParamSet );
+	RParameterFamily subscribe =  iQueueBundle.CreateFamilyL ( EUPnPSubscribeResponseParamSet );
+	RParameterFamily eventNotify =  iQueueBundle.CreateFamilyL ( EUPnPNotifyEventParamSet );
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("Created CUPnPControlSubConnectionProvider")));
+	}
+
+void CUPnPControlSubConnectionProvider::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	ESOCK_DEBUG_MESSAGE_INTERCEPT ( aSender, aMessage, aRecipient );
+	TNodeContext<CUPnPControlSubConnectionProvider> ctx(*this, aMessage, aSender, aRecipient);	
+    CCoreSubConnectionProvider::ReceivedL ( aSender, aRecipient, aMessage );   
+    User::LeaveIfError (  ctx.iReturn );
+	}
+	
+void CUPnPControlSubConnectionProvider::HandlePassThroughMessage ( MeshMachine::TNodeContextBase& aContext )
+  	{
+  	AMMNodeBase::HandlePassThroughMessage (aContext);
+  	
+  	if ( aContext.iMessage.MessageId ().MessageId () != Messages::KNullMessageId )
+  	// message is not handled by any of the upnp activity, free the data passed by dataplane
+  		{
+  		if ( aContext.iMessage.MessageId ().MessageId () == TUpnpMessage::TCancelParamSet::EId )
+			{
+			TUpnpMessage::TCancelParamSet& msg = message_cast< TUpnpMessage::TCancelParamSet > ( aContext.iMessage );
+			CUPnPRequestParamSetBase* cancelParamSet = static_cast<CUPnPRequestParamSetBase*> ( msg.iParamSet );
+			
+			STypeId metaType = cancelParamSet->GetTypeId( );
+    		
+    		if ( metaType.iType == EUPnPCancelDescribeParamSet )
+    			{
+    			CleanupEventQueuedResponses ( cancelParamSet->Uri (), EUPnPDescribeResponseParamSet );	    			
+				delete static_cast<CUPnPCancelDiscoverParamSet*> ( cancelParamSet );
+    			}
+			}
+  		}
+  		
+  	// clear message id now
+  	aContext.iMessage.ClearMessageId ( );
+  	}
+	
+		
+void CUPnPControlSubConnectionProvider::InitiateActivitiesL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateActivitiesL")));
+	RParameterFamily paramFamily = iRequestBundle.GetFamilyAtIndex (0);
+	switch ( paramFamily.Id() )
+		{
+		case EUPnPClearParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateActivitiesL - TUPnPParamSetFamily::EUPnPClearParamSet")));
+			ClearResponseParamL ( );			
+			}
+			break;
+		case EUPnPDiscoverRequestParamSet:
+		case EUPnPRegisterAnnouncementParamSet:
+		case EUPnPDescribeRequestParamSet:
+		case EUPnPSubscribeRequestParamSet:		
+		case EUPnPCancelDiscoverParamSet:
+		case EUPnPCancelDescribeParamSet:
+		case EUPnPCancelSubscribeParamSet:
+		case EUPnPCancelRegisterNotifyParamSet:
+			{	
+			InitiateRequestL ( paramFamily ) ;
+			}
+			break;
+		default:
+			break;
+		}		
+		iRequestBundle.DeleteFamilyAtIndex (0);
+	}
+
+void CUPnPControlSubConnectionProvider::ClearResponseParamL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::ClearResponseParamL")));	
+	
+	iResponseBlocked = EFalse;	
+	NotifySubConnectionIfResultsAvailable ();
+	}
+	
+void CUPnPControlSubConnectionProvider::NotifySubConnectionIfResultsAvailable ( )	
+	{
+	if ( IsClosing ( ) )
+		{		
+		return;
+		}
+		
+	TUint32 familyType;
+	if ( CheckForResultsAvailability ( familyType ) )
+	 	{
+		TRAP_IGNORE ( NotifySubConnectionL ( familyType ) );
+	 	}
+	}
+	
+void CUPnPControlSubConnectionProvider::NotifySubConnectionL ( const TUint32 aFamilyId )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::NotifySubConnectionL")));
+	RParameterFamily respFamily = iResponseBundle.CreateFamilyL ( aFamilyId );	
+	RParameterFamily queueFamily = iQueueBundle.FindFamily ( aFamilyId );
+	
+	TInt count = queueFamily.CountParameterSets ( RParameterFamily::ERequested );
+	TInt pos;
+	for ( pos = 0; pos < count; pos++ )
+		{
+		XParameterSetBase* paramSet = queueFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested );
+		respFamily.AddParameterSetL ( paramSet,	RParameterFamily::ERequested );
+		queueFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested);
+		}
+	
+	// Cant help it out......tried to convince ESock team
+	pos = count - 1;
+	while ( pos >= 0 )
+		{
+		reinterpret_cast<RUPnPParameterFamily*>(&queueFamily)->DeleteParamSetL ( pos );
+		--pos;
+		}
+	
+	CUPnPSubConnEvent* subConnEvent = CUPnPSubConnEvent::NewL ( );
+	
+	TCleanupItem item ( &CUPnPSubConnEvent::CleanupSubConnEvent, subConnEvent );
+	CleanupStack::PushL ( item );
+	subConnEvent->SetFamily ( aFamilyId );
+	NotifyClientsL ( *subConnEvent );
+	CleanupStack::Pop ( ); // item
+	
+	iResponseBlocked = ETrue;		
+	}
+
+TBool CUPnPControlSubConnectionProvider::CheckForResultsAvailability ( TUint32& aFamilyId )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::CheckForResultsAvailability")));
+	TInt familyCount = iQueueBundle.CountParameterFamilies ();
+	for( TInt index = 0; index < familyCount; index++ )
+		{
+		RParameterFamily paramFamily = iQueueBundle.GetFamilyAtIndex ( index );
+		if( paramFamily.CountParameterSets ( RParameterFamily::ERequested ) > 0)
+			{
+			//There are pending responses available. return the family id.
+			aFamilyId = paramFamily.Id();
+			return ETrue;
+			}
+		}
+	return EFalse;
+	}
+
+
+CUPnPControlConnectionProvider& CUPnPControlSubConnectionProvider::ConnectionProvider ( )
+	{
+	CUPnPConnectionProvider& cprBase = BaseConnectionProvider();
+	return static_cast<CUPnPControlConnectionProvider&>(cprBase);
+	}	
+
+	
+void CUPnPControlSubConnectionProvider::InitiateRequestL ( RParameterFamily& aReqFamily )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL")));
+	TInt familyId = aReqFamily.Id();
+	TUint count = aReqFamily.CountParameterSets ( RParameterFamily::ERequested );
+	
+	switch(familyId)
+		{
+		case EUPnPDiscoverRequestParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPDiscoverRequestParamSet")));
+			// while ( count != 0 )
+			for ( TInt pos = 0; pos < count; pos++ )
+				{
+				LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPDiscoverRequestParamSet - Posting message TUpnpMessage::TSearchRequest")));
+				//post the message to start the activity and takes ownership of parameter set								
+				CUPnPDiscoverRequestParamSet* paramSet = static_cast<CUPnPDiscoverRequestParamSet*> (aReqFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+				RClientInterface::OpenPostMessageClose ( NodeId (), NodeId (), TUpnpMessage::TSearchRequest ( paramSet ).CRef () );
+				aReqFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested );
+				}
+				break;
+			}
+		case EUPnPCancelDiscoverParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPCancelDiscoverParamSet")));
+			for ( TInt pos = 0; pos < count; pos++ )
+				{
+				LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPCancelDiscoverParamSet - Posting message TUpnpMessage::TDataClientStop")));
+				//post the message to start the activity and takes ownership of parameter set
+				CUPnPCancelDiscoverParamSet* paramSet = static_cast<CUPnPCancelDiscoverParamSet*> (aReqFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+				RClientInterface::OpenPostMessageClose ( NodeId (), NodeId (), TUpnpMessage::TCancelParamSet ( paramSet ).CRef () );
+				aReqFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested );				
+				}
+				break;
+			}
+		case EUPnPRegisterAnnouncementParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPRegisterAnnouncementParamSet")));
+			for ( TInt pos = 0; pos < count; pos++ )			
+				{
+				LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPRegisterAnnouncementParamSet - Posting message TUpnpMessage::TRegisterNotifyRequest")));
+				//post the message to start the activity and takes ownership of parameter set				
+				CUPnPRegisterAnnouncementParamSet* paramSet = static_cast<CUPnPRegisterAnnouncementParamSet*> (aReqFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+				RClientInterface::OpenPostMessageClose ( NodeId (), NodeId (), TUpnpMessage::TRegisterNotifyRequest ( paramSet ).CRef () );				
+				aReqFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested );				
+				}
+			break;
+			}
+		case EUPnPCancelRegisterNotifyParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPCancelRegisterNotifyParamSet")));
+			for ( TInt pos = 0; pos < count; pos++ )			
+				{
+				LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPCancelRegisterNotifyParamSet - Posting message TUpnpMessage::TDataClientStop")));
+				CUPnPCancelRegisterNotifyParamSet* paramSet = static_cast<CUPnPCancelRegisterNotifyParamSet*> (aReqFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+				//post the message to start the activity and takes ownership of parameter set				
+				RClientInterface::OpenPostMessageClose ( NodeId (), NodeId (), TUpnpMessage::TCancelParamSet ( paramSet ).CRef () );
+				aReqFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested );				
+				}
+			break;
+			}
+		case EUPnPDescribeRequestParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPDescribeRequestParamSet")));
+			for ( TInt pos = 0; pos < count; pos++ )			
+				{
+				LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPDescribeRequestParamSet - Posting message TUpnpMessage::TDescribeRequest")));
+				//post the message to start the activity and takes ownership of parameter set
+				CUPnPDescribeRequestParamSet* paramSet = static_cast<CUPnPDescribeRequestParamSet*> (aReqFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+				RClientInterface::OpenPostMessageClose ( NodeId (), NodeId (), TUpnpMessage::TDescribeRequest ( paramSet ).CRef () );				
+				aReqFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested );				
+				}
+			break;
+			}
+		case EUPnPCancelDescribeParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPCancelDescribeParamSet")));
+			for ( TInt pos = 0; pos < count; pos++ )			
+				{
+				LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPCancelDescribeParamSet - Posting message TUpnpMessage::TDataClientStop")));
+				//post the message to start the activity and takes ownership of parameter set
+				CUPnPCancelDescribeParamSet* paramSet = static_cast<CUPnPCancelDescribeParamSet*> (aReqFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+				RClientInterface::OpenPostMessageClose ( NodeId (), NodeId (), TUpnpMessage::TCancelParamSet ( paramSet ).CRef () );				
+				aReqFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested );			
+				}
+			break;
+			}
+		case EUPnPSubscribeRequestParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPSubscribeRequestParamSet")));
+			
+			GenerateCallbackUrlL ();			
+			for ( TInt pos = 0; pos < count; pos++ )			
+				{
+				LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPSubscribeRequestParamSet - Posting message TUpnpMessage::TSubscribeRequest")));
+				//post the message to start the activity and takes ownership of parameter set				
+				CUPnPSubscribeRequestParamSet* paramSet = static_cast<CUPnPSubscribeRequestParamSet*> (aReqFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+				RClientInterface::OpenPostMessageClose ( NodeId (), NodeId (), TUpnpMessage::TSubscribeRequest ( paramSet ).CRef () );				
+				aReqFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested );				
+				}
+			break;
+			}
+		case EUPnPCancelSubscribeParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPCancelSubscribeRequestParamSet")));		
+			for ( TInt pos = 0; pos < count; pos++ )			
+				{
+				LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPCancelSubscribeRequestParamSet - Posting message TUpnpMessage::TSubscribeRequest")));
+				//post the message to start the activity and takes ownership of parameter set
+				CUPnPCancelSubscribeParamSet* paramSet = static_cast<CUPnPCancelSubscribeParamSet*> (aReqFamily.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+				RClientInterface::OpenPostMessageClose ( NodeId (), NodeId (), TUpnpMessage::TCancelParamSet ( paramSet ).CRef () );								
+				aReqFamily.ClearParameterSetPointer( pos, RParameterFamily::ERequested );				
+				}
+			break;
+			}
+		default:
+			break;
+		}		
+	}
+
+void CUPnPControlSubConnectionProvider::AddResponseParamSetL ( XParameterSetBase* aResponseSet, const TUint32 aFamilyId )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::AddResponseParamSetL")));
+	__ASSERT_DEBUG( aResponseSet != NULL, User::Invariant() );
+	if ( IsClosing ( ) )
+		{
+		delete aResponseSet;
+		return;
+		}	
+	
+	RParameterFamily queueFamily = iQueueBundle.FindFamily ( aFamilyId );
+	queueFamily.AddParameterSetL ( aResponseSet, RParameterFamily::ERequested );
+	
+	if(!iResponseBlocked)
+		{
+		NotifySubConnectionL(aFamilyId);
+		}
+	}
+
+void CUPnPControlSubConnectionProvider::GenerateCallbackUrlL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::GenerateCallbackUrlL")));
+	if ( iCallbackUrl.Length ( ) != 0 )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::GenerateCallbackUrlL - Callback url already present")));
+		return;
+		}
+	RBuf8 uuid;
+	UpnpUuid::GenerateUuidL( uuid );
+	CleanupClosePushL( uuid );
+	
+#if !defined(__GCCXML__)
+	CConnectionProviderBase& cprBase = mnode_cast<CConnectionProviderBase>(ControlProvider()->RecipientId().Node());	
+#else
+	CConnectionProviderBase& cprBase =
+		reinterpret_cast<CConnectionProviderBase&>(ControlProvider()->RecipientId().Node());		
+#endif
+
+	CUPnPControlConnectionProvider& upnpCpr = static_cast<CUPnPControlConnectionProvider&>(cprBase);
+	const TDesC8& rootLoc = upnpCpr.RootDeviceLocation ();
+	
+	iCallbackUrl.CreateL ( rootLoc.Length ( ) + uuid.Length ( ) );
+	iCallbackUrl.Copy ( rootLoc );
+	iCallbackUrl.Append ( uuid );
+	CleanupStack::PopAndDestroy( &uuid );
+	}
+
+// UPnp Subscription Information Elements management API's
+CSubscriptionInfo* CUPnPControlSubConnectionProvider::GetSubscriptionInfoByUrl( const TDesC8& aPublishUrl )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::GetSubscriptionInfoByUrl")));
+	TUint count = iSubscriptions.Count ( );
+	for ( TInt index = 0; index < count; index++ )
+		{		
+		if ( iSubscriptions[index]->iPublishUrl.CompareF ( aPublishUrl ) == 0 )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::GetSubscriptionInfoByUrl - Found subscription info")));
+			return iSubscriptions[index];
+			}
+		}
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::GetSubscriptionInfoByUrl - Subscription info not found")));
+	return NULL;
+	}
+
+CSubscriptionInfo* CUPnPControlSubConnectionProvider::GetSubscriptionInfoBySid ( const TDesC8& aSid )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::GetSubscriptionInfoBySid")));
+	TUint count = iSubscriptions.Count ( );
+	for ( TInt index = 0; index < count; index++ )
+		{		
+		if ( iSubscriptions[index]->iSid.CompareF ( aSid ) == 0 )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::GetSubscriptionInfoBySid - Found subscription info")));
+			return iSubscriptions[index];
+			}
+		}
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::GetSubscriptionInfoBySid - Subscription info not found")));
+	return NULL;
+	}
+
+void CUPnPControlSubConnectionProvider::AddSubscriptionInfoL(CSubscriptionInfo* aSubscriptionInfo)
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::AddSubscriptionInfoL")));
+	iSubscriptions.Append ( aSubscriptionInfo );
+	}
+
+void CUPnPControlSubConnectionProvider::RemoveSubscriptionInfo ( const TDesC8& aSid )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CUPnPControlSubConnectionProvider::RemoveSubscriptionInfo by Sid ")));	
+	CSubscriptionInfo* info = GetSubscriptionInfoBySid ( aSid );
+	__ASSERT_DEBUG ( info != NULL, User::Invariant ( ) );
+	
+	CleanupEventQueuedResponses ( info->iPublishUrl, EUPnPNotifyEventParamSet );
+	
+	TInt pos = iSubscriptions.Find ( info );
+	iSubscriptions.Remove ( pos );
+	delete info;
+	}
+
+void CUPnPControlSubConnectionProvider::CleanupEventQueuedResponses ( const TDesC8& aUrl, TUint aFamilyId )
+	{	
+	RParameterFamily family = GetUPnPFamilyById ( aFamilyId );
+		
+	// check if response is already available and delete it
+	TInt pos = family.CountParameterSets ( RParameterFamily::ERequested ) - 1;
+	while ( pos >= 0 )
+		{
+		CUPnPRequestParamSetBase* paramSet = static_cast<CUPnPRequestParamSetBase*> ( family.GetParameterSetAtIndex ( pos, RParameterFamily::ERequested ) );
+		if ( paramSet->Uri ().CompareF ( aUrl ) == 0 )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysCtrlScpr, KComponent, _L8("CleanupEventQueuedResponses - Queued notification is deleted %d "), pos));
+			TRAP_IGNORE ( reinterpret_cast<RUPnPParameterFamily*>(&family)->DeleteParamSetL( pos ) );
+			}
+		--pos;
+		}
+		
+	}
+
+RParameterFamily CUPnPControlSubConnectionProvider::GetUPnPFamilyById ( TUint32 aFamilyId )
+	{
+	RParameterFamily family;
+	
+	TUint fC = iQueueBundle.CountParameterFamilies ();
+	for ( TInt pos = 0; pos < fC; pos++ )
+		{
+		family = iQueueBundle.GetFamilyAtIndex ( pos );
+		if ( aFamilyId== family.Id() )
+			{
+			break;
+			}
+		}
+	return family;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlscpractivities.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1195 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_corepractivities.h>
+#include <ss_glob.h>
+#include <upnp/tupnptable.h>
+#include <httpstringconstants.h>
+#include <httperr.h>
+#include <rmemchunk.h>
+
+//Local Includes
+#include "upnpflowbase.h"
+#include "upnpctrlscpractivities.h"
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+
+using namespace MeshMachine;
+using namespace CoreNetStates;
+using namespace CoreStates;
+using namespace UPnPControlSCprActivities;
+using namespace PRActivities;
+using namespace UPnPStateMachine;
+using namespace UPnPControlSCprStates;
+
+
+__FLOG_STMT(_LIT8(KComponent,"UPnPCPActivities");)
+
+
+namespace UPnPControlSCprParamRequestActivity
+{
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityParamRequest, UPnPControlSCprParamRequest, TCFScpr::TSetParamsRequest )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingSetParamRequest, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TStoreParamsAndSendResponse )
+NODEACTIVITY_END ()
+#else
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityParamRequest, UPnPControlSCprParamRequest, TCFScpr::TParamsRequest )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingSetParamRequest, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TStoreParamsAndSendResponse )
+NODEACTIVITY_END ()
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+}
+
+namespace UPnPControlSCprApplyRequestActivity
+{
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityApplyChanges, UPnPControlSCprApplyRequest, TCFScpr::TApplyRequest )
+	FIRST_NODEACTIVITY_ENTRY ( PRStates::TAwaitingApplyRequest, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TInitiateActivities, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TSendApplyResponse )
+NODEACTIVITY_END ()
+#else
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityApplyChanges, UPnPControlSCprApplyRequest, TCFScpr::TApplyRequest )
+	FIRST_NODEACTIVITY_ENTRY ( SCprStates::TAwaitingApplyRequest, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TInitiateActivities, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, SCprStates::TSendApplyResponse )
+NODEACTIVITY_END ()
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+}
+
+namespace UPnPControlSCprClientLeaveActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityClientLeave, UPnPControlSCprClientLeave, TNodeSignal::TNullMessageId ) //May be waiting for both messages
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingClientLeave, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CUPnPActivityBase::TProcessClientLeave, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TSendDataClientIdle )
+NODEACTIVITY_END ()
+}
+
+namespace UPnPControlSCprDestroyActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( ECFActivityDestroy, UPnPControlSCprDestroy, TEChild::TDestroy, CoreActivities::CDestroyActivity::New )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingDestroy, CUPnPActivityBase::TStopActivityOrStopDataClient)
+	NODEACTIVITY_ENTRY ( UPnPStateMachine::KActivityStop, CUPnPActivityBase::TStopCurrentActivities, CUPnPActivityBase::TAwaitingResponseToStopActivities, CUPnPActivityBase::TStopActivityOrStopDataClient )	
+	NODEACTIVITY_ENTRY ( CoreNetStates::KDataClientsToStop, UPnPStateMachine::TStopDataClients, UPnPStateMachine::TAwaitingToStopDataClients, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TSendClientLeavingAndRemoveControlProvider )
+NODEACTIVITY_END ( )
+}
+
+// Activity to create UPnP Flow for RSocket used in UPnP CONTROL Phase
+namespace UPnPControlSCprBinderRequestActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( ECFActivityBinderRequest, UPnPControlSCprBinderRequest, TCFServiceProvider::TCommsBinderRequest, CCommsBinderActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CoreNetStates::TAwaitingBinderRequest, CCommsBinderActivity::TNoTagOrUseExistingBlockedByBinderRequest )
+	NODEACTIVITY_ENTRY ( KNoTag, TCreateControlDataClient, CoreNetStates::TAwaitingDataClientJoin, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CCommsBinderActivity::TProcessDataClientCreation, TTag<KUseExisting> )	
+	NODEACTIVITY_ENTRY ( KUseExisting, CCommsBinderActivity::TSendBinderResponse, UPnPStateMachine::TAwaitingBindToComplete, TNoTagOrErrorTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TDoNothing )
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TClearError )
+NODEACTIVITY_END ()
+}
+
+// Handle DataClientIdle from UPnP Flow created for RSocket used in UPnP CONTROL Phase
+namespace UPnPControlSCprDataClientIdleActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityDataClientIdle, UPnPControlSCprDataClientIdle, TCFControlProvider::TIdle )
+    NODEACTIVITY_ENTRY ( KNoTag, UPnPStateMachine::THandleControlChannelDataClientIdle, CoreNetStates::TAwaitingDataClientIdle, TNoTag )
+NODEACTIVITY_END ( )
+}
+
+// UPnP discovery activity
+namespace UPnPSearchActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivitySearchRequest, UPnPSearchRequest, TUpnpMessage::TSearchRequest, CUPnPSearchActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUPnPSearchActivity::TAwaitingSearchRequest, UPnPSearchStates::TFindUdpClientFlowOrSendRequest )	
+	NODEACTIVITY_ENTRY ( KNoTag, TFindOrCreateUdpClientFlow, UPnPControlSCprStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TClearError )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, UPnPSearchStates::TStoreUdpClientFlowAndSendRequest )
+	THROUGH_NODEACTIVITY_ENTRY ( KSendRequest, CUPnPSearchActivity::TSendSearchRequest, TTag<KLoopTag> )
+	NODEACTIVITY_ENTRY ( KLoopTag, TDoNothing, CUPnPSearchActivity::TAwaitingReceiveSearchResponse, UPnPSearchStates::TCancelSearchOrProcessResponseTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KProcessResponse, CUPnPSearchActivity::TProcessResponse, TTag<KLoopTag | NetStateMachine::EBackward> )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KCancelTag, CUPnPSearchActivity::TCancelSearchRequest, TTag<KLoopTag> )
+	NODEACTIVITY_ENTRY ( KLoopTag, TDoNothing, CUPnPSearchActivity::TAwaitingDataClientStopResponse, UPnPSearchStates::TNoTagOrResponseTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KProcessResponse, CUPnPSearchActivity::TCleanupActivity, TTag<KLoopTag | NetStateMachine::EBackward> )
+	
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TClearError )
+NODEACTIVITY_END ()
+}
+
+// UPnP register notify activity
+namespace UPnPRegisterNotifyActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityRegisterNotifyRequest, UPnPRegisterNotifyRequest, TUpnpMessage::TRegisterNotifyRequest, CUPnPRegisterNotifyActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUPnPRegisterNotifyActivity::TAwaitingRegisterNotifyRequest, UPnPRegisterNotifyStates::TFindMUdpFlowOrSendRequest )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TFindOrCreateUdpServerFlow, UPnPControlSCprStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TClearError )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, UPnPRegisterNotifyStates::TStoreMUdpFlowAndStartServer )	
+	NODEACTIVITY_ENTRY ( KNoTag, CUPnPRegisterNotifyActivity::TStartServer, CUPnPRegisterNotifyActivity::TAwaitingServerStarted, TTag<KSendRequest> )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KSendRequest, CUPnPRegisterNotifyActivity::TSendRegisterRequest, TTag<KLoopTag> )
+	NODEACTIVITY_ENTRY ( KLoopTag, TDoNothing, CUPnPRegisterNotifyActivity::TAwaitingReceiveNotifivation, UPnPRegisterNotifyStates::TCancelRegisterOrProcessResponseTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KProcessResponse, CUPnPRegisterNotifyActivity::TProcessNotification, TTag< KLoopTag | NetStateMachine::EBackward > )
+
+	THROUGH_NODEACTIVITY_ENTRY ( KCancelTag, CUPnPRegisterNotifyActivity::TCancelRegisterRequest, TTag< KLoopTag > )
+	NODEACTIVITY_ENTRY ( KLoopTag, TDoNothing, CUPnPRegisterNotifyActivity::TAwaitingDataClientStopResponse, UPnPRegisterNotifyStates::TNoTagOrResponseTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KProcessResponse, CUPnPRegisterNotifyActivity::TCleanupActivity, TTag< KLoopTag | NetStateMachine::EBackward > )
+	
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TClearError )
+NODEACTIVITY_END ()
+}    
+
+// UPnP describe activity
+namespace UPnPDescribeActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityDescribeRequest, UPnPDescribeRequest, TUpnpMessage::TDescribeRequest, CUpnpDescribeActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUpnpDescribeActivity::TAwaitingDescribeRequest, UPnPControlSCprStates::TFindHttpClientFlowOrSendRequest )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, UPnPControlSCprStates::TFindOrCreateHttpClientFlow, UPnPControlSCprStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TClearError )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY( KNoTag, UPnPControlSCprStates::TProcessHttpDataClient, TTag<KSendRequest> )
+	
+	NODEACTIVITY_ENTRY ( KSendRequest, CUpnpDescribeActivity::TSendDescribeRequest, CUpnpDescribeActivity::TAwaitingErrorOrResponseOrCancel, UPnPDescribeStates::TCancelDescribeOrProcessResponseTag )
+	LAST_NODEACTIVITY_ENTRY ( KProcessResponse, CUpnpDescribeActivity::TProcessResponse )
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, CUpnpDescribeActivity::TReportError )
+	
+	NODEACTIVITY_ENTRY ( KCancelTag, CUpnpDescribeActivity::TDataClientStop, CUpnpDescribeActivity::TAwaitingDataClientStopResponse, UPnPDescribeStates::TCancelDescribeOrProcessResponseTag )
+	LAST_NODEACTIVITY_ENTRY ( KProcessResponse, CUpnpDescribeActivity::TCleanupActivity )
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TClearError )
+	
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TClearError )
+NODEACTIVITY_END ( )
+}
+
+//UPnP subscribe activity.
+namespace UpnpSubscribeActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivitySubscribeRequest, UPnPSubscribeRequest, TUpnpMessage::TSubscribeRequest, CUpnpSubscribeActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUpnpSubscribeActivity::TAwaitingSubscribeRequest, UPnPControlSCprStates::TFindHttpClientFlowOrSendRequest )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, UPnPControlSCprStates::TFindOrCreateHttpClientFlow, UPnPControlSCprStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TClearError )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, UPnPControlSCprStates::TProcessHttpDataClient, TTag<KSendRequest> )
+	
+	NODEACTIVITY_ENTRY ( KSendRequest, CUpnpSubscribeActivity::TSendSubscribeRequest, CUpnpSubscribeActivity::TAwaitingErrorOrResponseOrCancel, UPnPSubscribeStates::TErrorOrProcessResponseTag )
+	
+	// flow responds with TError or TSubscribeResponse
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, CUpnpSubscribeActivity::TReportError )	
+	THROUGH_NODEACTIVITY_ENTRY ( KProcessResponse, CUpnpSubscribeActivity::TProcessSubscribeResponse, UPnPSubscribeStates::TNoTagOrCancelSubscribe )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TDoNothing )
+	
+	// if node is in closing state, subscription is completed, then perform unsubscription
+	NODEACTIVITY_ENTRY ( KCancelTag, CUpnpSubscribeActivity::TSendUnsubscribeRequest, CUpnpUnSubscribeActivity::TAwaitingErrorOrResponse, TNoTag )
+	// even if received TError remove the subscription as already closing
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CUpnpSubscribeActivity::TProcessUnsubscribeResponse )
+NODEACTIVITY_END ( )
+}
+
+//UPnP unsubscribe activity.
+namespace UpnpUnSubscribeActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityUnSubscribeRequest, UPnPUnSubscribeRequest, TUpnpMessage::TCancelParamSet, CUpnpUnSubscribeActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUpnpUnSubscribeActivity::TAwaitingUnSubscribeRequest, TNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, CUpnpUnSubscribeActivity::TSendUnSubscribeRequest, CUpnpUnSubscribeActivity::TAwaitingErrorOrResponse, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CUpnpUnSubscribeActivity::TProcessResponse )
+NODEACTIVITY_END ( )
+}
+
+
+//UPnP notification activity.
+namespace UpnpNotificationActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityEventNotify, UPnPNotifyRequest, TUpnpMessage::TUPnPRequestInfo, CUpnpNotificationActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( UPnPStateMachine::TAwaitingUpnpRequestInfo, UPnPStateMachine::TRequestOrIgnoreTag )
+	THROUGH_NODEACTIVITY_ENTRY ( UPnPStateMachine::KNotifyRequest, CUpnpNotificationActivity::TProcessNotifyRequest, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CUpnpNotificationActivity::TSendResponse )
+	
+	LAST_NODEACTIVITY_ENTRY ( KIgnore, UPnPStateMachine::TSendIgnoreResponse )
+NODEACTIVITY_END ( )
+}
+
+// UPnP Flow finder.
+namespace UpnpCallbackFlowFinderActivity
+	{
+DECLARE_DEFINE_NODEACTIVITY ( TUpnpMessage::EActivityFindOrCreateFlow, FindOrCreateFlow, TUpnpMessage::TCreateServerFlow )
+	FIRST_NODEACTIVITY_ENTRY ( UPnPStateMachine::TAwaitingServerFlowRequest, TNoTag )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, UPnPStateMachine::TCreateServerFlow<ECallback>, UPnPControlSCprStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, UPnPControlSCprStates::TSendActivityStopped )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, TNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, UPnPControlSCprStates::TProcessCallbackDataClient , CoreNetStates::TAwaitingDataClientStarted, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TDoNothing )
+NODEACTIVITY_END ( )
+	}
+
+//ActivityMap
+namespace UPnPControlSCprActivities
+{
+DEFINE_ACTIVITY_MAP ( activityMap )
+	ACTIVITY_MAP_ENTRY ( UPnPControlSCprParamRequestActivity, UPnPControlSCprParamRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPControlSCprApplyRequestActivity, UPnPControlSCprApplyRequest )	
+	ACTIVITY_MAP_ENTRY ( UPnPControlSCprBinderRequestActivity, UPnPControlSCprBinderRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPControlSCprDataClientIdleActivity, UPnPControlSCprDataClientIdle )
+	ACTIVITY_MAP_ENTRY ( UPnPControlSCprClientLeaveActivity, UPnPControlSCprClientLeave )
+	ACTIVITY_MAP_ENTRY ( UPnPSearchActivity, UPnPSearchRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPRegisterNotifyActivity, UPnPRegisterNotifyRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPDescribeActivity, UPnPDescribeRequest )
+	ACTIVITY_MAP_ENTRY ( UpnpSubscribeActivity, UPnPSubscribeRequest )
+	ACTIVITY_MAP_ENTRY ( UpnpUnSubscribeActivity, UPnPUnSubscribeRequest )
+	ACTIVITY_MAP_ENTRY ( UpnpNotificationActivity, UPnPNotifyRequest )
+	ACTIVITY_MAP_ENTRY ( UpnpCallbackFlowFinderActivity, FindOrCreateFlow )
+	ACTIVITY_MAP_ENTRY ( UPnPControlSCprDestroyActivity, UPnPControlSCprDestroy )
+ACTIVITY_MAP_END_BASE ( SCprActivities, coreSCprActivities )
+}
+
+//---------------------------------------Control Point Activity base class-------------------------------------
+
+CUPnPActivityBase::~CUPnPActivityBase()
+	{
+	//This is the last upnp activity. Post TActivityStopped
+	if ( static_cast<CUPnPControlSubConnectionProvider&>(iNode).IsClosing ( ) 
+			&& iNode.CountAllActivities () == 1 ) // only - destroy and no upnp activity is pending
+		{
+		RClientInterface::OpenPostMessageClose ( iNode.Id (), iNode.Id (), TUpnpMessage::TActivityStopped ().CRef () );
+		}
+	};
+	
+TBool CUPnPActivityBase::Next ( TNodeContextBase& aContext )
+	{
+	if ( aContext.iMessage.IsMessage<TUpnpMessage::TCancelParamSet> () || aContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest> () )
+        	return ACore::Next ( &aContext );
+	return CNodeActivityBase::Next ( aContext );
+	}
+
+DEFINE_SMELEMENT ( CUPnPActivityBase::TAwaitingResponseToStopActivities, NetStateMachine::MState, CUPnPActivityBase::TContext )
+TBool CUPnPActivityBase::TAwaitingResponseToStopActivities::Accept ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysBaseActivity, KComponent, _L8("CUPnPActivityBase::TAwaitingResponseToStopActivities::Accept - Message=TActivityStopped")));
+	if(iContext.iMessage.IsMessage<TUpnpMessage::TActivityStopped>())
+		{
+		//Check whether all UPnP activities are closed or not.
+		if(iContext.iNode.CountAllActivities() > 1 )
+			{
+			return EFalse;
+			}	
+		return ETrue;	
+		}
+	return 	 EFalse;
+	}
+
+DEFINE_SMELEMENT ( CUPnPActivityBase::TStopCurrentActivities, NetStateMachine::MStateTransition, CUPnPActivityBase::TContext )
+void CUPnPActivityBase::TStopCurrentActivities::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysBaseActivity, KComponent, _L8("CUPnPActivityBase::TStopCurrentActivities::DoL")));
+	TInt activityCount = iContext.Node().CountAllActivities();
+	//Cancel all activities and allow them to do cleanup 
+	for( TInt index = 0; index < activityCount-1; index++ )
+		{
+		RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.NodeId (), TUpnpMessage::TCancelRequest ().CRef () );
+		}		
+	}
+
+DEFINE_SMELEMENT ( CUPnPActivityBase::TStopActivityOrStopDataClient, NetStateMachine::MStateFork, CUPnPActivityBase::TContext )
+TInt CUPnPActivityBase::TStopActivityOrStopDataClient::TransitionTag ( )
+	{
+	if ( iContext.Node().CountAllActivities() > 1 )
+		{
+		//There are some active data clients
+		return UPnPStateMachine::KActivityStop;
+		}
+	if ( iContext.Node ().CountClients<TDefaultClientMatchPolicy> ( TClientType ( TCFClientType::EData) ) > 0 )
+		{
+		return CoreNetStates::KDataClientsToStop;
+		}
+	return KNoTag;
+	}
+
+
+//---------------------------------------Control Point Search Request Activity-------------------------------------
+CNodeActivityBase* CUPnPSearchActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return ( new ( ELeave ) CUPnPSearchActivity( aActivitySig, aNode, activityId ) );
+	}
+
+CUPnPSearchActivity::~CUPnPSearchActivity ( )
+	{
+	SetError ( KErrNone );
+	delete static_cast<CUPnPDiscoverRequestParamSet*>(iRequestParamSet);
+	}
+
+DEFINE_SMELEMENT (CUPnPSearchActivity::TAwaitingReceiveSearchResponse, NetStateMachine::MState, CUPnPSearchActivity::TContext )
+TBool CUPnPSearchActivity::TAwaitingReceiveSearchResponse::Accept ( )
+	{
+	if(iContext.iMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse>())
+		{
+		LOG(ESockLogExternal::Printf(KSubsysSearchActivity, KComponent, _L8("CUPnPSearchActivity::TAwaitingReceiveSearchResponse::Accept - Message=TUpnpMessage::TUPnPSearchResponse")));
+		return ETrue;
+		}
+	if(iContext.iMessage.IsMessage<TUpnpMessage::TCancelParamSet>())
+		{
+		LOG(ESockLogExternal::Printf(KSubsysSearchActivity, KComponent, _L8("CUPnPSearchActivity::TAwaitingReceiveSearchResponse::Accept - Message=TCancelParamSet")));
+		CUPnPSearchActivity& activity = static_cast<CUPnPSearchActivity&> ( *iContext.iNodeActivity );
+		TUpnpMessage::TCancelParamSet& msg = message_cast< TUpnpMessage::TCancelParamSet > ( iContext.iMessage );
+		CUPnPRequestParamSetBase* paramSet = static_cast<CUPnPRequestParamSetBase*>(msg.iParamSet);
+		if( activity.iRequestParamSet->Uri().CompareF(paramSet->Uri()) == 0
+				&& paramSet->GetTypeId().iType == EUPnPCancelDiscoverParamSet )
+			{
+			delete static_cast<CUPnPCancelDiscoverParamSet*>(msg.iParamSet);		
+			return ETrue;
+			}
+		}
+	if(iContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest>())
+		{
+		return ETrue;
+		}
+	return EFalse;
+	}
+
+DEFINE_SMELEMENT ( CUPnPSearchActivity::TProcessResponse, NetStateMachine::MStateTransition, CUPnPSearchActivity::TContext )
+void CUPnPSearchActivity::TProcessResponse::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSearchActivity, KComponent, _L8("CUPnPSearchActivity::TProcessResponse::DoL")));
+	
+	TUpnpMessage::TUPnPSearchResponse& msg = message_cast< TUpnpMessage::TUPnPSearchResponse > ( iContext.iMessage );
+	
+	TUPnPEvent event;
+	event.iStatus = TUPnPEvent::ESuccess;
+	event.iErrorCode = KErrNone;
+	RParameterFamily family ;
+	CUPnPDiscoverResponseParamSet* resParamSet = CUPnPDiscoverResponseParamSet::NewL( family );
+	CleanupStack::PushL( resParamSet );
+	resParamSet->SetUPnPEvent( event );
+	
+	RBuf8 searchTarget;
+	searchTarget.CreateMax(msg.iSsdpInfo.iSearchTarget.Length());
+	msg.iSsdpInfo.iSearchTarget.CopyOut(searchTarget);
+	msg.iSsdpInfo.iSearchTarget.Free();
+	resParamSet->SetUriL(searchTarget);
+	
+	RBuf8 location;
+	location.CreateMax(msg.iSsdpInfo.iLocation.Length());
+	msg.iSsdpInfo.iLocation.CopyOut(location);
+	msg.iSsdpInfo.iLocation.Free();
+	resParamSet->SetDeviceLocationL(location);
+	
+	resParamSet->SetExpiryTime(msg.iSsdpInfo.iMx);
+	
+	RBuf8 usn;
+	usn.CreateMax(msg.iSsdpInfo.iUsn.Length());
+	msg.iSsdpInfo.iUsn.CopyOut(usn);
+	msg.iSsdpInfo.iUsn.Free();
+	resParamSet->SetUSNL(usn);
+	
+	iContext.Node().AddResponseParamSetL( resParamSet, EUPnPDiscoverResponseParamSet );
+	CleanupStack::Pop( resParamSet );
+	}
+
+DEFINE_SMELEMENT ( CUPnPSearchActivity::TSendSearchRequest, NetStateMachine::MStateTransition, CUPnPSearchActivity::TContext )
+void CUPnPSearchActivity::TSendSearchRequest::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSearchActivity, KComponent, _L8("CUPnPSearchActivity::TSendSearchRequest::DoL")));
+	
+	TAppProtAddr protAddr( KSsdpMulticastAddr, KUpnpMCPort );	
+	CUPnPSearchActivity& activity = static_cast<CUPnPSearchActivity&> ( *iContext.iNodeActivity );
+	activity.iFlowId = iContext.Node ().UdpClientFlow ();
+	
+	RMemChunk searchTarget;
+	searchTarget.CreateL ( static_cast<CUPnPDiscoverRequestParamSet *> ( activity.iRequestParamSet )->Uri (), iContext.Node ( ).ConnectionProvider().MemoryAllocator());
+	TSsdpInfo searchInfo ( static_cast<CUPnPDiscoverRequestParamSet *> ( activity.iRequestParamSet )->ResponseTime (), searchTarget);
+	
+	activity.PostRequestTo ( activity.iFlowId, TUpnpMessage::TUPnPSearchRequest ( searchInfo ).CRef () );
+	}
+
+DEFINE_SMELEMENT ( CUPnPSearchActivity::TCancelSearchRequest, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+void CUPnPSearchActivity::TCancelSearchRequest::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSearchActivity, KComponent, _L8("CUPnPSearchActivity::TCancelSearchRequest::DoL")));
+	
+	RClientInterface::OpenPostMessageClose ( TNodeCtxId (  iContext.iNodeActivity->ActivityId (), iContext.NodeId () ), iContext.Node ().UdpClientFlow (),
+											 TUpnpMessage::TCancelRequest ().CRef () );
+	}
+
+DEFINE_SMELEMENT ( CUPnPSearchActivity::TCleanupActivity, NetStateMachine::MStateTransition, CUPnPSearchActivity::TContext )
+void CUPnPSearchActivity::TCleanupActivity::DoL ( )
+	{
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse> () )
+		{
+		TUpnpMessage::TUPnPSearchResponse& msg = message_cast< TUpnpMessage::TUPnPSearchResponse > ( iContext.iMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		}
+	}
+//---------------------------------------Register Notify Request Activity-------------------------------------
+CNodeActivityBase* CUPnPRegisterNotifyActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return ( new ( ELeave ) CUPnPRegisterNotifyActivity( aActivitySig, aNode, activityId ) );
+	}
+
+CUPnPRegisterNotifyActivity::~CUPnPRegisterNotifyActivity ( )
+	{
+	SetError ( KErrNone );
+	delete static_cast<CUPnPRegisterAnnouncementParamSet *>(iRequestParamSet);
+	}
+
+DEFINE_SMELEMENT (CUPnPRegisterNotifyActivity::TAwaitingReceiveNotifivation, NetStateMachine::MState, CUPnPRegisterNotifyActivity::TContext )
+TBool CUPnPRegisterNotifyActivity::TAwaitingReceiveNotifivation::Accept ( )
+	{
+	CUPnPRegisterNotifyActivity& activity = static_cast<CUPnPRegisterNotifyActivity&> ( *iContext.iNodeActivity );
+	if( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishAliveRequest>() 
+	 	|| iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishByeRequest>() )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysRegNotifyActivity, KComponent, _L8("CUPnPRegisterNotifyActivity::TAwaitingReceiveNotification::Accept - Message=TUpnpMessage::TUPnPPublishAliveRequest")));
+		return ETrue;
+		}
+	if( iContext.iMessage.IsMessage<TUpnpMessage::TCancelParamSet>())
+		{
+		LOG(ESockLogExternal::Printf(KSubsysRegNotifyActivity, KComponent, _L8("CUPnPRegisterNotifyActivity::TAwaitingReceiveNotification::Accept - Message=TDataClientStop")));
+		TUpnpMessage::TCancelParamSet& msg = message_cast< TUpnpMessage::TCancelParamSet > ( iContext.iMessage );
+		CUPnPRequestParamSetBase* paramSet = static_cast<CUPnPRequestParamSetBase*>(msg.iParamSet);
+		if( activity.iRequestParamSet->Uri().CompareF(paramSet->Uri()) == 0
+				&& paramSet->GetTypeId().iType == EUPnPCancelRegisterNotifyParamSet )
+			{
+			delete static_cast<CUPnPCancelRegisterNotifyParamSet*>(msg.iParamSet);		
+			return ETrue;
+			}
+		}
+	if(iContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest>())
+		{
+		LOG(ESockLogExternal::Printf(KSubsysRegNotifyActivity, KComponent, _L8("CUPnPRegisterNotifyActivity::TAwaitingReceiveNotification::Accept - Message=TUpnpMessage::TCancelRequest")));
+		return ETrue;
+		}
+	return EFalse;
+	}
+
+DEFINE_SMELEMENT ( CUPnPRegisterNotifyActivity::TStartServer, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+void CUPnPRegisterNotifyActivity::TStartServer::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysRegNotifyActivity, KComponent, _L8("CUPnPRegisterNotifyActivity::TStartServer::DoL")));		
+	iContext.iNodeActivity->PostRequestTo ( iContext.Node ( ).UdpServerFlow ( ), TCFDataClient::TStart ().CRef () );
+	}
+
+DEFINE_SMELEMENT ( CUPnPRegisterNotifyActivity::TProcessNotification, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+void CUPnPRegisterNotifyActivity::TProcessNotification::DoL ( )
+	{
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishAliveRequest> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysRegNotifyActivity, KComponent, _L8("CUPnPRegisterNotifyActivity::TProcessNotification::DoL - Message=TUpnpMessage::TUPnPPublishAliveRequest")));
+		TUpnpMessage::TUPnPPublishAliveRequest& notifyMsg = message_cast<TUpnpMessage::TUPnPPublishAliveRequest> ( iContext.iMessage );
+		RParameterFamily family ;
+	  	CUPnPPresenceAnnouncementParamSet*	notifyMsgParamSet = CUPnPPresenceAnnouncementParamSet::NewL ( family );
+	  	CleanupStack::PushL ( notifyMsgParamSet );
+
+		notifyMsgParamSet->SetDuration ( notifyMsg.iSsdpInfo.iMx );
+
+		RBuf8 location;
+		location.CreateMaxL ( notifyMsg.iSsdpInfo.iLocation.Length () );
+		notifyMsg.iSsdpInfo.iLocation.CopyOut ( location );
+		notifyMsg.iSsdpInfo.iLocation.Free ();
+		notifyMsgParamSet->SetServiceLocationL ( location );
+
+		RBuf8 usn;
+		usn.CreateMaxL ( notifyMsg.iSsdpInfo.iUsn.Length() );
+		notifyMsg.iSsdpInfo.iUsn.CopyOut ( usn );
+		notifyMsg.iSsdpInfo.iUsn.Free ();
+		notifyMsgParamSet->SetUSNL ( usn);
+
+		RBuf8 searchTarget;
+		searchTarget.CreateMaxL ( notifyMsg.iSsdpInfo.iSearchTarget.Length () );
+		notifyMsg.iSsdpInfo.iSearchTarget.CopyOut ( searchTarget );
+		notifyMsg.iSsdpInfo.iSearchTarget.Free ();
+		notifyMsgParamSet->SetUriL ( searchTarget );
+		
+	  	CleanupStack::Pop ( notifyMsgParamSet );
+		iContext.Node ().AddResponseParamSetL ( notifyMsgParamSet, EUPnPPresenceAnnouncementParamSet );
+		}
+		
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishByeRequest> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysRegNotifyActivity, KComponent, _L8("CUPnPRegisterNotifyActivity::TProcessNotification::DoL - Message=TUpnpMessage::TUPnPPublishByeRequest")));
+		
+		TUpnpMessage::TUPnPPublishByeRequest& notifyMsg = message_cast<TUpnpMessage::TUPnPPublishByeRequest> ( iContext.iMessage );
+		RParameterFamily family ;
+	  	CUPnPAbsenceAnnouncementParamSet* notifyMsgParamSet = CUPnPAbsenceAnnouncementParamSet::NewL ( family );
+	  	CleanupStack::PushL ( notifyMsgParamSet );
+
+		RBuf8 usn;
+		usn.CreateMaxL ( ( notifyMsg.iSsdpInfo.iUsn ).Length () );
+		notifyMsg.iSsdpInfo.iUsn.CopyOut ( usn );
+		notifyMsg.iSsdpInfo.iUsn.Free ();
+		notifyMsgParamSet->SetUSNL ( usn);
+
+		RBuf8 searchTarget;
+		searchTarget.CreateMaxL ( ( notifyMsg.iSsdpInfo.iSearchTarget ).Length () );
+		notifyMsg.iSsdpInfo.iSearchTarget.CopyOut ( searchTarget );
+		notifyMsg.iSsdpInfo.iSearchTarget.Free ();
+		notifyMsgParamSet->SetUriL ( searchTarget );
+		
+	  	CleanupStack::Pop ( notifyMsgParamSet );
+		iContext.Node ().AddResponseParamSetL ( notifyMsgParamSet, EUPnPAbsenceAnnouncementParamSet );
+		}
+		
+	}
+
+DEFINE_SMELEMENT ( CUPnPRegisterNotifyActivity::TCancelRegisterRequest, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+void CUPnPRegisterNotifyActivity::TCancelRegisterRequest::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysRegNotifyActivity, KComponent, _L8("CUPnPRegisterNotifyActivity::TCancelRegisterRequest::DoL")));
+	
+	RClientInterface::OpenPostMessageClose ( TNodeCtxId (  iContext.iNodeActivity->ActivityId (), iContext.NodeId () ), iContext.Node ().UdpServerFlow (),
+											 TUpnpMessage::TCancelRequest ().CRef () );	
+	}
+
+DEFINE_SMELEMENT ( CUPnPRegisterNotifyActivity::TSendRegisterRequest, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+void CUPnPRegisterNotifyActivity::TSendRegisterRequest::DoL ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysRegNotifyActivity, KComponent, _L8("CUPnPRegisterNotifyActivity::TSendRegisterRequest::DoL")));	
+	
+	CUPnPRegisterNotifyActivity& activity = static_cast<CUPnPRegisterNotifyActivity&> ( *iContext.iNodeActivity );
+	activity.iFlowId = iContext.Node().UdpServerFlow();
+		
+	RMemChunk notifyTarget;
+	notifyTarget.CreateL ( activity.iRequestParamSet->Uri (), iContext.Node ( ).ConnectionProvider().MemoryAllocator() );
+	TSsdpInfo registerInfo ( notifyTarget );
+	
+	TAppProtAddr protAddr ( KSsdpMulticastAddr, KUpnpMCPort );		
+	activity.PostRequestTo ( activity.iFlowId, TUpnpMessage::TUPnPNotifyRegistration ( registerInfo ).CRef () );
+	}
+	
+DEFINE_SMELEMENT ( CUPnPRegisterNotifyActivity::TCleanupActivity, NetStateMachine::MStateTransition, CUPnPRegisterNotifyActivity::TContext )
+void CUPnPRegisterNotifyActivity::TCleanupActivity::DoL ( )
+	{
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishAliveRequest> () )
+		{
+		TUpnpMessage::TUPnPPublishAliveRequest& notifyMsg = message_cast<TUpnpMessage::TUPnPPublishAliveRequest> ( iContext.iMessage );
+		notifyMsg.iSsdpInfo.iLocation.Free ();
+		notifyMsg.iSsdpInfo.iUsn.Free ();
+		notifyMsg.iSsdpInfo.iSearchTarget.Free ();
+		}
+	else if ( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishByeRequest> () )
+		{
+		TUpnpMessage::TUPnPPublishByeRequest& notifyMsg = message_cast<TUpnpMessage::TUPnPPublishByeRequest> ( iContext.iMessage );
+		notifyMsg.iSsdpInfo.iUsn.Free ();
+		notifyMsg.iSsdpInfo.iSearchTarget.Free ();
+		}
+	}
+
+//==================================================Describe request activity==========================================//
+
+CNodeActivityBase* CUpnpDescribeActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return( new ( ELeave ) CUpnpDescribeActivity ( aActivitySig, aNode, activityId ) );
+	}
+
+CUpnpDescribeActivity::~CUpnpDescribeActivity ( )
+	{
+	SetError( KErrNone );
+	delete static_cast<CUPnPDescribeRequestParamSet *>(iRequestParamSet);	
+	}
+
+// States
+DEFINE_SMELEMENT( CUpnpDescribeActivity::TAwaitingErrorOrResponseOrCancel, NetStateMachine::MState, CUpnpDescribeActivity::TContext )
+TBool CUpnpDescribeActivity::TAwaitingErrorOrResponseOrCancel::Accept ()
+	{
+	if ( iContext.iMessage.IsMessage<TEBase::TError > () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TAwaitingErrorOrResponseOrCancel::Accept - Message=TCFMessage::TError")));
+		iContext.iNodeActivity->SetError ( message_cast<TEBase::TError> ( iContext.iMessage ).iValue );
+		return ETrue;
+		}
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TResponse> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TAwaitingErrorOrResponseOrCancel::Accept - Message=TUpnpMessage::TResponse")));
+		return ETrue;
+		}
+	if ( iContext.iMessage.IsMessage< TUpnpMessage::TCancelParamSet> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TCancelParamSet::Accept - Message=TCancelParamSet")));
+
+		CUpnpDescribeActivity& activity = static_cast<CUpnpDescribeActivity&> ( *iContext.iNodeActivity );
+		TUpnpMessage::TCancelParamSet& msg = message_cast< TUpnpMessage::TCancelParamSet > ( iContext.iMessage );
+		CUPnPRequestParamSetBase* paramSet = static_cast<CUPnPRequestParamSetBase*> ( msg.iParamSet );
+		if ( activity.iRequestParamSet->Uri ().CompareF ( paramSet->Uri () ) == 0 )
+			{
+			delete static_cast<CUPnPCancelDescribeParamSet*> ( msg.iParamSet );
+			
+			iContext.iMessage.ClearMessageId ( );
+			return ETrue;
+			}
+		}
+	 if ( iContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest> () )
+	 	{
+		LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TCancelRequest::Accept - Message=TCancelRequest")));
+		return ETrue; 	
+	 	}
+	
+	return EFalse;	
+	}
+
+
+DEFINE_SMELEMENT (CUpnpDescribeActivity::TAwaitingDataClientStopResponse, NetStateMachine::MState, CUpnpDescribeActivity::TContext )
+TBool CUpnpDescribeActivity::TAwaitingDataClientStopResponse::Accept ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TAwaitingDataClientStopResponse::Accept - Message=TDataClientStopped")));
+	return ( iContext.iMessage.IsMessage<TCFDataClient::TStopped> () 
+			|| iContext.iMessage.IsMessage<TUpnpMessage::TResponse>()
+			|| iContext.iMessage.IsMessage<TEBase::TError> () );
+	}
+
+// Transitions 
+DEFINE_SMELEMENT( CUpnpDescribeActivity::TSendDescribeRequest, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+void CUpnpDescribeActivity::TSendDescribeRequest::DoL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TSendDescribeRequest::DoL")));
+	CUpnpDescribeActivity& activity = static_cast< CUpnpDescribeActivity& >( *iContext.iNodeActivity );
+	
+	RMemChunk bodyBuf;
+	RMemChunk uriBuf;
+	uriBuf.CreateL ( activity.iRequestParamSet->Uri (), iContext.Node ( ).ConnectionProvider().MemoryAllocator() );		
+	activity.PostRequestTo ( activity.iFlowId, TUpnpMessage::TUPnPClientRequestInfo ( HTTP::EGET, uriBuf, bodyBuf, NULL ).CRef () );
+	}
+
+
+DEFINE_SMELEMENT( CUpnpDescribeActivity::TProcessResponse, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+void CUpnpDescribeActivity::TProcessResponse::DoL ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TProcessResponse::DoL")));
+	CUpnpDescribeActivity& activity = static_cast< CUpnpDescribeActivity& > ( *iContext.iNodeActivity );
+
+	TUpnpMessage::TResponse& msg = message_cast< TUpnpMessage::TResponse > ( iContext.iMessage );
+
+	TUPnPEvent event;
+	event.iStatus = TUPnPEvent::ESuccess;
+	event.iErrorCode = KErrNone;
+	RParameterFamily family ;
+	CUPnPDescribeResponseParamSet* resParamSet = CUPnPDescribeResponseParamSet::NewL ( family );
+	CleanupStack::PushL ( resParamSet );
+	resParamSet->SetUPnPEvent ( event );
+	
+	RBuf8 responseBodyData;
+	responseBodyData.CreateMax ( msg.iBodyData.Length () );
+	responseBodyData.FillZ ( msg.iBodyData.Length () );
+	msg.iBodyData.CopyOut ( responseBodyData );	
+	resParamSet->SetDescriptionL ( responseBodyData );
+	resParamSet->SetUriL ( activity.iRequestParamSet->Uri () );
+	responseBodyData.Close ();
+	msg.iBodyData.Free ();		
+	iContext.Node ().AddResponseParamSetL ( resParamSet, EUPnPDescribeResponseParamSet );
+	CleanupStack::Pop ( resParamSet );
+	}
+
+
+void CUpnpDescribeActivity::TProcessResponse::Error ( TInt aError )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TProcessResponse::Error")));
+	iContext.iNodeActivity->SetError ( aError );
+	CUpnpDescribeActivity::TReportError reportError ( iContext );
+	TRAP_IGNORE ( reportError.DoL () );
+	}
+
+
+DEFINE_SMELEMENT ( CUpnpDescribeActivity::TCleanupActivity, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+void CUpnpDescribeActivity::TCleanupActivity::DoL ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TCleanupActivity::DoL")));
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TResponse>() )
+		{
+		TUpnpMessage::TResponse& msg = message_cast< TUpnpMessage::TResponse > ( iContext.iMessage );
+		if( !msg.iBodyData.IsEmpty () )
+			{
+			msg.iBodyData.Free ();
+			}
+		}
+	}
+
+DEFINE_SMELEMENT ( CUpnpDescribeActivity::TDataClientStop, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+void CUpnpDescribeActivity::TDataClientStop::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysBaseActivity, KComponent, _L8("CUPnPSearchActivity::TDataClientStop::DoL")));
+
+	CUpnpDescribeActivity& activity = static_cast< CUpnpDescribeActivity& > ( *iContext.iNodeActivity );
+	iContext.iNodeActivity->PostRequestTo ( activity.iFlowId, TCFDataClient::TStop ( KErrNone ).CRef () );
+	}
+
+DEFINE_SMELEMENT ( CUpnpDescribeActivity::TReportError, NetStateMachine::MStateTransition, CUpnpDescribeActivity::TContext )
+void CUpnpDescribeActivity::TReportError::DoL ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpDescribeActivity::TReportError::DoL")));
+	CUpnpDescribeActivity& activity = static_cast< CUpnpDescribeActivity& > ( *iContext.iNodeActivity );
+
+	TUPnPEvent event;
+	event.iStatus = TUPnPEvent::EFail;
+	event.iErrorCode = activity.Error ();
+	
+	if ( activity.Error() != KErrCancel )
+		{
+		RParameterFamily family ;
+		CUPnPDescribeResponseParamSet* resParamSet = CUPnPDescribeResponseParamSet::NewL ( family );
+		CleanupStack::PushL ( resParamSet );
+		resParamSet->SetUPnPEvent ( event );
+		resParamSet->SetUriL ( activity.iRequestParamSet->Uri () );
+		resParamSet->SetDescriptionL ( KNullDesC8 );
+		iContext.Node ().AddResponseParamSetL ( resParamSet, EUPnPDescribeResponseParamSet );
+		CleanupStack::Pop ( resParamSet );
+		}
+	}
+
+
+//---------------------------------------Control Point Subscribe Request Activity-------------------------------------
+CNodeActivityBase* CUpnpSubscribeActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return ( new ( ELeave ) CUpnpSubscribeActivity ( aActivitySig, aNode, activityId ) );
+	}
+
+CUpnpSubscribeActivity::~CUpnpSubscribeActivity ( )
+	{
+	SetError ( KErrNone );
+	delete static_cast<CUPnPSubscribeRequestParamSet *> ( iRequestParamSet );	
+	}
+
+
+// States
+DEFINE_SMELEMENT ( CUpnpSubscribeActivity::TAwaitingErrorOrResponseOrCancel, NetStateMachine::MState, CUpnpSubscribeActivity::TContext )
+TBool CUpnpSubscribeActivity::TAwaitingErrorOrResponseOrCancel::Accept ()
+	{
+	if ( iContext.iMessage.IsMessage< TEBase::TError > () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysSubscribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TAwaitingErrorOrResponseOrCancel::Accept - Message=TCFMessage::TError")));
+		iContext.iNodeActivity->SetError ( message_cast<TEBase::TError> ( iContext.iMessage ).iValue );
+		return ETrue;
+		}
+	if ( iContext.iMessage.IsMessage< TUpnpMessage::TSubscribeResponse > () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysSubscribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TAwaitingErrorOrResponseOrCancel::Accept - Message=TUpnpMessage::TSubscribeResponse")));
+		return ETrue;
+		}
+	if ( iContext.iMessage.IsMessage< TUpnpMessage::TCancelParamSet > () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TAwaitingErrorOrResponseOrCancel::Accept - Message=TCancelParamSet")));
+
+		CUpnpSubscribeActivity& activity = static_cast<CUpnpSubscribeActivity&> ( *iContext.iNodeActivity );
+		TUpnpMessage::TCancelParamSet& msg = message_cast< TUpnpMessage::TCancelParamSet > ( iContext.iMessage );
+		CUPnPRequestParamSetBase* paramSet = static_cast<CUPnPRequestParamSetBase*> ( msg.iParamSet );
+		if ( activity.iRequestParamSet->Uri ().CompareF ( paramSet->Uri () ) == 0 )
+			{
+			delete static_cast<CUPnPCancelSubscribeParamSet*> ( msg.iParamSet );
+			
+			// We can't send TCancel to the flow, we better eat the message
+        	// here and switch the activity into a cancelling mode.
+        	iContext.iMessage.ClearMessageId ( );
+        	iContext.iNodeActivity->SetError ( KErrCancel );
+			}
+		}
+	 if ( iContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest> ()
+	 		&& iContext.iNodeActivity->Error () != KErrCancel ) // in order to avoid eating more than one TCancelRequest Message
+	 	{
+		LOG(ESockLogExternal::Printf(KSubsysDescribeActivity, KComponent, _L8("CUpnpSubscribeActivity::AwaitingErrorOrResponseOrCancel::Accept - Message=TCancelRequest")));
+		
+		// We can't send TCancel to the Flow, we better eat the message
+        // here and switch the activity into a cancelling mode.
+        iContext.iMessage.ClearMessageId ( );
+        iContext.iNodeActivity->SetError ( KErrCancel );
+	 	}
+	
+	return EFalse;
+	}
+
+// Transitions	
+DEFINE_SMELEMENT ( CUpnpSubscribeActivity::TSendSubscribeRequest, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+void CUpnpSubscribeActivity::TSendSubscribeRequest::DoL ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSubscribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TSendSubscribeRequest::DoL")));
+	CUpnpSubscribeActivity& activity = static_cast<CUpnpSubscribeActivity&> ( *iContext.iNodeActivity );
+
+	RMemChunk callBack;
+	RMemChunk bodyBuf;
+	RMemChunk uriBuf;
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	uriBuf.CreateL ( activity.iRequestParamSet->Uri ( ), allocator );
+	TCleanupItem item ( &CUPnPUtils::CleanupMBufChain, &uriBuf );
+	CleanupStack::PushL ( item );
+	
+	callBack.CreateL ( iContext.Node ( ).Callback ( ), allocator);
+	TCleanupItem item1 ( &CUPnPUtils::CleanupMBufChain, &callBack );
+	CleanupStack::PushL ( item1 );
+	
+	TSubscribeRequestInfo subscribeRequest;
+	subscribeRequest.iTimeOut = static_cast<CUPnPSubscribeRequestParamSet *>(activity.iRequestParamSet)->Duration();
+	
+	CSubscriptionInfo* subscriptionInfo = iContext.Node ().GetSubscriptionInfoByUrl ( activity.iRequestParamSet->Uri () );
+	if ( subscriptionInfo )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysSubscribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TSendSubscribeRequest::DoL - Re-Subscribe")));
+		// Re-Subscribe.
+		subscribeRequest.iSid.CreateL ( subscriptionInfo->iSid, allocator );
+		}
+	else
+		{
+		subscribeRequest.iCallback = callBack;
+		}
+		
+	activity.PostRequestTo ( activity.iFlowId, TUpnpMessage::TUPnPClientRequestInfo ( UPnP::ESubscribe,  uriBuf, bodyBuf, &subscribeRequest ).CRef () );
+	
+	CleanupStack::Pop ( ); // item
+	CleanupStack::Pop ( ); // item1
+	}
+
+
+DEFINE_SMELEMENT ( CUpnpSubscribeActivity::TProcessSubscribeResponse, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+void CUpnpSubscribeActivity::TProcessSubscribeResponse::DoL ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSubscribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TProcessResponse::DoL")));
+	CUpnpSubscribeActivity& activity = static_cast< CUpnpSubscribeActivity& > ( *iContext.iNodeActivity );
+
+	TUpnpMessage::TSubscribeResponse& msg = message_cast< TUpnpMessage::TSubscribeResponse > ( iContext.iMessage );	
+	
+	CSubscriptionInfo* subscriptionInfo = iContext.Node ().GetSubscriptionInfoByUrl ( activity.iRequestParamSet->Uri () );	
+	// new subscription is accepted, update elements and create callback flow.
+	if ( subscriptionInfo == NULL )
+		{
+		subscriptionInfo = new ( ELeave ) CSubscriptionInfo ( activity.iFlowId );
+		CleanupStack::PushL ( subscriptionInfo );
+		subscriptionInfo->SetPublishUrlL ( activity.iRequestParamSet->Uri() );
+		subscriptionInfo->SetSidL ( msg.iURN );
+		iContext.Node ().AddSubscriptionInfoL ( subscriptionInfo );
+		CleanupStack::Pop ( subscriptionInfo );
+			
+		if ( iContext.iNodeActivity->Error () != KErrCancel && !iContext.Node ( ).iTcpSrvFlowCreateRequested )
+			{
+			iContext.Node ( ).iTcpSrvFlowCreateRequested = ETrue;
+			// intiate flow creation with the call back Url			
+			RClientInterface::OpenPostMessageClose ( iContext.NodeId (), TNodeCtxId ( TUpnpMessage::EActivityFindOrCreateFlow, iContext.NodeId () ), 
+													TUpnpMessage::TCreateServerFlow ().CRef() );
+			}
+		}
+	
+	if ( iContext.iNodeActivity->Error() != KErrCancel )
+		{
+		RParameterFamily family ;
+		CUPnPSubscribeResponseParamSet* resParamSet = CUPnPSubscribeResponseParamSet::NewL ( family );
+		CleanupStack::PushL ( resParamSet );
+	
+		TUPnPEvent event;
+		event.iStatus = TUPnPEvent::ESuccess;
+		event.iErrorCode = KErrNone;
+			
+		resParamSet->SetUPnPEvent ( event );
+		resParamSet->SetTimerExpiry ( msg.iTimeOut );
+		resParamSet->SetUriL ( activity.iRequestParamSet->Uri () );
+		iContext.Node ( ).AddResponseParamSetL ( resParamSet, EUPnPSubscribeResponseParamSet );
+		CleanupStack::Pop ( resParamSet );
+		}
+	
+	activity.iSubscriptionInfo = subscriptionInfo; // for unsubscription in cancel/destruction phase	
+	msg.iURN.Free ( );	
+	}
+
+
+void CUpnpSubscribeActivity::TProcessSubscribeResponse::Error( TInt aError )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSubscribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TProcessResponse::Error")));
+	iContext.iNodeActivity->SetError( aError );
+	CUpnpSubscribeActivity::TReportError reportError(iContext);
+	TRAP_IGNORE ( reportError.DoL() );
+	}
+	
+DEFINE_SMELEMENT( CUpnpSubscribeActivity::TReportError, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+void CUpnpSubscribeActivity::TReportError::DoL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSubscribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TReportError::DoL")));
+	CUpnpSubscribeActivity& activity = static_cast< CUpnpSubscribeActivity& > ( *iContext.iNodeActivity );
+
+	TUPnPEvent event;
+	event.iStatus = TUPnPEvent::EFail;
+	event.iErrorCode = activity.Error();
+	
+	CSubscriptionInfo* subscriptionInfo = iContext.Node().GetSubscriptionInfoByUrl(activity.iRequestParamSet->Uri());
+	if(subscriptionInfo)
+		{
+		iContext.Node().RemoveSubscriptionInfo(subscriptionInfo->iSid);
+		}
+	
+	if( activity.Error() != KErrCancel )
+		{
+		RParameterFamily family ;
+		CUPnPSubscribeResponseParamSet* resParamSet = CUPnPSubscribeResponseParamSet::NewL( family );
+		CleanupStack::PushL( resParamSet );
+		resParamSet->SetUriL( activity.iRequestParamSet->Uri() );
+		resParamSet->SetUPnPEvent( event );
+		iContext.Node().AddResponseParamSetL( resParamSet, EUPnPSubscribeResponseParamSet );
+		CleanupStack::Pop( resParamSet );
+		}
+	}
+	
+
+DEFINE_SMELEMENT( CUpnpSubscribeActivity::TSendUnsubscribeRequest, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+void CUpnpSubscribeActivity::TSendUnsubscribeRequest::DoL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSubscribeActivity, KComponent, _L8("CUpnpSubscribeActivity::TSendUnSubscribeRequest::DoL")));
+	CUpnpSubscribeActivity& activity = static_cast< CUpnpSubscribeActivity& > ( *iContext.iNodeActivity );
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	TSubscribeRequestInfo subscribeRequest;
+	subscribeRequest.iSid.CreateL ( activity.iSubscriptionInfo->iSid, allocator );
+	TCleanupItem item ( &CUPnPUtils::CleanupMBufChain, &subscribeRequest.iSid );
+	CleanupStack::PushL ( item );
+		
+	RMemChunk uriBuf;
+	uriBuf.CreateL ( activity.iSubscriptionInfo->iPublishUrl, allocator );
+	
+	RMemChunk bodyBuf;	
+	activity.PostRequestTo ( activity.iSubscriptionInfo->iDataClient, 
+							TUpnpMessage::TUPnPClientRequestInfo ( UPnP::EUnsubscribe, uriBuf, bodyBuf, &subscribeRequest ).CRef () );
+	
+	CleanupStack::Pop ( ); // item
+	}
+
+DEFINE_SMELEMENT( CUpnpSubscribeActivity::TProcessUnsubscribeResponse, NetStateMachine::MStateTransition, CUpnpSubscribeActivity::TContext )
+void CUpnpSubscribeActivity::TProcessUnsubscribeResponse::DoL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysUnSubscribeActivity, KComponent, _L8("CUpnpUnSubscribeActivity::TProcessResponse::DoL")));
+	
+	CUpnpSubscribeActivity& activity = static_cast< CUpnpSubscribeActivity& >( *iContext.iNodeActivity );	
+	iContext.Node().RemoveSubscriptionInfo(activity.iSubscriptionInfo->iSid);
+	}
+
+
+//---------------------------------------Control Point UnSubscribe Request Activity-------------------------------------
+CNodeActivityBase* CUpnpUnSubscribeActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return ( new ( ELeave ) CUpnpUnSubscribeActivity ( aActivitySig, aNode, activityId ) );
+	}
+
+CUpnpUnSubscribeActivity::~CUpnpUnSubscribeActivity ( )
+	{	
+	SetError( KErrNone );
+	delete static_cast<CUPnPCancelSubscribeParamSet*> ( iRequestParamSet );	
+	}
+
+
+// States
+DEFINE_SMELEMENT( CUpnpUnSubscribeActivity::TAwaitingUnSubscribeRequest, NetStateMachine::MState, CUpnpUnSubscribeActivity::TContext )
+TBool CUpnpUnSubscribeActivity::TAwaitingUnSubscribeRequest::Accept()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysUnSubscribeActivity, KComponent, _L8("CUpnpUnSubscribeActivity::TAwaitingUnSubscribeRequest::Accept - Message=TCancelParamSet")));
+	
+	if ( iContext.iMessage.IsMessage< TUpnpMessage::TCancelParamSet >() )
+		{
+		TUpnpMessage::TCancelParamSet& msg = message_cast< TUpnpMessage::TCancelParamSet > ( iContext.iMessage );	
+		
+		if ( EUPnPCancelSubscribeParamSet == msg.iParamSet->GetTypeId().iType )
+			{
+			CUPnPCancelSubscribeParamSet* paramSet = static_cast<CUPnPCancelSubscribeParamSet*> ( msg.iParamSet );
+			
+			CSubscriptionInfo* info = iContext.Node ().GetSubscriptionInfoByUrl ( paramSet->Uri () );
+			if ( info ) // subscription response is received from network, accept for performing unsubscribe.
+				{
+				return ETrue;
+				}
+			}
+		}
+	
+	return EFalse;	
+	}
+
+// Transitions.
+DEFINE_SMELEMENT( CUpnpUnSubscribeActivity::TSendUnSubscribeRequest, NetStateMachine::MStateTransition, CUpnpUnSubscribeActivity::TContext )
+void CUpnpUnSubscribeActivity::TSendUnSubscribeRequest::DoL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysUnSubscribeActivity, KComponent, _L8("CUpnpUnSubscribeActivity::TSendUnSubscribeRequest::DoL")));
+	CUpnpUnSubscribeActivity& activity = static_cast< CUpnpUnSubscribeActivity& > ( *iContext.iNodeActivity );
+	TUpnpMessage::TCancelParamSet& msg = message_cast< TUpnpMessage::TCancelParamSet > ( iContext.iMessage );	
+	
+	activity.iRequestParamSet = static_cast<CUPnPCancelSubscribeParamSet*> ( msg.iParamSet );	
+	CSubscriptionInfo* subscriptionInfo = iContext.Node ( ).GetSubscriptionInfoByUrl ( activity.iRequestParamSet->Uri( ) );	
+	activity.iSubscriptionInfo = subscriptionInfo;
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	TSubscribeRequestInfo subscribeRequest;
+	subscribeRequest.iSid.CreateL ( subscriptionInfo->iSid, allocator );
+	TCleanupItem item ( &CUPnPUtils::CleanupMBufChain, &subscribeRequest.iSid );
+	CleanupStack::PushL ( item );
+	
+	RMemChunk uriBuf;
+	uriBuf.CreateL ( subscriptionInfo->iPublishUrl, allocator );
+	
+	RMemChunk bodyBuf;	
+	activity.PostRequestTo ( subscriptionInfo->iDataClient, 
+							TUpnpMessage::TUPnPClientRequestInfo ( UPnP::EUnsubscribe,  uriBuf, bodyBuf, &subscribeRequest ).CRef () );
+	
+	CleanupStack::Pop ( ); // item
+	}
+
+
+DEFINE_SMELEMENT( CUpnpUnSubscribeActivity::TProcessResponse, NetStateMachine::MStateTransition, CUpnpUnSubscribeActivity::TContext )
+void CUpnpUnSubscribeActivity::TProcessResponse::DoL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysUnSubscribeActivity, KComponent, _L8("CUpnpUnSubscribeActivity::TProcessResponse::DoL")));
+	
+	CUpnpUnSubscribeActivity& activity = static_cast< CUpnpUnSubscribeActivity& >( *iContext.iNodeActivity );	
+	iContext.Node().RemoveSubscriptionInfo(activity.iSubscriptionInfo->iSid);
+	}
+
+//---------------------------------------Control Point Notification Activity-------------------------------------
+
+
+// CUpnpNotificationActivity
+CNodeActivityBase* CUpnpNotificationActivity::NewL( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return ( new ( ELeave ) CUpnpNotificationActivity ( aActivitySig, aNode, activityId ) );
+	}
+
+
+CUpnpNotificationActivity::~CUpnpNotificationActivity()
+	{
+	iBodyBuf.Close();
+	SetError( KErrNone );
+	}
+
+
+CUpnpNotificationActivity::CUpnpNotificationActivity( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount )
+	:CNodeParallelActivityBase ( aActivitySig, aNode, aActivityCount )
+	{
+	// do nothing.
+	}
+
+// Transitions
+DEFINE_SMELEMENT( CUpnpNotificationActivity::TProcessNotifyRequest, NetStateMachine::MStateTransition, CUpnpNotificationActivity::TContext )
+void CUpnpNotificationActivity::TProcessNotifyRequest::DoL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysEventNotifyActivity, KComponent, _L8("CUpnpNotificationActivity::TProcessNotifyRequest::DoL")));
+	
+	CUpnpNotificationActivity& activity = static_cast< CUpnpNotificationActivity& > ( *iContext.iNodeActivity );
+	
+	TUpnpMessage::TUPnPRequestInfo& msg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( iContext.iMessage );
+	activity.iTransaction = static_cast<CTransaction*>(msg.iPtr);
+	CRequest* request = activity.iTransaction->Request();
+
+	// Validate request & construct response
+	RStringPool strP = request->StringPool();
+	RHTTPHeaders reqHdrs = request->Handle().GetHeaderCollection();
+	RStringF sid = strP.StringF(UPnP::ESID, TUPnPTable::Table());
+	RStringF nts = strP.StringF(UPnP::ENTS, TUPnPTable::Table());
+	RStringF nt = strP.StringF(UPnP::ENT, TUPnPTable::Table());
+	RStringF seq = strP.StringF(UPnP::ESEQ, TUPnPTable::Table());
+	THTTPHdrVal ntsVal;
+	THTTPHdrVal ntVal;
+	THTTPHdrVal	sidVal;
+	TBool preConditionFailed = ETrue;
+	TBool invalidSequence = ETrue;
+	
+	// Check if the SID header is present.
+	if( reqHdrs.GetField( sid, 0, sidVal ) != KErrNotFound )
+		{
+		CSubscriptionInfo* subscriptionInfo = iContext.Node ().GetSubscriptionInfoBySid( sidVal.StrF().DesC() );
+		if(subscriptionInfo != NULL)
+			{
+			THTTPHdrVal seqVal;
+			if( (reqHdrs.GetField(seq, 0, seqVal) != KErrNotFound) && (seqVal.Int() == subscriptionInfo->iSeqKey+1) )
+				{
+				invalidSequence = EFalse;
+				subscriptionInfo->iSeqKey = seqVal.Int();
+				activity.iPublisherUrl.Set(subscriptionInfo->iPublishUrl.Ptr(),subscriptionInfo->iPublishUrl.Length());
+				}
+			preConditionFailed = EFalse;
+			}
+		else
+			{
+			preConditionFailed = ETrue;
+			}
+		}
+	else
+		{
+		preConditionFailed = ETrue;
+		}
+	
+	if(preConditionFailed) 
+		{
+		activity.iResponseStatus = KPreConditionFailedStatusCode;
+		}
+	else if(invalidSequence)
+		{
+		activity.iResponseStatus = KInvalidSeqStatusCode;
+		}
+	else
+		{
+		activity.iResponseStatus = KOkStatusCode;
+		
+		activity.iBodyBuf.Close();
+		TInt bodyBufLen = activity.iTransaction->BodyParts().Length();
+		activity.iBodyBuf.CreateMaxL(bodyBufLen);
+		activity.iBodyBuf.FillZ(bodyBufLen);
+		activity.iTransaction->BodyParts().CopyOut(activity.iBodyBuf);
+		activity.iTransaction->RemoveAllBodyParts( );
+		}
+	}
+
+
+DEFINE_SMELEMENT( CUpnpNotificationActivity::TSendResponse, NetStateMachine::MStateTransition, CUpnpNotificationActivity::TContext )
+void CUpnpNotificationActivity::TSendResponse::DoL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysEventNotifyActivity, KComponent, _L8("CUpnpNotificationActivity::TSendResponse::DoL")));
+	CUpnpNotificationActivity& activity = static_cast< CUpnpNotificationActivity& > ( *iContext.iNodeActivity );
+	
+	if ( activity.iResponseStatus == KOkStatusCode ||
+		 activity.iResponseStatus == KInvalidSeqStatusCode	 )
+		{
+		TUPnPEvent event;
+		event.iStatus = TUPnPEvent::ESuccess;
+		event.iErrorCode = KErrNone;
+		RParameterFamily family ;
+		CUPnPNotifyEventParamSet* notifyEventParamSet = CUPnPNotifyEventParamSet::NewL( family );
+		CleanupStack::PushL( notifyEventParamSet );
+			
+		if (activity.iResponseStatus == KOkStatusCode)
+			{			
+			notifyEventParamSet->SetNotificationL(activity.iBodyBuf);
+			}		
+		else if (activity.iResponseStatus == KInvalidSeqStatusCode)
+			{
+			// - should have constants for all the status codes.
+			event.iErrorCode = KInvalidSeqStatusCode;
+			}
+		notifyEventParamSet->SetUPnPEvent(event);
+		notifyEventParamSet->SetUriL(activity.iPublisherUrl);
+		
+		iContext.Node().AddResponseParamSetL( notifyEventParamSet, EUPnPNotifyEventParamSet );
+		CleanupStack::Pop(notifyEventParamSet);
+		}				
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().TcpServerFlow (),
+											TUpnpMessage::TUPnPResponseInfo ( activity.iTransaction, activity.iResponseStatus, NULL ).CRef () );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlscprfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,60 @@
+// 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 <comms-infras/ss_msgintercept.h>
+
+#include "upnpctrlscprfactory.h"
+#include "upnpctrlscpr.h"
+#include "upnpctrldeftscpr.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPSCprFactoryTag KESockSubConnectionTag
+#endif
+
+using namespace ESock;
+
+CUPnPControlSubConnectionProviderFactory* CUPnPControlSubConnectionProviderFactory::NewL(TAny* aParentContainer)
+	{
+	return new (ELeave) CUPnPControlSubConnectionProviderFactory(
+		TUid::Uid(CUPnPControlSubConnectionProviderFactory::iUid), 
+		*reinterpret_cast<CSubConnectionFactoryContainer*>(aParentContainer));
+	}
+	
+CUPnPControlSubConnectionProviderFactory::CUPnPControlSubConnectionProviderFactory(TUid aFactoryId, CSubConnectionFactoryContainer& aParentContainer)
+	: CSubConnectionProviderFactoryBase(aFactoryId, aParentContainer)
+    {
+	//LOG_NODE_CREATE(KUPnPSCprFactoryTag, CUPnPControlSubConnectionProviderFactory);
+    }
+
+ACommsFactoryNodeId* CUPnPControlSubConnectionProviderFactory::DoCreateObjectL(TFactoryQueryBase& aQuery)
+    {
+    const TDefaultSCPRFactoryQuery& query = static_cast<const TDefaultSCPRFactoryQuery&>(aQuery);    
+	CSubConnectionProviderBase* provider = NULL;
+    if (query.iSCPRType == RSubConnection::EAttachToDefault)
+        {
+        provider = CUPnPControlDefaultSubConnectionProvider::NewL(*this);
+		ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
+        }
+    else if (query.iSCPRType == RSubConnection::ECreateNew)
+        {
+        provider = CUPnPControlSubConnectionProvider::NewL(*this);
+		ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
+        }
+    else
+        {
+        User::Leave(KErrNotSupported);
+        }
+    return provider;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpctrlscprstates.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,522 @@
+// 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:
+//
+
+//System Includes
+#include <ss_glob.h>
+#include <http/thttptable.h>
+#include <comms-infras/ss_log.h>
+#include <comms-infras/ss_logext.h>
+#include <upnp/tupnptable.h>
+
+#include <comms-infras/ss_nodemessages.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <httperr.h>
+#include <inetprottextutils.h>
+
+//Local Includes
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+#include "upnp_cf_msgs.h"
+#include "upnpctrlscpractivities.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+
+using namespace ESock;
+using namespace CorePanics;
+using namespace UPnPControlSCprStates;
+using namespace UPnPStateMachine;
+using namespace PRActivities;
+using namespace UPnPSearchStates;
+using namespace UPnPRegisterNotifyStates;
+using namespace CoreActivities;
+
+__FLOG_STMT(_LIT8(KComponent,"UPnPCtrlScprSts");)
+
+//===========================UPnP Control SCPR states and activities==========================   	   
+
+	
+DEFINE_SMELEMENT ( TAwaitingDataClientJoin, NetStateMachine::MState, UPnPControlSCprStates::TContext )
+TBool TAwaitingDataClientJoin::Accept ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TAwaitingDataClientJoin")));
+	
+	TCFFactory::TPeerFoundOrCreated* dcJoined = message_cast<TCFFactory::TPeerFoundOrCreated> ( &iContext.iMessage );	
+	
+	if ( dcJoined )
+    	{
+    	if ( iContext.iNodeActivity->Error( ) != KErrNone )
+        	{
+            RNodeInterface* clientAlreadyAdded = iContext.Node ( ).FindClient ( dcJoined->iNodeId );
+            if ( clientAlreadyAdded == NULL && dcJoined->iNodeId != TNodeId::NullId ( ) )
+                {
+                RClientInterface::OpenPostMessageClose ( iContext.NodeId (), dcJoined->iNodeId, TEChild::TDestroy ().CRef () );
+                }
+        	}
+        return ETrue;
+    	}
+    else if ( iContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest> ( ) )
+        {
+        // We can't send TCancel to the factory, we better eat the message
+        // here and switch the activity into a cancelling mode.
+        iContext.iMessage.ClearMessageId ( );
+        iContext.iNodeActivity->SetError( KErrCancel );
+        }
+    else if ( iContext.iMessage.IsMessage<TUpnpMessage::TCancelParamSet> ( ) )
+    	{    	
+    	CUPnPActivityBase& activity = static_cast<CUPnPActivityBase&> ( *iContext.iNodeActivity );
+		TUpnpMessage::TCancelParamSet& msg = message_cast< TUpnpMessage::TCancelParamSet > ( iContext.iMessage );
+		CUPnPRequestParamSetBase* paramSet = static_cast<CUPnPRequestParamSetBase*>(msg.iParamSet);
+		
+		if ( activity.iRequestParamSet->Uri ( ).CompareF ( paramSet->Uri() ) == 0 )
+			{
+    		// We can't send TCancel to the factory, we better eat the message
+        	// here and switch the activity into a cancelling mode.
+        	iContext.iMessage.ClearMessageId ( );
+        	iContext.iNodeActivity->SetError( KErrCancel );
+        	
+        	// delete cancel paramset based on type id.        	
+        	STypeId metaType = activity.iRequestParamSet->GetTypeId( );
+        	switch ( metaType.iType )
+        		{
+        		case EUPnPCancelDiscoverParamSet:
+        			delete static_cast<CUPnPCancelDiscoverParamSet*>(paramSet);
+        		break;
+        		
+        		case EUPnPCancelRegisterNotifyParamSet:
+    	        	delete static_cast<CUPnPCancelRegisterNotifyParamSet *>(paramSet);
+	       		break;
+	       		
+        		case EUPnPCancelDescribeParamSet:
+        			delete static_cast<CUPnPCancelDescribeParamSet *>(paramSet);
+        		break;
+        		
+        		case EUPnPCancelSubscribeParamSet:
+        			delete static_cast<CUPnPCancelSubscribeParamSet *>(paramSet);
+        		break;
+        		
+        		default:
+				break;      	
+        		}
+        	paramSet = NULL;
+			}        
+    	}
+		 	
+    return EFalse;
+	}	
+	
+
+DEFINE_SMELEMENT ( TStoreRequestParams, NetStateMachine::MStateTransition, UPnPControlSCprStates::TContext )
+void TStoreRequestParams::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TStoreRequestParams")));
+	
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+	TCFScpr::TSetParamsRequest* setParamsRequest = message_cast<TCFScpr::TSetParamsRequest>( &iContext.iMessage );
+#else
+	TCFScpr::TParamsRequest* setParamsRequest = message_cast<TCFScpr::TParamsRequest>( &iContext.iMessage );
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+	ASSERT ( setParamsRequest );
+	
+	//Extract the parambundle from the request message.	
+	if ( !setParamsRequest->iFamilyBundle.IsNull() )
+    	{
+    	HBufC8* buf = HBufC8::NewL ( setParamsRequest->iFamilyBundle.Length() );
+    	TPtr8 bufPtr ( buf->Des() );
+    	
+    	setParamsRequest->iFamilyBundle.Store ( bufPtr );
+    	iContext.Node().iRequestBundle.LoadL ( bufPtr );
+    	delete buf;
+    	}
+	}
+
+
+DEFINE_SMELEMENT ( TSendRequestParamResponse, NetStateMachine::MStateTransition, UPnPControlSCprStates::TContext )
+void TSendRequestParamResponse::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TSendRequestParamResponse")));
+	
+	if ( iContext.Node().iRequestBundle.GetFamilyAtIndex (0).Id () == EUPnPClearParamSet )
+		{
+		iContext.Node().iResponseBundle.Close ();	// DEF126893 fix pending
+		iContext.Node().iResponseBundle.CreateL ();
+		iContext.Node().iResponseBundle.Open ();
+		}
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender, TCFScpr::TSetParamsResponse ( iContext.Node().iResponseBundle ).CRef () );
+#else
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender, TCFScpr::TParamsResponse ( iContext.Node().iResponseBundle ).CRef () );
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+
+	}
+
+DEFINE_SMELEMENT ( TInitiateActivities, NetStateMachine::MStateTransition, UPnPControlSCprStates::TContext )
+void TInitiateActivities::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TInitiateActivities")));	
+	iContext.Node ( ).InitiateActivitiesL ( );
+	}
+
+DEFINE_SMELEMENT ( TCreateControlDataClient, NetStateMachine::MStateTransition, UPnPControlSCprStates::TContext )
+void TCreateControlDataClient::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TCreateControlDataClient")));
+	
+	TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+	const TUid uid = { CUPnPFlowFactory::iUid };
+	THttpClientFlowQuery flowQuery ( TAppProtAddr ( 0 , 0 ), iContext.NodeId (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew );
+		
+	iContext.iNodeActivity->PostRequestTo( factoryContainer, TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane , uid, &flowQuery ).CRef () );
+	}
+
+	
+DEFINE_SMELEMENT ( TProcessCallbackDataClient, NetStateMachine::MStateTransition, UPnPControlSCprStates::TContext )
+void TProcessCallbackDataClient::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TProcessCallbackDataClient")));
+	
+	const TNodeId& dataClient = (message_cast<TCFFactory::TPeerFoundOrCreated>(iContext.iMessage)).iNodeId;
+	iContext.Node ().SetTcpServerFlow ( dataClient );
+	
+	// start the data client
+	iContext.iNodeActivity->PostRequestTo ( dataClient, TCFDataClient::TStart ().CRef () );
+	}
+
+DEFINE_SMELEMENT ( TSendActivityStopped, NetStateMachine::MStateTransition, UPnPControlSCprStates::TContext )
+void TSendActivityStopped::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TSendActivityStopped")));
+	
+	if ( iContext.Node ( ).IsClosing ( ) 
+			&& iContext.iNode.CountAllActivities () == 2 ) // only - destroy and this upnp activity is pending
+		{
+		RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.NodeId (), TUpnpMessage::TActivityStopped ().CRef () );	
+		}
+	
+	// since upnp control scpr ativities are self originated, clear activity error
+	iContext.iNodeActivity->SetError( KErrNone );
+	}
+	
+DEFINE_SMELEMENT ( TFindHttpClientFlowOrSendRequest, NetStateMachine::MStateFork, UPnPControlSCprStates::TContext )
+TInt TFindHttpClientFlowOrSendRequest::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TFindHttpClientFlowOrSendRequest")));
+	
+	TAppProtAddr addr ( 0, 0 );
+	CUPnPActivityBase* activity = static_cast<CUPnPActivityBase*> ( iContext.iNodeActivity );		
+	
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TDescribeRequest> ( ) )
+		{
+		TUpnpMessage::TDescribeRequest& describeMsg = message_cast<TUpnpMessage::TDescribeRequest> ( iContext.iMessage );
+		activity->iRequestParamSet =  static_cast<CUPnPDescribeRequestParamSet*> ( describeMsg.iParamSet );	
+		addr = static_cast<CUPnPDescribeRequestParamSet *>(describeMsg.iParamSet)->RemoteHost();
+		}
+	else if ( iContext.iMessage.IsMessage<TUpnpMessage::TSubscribeRequest> ( ) )
+		{
+		TUpnpMessage::TSubscribeRequest& subscribeMsg = message_cast<TUpnpMessage::TSubscribeRequest> ( iContext.iMessage );
+		activity->iRequestParamSet =  static_cast<CUPnPSubscribeRequestParamSet*> ( subscribeMsg.iParamSet );
+		addr = static_cast<CUPnPSubscribeRequestParamSet *> ( subscribeMsg.iParamSet )->RemoteHost();					
+		}	
+		
+	TInt idx = 0;
+	TBool dcFound = EFalse;
+	TBool dcInitialising = EFalse;
+	while ( iContext.Node().iFlowInfo.Count ( ) != idx )
+		{
+		if ( iContext.Node().iFlowInfo[idx].iAppProtAddr == addr )
+			{
+			if ( iContext.Node().iFlowInfo[idx].iDataClient != TNodeId::NullId ( ) )
+				{
+				dcFound = ETrue;
+				activity->iFlowId = iContext.Node().iFlowInfo[idx].iDataClient;
+				}
+			else
+				{
+				dcInitialising = ETrue;
+				}
+			break;
+			}	
+		idx++;
+		}
+	if ( dcFound )
+		{
+		return UPnPStateMachine::KSendRequest;
+		}
+	if ( !dcInitialising )
+		{
+		CUPnPControlSubConnectionProvider::TFlowInfo newDataClient;
+		newDataClient.iAppProtAddr = addr;
+		iContext.Node().iFlowInfo.Append ( newDataClient );
+		}
+	return MeshMachine::KNoTag;
+	}
+
+DEFINE_SMELEMENT ( TFindOrCreateHttpClientFlow, NetStateMachine::MStateTransition, UPnPControlSCprStates::TContext )
+void TFindOrCreateHttpClientFlow::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TFindOrCreateHttpClientFlow::DoL")));
+	CUPnPActivityBase& activity = static_cast<CUPnPActivityBase&> ( *iContext.iNodeActivity );
+	
+	TAppProtAddr remoteHost ( 0, 0 );
+	STypeId metaType = activity.iRequestParamSet->GetTypeId( );
+	if (  metaType.iType == EUPnPDescribeRequestParamSet )
+		{
+	 	CUPnPDescribeRequestParamSet* paramSet = static_cast<CUPnPDescribeRequestParamSet*> ( activity.iRequestParamSet );
+	 	remoteHost = paramSet->RemoteHost( );
+		}
+	else if ( metaType.iType == EUPnPSubscribeRequestParamSet )
+		{
+		CUPnPSubscribeRequestParamSet* paramSet = static_cast<CUPnPSubscribeRequestParamSet*> ( activity.iRequestParamSet );
+		remoteHost = paramSet->RemoteHost( );
+		}
+	
+	const TUid requestedUid = { CUPnPFlowFactory::iUid };
+	
+	THttpClientFlowQuery flowQuery ( remoteHost,
+									iContext.NodeId (),
+									EHttpClientFlow,
+									THttpClientFlowQuery::EUseExisting );		
+	TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+									
+	TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( playerRole );
+	activity.PostRequestTo ( factoryContainer, TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+	}
+
+
+DEFINE_SMELEMENT ( TProcessHttpDataClient, NetStateMachine::MStateTransition, UPnPControlSCprStates::TContext )
+void TProcessHttpDataClient::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TProcessHttpDataClient")));
+	
+	CUPnPActivityBase& activity = static_cast< CUPnPActivityBase& >( *iContext.iNodeActivity );
+	
+	TAppProtAddr remoteHost;
+	STypeId metaType = activity.iRequestParamSet->GetTypeId( );
+	if (  metaType.iType == EUPnPDescribeRequestParamSet )
+		{
+	 	CUPnPDescribeRequestParamSet* paramSet = static_cast<CUPnPDescribeRequestParamSet*> ( activity.iRequestParamSet );
+	 	remoteHost = paramSet->RemoteHost( );
+		}
+	else if ( metaType.iType == EUPnPSubscribeRequestParamSet )
+		{
+		CUPnPSubscribeRequestParamSet* paramSet = static_cast<CUPnPSubscribeRequestParamSet*> ( activity.iRequestParamSet );
+		remoteHost = paramSet->RemoteHost( );
+		}
+	
+	TInt iDcIdx = 0;
+	for ( iDcIdx = 0; iDcIdx < iContext.Node ( ).iFlowInfo.Count ( ); iDcIdx++ )
+		{
+		if ( iContext.Node ( ).iFlowInfo[iDcIdx].iAppProtAddr == remoteHost )
+			{
+			break;
+			}
+		}
+	
+	TCFFactory::TPeerFoundOrCreated &msg = message_cast<TCFFactory::TPeerFoundOrCreated>(iContext.iMessage );
+	iContext.Node ( ).iFlowInfo[iDcIdx].iDataClient = msg.iNodeId;
+	activity.iFlowId = msg.iNodeId;
+	}
+	
+
+//======================================UPnP Search States============================================//
+
+DEFINE_SMELEMENT ( UPnPSearchStates::TFindUdpClientFlowOrSendRequest, NetStateMachine::MStateFork, UPnPSearchStates::TContext )
+TInt UPnPSearchStates::TFindUdpClientFlowOrSendRequest::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPSearchStates::TFindUdpClientFlowOrSendRequest")));
+	
+	TUpnpMessage::TSearchRequest& msg = message_cast<TUpnpMessage::TSearchRequest> ( iContext.iMessage );
+	CUPnPSearchActivity* activity = static_cast<CUPnPSearchActivity*> ( iContext.iNodeActivity );
+	activity->iRequestParamSet =  static_cast<CUPnPDiscoverRequestParamSet*> ( msg.iParamSet );
+
+	CUPnPControlSubConnectionProvider& node = static_cast<CUPnPControlSubConnectionProvider&>(iContext.Node());
+	if ( node.UdpClientFlow() == TNodeId::NullId () )
+		{
+		return MeshMachine::KNoTag;
+		}
+	return UPnPStateMachine::KSendRequest;
+	}
+
+DEFINE_SMELEMENT ( UPnPSearchStates::TStoreUdpClientFlowAndSendRequest, NetStateMachine::MStateFork, UPnPSearchStates::TContext )
+TInt UPnPSearchStates::TStoreUdpClientFlowAndSendRequest::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPSearchStates::TStoreUdpClientFlowAndSendRequest")));
+	
+	TCFFactory::TPeerFoundOrCreated &msg = message_cast<TCFFactory::TPeerFoundOrCreated>(iContext.iMessage );
+	iContext.Node().SetUdpClientFlow ( msg.iNodeId );
+	return UPnPStateMachine::KSendRequest;
+	}
+	
+DEFINE_SMELEMENT ( UPnPSearchStates::TCancelSearchOrProcessResponseTag, NetStateMachine::MStateFork, UPnPSearchStates::TContext )
+TInt UPnPSearchStates::TCancelSearchOrProcessResponseTag::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPSearchStates::TCancelSearchOrProcessResponseTag")));
+	
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse>() )
+		{
+		return UPnPStateMachine::KProcessResponse;
+		}
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TCancelParamSet>() 
+		 || iContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest>() )
+		{
+		return MeshMachine::KCancelTag;
+		}
+	return  MeshMachine::KErrorTag;
+	}
+
+DEFINE_SMELEMENT ( UPnPSearchStates::TNoTagOrResponseTag, NetStateMachine::MStateFork, UPnPSearchStates::TContext )
+TInt UPnPSearchStates::TNoTagOrResponseTag::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPSearchStates::TNoTagOrResponseTag")));
+	
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse> () )
+		{
+		return UPnPStateMachine::KProcessResponse;
+		}
+	return  MeshMachine::KNoTag;
+	}
+
+//=================================UPnP Register Notify States =============================================================//
+
+DEFINE_SMELEMENT ( UPnPRegisterNotifyStates::TFindMUdpFlowOrSendRequest, NetStateMachine::MStateFork, UPnPRegisterNotifyStates::TContext )
+TInt UPnPRegisterNotifyStates::TFindMUdpFlowOrSendRequest::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPRegisterNotifyStates::TFindMUdpFlowOrSendRequest")));
+	
+	TUpnpMessage::TRegisterNotifyRequest& msg = message_cast<TUpnpMessage::TRegisterNotifyRequest> ( iContext.iMessage );
+	CUPnPRegisterNotifyActivity* activity = static_cast<CUPnPRegisterNotifyActivity*> ( iContext.iNodeActivity );
+	activity->iRequestParamSet =  static_cast<CUPnPRegisterAnnouncementParamSet*> ( msg.iParamSet );
+
+	CUPnPControlSubConnectionProvider& node = static_cast<CUPnPControlSubConnectionProvider&>(iContext.Node());
+	if ( node.UdpServerFlow () == TNodeId::NullId () )
+		{
+		return MeshMachine::KNoTag;
+		}
+	return UPnPStateMachine::KSendRequest;
+	}
+
+DEFINE_SMELEMENT ( UPnPRegisterNotifyStates::TStoreMUdpFlowAndStartServer, NetStateMachine::MStateFork, UPnPRegisterNotifyStates::TContext )
+TInt UPnPRegisterNotifyStates::TStoreMUdpFlowAndStartServer::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPRegisterNotifyStates::TStoreMUdpFlowAndStartServer")));
+	
+	TCFFactory::TPeerFoundOrCreated &msg = message_cast<TCFFactory::TPeerFoundOrCreated> ( iContext.iMessage );
+	iContext.Node ().SetUdpServerFlow ( msg.iNodeId );
+	return MeshMachine::KNoTag;
+	}
+	
+DEFINE_SMELEMENT ( UPnPRegisterNotifyStates::TCancelRegisterOrProcessResponseTag, NetStateMachine::MStateFork, UPnPRegisterNotifyStates::TContext )
+TInt UPnPRegisterNotifyStates::TCancelRegisterOrProcessResponseTag::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPRegisterNotifyStates::TCancelRegisterOrProcessResponseTag")));
+	
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishAliveRequest> () || iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishByeRequest> () )
+		{
+		return UPnPStateMachine::KProcessResponse;
+		}
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TCancelParamSet> () || iContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest> () )
+		{
+		return MeshMachine::KCancelTag;
+		}
+	return  MeshMachine::KErrorTag;
+	}
+	
+DEFINE_SMELEMENT ( UPnPRegisterNotifyStates::TNoTagOrResponseTag, NetStateMachine::MStateFork, UPnPRegisterNotifyStates::TContext )
+TInt UPnPRegisterNotifyStates::TNoTagOrResponseTag::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPRegisterNotifyStates::TNoTagOrResponseTag")));	
+	return iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishAliveRequest> () || iContext.iMessage.IsMessage<TUpnpMessage::TUPnPPublishByeRequest>() ? UPnPStateMachine::KProcessResponse : MeshMachine::KNoTag;
+	}
+	
+//=================================UPnP Describe States =============================================================//
+
+DEFINE_SMELEMENT ( UPnPDescribeStates::TCancelDescribeOrProcessResponseTag, NetStateMachine::MStateFork, UPnPDescribeStates::TContext )
+TInt UPnPDescribeStates::TCancelDescribeOrProcessResponseTag::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("CancelDescribeOrProcessResponseTag")));
+	
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TResponse> () )
+		{
+		return KProcessResponse;
+		}
+	else if(iContext.iMessage.IsMessage<TUpnpMessage::TCancelParamSet>()
+			|| iContext.iMessage.IsMessage<TUpnpMessage::TCancelRequest>() )
+		{
+		return MeshMachine::KCancelTag;
+		}
+	else if (iContext.iMessage.IsMessage<TEBase::TError>())
+		{
+		TEBase::TError& msg = message_cast<TEBase::TError> ( iContext.iMessage );
+		if ( msg.iValue != KErrCancel )
+			{
+			return  MeshMachine::KErrorTag;
+			}
+		}
+	return MeshMachine::KNoTag;
+	}
+
+//==============================================================================================//
+DEFINE_SMELEMENT ( UPnPSubscribeStates::TErrorOrProcessResponseTag, NetStateMachine::MStateFork, UPnPDescribeStates::TContext )
+TInt UPnPSubscribeStates::TErrorOrProcessResponseTag::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("UPnPSubscribeStates::ErrorOrProcessResponseTag")));
+	
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TSubscribeResponse> () )
+		{
+		return KProcessResponse;
+		}
+	else if ( iContext.iMessage.IsMessage<TEBase::TError> () )
+		{
+		return  MeshMachine::KErrorTag;
+		}
+	return MeshMachine::KNoTag;
+	}
+
+
+DEFINE_SMELEMENT ( UPnPSubscribeStates::TNoTagOrCancelSubscribe, NetStateMachine::MStateFork, UPnPSubscribeStates::TContext )
+TInt UPnPSubscribeStates::TNoTagOrCancelSubscribe::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("NoTagOrCancelSubscribe")));
+	
+	TUpnpMessage::TSubscribeResponse& msg = message_cast< TUpnpMessage::TSubscribeResponse > ( iContext.iMessage );
+	
+	if ( msg.iStatus == HTTPStatus::EOk && iContext.iNodeActivity->Error() == KErrCancel )
+		{
+		return MeshMachine::KCancelTag;
+		}
+		
+	return MeshMachine::KNoTag;
+	}
+//==============================================================================================//
+DEFINE_SMELEMENT ( TAwaitingBindToComplete, NetStateMachine::MState, UPnPStateMachine::TContext )
+TBool TAwaitingBindToComplete::Accept ( )
+	{
+	CoreNetStates::TAwaitingBindToComplete awaitingBindToComplete ( iContext );
+	if ( awaitingBindToComplete.Accept () )
+		{
+	    CCommsBinderActivity* binderActivity = reinterpret_cast<CCommsBinderActivity*> ( iContext.iNodeActivity->FetchExtInterface ( CCommsBinderActivity::KInterfaceId ) );
+	    ASSERT ( binderActivity );
+	    RNodeInterface* pendingBinder = binderActivity->Binder ();
+		TUint c = iContext.Node ().CountActivities ( iContext.iNodeActivity->ActivitySigId () );
+		if ( c == 1 )
+			{
+			pendingBinder->ClearFlags ( TCFClientType::EActivating );
+			}
+		//binderActivity->StoreBinder(NULL);
+
+		return ETrue;
+		}
+	return EFalse;
+	}
+		
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpmcpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,217 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <comms-infras/ss_msgintercept.h>
+#include <comms-infras/ss_log.h>
+#include <comms-infras/ss_logext.h>
+#include <ss_glob.h>
+#include <ss_roles.h>
+#include "upnpmcpr.h"
+#include "upnpmcpractivities.h"
+#include "upnp_cf_msgs.h"
+#include "upnpserverconstants.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPMCprTag KESockMetaConnectionTag
+#endif
+
+
+using namespace ESock;
+using namespace Messages;
+
+
+typedef TBuf<0x100> THostName; // Note ! cannot include es_sock.h
+_LIT8 ( KHttpDefaultPort, "80" );
+//Add Blocks of 64
+static const TInt KBlockSize1 = 64;
+static const TInt KMinGrowth1 = 30;
+static const TInt KThresholdGrowth1 = 30;
+static const TInt KInitialAllocation1 = 128;
+//Add Blocks of 512
+static const TInt KBlockSize2 = 512;
+static const TInt KMinGrowth2 = 16;
+static const TInt KThresholdGrowth2 = 16;
+static const TInt KInitialAllocation2 = 64;
+
+static const TInt KHeapSize	= 1024 * 1024;	//1MB
+
+CUPnPMetaConnectionProvider* CUPnPMetaConnectionProvider::NewL(
+		CMetaConnectionProviderFactoryBase& aFactory, 
+		const TProviderInfo& aProviderInfo)
+	{
+	CUPnPMetaConnectionProvider* provider = new (ELeave) CUPnPMetaConnectionProvider(
+		aFactory, 
+		aProviderInfo, 
+		UPnPMCprActivities::activityMap::Self());
+	CleanupStack::PushL(provider);
+	provider->ConstructL();
+	CleanupStack::Pop(provider);
+	return provider;
+	}
+	
+CUPnPMetaConnectionProvider::~CUPnPMetaConnectionProvider()
+	{
+	LOG_NODE_DESTROY(KUPnPMCprTag, CUPnPMetaConnectionProvider);
+	LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "Deleting ~CUPnPMetaConnectionProvider" ) ) );				
+	
+	TUpnpMessage::DeRegister ( );
+	
+	delete iSocketOpener;
+	iSocket.Close ();
+	iDeviceLocation.Close ();
+	delete iChunkManager;
+	LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "Deleted ~CUPnPMetaConnectionProvider" ) ) );	
+	}
+	
+CUPnPMetaConnectionProvider::CUPnPMetaConnectionProvider(
+		CMetaConnectionProviderFactoryBase& aFactory, 
+		const TProviderInfo& aProviderInfo, 
+		const MeshMachine::TNodeActivityMap& aActivityMap)
+	: CCoreMetaConnectionProvider(aFactory, aProviderInfo, aActivityMap)
+	{
+	LOG_NODE_CREATE(KUPnPMCprTag, CUPnPMetaConnectionProvider);    
+	}
+	
+void CUPnPMetaConnectionProvider::ConstructL ()
+	{
+	CCoreMetaConnectionProvider::ConstructL ();
+	
+	iSocketOpener = CSocketOpener::NewL ( *this );	
+	
+	// Register with comms transport to be able to receive our
+	// custom Upnp messages
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	// Register UPnPMesage with dataplane thread
+	TNodeId factoryContainer = SockManGlobals::Get ()->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );	
+	CommsFW::TWorkerId worker = factoryContainer.Thread ();
+	Den::CCommonWorkerThread* workerThread = SockManGlobals::Get ()->SelfPlayer ()->PitBoss ().WorkerDataGlobals ().WorkerThread ( worker );
+	TUpnpMessage::RegisterL ( workerThread );
+	
+	//Create the Chunk Manager
+	CChunkManager* chkmgr = CChunkManager::NewL ( KHeapSize );
+	if ( chkmgr )
+		{
+		chkmgr->AddPoolL ( KBlockSize1, KInitialAllocation1, KMinGrowth1, KThresholdGrowth1 );
+		chkmgr->AddPoolL ( KBlockSize2, KInitialAllocation2, KMinGrowth2, KThresholdGrowth2 );
+		}
+	
+	iChunkManager = chkmgr;
+	}
+	
+void CUPnPMetaConnectionProvider::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+    {
+	ESOCK_DEBUG_MESSAGE_INTERCEPT ( aSender, aMessage, aRecipient );
+	
+	MeshMachine::TNodeContext<CUPnPMetaConnectionProvider> ctx ( *this, aMessage, aSender, aRecipient );
+    if ( ctx.iMessage.IsMessage<TUpnpMessage::TRequestLocalHost> () )	 
+		{		
+		FindLocalHost ();
+		}
+
+	CCoreMetaConnectionProvider::Received(ctx);
+    User::LeaveIfError(ctx.iReturn);
+	}
+	
+const TDesC8& CUPnPMetaConnectionProvider::DeviceLocationUrl ()
+	{
+	return iDeviceLocation;
+	}
+
+CChunkManager* CUPnPMetaConnectionProvider::ChunkManager()
+	{
+	return iChunkManager;
+	}
+
+void CUPnPMetaConnectionProvider::FindLocalHost ()
+	{
+	iSocketOpener->MakeSocket( KAfInet, KSockStream, KProtocolInetTcp );
+	}
+	
+void CUPnPMetaConnectionProvider::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iSocket = aSocket;
+	
+	// We're going to ask for information about the interface used to reach
+	// a certain destination address. The constant address KInetAddrAny should
+	// guarantee that we get the interface which is the preferred default route.	
+	TInetAddr localHost;
+	localHost.SetAddress ( KInetAddrAny );
+	TPckgBuf<TSoInetIfQuery> query;
+	query ().iDstAddr = localHost;
+	
+	TInt err = iSocket.GetOpt ( KSoInetIfQueryByDstAddr, KSolInetIfQuery, query );
+	
+	if ( err == KErrNone )
+		{
+		// its local IP address
+		localHost = query ().iSrcAddr;
+		err = GenerateDeviceLocation ( localHost );
+		
+		LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "- CUPnPMetaConnectionProvider::OpenComplete -"  ) ) );
+		//LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "- interface link name %s" ), query ().iName ) ) ;
+		//LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "- interface link local host ip %s" ), query ().iSrcAddr ) );
+		LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "- interface link Index %d" ), query ().iIndex ) );
+		LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "- interface link up or not %d" ), query ().iIsUp ) );
+		}
+	else if ( err == KErrNotFound ) // KErrNotFound would indicate that there is no
+									// 'up' default route, maybe because none is
+									// configured or else we're not connected to the Internet
+		{
+		//UPNP Stack cannot proceed with this. Check the interface configuration
+		__ASSERT_DEBUG ( ETrue, User::Invariant () );
+		}
+		
+	RNodeInterface* dc = GetFirstClient<TDefaultClientMatchPolicy> ( TCFClientType::EData );
+	if ( err == KErrNone )
+		{
+		LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "posting local Host to CPR" ) ) );
+		RClientInterface::OpenPostMessageClose ( NodeId (), dc->RecipientId (), TUpnpMessage::TLocalHost ().CRef () );
+		}
+	else
+		{
+		LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "posting error to CPR" ) ) );				
+		TEBase::TError msg ( TUpnpMessage::TRequestLocalHost::Id(), err );
+		RClientInterface::OpenPostMessageClose ( NodeId (), dc->RecipientId (), msg );
+		}
+	}
+	
+TInt CUPnPMetaConnectionProvider::GenerateDeviceLocation ( const TInetAddr& aAddr )
+	{
+	THostName hostName;	
+	aAddr.Output ( hostName );
+	
+	iDeviceLocation.Close ( );
+	//Allocate memory for having ---  http://'ip':'port'/
+	TInt err = iDeviceLocation.Create ( KHttpScheme ().Length () + hostName.Length () + 1 + KHttpDefaultPort ().Length () + 1 );
+	iDeviceLocation.Copy ( KHttpScheme () );
+	iDeviceLocation.Append ( hostName );
+	iDeviceLocation.Append ( TChar ( ':' ) );
+	iDeviceLocation.Append ( KHttpDefaultPort () );
+	iDeviceLocation.Append ( TChar ( '/' ) );
+	LOG ( ESockLogExternal::Printf ( KUPnPMCprTag, KUPnPMCprTag, _L8 ( "- upnp device location %s" ), &iDeviceLocation ) );
+	return err;
+	}
+
+	
+void CUPnPMetaConnectionProvider::Error ( TOperation /*aOperation*/, TInt aError )
+	{
+	RNodeInterface* dc = GetFirstClient<TDefaultClientMatchPolicy> ( TCFClientType::EData );	
+	TEBase::TError msg ( TUpnpMessage::TRequestLocalHost::Id(), aError );
+	RClientInterface::OpenPostMessageClose ( NodeId (), dc->RecipientId (), msg );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpmcpractivities.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "upnpmcpractivities.h"
+
+namespace UPnPMCprActivities
+{
+	DEFINE_ACTIVITY_MAP(activityMap)
+	ACTIVITY_MAP_END_BASE(MCprActivities, coreMCprActivities)
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpmcprfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <comms-infras/ss_msgintercept.h>
+
+#include "upnpmcprfactory.h"
+#include "upnpmcpr.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPMCprFactoryTag KESockMetaConnectionTag
+#endif
+
+using namespace ESock;
+
+CUPnPMetaConnectionProviderFactory* CUPnPMetaConnectionProviderFactory::NewL(TAny* aParentContainer)
+	{
+	return new (ELeave) CUPnPMetaConnectionProviderFactory(
+		TUid::Uid(CUPnPMetaConnectionProviderFactory::iUid), 
+		*reinterpret_cast<CMetaConnectionFactoryContainer*>(aParentContainer));
+	}
+	
+CUPnPMetaConnectionProviderFactory::CUPnPMetaConnectionProviderFactory(TUid aFactoryId, CMetaConnectionFactoryContainer& aParentContainer)
+	: CMetaConnectionProviderFactoryBase(aFactoryId, aParentContainer)
+	{
+//	LOG_NODE_CREATE(KUPnPMCprFactoryTag, CUPnPMetaConnectionProviderFactory);
+	}
+	
+ACommsFactoryNodeId* CUPnPMetaConnectionProviderFactory::DoCreateObjectL(TFactoryQueryBase& aQuery)
+	{
+	const TMetaConnectionFactoryQuery& query = static_cast<const TMetaConnectionFactoryQuery&>(aQuery);	
+	CMetaConnectionProviderBase* provider = CUPnPMetaConnectionProvider::NewL(*this, query.iProviderInfo);
+	ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
+    return provider;	
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpscpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "upnpscpr.h"
+
+using namespace Messages;
+
+CUPnPSubConnectionProvider::CUPnPSubConnectionProvider(ESock::CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap)
+: CCoreSubConnectionProvider(aFactory, aActivityMap)
+	{
+	
+	}
+
+CUPnPSubConnectionProvider::~CUPnPSubConnectionProvider()
+	{
+	
+	}
+
+CUPnPConnectionProvider& CUPnPSubConnectionProvider::BaseConnectionProvider ( )
+	{
+#if !defined(__GCCXML__)
+	CConnectionProviderBase& cprBase = mnode_cast<CConnectionProviderBase>(ControlProvider()->RecipientId().Node());	
+#else
+	CConnectionProviderBase& cprBase =
+		reinterpret_cast<CConnectionProviderBase&>(ControlProvider()->RecipientId().Node());		
+#endif
+
+	return static_cast<CUPnPConnectionProvider&>(cprBase);
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnpstatemachine.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,320 @@
+// 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:
+// System Includes
+// 
+//
+
+#include <ss_glob.h>
+#include <http/thttptable.h>
+#include <comms-infras/ss_log.h>
+#include <comms-infras/ss_logext.h>
+#include <upnp/tupnptable.h>
+
+#include <httperr.h>
+#include <inetprottextutils.h>
+#include <rmemchunk.h>
+
+//Local Includes
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+
+#include "upnp_cf_msgs.h"
+#include "upnpctrlscpractivities.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+
+using namespace ESock;
+using namespace CorePanics;
+using namespace UPnPControlSCprStates;
+using namespace UPnPStateMachine;
+using namespace PRActivities;
+using namespace UPnPSearchStates;
+using namespace UPnPRegisterNotifyStates;
+using namespace CoreActivities;
+
+__FLOG_STMT(_LIT8(KComponent,"UPnPCtrlScprSts");)
+//===========================UPnP SCPR states and activities==========================   	   
+
+DEFINE_SMELEMENT ( TFindOrCreateUdpClientFlow, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )	
+void TFindOrCreateUdpClientFlow::DoL ( )
+	{
+	THttpUdpFlowQuery flowQuery ( iContext.NodeId (), EHttpUdpFlow, iContext.Node ().BaseConnectionProvider ().MemoryManager() );
+	const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+	TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+		
+	iContext.iNodeActivity->PostRequestTo ( factoryContainer, TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+	}
+
+DEFINE_SMELEMENT ( TFindOrCreateUdpServerFlow, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )	
+void TFindOrCreateUdpServerFlow::DoL ( )
+	{	
+	THttpUdpFlowQuery flowQuery ( iContext.NodeId (), EHttpMUdpFlow );
+	const TUid requestedUid = { CUPnPFlowFactory::iUid };		
+	TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+		
+	iContext.iNodeActivity->PostRequestTo ( factoryContainer, TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+	}
+
+	
+DEFINE_SMELEMENT ( THandleControlChannelDataClientIdle, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )
+void THandleControlChannelDataClientIdle::DoL ( )
+	{
+	//This transition may only be triggered by a peer message from a data client
+	ASSERT ( iContext.iPeer );
+	ASSERT ( iContext.iPeer->Type() == TCFClientType::EData );
+	
+   	iContext.iPeer->PostMessage( TNodeCtxId ( ( iContext.iNodeActivity )? iContext.iNodeActivity->ActivityId( ) : MeshMachine::KActivityNull, iContext.NodeId () ),
+   								 TEChild::TDestroy ().CRef () );
+   	iContext.iNode.RemoveClient ( iContext.iPeer->RecipientId() );
+    }	
+    
+DEFINE_SMELEMENT ( TStoreBindToOriginator, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )
+void TStoreBindToOriginator::DoL ()
+	{
+	ABindingActivity* bindingActivity = reinterpret_cast<ABindingActivity*>(iContext.iNodeActivity->FetchExtInterface(ABindingActivity::KInterfaceId));
+    ASSERT(bindingActivity);
+    bindingActivity->StoreOriginator(iContext.iSender);
+	}
+	
+DEFINE_SMELEMENT ( TAwaitingSetParamRequest, NetStateMachine::MState, UPnPStateMachine::TContext )
+TBool TAwaitingSetParamRequest::Accept ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TAwaitingSetParamRequest::Accept")));
+	TUint16 senderActivityId = address_cast<TNodeCtxId> ( iContext.iSender ).NodeCtx ();
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+	if ( senderActivityId == ECFActivityParamRequest && 
+		iContext.iMessage.IsMessage<TCFScpr::TSetParamsRequest> () )
+#else
+	if ( senderActivityId == ECFActivityParamRequest && 
+		iContext.iMessage.IsMessage<TCFScpr::TParamsRequest> () )
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW		
+		{
+		LOG(ESockLogExternal::Printf(KSubsysCtrlScprSts, KComponent, _L8("TAwaitingSetParamRequest::Accept - Message=TCFMessage::TSubConnParamsRequest")));
+		return ETrue;
+		}
+	return EFalse;
+	}	   	   	
+	
+DEFINE_SMELEMENT ( TStartServerFlow, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )
+void TStartServerFlow::DoL ( )
+	{
+	TCFFactory::TPeerFoundOrCreated& msg = message_cast< TCFFactory::TPeerFoundOrCreated > ( iContext.iMessage );
+	iContext.iNodeActivity->PostRequestTo ( msg.iNodeId, TCFDataClient::TStart ().CRef () );
+	}
+
+		
+DEFINE_SMELEMENT ( TRequestLocalHost, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )
+void TRequestLocalHost::DoL ( )
+	{
+	iContext.iNodeActivity->PostRequestTo( iContext.Node ().ControlProvider()->RecipientId(), TUpnpMessage::TRequestLocalHost ().CRef () );
+	}
+	
+DEFINE_SMELEMENT ( TSendIgnoreResponse, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )	
+void TSendIgnoreResponse::DoL ( )
+	{
+	TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( iContext.iMessage );
+	
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender,
+		TUpnpMessage::TUPnPResponseInfo ( static_cast<CTransaction*> ( requestMsg.iPtr ),
+		HTTPStatus::EInternalServerError, NULL ).CRef () );
+	}
+	
+DEFINE_SMELEMENT ( TDiscardSearchRequestData, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )
+void TDiscardSearchRequestData::DoL ( )
+	{
+	TUpnpMessage::TUPnPSearchRequest& reqMsg = message_cast< TUpnpMessage::TUPnPSearchRequest > ( iContext.iMessage );
+	reqMsg.iSsdpInfo.iSearchTarget.Free ( );
+	}
+
+
+DEFINE_SMELEMENT ( TDestroyDataClients, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )
+void TDestroyDataClients::DoL ( )
+	{
+	//Send Destroy to data clients and remove client information
+	RNodeInterface* dc;
+	TClientIter<TDefaultClientMatchPolicy> iter =  iContext.iNode.GetClientIter<TDefaultClientMatchPolicy> ( TClientType ( TCFClientType::EData ) );
+	TUint dcCount = 0;
+	while ( ( dc = iter++ ) != NULL )
+		{
+		dc->PostMessage ( iContext.NodeId (), TEChild::TDestroy ().CRef () );
+		++dcCount;
+		}
+	
+	for ( TInt i = 0; i < dcCount; i++ )
+		{
+		RNodeInterface* dc =  iContext.iNode.GetFirstClient<TDefaultClientMatchPolicy> ( TClientType ( TCFClientType::EData ) );
+    	iContext.Node ( ).RemoveClient ( dc->RecipientId( ) );
+		}
+	}
+
+
+DEFINE_SMELEMENT ( TStopDataClients, NetStateMachine::MStateTransition, UPnPStateMachine::TContext )
+void TStopDataClients::DoL ( )
+	{
+	TClientIter<TDefaultClientMatchPolicy> iter = iContext.iNode.GetClientIter<TDefaultClientMatchPolicy> ( TClientType ( TCFClientType::EData ) );
+	RNodeInterface* dc;
+	while ( ( dc = iter++ ) != NULL )
+		{
+		if ( dc->Flags( ) != TClientType::ELeaving )
+			{
+			dc->PostMessage ( TNodeCtxId ( iContext.ActivityId (), iContext.NodeId () ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			}
+		}	
+	iContext.iNodeActivity->SetPostedTo ( TNodeId::NullId ( ) );
+	}
+	
+DEFINE_SMELEMENT ( TAwaitingToStopDataClients, NetStateMachine::MState, UPnPStateMachine::TContext )
+TBool TAwaitingToStopDataClients::Accept ( )
+	{
+	if ( iContext.iMessage.IsMessage<TCFDataClient::TStopped>() )
+		{
+		RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender, TEChild::TDestroy ().CRef () );
+		iContext.iNode.RemoveClient ( address_cast<TNodeId> ( iContext.iSender ) );
+		if ( iContext.iNode.CountClients<TDefaultClientMatchPolicy> ( TClientType ( TCFClientType::EData ) ) == 0 )
+			{
+			//Last one - accept
+			return ETrue;
+			}
+		return EFalse;
+		}
+   	return EFalse;
+	}
+
+
+DEFINE_SMELEMENT ( TRequestOrIgnoreTag, NetStateMachine::MStateFork, UPnPStateMachine::TContext )
+TInt TRequestOrIgnoreTag::TransitionTag ( )
+	{
+	TUpnpMessage::TUPnPRequestInfo& requestInfoMsg = message_cast<TUpnpMessage::TUPnPRequestInfo> ( iContext.iMessage );
+	CTransaction* transaction = static_cast<CTransaction*> ( requestInfoMsg.iPtr );
+	
+	CRequest* request = transaction->Request( );
+	RRequest rRequest = request->Handle( );
+	const RStringF& header =  rRequest.Method ( );
+	
+	if ( header == request->StringPool ( ).StringF ( UPnP::ENotify, TUPnPTable::Table() ) )
+		{		
+		CUPnPControlSubConnectionProvider& node = static_cast<CUPnPControlSubConnectionProvider&> ( iContext.Node ( ) );						
+		if ( node.IsClosing ( ) )
+			{
+			return CoreStates::KIgnore;
+			}
+		
+		return KNotifyRequest;
+		}
+	else
+		{
+		CUPnPServiceSubConnectionProvider& node1 = static_cast<CUPnPServiceSubConnectionProvider&> ( iContext.Node ( ) );
+		if ( node1.IsClosing ( ) )
+			{
+			return CoreStates::KIgnore;
+			}
+		else
+			{
+			if ( header == request->StringPool ( ).StringF ( HTTP::EGET, THTTPTable::Table() ) )
+				{
+				return KDescribeRequest;	
+				}
+			else if ( header == request->StringPool ( ).StringF ( UPnP::ESubscribe, TUPnPTable::Table() ) )
+				{
+				return KSubscribeRequest;
+				}
+			else if ( header == request->StringPool ( ).StringF ( UPnP::EUnsubscribe, TUPnPTable::Table() ) )
+				{
+				return KUnsubscribeRequest;
+				}
+			}
+		}
+	return MeshMachine::KNoTag;	
+	}
+	
+TInt CUPnPUtils::ExtractVersionNumber ( const TDesC8& aSearchTarget, TInt& aUriIndex )
+	{	
+	TLex8 parser ( aSearchTarget );
+	
+	TChar ch = ':';
+	// skip 4 KColon's so that u reach version number
+	for ( TInt i = 0; i < 4; i++ )
+		{			
+		while ( !parser.Eos ( ) && parser.Peek ( ) != ch )
+			parser.Inc ( );		
+		parser.Inc ( );
+		}		
+	parser.Mark();
+		
+	while ( !parser.Eos ( ) && parser.Peek ( ) != ch )
+		parser.Inc ( );
+	
+	aUriIndex = parser.MarkedOffset(); 
+	
+	TPtrC8 version = parser.MarkedToken ( );
+	
+	TInt versionNumber = 0;
+	InetProtTextUtils::ConvertDescriptorToInt ( version, versionNumber );
+	return versionNumber;
+	}
+
+void CUPnPUtils::CleanupMBufChain ( TAny* aAny )
+	{
+	RMemChunk* chain = ( RMemChunk* ) aAny;
+	chain->Free( );
+	}	
+
+void CUPnPUtils::FindAndSendIconDataL ( CTransaction* aTransaction, TInt& aStatus, RMemoryAllocator& aAllocator  )
+	{
+	HBufC* uriPath =  aTransaction->Request()->URI()->Uri().GetFileNameL ( EUriFileNamePath);
+	TPtr ptr ( uriPath->Des () );
+	TInt fileNameStart = ptr.LocateReverse ( TChar ('\\') ) + 1;
+	TInt fileNameLength = ptr.Length () - fileNameStart;
+	TPtrC filePtr = ptr.Mid ( fileNameStart, fileNameLength );
+	
+	RFs fs;
+	User::LeaveIfError ( fs.Connect () );
+    CleanupClosePushL ( fs );
+    
+	_LIT ( KIconResFileNamePath, "\\resource\\upnp\\icons\\" );
+	TFindFile fileFinder ( fs );
+	
+	CDir* dir= NULL;	
+	TInt ret = fileFinder.FindWildByDir ( filePtr, KIconResFileNamePath, dir );
+	if ( ret == KErrNone )
+		{
+		CleanupStack::PushL ( dir );
+				
+		RFile fileHandle;
+		fileHandle.Open ( fs, fileFinder.File (), EFileShareReadersOnly );
+		CleanupClosePushL ( fileHandle );
+		TInt fileSize = 0;
+		fileHandle.Size ( fileSize );
+
+		HBufC8* buf = HBufC8::NewLC ( fileSize );
+		TPtr8 fileData = buf->Des ();
+		
+		User::LeaveIfError ( fileHandle.Read ( fileData, fileSize ) );
+		
+		RMemChunk dataChian;
+		dataChian.CreateL ( fileData, aAllocator );
+		aTransaction->AddBodyPart ( dataChian );
+		aStatus = HTTPStatus::EOk;
+		
+		CleanupStack::PopAndDestroy ( 3 ); // buf, fileHandle , dir
+		}
+	else
+		{
+		aStatus = HTTPStatus::ENotFound;
+		}
+	
+	CleanupStack::PopAndDestroy ( &fs );
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnptiermanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,59 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "upnptiermanager.h"
+#include "upnptiermanageractivities.h"
+#include "upnptiermanagerselector.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPTmTag KESockTierTag
+#endif
+
+using namespace ESock;
+using namespace Messages;
+using namespace MeshMachine;
+
+CUPnPTierManager* CUPnPTierManager::NewL(ESock::CTierManagerFactoryBase& aFactory)
+	{
+	return new (ELeave) CUPnPTierManager(aFactory, UPnPTierManagerActivities::activityMap::Self());
+	}
+	
+CUPnPTierManager::~CUPnPTierManager()
+	{
+	LOG_NODE_DESTROY(KUPnPTmTag, CUPnPTierManager);	
+	}
+
+
+CUPnPTierManager::CUPnPTierManager(CTierManagerFactoryBase& aFactory, const TNodeActivityMap& aActivityMap)
+	: CCoreTierManager(aFactory, aActivityMap)
+	{
+	LOG_NODE_CREATE(KUPnPTmTag, CUPnPTierManager);    
+	}
+
+
+MProviderSelector* CUPnPTierManager::DoCreateProviderSelectorL(const Meta::SMetaData& aSelectionPreferences)
+	{
+	return TUPnPProviderSelectorFactory::NewSelectorL(aSelectionPreferences);		
+	}
+
+void CUPnPTierManager::ReceivedL(const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage)
+	{
+   	TNodeContext<CUPnPTierManager> ctx (*this, aMessage, aSender, aRecipient);
+   	CCoreTierManager::Received(ctx);
+    User::LeaveIfError(ctx.iReturn);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnptiermanageractivities.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "upnptiermanageractivities.h"
+
+namespace UPnPTierManagerActivities
+{
+	DEFINE_ACTIVITY_MAP(activityMap)
+	ACTIVITY_MAP_END_BASE(TMActivities, coreTMActivities)
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnptiermanagerfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,48 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "upnptiermanagerfactory.h"
+#include "upnptiermanager.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPTmFactoryTag KESockTierTag
+#endif
+
+using namespace ESock;
+
+CUPnPTierManagerFactory* CUPnPTierManagerFactory::NewL(TAny* aParentContainer)
+	{
+	return new (ELeave) CUPnPTierManagerFactory(
+		TUid::Uid(CUPnPTierManagerFactory::iUid), 
+		*reinterpret_cast<CTierManagerFactoryContainer*>(aParentContainer));
+	}
+
+
+CUPnPTierManagerFactory::CUPnPTierManagerFactory(
+	TUid aFactoryId, 
+	CTierManagerFactoryContainer& aParentContainer)
+	: CTierManagerFactoryBase(aFactoryId, aParentContainer)
+	{
+//	LOG_NODE_CREATE(KUPnPTmFactoryTag, CUPnPTierManagerFactory);
+	}
+
+ACommsFactoryNodeId* CUPnPTierManagerFactory::DoCreateObjectL(TFactoryQueryBase& /* aQuery */)
+	{
+	return CUPnPTierManager::NewL(*this);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ControlPoint/src/upnptiermanagerselector.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,102 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <metadatabase.h>
+#include <commsdattypesv1_1.h>
+#include <comms-infras/ss_tiermanagerutils.h>
+#include <es_connpref.h>
+
+
+#include "upnptiermanagerselector.h"
+#include "upnptiermanagerfactory.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPTmTag KESockTierTag
+#endif
+
+using namespace ESock;
+using namespace Meta;
+using namespace CommsDat;
+	
+CUPnPProviderSelector::CUPnPProviderSelector(const SMetaData& aSelectionPreferences)
+	: ASimpleSelectorBase(aSelectionPreferences)
+	{
+	}
+	
+void CUPnPProviderSelector::SelectL(ESock::ISelectionNotify& aSelectionNotify)
+	{
+	ASSERT(iDbs);
+	ASSERT(iTierRecord);
+	
+	TUint32 defaultAccessPoint = iTierRecord->iDefaultAccessPoint;
+
+	// This selector deals only with the AccessPoint aware system!
+	ASSERT(0 != defaultAccessPoint);
+
+	if (iSelectionPrefs.IsEmpty())
+		{
+		aSelectionNotify.SelectComplete(this, FindOrCreateProviderL(defaultAccessPoint));
+		aSelectionNotify.SelectComplete(this, NULL);
+		
+		return;
+		}		
+		
+	const TConnPref& prefs = iSelectionPrefs.Prefs();
+	switch (prefs.ExtensionId())
+		{
+		case TConnPref::EConnPrefSnap:
+			{
+			TUint accessPoint = static_cast<const TConnSnapPref&>(prefs).Snap();
+			aSelectionNotify.SelectComplete(this, FindOrCreateProviderL(accessPoint));
+			aSelectionNotify.SelectComplete(this, NULL);		
+			}			
+			break;
+		
+		/* Note! As of now UPnP Tier is not having multiple access points to open
+		case TConnPref::EConnPrefIdList:
+			{
+			const TConnIdList& list = static_cast<const TConnIdList&>(prefs);
+			TInt count = list.Count();
+			for (TInt i = 0; i < count; i++)
+				{
+				aSelectionNotify.SelectComplete(this,FindOrCreateProviderL(list.Get(i)));
+				}
+			aSelectionNotify.SelectComplete(this,NULL);
+			}
+			break;
+		*/
+		default:
+			User::Leave(KErrArgument);
+		}	
+	}
+
+MProviderSelector* TUPnPProviderSelectorFactory::NewSelectorL(const SMetaData& aSelectionPreferences)
+	{
+	ASSERT(aSelectionPreferences.IsTypeOf(TSelectionPrefs::TypeId()));
+	CMDBSession* dbs = CMDBSession::NewLC(KCDVersion1_2);
+	ASimpleSelectorBase* selector = new (ELeave) CUPnPProviderSelector(aSelectionPreferences);
+	CleanupStack::PushL(selector);
+	ASSERT(NULL == selector->iTierRecord);
+	selector->iTierRecord = TierManagerUtils::LoadTierRecordL(TUid::Uid(CUPnPTierManagerFactory::iUid), *dbs);
+	CleanupStack::Pop(selector);
+	CleanupStack::Pop(dbs);
+	ASSERT(NULL == selector->iDbs);
+	selector->iDbs = dbs;
+	
+	return selector;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/chttpclienthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,355 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __CHTTPCLIENTHANDLER_H_
+#define __CHTTPCLIENTHANDLER_H_
+
+
+// System Includes
+#include <comms-infras/ss_nodemessages.h>
+#include <rmemchunk.h>
+
+// Local Includes
+#include "cprotocolhandler.h"
+#include "csocketopener.h"
+#include "cupnprequestcomposer.h"
+#include "cupnpresponseparser.h"
+
+using namespace Messages;
+
+
+//
+class CHTTPClientTransaction: public CTransaction
+	{
+public:
+	static CHTTPClientTransaction* NewL ( CHeaderCodec& aCodec, RStringPool& aStringPool, TNodeCtxId aNodeCtxId );
+	~CHTTPClientTransaction ( );
+
+	inline TNodeCtxId NodeCtxId ( ) const;
+	inline TUint ActivityId ( ) const;
+
+
+	inline void GetBodyPart ( TPtrC8& aData )
+		{
+		RMBuf* mBuf = iBodyParts.First ( );
+		TUint i = 0;
+		while ( i != iRequestPartIdx )
+			{
+			mBuf = mBuf->Next ( );
+			++i;
+			}
+		aData.Set ( mBuf->Ptr( ), mBuf->Length() );
+		}
+
+	inline void RemoveBodyPart ( )
+		{
+		iRequestPartIdx++;
+		}
+
+	inline TBool IsLastBodyPart ( ) const
+		{
+		return ( iBodyParts.NumBufs ( ) == iRequestPartIdx + 1 ) && Complete ();
+		}
+
+	inline void ResetRequestPart ( )
+		{
+		iRequestPartIdx = 0;
+		}
+
+	inline TInt RequestPartIdx ()
+		{
+		return iRequestPartIdx;
+		}
+		
+	inline void SetComposingStarted ( TBool aValue )
+		{
+		iComposingStarted = aValue;
+		}
+		
+	inline TBool ComposingStarted ()
+		{
+		return iComposingStarted;
+		}
+			
+private:
+	CHTTPClientTransaction ( TNodeCtxId aNodeCtxId );
+
+private:
+	TNodeCtxId	iNodeCtxId;
+	TUint		iRequestPartIdx;
+	TBool		iComposingStarted;	
+	};
+
+TNodeCtxId CHTTPClientTransaction::NodeCtxId ( ) const
+	{
+	return iNodeCtxId; // this itself will carry activityId as well
+	}
+
+TUint CHTTPClientTransaction::ActivityId ( ) const
+	{
+	return iNodeCtxId.NodeCtx ( );
+	}
+
+
+//
+class CTransactionWrapper: public CBase
+	{
+public:
+	CTransactionWrapper ( RArray<CTransaction*>& aTransactionArray )
+		: iTransactions ( aTransactionArray )
+		{
+		}
+	TInt Count ( ) const
+		{
+		return iTransactions.Count ( );
+		}
+	void AppendL ( CTransaction* aTransaction )
+		{
+		iTransactions.AppendL ( aTransaction );
+		}
+	CHTTPClientTransaction* Get ( TInt anIndex )
+		{
+		__ASSERT_DEBUG ( (anIndex >= 0 && anIndex < iTransactions.Count()), User::Invariant() );
+		return static_cast<CHTTPClientTransaction*> ( iTransactions[anIndex] );
+		}
+	void Remove ( TInt anIndex)
+		{
+		__ASSERT_DEBUG ( (anIndex >= 0 && anIndex < iTransactions.Count()), User::Invariant() );
+		iTransactions.Remove ( anIndex );
+		}
+private:
+	RArray<CTransaction*>& iTransactions;
+	};
+
+
+
+//
+class CHTTPClientHandler : public CProtocolHandler
+	{
+public:
+	static CHTTPClientHandler* NewL ( MHttpEventObserver& aObserver, CChunkManager* aChunkMgr, TSockAddr* aAddr = NULL );
+	~CHTTPClientHandler ( );
+
+	CTransactionWrapper* GetTransactionWrapperL ( );
+	void SetConnectionInfo ( TSockAddr& aAddr );
+	void SubmitTransaction ( CTransaction* aTransaction );
+	void CancelTransaction ( CTransaction* aTrans );
+	// More Data is available for flow Transaction
+	void NotifyNewRequestBodyData ( CTransaction* aTrans, RMBufChain& aData );
+	
+private:
+	CHTTPClientHandler ( MHttpEventObserver& aObserver, CChunkManager* aChunkMgr, TSockAddr* aAddr );
+	void ConstructL ( );
+
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ( );
+	void SendComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& aData );
+	void Error ( TOperation aOperation, TInt aError  );
+
+	// From MComposerObserver
+	void MessageDataReadyL ( RBuf8& aData );
+	void ComposingConcluded ( );
+	void ComposerError ( TInt aError );
+
+	// From MParserObserver
+	void GotHeaders ( );
+	void GotBodyData ( );
+	void DataParsed ( );
+	void ParsingComplete ( RMemChunk& aExcessData );
+	void ParserError ( TInt aError );
+
+	// From MHTTPDataSupplier
+	TBool GetNextDataPart ( TPtrC8& aDataPart );
+	void ReleaseData ( );
+	TInt OverallDataSize ( );
+	// From MUPnPTimerObserver	
+	virtual void TimeOut ();
+	
+	TInt OpenLink ( );
+	void ReOpenLink ();
+	void OpenSocketL ( TUint aAddrFamily, TUint aSockType, TUint aProtocol );
+	void MakeConnection ( );
+	void CloseLink ( );
+
+	void StartComposer ( CTransaction* aTransaction );
+	void ProcessPendingTransactions ( TInt aNextTransIdx = 0 );
+	void NotifyPendingTransactions ( TInt aError );
+	void StartParser ( CTransaction* aTransaction, RMemChunk& aData );
+	void RemoveTransaction ( TInt aPos );
+		
+	TBool CheckForConnectionPersistence ( );
+	TBool CheckFor100ContinueHeader ( CRequest& aRequest );
+
+	CTransaction* CurrentTransaction ( ) const;
+ 	void ResetTransactions ();
+	// utility API's
+	inline void SetSocketIdle ( );
+	inline void ResetSocketIdle ( );
+	inline TBool SocketIdle ( );
+	inline TBool HasPendingTransactions ( );
+	inline TBool CanPipeLine ( );
+	inline void EnablePipeLining ( );
+	inline void DisablePipeLining ( );
+	inline void SetComposerIdle ( );
+	inline void ResetComposerIdle ( );
+	inline TBool ComposerIdle ( );
+	inline void SetWriteTriggered ( );
+	inline void ResetWriteTriggered ( );
+	inline TBool WriteTriggered ( );
+	inline void SetReadTriggered ( );
+	inline void ResetReadTriggered ( );
+	inline TBool ReadTriggered ( );
+	inline void SetParserIdle ( );
+	inline void ResetParserIdle ( );
+	inline TBool ParserIdle ( );
+	inline void SetReq100Continue ( TBool aValue );
+	inline TBool Request100Continue ();
+	
+private:
+	enum TFlags
+		{
+		ESocketIdle		=0x01,
+		ECanPipeLine	=0x02,
+		EComposerIdle	=0x04,
+		EWriteTriggered =0x08,
+		EReadTriggered  =0x10,
+		EParserIdle		=0x20,
+		};
+
+	MHttpEventObserver&		iObserver;
+	CSocketOpener*			iSocketOpener;
+	TSockAddr 				iRemoteAddr;
+	CUpnpRequestComposer* 	iComposer;
+	CUpnpResponseParser*	iParser;
+	RMemChunk				iExcessData;
+	RMemoryAllocator		iAllocator;
+	TUint32 				iFlags; 	// Bydefault pipelining is DISABLED & socket is idle	
+	TBool					iFirstTrans;
+	TBool					iReq100Continue;
+	};
+
+void CHTTPClientHandler::SetSocketIdle ( )
+	{
+	iFlags |= ESocketIdle;
+	}
+
+void CHTTPClientHandler::ResetSocketIdle ( )
+	{
+	iFlags &= ~ESocketIdle;
+	}
+
+TBool CHTTPClientHandler::SocketIdle ( )
+	{
+	return iFlags & ESocketIdle;
+	}
+
+TBool CHTTPClientHandler::HasPendingTransactions ( )
+	{
+	return iTransactions.Count ( ) > 0 ? ETrue: EFalse;
+	}
+
+TBool CHTTPClientHandler::CanPipeLine ( )
+	{
+	return iFlags & ECanPipeLine;
+	}
+
+void CHTTPClientHandler::EnablePipeLining ( )
+	{
+	iFlags |= ECanPipeLine;
+	}
+
+void CHTTPClientHandler::DisablePipeLining ( )
+	{
+	iFlags &= ~ECanPipeLine;
+	}
+
+void CHTTPClientHandler::SetComposerIdle ( )
+	{
+	iFlags |= EComposerIdle;
+	}
+
+void CHTTPClientHandler::ResetComposerIdle ( )
+	{
+	iFlags &= ~EComposerIdle;
+	}
+
+TBool CHTTPClientHandler::ComposerIdle ( )
+	{
+	return iFlags & EComposerIdle;
+	}
+
+void CHTTPClientHandler::SetWriteTriggered ( )
+	{
+	iFlags |= EWriteTriggered;
+	}
+
+void CHTTPClientHandler::ResetWriteTriggered ( )
+	{
+	iFlags &= ~EWriteTriggered;
+	}
+
+TBool CHTTPClientHandler::WriteTriggered ( )
+	{
+	return iFlags & EWriteTriggered;
+	}
+
+void CHTTPClientHandler::SetReadTriggered ( )
+	{
+	iFlags |= EReadTriggered;
+	}
+
+void CHTTPClientHandler::ResetReadTriggered ( )
+	{
+	iFlags &= ~EReadTriggered;
+	}
+
+TBool CHTTPClientHandler::ReadTriggered ( )
+	{
+	return iFlags & EReadTriggered;
+	}
+	
+void CHTTPClientHandler::SetParserIdle ( )
+	{
+	iFlags |= EParserIdle;
+	}
+	
+void CHTTPClientHandler::ResetParserIdle ( )
+	{
+	iFlags &= ~EParserIdle;
+	}
+
+TBool CHTTPClientHandler::ParserIdle ( )
+	{
+	return iFlags & EParserIdle;
+	}
+
+void CHTTPClientHandler::SetReq100Continue ( TBool aValue )
+	{
+	iReq100Continue = aValue;
+	}
+	
+TBool CHTTPClientHandler::Request100Continue ()
+	{
+	return iReq100Continue;
+	}
+
+
+#endif // CHTTPCLIENTHANDLER_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/cprotocolhandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,92 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __CPROTOCOLHANDLER_H_
+#define __CPROTOCOLHANDLER_H_
+
+
+// System Includes
+#include "httpevent.h"
+
+// Local Includes
+#include "ctransaction.h"
+#include "rsockethandler.h"
+#include "mcomposerobserver.h"
+#include "mparserobserver.h"
+#include "cupnptimer.h"
+
+class MHttpEventObserver
+	{
+public:
+	virtual TInt OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent ) = 0;
+	};
+ 	
+ 	
+class CProtocolHandler : public CBase,						 
+						 public MSocketHandlerObserver,
+						 public MComposerObserver,
+						 public MParserObserver,
+						 public MHTTPDataSupplier,										
+						 public MUPnPTimerObserver
+	{
+public:
+	virtual ~CProtocolHandler ( );
+	
+protected:
+	CProtocolHandler ( RInternalSocket& aSocket );
+	CProtocolHandler ( );	
+	void ConstructL ();
+	
+	TInt FindTransaction ( CTransaction* aTransaction ) const;
+	TInt FindTransaction ( const CRequest* aRequest ) const;
+	
+	// From MSocketHandlerObserver
+	inline void AcceptComplete ( RInternalSocket& /*aSocket*/ );
+	inline void SendToComplete ( TInt /*aLength*/ );
+	inline void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ );
+	
+	// From MHTTPDataSupplier
+	inline TInt Reset ();
+	
+protected:
+	RSocketHandler 			iSocketHandler;
+	RInternalSocket 		iSocket;	
+	RArray<CTransaction*>	iTransactions;	
+	CUPnPTimer*				iTimer;
+	};
+
+
+void CProtocolHandler::AcceptComplete ( RInternalSocket& /*aSocket*/ )
+	{
+	}
+
+void CProtocolHandler::SendToComplete ( TInt /*aLength*/ )
+	{
+	}
+
+void CProtocolHandler::RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{
+	}
+
+TInt CProtocolHandler::Reset ()
+	{
+	return KErrNone;
+	}
+
+
+#endif // CPROTOCOLHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/csoapparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,59 @@
+// 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 __CSOAPPARSER_H_
+#define __CSOAPPARSER_H_
+#include <xml/contenthandler.h>
+#include <xml/parser.h>
+#include <f32file.h>
+
+using namespace Xml;
+
+
+class CSoapParser: public CBase, public Xml::MContentHandler
+    {
+public:
+	static CSoapParser* NewL ();
+
+    ~CSoapParser();
+    
+	const TDesC8& SoapAction () const;	
+    TBool ParseSoapL(const TDesC8& aBuffer);
+private:
+	CSoapParser();
+	void ConstructL ();
+	
+    // From MContentHandler
+    inline void OnStartDocumentL(const Xml::RDocumentParameters& aDocParam, TInt aErrorCode);
+    inline void OnEndDocumentL(TInt aErrorCode);
+    void OnStartElementL(const Xml::RTagInfo& aElement, const Xml::RAttributeArray& aAttributes, TInt aErrorCode);
+    inline void OnEndElementL(const Xml::RTagInfo& aElement, TInt aErrorCode);
+    inline void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
+    inline void OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, TInt aErrorCode);
+    inline void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
+    inline void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
+    inline void OnSkippedEntityL(const RString& aName, TInt aErrorCode) ;
+    inline void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, TInt aErrorCode);
+    inline void OnError(TInt aErrorCode);
+    inline TAny* GetExtendedInterface(const TInt32 aUid);
+   
+private:
+	RBuf8 		iSoapAction;
+	CParser* 	iParser;
+	TBool 		iInBodySec;
+	TInt 		iError;
+    };
+#include "csoapparser.inl"
+#endif /*CSOAPPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/csoapparser.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,69 @@
+// 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:
+//
+
+
+void CSoapParser::OnStartDocumentL(const Xml::RDocumentParameters& /*aDocParam*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CSoapParser::OnEndDocumentL(TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);	
+	}
+
+void CSoapParser::OnStartPrefixMappingL(const RString& /*aPrefix*/, const RString& /*aUri*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CSoapParser::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CSoapParser::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CSoapParser::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
+	{	
+	User::LeaveIfError(aErrorCode);	
+	}
+
+void CSoapParser::OnProcessingInstructionL(const TDesC8& /*aTarget*/, const TDesC8& /*aData*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);		
+	}
+
+void CSoapParser::OnError(TInt aErrorCode)	
+	{
+	iError = aErrorCode;
+	}
+
+TAny* CSoapParser::GetExtendedInterface(const TInt32 /*aUid*/)
+	{
+	return NULL;
+	}
+void CSoapParser::OnEndElementL(const RTagInfo& /*aElement*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CSoapParser::OnContentL(const TDesC8& /*aBytes*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/ctransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,170 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __CTRANSACTION_H_
+#define __CTRANSACTION_H_
+
+// System Includes
+#include <http/framework/cheadercodec.h>
+#include <rmemchunk.h>
+
+// Local Includes
+#include "CRequest.h"
+#include "CResponse.h"
+
+ 	
+class CTransaction : public CBase
+	{
+public:
+	static CTransaction* NewL ( CHeaderCodec& aCodec, RStringPool& aStringPool );	
+	virtual ~CTransaction ( );
+	
+	CRequest* Request ( ) const;
+	CResponse* Response ( ) const;	
+	
+	inline void AddBodyPart ( RMBufChain& aData )
+		{
+		if ( !aData.IsEmpty () )
+			iBodyParts.Append ( aData );
+		}
+	
+	inline void AddBodyPart ( RMemChunk& aMemChunk )
+		{
+		if ( !aMemChunk.IsEmpty () )
+			iMemParts.Append ( aMemChunk );
+		}
+	
+	inline void FreeMemChunk ( )
+		{
+		if ( !iMemParts.IsEmpty () )
+			iMemParts.Free();
+		}
+
+	inline void RemoveAllBodyParts ( ) 
+		{
+		if ( iBodyParts.IsEmpty ( ) )
+			{
+			return;
+			}
+			
+		while ( iBodyParts.NumBufs ( ) > 0 )
+			{
+			iBodyParts.Remove ( );
+			if ( iBodyParts.IsEmpty ( ) )
+				{
+				break;
+				}
+			}		
+		}
+		
+	inline RMBufChain& BodyParts ( )
+		{
+		return iBodyParts;
+		}
+
+	inline RMemChunk& MemParts ( )
+		{
+		return iMemParts;
+		}
+
+	inline void RemoveBodyPart ()
+		{
+		RMBuf* mBuf = iBodyParts.Remove ();	 // Remove the first body part
+		__ASSERT_DEBUG ( mBuf, User::Invariant() );
+		if ( iDataLeft != KErrUnknown )
+			iDataLeft -= mBuf->Length ();
+		}
+	
+	inline void GetBodyPart ( TPtrC8& aData )
+		{
+		RMBuf* buf = iBodyParts.First ();
+		aData.Set ( buf->Ptr (), buf->Length () );		
+		}
+	
+	inline TBool IsLastBodyPart () const
+		{
+		if ( iDataLeft != KErrUnknown )
+			{
+			return ( ( iDataLeft - iBodyParts.First()->Length() ) == 0)	? ETrue : EFalse;			
+			}
+		return Complete();
+		}
+	
+	inline void SetDataLeft ( TInt aDataLeft )
+		{
+		iDataLeft = aDataLeft;			
+		}
+
+	inline void SetComplete ()
+		{
+		iComplete = ETrue;		
+		}
+	
+	inline TBool Complete() const
+		{
+		return iComplete;	
+		}
+	
+	inline TInt DataLeft () const
+		{
+		return iDataLeft;	
+		}
+		
+	inline void Reset ()
+		{
+		iDataLeft = KErrUnknown;
+		iRequest->Reset ();
+		iResponse->Reset ();
+		if ( !iBodyParts.IsEmpty () )
+			iBodyParts.Free ();
+		iComplete = EFalse;
+		}
+	
+	inline TBool CloseNeeded () const
+		{
+		if ( iDataLeft != KErrUnknown )
+			{
+			if ( iBodyParts.IsEmpty () )
+				{
+				return iDataLeft != 0 ? ETrue : EFalse;
+				}
+			else
+				{
+				return ( ( iDataLeft - iBodyParts.Length() ) != 0 ) ? ETrue : EFalse;
+				}
+			}
+				
+		return !Complete ();	
+		}
+	
+protected:
+	CTransaction ( );
+	void ConstructL ( CHeaderCodec& aCodec, RStringPool& aStringPool );
+	
+protected:
+	TInt		iDataLeft;
+	CRequest* 	iRequest;
+	CResponse*	iResponse;
+	RMBufChain	iBodyParts;
+	RMemChunk	iMemParts;
+	TBool		iComplete : 1;	
+	};
+
+
+#endif // CTRANSACTION_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/cupnptimer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+// 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:
+// @internalTechnology
+// 
+//
+
+#ifndef __CUPNPTIMER_H_
+#define __CUPNPTIMER_H_
+
+#include <e32base.h>
+
+NONSHARABLE_CLASS ( MUPnPTimerObserver )
+	{
+	public:
+		virtual void TimeOut () =0;
+	};
+
+
+NONSHARABLE_CLASS ( CUPnPTimer ) : public CActive
+{
+public:
+	// Construct/destruct
+	static CUPnPTimer* NewL(MUPnPTimerObserver& aObserver);
+	~CUPnPTimer(); 
+	
+	void StartTimer(TTimeIntervalMicroSeconds32 aTimeInterval);  
+	void StopTimer();    
+    
+private:
+	// Construct/destruct
+	CUPnPTimer(MUPnPTimerObserver& aObserver);
+	
+	// From CActive
+	void RunL();
+	void DoCancel();   
+	
+private:
+	RTimer iTimer;      // Has
+	MUPnPTimerObserver& iObserver;
+};
+
+
+#endif /*__CUPNPTIMER_H_*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/genericcontainer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __GENERIC_CONTAINER_H_
+#define __GENERIC_CONTAINER_H_
+
+#include <comms-infras/ss_protflow.h> 
+#include <comms-infras/ss_nodemessages.h> 
+
+const TInt KAppProtIntfFactoryUid = 0x2000D05B; // Put in common place
+
+class CFactory;
+class CAppProtIntfFactoryContainer : public CBase, public Messages::ASimpleNodeIdBase
+	{
+public:
+	static CAppProtIntfFactoryContainer* NewL ( );
+	
+private:
+	virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	CAppProtIntfFactoryContainer (  );
+	void ConstructL();
+private:
+	CFactory *iAppProtIntfFactory;
+	};
+
+
+class CFactoryObject;
+class CFactory : public CBase
+	{
+	friend class CAppProtIntfFactoryContainer;
+public:
+	CFactoryObject* FindFactoryObject ( Factories::MFactoryQuery& aFactoryQuery );
+	CFactoryObject* FindOrCreateFactoryObjectL ( Factories::MFactoryQuery& aFactoryQuery );
+	CFactoryObject* CreateFactoryObjectL ( Factories::MFactoryQuery& aFactoryQuery );
+
+protected:
+	CFactory ();
+	~CFactory ();
+	virtual CFactoryObject* DoCreateFactoryObjectL ( Factories::MFactoryQuery& aFactoryQuery ) =0;
+private:
+	RPointerArray<CFactoryObject> iObjectsList;
+
+public:
+	TUid iDestroyUid;
+	};
+	
+class CFactoryObject : public CBase, public Messages::ASimpleNodeIdBase
+	{
+public:
+	TInt ProtocolType();
+	virtual ~CFactoryObject();
+protected:
+	CFactoryObject(TInt aProtocolType);
+private:
+	TInt iProtocolFlag;
+	};
+
+
+#endif //__GENERIC_CONTAINER_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpclientflow.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,161 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __HTTPCLIENTFLOW_H_
+#define __HTTPCLIENTFLOW_H_
+
+// System Includes
+#include <comms-infras/ss_subconnflow.h>
+#include <comms-infras/ss_flowbinders.h>
+#include <comms-infras/ss_protflow.h>
+
+#include <http/framework/cheadercodec.h>
+#include <http/mhttpdatasupplier.h>
+
+// Local Includes
+#include "upnpflowbase.h"
+#include "upnp_cf_msgs.h"
+#include "chttpclienthandler.h"
+#include "csoapparser.h"
+
+using namespace Messages;
+using namespace ESock;
+
+
+const TUint KMaxPipelineTransactions = 6;
+
+
+class CHttpClientFlow: public CUPnPFlowBase, public MFlowBinderControl,
+				public MSessionData, public MSessionControl, // Session Binders with Upper layer
+				public MHttpEventObserver	// Incoming HTTP Response Events Observer
+	{
+public:
+	static CHttpClientFlow* NewL ( CSubConnectionFlowFactoryBase& aFactory,
+						  CProtocolIntfBase* aProtocolIntf,
+						  const TNodeId& aSubConnId,
+						  const TAppProtAddr& aSockAddr );
+	~CHttpClientFlow ( );
+
+	// From CSubConnectionFlowBase
+	virtual MFlowBinderControl* DoGetBinderControlL ( );
+
+	inline void RemName ( TSockAddr& anAddr ) const;
+	inline TInt Status ( ) const;
+
+private:
+	CHttpClientFlow ( CSubConnectionFlowFactoryBase& aFactory, CProtocolIntfBase* aProtocolIntf, const Messages::TNodeId& aSubConnId, const TAppProtAddr& aSockAddr );
+	void ConstructL ( );
+
+
+	virtual void ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage );
+	
+	// From MFlowBinderControl
+	MSessionControl* GetControlL ( TInt aSessionType, MSessionControlNotify& aSessionControlNotify );
+	MSessionData* BindL ( MSessionDataNotify& aNotify );
+	void Unbind ( );
+	CSubConnectionFlowBase* Flow ( ); // returns its own flow
+
+	// MSessionControl
+	void ActiveOpen ( );
+	inline void ActiveOpen ( const TDesC8& aConnectionData );
+	inline TInt PassiveOpen ( TUint aQueueSize );
+	inline TInt PassiveOpen ( TUint aQueueSize,const TDesC8& aConnectionData );
+	inline void AutoBind ( );
+	inline void LocalName ( TSockAddr& anAddr ) const;
+	inline TInt SetLocalName ( TSockAddr& anAddr );
+	TInt SetRemName ( TSockAddr& anAddr );
+	void Shutdown ( MSessionControl::TCloseType option );
+	inline void Shutdown ( MSessionControl::TCloseType option, const TDesC8& aDisconnectionData );
+	inline TInt SecurityCheck ( MProvdSecurityChecker* aSecurityChecker );
+	TInt GetOption ( TUint level, TUint name, TDes8 &anOption ) const;
+	TInt SetOption ( TUint level, TUint name, const TDesC8 &anOption );
+	inline void Ioctl ( TUint level, TUint name, TDes8 *anOption );
+	inline void CancelIoctl ( TUint aLevel, TUint aName );
+	inline void Start ( );
+
+	// MSessionData
+	inline TUint Write ( const TDesC8& aDesc, TUint aOptions, TSockAddr* anAddr = NULL );
+	TInt Write ( RMBufChain& aData, TUint aOptions, TSockAddr* anAddr = NULL );
+	inline void GetData ( TDes8& aDesc, TUint options, TSockAddr* anAddr = NULL );
+	TInt GetData ( RMBufChain& aData, TUint aLength, TUint aOptions, TSockAddr* anAddr = NULL );
+
+	// From MHttpEventObserver
+	TInt OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent );
+
+
+	void PrepareAndSubmitTransactionL ( RMBufChain& aData );
+	void PrepareAndSubmitTransactionL ( TUpnpMessage::TUPnPClientRequestInfo& aClntReqInfo, TNodeCtxId aChannelId );
+	void ReSubmitTransactionL ( CTransaction* aTransaction );
+	void CancelRequest ( TNodeCtxId aChannelId );
+	TInt FindTransaction ( TNodeCtxId aChannelId );
+
+	void ProcessControlPlaneResponseEvent ( CHTTPClientTransaction* aTransaction, THTTPEvent& aEvent );
+	void NotifyError ( CHTTPClientTransaction* aTransaction, TInt aError );
+	void DoReset ( );
+	void SetTransactionComplete ( CTransaction* aTransaction );
+	
+	void SetRequestUriL ( CTransaction* aTrans, const TDesC8& aUri );
+	void SetHostHeaderL ( CTransaction* aTrans, const TDesC8& aHost, TInt aPort );
+
+	void BuildNotifyRequestL ( CRequest& aNewRequest, TUpnpMessage::TUPnPClientRequestInfo& aClntReqInfo );
+	void BuildSubscribeRequestL ( CRequest& aNewRequest, TUpnpMessage::TUPnPClientRequestInfo& aClntReqInfo );
+	void SetSidHeaderL ( CRequest& aNewRequest, TUpnpMessage::TUPnPClientRequestInfo& aClntReqInfo );
+	void SetNtHeaderL ( RHTTPHeaders aHeaders );
+
+	void SetContentTypeHeaderL ( RHTTPHeaders aHeaders );
+	TBool SetActionHeaderL ( RMBufChain& aData );
+	void ConstructSoapActionHeaderValueL ( RMBufChain& aData );
+	void FillResponseChain ( CTransaction* aTransaction, TInt& aNewLen );
+
+
+private:
+	// upper flow
+	MSessionControlNotify* 	iSessionControlNotify;
+	MSessionDataNotify* 	iSessionDataNotify;
+	TBool					iDCIdle;
+	
+	CHTTPClientHandler* 	iClientHandler;
+	CTransactionWrapper*	iTransactions;
+
+	RStringPool		iStringPool;
+	CHeaderCodec*	iCodec;
+	RMBufChain		iBufChain;
+
+	// only for control channel usage
+	CSoapParser* 	iActionParser;
+	TInetAddr		iRemoteAddress;
+	RBuf8			iRequestUri;
+	RBuf8			iActionValue;
+	TInt 			iError;
+	TInt			iOverallDataSize;
+	TInt 			iChannelIdentifier;
+	TBool			iResponseCompleted;
+	TBool			iReadStreamStarted;	
+	};
+
+
+inline TInt CHttpClientFlow::Status ( ) const
+	{
+	if ( iSessionControlNotify != NULL || iSessionDataNotify != NULL || iTransactions->Count ( ) == KMaxPipelineTransactions )
+	// flow is attached to upper flow ( i.e.CSocket ) or pipeline transactions reached max
+		return KErrNotReady;
+
+	return KErrNone;
+	}
+#include "httpclientflow.inl"
+#endif // HTTPCLIENTFLOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpclientflow.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,78 @@
+// 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:
+//
+
+void CHttpClientFlow::ActiveOpen ( const TDesC8& /*aConnectionData*/ )
+	{
+	}
+
+TInt CHttpClientFlow::PassiveOpen ( TUint /*aQueueSize*/ )
+	{
+	return KErrNone;
+	}
+
+TInt CHttpClientFlow::PassiveOpen ( TUint /*aQueueSize*/, const TDesC8& /*aConnectionData*/ )
+	{
+	return KErrNone;
+	}
+
+void CHttpClientFlow::AutoBind ( )
+	{
+	}
+
+void CHttpClientFlow::LocalName ( TSockAddr& /*anAddr*/ ) const
+	{
+	}
+
+TInt CHttpClientFlow::SetLocalName ( TSockAddr& /*anAddr*/ )
+	{
+	return KErrNone;
+	}
+
+void CHttpClientFlow::RemName ( TSockAddr& /*anAddr*/ ) const
+	{
+	}
+
+TInt CHttpClientFlow::SecurityCheck ( MProvdSecurityChecker* /*aSecurityChecker */ )
+	{
+	return KErrNone;
+	}
+
+void CHttpClientFlow::Ioctl ( TUint /*aLevel*/, TUint /*aName*/, TDes8* /*anOption*/ )
+	{
+	}
+
+void CHttpClientFlow::CancelIoctl ( TUint /*aLevel*/, TUint /*aName*/ )
+	{
+	}
+
+void CHttpClientFlow::Start ( )
+	{
+	// Ideally, start should Stack like TCP...
+	}
+
+void CHttpClientFlow::Shutdown ( MSessionControl::TCloseType /*option*/, const TDesC8& /*aDisconnectionData*/ )
+	{
+	}
+
+// MSessionData
+TUint CHttpClientFlow::Write ( const TDesC8& /*aDesc*/, TUint /*aOptions*/, TSockAddr* /*anAddr*/ )
+	{
+	return KErrNone;
+	}
+
+void CHttpClientFlow::GetData ( TDes8& /*aDesc*/, TUint /*aOptions*/, TSockAddr* /*anAddr*/ )
+	{
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpevent.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,482 @@
+// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// THTTPEvent.h
+// This file contains Rose Model ID comments - please do not delete
+// 
+//
+
+/**
+ @file
+*/
+
+#ifndef	__THTTPEVENT_H_
+#define	__THTTPEVENT_H_
+
+// System includes
+#include <e32std.h>
+
+/**
+The HTTP UID. This UID is used for all events defined here.
+@internalAll
+@released
+*/
+const TUint KHTTPUid				= 0x1000A441;
+
+/**
+Wildcard Matching UID. When specified as part of an event then the UID event
+part of the match will be ignored.
+@internalAll
+@released
+*/
+const TUint KHTTPMatchAnyEventUid	=  0x1000A44C;
+
+/**
+The base status code for transaction events. Any number above this but below
+KSessionEventBaseStatus is a transaction event.
+@internalAll
+@released
+*/
+const TInt KTransactionEventBaseStatus		= 0;
+
+/**
+The base status code for transaction warning events.
+@internalAll
+@released
+*/
+const TInt KTransactionWarningBaseStatus	= 10000;
+
+/**
+The base status code for session events. Any number above this is a session 
+event.
+@internalAll
+@released
+*/
+const TInt KSessionEventBaseStatus			= 100000;
+
+/**
+The base status code for session warning events.
+@internalAll
+@released
+*/
+const TInt KSessionWarningBaseStatus		= 110000;
+
+
+//##ModelId=3C4C18740294
+class THTTPEvent
+/**
+A HTTP status message. Status messages consist of a UID and a
+status code within that UID. Extension dlls that needs to create
+new status messages should use their own UID and create status codes
+within that UID.
+@internalAll
+@released
+*/
+	{
+public:	
+
+	/** The TStandardEvent type is used to specify a family of event types. Any
+		negative event number is used to convey error codes. All events are 
+		incoming (originate with the origin server) unless otherwise indicated. 
+		Outgoing messages will not be seen by the MHTTPTransactionCallback's 
+		MHFRunL.
+	 */
+	enum TStandardEvent
+		{
+		/** Used when registering filter to indicate the filter is instrested 
+			in ALL events, both transaction and session events.
+		 */
+		EAll					= KRequestPending + 1,
+		/** Used when registering filters to indicate the filter is interested
+			in any transaction event, from any direction.
+		 */
+		EAnyTransactionEvent	= KRequestPending,
+		/** Used when registering filters to indicate the filter is interested 
+			in any session event.
+		 */
+		EAnySessionEvent		= KSessionEventBaseStatus
+		};
+
+	/** The TTransactionEvents type defines the events that correspond to 
+		transactions. Outgoing events originate from the client or from filters.
+		The clients do not send these explicitly since the API methods of 
+		RHTTPTransaction do it on their behalf. Incoming events originate from 
+		the protocol handler or from filters, and clients should handle these.
+		The ESucceeded and EFailed events are mutually exclusive, but one will
+		always be sent to the client as the final event for a transaction.
+	 */
+	enum TTransactionEvent
+		{
+		/** The transaction is being submitted. An outgoing event.
+		*/
+		ESubmit						= KTransactionEventBaseStatus,
+		/** The transaction is being cancelled. An outgoing event. 
+		*/
+		ECancel						= KTransactionEventBaseStatus + 1,
+		/** A new part of request body data is available for transmission. An
+			outgoing event
+		*/
+		ENotifyNewRequestBodyPart	= KTransactionEventBaseStatus + 2,
+		/** The transaction is being closed. An outgoing event. 
+		*/
+		EClosed						= KTransactionEventBaseStatus + 3,
+		/** All the response headers have been received. An incoming event. 
+		*/
+		EGotResponseHeaders			= KTransactionEventBaseStatus + 4, 
+		/** Some (more) body data has been received (in the HTTP response). An 
+			incoming event.
+		*/
+		EGotResponseBodyData		= KTransactionEventBaseStatus + 5,
+		/** The transaction's response is complete. An incoming event. 
+		*/
+		EResponseComplete			= KTransactionEventBaseStatus + 6,
+		/** Some trailer headers have been received. An incoming event.
+		*/
+		EGotResponseTrailerHeaders	= KTransactionEventBaseStatus + 7,
+		/** The transaction has succeeded. An incoming event.
+		*/
+		ESucceeded					= KTransactionEventBaseStatus + 8,
+		/** The transaction has failed. This is a 'catch-all' for communicating
+			failures, and more details of the failure should have been notified
+			in previous messages or status codes. If the client could process 
+			these then it is possible that it should not consider the transaction
+			a failure. For instance a browser that displays the body of 404 
+			responses to the user would not consider a 404 response to be a 
+			failure, as it would display it just like a 200 response even though
+			a 404 will be flagged as a 'failure'. An incoming event.
+		*/
+		EFailed						= KTransactionEventBaseStatus + 9, 
+		/** Generated from RHTTPTransaction::Fail(). A filter has failed in a 
+			way that prevents it from using the normal event mechanism to inform
+			the client of the error. This probably means it's run out of memory.
+			An incoming event.
+		*/
+		EUnrecoverableError			= KTransactionEventBaseStatus + 10,
+		/** An event that indicates that there is too much request data to be 
+			sent. The transaction will subsequently be cancelled. An incoming 
+			event.
+		*/
+		ETooMuchRequestData			= KTransactionEventBaseStatus + 11,
+
+		
+		/** If the returned status code for a transaciton is either 301, 302 or 307
+            and the requested method is NOT a GET or HEAD, then the filter sends the 
+            client an event ERedirectRequiresConfirmation as stated in RFC2616.
+
+            On receiving this event, the transaction is already setup with the redirected URI
+            and the client is required to make the decision to whether to submit the 
+            transaction or close the transaction.
+
+            If the requested method is GET or HEAD the transaction is automatically 
+            redirected and this event is not used.
+        */
+		ERedirectRequiresConfirmation = KTransactionEventBaseStatus + 12,
+
+		/** A transaction has been specified to use a proxy and the request
+			requires a tunnel to be establised to the origin server.
+		*/
+		ENeedTunnel					= KTransactionEventBaseStatus + 13,
+		
+		/** The client wishes to view the current cipher suite.
+		*/
+		EGetCipherSuite				= KTransactionEventBaseStatus + 14,
+		
+		/** The transaction's request is complete. An incoming event. 
+		*/
+		ERequestComplete			= KTransactionEventBaseStatus + 15,
+		
+		/**An event to signal that 100 Continue response has been received.
+		*/
+		EReceived100Continue		= KTransactionEventBaseStatus + 16,
+		
+		/**An event to cancel the wait for a 100-Continue event.
+		*/
+		ECancelWaitFor100Continue	= KTransactionEventBaseStatus + 17,
+		
+		EGotRequestHeaders			= KTransactionEventBaseStatus + 18,
+		
+		EGotRequestBodyData			= KTransactionEventBaseStatus + 19,
+		
+		ECompleteResponse			= KTransactionEventBaseStatus + 20,
+		};
+
+	/** The TDirection type defines the direction of an event. An outgoing event
+		originates from the client or from filters. The clients do not send these
+		explicitly since the API methods of RHTTPTransaction or RHTTPSession do 
+		it on their behalf. Incoming events originate from the protocol handler 
+		or from filters, and clients should handle these.
+	*/
+	enum TDirection
+		{
+		/** An event originating with the client (e.g. start transaction).
+		*/
+		EOutgoing,
+		/** An event originating with the server (e.g. something received). 
+		*/
+		EIncoming
+		};
+
+	/** The TTransactionWarning type indicates that something in a transaction 
+		may be incorrect but the transaction may continue. It may also indicate 
+		that something (e.g. a filter) may have performed an action that has 
+		changed the transaction and that the client should be informed of this.
+	*/
+	enum TTransactionWarning
+		{
+		/** An event indicating that the transaction has been redirected and the
+			original origin server indicated that it was a permanent redirection.
+			The URI for the transaction is now the redirected location. A 
+			permanent redirection may require further client behavior if the 
+			request came from a stored URI. This is to avoid further redirections 
+			on subsequent requests for this resource.
+		*/
+		ERedirectedPermanently			= KTransactionWarningBaseStatus,
+		/** An event indicating that the transaction has been redirected and the
+			original server indicated that it was a temporary redirection. 
+		*/
+		ERedirectedTemporarily			= KTransactionWarningBaseStatus + 1,
+		/** An event generated by the Protocol Handler when it receives a Content-
+			Length value that does not match the actual length of the body data.
+		*/
+		EMoreDataReceivedThanExpected	= KTransactionWarningBaseStatus + 2
+		};
+
+public:	// Methods
+
+	/** Constructor
+		@param aStatus	The status value.
+		@param aUID		The UID.
+	*/
+	//##ModelId=3C4C187402FB
+	inline THTTPEvent(TInt aStatus, TUint aUID = KHTTPUid);
+
+	/** Constructor (using a standard event and the HTTP UID)
+		@param aStatus	The standard event to use.
+	*/
+	//##ModelId=3C4C18740304
+	inline THTTPEvent(TStandardEvent aStatus = EAnyTransactionEvent);
+
+	/** Constructor (using a transaction event and the HTTP UID)
+		@param aStatus	The transaction event to use.
+	*/
+	//##ModelId=3C4C1874030C
+	inline THTTPEvent(TTransactionEvent aStatus);
+
+	/** Assigns a standard event code to an event object
+		@param aStatus	The standard event.
+		@return The HTTP event object.
+	*/
+	//##ModelId=3C4C187402EF
+	inline THTTPEvent& operator=(TStandardEvent aStatus);
+
+	/** Assigns a transaction event code to an event object
+		@param aStatus	The transaction event.
+		@return The HTTP event object.
+	*/
+	//##ModelId=3C4C187402F1
+	inline THTTPEvent& operator=(TTransactionEvent aStatus);
+
+	/** Equality operator
+		@param The HTTP event object to compare.
+		@return ETrue if the HTTP event objects are equal. 
+	*/
+	//##ModelId=3C4C187402DA
+	inline TBool operator==(THTTPEvent aThat) const;
+
+	/** Inequality operator
+		@param The HTTP event object to compare.
+		@return ETrue if the HTTP event objects are not equal. 
+	*/
+	//##ModelId=3C4C187402BD
+	inline TBool operator!=(THTTPEvent aThat) const;
+
+	/** Equality operator (compares with a standard event)
+		@param The standard event object to compare.
+		@return ETrue if the standard event objects are equal.
+	*/
+	//##ModelId=3C4C187402DC
+	inline TBool operator==(TStandardEvent aStatus) const;
+
+	/** Inequality operator (compares with a standard event)
+		@param The standard event object to compare.
+		@return ETrue if the standard event objects are not equal. 
+	*/
+	//##ModelId=3C4C187402C7
+	inline TBool operator!=(TStandardEvent aStatus) const;
+
+	/** Equality operator (compares with a transaction event)
+		@param The transaction event object to compare.
+		@return ETrue if the transaction event objects are equal. 
+	*/
+	//##ModelId=3C4C187402E4
+	inline TBool operator==(TTransactionEvent aStatus) const;
+
+	/** Inequality operator (compares with a transaction event)
+		@param The transaction event object to compare.
+		@return ETrue if the transaction event objects are not equal. 
+	*/
+	//##ModelId=3C4C187402D0
+	inline TBool operator!=(TTransactionEvent aStatus) const;
+	
+	/** @return ETrue if the event is a session event
+	*/
+	//##ModelId=3C4C187402BC
+	inline TBool IsSessionEvent() const;
+
+public:	// Attributes
+
+	/** The status value.
+	 */
+	//##ModelId=3C4C187402B4
+	TInt iStatus;
+
+	/** The UID.
+	 */
+	//##ModelId=3C4C187402AA
+	TUint iUID;
+
+protected: // Attributes
+	/** Flag to indicate whether the event is a session event
+	*/
+	TBool iIsSessionEventFlag;
+
+	};
+
+
+class THTTPSessionEvent : public THTTPEvent
+/**
+A HTTP session status message. Status messages consist of a UID and a
+status code within that UID. Extension dlls that needs to create
+new status messages should use their own UID and create status codes
+within that UID.
+@internalAll
+@released
+*/
+	{
+public: // Enumerations
+	/** The TSessionEvents type defines the evenst that correspond to the 
+		of a session entity. Outgoing events originate from the client or from
+		filters. Incoming events originate from the protocol handler or from 
+		filters, and clients should handle these. 
+	*/
+	enum TSessionEvent
+		{
+		/** A session connection should be initiated. An outgoing event.
+		*/
+		EConnect							= KSessionEventBaseStatus,
+		/** The session should be disconnected. An outgoing event.
+		 */
+		EDisconnect							= KSessionEventBaseStatus + 1,
+		/** The session has been successfully connected. None of the client 
+			requested capabilities were denied or reduced by the proxy. An 
+			incoming event.
+		*/
+		EConnectedOK						= KSessionEventBaseStatus + 2,
+		/** The session has been connected, but with one or more of the client 
+			requested capabilities denied or reduced by the proxy. An incoming 
+			event.
+		*/
+		EConnectedWithReducedCapabilities	= KSessionEventBaseStatus + 3,
+		/** The session has been disconnected. This either confirms an earlier 
+			EDisconnect event or indicates a forced disconnection by the proxy. 
+			An incoming event.
+		*/
+		EDisconnected						= KSessionEventBaseStatus + 4,
+		/** The authentication handshake succeeded with the automatic validation
+			of the (proxy) server certificate.
+		 */
+		EAuthenticatedOK					= KSessionEventBaseStatus + 5,
+		/** The authentication handshake failed.
+		*/
+		EAuthenticationFailure				= KSessionEventBaseStatus + 6,
+		/** The connection attempt to the proxy timed out.
+		*/
+		EConnectionTimedOut					= KSessionEventBaseStatus + 7
+		};
+	
+	/**
+		HTTP session warning events.
+	 */
+	enum TSessionWarning
+		{
+		/** The client has requested a transaction event that requires a session
+			to be connected or the connection to be initiated, but neither is
+			currently true. The transaction event will be left pending until the
+			session is connected. An incoming event.
+		*/
+		ENotConnected						= KSessionWarningBaseStatus,
+		/** The proxy has sent some information that is not related to a 
+			transaction and has no effect on the state of the session. The 
+			information from the proxy is in the EProxyExceptionInfo property.
+		*/
+		EExceptionInfo						= KSessionWarningBaseStatus + 1,
+		/** The client connection request was (permanently) redirected to a new
+			WAP proxy address. The client should check the EWspProxyAddress 
+			property for the new address. The client's access-point database can
+			then be updated with this address. No notification is given of a 
+			temporary redirection.
+		*/
+		ERedirected							= KSessionWarningBaseStatus + 2,
+		/** The client has requested a session event that is not valid whilst
+			the WSP session is trying to establish a connection.
+		*/
+		EAlreadyConnecting					= KSessionWarningBaseStatus + 3,
+		/** The client has requested a session event that is not valid whilst
+			the WSP session is in the Connected state.
+		*/
+		EAlreadyConnected					= KSessionWarningBaseStatus + 4,
+		/** The client has requested a session event that is not valid whilst
+			the WSP session is trying to close the connection.
+		*/
+		EAlreadyDisconnecting				= KSessionWarningBaseStatus + 5,
+		/** The client has requested a session event that is not valid whilst
+			the WSP session is in the Null (or disconnected) state.
+		*/
+		EAlreadyDisconnected				= KSessionWarningBaseStatus + 6
+		};
+
+public:
+	/** Constructor
+		@param aStatus	The status value.
+		@param aUID		The UID.
+	*/
+	inline THTTPSessionEvent(TInt aStatus, TUint aUID = KHTTPUid);
+
+	/** Constructor (using a standard event and the HTTP UID)
+		@param aStatus	The standard event to use.
+	*/
+	inline THTTPSessionEvent(TStandardEvent aStatus = EAnySessionEvent);
+
+	/** Constructor (using a session event and the HTTP UID)
+		@param aStatus	The session event to use.
+	*/
+	inline THTTPSessionEvent(TSessionEvent aStatus);
+
+	/** Assigns a session event code to an event object
+		@param aStatus	The session event.
+	*/
+	//##ModelId=3C4C187402F9
+	inline THTTPSessionEvent& operator=(TSessionEvent aStatus);
+
+	// Equality operator (compares with a session event)
+	//##ModelId=3C4C187402E6
+	inline TBool operator==(TSessionEvent aStatus) const;
+
+	// Inequality operator (compares with a session event)
+	//##ModelId=3C4C187402D2
+	inline TBool operator!=(TSessionEvent aStatus) const;
+	};
+
+#include <http/thttpevent.inl>
+
+#endif // __THTTPEVENT_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpmudpflow.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,234 @@
+// 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:
+// httpudpflow.h
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __HTTPMUDPFLOW_H_
+#define __HTTPMUDPFLOW_H_
+
+//System Includes
+#include <comms-infras/ss_subconnflow.h>
+#include <comms-infras/ss_flowbinders.h>
+#include <comms-infras/ss_protflow.h>
+#include<in_sock.h>
+#include<es_sock.h>
+#include <rmemchunk.h>
+
+#include "upnpflowbase.h"
+#include "cupnprequestparser.h"
+#include "upnp_cf_msgs.h"
+#include "httpudpflow.h"
+#include "ctimermappeduri.h"
+
+class CCallbackArgument;
+NONSHARABLE_CLASS ( CRecvElement ) : public CBase
+	{
+	public:
+
+	CRecvElement ( RMemChunk& aData, const TAppProtAddr& aAddr )
+	: iData ( aData ),
+	iAddr ( aAddr )
+	{
+	}
+
+	~CRecvElement ()
+		{
+		if ( !iData.IsEmpty () )
+			{
+			iData.Free ();
+			}
+		}
+	const TAppProtAddr& Address () const
+		{
+		return iAddr;
+		}
+
+	RMemChunk& Data ()
+		{
+		return 	iData;
+		}
+
+	private:
+	RMemChunk 		iData;
+	TAppProtAddr	iAddr;
+	};
+
+typedef RArray < CRecvElement* > CRecvElements;
+
+NONSHARABLE_CLASS ( CHttpMUdpFlow ) : public CUPnPFlowBase,
+						 			 public MParserObserver
+	{
+	friend class CUPnPFlowFactory;
+
+	public:
+	static CHttpMUdpFlow* NewL ( CSubConnectionFlowFactoryBase& aFactory,
+							  CUPnPProtocolIntfBase* aProtocolIntf,
+						  		const TNodeId& aSubConnId );
+	~CHttpMUdpFlow ();
+
+	private:
+	CHttpMUdpFlow ( CSubConnectionFlowFactoryBase& aFactory,
+					CUPnPProtocolIntfBase* aProtocolIntf,
+					const TNodeId& aSubConnId );
+
+	void ConstructL ();
+	protected:
+
+	// From CSubConnectionFlowBase
+	void ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage );
+
+	// From MParserObserver
+	virtual void GotHeaders ();
+	inline virtual void GotBodyData ();
+	virtual void DataParsed();
+	virtual void ParsingComplete ( RMemChunk& aExcessData );
+	virtual void ParserError ( TInt aError );
+
+	void StartFlow ( TNodeCtxId aSender );
+	void StopFlow ( TNodeCtxId aSender );
+	void ParseIfOneRecvElement ();
+	void ParseElement ();
+	void RemoveFirstRecvElement ();
+
+	TInt ValidateRequest ();
+	TInt ValidateNotifyRequest ();
+	TInt ValidateMSearchRequest ();
+
+	// This should be moved
+	TInt GetHeaderValue ( const CRequest& aResponse, TInt aFieldIndex, THTTPHdrVal& aFieldVal, const TStringTable& aTable ) const;
+	TInt GetParamValue ( const CRequest& aResponse, TInt aFieldIndex, TInt aParamIndex, THTTPHdrVal& aParamVal, const TStringTable& aTable ) const;
+	TBool IsHeaderPresent ( const CRequest& aResponse, TInt aFieldIndex, const TStringTable& aTable ) const;
+	TBool IsValidCacheControlHeader ( const CRequest& aResponse ) const;
+	TBool IsValidManHeader ( const CRequest& aResponse ) const;
+	TBool IsValidHostHeader ( CRequest& aRequest ) const;
+
+	void CreateMulticastListener ();
+
+	void NotifyClients ();
+	void HandleNotifyRequestL ();
+	static TInt HandleMSearchRequestL (  TAny* aPtr );
+	void RegisterL ( TNodeCtxId aChannelId, RMemChunk& aST, CSearchTargetArray& aArray );
+	void Unregister ( TNodeCtxId aChannelId );
+	void ReadRequestValues ( RStringF& aLocation, TInt& aMaxAge );
+	void ReadRequestValues ( RStringF& aSt, RStringF& aUsn, RStringF& aNts);
+	void ReadRequestValues ( TInt& aMaxAge, RStringF& aSt );
+private:
+	void CreateTimerEntryL( );
+	TInt AdjustedDelay( TInt aTime );
+	inline RPointerArray<CCallbackArgument>& GetArgumentArray();
+	inline RPointerArray<CTimerMappedUri>& GetTimerArray();
+	inline CSearchTargetArray& GetSearchTargetArray();
+private:
+	CUpnpRequestParser* 	iRequestParser;
+
+	CHeaderCodec* 			iCodec;
+
+	CSearchTargetArray		iSearchTargetArray;
+	CSearchTargetArray		iNotifyTargetArray;
+	RArray <TNodeCtxId>		iListenRequestors; // This array will be used untill the flow binds to
+													// UDP listener.
+	RMBufChain				iReceivedData;
+	CRequest*				iUPnPRequest; // Used for parsing the request
+	CRecvElements			iRecvElements;
+	TNodeId					iAppProtIntfId;
+
+	TBool					iIsStarted;
+	TBool					iIsLeaving;
+	TNodeCtxId				iLastLeavingClient;
+	RStringPool				iStringPool;
+	CDeltaTimer* 			iDeltaTimer;
+	RPointerArray<CTimerMappedUri> 		iTimerMappedArray;
+	RPointerArray<CCallbackArgument> 	iCallbackArray;
+	};
+
+void CHttpMUdpFlow::GotBodyData ()
+	{
+	ASSERT (0);
+	}
+RPointerArray<CCallbackArgument>& CHttpMUdpFlow::GetArgumentArray()
+	{
+	return iCallbackArray;
+	}
+RPointerArray<CTimerMappedUri>& CHttpMUdpFlow::GetTimerArray()
+	{
+	return iTimerMappedArray;
+	}
+CSearchTargetArray& CHttpMUdpFlow::GetSearchTargetArray()
+	{
+	return iSearchTargetArray;
+	}
+
+/*
+  This class holds the *This pointer of the object calling it so that the static
+  methods being called on expiry of CDeltaTimer can operate on the attributes of 
+  class
+ 
+  @internalComponent
+ */
+class CCallbackArgument: public CBase
+	{
+public:
+	static CCallbackArgument* NewL(TAny* aThis ,const TAppProtAddr& aAddress , const CSearchTarget* aStTarget);
+	inline ~CCallbackArgument();
+	inline TAny* GetThisPointer() const;
+	inline const TAppProtAddr& GetAddress() const;
+	inline const CSearchTarget* SearchTarget() const ;
+	inline void SetTimerEntry( TDeltaTimerEntry* aEntry);
+	inline const TDeltaTimerEntry* GetTimerEntry() const;
+private:
+	inline CCallbackArgument (TAny* aThis , const TAppProtAddr& aAddress , const CSearchTarget* aStTarget);
+		
+	TAny* iThisPointer;
+	TAppProtAddr iAddress;
+	const CSearchTarget* iSearchTarget;
+	TDeltaTimerEntry* iTimerEntry;
+	};
+
+/* Returns the pointer to the object it contains. */
+TAny* CCallbackArgument::GetThisPointer() const
+	{
+	return iThisPointer;
+	}
+
+const TAppProtAddr& CCallbackArgument::GetAddress() const
+	{
+	return iAddress;
+	}
+
+const CSearchTarget* CCallbackArgument::SearchTarget() const
+	{
+	return iSearchTarget;
+	}
+
+void CCallbackArgument::SetTimerEntry( TDeltaTimerEntry* aEntry)
+	{
+	iTimerEntry = aEntry;
+	}
+const TDeltaTimerEntry* CCallbackArgument::GetTimerEntry() const
+	{
+	return iTimerEntry;
+	}
+CCallbackArgument::CCallbackArgument (TAny* aThis , const TAppProtAddr& aAddress , const CSearchTarget* aStTarget):iThisPointer(aThis)
+		,iAddress( aAddress ), iSearchTarget( aStTarget )
+	{
+	
+	}
+
+CCallbackArgument::~CCallbackArgument()
+	{
+	}
+#endif // __HTTPMUDPFLOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,185 @@
+// 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 __HTTPSERVER_H_
+#define __HTTPSERVER_H_
+
+// System Includes
+#include <comms-infras/ss_nodemessages.h>
+#include <comms-infras/ss_protflow.h>
+#include <uri8.h>
+#include <rmemchunk.h>
+
+#include "cupnprequestparser.h"
+#include "cupnpresponsecomposer.h"
+#include "httpserverhandler.h"
+
+using namespace Messages;
+
+class MHttpEventObserver;
+class CTransaction;
+
+NONSHARABLE_CLASS(CServiceInfo) : public CBase
+	{
+	public:
+		static CServiceInfo* NewL ( const TDesC8& aUri, MHttpEventObserver& iObserver );
+
+		virtual ~CServiceInfo ();
+		TBool Match ( const TDesC8& aUri );
+		TBool Match ( const TUriC8& aUri, const TDesC8& aHost ) const;
+		MHttpEventObserver& Observer () const;
+	private:
+		CServiceInfo ( MHttpEventObserver& iObserver );
+		void ConstructL ( const TDesC8& aUri );
+
+	private:
+		RBuf8 iUri;
+		MHttpEventObserver& iObserver;
+		TUriParser8 iParsedUri;
+	};
+
+// -----------------------------------------
+
+NONSHARABLE_CLASS(CServiceInfoArray) : public CBase
+	{
+	public:
+		CServiceInfoArray ();
+		~CServiceInfoArray ();
+
+		void AddServiceUriL ( const TDesC8& aUri, MHttpEventObserver& aObserver );
+		void RemoveServiceUri ( const TDesC8& aUri );
+		TInt FindServiceUri ( const TDesC8& aUri );
+		TInt MatchServiceUri ( const TUriC8& aUri, const TDesC8& aHost );
+		TInt CountServiceUri ();
+		CServiceInfo& operator [] (TInt aPos)
+			{
+			return *( iServiceInfos [ aPos ] );
+			}
+		private:
+		RPointerArray<CServiceInfo> iServiceInfos;
+	};
+
+// ---------------------------------------------
+
+class HttpRequestUtils
+ 	{
+	public:
+	static TBool IsHostPresent ( const CRequest& aRequest );
+	static const TDesC8& HostStr ( const CRequest& aRequest );
+	static void ValidateL ( const CRequest& aRequest );
+	static TInt  ValidateMethod ( const CRequest& aRequest );
+	static TInt ValidateHost ( const CRequest& aRequest );
+	static TInt IsConnectionRequired ( const CRequest& aRequest );
+	};
+
+// -----------------------------------------------
+
+
+class TServiceControlProviderInfo
+	{
+public:
+	TServiceControlProviderInfo ( TNodeCtxId aServiceId, TNodeCtxId aControlProviderId )
+	: iServiceId ( aServiceId ), iControlProviderId ( aControlProviderId )
+	{
+
+	}
+	TServiceControlProviderInfo ()
+	{ }
+
+public:
+	TNodeCtxId	iServiceId;
+	TNodeCtxId	iControlProviderId;
+	};
+
+
+class CServerTransaction;
+
+NONSHARABLE_CLASS(CHttpServer) : public CBase,
+							public ASimpleNodeIdBase,
+							public MParserObserver,
+							public MComposerObserver
+	{
+	public:
+	static CHttpServer* NewL (ESock::CProtocolIntfBase* aProtIntf);
+	void AddServiceUriL ( const TDesC8& aUri, MHttpEventObserver& aObserver, TNodeCtxId aServiceId, TNodeCtxId aControlProviderId );
+	TBool RemoveServiceUri ( const TDesC8& aUri, TNodeCtxId aServiceId, TNodeCtxId aControlProviderId );
+
+	private:
+	void Start ( TUint aPort );
+	void StopServer ();
+
+	// From ASimpleNodeIdBase
+	virtual void ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage );
+
+	// From MParserObserver
+	virtual void GotHeaders();
+	inline virtual void GotBodyData();
+	virtual void DataParsed();
+	inline virtual void ParsingComplete(RMemChunk& aExcessData);
+	virtual void ParserError(TInt aError);
+
+	// From MComposerObserver
+	virtual void MessageDataReadyL ( RBuf8& aData );
+	inline virtual void ComposingConcluded ();
+	virtual void ComposerError ( TInt aError );
+
+	void CreateListener ();
+	TInt FindServiceUri ( const TDesC8& aUri );
+	TBool MatchRequestUri () const;
+	void RejectConnection ( RMBufChain& aData );
+
+	void TransferConnectionL ( RInternalSocket& aSocket, RMBufChain& aData );
+
+	private:
+	CHttpServer (ESock::CProtocolIntfBase* aProtIntf);
+	void ConstructL ();
+	virtual ~CHttpServer ();
+
+	private:
+	TNodeId					iAppProtIntfId;
+	CServiceInfoArray*		iServiceInfos;
+	CUpnpRequestParser* 	iParser;
+	CUpnpResponseComposer*	iComposer;
+	CTransaction*		 	iTransaction;
+	CServerHandlerArray		iServerHandlerArray;
+	CHeaderCodec*			iCodec;
+
+	RArray<TServiceControlProviderInfo> iServiceControlProviderInfos;
+	TBool								iStarted;
+
+	TServiceControlProviderInfo	iLastServiceControlProviderInfo;
+	TBool						iIsLeaving;
+	ESock::CProtocolIntfBase* 			iProtIntf;
+	RStringPool					iStringPool;
+	RMemChunk					iMemChunk;
+	};
+
+void CHttpServer::GotBodyData ()
+	{
+
+	}
+
+void CHttpServer::ParsingComplete ( RMemChunk& /* aExcessData*/ )
+	{
+	// We don't come here. We complete parsing once we identify our request URI
+	}
+
+void CHttpServer::ComposingConcluded ()
+	{
+	
+	}
+
+
+#endif // __HTTPSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpserverflow.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,167 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef HTTPSERVERFLOW_H_
+#define HTTPSERVERFLOW_H_
+
+//System Includes
+#include <comms-infras/ss_subconnflow.h>
+#include <comms-infras/ss_protflow.h>
+#include <comms-infras/eintsock.h>
+#include <rmemchunk.h>
+
+#include "upnpflowbase.h"
+#include "rsockethandler.h"
+#include "csocketopener.h"
+#include "httpserverhandler.h"
+#include "upnp_cf_msgs.h"
+//Local Includes
+
+using namespace ESock;
+
+class CHttpServer;
+
+class CHttpServerFlow: public CUPnPFlowBase,	public MFlowBinderControl,
+				/*Session Binder with Upper layer */
+				public MSessionData, public MSessionControl, public MHttpEventObserver
+	{
+	friend class CUPnPFlowFactory;
+public:
+	static CHttpServerFlow* NewL(CSubConnectionFlowFactoryBase& aFactory, CProtocolIntfBase* aProtocolIntf, const TDesC8& aUri, const Messages::TNodeId& aSubConnId );
+	inline const TDesC8& Uri() const;
+
+private:
+
+	struct TControlTransaction
+		{
+		TControlTransaction ( TInt aId, CServerTransaction& aTrans )
+			: iId ( aId ),
+			iTransaction ( aTrans ),
+			iReadComplete ( EFalse ),
+			iReadTriggered ( EFalse ),
+			iNotifyComplete ( EFalse )
+			{
+			}
+
+		CServerTransaction& iTransaction;
+		TInt iId;
+		TBool iNotifyComplete : 1;
+		TBool iReadTriggered : 1;
+		TBool iReadComplete : 1;
+		};
+
+
+	// From CSubConnectionFlowBase
+	virtual void ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage );
+
+ 	virtual MFlowBinderControl* DoGetBinderControlL();
+
+	//From MFlowBinderControl
+	virtual MSessionControl* GetControlL (TInt aSessionType, MSessionControlNotify& aSessionControlNotify);
+	virtual MSessionData* BindL(MSessionDataNotify& aNotify);
+	virtual void Unbind();
+	virtual CSubConnectionFlowBase* Flow(); //returns its own flow
+
+	// MSessionControl
+	virtual void ActiveOpen();
+	inline virtual void ActiveOpen(const TDesC8& aConnectionData);
+	inline virtual TInt PassiveOpen(TUint aQueueSize);
+	inline virtual TInt PassiveOpen(TUint aQueueSize,const TDesC8& aConnectionData);
+	inline virtual void AutoBind();
+	inline virtual void LocalName(TSockAddr& anAddr) const;
+	inline virtual TInt SetLocalName(TSockAddr& anAddr);
+	inline virtual void RemName(TSockAddr& anAddr) const;
+	inline virtual TInt SetRemName(TSockAddr& anAddr);
+	virtual void Shutdown(MSessionControl::TCloseType option);
+	inline virtual void Shutdown(MSessionControl::TCloseType option, const TDesC8& aDisconnectionData);
+	inline virtual TInt SecurityCheck(MProvdSecurityChecker* aSecurityChecker);
+	virtual TInt GetOption(TUint level, TUint name, TDes8 &anOption) const;
+	virtual TInt SetOption(TUint level, TUint name, const TDesC8 &anOption);
+	inline virtual void Ioctl(TUint level, TUint name, TDes8 *anOption);
+	inline virtual void CancelIoctl(TUint aLevel, TUint aName);
+	inline virtual void Start();
+
+	// MSessionData
+	inline virtual TUint Write(const TDesC8& aDesc,TUint aOptions, TSockAddr* anAddr = NULL);
+	virtual TInt Write(RMBufChain& aData, TUint aOptions, TSockAddr* anAddr = NULL );
+	inline virtual void GetData(TDes8& aDesc,TUint options,TSockAddr* anAddr=NULL);
+	virtual TInt GetData(RMBufChain& aData, TUint aLength,TUint aOptions,TSockAddr* anAddr=NULL);
+
+	// From MHttpEventObserver
+	virtual TInt OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent );
+
+
+	void StartFlow ( TNodeCtxId aSender );
+	void StopFlow ( TNodeCtxId aSender );
+
+	void HandleUPnPResponseL ( CServerTransaction* aTrans, TInt aStatus, SMetaDataNetCtorExt* aInfo );
+	// ----------------------------------
+	// The following should be moved to a separate utils class
+	TInt GetHeaderValue ( const CRequest& aRequest, TInt aFieldIndex, THTTPHdrVal& aFieldVal, const TStringTable& aTable ) const;
+	TBool MatchHeaderValue ( const CRequest& aRequest, TInt aField, const TDesC8& aFieldValue, const TStringTable& aTable );
+
+	TBool IsValidNTHeader ( const CRequest& aRequest );
+	TBool IsValidContentTypeHeader ( const CRequest& aRequest );
+	TBool IsValidNTSHeader ( const CRequest& aRequest );
+	inline TBool IsValidCharset ( const CRequest& aRequest );
+	TBool IsValidManHeader ( const CRequest& aRequest);
+
+	TBool IsHeaderPresent ( const CRequest& aRequest, TInt aField, const TStringTable& aTable );
+	void SetHeaderL ( CResponse& aRequest, TInt aFieldIndex, RMemChunk& aVal, const TStringTable& aTable );
+	void SetHeaderL ( CResponse& aRequest, TInt aFieldIndex, TInt aVal, const TStringTable& aTable );
+	void IterateHeaders ( CRequest& aRequest );
+	// ------------------------------------
+
+	TInt ValidateUPnPRequest ( const CTransaction& aTrans );
+	TInt ValidateSubscribeRequest ( const CTransaction& aTrans );
+	TInt ValidateUnsubscribeRequest ( const CTransaction& aTrans );
+	TInt ValidateNotifyRequest ( const CTransaction& aTrans );
+	TInt ValidatePostRequest ( const CTransaction& aTrans );
+	TInt ValidateMPostRequest ( const CTransaction& aTrans );
+
+	TInt RouteTransaction ( CServerTransaction& aTrans, THTTPEvent& aEvent );
+
+	TInt FindOrCreateControlTransaction ( CServerTransaction& aTrans );
+	TInt FindControlTransaction ( TInt aId ) const;
+	TInt FindControlTransaction ( CServerTransaction& aTrans ) const;
+	void RemoveControlTransaction ( TInt aId );
+	TInt AddControlTransaction ( TInt aId, CServerTransaction& aTrans );
+	TControlTransaction FirstControlTransactionToNotify () const;
+
+
+private:
+	CHttpServerFlow(CSubConnectionFlowFactoryBase& aFactory, CProtocolIntfBase* aProtocolIntf, const Messages::TNodeId& aSubConnId );
+	~CHttpServerFlow();
+
+	void ConstructL ( const TDesC8& aUri );
+
+private:
+	MSessionControlNotify* 	iSessionControlNotify;
+	MSessionDataNotify* 	iSessionDataNotify;
+	RBuf8					iUri;
+	RArray <TControlTransaction>	iControlTransactions;
+	TInt 					iControlId;
+};
+
+const TDesC8& CHttpServerFlow::Uri() const
+	{
+	return iUri;
+	}
+
+#include "httpserverflow.inl"
+#endif // HTTPCLIENTFLOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpserverflow.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,99 @@
+// 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:
+//
+
+void CHttpServerFlow::ActiveOpen(const TDesC8& /*aConnectionData*/)
+	{
+	}
+
+
+TInt CHttpServerFlow::PassiveOpen(TUint /*aQueueSize*/)
+	{
+	return 0;
+	}
+
+TInt CHttpServerFlow::PassiveOpen(TUint /*aQueueSize*/,const TDesC8& /*aConnectionData*/)
+	{
+	return 0;
+	}
+
+void CHttpServerFlow::AutoBind()
+	{
+	}
+
+void CHttpServerFlow::LocalName(TSockAddr& /*anAddr*/) const
+	{
+	}
+
+TInt CHttpServerFlow::SetLocalName(TSockAddr& /*anAddr*/)
+	{
+	return 0;
+	}
+
+void CHttpServerFlow::RemName(TSockAddr& /*anAddr*/) const
+	{
+	}
+
+TInt CHttpServerFlow::SetRemName(TSockAddr& /*anAddr*/)
+	{
+	return 0;
+	}
+
+TInt CHttpServerFlow::SecurityCheck(MProvdSecurityChecker* /*aSecurityChecker*/)
+	{
+	return 0;
+	}
+
+void CHttpServerFlow::Ioctl(TUint /*level*/, TUint /*name*/, TDes8* /*anOption*/)
+	{
+	}
+
+void CHttpServerFlow::CancelIoctl(TUint /*aLevel*/, TUint /*aName*/)
+	{
+	}
+
+TUint CHttpServerFlow::Write ( const TDesC8& /*aDesc*/,TUint /*aOptions*/,TSockAddr* /*anAddr*/ )
+	{
+	ASSERT(0);
+	return KErrNone;
+	}
+
+void CHttpServerFlow::GetData ( TDes8& /*aDesc*/, TUint /*aOptions*/, TSockAddr* /*anAddr*/ )
+	{
+	ASSERT(0);
+	}
+
+void CHttpServerFlow::Start()
+	{
+	}
+
+void CHttpServerFlow::Shutdown(MSessionControl::TCloseType /*option*/, const TDesC8& /*aDisconnectionData*/)
+	{
+	}
+
+TBool CHttpServerFlow::IsValidCharset ( const CRequest& /*aRequest*/ )
+	{
+	THTTPHdrVal hdrVal;
+//	if ( GetParamValue ( aRequest, HTTP::EContentType, HTTP::ECharset, hdrVal ) )
+//		{
+//		if ( hdrVal.StrF ().DesC ().Compare ( KCharset() ) == 0 )
+			{
+			return ETrue;
+			}
+//		}
+//	return EFalse;
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpserverhandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,190 @@
+// 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 __HTTPSERVERHANDLER_H_
+#define __HTTPSERVERHANDLER_H_
+
+#include "ctransaction.h"
+#include "cprotocolhandler.h"
+#include "cupnprequestparser.h"
+#include "cupnpresponsecomposer.h"
+#include "cupnptimer.h"
+
+#include <rmemchunk.h>
+
+NONSHARABLE_CLASS(CServerTransaction) : public CTransaction
+	{
+	public:
+	static CServerTransaction* NewL ( CHeaderCodec& aCodec, RStringPool& aStringPool, MHttpEventObserver& aObserver )
+		{
+		CServerTransaction* self = new ( ELeave )CServerTransaction	( aObserver );
+		CleanupStack::PushL ( self );
+		self->ConstructL ( aCodec, aStringPool );
+		CleanupStack::Pop (); // self
+		return self;
+		}
+
+	inline MHttpEventObserver& ServerObserver () const
+		{
+		return *iServerObserver;
+		}
+
+	inline void SetReadyToSend ()
+		{
+		iReadyToSend = ETrue;
+		}
+
+	inline TBool ReadyToSend () const
+		{
+		return iReadyToSend;
+		}
+
+	inline void SetClosing ()
+		{
+		iCloseConnection = ETrue;
+		}
+
+	inline TBool IsClosing () const
+		{
+		return iCloseConnection;
+		}
+
+	inline void SetParsing  ( TBool aValue )
+		{
+		iParsing = aValue;
+		}
+
+	inline TBool Parsing () const
+		{
+		return iParsing;
+		}
+
+	inline void SetComposing ( TBool aValue )
+		{
+		iComposing = aValue;
+		}
+
+	inline TBool Composing () const
+		{
+		return iComposing;
+		}
+
+	private:
+	CServerTransaction ( MHttpEventObserver& aObserver )
+	: iServerObserver ( &aObserver )
+		{
+		}
+
+	private:
+		TBool					iReadyToSend : 1;
+		TBool					iCloseConnection : 1;
+		TBool					iComposing : 1;
+		TBool					iParsing : 1;
+		MHttpEventObserver*		iServerObserver;
+	};
+
+class CServiceInfoArray;
+class CHttpServerHandler;
+
+typedef RPointerArray < CHttpServerHandler > CServerHandlerArray;
+
+NONSHARABLE_CLASS(CHttpServerHandler) : public CProtocolHandler,
+										public MHttpEventObserver
+	{
+	public:
+
+	static CHttpServerHandler* NewL ( RInternalSocket& aSocket, RMemChunk& aData, CServiceInfoArray& aServiceInfos, CServerHandlerArray& aServerHandlers,
+									CHeaderCodec& aCodec, RStringPool& aStringPool, CChunkManager* aChunkMgr );
+	virtual ~CHttpServerHandler ();
+
+
+	static void CreateResponse ( CResponse& aResponse, TInt aStatusCode, MHttpEventObserver* aServerHandler = NULL );
+	static void CreateResponseL ( CResponse& aResponse, TInt aStatusCode );
+
+	private:
+	CHttpServerHandler ( RInternalSocket& aSocket, RMemChunk& aData, CServiceInfoArray& aServiceInfos, CServerHandlerArray& aServerHandlers,
+	CHeaderCodec& aCodec, RStringPool& aStringPool, CChunkManager* aChunkMgr );
+	void ConstructL ();
+
+	// From MParserObserver
+	virtual void GotHeaders ();
+	virtual void GotBodyData ();
+	virtual void DataParsed ();
+	virtual void ParsingComplete ( RMemChunk& aExcessData );
+	virtual void ParserError ( TInt aError );
+
+	// From MComposerObserver
+	virtual void MessageDataReadyL ( RBuf8& aData );
+	virtual void ComposingConcluded ();
+	virtual void ComposerError ( TInt aError );
+
+	// From MSocketHandlerObserver
+	inline virtual void OpenComplete ( RInternalSocket& aSocket );
+	inline virtual void ConnectComplete ();
+	virtual void SendComplete ( TInt aLength );
+	virtual void RecvComplete ( RMBufChain& aData );
+	virtual void Error ( TOperation aOperation, TInt aError  );
+
+	// From MHttpEventObserver
+	virtual TInt OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent );
+
+	// methods from MHTTPDataSupplier
+	TBool GetNextDataPart ( TPtrC8& aDataPart );
+	void ReleaseData ();
+	TInt OverallDataSize ();
+
+	// From MUPnPTimerObserver	
+	virtual void TimeOut ();
+
+	CServerTransaction& CurrentTransaction () const;
+	CServerTransaction& LastTransaction () const;
+	void NotifyEvent ( THTTPEvent& aEvent );
+	TBool CanDestroy () const;
+	void DestroySelf ();
+
+	void StartNewTransactionL ();
+	void StartNewTransaction ();
+	void DeleteTransaction ( CTransaction* aTrans );
+
+	void SetError ( TInt aError );
+	TBool Error () const;
+
+	private:
+		RMemChunk 				iReceivedData;
+		RMemoryAllocator		iAllocator;
+		CServiceInfoArray&		iServiceInfos;   // Not owned.
+		CServerHandlerArray&	iServerHandlers; // Not owned
+		CUpnpRequestParser* 	iRequestParser;
+		CUpnpResponseComposer* 	iResponseComposer;		
+		TInt 					iError;
+
+		CHeaderCodec& 			iServerCodec; // Not owned
+		RStringPool& 			iStringPool; // Not owned
+	};
+
+// From MSocketHandlerObserver
+void CHttpServerHandler::OpenComplete ( RInternalSocket& /* aSocket */ )
+{
+// We don't handle this. Assert here
+}
+
+void CHttpServerHandler::ConnectComplete ()
+{
+// We don't handle this. Assert here
+
+}
+
+
+#endif // __HTTPSERVERHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/httpudpflow.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,310 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __HTTPUDPFLOW_H_
+#define __HTTPUDPFLOW_H_
+
+//System Includes
+#include <comms-infras/ss_subconnflow.h>
+#include <comms-infras/ss_flowbinders.h>
+#include <comms-infras/ss_protflow.h>
+#include<in_sock.h>
+#include<es_sock.h>
+#include <rmemchunk.h>
+#include <rmemcell.h>
+
+#include "upnpflowbase.h"
+#include "rsockethandler.h"
+#include "csocketopener.h"
+#include "cupnpresponseparser.h"
+#include "cupnprequestcomposer.h"
+#include "cupnpresponsecomposer.h"
+#include "upnp_cf_msgs.h"
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+#include "cupnptimer.h"
+
+NONSHARABLE_CLASS(CSearchTarget) : public CBase
+	{
+	public:
+
+	CSearchTarget ( Messages::TNodeCtxId& aChannelId )
+	: iOriginator ( aChannelId )
+	{
+	}
+
+	~CSearchTarget ()
+		{
+		iSearchTarget.Close ();
+		}
+
+	void AddTargetL ( RMemChunk& aSt )
+		{
+		iSearchTarget.CreateMaxL(aSt.Length());
+		aSt.CopyOut(iSearchTarget);
+		aSt.Free();
+		}
+
+	TInt Match ( const TDesC8& aSt ) const
+		{
+		_LIT8 ( KSsdpAll, "ssdp:all" );
+		
+		if ( iSearchTarget.CompareF ( KSsdpAll ) == 0 || aSt.CompareF ( KSsdpAll ) == 0 )
+			{
+				return ETrue;
+			}
+		
+		TInt requestedUriIndex = 0;
+		TInt registeredUriIndex = 0;
+		
+		TInt registeredVersion = UPnPStateMachine::CUPnPUtils::ExtractVersionNumber ( iSearchTarget, registeredUriIndex );
+		TInt requestedVersion = UPnPStateMachine::CUPnPUtils::ExtractVersionNumber ( aSt, requestedUriIndex );
+		
+		TPtrC8 registeredUri = iSearchTarget.Left(registeredUriIndex - 1);
+		TPtrC8 requestedUri = aSt.Left(requestedUriIndex - 1);
+		
+		if ( (registeredUri.CompareF(requestedUri) == 0) && (requestedVersion <= registeredVersion))
+			{
+				return ETrue;
+			}
+		return KErrNotFound;
+		}
+
+	const Messages::TNodeCtxId& Originator () const
+		{
+		return iOriginator;
+		}
+	const TDesC8& SearchTarget() const
+		{
+		return iSearchTarget;
+		}
+	private:
+	RBuf8					iSearchTarget;
+	Messages::TNodeCtxId	iOriginator;
+	};
+
+typedef RArray < CSearchTarget* > CSearchTargetArray;
+class CUPnPProtocolIntfBase;
+
+NONSHARABLE_CLASS ( CSendElement ) : public CBase
+	{
+	public:
+	enum TSendType
+		{
+		EMSearchRequest =0,
+		ENotifyAliveRequest,
+		ENotifyByeRequest,
+		EMSearchResponse
+		};
+	CSendElement ( TSendType aType, CMessage& aMessage, const TAppProtAddr& aAddr )
+	: iMessage ( &aMessage ),
+	iType ( aType )
+	{
+	iSockAddr.SetAddress ( aAddr.iAddr );
+	iSockAddr.SetPort ( aAddr.iPort );
+	}
+
+	~CSendElement ()
+	{
+	delete iMessage;
+	}
+
+	CMessage* Message ()
+	{
+	return iMessage;
+	}
+	TSendType Type () const
+	{
+	return iType;
+	}
+
+
+	public:
+	CMessage* 	iMessage;
+	TSendType 	iType;
+	TInetAddr	iSockAddr;
+	};
+
+
+typedef RArray < CSendElement* > CSendElements;
+
+NONSHARABLE_CLASS ( CHttpUdpFlow ) : public CUPnPFlowBase,
+									 public MSocketHandlerObserver,
+									 public MComposerObserver,
+						 			 public MParserObserver,
+						 			 public MUPnPTimerObserver
+	{
+	friend class CUPnPFlowFactory;
+
+	public:
+	static CHttpUdpFlow* NewL ( CSubConnectionFlowFactoryBase& aFactory,
+								CUPnPProtocolIntfBase* aProtocolIntf,
+						  		const Messages::TNodeId& aSubConnId );
+	~CHttpUdpFlow ();
+
+	private:
+
+	CHttpUdpFlow ( CSubConnectionFlowFactoryBase& aFactory,
+					CUPnPProtocolIntfBase* aProtocolIntf,
+					const TNodeId& aSubConnId );
+
+	void ConstructL ();
+
+	protected:
+	// From CSubConnectionFlowBase
+	virtual void ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage );
+
+
+	// From MSocketHandlerObserver
+	virtual void OpenComplete ( RInternalSocket& aSocket );
+	inline virtual void ConnectComplete ();
+	inline virtual void AcceptComplete ( RInternalSocket& aSocket );
+	inline virtual void SendComplete ( TInt aLength );
+	virtual void SendToComplete ( TInt aLength );
+	inline virtual void RecvComplete ( RMBufChain& aData );
+	virtual void RecvFromComplete ( RMBufChain& aData, const TSockAddr& aAddr );
+//	virtual void IoctlComplete ();
+	inline virtual void Error ( TOperation aOperation, TInt aError  );
+
+	// From MComposerObserver
+	virtual void MessageDataReadyL ( RBuf8& aData );
+	virtual void ComposingConcluded ();
+	virtual void ComposerError ( TInt aError );
+
+	// From MUPnPTimerObserver
+	virtual void TimeOut ();
+	
+	// From MParserObserver
+	virtual void GotHeaders ();
+	inline virtual void GotBodyData ();
+	inline virtual void DataParsed();
+	virtual void ParsingComplete ( RMemChunk& aExcessData );
+	virtual void ParserError ( TInt aError );
+
+	// ------------------------------------
+	// The below functions should be moved to a common class. There are some in
+	// HTTP server/flow as well
+	TInt GetHeaderValue ( const CResponse& aResponse, TInt aFieldIndex, THTTPHdrVal& aFieldVal, const TStringTable& aTable );
+	TInt GetParamValue ( const CResponse& aResponse, TInt aFieldIndex, TInt aParamIndex, THTTPHdrVal& aParamVal, const TStringTable& aTable );
+	TInt IsHeaderPresent ( const CResponse& aResponse, TInt aFieldIndex, const TStringTable& aTable );
+	TInt IsValidCacheControlHeader ( const CResponse& aResponse );
+	void SetHeaderValueL ( RHTTPHeaders& aHdr, TInt aFieldIndex, const TDesC8& aFieldVal, const TStringTable& aTable );
+	void SetMaxAgeHeaderValueL ( TInt aMaxAgeVal, RHTTPHeaders aHeaders );
+	TBool IsContentLengthZero ( const CResponse& aResponse );
+
+	// ------------------------------------
+
+	TInt ValidateSearchResponse ();
+	void StartRecv ();
+	void NotifyClientsL ();
+	void ReadResponseValues ( TInt& aMaxAge, RStringF& aLocation, RStringF& aUsn, RStringF& aST );
+	void HandleSearchRequestL ( TNodeCtxId aChannelId, TUpnpMessage::TUPnPSearchRequest& aMessage );
+	void HandleStopSearch ( TNodeCtxId aChannelId );
+
+	void HandleSearchResponseL ( TUpnpMessage::TUPnPSearchResponse& aMessage );
+	void HandlePublishAliveRequestL ( TUpnpMessage::TUPnPPublishAliveRequest& aMessage );
+	void HandlePublishByeRequestL ( TUpnpMessage::TUPnPPublishByeRequest& aMessage );
+	CRequest& CreatePublishRequestLC ();
+
+	void SendIfOneElement ();
+	void HandleSendElement ();
+	void IncrementSendCount();
+	void StartSendTimer();
+	inline TInt IsMSearchOrAliveRequest(); 
+	
+	void CreateSendTimerL();
+	void CreateSocketL ();
+	CSendElement::TSendType RemoveFirstSendElement ();
+
+	TInt FindSearchTarget ( TNodeCtxId& aId );
+
+	TBool IsSocketCreated () const
+		{
+		return iSocketCreated;
+		}
+private:
+	RInternalSocket			iSocket;
+	RSocketHandler			iSocketHandler;
+	CSocketOpener* 			iSocketOpener;
+	CSearchTargetArray		iSearchTargetArray;
+	CUpnpResponseParser* 	iResponseParser;
+	CUpnpRequestComposer* 	iRequestComposer;
+	CUpnpResponseComposer* 	iResponseComposer;
+
+	CHeaderCodec*			iCodec;
+	CResponse*				iUPnPResponse; // Used for parsing the search response
+	CSendElements			iSendElements;
+	TBool					iSocketCreated;
+	
+	RMBufChain				iBackupData;
+	TInt 					iSendCount;
+
+	TNodeCtxId				iLastLeavingClient;
+	TBool					iIsLeaving;
+	TBool					iSendFlag;
+	TBool					iIsComposeCompleted;
+	
+	RStringPool				iStringPool;
+	
+	CUPnPTimer*			    iSendTimer;
+	
+	};
+
+
+void CHttpUdpFlow::ConnectComplete ()
+	{
+	// We don't handle this
+	}
+
+void CHttpUdpFlow::AcceptComplete ( RInternalSocket& /* aSocket */ )
+	{
+	// We don't handle this
+	}
+
+void CHttpUdpFlow::SendComplete ( TInt /* aLength */ )
+	{
+	}
+
+void CHttpUdpFlow::RecvComplete ( RMBufChain& /* aData */ )
+	{
+	// We don't handle this
+	}
+
+void CHttpUdpFlow::Error ( TOperation /*aOperation*/, TInt /*aError*/  )
+	{
+
+	}
+
+void CHttpUdpFlow::GotBodyData ()
+	{
+	ASSERT (0);
+	}
+
+void CHttpUdpFlow::DataParsed()
+	{
+	// We shouldn't come here. Corrupt message
+	StartRecv ();
+	}
+
+TInt CHttpUdpFlow::IsMSearchOrAliveRequest()
+	{
+	return ((iSendElements[0]->iType == CSendElement::EMSearchRequest) || (iSendElements[0]->iType == CSendElement::ENotifyAliveRequest));
+	}
+
+
+#endif // __HTTPUDPFLOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpflowbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,100 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPFLOWBASE_H_
+#define __UPNPFLOWBASE_H_
+
+//System Includes
+#include <comms-infras/ss_subconnflow.h>
+#include <comms-infras/ss_flowbinders.h>
+#include <comms-infras/ss_protflow.h>
+#include <ss_fact.h>
+
+using namespace ESock;
+using namespace Messages;
+
+enum TFlowType
+	{
+	EHttpClientFlow,
+	EHttpServerFlow,
+	EHttpUdpFlow,
+	EHttpMUdpFlow,
+	};
+
+// control channel message option flags
+struct TCHMessageOption
+	{
+//	public:
+	TCHMessageOption()
+	: iId(0),
+	iValue(0)
+	{
+	}
+
+	TCHMessageOption ( TUint aId, TInt aValue )
+	: iId ( aId ),
+	iValue ( aValue )
+	{
+	}
+
+	TUint iId;
+	TInt  iValue;
+	};
+
+
+
+class CUPnPFlowBase: public CSubConnectionFlowBase
+	{
+	friend class CUPnPFlowFactory;
+public:
+	inline TUint FlowType();
+
+//From CSubConnectionFlowBase
+	//virtual TInt ReceivedL(TCFSignatureBase& aCFMessage);
+ 	inline virtual MFlowBinderControl* DoGetBinderControlL();
+protected:
+	CUPnPFlowBase( CSubConnectionFlowFactoryBase& aFactory, CProtocolIntfBase* aProtocolIntf, TFlowType aFlowType, const TNodeId& aSubConnId );
+	virtual ~CUPnPFlowBase();
+	void AddControlClientL ( const TNodeId& aId );
+	TInt RemoveControlClient ( TInt aIndex );
+	TInt FindControlClient ( const TNodeId& aId );
+	TInt CountControlClients ( );
+	void SetClientLeaving ( const TNodeId& aId );
+	TBool IsClientLeaving ( const TNodeId& aId );
+	TBool CheckIfAllClientsLeaving ( );
+	void PostDataClientStopped ( TNodeCtxId aChannelId );
+
+protected:
+	TFlowType iFlowType;
+	RArray<RNodeInterface>		iClients;
+	};
+
+TUint CUPnPFlowBase::FlowType()
+	{
+	return iFlowType;
+	}
+
+MFlowBinderControl* CUPnPFlowBase::DoGetBinderControlL()
+	{
+	//Not supported.
+	ASSERT(0);
+	MFlowBinderControl *aBinderControl = NULL;
+	return aBinderControl;
+ 	}
+
+#endif // UPNPFLOWBASE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpflowfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPFLOWFACTORY_H_
+#define __UPNPFLOWFACTORY_H_
+
+
+#include <comms-infras/ss_subconnflow.h>
+#include "upnppint.h"
+
+using namespace ESock;
+
+
+class CUPnPFlowFactory : public CSubConnectionFlowFactoryBase
+/**
+Factory for creating CUPnP(TCP/UDP)Flow objects.
+*/
+	{
+public:
+	// ECOM interface implementation ID
+	static const TInt iUid = 0x2000D05A;
+	   	
+   	static CUPnPFlowFactory* NewL(TAny* aConstructionParameters);
+	~CUPnPFlowFactory();
+	
+private:
+	CUPnPFlowFactory(TUid aFactoryId,CSubConnectionFlowFactoryContainer& aParentContainer);
+	void ConstructL();
+	
+	// from CSubConnectionFlowFactoryBase
+	CProtocolIntfFactoryBase* CreateProtocolIntfFactoryL(CProtocolIntfFactoryContainer& aParentContainer);
+	virtual ACommsFactoryNodeId* DoFindOrCreateObjectL(TFactoryQueryBase& aQuery);
+	virtual CSubConnectionFlowBase* DoCreateFlowL(CProtocolIntfBase* aProtocolIntf, TFactoryQueryBase& aQuery);
+	
+	CSubConnectionFlowBase* CreateL ( TFactoryQueryBase& aQuery );
+	};
+
+#endif //UPNPFLOWFACTORY_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnplog.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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 __UPNPLOG_H_
+#define __UPNPLOG_H_
+
+#include <comms-infras/ss_log.h>
+#include <comms-infras/ss_logext.h>
+
+__FLOG_STMT(_LIT8(KSubsysHttpClntTrans,"HTTPClntTrans");)
+__FLOG_STMT(_LIT8(KSubsysMUDPFlow,"HTTPMUDPFlow");)
+__FLOG_STMT(_LIT8(KSubsysHttpServer,"HTTPServer");)
+__FLOG_STMT(_LIT8(KSubsysHttpSrvrFlow,"HTTPServerFlow");)
+__FLOG_STMT(_LIT8(KSubsysHttpClntFlow,"HTTPClientFlow");)
+__FLOG_STMT(_LIT8(KSubsysHttpSrvrHndlr,"HTTPSrvrHndlr");)
+__FLOG_STMT(_LIT8(KSubsysHttpUDPFlow,"HTTPUDPFlow");)
+__FLOG_STMT(_LIT8(KSubsysSPNewSrvcRegActivity,"SPSrvcReg");)
+__FLOG_STMT(_LIT8(KSubsysSPSubsTimerActivity,"SPSubsTimer");)
+__FLOG_STMT(_LIT8(KSubsysSPCprSts,"SPCprSts");)
+__FLOG_STMT(_LIT8(KSubsysSPRootDeviceInfoReqActivity,"SPRootDvcInfoReq");)
+__FLOG_STMT(_LIT8(KSubsysSPDeftScprStates,"SPDeftScptSts");)
+__FLOG_STMT(_LIT8(KSubsysSPScpr,"UPnPSPScpr");)
+__FLOG_STMT(_LIT8(KSubsysCtrlScpr,"UPnPCtrlScpr");)
+
+__FLOG_STMT(_LIT8(KSubsysSPServiceReqInfoActivity,"SPServcReqInf");)
+__FLOG_STMT(_LIT8(KSubsysSPClntFlowCreationActivity,"SPClntFlowCreate");)
+__FLOG_STMT(_LIT8(KSubsysSPEventNotifyActivity,"SPEventNotify");)
+__FLOG_STMT(_LIT8(KSubsysSPSrvcRegActivity,"SPSrvcReg");)
+__FLOG_STMT(_LIT8(KSubsysSPDeviceRegActivity,"SPDeviceReg");)
+__FLOG_STMT(_LIT8(KSubsysSPScprSts,"SPScprSts");)
+
+__FLOG_STMT(_LIT8(KSubsysSearchActivity,"CPSearch");)
+__FLOG_STMT(_LIT8(KSubsysRegNotifyActivity,"CPRegNotify");)
+__FLOG_STMT(_LIT8(KSubsysDescribeActivity,"CPDescribe");)
+__FLOG_STMT(_LIT8(KSubsysSubscribeActivity,"CPSubscribe");)
+__FLOG_STMT(_LIT8(KSubsysUnSubscribeActivity,"CPUnSubscribe");)
+__FLOG_STMT(_LIT8(KSubsysEventNotifyActivity,"CPEventNotify");)
+__FLOG_STMT(_LIT8(KSubsysBaseActivity,"UPnPBaseActivity");)
+__FLOG_STMT(_LIT8(KSubsysCtrlScprSts,"UPnPCtrlScprSts");)
+
+
+#endif /*UPNPLOG_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpmemoryutils.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,35 @@
+/*
+* 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 UPNPMEMORYUTILS_H_
+#define UPNPMEMORYUTILS_H_
+
+#include <e32base.h>
+#include <rmemchunk.h>
+#include <es_mbuf.h>
+#include <comms-infras/mbufchain.h>
+
+class TUPnPMemoryUtils
+	{
+	public:
+		static TInt TUPnPMemoryUtils::CreateMemChunk(RMemChunk& aMemChunk, RMBufChain& aData, RMemoryAllocator& aAllocator);
+		static TInt TUPnPMemoryUtils::CreateMBuf(RMBufChain& aBufChain, RMemChunk& aData);
+	};
+
+
+#endif /*UPNPMEMORYUTILS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnppint.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,81 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPPINT_H_
+#define __UPNPPINT_H_
+
+#include <comms-infras/ss_protflow.h> 
+#include <comms-infras/ss_nodemessages.h> 
+#include <cchunkmanager.h>
+#include "cprotocolhandler.h"
+#include "genericcontainer.h"
+
+class CUPnPProtocolIntfBase;
+class CUPnPProtocolIntfFactory : public ESock::CProtocolIntfFactoryBase
+/**
+UPnP Protocol-Interface Factory
+*/
+	{		
+public:	
+	static CUPnPProtocolIntfFactory* CUPnPProtocolIntfFactory::NewL(TUid aFactoryId, ESock::CProtocolIntfFactoryContainer& aParentContainer);					
+protected:
+	CUPnPProtocolIntfFactory(TUid /*aFactoryId*/, ESock::CProtocolIntfFactoryContainer& /*aParentContainer*/);
+	
+	//from CProtocolIntfFactoryBase
+	virtual ESock::CProtocolIntfBase* DoCreateProtocolIntfL(ESock::TFactoryQueryBase& aQuery);
+	};
+
+
+// ==========================================================================================
+/** Base Class for implementing UPnP Protocol Interfaces.
+*/
+
+class CHttpServer;
+class CUPnPProtocolIntfBase : public ESock::CProtocolIntfBase
+	{	
+public:
+	static CUPnPProtocolIntfBase * NewL(ESock::CProtocolIntfFactoryBase& aFactory, const Messages::TNodeId& aId);
+	virtual ~CUPnPProtocolIntfBase();	
+	void AddServiceUriL ( const TDesC8& aUri, MHttpEventObserver& aObserver,  Messages::TNodeCtxId aServiceId, Messages::TNodeCtxId aControlProviderId );
+	void RemoveServiceUri ( const TDesC8& aUri,  Messages::TNodeCtxId aServiceId, Messages::TNodeCtxId aControlProviderId );
+	const Messages::TNodeId& GetAppProtIntfContainerId();
+	void SetChunkManager(CChunkManager* aChunkManager);
+	CChunkManager* GetMemoryChunkManager();
+protected:
+	// from CProtocolIntfBase
+	CUPnPProtocolIntfBase(ESock::CProtocolIntfFactoryBase& aFactory, const Messages::TNodeId& aId);
+	void ConstructL();
+	inline void DoFlowCreated(ESock::CSubConnectionFlowBase& aFlow);
+	inline void DoFlowBeingDeleted(ESock::CSubConnectionFlowBase& aFlow);
+		
+private:
+	CHttpServer*			iHttpServer;
+	CChunkManager*  		iMemChunkManager;
+	CAppProtIntfFactoryContainer* iAppProtIntfFactoryContainer;
+	};
+
+void CUPnPProtocolIntfBase::DoFlowCreated ( ESock::CSubConnectionFlowBase& /*aFlow*/ )
+	{
+	}
+
+void CUPnPProtocolIntfBase::DoFlowBeingDeleted ( ESock::CSubConnectionFlowBase& /*aFlow*/ )
+	{	
+	}
+
+
+#endif //UPNPPINT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpserverconstants.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,92 @@
+// 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 __UPNPSERVERCONSTANTS_H_
+#define __UPNPSERVERCONSTANTS_H_
+
+#include <in_sock.h>
+
+_LIT8(KXmlMimeType, "text/xml");
+_LIT8(KBody,"Body");
+_LIT8 ( KSoapFieldSeparator, "\n");
+_LIT8 ( KNotFound, "Not Found" );
+_LIT8 ( KUPnPCodecName, "HTTP/UPnP" );
+
+// These should be moved to the string table
+_LIT8 ( KSsdpAlive, "ssdp:alive" );
+_LIT8 ( KSsdpBye, "ssdp:byebye" );
+_LIT8 ( KSsdpAll, "ssdp:all" );
+_LIT8 ( KSsdpDiscover, "\"ssdp:discover\"");
+_LIT8 ( KSearchUri, "*" );
+_LIT8 ( KSeperator, "::" );
+_LIT8 ( KMultiCastAddr, "239.255.255.250:1900" );
+_LIT8 ( KRootDevice, "upnp:rootdevice" );
+_LIT8 ( KColon, ":" );
+_LIT8 ( KUnderScore, "_" );
+_LIT8 ( KUrnService, "urn:upnp-org:serviceId:" );
+_LIT8 ( KUrnSchema, "urn:schemas-upnp-org" );
+_LIT8 ( KHttpScheme, "http://" );
+
+_LIT(KUuidString,   "uuid:");
+
+const TUint KIPv6HostOpenBrace = '[';
+const TUint KIPv6HostCloseBrace = ']';
+
+const TUint KIdentifiersLen = sizeof ( TInt );
+
+// Option names. Used for Get & Set options from the socket.
+/*
+Set the absolute URI
+*/
+const TUint KCHAbsoluteUri = 1;		// Note ! dont use 1 it is KSOLSocket used by TCP
+
+/*
+The maximum receive length that is expected. When it is called with GetOpt
+it can return KErrUnknown otherwise a valid length
+*/
+const TUint KCHMaxLength = 2;
+
+/*
+The message is last or not
+*/
+const TUint KCHLastMessage = 3;
+
+/*
+Option level --- Always 0.
+*/
+const TUint KCHOptionLevel = 0; // Always 0.
+
+
+const TUint KFirstRegistration = 1;
+const TInt KSubscriptionCleanupFrequency = 1000000;
+
+/* Udp Upnp Multicast Port*/
+const TUint	KUpnpMCPort = 1900;
+/* Udp Upnp Port Number; [REF] DLNA Requirement-7.2.3.4 */
+const TUint	KUpnpUdpPort = 1025;
+const TInt KInvalidSeqStatusCode = 610;
+const TInt KRequestTimeoutStatusCode = 408;
+const TInt KRootDeviceRepublishFrequency = 605436607; // rounded-conversion of 600seconds to clockticks
+
+const TUint32 KCacheControl = 1800;
+const TUint32 KSsdpMulticastAddr = INET_ADDR ( 239, 255, 255, 250 );
+const TInt KPreConditionFailedStatusCode = 412;
+const TInt KOkStatusCode = 200;
+
+
+const TInt KMajorVersion = 1;
+const TInt KMinorVersion = 1;
+
+#endif /*UPNPSERVERCONSTANTS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/chttpclienthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,744 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+// System includes
+#include <es_sock.h>
+
+
+#include <http/thttptable.h>
+#include <httpstringconstants.h>
+#include <httperr.h>
+#include <utf.h>
+#include <inetprottextutils.h>
+#include <upnp/tupnptable.h>
+
+// Local includes
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+#include "chttpclienthandler.h"
+#include "upnpmemoryutils.h"
+
+
+const TUint KInactivityTimeOutVal = 60000000; // 60secs, DLNA Requirements [7.2.8.7]
+
+__FLOG_STMT(_LIT8(KComponent,"Flow");)
+
+//
+CHTTPClientTransaction* CHTTPClientTransaction::NewL ( CHeaderCodec& aCodec, RStringPool& aStringPool, TNodeCtxId aNodeCtxId )
+	{	
+	CHTTPClientTransaction* self = new ( ELeave ) CHTTPClientTransaction ( aNodeCtxId );
+    CleanupStack::PushL ( self );
+    self->ConstructL ( aCodec, aStringPool );
+    CleanupStack::Pop ( self );
+	return self;
+	}
+
+CHTTPClientTransaction::CHTTPClientTransaction ( TNodeCtxId aNodeCtxId )
+	:CTransaction ( ), iNodeCtxId ( aNodeCtxId ), iComposingStarted ( EFalse )
+	{	
+	}
+
+CHTTPClientTransaction::~CHTTPClientTransaction ( )
+	{	
+	RemoveAllBodyParts ( );
+	}
+
+
+//
+CHTTPClientHandler* CHTTPClientHandler::NewL ( MHttpEventObserver& aObserver, CChunkManager* aChunkMgr, TSockAddr* aAddr )
+	{	
+	CHTTPClientHandler* self = new ( ELeave ) CHTTPClientHandler ( aObserver, aChunkMgr, aAddr );
+	CleanupStack::PushL ( self );
+	self->ConstructL ( );
+	CleanupStack::Pop ( self );
+	return self;
+	}
+
+CHTTPClientHandler::CHTTPClientHandler ( MHttpEventObserver& aObserver, CChunkManager* aChunkMgr, TSockAddr* aAddr )
+	: CProtocolHandler ( ), iObserver ( aObserver )
+	{
+	if ( aAddr )
+		iRemoteAddr = *aAddr;
+	iFlags = 0;
+	iFirstTrans = ETrue;
+	SetSocketIdle ( );
+	iAllocator.SetChunkManager(aChunkMgr);
+	SetComposerIdle ( );
+	SetParserIdle ( );
+	SetReq100Continue ( EFalse );
+	}
+
+void CHTTPClientHandler::ConstructL ( )
+	{
+	CProtocolHandler::ConstructL ();
+	iComposer = CUpnpRequestComposer::NewL ( *this );
+	iParser = CUpnpResponseParser::NewL ( *this );
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("Created CHTTPClientHandler")));
+	}
+
+CHTTPClientHandler::~CHTTPClientHandler ( )
+	{	
+	CloseLink ( );
+	delete iComposer;
+	delete iParser;
+	if ( !iExcessData.IsEmpty() )
+		iExcessData.Free ( );
+	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("Deleted CHTTPClientHandler")));
+	}
+
+CTransactionWrapper* CHTTPClientHandler::GetTransactionWrapperL ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::GetTransactionWrapperL")));
+	return new (ELeave ) CTransactionWrapper ( iTransactions );
+	}
+
+void CHTTPClientHandler::SetConnectionInfo ( TSockAddr& aAddr )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::SetConnectionInfo")));
+	iRemoteAddr = aAddr;
+	if ( !SocketIdle ( ) )
+		{
+		// socket is connected & there is no network traffic. This happens only when pipelining is enabled
+		// Flow can call this API inorder to reuse. so connection is no longer useful, close it.
+		CloseLink ( );
+		}
+	}
+
+void CHTTPClientHandler::SubmitTransaction ( CTransaction* aTransaction )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::SubmitTransaction")));
+	TInt pos = FindTransaction ( aTransaction );
+	TInt err = KErrNone;
+
+	if ( KErrNotFound == pos )
+		{
+		TRAP_IGNORE ( iTransactions.Append ( aTransaction ) );
+		}
+
+	// Set data supplier for body
+	CRequest* request = aTransaction->Request ( );
+	request->AddBody ( this );
+	
+	err = OpenLink ( );
+	if ( err != KErrNone ) // memory failures
+		{
+		NotifyPendingTransactions ( err );
+		CloseLink ( );
+		}
+	else
+		{
+		ProcessPendingTransactions ( iTransactions.Count () - 1 );
+		iTimer->StopTimer ();
+		}			
+	}
+
+
+void CHTTPClientHandler::NotifyNewRequestBodyData ( CTransaction* aTransaction, RMBufChain& aData )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::NotifyNewRequestBodyData")));
+	
+	// CheckToNotifyNewBodyPart
+	CHTTPClientTransaction* ctrans = static_cast<CHTTPClientTransaction*> ( CurrentTransaction ( ) );
+	TInt availableBufCount = ctrans->BodyParts( ).NumBufs ( );
+	TInt currentPartId = ctrans->RequestPartIdx( );
+
+	if ( currentPartId == availableBufCount )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("New Body part is added")));
+
+		// all available parts are send, and a new one is just added
+		// notify waiting upnp message composer
+		iComposer->NotifyNewBodyData( );
+		}
+	
+	aTransaction->AddBodyPart( aData );
+	}
+
+void CHTTPClientHandler::CancelTransaction ( CTransaction* aTransaction )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CancelTransaction")));
+	TInt reqPos = FindTransaction ( aTransaction );
+	__ASSERT_DEBUG ( reqPos != KErrNotFound, User::Invariant ( ) );
+
+	// Cleanup response headers
+	aTransaction->Response( )->Handle( ).GetHeaderCollection ( ).RemoveAllFields ( );	
+	RemoveTransaction ( reqPos );
+		
+	CHTTPClientTransaction* trans = static_cast<CHTTPClientTransaction*>( aTransaction );	
+	if ( trans->ComposingStarted () )
+		{	
+		ResetTransactions (); // until request positions.
+		iComposer->ResetComposer ();
+		iParser->ResetParser ();
+		
+		ReOpenLink ();
+		}
+	}
+
+CTransaction* CHTTPClientHandler::CurrentTransaction ( ) const
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CurrentTransaction")));
+	__ASSERT_DEBUG ( iTransactions.Count ( ) > 0, User::Invariant ( ) );
+	return iTransactions[0];
+	}
+
+void CHTTPClientHandler::ProcessPendingTransactions ( TInt aNextTransIdx )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::ProcessPendingTransactions")));
+	if ( HasPendingTransactions () && CanPipeLine () )
+		{
+		StartComposer ( iTransactions[aNextTransIdx] );
+		}
+	}
+
+TInt CHTTPClientHandler::OpenLink ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::OpenLink")));
+	TInt err = KErrNone;
+
+	if ( HasPendingTransactions ( ) && SocketIdle ( ) )
+		{
+		TRAP ( err, OpenSocketL ( KAfInet, KSockStream, KProtocolInetTcp ) );
+		if ( err != KErrNone )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::OpenLink - Returned with error %d"), err));
+			return err;
+			}
+		ResetSocketIdle ( );
+		}
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::OpenLink - Returned with error %d"), err));
+	return err;
+	}
+
+void CHTTPClientHandler::OpenSocketL ( TUint aAddrFamily, TUint aSockType, TUint aProtocol )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::OpenSocketL")));
+	if ( NULL == iSocketOpener )
+		{
+		iSocketOpener = CSocketOpener::NewL ( *this );
+		}
+	iSocketOpener->MakeSocket ( aAddrFamily, aSockType, aProtocol );
+	}
+
+void CHTTPClientHandler::MakeConnection ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::MakeConnection")));
+	iSocketHandler.Connect ( iRemoteAddr );
+	}
+
+void CHTTPClientHandler::StartComposer ( CTransaction* aTransaction )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::StartComposer")));
+	if ( ComposerIdle ( ) )
+		{ 
+		ResetComposerIdle ( );
+		
+		CHTTPClientTransaction* ctrans = static_cast<CHTTPClientTransaction*>( aTransaction );		
+				
+		SetReq100Continue ( CheckFor100ContinueHeader ( * ( aTransaction->Request () ) ) );
+		ctrans->SetComposingStarted ( ETrue );
+ 		iComposer->ComposeRequest ( aTransaction->Request () ); 		
+		}
+	}
+
+void CHTTPClientHandler::StartParser ( CTransaction* aTransaction, RMemChunk& aData )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::StartParser")));
+	
+	ResetParserIdle ( );
+	
+	iParser->ParseResponse ( aData, aTransaction->Response ( ) );
+	}
+
+void CHTTPClientHandler::CloseLink ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CloseLink")));
+	if ( iSocketOpener )
+ 		{
+ 		delete iSocketOpener;
+ 		iSocketOpener = NULL;
+ 		}
+
+ 	// Cancel all socket operations
+	iSocketHandler.CancelAll ( );
+	iSocket.Close ( );
+
+	iFlags = 0;
+	iFirstTrans = ETrue;
+	SetSocketIdle ( );
+	SetComposerIdle ( );
+	SetParserIdle ();
+	SetReq100Continue ( EFalse );
+	}
+
+TBool CHTTPClientHandler::CheckForConnectionPersistence ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence")));
+	CResponse* response = CurrentTransaction( )->Response ( );
+	TVersion version = response->Version( );
+
+	if ( version.iMajor == 1 && version.iMinor == 0 )
+		{ // non-persistent
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - HTTP v1.0 in use. Connection is non-persistant")));
+		return EFalse;
+		}
+
+	const RStringPool& strP = response->StringPool ( );
+    RStringF name = strP.StringF ( HTTP::EConnection, THTTPTable::Table() );
+    RHTTPHeaders headers = response->Handle( ).GetHeaderCollection ( );
+    THTTPHdrVal value;
+
+	if ( version.iMajor == 1 && version.iMinor == 1 )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - HTTP v1.1 in use")));
+		// Check for Connection: close header
+		if ( headers.GetField ( name, 0, value ) == KErrNone &&
+				value.Type ( ) == THTTPHdrVal::KStrFVal &&
+				value.StrF ( ).Index ( THTTPTable::Table() ) == HTTP::EClose )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - Connection: Close found")));
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - Connection is non-persistant")));
+           	// Connection header has "close" value, non-persistent
+           	return EFalse;
+           	}
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - Connection is persistant")));
+        // connection is non-persistent
+		return ETrue;
+		}
+	// else HTTP 1.x
+	if ( headers.GetField ( name, 0, value ) == KErrNone &&
+			value.Type ( ) == THTTPHdrVal::KStrFVal &&
+    		value.StrF ( ).Index ( THTTPTable::Table() ) == HTTP::EKeepAlive )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - HTTP v1.x in use")));
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - Connection:: Keep-Alive found")));
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - Connection is persistant")));
+       	// Connection header has "keep-alive" value, persistent
+       	return ETrue;
+        }
+
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckForConnectionPersistence - Connection is non-persistant")));
+    // non-persistent
+	return EFalse;
+	}
+
+TBool CHTTPClientHandler::CheckFor100ContinueHeader ( CRequest& aRequest )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::CheckFor100ContinueHeader")));
+	
+	TBool value = EFalse;
+	if ( aRequest.Method ( ).Index ( THTTPTable::Table() ) == HTTP::EPOST
+		|| aRequest.Method ( ).Index ( TUPnPTable::Table() ) == UPnP::EMPost )
+		{
+    	const RStringPool& strP = aRequest.StringPool ( );
+
+    	// Check for Except: 100-continue header
+    	RStringF name = strP.StringF ( HTTP::EExpect, THTTPTable::Table() );
+    	THTTPHdrVal hdrValue;
+		RHTTPHeaders headers = aRequest.Handle( ).GetHeaderCollection ( );
+
+    	if ( headers.GetField ( name, 0, hdrValue ) == KErrNone  && hdrValue.Type ( ) == THTTPHdrVal::KStrFVal )
+			{
+        	// what's the value?
+    		if( hdrValue.StrF ( ).Index ( THTTPTable::Table() ) == HTTP::E100Continue )
+				{
+            	// Expect header has a value of 100-continue
+            	value = ETrue;
+            	}
+			}
+		}
+	
+	return value;
+	}
+
+ void CHTTPClientHandler::NotifyPendingTransactions ( TInt aError )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::NotifyPendingTransactions")));
+	TInt ii = iTransactions.Count ( );
+
+	while ( ii > 0 )
+		{
+		// Notify waiting transaction of the error
+		THTTPEvent event ( aError );
+		iObserver.OnHttpEvent ( iTransactions[--ii], event );
+		}
+
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::NotifyPendingTransactions - Pending transaction queue has been reset")));
+	// Reset the pending transaction queue.
+	iTransactions.Reset ( );
+	}
+
+
+// MSocketHandler
+void CHTTPClientHandler::OpenComplete ( RInternalSocket& aSocket )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::OpenComplete")));
+	iSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+
+	if ( HasPendingTransactions ( ) )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::OpenComplete - Pending transactions found")));
+		MakeConnection ( );
+		}
+	else
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::OpenComplete - Found no pending transactions")));
+		CloseLink ( );
+		}
+	}
+
+void CHTTPClientHandler::ConnectComplete ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::ConnectComplete")));
+	if ( HasPendingTransactions ( ) )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::ConnectComplete - Pending transactions found")));
+		StartComposer ( CurrentTransaction ( ) );
+		}
+	else
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::ConnectComplete - Found no pending transactions")));
+		CloseLink ( );
+		}
+	}
+
+void CHTTPClientHandler::SendComplete ( TInt /*aLength*/ )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::SendComplete")));
+	// Handle 100-continue
+	if ( Request100Continue () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::SendComplete - Expect: 100-Continue found")));
+		
+		// headers sent to server. before sending body, read socket for 100-continue response
+		iSocketHandler.Recv ();
+		SetReadTriggered ();
+		
+		SetReq100Continue ( EFalse );
+		}
+    else
+    	{
+    	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::SendComplete - Expect: 100-Continue not found")));
+    	
+		iComposer->RequestDataSent ( ); // enables composer to release send data chain
+    	}
+	}
+
+void CHTTPClientHandler::RecvComplete ( RMBufChain& aData )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::RecvComplete")));
+	if ( HasPendingTransactions () )
+		{// Parser should be in Idle state, else something is happening seriously wrong.
+
+		RMemChunk memChunk;
+		TUPnPMemoryUtils::CreateMemChunk(memChunk, aData, iAllocator);
+
+		StartParser ( CurrentTransaction ( ), memChunk );
+		}
+
+	//parser takes ownership of aData, so it can be cleaned-up
+	aData.Free ( );
+
+	ResetReadTriggered ( );
+	}
+
+void CHTTPClientHandler::Error ( TOperation aOperation, TInt aError )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::Error")));
+	switch ( aOperation )
+		{
+		case EOpenByProtocol:
+		case EConnect:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::Error - TOperation::EConnect")));
+			CloseLink ( );
+			NotifyPendingTransactions ( aError );
+			}
+			break;
+
+		case EMBufSend:
+			iComposer->DataSentFailed ();
+		case ERecv:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntTrans, KComponent, _L8("CHTTPClientHandler::Error - TOperation::ERecv")));
+			
+			iComposer->ResetComposer ();
+			iParser->ResetParser ();				
+			CloseLink ( );
+			
+			if ( aError == KErrEof || aError == KErrCancel )
+				{
+				ResetTransactions ();
+				ReOpenLink ();								
+				}
+			else
+				{
+				NotifyPendingTransactions ( aError );
+				}
+			}
+			break;
+
+		default:
+			__ASSERT_DEBUG ( 0, User::Invariant ( ) );
+			break;
+		}
+	}
+
+void CHTTPClientHandler::ResetTransactions ()
+	{	
+	for ( TInt i = 0; i < iTransactions.Count (); i++ )
+		{
+		CHTTPClientTransaction* ctrans = static_cast<CHTTPClientTransaction*>( iTransactions[i] );
+		ctrans->ResetRequestPart ();
+		ctrans->SetComposingStarted ( EFalse );
+		}
+	}
+	
+// MComposerObserver
+void CHTTPClientHandler::MessageDataReadyL ( RBuf8& aData )
+	{
+	RMBufChain data;	//Need to Check
+	data.CreateL(aData);
+	iSocketHandler.Send ( data );
+	SetWriteTriggered ( );
+	}
+
+void CHTTPClientHandler::ComposingConcluded ( )
+	{
+	if ( !ReadTriggered ( ) )
+		{
+		iSocketHandler.Recv ( ); // should call this before compose conclude for 100-continue
+		SetReadTriggered ( );
+		}
+	
+	TInt nextTransId = FindTransaction ( & (iComposer->Request () ) ) + 1;
+	
+	ResetWriteTriggered ( );
+	SetComposerIdle ( );		
+	iComposer->ResetComposer ();
+	
+	if ( nextTransId < iTransactions.Count () )
+		{
+		ProcessPendingTransactions ( nextTransId );
+		}
+	}
+
+void CHTTPClientHandler::ComposerError ( TInt aError )
+	{	
+	// Report there is an Error in the transaction(iCurrentRequest)
+	// and do cleanup, process next transaction or close link
+	TInt pos = FindTransaction ( &(iComposer->Request( )) );
+	__ASSERT_DEBUG ( pos != KErrNotFound, User::Invariant ( ) );
+
+	THTTPEvent event ( aError );
+	iObserver.OnHttpEvent ( iTransactions[pos], event );
+	RemoveTransaction ( pos );
+
+	SetComposerIdle ();
+	iComposer->ResetComposer ();
+	
+	if ( WriteTriggered ( ) ) // request data is half sent to server.
+		{
+		ReOpenLink ();
+		return;
+		}
+	
+	if ( iTransactions[pos] != NULL ) // no request data is sent, process next transaction
+		{
+		StartComposer ( iTransactions[pos] );
+		}
+	}
+
+
+// MParserObserver
+void CHTTPClientHandler::GotHeaders ( )
+	{	
+	// check for connection persistance
+	if ( CheckForConnectionPersistence ( ) )
+		{
+		EnablePipeLining ();		
+		}
+	else
+		{
+		DisablePipeLining ( );
+		}
+
+	// 100-continue status is not notified to clients, but resume composer to send body
+	CResponse* response = CurrentTransaction( )->Response( );
+	if ( response->Status ( ) == HTTPStatus::EContinue )
+		{
+		iComposer->RequestDataSent ( ); // enables composer to send first body part.
+    	}
+    else
+		{
+		THTTPEvent event ( THTTPEvent::EGotResponseHeaders );
+		iObserver.OnHttpEvent ( CurrentTransaction ( ), event);
+		}
+	}
+
+void CHTTPClientHandler::GotBodyData ( )
+	{
+	THTTPEvent event ( THTTPEvent::EGotResponseBodyData );
+	iObserver.OnHttpEvent ( CurrentTransaction ( ), event );
+	}
+
+void CHTTPClientHandler::DataParsed ( )
+	{	
+	if ( HasPendingTransactions ( ) && !ReadTriggered ( ) )
+		{
+		iSocketHandler.Recv ( );
+		SetReadTriggered ( );
+		}
+	
+	if ( ParserIdle () )
+		{		
+		iParser->ResetParser ();
+		}
+	
+	if ( !iExcessData.IsEmpty ( ) )
+		{
+		StartParser ( CurrentTransaction ( ), iExcessData );
+		iExcessData.Free ( );
+		}
+	}
+
+void CHTTPClientHandler::ParsingComplete ( RMemChunk& aExcessData )
+	{	
+	// notify the observer response complete and cleanup it.
+	CTransaction* ctrans = CurrentTransaction ( );
+	RemoveTransaction ( 0 );	
+	THTTPEvent event ( THTTPEvent::EResponseComplete );
+	iObserver.OnHttpEvent ( ctrans, event );
+
+	SetParserIdle ( );
+	
+	//check for pipelining
+	if ( !CanPipeLine ( ) )
+		{
+		// Pipelining is diabled and discard the junk data received
+		aExcessData.Free ();		
+		ReOpenLink ();	
+		}
+	else
+		{
+		if ( iFirstTrans ) // Note, when pipelining is enabled and
+						   // first transaction is completed, composer is waiting to start next transaction
+			{
+			iFirstTrans = EFalse;
+			ProcessPendingTransactions ();
+			}
+		if ( HasPendingTransactions ( ) )
+			{
+			// PipeLining is enabled so next transaction response is received, start parser
+			iExcessData.Assign ( aExcessData );			
+			}
+		else
+			{
+			aExcessData.Free ();
+			iTimer->StartTimer ( KInactivityTimeOutVal );
+			}
+		}
+	}
+
+void CHTTPClientHandler::ParserError ( TInt aError )
+	{	
+	// Report there is an Error in the transaction(0)
+	THTTPEvent event ( aError );
+	iObserver.OnHttpEvent ( CurrentTransaction ( ), event );
+	RemoveTransaction ( 0 );
+	
+	iParser->ResetParser ();
+	ReOpenLink ();
+	}
+
+void CHTTPClientHandler::RemoveTransaction ( TInt aPos )
+	{
+	if ( aPos < iTransactions.Count () )
+		{
+		iTransactions.Remove ( aPos );
+		}
+	}
+
+void CHTTPClientHandler::ReOpenLink ( )
+	{	
+	CloseLink ( );
+	TInt err = OpenLink ( );
+	if ( err != KErrNone )
+		{
+		NotifyPendingTransactions ( err );
+		CloseLink ( );		
+		}
+	}
+
+// From MUPnPTimerObserver
+void CHTTPClientHandler::TimeOut ()
+	{	
+	CloseLink ();
+	}
+
+// From MHttpDataSupplier
+TBool CHTTPClientHandler::GetNextDataPart ( TPtrC8& aDataPart )
+	{	
+	CHTTPClientTransaction* ctrans = static_cast<CHTTPClientTransaction*> ( CurrentTransaction ( ) );
+	ctrans->GetBodyPart( aDataPart );
+	return ctrans->IsLastBodyPart( );
+	}
+
+void CHTTPClientHandler::ReleaseData ( )
+	{	
+	CHTTPClientTransaction* ctrans = static_cast<CHTTPClientTransaction*> ( CurrentTransaction ( ) );
+	ctrans->RemoveBodyPart( );
+
+	// Note! No need for checking NumBufs will crash if Empty, since removeBodyPart
+	// will just increment the requestPartIdx
+
+	// Call NotifyNewBodyData only if currentPartIdx != available MBuf
+	TInt availableBufCount = ctrans->BodyParts( ).NumBufs ( );
+	TInt currentPartId = ctrans->RequestPartIdx( );
+
+	if ( currentPartId != availableBufCount )
+		{
+		iComposer->NotifyNewBodyData( );
+		}
+	else
+		{
+		// ..nothing to do, http message composer should say composing is concluded
+		// or it waits for more data, which should be triggered by clientflow
+		}
+	}
+
+TInt CHTTPClientHandler::OverallDataSize ( )
+	{	
+	CHTTPClientTransaction* ctrans = static_cast<CHTTPClientTransaction*> ( CurrentTransaction ( ) );
+
+	// field or Content-Length
+	TInt dataSize = MHttpMessageParserObserver::ENoBody;
+	// Check is there a Content-Length field?
+	CRequest* request = ctrans->Request ( );
+	RStringF contentLength = request->StringPool ( ).StringF ( HTTP::EContentLength, THTTPTable::Table() );
+	THTTPHdrVal value;
+	TInt err = request->Handle( ).GetHeaderCollection ( ).GetField ( contentLength, 0, value );
+	if ( err == KErrNone )
+		{
+		dataSize = value.Int ( );
+		}
+	return dataSize;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/cprotocolhandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "cprotocolhandler.h"
+
+
+CProtocolHandler::CProtocolHandler ( )
+	:iSocketHandler ( *this )
+	{
+	}
+CProtocolHandler::CProtocolHandler ( RInternalSocket& aSocket)
+: iSocketHandler ( *this ),
+iSocket ( aSocket )
+	{
+		
+	}	
+CProtocolHandler::~CProtocolHandler ( )
+	{
+	iTransactions.Reset ( );
+	// Cancel all socket operations
+	iSocketHandler.CancelAll( );
+	iSocket.Close( );
+	iTimer->StopTimer ();
+	delete iTimer;
+	}
+
+void CProtocolHandler::ConstructL () 
+	{
+	iTimer = CUPnPTimer::NewL ( *this );
+	}
+	
+TInt CProtocolHandler::FindTransaction ( CTransaction* aTransaction ) const
+	{
+    return iTransactions.Find ( aTransaction );
+    }
+    
+TInt CProtocolHandler::FindTransaction ( const CRequest* aRequest ) const
+	{
+	for ( TInt i = 0; i < iTransactions.Count ( ); i++ )
+		{
+		if ( iTransactions[i]->Request ( ) == aRequest )
+			{
+			return i;
+			}
+		}
+	return KErrNotFound;
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/csoapparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,95 @@
+// 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 "csoapparser.h"
+#include "upnpserverconstants.h"
+CSoapParser* CSoapParser::NewL ()
+	{
+	CSoapParser* self = new (ELeave) CSoapParser;
+	CleanupStack::PushL (self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CSoapParser::CSoapParser() 
+	{
+	}
+	
+CSoapParser::~CSoapParser() 
+	{
+	delete iParser;
+	iSoapAction.Close();
+	}
+
+void CSoapParser::ConstructL ()
+	{
+	iParser = CParser::NewL (KXmlMimeType(), *this);
+	iParser->ParseBeginL();	
+	}
+
+void CSoapParser::OnStartElementL(const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/, TInt aErrorCode)
+	{	
+	User::LeaveIfError(aErrorCode);
+	if (aElement.LocalName().DesC().Compare(KBody) == 0)
+		{
+		iInBodySec = ETrue;	
+		return;		
+		}
+	if (iInBodySec && iSoapAction.Length() == 0)
+		{
+		const TChar KHash = '#';
+		const TDesC8& localName = aElement.LocalName().DesC();
+		const TDesC8& uri = aElement.Uri().DesC();	
+
+        iSoapAction.CreateL(uri.Length() + localName.Length() + 1); // 1 for #
+        iSoapAction.Append(uri);
+        iSoapAction.Append(KHash);
+        iSoapAction.Append(localName);
+		}	
+	}
+
+const TDesC8& CSoapParser::SoapAction () const
+	{
+	return iSoapAction;	
+	}
+
+TBool CSoapParser::ParseSoapL(const TDesC8& aBuffer)
+	{
+	const TInt KXmlInputSize = 1024;
+	TInt totalLength = aBuffer.Length();
+	TInt consumedBytes = 0;
+	while(totalLength && iSoapAction.Length() == 0)	
+		{
+		TInt len = (totalLength < KXmlInputSize) ? totalLength : KXmlInputSize;
+		TPtrC8 inputBuffer(aBuffer.Ptr() + consumedBytes, len);
+		iParser->ParseL(inputBuffer);
+		totalLength -= len;
+		consumedBytes += len;
+		}
+	
+	if ( iError != KErrNone )
+		{
+		iParser->ParseEndL();
+		User::Leave(iError);
+		}
+	
+	if ( iSoapAction.Length() > 0 )
+		{
+		iParser->ParseEndL();
+		return ETrue;
+		}
+	return EFalse;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/ctransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,56 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "ctransaction.h"
+
+
+CTransaction* CTransaction::NewL ( CHeaderCodec& aCodec, RStringPool& aStringPool )
+	{
+	CTransaction* self = new ( ELeave ) CTransaction ( );
+    CleanupStack::PushL ( self );
+    self->ConstructL ( aCodec, aStringPool );
+    CleanupStack::Pop ( self );
+	return self;
+	}
+
+CTransaction::CTransaction ( )
+: iDataLeft ( KErrUnknown )
+	{	
+	}
+
+CTransaction::~CTransaction ( )
+	{
+	delete iRequest;
+	delete iResponse;
+	}
+	
+void CTransaction::ConstructL ( CHeaderCodec& aCodec, RStringPool& aStringPool )
+	{
+	iRequest = CRequest::NewL ( aCodec, aStringPool );
+	iResponse = CResponse::NewL ( aCodec, aStringPool );
+	}
+	
+CRequest* CTransaction::Request ( ) const
+	{
+	return iRequest;
+	}
+	
+CResponse* CTransaction::Response ( ) const
+	{
+	return iResponse;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/cupnptimer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,69 @@
+// 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:
+// @internalComponent
+// 
+//
+
+#include "cupnptimer.h"
+
+CUPnPTimer::CUPnPTimer(MUPnPTimerObserver& aObserver) 
+: CActive ( EPriorityStandard ),
+	iObserver ( aObserver )
+	{
+	CActiveScheduler::Add(this);
+	iTimer.CreateLocal();
+	}
+
+CUPnPTimer* CUPnPTimer::NewL(MUPnPTimerObserver& aObserver)
+	{
+	return new (ELeave) CUPnPTimer(aObserver);
+	}
+
+CUPnPTimer::~CUPnPTimer()
+	{
+	Cancel();
+	iTimer.Close();	
+	}
+
+void CUPnPTimer::RunL()
+	{
+	if ( iStatus.Int () == KErrNone )
+		iObserver.TimeOut();
+	}
+
+void CUPnPTimer::DoCancel()
+	{
+	iTimer.Cancel();
+	}
+
+void CUPnPTimer::StartTimer(TTimeIntervalMicroSeconds32 aTimeInterval)
+	{
+	if(!IsActive())
+		{
+		iTimer.After(iStatus, aTimeInterval);	
+		SetActive();
+		}
+	}
+
+void CUPnPTimer::StopTimer()
+	{
+	DoCancel ();
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/genericcontainer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,125 @@
+// 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:
+// @file
+// @internalComponent
+// System Includes
+// 
+//
+
+#include<ss_glob.h>
+#include <ecom/ecom.h>
+#include <appprotintf/app_protintf_msgs.h>
+#include <comms-infras/ss_nodemessages.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+
+//Local Includes
+#include "genericcontainer.h"
+
+
+using namespace ESock;
+using namespace Messages;
+
+
+CAppProtIntfFactoryContainer* CAppProtIntfFactoryContainer::NewL ( )
+	{
+	CAppProtIntfFactoryContainer *factContainer = new ( ELeave ) CAppProtIntfFactoryContainer (  );
+	CleanupStack::PushL(factContainer);
+	factContainer->ConstructL();
+	CleanupStack::Pop(factContainer);
+	return factContainer;
+	}
+
+CAppProtIntfFactoryContainer::CAppProtIntfFactoryContainer ( )
+	{
+	
+	}
+
+void CAppProtIntfFactoryContainer::ConstructL()
+	{
+	TUid destroyUid;
+	if(!iAppProtIntfFactory)
+		{
+		iAppProtIntfFactory = reinterpret_cast<CFactory*>( REComSession::CreateImplementationL(TUid::Uid( KAppProtIntfFactoryUid ), destroyUid ));
+		iAppProtIntfFactory->iDestroyUid = destroyUid;	
+		}
+	}
+
+void CAppProtIntfFactoryContainer::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	CFactoryObject* myFactoryObject = NULL;	
+	const TCFFactory::TFindOrCreatePeer& msg = message_cast<const TCFFactory::TFindOrCreatePeer> ( aMessage );
+	if ( iAppProtIntfFactory )
+		{
+		myFactoryObject = iAppProtIntfFactory->FindOrCreateFactoryObjectL ( *(msg.iQuery) );
+		}
+
+	RClientInterface::OpenPostMessageClose ( NodeId (), aSender, TCFFactory::TPeerFoundOrCreated ( myFactoryObject->Id () ).CRef() ); 
+	}
+
+CFactory::CFactory()
+	{
+	
+	}
+
+CFactory::~CFactory ()
+	{
+	if (iDestroyUid.iUid)
+		{
+		REComSession::DestroyedImplementation(iDestroyUid);
+		}
+	iObjectsList.ResetAndDestroy();
+	}
+	
+CFactoryObject* CFactory::FindFactoryObject ( Factories::MFactoryQuery& aFactoryQuery )
+	{
+	const TAppProtIntfQuery& query = static_cast < const TAppProtIntfQuery& > ( aFactoryQuery );
+	TInt count = iObjectsList.Count();
+	CFactoryObject* obj = NULL;
+	for ( TInt ind = 0; ind < count; ind++ )
+		{
+		if (iObjectsList[ind]->ProtocolType() == query.iProtocol )
+    		obj = iObjectsList[ind];
+		}
+	return obj;
+	}
+	
+CFactoryObject* CFactory::FindOrCreateFactoryObjectL ( Factories::MFactoryQuery& aFactoryQuery )
+	{
+	CFactoryObject* myFactoryObj = FindFactoryObject ( aFactoryQuery );
+	return myFactoryObj ? myFactoryObj : CreateFactoryObjectL ( aFactoryQuery );
+	}
+	
+CFactoryObject* CFactory::CreateFactoryObjectL ( Factories::MFactoryQuery& aFactoryQuery )
+	{
+	CFactoryObject* myFactoryObj = DoCreateFactoryObjectL ( aFactoryQuery );	
+	CleanupStack::PushL ( myFactoryObj );
+	iObjectsList.Append(myFactoryObj);
+	CleanupStack::Pop ( myFactoryObj );
+	return myFactoryObj;	
+	}
+	
+CFactoryObject::CFactoryObject( TInt aProtocolType) : iProtocolFlag(aProtocolType)
+	{
+	}
+	
+TInt CFactoryObject::ProtocolType()
+	{
+	return iProtocolFlag;
+	}
+
+CFactoryObject::~CFactoryObject()
+	{
+		
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpclientflow.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1110 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_nodeinterfaces.h>
+//#include <comms-infras/ss_nodemessages_controlprovider.h>
+#include <inetprottextutils.h>
+#include <uriutils.h>
+#include <http/thttptable.h>
+#include <httperr.h>
+#include <httpstringconstants.h>
+#include <stringpool.h>
+#include <http/framework/cheadercodecplugin.h>
+#include <upnp/tupnptable.h>
+#include <rmemchunk.h>
+
+//Local Includes
+#include "httpclientflow.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+#include "upnppint.h"
+#include "upnpmemoryutils.h"
+
+
+using namespace ESock;
+using namespace Messages;
+
+
+__FLOG_STMT(_LIT8(KComponent,"Flow");)
+const TUint KHttpDefaultPort = 80;
+_LIT8(KSlash, "/");
+
+CHttpClientFlow* CHttpClientFlow::NewL ( CSubConnectionFlowFactoryBase& aFactory,
+										CProtocolIntfBase* aProtocolIntf,
+										const TNodeId& aSubConnId,
+										const TAppProtAddr& aSockAddr )
+	{	
+	CHttpClientFlow* self = new ( ELeave ) CHttpClientFlow ( aFactory, aProtocolIntf, aSubConnId, aSockAddr );
+	CleanupStack::PushL ( self );
+	self->ConstructL( );
+	CleanupStack::Pop ( self );
+	return self;
+	}
+
+
+CHttpClientFlow::CHttpClientFlow ( CSubConnectionFlowFactoryBase& aFactory, CProtocolIntfBase* aProtocolIntf, const TNodeId& aSubConnId, const TAppProtAddr& aSockAddr )
+	: CUPnPFlowBase ( aFactory, aProtocolIntf, EHttpClientFlow, aSubConnId ),
+	iDCIdle ( EFalse ), iRemoteAddress ( aSockAddr.iAddr, aSockAddr.iPort ), iResponseCompleted ( EFalse ), iReadStreamStarted ( EFalse )
+	{
+	LOG_NODE_CREATE(KESockFlowTag, CHttpClientFlow);
+	}
+
+
+CHttpClientFlow::~CHttpClientFlow ( )
+	{	
+	iRemoteAddress.FillZ ( );
+	iRequestUri.Close ( );
+	iActionValue.Close ( );
+	for ( TInt idx = 0; idx < iTransactions->Count( ); idx++ )
+		{
+		delete iTransactions->Get( idx );
+		}
+	if ( !iBufChain.IsEmpty ( ) )
+		iBufChain.Free ( );
+
+	delete iCodec;
+	iStringPool.Close();
+	// Note! delete client handler after cleanp of transactions, or else it will panic
+	delete iClientHandler;
+	delete iActionParser;
+
+	iSubConnectionProvider.Close ( );
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("Destroyed CHttpClientFlow")));
+	LOG_NODE_DESTROY(KESockFlowTag, CHttpClientFlow);
+	}
+
+void CHttpClientFlow::ConstructL ( )
+	{	
+	iClientHandler = CHTTPClientHandler::NewL ( *this, static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf () )->GetMemoryChunkManager(), &iRemoteAddress );
+	iTransactions = iClientHandler->GetTransactionWrapperL( );
+
+	iStringPool.OpenL( TUPnPTable::Table() );
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL ( KUPnPCodecName, iStringPool );
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("Created CHttpClientFlow")));
+	}
+
+
+
+//From CSubConnectionFlowBase MNode
+void CHttpClientFlow::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{	
+ 	if ( aMessage.IsMessage<TEChild::TDestroy> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ReceivedL - Received message TCFMessage::TDestroy")));
+  		if ( RemoveControlClient ( FindControlClient ( address_cast<TNodeId> ( aSender ) ) ) == 0 )
+   			{
+   			DeleteThisFlow ( );
+   			}
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStart> () )
+		{
+        LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ReceivedL - Received message TCFMessage::TDataClientStart")));
+		RClientInterface::OpenPostMessageClose ( NodeId (), address_cast<TNodeCtxId> ( aSender ), TCFDataClient::TStarted ().CRef () );
+    	}
+    else if ( aMessage.IsMessage<TCFDataClient::TStop> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ReceivedL - Received message TCFMessage::TDataClientStop")));
+		CancelRequest ( address_cast<TNodeCtxId> ( aSender ) );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPClientRequestInfo> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ReceivedL - Received message TUpnpMessage::TUPnPClientRequestInfo")));
+		TUpnpMessage::TUPnPClientRequestInfo& clntReqInfo = message_cast<TUpnpMessage::TUPnPClientRequestInfo> ( aMessage );
+		PrepareAndSubmitTransactionL ( clntReqInfo, address_cast<TNodeCtxId> ( aSender ) );
+		}
+	}
+
+void CHttpClientFlow::CancelRequest ( TNodeCtxId aChannelId )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::CancelRequest")));
+	TInt pos = FindTransaction ( aChannelId );
+	if ( pos != KErrNotFound ) // transaction is not found
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::CancelRequest - Cancelling transaction")));
+		CTransaction* ctrans = iTransactions->Get( pos );
+		iClientHandler->CancelTransaction ( ctrans );
+
+		THTTPEvent event ( THTTPEvent::ECancel );
+		OnHttpEvent ( ctrans, event );
+		}
+	else
+		{
+		if ( !iDCIdle ) // This will make sure when ASocket attached as upperflow
+						// and unbind is received from it, No more communication will 
+						// happen to SCPR.
+			{
+			RClientInterface::OpenPostMessageClose ( NodeId (), aChannelId, TCFDataClient::TStopped ( 0 ).CRef () );
+			}
+		}
+	}
+
+
+TInt CHttpClientFlow::FindTransaction ( TNodeCtxId aChannelId )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::FindTransaction")));
+	TUint count = iTransactions->Count( );
+	for ( TInt idx = 0; idx < count; idx++ )
+		{
+		CHTTPClientTransaction* ctrans = iTransactions->Get( idx );
+
+		if ( ctrans->NodeCtxId ( ) == aChannelId )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::FindTransaction - Transaction found at index %d"), idx));
+			return idx;
+			}
+		}
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::FindTransaction - Transaction not found")));
+	return KErrNotFound;
+	}
+
+void CHttpClientFlow::PrepareAndSubmitTransactionL ( RMBufChain& aData )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::PrepareAndSubmitTransactionL")));
+
+	TNodeCtxId channelId ( MeshMachine::KActivityNull, NodeId () );
+
+	CHTTPClientTransaction* ctrans = CHTTPClientTransaction::NewL ( *iCodec, iStringPool, channelId );
+	iTransactions->AppendL ( ctrans );
+
+	CRequest* crequest = ctrans->Request( );
+	RHTTPHeaders headers = crequest->Handle( ).GetHeaderCollection ( );
+	RRequest rrequest = crequest->Handle( );
+
+	// Set request method
+	RStringF stringF = iStringPool.StringF ( HTTP::EPOST, THTTPTable::Table() );
+	rrequest.SetMethod ( stringF );
+
+	// Set request Uri
+	SetRequestUriL ( ctrans, iRequestUri );
+	SetContentTypeHeaderL ( headers );
+
+	//Set Content Length
+	THTTPHdrVal hdrVal ( iOverallDataSize );
+	headers.SetFieldL ( iStringPool.StringF ( HTTP::EContentLength, THTTPTable::Table() ), hdrVal );
+
+	// Note! 100-continue, UPnP is not having any usecase to use this
+
+    //Set Soap Action
+	if ( SetActionHeaderL ( aData ) )
+		{
+		// Complete headers are available, so Transaction is ready for submission
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::PrepareAndSubmitTransactionL - Submitting transaction")));
+		iClientHandler->SubmitTransaction( ctrans );
+		}
+
+	// Set Body Data
+	ctrans->AddBodyPart( aData );
+	SetTransactionComplete ( ctrans );
+	}
+
+TBool CHttpClientFlow::SetActionHeaderL ( RMBufChain& aData )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetActionHeaderL")));
+
+	CTransaction* ctrans = iTransactions->Get( 0 );
+
+	CRequest* crequest = ctrans->Request( );
+	RHTTPHeaders headers = crequest->Handle( ).GetHeaderCollection ( );
+	RRequest rrequest = crequest->Handle( );
+
+	// get service name & action name
+	ConstructSoapActionHeaderValueL ( aData );
+
+	if ( iActionValue.Length ( ) != 0 )
+		{
+		RStringF stringF =  iStringPool.StringF ( UPnP::ESoapAction, TUPnPTable::Table() );
+		headers.SetRawFieldL ( stringF, iActionValue, KSoapFieldSeparator );
+		}
+
+	return iActionValue.Length ( ) > 0;
+	}
+
+void CHttpClientFlow::ConstructSoapActionHeaderValueL ( RMBufChain& aData )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ConstructSoapActionHeaderValueL")));
+
+	if ( iActionParser == NULL )
+		{
+		iActionParser =  CSoapParser::NewL ( );
+		}
+
+	RBuf8 xmlData;
+	xmlData.CreateMaxL ( aData.Length ( ) );
+	aData.CopyOut ( xmlData );
+	CleanupClosePushL ( xmlData );
+
+	if ( iActionParser->ParseSoapL( xmlData ) )
+		{
+		TInt len = iActionParser->SoapAction( ).Length ( ) + KColon ( ).Length ( ) * 2;
+
+		iActionValue.CreateL ( len );
+
+		iActionValue.Copy ( KColon );
+		iActionValue.Append ( iActionParser->SoapAction( ) );
+		iActionValue.Append ( KColon );
+
+		delete iActionParser;
+		iActionParser = NULL;
+		}
+
+	CleanupStack::PopAndDestroy ( &xmlData );
+	}
+
+void CHttpClientFlow::SetContentTypeHeaderL ( RHTTPHeaders aHeaders )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetContentTypeHeaderL")));
+	// Set content-type
+	RStringF stringF = iStringPool.StringF ( HTTP::EContentType, THTTPTable::Table() );
+	THTTPHdrVal contentTypeHdrVal;
+	RStringF contentTypeHdr = iStringPool.StringF ( UPnP::ETextXml, TUPnPTable::Table() );
+	contentTypeHdrVal.SetStrF ( contentTypeHdr );
+
+	RStringF paramStringF = iStringPool.StringF ( HTTP::ECharset, THTTPTable::Table() );
+	THTTPHdrVal contentTypeParamVal;
+	RStringF contentTypeParam = iStringPool.StringF ( UPnP::EUtf8, TUPnPTable::Table() );
+	contentTypeParamVal.SetStrF ( contentTypeParam );
+	aHeaders.SetFieldL ( stringF, contentTypeHdrVal, paramStringF, contentTypeParamVal );
+	}
+
+void CHttpClientFlow::ReSubmitTransactionL ( CTransaction* aTransaction )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ReSubmitTransactionL")));
+	CRequest* crequest = aTransaction->Request( );
+	RHTTPHeaders headers = crequest->Handle( ).GetHeaderCollection ( );
+	RRequest rrequest = crequest->Handle ( );
+
+	// Set request method
+	RStringF stringF = iStringPool.StringF ( UPnP::EMPost, TUPnPTable::Table() );
+	rrequest.SetMethod ( stringF );
+
+	// Set MAN Header
+	stringF = iStringPool.StringF ( UPnP::EMAN, TUPnPTable::Table() );
+	THTTPHdrVal manHdrVal;
+	RStringF manHdr = iStringPool.StringF ( UPnP::ESoapUrl, TUPnPTable::Table() );
+	manHdrVal.SetStrF ( manHdr );
+
+	RStringF paramStringF = iStringPool.StringF ( UPnP::ENS, TUPnPTable::Table() );
+	THTTPHdrVal nsParamVal;
+	RStringF nsParam = iStringPool.StringF ( UPnP::ENsParam, TUPnPTable::Table() );
+	headers.SetFieldL ( stringF, manHdrVal, paramStringF, nsParamVal );
+
+	// recompose by adding '01' for SOAPACTION
+	// remove existing soap header
+	headers.RemoveField ( iStringPool.StringF ( UPnP::ESoapAction, TUPnPTable::Table() ) );
+
+	RStringF soapHdr = iStringPool.StringF ( UPnP::ESoapHeader, TUPnPTable::Table() );
+	
+	// get service name & action name
+	headers.SetRawFieldL ( soapHdr, iActionValue, KSoapFieldSeparator );
+
+	// Transaction is ready for submission.
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ReSubmitTransactionL - Submitting transaction")));
+	iClientHandler->SubmitTransaction( aTransaction );
+	}
+
+void CHttpClientFlow::PrepareAndSubmitTransactionL ( TUpnpMessage::TUPnPClientRequestInfo& aClntReqInfo, TNodeCtxId aChannelId )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::PrepareAndSubmitTransactionL")));
+	CHTTPClientTransaction* ctrans = CHTTPClientTransaction::NewL ( *iCodec, iStringPool, aChannelId );
+	CleanupStack::PushL ( ctrans );
+
+	RBuf8 uriBuf;
+	uriBuf.CreateMax( aClntReqInfo.iUri.Length( ) );
+	CleanupClosePushL( uriBuf );
+	uriBuf.FillZ( aClntReqInfo.iUri.Length( ) );
+	aClntReqInfo.iUri.CopyOut( uriBuf );
+	aClntReqInfo.iUri.Free( );
+	// Extract the uri path from the absolute uri and set the request uri
+	SetRequestUriL ( ctrans, uriBuf );
+	CleanupStack::PopAndDestroy( &uriBuf );
+
+	RRequest rrequest = ctrans->Request( )->Handle( );
+	RStringF method;
+	RStringF contentLenStrF = iStringPool.StringF ( HTTP::EContentLength, THTTPTable::Table() );
+	THTTPHdrVal contentLenVal;
+	TInt contentLength = 0;
+	contentLenVal.SetInt( contentLength );
+	switch ( aClntReqInfo.iRequestMethod )
+		{
+		case HTTP::EGET:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::PrepareAndSubmitTransactionL - Handling describe(GET) request")));
+			method = iStringPool.StringF ( HTTP::EGET, THTTPTable::Table() );
+			rrequest.SetMethod ( method );
+			}
+		break;
+
+		case UPnP::ESubscribe:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::PrepareAndSubmitTransactionL - Handling SUBSCRIBE request")));
+			method = iStringPool.StringF ( UPnP::ESubscribe, TUPnPTable::Table() );
+			rrequest.SetMethod ( method );
+			BuildSubscribeRequestL ( *(ctrans->Request()), aClntReqInfo );
+			}
+		break;
+
+		case UPnP::EUnsubscribe:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::PrepareAndSubmitTransactionL - Handling UNSUBSCRIBE request")));
+			method = iStringPool.StringF ( UPnP::EUnsubscribe, TUPnPTable::Table() );
+			rrequest.SetMethod ( method );
+			SetSidHeaderL ( *(ctrans->Request()), aClntReqInfo );
+			}
+		break;
+
+		case UPnP::ENotify:
+			{
+			RMBufChain bufChain;
+			TUPnPMemoryUtils::CreateMBuf(bufChain, aClntReqInfo.iBody );
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::PrepareAndSubmitTransactionL - Handling NOTIFY request")));
+			method = iStringPool.StringF ( UPnP::ENotify, TUPnPTable::Table() );
+			rrequest.SetMethod ( method );
+			BuildNotifyRequestL ( *(ctrans->Request()), aClntReqInfo );
+			// set body
+			contentLength = aClntReqInfo.iBody.Length ( );
+			contentLenVal.SetInt( contentLength );
+			ctrans->AddBodyPart( bufChain );
+			aClntReqInfo.iBody.Free();
+			}
+		break;
+
+		default:
+		break;
+		}
+
+	CleanupStack::Pop ( );
+
+	rrequest.GetHeaderCollection ( ).SetFieldL ( contentLenStrF, contentLenVal );
+	// Transaction is ready for submission.
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::PrepareAndSubmitTransactionL - Submitting transaction")));
+	ctrans->SetComplete ();
+	iClientHandler->SubmitTransaction( ctrans );
+	}
+
+void CHttpClientFlow::SetRequestUriL ( CTransaction* aTrans, const TDesC8& aUri )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetRequestUriL")));
+	RRequest rrequest = aTrans->Request( )->Handle( );
+	TUriParser8 uri;
+	uri.Parse ( aUri );
+	TPtrC8 ptr;
+	ptr.Set(uri.UriDes());
+	ptr.Set(ptr.Mid(ptr.Find(_L8("//")) + 2));
+	TInt pos = ptr.Locate('/');
+	if(pos == KErrNotFound)
+		{
+		ptr.Set(KSlash());
+		}
+	else
+		{
+		ptr.Set(ptr.Mid(pos));
+		}
+	
+	TUriParser8 uriPath;
+	uriPath.Parse(ptr);
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetRequestUriL - Setting the URI")));
+	rrequest.SetURIL ( uriPath );
+	
+	
+	// Set Host Header
+	TInt port;
+	if ( uri.IsPresent ( EUriPort ) )
+		{
+		const TDesC8& portStr = uri.Extract ( EUriPort );
+		InetProtTextUtils::ConvertDescriptorToInt ( portStr, port );
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetRequestUriL - Got the port from URI %d"), port));
+		}
+	else
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetRequestUriL - Using default HTTP port 80")));
+		port = KHttpDefaultPort;
+		}
+
+	SetHostHeaderL ( aTrans, uri.Extract ( EUriHost ), port );
+	}
+
+void CHttpClientFlow::SetHostHeaderL ( CTransaction* aTrans, const TDesC8& aHost, TInt aPort )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetHostHeaderL")));
+	RStringF hostStr = iStringPool.StringF ( HTTP::EHost, THTTPTable::Table() );
+	RRequest request = aTrans->Request( )->Handle( );
+    RHTTPHeaders headers = request.GetHeaderCollection();
+
+	//If the Host header does not already exist, add it!
+	THTTPHdrVal hostValue;
+	if ( headers.GetField ( hostStr, 0, hostValue ) == KErrNotFound )
+		{
+		// Set the Host header...
+		RStringF hostValStr;
+		// Check if its a literal IPV6 address
+		UriUtils::TUriHostType aHostsType = UriUtils::HostType ( aHost );
+		if ( ( aHostsType != UriUtils::ETextHost ) && ( aHostsType != UriUtils::EIPv4Host ) ) // is an IPv6 or other future protocol address
+			{
+			HBufC8* ipv6LiteralHost = HBufC8::NewLC ( aHost.Length() + 2 ); // add 2 for the braces
+
+			TPtr8 ipv6LiteralHostPtr = ipv6LiteralHost->Des();
+
+			ipv6LiteralHostPtr.Append ( KIPv6HostOpenBrace );
+			ipv6LiteralHostPtr.Append ( aHost );
+			ipv6LiteralHostPtr.Append ( KIPv6HostCloseBrace );
+
+			hostValStr = iStringPool.OpenFStringL( ipv6LiteralHostPtr );
+			CleanupStack::PopAndDestroy( ipv6LiteralHost );
+			}
+		else
+			{
+			hostValStr = iStringPool.OpenFStringL( aHost );
+			}
+
+		CleanupClosePushL ( hostValStr );
+
+		THTTPHdrVal hostVal ( hostValStr );
+		headers.SetFieldL ( hostStr, hostVal );
+		CleanupStack::PopAndDestroy ( &hostValStr );
+
+		// Also set the port number if Host header is not empty and a port
+		// number is not the default.
+		if ( aPort != KHttpDefaultPort )
+			{
+			THTTPHdrVal portVal ( aPort );
+			RStringF portStr = iStringPool.StringF ( HTTP::EPort,THTTPTable::Table() );
+			headers.SetParamL ( hostStr, portStr, portVal, 0 );
+			}
+		}
+	}
+
+void CHttpClientFlow::BuildSubscribeRequestL ( CRequest& aNewRequest, TUpnpMessage::TUPnPClientRequestInfo& aClntReqInfo )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::BuildSubscribeRequestL")));
+	TSubscribeRequestInfo& info = *( reinterpret_cast < TSubscribeRequestInfo* > ( aClntReqInfo.iInfo ) );
+	RStringF strF = iStringPool.StringF ( UPnP::ETimeout, TUPnPTable::Table() );
+	if(info.iTimeOut != 0)
+		{
+		THTTPHdrVal hTimeOutVal(info.iTimeOut);
+		aNewRequest.Handle().GetHeaderCollection().SetFieldL ( strF, hTimeOutVal );
+		}
+
+	strF = iStringPool.StringF ( UPnP::ECallback, TUPnPTable::Table() );
+	THTTPHdrVal hCallbackVal;
+
+	if ( info.iCallback.Length() > 0 )
+		{
+		RBuf8 callbackBuf;
+		callbackBuf.CreateMax ( info.iCallback.Length( ) );
+		CleanupClosePushL ( callbackBuf );
+		callbackBuf.FillZ ( info.iCallback.Length( ) );
+		info.iCallback.CopyOut ( callbackBuf );
+		info.iCallback.Free ( );
+
+		RStringF callbackStrF = iStringPool.OpenFStringL ( callbackBuf );
+		CleanupClosePushL ( callbackStrF );
+		hCallbackVal.SetStrF (callbackStrF );
+		aNewRequest.Handle ( ).GetHeaderCollection ( ).SetFieldL ( strF, hCallbackVal );
+		CleanupStack::PopAndDestroy ( &callbackStrF );
+		CleanupStack::PopAndDestroy ( &callbackBuf );
+		SetNtHeaderL ( aNewRequest.Handle ( ).GetHeaderCollection ( ) );
+		}
+	else
+		{
+		SetSidHeaderL ( aNewRequest, aClntReqInfo );
+		}
+	}
+
+void CHttpClientFlow::SetSidHeaderL ( CRequest& aNewRequest, TUpnpMessage::TUPnPClientRequestInfo& aClntReqInfo )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetSidHeaderL")));
+	if( aClntReqInfo.iRequestMethod == UPnP::ESubscribe || aClntReqInfo.iRequestMethod == UPnP::EUnsubscribe )
+		{
+		TSubscribeRequestInfo& info = *( reinterpret_cast < TSubscribeRequestInfo* > ( aClntReqInfo.iInfo ) );
+		RStringF strF = iStringPool.StringF ( UPnP::ESID, TUPnPTable::Table() );
+		THTTPHdrVal hSidVal;
+
+		RBuf8 sidBuf;
+		sidBuf.CreateMax ( info.iSid.Length( ) );
+		CleanupClosePushL ( sidBuf );
+		sidBuf.FillZ ( info.iSid.Length( ) );
+		info.iSid.CopyOut( sidBuf );
+		//info.iSid.Free ( );
+		info.iSid.Init();
+		TPtrC8 asdf(sidBuf);
+		RStringF sidValStrF = iStringPool.OpenFStringL( sidBuf );
+		CleanupClosePushL ( sidValStrF );
+		hSidVal.SetStrF ( sidValStrF );
+		aNewRequest.Handle ( ).GetHeaderCollection ( ).SetFieldL ( strF, hSidVal );
+		CleanupStack::PopAndDestroy ( &sidValStrF );
+		CleanupStack::PopAndDestroy ( &sidBuf );
+		}
+	else if ( aClntReqInfo.iRequestMethod == UPnP::ENotify )
+		{
+		TEventNotifyRequestInfo& info = *( reinterpret_cast < TEventNotifyRequestInfo* > ( aClntReqInfo.iInfo ) );
+		RStringF strF = iStringPool.StringF ( UPnP::ESID, TUPnPTable::Table() );
+		THTTPHdrVal hSidVal;
+
+		RBuf8 sidBuf;
+		sidBuf.CreateMax ( info.iSid.Length( ) );
+		CleanupClosePushL ( sidBuf );
+		sidBuf.FillZ ( info.iSid.Length( ) );
+		info.iSid.CopyOut( sidBuf );
+		//info.iSid.Free ( );
+		info.iSid.Init();
+		RStringF sidValStrF = iStringPool.OpenFStringL( sidBuf );
+		CleanupClosePushL ( sidValStrF );
+		hSidVal.SetStrF ( sidValStrF );
+		aNewRequest.Handle ( ).GetHeaderCollection ( ).SetFieldL ( strF, hSidVal );
+		CleanupStack::PopAndDestroy ( &sidValStrF );
+		CleanupStack::PopAndDestroy ( &sidBuf );
+		}
+	}
+
+void CHttpClientFlow::BuildNotifyRequestL ( CRequest& aNewRequest, TUpnpMessage::TUPnPClientRequestInfo& aClntReqInfo )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::BuildNotifyRequestL")));
+	TEventNotifyRequestInfo& info = *( reinterpret_cast < TEventNotifyRequestInfo* > ( aClntReqInfo.iInfo ) );
+	SetSidHeaderL ( aNewRequest, aClntReqInfo );
+	SetNtHeaderL ( aNewRequest.Handle ( ).GetHeaderCollection ( ) );
+
+	RStringF strF = iStringPool.StringF ( UPnP::ESEQ, TUPnPTable::Table() );
+	THTTPHdrVal hSeqVal( info.iSeqKey );
+	aNewRequest.Handle ( ).GetHeaderCollection ( ).SetFieldL ( strF, hSeqVal );
+
+	strF = iStringPool.StringF ( UPnP::ENTS, TUPnPTable::Table() );
+	RStringF ntsValStrF = iStringPool.StringF ( UPnP::EUpnpPropChange, TUPnPTable::Table() );
+	THTTPHdrVal hNtsVal;
+	hNtsVal.SetStrF ( ntsValStrF );
+	aNewRequest.Handle ( ).GetHeaderCollection ( ).SetFieldL ( strF, hNtsVal );
+
+	// Set content-type
+	strF = iStringPool.StringF ( HTTP::EContentType, THTTPTable::Table() );
+	RStringF contentTypeStrF = iStringPool.StringF( UPnP::ETextXml, TUPnPTable::Table() );
+	THTTPHdrVal hContentTypeVal;
+	hContentTypeVal.SetStrF ( contentTypeStrF );
+	aNewRequest.Handle ( ).GetHeaderCollection ( ).SetFieldL ( strF, hContentTypeVal );
+	}
+
+void CHttpClientFlow::SetNtHeaderL ( RHTTPHeaders aHeaders )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetNtHeaderL")));
+	RStringF strF = iStringPool.StringF ( UPnP::ENT, TUPnPTable::Table() );
+	RStringF ntValStrF = iStringPool.StringF ( UPnP::EUpnpEvent, TUPnPTable::Table() );
+	CleanupClosePushL ( ntValStrF );
+	THTTPHdrVal hNtVal;
+	hNtVal.SetStrF ( ntValStrF );
+	aHeaders.SetFieldL ( strF, hNtVal );
+	CleanupStack::PopAndDestroy ( &ntValStrF );
+	}
+
+
+MFlowBinderControl* CHttpClientFlow::DoGetBinderControlL ( )
+	{	
+    return this;
+	}
+
+// MFlowBinderControl
+CSubConnectionFlowBase* CHttpClientFlow::Flow ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::Flow")));
+	return this;
+	}
+
+MSessionControl* CHttpClientFlow::GetControlL ( TInt /*aSessionType*/, MSessionControlNotify& aSessionControlNotify )
+    {	
+    LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::GetControlL")));
+    ASSERT ( iSessionControlNotify == NULL );
+	iSessionControlNotify = &aSessionControlNotify;
+
+	return this;
+    }
+
+MSessionData* CHttpClientFlow::BindL ( MSessionDataNotify& aNotify )
+    {	
+    LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::BindL")));
+	ASSERT ( iSessionDataNotify == NULL );
+	iSessionDataNotify = &aNotify;
+	iSubConnectionProvider.PostMessage ( Id (), TCFControlProvider::TActive ().CRef () );
+	return this;
+    }
+
+void CHttpClientFlow::Unbind ( )
+    {	
+    LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::Unbind")));
+   	iSessionControlNotify = NULL;
+	iSessionDataNotify = NULL;
+	iDCIdle = ETrue;
+	if ( iSubConnectionProvider.IsOpen ( ) )
+		{
+	    iSubConnectionProvider.PostMessage ( Id (), TCFControlProvider::TIdle ().CRef () );
+		}
+    }
+
+// MSessionControl
+void CHttpClientFlow::Shutdown ( MSessionControl::TCloseType aOption )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::Shutdown")));
+	if ( MSessionControl::ENormal == aOption)
+		iSessionControlNotify->CanClose( MSessionControlNotify::EDelete);
+	}
+
+void CHttpClientFlow::ActiveOpen ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ActiveOpen")));
+	iSessionControlNotify->ConnectComplete ( );
+	}
+
+TInt CHttpClientFlow::SetRemName ( TSockAddr& anAddr )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetRemName")));
+	iRemoteAddress = anAddr;
+	iClientHandler->SetConnectionInfo ( iRemoteAddress );
+	return KErrNone;
+	}
+
+TInt CHttpClientFlow::GetOption ( TUint aLevel, TUint aName, TDes8& anOption ) const
+	{	
+	if ( aLevel == KCHOptionLevel )
+		{
+		switch ( aName )
+			{
+			case KCHMaxLength:
+				{
+				*(TUint*) anOption.Ptr() = iOverallDataSize;
+				}
+			break;
+
+			case KCHLastMessage:
+				{
+				*(TUint*) anOption.Ptr() = ( iResponseCompleted && iBufChain.Length () == 0 );
+				}
+			break;
+
+			default:
+				{
+				ASSERT ( 0 );
+				}
+			break;
+			}
+		}
+
+	return KErrNone;
+	}
+
+TInt CHttpClientFlow::SetOption (TUint aLevel, TUint aName, const TDesC8& anOption)
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::SetOption")));
+
+	TInt err = KErrNone;
+	if ( aLevel == KCHOptionLevel )
+		{
+		switch ( aName )
+			{
+			case KCHAbsoluteUri:
+				{
+				err = iRequestUri.Create ( anOption );
+				}
+			break;
+
+			case KCHMaxLength:
+				{
+				TPckgBuf <TCHMessageOption> option;
+				option.Copy ( anOption );
+
+				iChannelIdentifier = option ( ).iId;
+				iOverallDataSize = option ( ).iValue;
+				}
+			break;
+
+			default:
+				{
+				ASSERT ( 0 );
+				}
+			break;
+			}
+		}
+
+	return err;
+	}
+
+TInt CHttpClientFlow::Write ( RMBufChain& aData, TUint /*aOptions*/, TSockAddr* /*anAddr*/ )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::Write")));
+
+	// Note!..http client flow of upnp stack doesn't
+	// supports HTTP chunked encoding for sending request body
+
+	__ASSERT_DEBUG ( iOverallDataSize != KErrUnknown, User::Invariant () );
+
+	TInt len = aData.Length ( );
+
+	if ( iTransactions->Count( ) == 0 )
+		{
+		TRAP ( iError, PrepareAndSubmitTransactionL ( aData ) );
+		if ( iError != KErrNone )
+			{
+			if ( !aData.IsEmpty() )
+				aData.Free ( );
+			DoReset ( );
+			return iError;
+			}
+		}
+	else
+		{
+		CTransaction* ctrans = iTransactions->Get( 0 );
+
+		if ( iActionValue.Length ( ) == 0 )
+			{			
+			TBool doSubmit = EFalse;
+			TRAP ( iError, doSubmit = SetActionHeaderL ( aData ) );
+			
+			// Append body parts
+			ctrans->AddBodyPart ( aData );
+
+			if ( iError == KErrNone )
+				{
+				// transaction is waiting for more data to build soap action header
+				if ( doSubmit )
+					{
+					// Complete headers are available, so Transaction is ready for submission
+					LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::Write - Submitting transaction")));
+					iClientHandler->SubmitTransaction( ctrans );					
+					}
+				}
+			else
+				{
+				DoReset ( );
+				return iError;
+				}
+			}
+		else
+			{
+			// transaction is waiting for more request body data
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::Write - Notfiy new request body parts")));
+			iClientHandler->NotifyNewRequestBodyData ( ctrans, aData );		
+			}
+		SetTransactionComplete ( ctrans );
+		}	
+	
+	aData.Init ( );
+	return len;
+	}
+
+TInt CHttpClientFlow::GetData ( RMBufChain& aData, TUint aLength, TUint /*aOptions*/, TSockAddr* /*anAddr*/ )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::GetData")));
+	
+	if ( iError < 0 )
+		{
+		DoReset ();
+		return iError;
+		}
+		
+	if ( !iReadStreamStarted )
+		{
+		TBuf8<sizeof ( TInt )> identifiersBuf;
+		identifiersBuf.AppendNumFixedWidth ( iChannelIdentifier, EDecimal, sizeof ( TInt ) );
+		aData.Append ( identifiersBuf.Length () );
+		aData.CopyIn ( identifiersBuf );
+		iReadStreamStarted = ETrue;
+		}
+	else
+		{
+		RMBufChain newChain;
+		iError = iBufChain.Split ( aLength, newChain );
+		if ( iError != KErrNone )
+			{
+			DoReset ();
+			return iError;
+			}
+		
+		aData.Assign ( iBufChain );
+		iBufChain = newChain;
+		}
+
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::GetData--Data Read by Upper flow--%d"), aData.Length ( )));
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::GetData--Data left over--%d"), iBufChain.Length ( )));
+	
+	return aData.Length ( );
+	}
+
+void CHttpClientFlow::SetTransactionComplete ( CTransaction* aTransaction )
+	{
+	if ( iOverallDataSize == aTransaction->BodyParts ().Length () )
+		{
+		aTransaction->SetComplete ();
+		}
+	}
+
+// MInputStreamObserver
+TInt CHttpClientFlow::OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::OnHttpEvent")));
+	CHTTPClientTransaction* clientTrans = static_cast<CHTTPClientTransaction*>( aTransaction );
+
+	// Process event for Control plane transaction
+	TNodeCtxId selfCtx ( MeshMachine::KActivityNull, NodeId () );
+	if ( clientTrans->NodeCtxId () != selfCtx )
+		{
+		ProcessControlPlaneResponseEvent ( clientTrans, aEvent );
+		return KErrNone;
+		}
+
+	// Process event for Socket Transaction
+	TBool cleanupNeeded = EFalse;
+	switch ( aEvent.iStatus )
+		{
+		case THTTPEvent::EGotResponseHeaders:
+			{
+			RResponse response = clientTrans->Response( )->Handle( );
+			RHTTPHeaders headers = response.GetHeaderCollection ( );
+
+			RStringF fieldStr = iStringPool.StringF ( HTTP::EContentLength, THTTPTable::Table ( ) );
+			THTTPHdrVal value;
+
+			if ( headers.GetField ( fieldStr, 0, value ) == KErrNotFound )
+				{
+				iOverallDataSize = KErrUnknown;
+				}
+			else
+				{
+				iOverallDataSize = value.Int ( );
+				}			
+			}
+			break;
+
+		case THTTPEvent::EGotResponseBodyData:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::OnHttpEvent - THTTPEvent::EGotResponseBodyData")));
+			
+			TInt notifyLen = 0;
+			FillResponseChain ( aTransaction, notifyLen );			
+			iSessionDataNotify->NewData( notifyLen );
+			}
+			break;
+		
+		case THTTPEvent::EResponseComplete:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::OnHttpEvent - THTTPEvent::EResponseComplete")));
+			if ( clientTrans->Response( )->Status( ) == HTTPStatus::EMethodNotAllowed )
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::OnHttpEvent - THTTPEvent::EResponseComplete - Response status = %d"), clientTrans->Response( )->Status( )));
+				
+				clientTrans->SetComposingStarted ( EFalse );
+				clientTrans->ResetRequestPart ();
+				TRAPD ( err, ReSubmitTransactionL ( clientTrans ) );
+
+				if ( err != KErrNone )
+					{
+					LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::OnHttpEvent - THTTPEvent::EResponseComplete - Error %d while re-submitting trans"), err));
+					cleanupNeeded = ETrue;
+					NotifyError ( clientTrans, err );
+					}
+				}
+			else
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::OnHttpEvent - THTTPEvent::EResponseComplete - Response status = %d"), clientTrans->Response( )->Status( )));
+								
+				iResponseCompleted = ETrue;
+				cleanupNeeded = ETrue;
+				iSessionDataNotify->NewData( sizeof ( TInt ) );
+				}
+			}
+			break;
+
+		default:
+			{
+			if ( aEvent.iStatus < 0 )
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::OnHttpEvent - Error status = %d"), aEvent.iStatus));
+				NotifyError ( clientTrans, aEvent.iStatus );
+				}
+			}
+			break;
+		}
+	
+	if ( cleanupNeeded )
+		{
+		// body is processed completely, and clienthandler removed it from its array
+		delete clientTrans;
+		}
+	return KErrNone;
+	}
+
+void CHttpClientFlow::ProcessControlPlaneResponseEvent ( CHTTPClientTransaction* aTransaction, THTTPEvent& aEvent )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ProcessControlPlaneResponseEvent")));
+	TBool iCleanupNeeded = EFalse;
+
+	switch ( aEvent.iStatus )
+		{
+		case THTTPEvent::ECancel:
+			{
+			// post complete message with KErrCancel
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ProcessControlPlaneResponseEvent - THTTPEvent::ECancel")));		
+			RClientInterface::OpenPostMessageClose ( NodeId (), aTransaction->NodeCtxId (), TCFDataClient::TStopped ( 0 ).CRef () );
+			iCleanupNeeded = ETrue;
+			}
+		break;
+
+		case THTTPEvent::EGotResponseBodyData:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ProcessControlPlaneResponseEvent - THTTPEvent::EGotResponseBodyData")));
+
+			TInt notifyLen = 0;
+			FillResponseChain ( aTransaction, notifyLen );
+			// Note! no need to process any body parts for control plane transaction
+			}
+		break;
+
+		case THTTPEvent::EResponseComplete:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ProcessControlPlaneResponseEvent - THTTPEvent::EResponseComplete")));
+			CResponse* cresponse = aTransaction->Response( );
+			RMemoryAllocator allocator(static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf () )->GetMemoryChunkManager());
+
+			RMemChunk memChunk;
+ 			TUPnPMemoryUtils::CreateMemChunk(memChunk, iBufChain, allocator );
+
+			// request method is subscribe
+			if ( aTransaction->Request( )->Method( ).Index ( TUPnPTable::Table() )
+									== UPnP::ESubscribe )
+				{
+				if(cresponse->Status() == HTTPStatus::EOk)
+					{
+					RHTTPHeaders headers = cresponse->Handle( ).GetHeaderCollection ( );
+
+		  			// Timeout field value
+		  			RStringF fieldNameStr = iStringPool.StringF ( UPnP::ETimeout, TUPnPTable::Table() );
+		  			THTTPHdrVal timeOutVal;
+		 			headers.GetField ( fieldNameStr, 0, timeOutVal );
+					TInt timeOut;					
+					if ( timeOutVal.Type ( ) == THTTPHdrVal::KNoType )
+						{
+						RHTTPHeaders reqHds = aTransaction->Request( )->Handle( ).GetHeaderCollection ( );
+						reqHds.GetField ( fieldNameStr, 0, timeOutVal );
+						timeOut = timeOutVal.Int ( );
+						}
+					else
+						{
+						timeOut = timeOutVal.Int ( );
+						}
+						
+		 			// SID field value
+		 			fieldNameStr = iStringPool.StringF ( UPnP::ESID, TUPnPTable::Table() );
+		 			TPtrC8 rawValue;
+		 			headers.GetRawField ( fieldNameStr, rawValue );
+		 			
+		 			RMemChunk sid;
+		 			sid.Create ( rawValue, allocator );
+		 			
+		 			
+					TUpnpMessage::TSubscribeResponse msg ( cresponse->Status( ),
+															cresponse->Version( ),
+															memChunk,
+															timeOut,
+															sid );					
+					RClientInterface::OpenPostMessageClose ( NodeId (), aTransaction->NodeCtxId (), msg );			
+					}
+				else
+					{
+					TEBase::TError msg ( TUpnpMessage::TUPnPClientRequestInfo::Id(), cresponse->Status() );
+					RClientInterface::OpenPostMessageClose ( NodeId (), aTransaction->NodeCtxId (), msg );
+					}
+				}
+			else
+				{
+				TUpnpMessage::TResponse msg ( cresponse->Status( ), cresponse->Version( ), memChunk );
+				RClientInterface::OpenPostMessageClose ( NodeId (), aTransaction->NodeCtxId (), msg );					
+				}
+			iBufChain.Free ( );
+			iCleanupNeeded = ETrue;
+			}
+		break;
+
+		default:
+			{
+			if ( aEvent.iStatus < 0 )
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::ProcessControlPlaneResponseEvent - Error status = %d"), aEvent.iStatus));
+				NotifyError ( aTransaction, aEvent.iStatus );
+				iCleanupNeeded = ETrue;
+				}
+			}
+		break;
+		}
+
+	if ( iCleanupNeeded )
+		{
+		// Cleanup
+		delete aTransaction;
+		}
+	}
+
+void CHttpClientFlow::FillResponseChain ( CTransaction* aTransaction, TInt& aNewLen )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::FillResponseChain")));
+	MHTTPDataSupplier* bodySupplier = aTransaction->Response( )->Body( );
+	TPtrC8 bodyPtr;
+	RMBufChain bodyChain;
+
+	bodySupplier->GetNextDataPart ( bodyPtr );
+	bodyChain.Create ( bodyPtr );
+	iBufChain.Append ( bodyChain );
+
+	bodySupplier->ReleaseData( );
+
+	aNewLen = bodyPtr.Length ( );
+
+	LOG(ESockLogExternal::Printf(KSubsysHttpClntFlow, KComponent, _L8("CHttpClientFlow::FillResponseChain--chunk length from parser = %d"), aNewLen));
+	}
+
+void CHttpClientFlow::NotifyError ( CHTTPClientTransaction* aTransaction, TInt aError )
+	{		
+	TNodeCtxId selfCtx ( MeshMachine::KActivityNull, NodeId () );
+	if ( aTransaction->NodeCtxId () != selfCtx )
+		{
+		// For SCPR Transactions post error response and cleanup
+		TEBase::TError msg ( TUpnpMessage::TUPnPClientRequestInfo::Id ( ), aError );
+		RClientInterface::OpenPostMessageClose ( NodeId (), aTransaction->NodeCtxId (), msg );		
+		}
+	else
+		{
+		// Handle error for socket transactions
+		iError = aError;
+		iResponseCompleted = ETrue;
+		iOverallDataSize = sizeof ( TInt );
+		iSessionDataNotify->NewData( iOverallDataSize );
+		}		
+	}
+
+void CHttpClientFlow::DoReset ( )
+	{	
+	iResponseCompleted = EFalse;
+	iOverallDataSize = 0;
+
+	iRequestUri.Close ( );
+	iActionValue.Close ( );
+	iRemoteAddress.FillZ ( );
+	iBufChain.Free ( );
+
+	if ( iTransactions->Count() )
+		{
+		CHTTPClientTransaction* ctrans = iTransactions->Get( 0 );
+		delete ctrans;
+		iTransactions->Remove( 0 );
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpmudpflow.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,805 @@
+// 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:
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_nodeinterfaces.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <ss_glob.h>
+
+//Local Includes
+#include "httpmudpflow.h"
+#include "upnppint.h"
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+#include "upnpmemoryutils.h"
+
+#include <http/thttptable.h>
+#include <http/framework/cheadercodecplugin.h>
+#include <httpstringconstants.h>
+#include <upnp/tupnptable.h>
+#include <e32math.h>
+
+const TUint KDeftMaxAgeVal = 1800;
+
+__FLOG_STMT(_LIT8(KComponent,"Flow");)
+CHttpMUdpFlow* CHttpMUdpFlow::NewL ( CSubConnectionFlowFactoryBase& aFactory,
+						  			CUPnPProtocolIntfBase* aProtocolIntf,
+					  				const TNodeId& aSubConnId )
+	{
+	CHttpMUdpFlow* self = new ( ELeave )CHttpMUdpFlow ( aFactory, aProtocolIntf, aSubConnId );
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop (); // self
+	return self;
+	}
+
+CHttpMUdpFlow::CHttpMUdpFlow ( CSubConnectionFlowFactoryBase& aFactory,
+					CUPnPProtocolIntfBase* aProtocolIntf,
+					const TNodeId& aSubConnId )
+	: CUPnPFlowBase ( aFactory, aProtocolIntf, EHttpMUdpFlow, aSubConnId ), iIsStarted ( EFalse ), iIsLeaving ( EFalse )
+	{
+	LOG_NODE_CREATE(KESockFlowTag, CHttpMUdpFlow);
+	}
+
+CHttpMUdpFlow::~CHttpMUdpFlow ()
+	{
+	delete iRequestParser;
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("Destroying iReceivedData")));
+	if ( !iReceivedData.IsEmpty () )
+		iReceivedData.Free ();
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("Destroying iUPnPRequest")));
+	delete iUPnPRequest;
+	iRecvElements.Reset ();
+	//delete iCodec;
+
+	__ASSERT_DEBUG ( iSearchTargetArray.Count () == 0, User::Invariant () );
+	iSearchTargetArray.Close ();
+	__ASSERT_DEBUG ( iNotifyTargetArray.Count () == 0, User::Invariant () );
+	iNotifyTargetArray.Close ();
+	iListenRequestors.Reset ();
+
+	iStringPool.Close();
+	
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("Destroying iSubConnectionProvider")));
+	iSubConnectionProvider.Close ();
+	__ASSERT_DEBUG ( iTimerMappedArray.Count () == 0, User::Invariant () );
+	iTimerMappedArray.ResetAndDestroy();
+	__ASSERT_DEBUG ( iCallbackArray.Count () == 0, User::Invariant () );
+	iCallbackArray.ResetAndDestroy();
+	if ( iDeltaTimer )
+		iDeltaTimer->Cancel();	
+	delete iDeltaTimer;
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("Destroyed CHttpMUdpFlow")));
+	LOG_NODE_DESTROY(KESockFlowTag, CHttpMUdpFlow);
+	}
+
+
+void CHttpMUdpFlow::ConstructL ()
+	{
+	TAppProtIntfMessage::RegisterL (); // Register the message with COMMS transport
+	iStringPool.OpenL(TUPnPTable::Table());
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL ( KUPnPCodecName, iStringPool );
+	iRequestParser = CUpnpRequestParser::NewL ( *this );
+	iUPnPRequest = CRequest::NewL ( *iCodec, iStringPool );
+	// Create a delta timer with the given priority
+	iDeltaTimer=CDeltaTimer::NewL(EPriorityLow);
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("Created CHttpMUdpFlow")));
+	}
+
+void CHttpMUdpFlow::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL")));
+
+	if ( aMessage.IsMessage<TEChild::TDestroy> () )
+		{
+    	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TCFMessage::TDestroy")));
+    	if ( RemoveControlClient ( FindControlClient ( address_cast<TNodeId> ( aSender ) ) ) == 0 )
+    		{
+    		LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TCFMessage::TDestroy - Deleting current flow")));
+   			DeleteThisFlow ();
+    		}
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStart> () )
+		{
+        LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TCFMessage::TDataClientStart")));
+        StartFlow ( address_cast<TNodeCtxId> ( aSender ) );
+    	}
+    else if ( aMessage.IsMessage<TCFDataClient::TStop> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TUpnpMessage::TUPnPStopSearch")));
+
+		Unregister ( address_cast<TNodeCtxId> ( aSender ) );
+        StopFlow ( address_cast<TNodeCtxId> ( aSender ) );
+        }
+	else if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TCFMessage::TFOCreated")));
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iAppProtIntfId = msg.iNodeId;
+		
+		TAppProtAddr mCastAddr( KSsdpMulticastAddr, KUpnpMCPort );
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( MeshMachine::KActivityNull, NodeId () ), iAppProtIntfId, TAppProtIntfMessage::TJoinWithMulticastAddress ( mCastAddr ).CRef () );
+		}
+	else if ( TAppProtIntfMessage::ERealmId == aMessage.MessageId ().Realm () )
+		{
+        switch ( aMessage.MessageId ().MessageId () )
+	        {
+			case TAppProtIntfMessage::TJoinComplete::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TAppProtIntfMessage::TJoinComplete")));
+				iIsStarted = ETrue;
+				for ( TInt i = 0; i < iListenRequestors.Count (); i++ )
+					{
+					RClientInterface::OpenPostMessageClose ( NodeId (), iListenRequestors[i], TCFDataClient::TStarted ().CRef () );
+					}
+
+				iListenRequestors.Reset ();
+				}
+			break;
+
+			case TAppProtIntfMessage::TLeaveComplete::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TAppProtIntfMessage::TLeaveComplete")));
+				// post destroy to service provider
+				RClientInterface::OpenPostMessageClose ( NodeId (), iAppProtIntfId, TAppProtIntfMessage::TDestroy ().CRef () );
+				// post dataclient stopped to controlprovider
+				PostDataClientStopped ( iLastLeavingClient );
+				}
+			break;
+
+	        case TAppProtIntfMessage::TDataReceived::EId:
+	        	{
+	        	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TAppProtIntfMessage::TDataReceived")));
+	        	TAppProtIntfMessage::TDataReceived& msg = message_cast <TAppProtIntfMessage::TDataReceived> ( aMessage );
+	        	
+	        	if ( !iIsLeaving )
+		        	{
+		        	RMemoryAllocator allocator(static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf () )->GetMemoryChunkManager());
+		        	RMemChunk memChunk;
+		        	TUPnPMemoryUtils::CreateMemChunk(memChunk, msg.iData, allocator);
+
+					CRecvElement* element = new ( ELeave ) CRecvElement ( memChunk, msg.iAddr );
+					CleanupStack::PushL ( element );
+					iRecvElements.AppendL ( element );
+					CleanupStack::Pop ( element );
+					ParseIfOneRecvElement ();
+		        	}
+	        	msg.iData.Free ();
+	        	}
+	        break;
+
+	        case TAppProtIntfMessage::TError::EId:
+	        	{
+	        	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TAppProtIntfMessage::TError")));
+	        	// Note! Nothing to do if already leaving state,
+				// else need to send error to control clients and do listener cleanup
+	        	}
+	        break;
+
+	        default:
+		    break;
+	        }
+		}
+	else if ( TUpnpMessage::ERealmId == aMessage.MessageId ().Realm () )
+		{
+		switch ( aMessage.MessageId ().MessageId () )
+			{
+			case TUpnpMessage::TUPnPNotifyRegistration::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TUpnpMessage::TUPnPNotifyRegistration")));
+				RegisterL ( address_cast<TNodeCtxId> ( aSender ),
+							static_cast < TUpnpMessage::TUPnPNotifyRegistration& > ( aMessage ).iSsdpInfo.iSearchTarget,
+							iNotifyTargetArray );
+				}
+			break;
+
+			case TUpnpMessage::TUPnPPublishRegistration::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReceivedL - TUpnpMessage::TUPnPPublishRegistration")));
+				RegisterL ( address_cast<TNodeCtxId> ( aSender ),
+							static_cast < TUpnpMessage::TUPnPPublishRegistration& > ( aMessage ).iSsdpInfo.iSearchTarget,
+							iSearchTargetArray );
+				}
+			break;
+
+ 			case TUpnpMessage::TCancelRequest::EId:
+ 				{
+            	Unregister ( address_cast<TNodeCtxId> ( aSender ) );
+				RClientInterface::OpenPostMessageClose ( NodeId (), address_cast<TNodeCtxId> ( aSender ), TUpnpMessage::TCancelled ().CRef () );
+ 				}
+            break;
+			}
+		}
+	}
+	
+
+void CHttpMUdpFlow::StartFlow ( TNodeCtxId aSender )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("HttpMUdpFlow::StartFlow")));
+	if ( iIsStarted )
+		{
+		RClientInterface::OpenPostMessageClose ( NodeId (), aSender, TCFDataClient::TStarted ().CRef () );
+		return;
+		}
+
+	if ( !iIsStarted && iListenRequestors.Count () == 0 )
+		{
+		iListenRequestors.Append ( aSender );
+		CreateMulticastListener  ();
+		iIsLeaving = EFalse;
+		}
+
+	}
+
+void CHttpMUdpFlow::StopFlow ( TNodeCtxId aSender )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::StopFlow")));
+
+	SetClientLeaving ( aSender ); // set the control client leaving
+
+	if ( iIsStarted && CheckIfAllClientsLeaving ( ) )
+		{
+		MarkMeForDeletion ();
+		iLastLeavingClient = aSender;
+		iIsLeaving = ETrue;
+		iIsStarted = EFalse;
+
+		LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::StopFlow - Posting message TAppProtIntfMessage::TLeave")));
+		// leaving service provider
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( MeshMachine::KActivityNull, NodeId () ), iAppProtIntfId, TAppProtIntfMessage::TClientLeavingRequest ().CRef () );
+		}
+	else
+		{
+		PostDataClientStopped ( aSender );
+		}
+	}
+
+void CHttpMUdpFlow::ParseIfOneRecvElement ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ParseIfOneRecvElement")));
+	if ( iRecvElements.Count () == 1 )
+		{
+		ParseElement ();
+		}
+	}
+
+void CHttpMUdpFlow::ParseElement ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ParseElement")));
+	if ( iRecvElements.Count () > 0 )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ParseElement - Parsing request")));
+		iRequestParser->ParseRequest ( iRecvElements[0]->Data (), iUPnPRequest );
+		}
+	}
+
+void CHttpMUdpFlow::RemoveFirstRecvElement ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::RemoveFirstRecvElement")));
+	ASSERT ( iRecvElements.Count () > 0 );
+	CRecvElement* element = iRecvElements[0];
+	iRecvElements.Remove (0);
+	delete element;
+	}
+
+// From MParserObserver
+void CHttpMUdpFlow::GotHeaders ()
+	{
+	if ( ValidateRequest () != KErrNone )
+		{
+		DataParsed ();
+		}
+
+	// Else we will notify to the SCPR(s) from ParsingComplete.
+	}
+
+void CHttpMUdpFlow::DataParsed()
+	{
+	// Bad data. This is UDP. we should get everything or none
+	iRequestParser->DataFailed ();
+	iRequestParser->ResetParser ();
+	RemoveFirstRecvElement ();
+	ParseElement ();
+	}
+
+void CHttpMUdpFlow::ParsingComplete ( RMemChunk& /*aExcessData*/ )
+	{
+	NotifyClients ();
+	DataParsed ();
+	iUPnPRequest->Reset();
+	}
+
+void CHttpMUdpFlow::ParserError ( TInt /*aError*/ )
+	{
+	DataParsed (); // Bad data.
+	}
+
+
+void CHttpMUdpFlow::NotifyClients ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::NotifyClients")));
+	TInt method = iUPnPRequest->Handle ().Method ().Index ( TUPnPTable::Table() );
+	if ( method == UPnP::ENotify )	//control point end listening for notify packets
+		{
+		LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::NotifyClients - Handling NOTIFY request")));
+		TRAP_IGNORE ( HandleNotifyRequestL () );
+		}
+	else //if ( method == UPnP::EMSearch ) //service point end listening for m-search packets
+		{
+		LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::NotifyClients - Handling MSEARCH request")));
+		// CreateTimerEntry sets iEntry to the new timer entry and queues it in the deltatimer
+		TRAP_IGNORE ( CreateTimerEntryL() );
+		}
+	
+	return;
+	}
+
+void CHttpMUdpFlow::ReadRequestValues ( RStringF& aLocation, TInt& aMaxAge )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReadRequestValues - ST, USN, Location values")));
+	THTTPHdrVal value;
+	GetHeaderValue ( *iUPnPRequest, HTTP::ELocation, value , THTTPTable::Table());
+	aLocation = value.StrF ();
+
+	value.SetInt(KDeftMaxAgeVal);
+	GetParamValue ( *iUPnPRequest, HTTP::ECacheControl, HTTP::EMaxAge, value, THTTPTable::Table() );
+	aMaxAge = value.Int();
+	}
+
+void CHttpMUdpFlow::ReadRequestValues ( RStringF& aSt, RStringF& aUsn, RStringF& aNts)
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReadRequestValues - ST, USN values")));
+	THTTPHdrVal value = RStringF();
+	GetHeaderValue ( *iUPnPRequest, UPnP::EUSN, value, TUPnPTable::Table() );
+	aUsn = value.StrF ();
+
+	GetHeaderValue ( *iUPnPRequest, UPnP::ENT, value, TUPnPTable::Table() );
+	aSt = value.StrF ();
+
+	GetHeaderValue ( *iUPnPRequest, UPnP::ENTS, value, TUPnPTable::Table() );
+	aNts = value.StrF ();
+	}
+
+void CHttpMUdpFlow::ReadRequestValues ( TInt& aMaxAge, RStringF& aSt )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ReadRequestValues - Max-Age, NT values")));
+	THTTPHdrVal value;
+	GetHeaderValue ( *iUPnPRequest, UPnP::EMX, value, TUPnPTable::Table() );
+	aMaxAge = value.Int();
+
+	GetHeaderValue ( *iUPnPRequest, UPnP::EST, value, TUPnPTable::Table() );
+	aSt = value.StrF ();
+	}
+
+
+void CHttpMUdpFlow::HandleNotifyRequestL ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::HandleNotifyRequest")));
+	RStringF usn;
+	RStringF st;
+	RStringF nts;
+	RStringF location;
+	TInt maxAge = 0;
+	THTTPHdrVal value;
+	ReadRequestValues ( st, usn, nts );
+	for ( TInt i = 0; i < iNotifyTargetArray.Count (); ++i )
+		{
+		const CSearchTarget& target = *(iNotifyTargetArray[i]);
+
+		if ( target.Match ( st.DesC() ) != KErrNotFound &&
+		 							!IsClientLeaving ( target.Originator () ) )
+			{
+			// We have a match. Post the information to our control client
+			RMemoryAllocator allocator(static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf () )->GetMemoryChunkManager());
+			
+			RMemChunk usnBuf;
+			RMemChunk stBuf;
+			usnBuf.CreateL ( usn.DesC (), allocator );
+			TCleanupItem item ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &usnBuf );
+			CleanupStack::PushL ( item );
+			stBuf.CreateL ( st.DesC (), allocator );
+			TCleanupItem item2 ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &stBuf );
+			CleanupStack::PushL ( item2 );
+			if ( nts.DesC().CompareF ( KSsdpAlive ) == 0 )
+				{
+				LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::HandleNotifyRequest - Posting message TUpnpMessage::TUPnPPublishAliveRequest")));
+				ReadRequestValues ( location, maxAge );
+				RMemChunk locationBuf;
+				locationBuf.CreateL ( location.DesC (), allocator );
+				TCleanupItem item3 ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &locationBuf );				
+				CleanupStack::PushL ( item3 );
+				
+				TSsdpInfo info ( maxAge, locationBuf, usnBuf, stBuf );
+				RClientInterface::OpenPostMessageClose ( NodeId (), target.Originator (), TUpnpMessage::TUPnPPublishAliveRequest ( info ).CRef () );
+				
+				CleanupStack::Pop (); // item3
+				}
+			else
+				{
+				LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::HandleNotifyRequest - Posting message TUpnpMessage::TUPnPPublishByeRequest")));
+				TSsdpInfo info ( usnBuf, stBuf );
+				RClientInterface::OpenPostMessageClose ( NodeId (), target.Originator (), TUpnpMessage::TUPnPPublishByeRequest ( info ).CRef () );
+				}
+			CleanupStack::Pop (); // item2
+			CleanupStack::Pop (); // item3
+			}
+
+		}
+	}
+
+TInt CHttpMUdpFlow::HandleMSearchRequestL ( TAny* aPtr )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::HandleMSearchRequest")));	
+	CCallbackArgument* pointerData= static_cast<CCallbackArgument*> (aPtr);
+	CHttpMUdpFlow* thisObject= static_cast < CHttpMUdpFlow* > (pointerData->GetThisPointer());
+	RPointerArray<CTimerMappedUri>& rArray=thisObject->GetTimerArray();
+	RPointerArray<CCallbackArgument>& argArray = thisObject->GetArgumentArray();
+	CTimerMappedUri* timerUri = NULL;
+	for(TInt index=0; index < rArray.Count();index++)
+		{
+		if(rArray[index]->MatchTimerEntry( pointerData->GetTimerEntry() ))
+			{
+			// Removes the uri entry from the array
+			timerUri = rArray[index];
+			rArray.Remove(index);
+			break;
+			}
+		}
+	TInt index = argArray.Find( pointerData );
+	__ASSERT_DEBUG(index >= 0 , User::Invariant());
+	argArray.Remove( index );
+	const CSearchTarget& target = *(pointerData->SearchTarget());
+	// We have a match. Post the information to our control client
+	if ( !(thisObject->IsClientLeaving ( target.Originator () ) ))
+		{
+		RMemoryAllocator allocator(static_cast<CUPnPProtocolIntfBase *>( thisObject->ProtocolIntf () )->GetMemoryChunkManager());
+		RMemChunk stBuf;
+		if ( timerUri->GetUri().CompareF(KSsdpAll) == 0 )
+			{
+			stBuf.CreateL ( target.SearchTarget(), allocator );
+			}
+		else
+			{
+			stBuf.CreateL ( timerUri->GetUri(), allocator );			
+			}
+
+		TSsdpInfo info ( stBuf, pointerData->GetAddress()  );
+		RClientInterface::OpenPostMessageClose ( thisObject->NodeId (), target.Originator (), TUpnpMessage::TUPnPSearchRequest ( info ).CRef () );	
+		}
+	
+	delete timerUri;
+	delete pointerData;
+	return KErrNone;
+	}
+
+void CHttpMUdpFlow::RegisterL ( TNodeCtxId aChannelId, RMemChunk& aST, CSearchTargetArray& aArray )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::RegisterL")));
+	CSearchTarget* searchTarget = new ( ELeave ) CSearchTarget ( aChannelId );
+	CleanupStack::PushL ( searchTarget );
+	searchTarget->AddTargetL ( aST );
+	aArray.AppendL ( searchTarget );
+	CleanupStack::Pop (); // searchTarget
+	}
+
+void CHttpMUdpFlow::Unregister ( TNodeCtxId aSender )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::Unregister")));
+	
+	TBool isPublisher = EFalse;
+	TInt i = iSearchTargetArray.Count () - 1;
+	while ( i >= 0)
+		{	
+		if ( aSender.Ptr () == iSearchTargetArray[i]->Originator ().Ptr () )
+					  			// for Published SCPR there is no activity running,
+								// For Embedded and Root Device SCPR, there will be
+								// multiple Entries in SearchTargetArray, which will be removed with
+								// one TDataClientStop Message
+			{
+			LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::Unregister - target found in search array")));
+			CSearchTarget *target = iSearchTargetArray[i];
+			iSearchTargetArray.Remove(i);
+			CCallbackArgument* callArgument;
+			TInt index = iCallbackArray.Count() - 1;
+			while ( index >= 0 )
+				{
+				if (target == iCallbackArray[index]->SearchTarget())
+					{
+					callArgument  = iCallbackArray[index];
+					iCallbackArray.Remove( index );
+					for ( TInt j = 0; j < iTimerMappedArray.Count (); j++ )
+						{
+						if ( iTimerMappedArray[j]->MatchTimerEntry( callArgument->GetTimerEntry() ) )
+							{
+							// Removes the uri entry from the array
+							CTimerMappedUri* timerUri = iTimerMappedArray[j];
+							iDeltaTimer->Remove(timerUri->GetTimerEntry());
+							iTimerMappedArray.Remove(j);
+							delete timerUri;
+							break;
+							}
+						}
+					delete callArgument;	
+					}
+				--index;
+				}
+				
+			delete target;
+			isPublisher = ETrue;
+			}
+		
+		--i;
+		}
+	if ( isPublisher )
+		{
+		return;
+		}
+		
+	for ( TInt i = 0; i < iNotifyTargetArray.Count (); ++i )
+		{
+		if ( aSender == iNotifyTargetArray[i]->Originator () )	// for Register Notify if the activity is not running,
+															// there will not be any Entry in NotifyTargetArray
+			{
+			LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::Unregister - target found in notify array")));
+			CSearchTarget *target = iNotifyTargetArray[i];
+			iNotifyTargetArray.Remove(i);
+			delete target;
+			return;
+			}
+		}	
+	}
+
+void CHttpMUdpFlow::CreateMulticastListener ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::CreateMulticastListener")));
+	const TInt KAppProtIntfFactoryUid = 0x2000D05B; // Put in common place
+	//const TInt KGenericContainerIndex = 1;
+	TAppProtIntfQuery query ( KProtocolInetUdp, KUpnpMCPort );
+		
+	TCFFactory::TFindOrCreatePeer foMsg ( TCFPlayerRole::EDataPlane, TUid::Uid( KAppProtIntfFactoryUid ), &query );
+   // foMsg.PostTo ( SockManGlobals::Get()->GetPlaneFC ( EDataPlane, KGenericContainerIndex ) );
+    TNodeId containerId = static_cast<CUPnPProtocolIntfBase*>(ProtocolIntf())->GetAppProtIntfContainerId();
+    if ( containerId != TNodeId::NullId ( ) )
+    	{
+		RClientInterface::OpenPostMessageClose ( NodeId (), containerId, foMsg );
+    	}
+	}
+
+TInt CHttpMUdpFlow::ValidateRequest ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ValidateRequest")));
+	TInt err = KErrNone;
+	TInt method = iUPnPRequest->Handle ().Method ().Index ( TUPnPTable::Table() );
+
+	switch ( method )
+		{
+		case UPnP::ENotify:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ValidateRequest - Validating NOTIFY request")));
+			err = ValidateNotifyRequest ();
+			}
+		break;
+
+		case UPnP::EMSearch:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ValidateRequest - Validating MSEARCH request")));
+			err = ValidateMSearchRequest ();
+			}
+		break;
+
+		default:
+		err = KErrCorrupt;
+		break;
+		}
+
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ValidateRequest - Validating returned with error code = %d"), err));
+	return err;
+	}
+
+TInt CHttpMUdpFlow::ValidateNotifyRequest ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ValidateNotifyRequest")));
+	
+	if ( IsHeaderPresent ( *iUPnPRequest, UPnP::ENTS, TUPnPTable::Table() ) != KErrNone )
+		return KErrCorrupt;
+	
+	THTTPHdrVal value;
+	GetHeaderValue ( *iUPnPRequest, UPnP::ENTS, value, TUPnPTable::Table() );
+	if(value.StrF ().DesC().CompareF ( KSsdpBye )!= 0)
+		{
+		if ( IsValidCacheControlHeader ( *iUPnPRequest ) != KErrNone )
+		return KErrCorrupt;
+
+		if ( IsHeaderPresent ( *iUPnPRequest, HTTP::ELocation, THTTPTable::Table() ) != KErrNone )
+		return KErrCorrupt;
+		}
+
+	if ( IsHeaderPresent ( *iUPnPRequest, UPnP::ENT, TUPnPTable::Table() ) != KErrNone )
+		return KErrCorrupt;
+
+	return KErrNone;
+	}
+
+TInt CHttpMUdpFlow::ValidateMSearchRequest ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::ValidateMSearchRequest")));
+	if ( IsValidHostHeader ( *iUPnPRequest ) && IsValidManHeader ( *iUPnPRequest ) &&
+		IsHeaderPresent ( *iUPnPRequest, UPnP::EMX, TUPnPTable::Table() ) == KErrNone && IsHeaderPresent ( *iUPnPRequest, UPnP::EST, TUPnPTable::Table() )  == KErrNone )
+		return KErrNone;
+	return KErrCorrupt;
+	}
+
+TInt CHttpMUdpFlow::GetHeaderValue ( const CRequest& aRequest, TInt aFieldIndex, THTTPHdrVal& aFieldVal, const TStringTable& aTable ) const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::GetHeaderValue")));
+	CRequest& request = const_cast < CRequest& > ( aRequest  );
+	RRequest req = request.Handle ();
+	RHTTPHeaders headers = req.GetHeaderCollection ();
+	RStringF fieldStr = aRequest.StringPool ().StringF ( aFieldIndex, aTable );
+	return headers.GetField ( fieldStr, 0, aFieldVal );
+	}
+
+TInt CHttpMUdpFlow::GetParamValue ( const CRequest& aRequest , TInt aFieldIndex, TInt aParamIndex, THTTPHdrVal& aParamVal, const TStringTable& aTable ) const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::GetParamValue")));
+	CRequest& request = const_cast < CRequest& > ( aRequest  );
+	RRequest req = request.Handle ();
+	RHTTPHeaders headers = req.GetHeaderCollection ();
+	RStringF fieldStr = aRequest.StringPool ().StringF ( aFieldIndex, aTable );
+	RStringF paramStr = aRequest.StringPool ().StringF ( aParamIndex, aTable );
+	TInt err = KErrNone;
+	TInt fieldCount = 0;
+	TRAP ( err, fieldCount = headers.FieldPartsL(fieldStr) );
+	while (fieldCount>0)
+		{
+		err = headers.GetParam ( fieldStr, paramStr, aParamVal, fieldCount-1 );
+		if(err == KErrNone )
+			break;
+		fieldCount--;
+		}
+	return err;
+	}
+
+TBool CHttpMUdpFlow::IsHeaderPresent ( const CRequest& aRequest , TInt aFieldIndex, const TStringTable& aTable ) const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::IsHeaderPresent")));
+	THTTPHdrVal value;
+	return GetHeaderValue ( aRequest, aFieldIndex, value, aTable );
+	}
+
+TBool CHttpMUdpFlow::IsValidCacheControlHeader ( const CRequest& aRequest ) const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::IsValidCacheControlHeader")));
+	THTTPHdrVal value;
+	return GetParamValue ( aRequest, HTTP::ECacheControl, HTTP::EMaxAge, value, THTTPTable::Table());
+	}
+
+TBool CHttpMUdpFlow::IsValidManHeader ( const CRequest& aRequest ) const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::IsValidManHeader")));
+	THTTPHdrVal value;
+	TInt err = GetHeaderValue ( aRequest, UPnP::EMAN, value, TUPnPTable::Table() );
+	if ( ( err == KErrNone ) && ( value.StrF ().DesC ().Compare ( KSsdpDiscover ) == 0))
+		{
+		LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::IsValidManHeader - MAN header has a valid value")));
+		return ETrue;
+		}
+	LOG(ESockLogExternal::Printf(KSubsysMUDPFlow, KComponent, _L8("CHttpMUdpFlow::IsValidManHeader - MAN header does not have a valid value")));
+	return EFalse;
+	}
+
+TBool CHttpMUdpFlow::IsValidHostHeader ( CRequest& aRequest ) const
+	{
+	// From UPnP Device Architecture 1.0
+	// Must be 239.255.255.250:1900. If the port number(:1900) is omitted,the receiver
+	// should assume the default SSDP port number of 1900.
+	_LIT8 ( KSsdpHost, "239.255.255.250" );
+	
+	THTTPHdrVal value;
+	TInt err = GetHeaderValue ( aRequest, HTTP::EHost, value, THTTPTable::Table () );
+	if ( err != KErrNone )
+		{
+		return EFalse;
+		}
+	
+	const TDesC8& host = value.StrF ().DesC ();
+	TInt pos = host.Locate ( TChar (':') );
+	
+	if ( pos != KErrNotFound )
+		{
+		TPtrC8 ptrHost = host.Mid ( 0, pos );			
+		if ( ptrHost.Compare ( KSsdpHost ) != 0 )
+			{
+			return EFalse;
+			}
+		
+		TPtrC8 ptrPort = host.Mid ( pos + 1 );
+		_LIT8 ( KSsdpPort, "1900" );
+		
+		if ( ptrPort.Length () > 0 && ptrPort.Compare ( KSsdpPort ) != 0 )
+			{
+			return EFalse;
+			}
+		
+		return ETrue;
+		}
+	
+	if ( host.Compare ( KSsdpHost ) != 0 )
+		{
+		return EFalse;
+		}
+		
+	return ETrue;
+	}
+/* CreateTimerEntry : creates the deltatimer entry and sets it to iEntry
+ @param aUri  The uri whose timer entry has to be created
+ */
+void CHttpMUdpFlow::CreateTimerEntryL()
+	{
+	const TInt KMXValue = 120;
+	TInt maxAge = 0;
+	RStringF location;
+	ReadRequestValues ( maxAge, location );
+	if ( maxAge > KMXValue )
+		maxAge = KMXValue;
+	const TDesC8& uri = location.DesC();
+	for ( TInt i = 0; i < iSearchTargetArray.Count (); ++i )
+		{
+		const CSearchTarget& target = *(iSearchTargetArray[i]);
+		if ( target.Match ( uri ) != KErrNotFound )
+			{
+			CCallbackArgument* callArgument =CCallbackArgument::NewL(this, iRecvElements[0]->Address () , iSearchTargetArray[i]);
+			CleanupStack::PushL(callArgument);
+			TCallBack callBack(HandleMSearchRequestL,callArgument);
+			TDeltaTimerEntry* entry = new (ELeave) TDeltaTimerEntry ( callBack );
+			CTimerMappedUri* timerMappedUri = CTimerMappedUri::NewL(location.DesC(),entry,maxAge);
+			iTimerMappedArray.AppendL(timerMappedUri);
+			callArgument->SetTimerEntry( entry );
+			iCallbackArray.AppendL(callArgument);
+			CleanupStack::Pop();
+			// queue up in deltatimer
+			TInt time = AdjustedDelay(maxAge);
+			TTimeIntervalMicroSeconds32 delay(time);
+			iDeltaTimer->Queue(delay,*entry);
+			}	
+		}
+	}
+/* Used to calculate the time in microseconds to set the timer entry.Also a little
+ of time is used extra to account for Intra process communication
+ @param aTime	The time for which the timer has to be set in seconds
+ @return The actual time in microseconds
+ */
+TInt CHttpMUdpFlow::AdjustedDelay( TInt aTime )
+	{
+	TInt newNum;
+ 	TTime now;
+	now.UniversalTime();
+	TInt64 randSeed = now.Int64();
+	newNum = static_cast<TInt>(Math::Rand(randSeed)%aTime);
+  	const TUint KIntTime = 1000000 ;
+	newNum =  newNum * KIntTime ;
+	return newNum;
+	}
+CCallbackArgument* CCallbackArgument::NewL(TAny* aThis ,const TAppProtAddr& aAddress , const CSearchTarget* aStTarget)
+	{
+	CCallbackArgument* callArgument = new (ELeave )CCallbackArgument(aThis, aAddress , aStTarget);
+	return callArgument;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpserver.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,631 @@
+// 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 <ss_glob.h>
+#include <comms-infras/ss_nodemessages.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <elements/nm_interfaces.h>
+
+#include <httpstringconstants.h>
+#include <httperr.h>
+#include <http/thttptable.h>
+#include <http/framework/cheadercodecplugin.h>
+#include <upnp/tupnptable.h>
+#include <uriutils.h>
+
+#include "app_protintf_msgs.h"
+#include "httpserver.h"
+#include "ctransaction.h"
+#include "httpserverhandler.h"
+#include "httpevent.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+#include "upnppint.h"
+#include "upnpmemoryutils.h"
+
+__FLOG_STMT(_LIT8(KComponent,"Flow");)
+
+using namespace Messages;
+using namespace ESock;
+
+CServiceInfo* CServiceInfo::NewL ( const TDesC8& aUri, MHttpEventObserver& aObserver )
+	{
+	CServiceInfo* self = new (ELeave) CServiceInfo ( aObserver );
+	CleanupStack::PushL ( self );
+	self->ConstructL ( aUri );
+	CleanupStack::Pop (); // self
+	return self;
+	}
+
+TBool CServiceInfo::Match ( const TDesC8& aUri )
+	{
+	return ( iUri.CompareF ( aUri ) == 0 );
+	}
+
+TBool CServiceInfo::Match ( const TUriC8& aUri, const TDesC8& aHost ) const
+	{
+	// Check host matches
+	if ( aHost.Length () != 0 )
+		{
+		// Search if aHost has the port also.
+		TInt pos = aHost.Find(_L8(":"));
+		if((pos != KErrNotFound) && (UriUtils::HostType(aHost.Left(pos)) == UriUtils::EIPv4Host))
+			{
+			// Port number is present in aHost
+			if(iParsedUri.Extract(EUriHost).Compare(aHost.Left(pos)) == 0)
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("UriHost Matched")));
+				
+				// Check if the port in aHost matches with the port in iParsedUri
+				if(iParsedUri.Extract(EUriPort).Compare(aHost.Right(aHost.Length()-(pos+1))) !=0 )
+					{
+					// Port numbers did not match
+					LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("UriPort Not Matched")));	
+					return EFalse;	
+					}
+				}
+			else
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("UriHost Not Matched")));	
+				return EFalse;
+				}
+			}
+			
+		else if ( iParsedUri.Extract ( EUriHost ).CompareF ( aHost ) )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("UriHost Not Matched")));
+			return EFalse;
+			}
+		}
+	else
+		{
+		// Check if its matches in the Uri
+		if ( iParsedUri.Compare ( aUri, EUriHost ) )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("UriHost Not Matched")));
+			return EFalse;
+			}
+		}
+	// Check path component matches
+	if ( iParsedUri.Compare ( aUri, EUriPath ) )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("UriPath Not Matched")));
+		return EFalse;
+		}
+
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("UriPath Matched")));
+	return ETrue;
+	}
+
+CServiceInfo::CServiceInfo ( MHttpEventObserver& aObserver )
+: iObserver ( aObserver )
+	{
+
+	}
+
+void CServiceInfo::ConstructL ( const TDesC8& aUri )
+	{
+	User::LeaveIfError ( iParsedUri.Parse ( aUri ) );
+	iUri.CreateL ( aUri );
+	}
+
+CServiceInfo::~CServiceInfo ()
+	{
+	iUri.Close ();
+	}
+
+MHttpEventObserver& CServiceInfo::Observer () const
+	{
+	return iObserver;
+	}
+
+// -------------------------------------------------
+
+CServiceInfoArray::CServiceInfoArray ()
+	{
+	}
+
+CServiceInfoArray::~CServiceInfoArray ()
+	{
+	iServiceInfos.ResetAndDestroy ();
+	}
+
+void CServiceInfoArray::AddServiceUriL ( const TDesC8& aUri, MHttpEventObserver& aObserver )
+	{
+	TInt position = FindServiceUri ( aUri );
+	if( position != KErrNotFound )
+		{
+		User::Leave ( KErrAlreadyExists );
+		}
+
+	CServiceInfo* info = CServiceInfo::NewL ( aUri, aObserver );
+	CleanupStack::PushL ( info );
+	iServiceInfos.AppendL ( info );
+	CleanupStack::Pop (); // info
+	}
+
+void CServiceInfoArray::RemoveServiceUri ( const TDesC8& aUri )
+   	{
+   	TInt pos = FindServiceUri ( aUri );
+   	if ( pos != KErrNotFound  )
+   		{
+   		CServiceInfo* info = iServiceInfos [ pos ];
+   		iServiceInfos.Remove ( pos );
+   		delete info;
+   		}
+   	}
+
+TInt CServiceInfoArray::FindServiceUri ( const TDesC8& aUri )
+	{
+	for ( TInt i = 0; i < iServiceInfos.Count(); ++i )
+		{
+		if ( iServiceInfos[i]->Match( aUri ) )
+			return i;
+		}
+	return KErrNotFound;
+	}
+
+TInt CServiceInfoArray::MatchServiceUri ( const TUriC8& aUri, const TDesC8& aHost )
+	{
+	for ( TInt i = 0; i < iServiceInfos.Count(); ++i )
+		{
+		if ( iServiceInfos[i]->Match( aUri, aHost ) )
+			return i;
+		}
+	return KErrNotFound;
+	}
+
+TInt CServiceInfoArray::CountServiceUri ()
+	{
+	return iServiceInfos.Count();
+	}
+
+// -------------------------------------------------------------
+
+void HttpRequestUtils::ValidateL ( const CRequest& aRequest )
+	{
+	User::LeaveIfError ( ValidateMethod ( aRequest ) );
+	User::LeaveIfError ( ValidateHost ( aRequest ) );
+	}
+
+TInt  HttpRequestUtils::ValidateMethod ( const CRequest& aRequest )
+	{
+	// We validate the RFC2616 methods that we support. Currrent we support only
+	// GET and POST method. Other methods are validated in the protocol flow.
+
+	RStringF method = aRequest.Method ();
+	RStringPool strP = aRequest.StringPool();
+	
+	RStringF connect = strP.StringF(HTTP::ECONNECT, THTTPTable::Table());
+	RStringF del = strP.StringF(HTTP::EDELETE, THTTPTable::Table());
+	RStringF head = strP.StringF(HTTP::EHEAD, THTTPTable::Table());
+	RStringF options = strP.StringF(HTTP::EOPTIONS, THTTPTable::Table());
+	RStringF put = strP.StringF(HTTP::EPUT, THTTPTable::Table());
+	RStringF trace = strP.StringF(HTTP::ETRACE, THTTPTable::Table());
+	
+	if(aRequest.Method() == connect||aRequest.Method() == del||aRequest.Method() == head||
+	   aRequest.Method() == options||aRequest.Method() == put||aRequest.Method() == trace 
+	   )
+		{
+		return KErrNotSupported;
+		}
+	else
+		{
+		return KErrNone;
+		}
+	}
+
+TInt HttpRequestUtils::ValidateHost ( const CRequest& aRequest )
+	{
+	if ( !aRequest.IsHTTP10 () )
+		{
+		// HTTP/1.1 Host header must be present.
+		// Relevant information from RFC2616 Sec 14.23
+		// 1. A client MUST include a Host header field in all HTTP/1.1 request messages .
+		// 2. If the requested URI does not include an Internet host name for the service being requested, then the Host header
+		// field MUST be given with an empty value.
+		// Also from sec 19.6.1.1 - Servers MUST report a 400 (Bad Request) error if an HTTP/1.1 request does not include a Host
+		// request-header.
+		// For more information refer the above sections in RFC2616
+
+		// Note: ( seee above 2 ) - RFC2616 explicitly is not saying what we should do when we are having Host header field with
+		// emtpy value. Only it mandates the Host header field MUST be present if it is a HTTP/1.1 request. So we just check
+		// the presence of Host header field and we will leave rest to URI matching.
+		if ( !HttpRequestUtils::IsHostPresent ( aRequest ) )
+			{
+			return KErrCorrupt;
+			}
+		}
+	return KErrNone;
+	}
+
+TBool HttpRequestUtils::IsHostPresent ( const CRequest& aRequest )
+	{
+	CRequest& req = const_cast < CRequest& > ( aRequest );
+	RRequest request = req.Handle ();
+	RHTTPHeaders headers = request.GetHeaderCollection ();
+	RStringF hostStr = aRequest.StringPool ().StringF ( HTTP::EHost, THTTPTable::Table() );
+	THTTPHdrVal hostValue;
+	return headers.GetField(hostStr, 0, hostValue) == KErrNone;
+	}
+
+const TDesC8& HttpRequestUtils::HostStr ( const CRequest& aRequest )
+	{
+	CRequest& req = const_cast < CRequest& > ( aRequest );
+	RStringF hostStr = aRequest.StringPool ().StringF ( HTTP::EHost, THTTPTable::Table() );
+	RHTTPHeaders headers = req.Handle ().GetHeaderCollection ();
+	THTTPHdrVal hostValue;
+	if ( headers.GetField(hostStr, 0, hostValue) != KErrNotFound )
+		{
+		return hostValue.StrF ().DesC ();
+		}
+	return KNullDesC8 ();
+	}
+
+TBool HttpRequestUtils::IsConnectionRequired ( const CRequest& aRequest )
+	{
+	TBool bConnRequired = EFalse;
+	CRequest& req = const_cast < CRequest& > ( aRequest );
+	RRequest request = req.Handle ();
+	RHTTPHeaders headers = request.GetHeaderCollection ();
+	RStringF name = aRequest.StringPool ().StringF ( HTTP::EConnection, THTTPTable::Table() );
+	THTTPHdrVal value;
+
+	if ( request.IsHTTP10 () ) // HTTP 1.0 request,  check for keep alive header value.
+		{
+		// Check for Connection: Keep Alive header
+		if ( headers.GetField ( name, 0, value ) == KErrNone &&
+				value.Type ( ) == THTTPHdrVal::KStrFVal &&
+				value.StrF ( ).Index ( THTTPTable::Table() ) == HTTP::EKeepAlive )
+			{
+			bConnRequired = ETrue;
+			}
+		}
+	else // HTTP 1.1
+		{
+		// Check for Connection: Keep Alive header
+		if ( headers.GetField ( name, 0, value ) == KErrNone &&
+				value.Type ( ) == THTTPHdrVal::KStrFVal &&
+				value.StrF ( ).Index ( THTTPTable::Table() ) == HTTP::EClose )
+			{
+			bConnRequired = EFalse;
+			}
+		else
+			{
+			bConnRequired = ETrue;
+			}
+		}
+	return bConnRequired;
+	}
+
+// --------------------------------------------------------------
+
+CHttpServer* CHttpServer::NewL (ESock::CProtocolIntfBase* aProtIntf)
+	{
+	CHttpServer* self = new (ELeave)CHttpServer(aProtIntf);
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop ();
+	return self;
+	}
+
+CHttpServer::CHttpServer (ESock::CProtocolIntfBase* aProtIntf) : 
+		iStarted ( EFalse ), iIsLeaving ( EFalse ), iProtIntf ( aProtIntf )
+	{
+	LOG_NODE_CREATE ( KESockFlowTag, CHttpServer );
+	}
+
+CHttpServer::~CHttpServer ()
+	{
+	delete iServiceInfos;
+	delete iParser;
+	delete iComposer;
+	delete iTransaction;
+	if ( !iMemChunk.IsEmpty() )
+		iMemChunk.Free ();
+	iServerHandlerArray.ResetAndDestroy ();
+	iServiceControlProviderInfos.Reset ();
+	iServiceControlProviderInfos.Close ();
+	//delete iCodec;
+	iStringPool.Close();
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("Destroyed CHttpServer")));
+	LOG_NODE_DESTROY(KESockFlowTag, CHttpServer);
+	}
+
+void CHttpServer::ConstructL ()
+	{
+	iStringPool.OpenL(TUPnPTable::Table());
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL ( KUPnPCodecName, iStringPool );
+
+	iParser = CUpnpRequestParser::NewL ( *this );
+	iComposer = CUpnpResponseComposer::NewL ( *this );
+	iTransaction = CTransaction::NewL ( *iCodec, iStringPool );
+	iServiceInfos = new ( ELeave ) CServiceInfoArray;
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("Created CHttpServer")));
+	}
+
+void CHttpServer::AddServiceUriL ( const TDesC8& aUri, MHttpEventObserver& aObserver, TNodeCtxId aServiceId, TNodeCtxId aControlProviderId )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::AddServiceUriL")));
+	iServiceInfos->AddServiceUriL ( aUri, aObserver );
+
+	if ( iAppProtIntfId == TNodeId::NullId () && iServiceControlProviderInfos.Count () == 0 )
+		{
+		CreateListener ();
+		}
+
+	if ( !iStarted )
+		{
+		TServiceControlProviderInfo newInfo ( aServiceId, aControlProviderId );
+		iServiceControlProviderInfos.Append ( newInfo );
+		}
+	else
+		{
+		RClientInterface::OpenPostMessageClose ( aServiceId, aControlProviderId, ESock::TCFDataClient::TStarted ().CRef () );
+		}
+
+	}
+
+TBool CHttpServer::RemoveServiceUri ( const TDesC8& aUri, TNodeCtxId aServiceId, TNodeCtxId aControlProviderId )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::RemoveServiceUri")));
+	iServiceInfos->RemoveServiceUri ( aUri );
+
+	if ( iServiceInfos->CountServiceUri () == 0 ) // last service is stopped, so stop listener
+		{
+		iLastServiceControlProviderInfo.iServiceId = aServiceId;
+		iLastServiceControlProviderInfo.iControlProviderId = aControlProviderId;
+
+		iIsLeaving = ETrue;
+		StopServer ();
+		return ETrue;
+		}
+
+	if ( TNodeId::NullId () != aControlProviderId )
+		{		
+		RClientInterface::OpenPostMessageClose ( aServiceId, aControlProviderId, TCFDataClient::TStopped ( 0 ).CRef () );		
+		}
+	return EFalse;
+	}
+
+TBool CHttpServer::MatchRequestUri () const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::MatchRequestUri")));
+	CRequest* request = iTransaction->Request ();
+	return iServiceInfos->MatchServiceUri ( request->Handle ().URI (), HttpRequestUtils::HostStr ( *(iTransaction->Request ()) ) ) != KErrNotFound ? ETrue : EFalse;
+	}
+
+void CHttpServer::CreateListener ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::CreateListener")));
+	const TInt KAppProtIntfFactoryUid = 0x2000D05B; // Put in common place
+//	const TInt KGenericContainerIndex = 1;
+	const TInt KListenPort = 80; // Maybe we should make it as configurable and multiple ports
+	TAppProtIntfQuery query ( KProtocolInetTcp, KListenPort );
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::CreateListener - Posting message TCFMessage::TFindOrCreateFactoryObject")));
+	
+	TCFFactory::TFindOrCreatePeer foMsg ( TCFPlayerRole::EDataPlane, TUid::Uid( KAppProtIntfFactoryUid ), &query );
+//    foMsg.PostTo ( SockManGlobals::Get()->GetPlaneFC ( EDataPlane, KGenericContainerIndex ) );
+    TNodeId containerId = static_cast<CUPnPProtocolIntfBase*>(iProtIntf)->GetAppProtIntfContainerId();
+    if(containerId != TNodeId::NullId ( ))
+    	{    	
+    	RClientInterface::OpenPostMessageClose ( NodeId (), containerId, foMsg );
+    	}
+	}
+
+
+
+void CHttpServer::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::ReceivedL")));
+
+	if ( aMessage.MessageId ().Realm () == TCFFactory::ERealmId )
+		{
+		if ( aMessage.MessageId().MessageId()  == TCFFactory::TPeerFoundOrCreated::EId )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::ReceivedL - TCFMessage::TFOCreated")));
+			const TCFFactory::TPeerFoundOrCreated & msg = message_cast < const TCFFactory::TPeerFoundOrCreated  > ( aMessage );
+			iAppProtIntfId = msg.iNodeId;			
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( MeshMachine::KActivityNull, NodeId () ), iAppProtIntfId, TAppProtIntfMessage::TJoin ().CRef () );
+			}
+		}
+	else
+		{
+		switch ( aMessage.MessageId().MessageId() )
+			{
+			case TAppProtIntfMessage::TJoinComplete::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::ReceivedL - TAppProtIntfMessage::TJoinComplete")));
+
+				// We joined. Now we started listening for incomming connections
+				iStarted = ETrue;
+
+				for ( TInt i = 0; i < iServiceControlProviderInfos.Count (); i++ )
+					{
+					RClientInterface::OpenPostMessageClose ( iServiceControlProviderInfos[i].iServiceId, iServiceControlProviderInfos[i].iControlProviderId, TCFDataClient::TStarted ().CRef () );			
+					}
+				iServiceControlProviderInfos.Reset ();
+				}
+			break;
+
+			case TAppProtIntfMessage::TNewConnection::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::ReceivedL - TAppProtIntfMessage::TNewConnection")));
+
+				TAppProtIntfMessage::TNewConnection& currentMsg = message_cast < TAppProtIntfMessage::TNewConnection > ( aMessage );
+
+				if ( !iIsLeaving )
+					{
+		        	RMemoryAllocator allocator(static_cast<CUPnPProtocolIntfBase *>( iProtIntf )->GetMemoryChunkManager());
+		        	if ( iMemChunk.IsEmpty() )
+		        		{
+		        		TUPnPMemoryUtils::CreateMemChunk(iMemChunk, currentMsg.iData, allocator);
+						RMemChunk memChunk = iMemChunk;
+						iParser->ParseRequest ( memChunk, iTransaction->Request() );
+		        		}
+		        	else
+		        		{
+		        		//In case of More data parse only new data and then append to iMemChunk.
+						RMemChunk mChunk;
+						TUPnPMemoryUtils::CreateMemChunk(mChunk, currentMsg.iData, allocator);
+						RMemChunk memChunk = mChunk;
+						iParser->ParseRequest ( memChunk, iTransaction->Request() );
+						iMemChunk.Append(mChunk);
+			        	}
+					}
+				}
+			break;
+
+			case TAppProtIntfMessage::TTransferConnection::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::ReceivedL - TAppProtIntfMessage::TTransferConnection")));
+				// Now we are going to accept the connection. Create a new server handler and reset the parser
+				TAppProtIntfMessage::TTransferConnection& msg = message_cast < TAppProtIntfMessage::TTransferConnection > ( aMessage );
+
+				TransferConnectionL ( msg.iSocket, msg.iData );
+				}
+			break;
+
+			case TAppProtIntfMessage::TLeaveComplete::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::ReceivedL - TAppProtIntfMessage::TLeaveComplete")));
+
+				// post dataclient stopped to controlprovider
+				if ( TNodeId::NullId () != iLastServiceControlProviderInfo.iControlProviderId )
+					{
+					RClientInterface::OpenPostMessageClose ( iLastServiceControlProviderInfo.iServiceId, iLastServiceControlProviderInfo.iControlProviderId, TCFDataClient::TStopped ( 0 ).CRef () );
+					}
+
+				// post destroy to service provider				
+				RClientInterface::OpenPostMessageClose ( NodeId (), iAppProtIntfId, TAppProtIntfMessage::TDestroy ().CRef () );
+					
+				// make self destruction
+				delete this;
+				}
+			break;
+
+			case TAppProtIntfMessage::TError::EId:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::ReceivedL - TAppProtIntfMessage::TError")));
+				//Note! Nothing to do if already leaving state,
+				// else need to send error to control clients and do listener cleanup
+				}
+			break;
+
+			default:
+			break;
+			}
+		}
+	}
+
+void CHttpServer::StopServer ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::StopServer - Posting message TAppProtIntfMessage::TLeave")));
+	RClientInterface::OpenPostMessageClose ( TNodeCtxId ( MeshMachine::KActivityNull, NodeId () ), iAppProtIntfId, TAppProtIntfMessage::TClientLeavingRequest ().CRef () );				
+	}
+
+void CHttpServer::GotHeaders()
+	{
+	TRAPD(err, HttpRequestUtils::ValidateL(*(iTransaction->Request())));
+	if(err == KErrCorrupt)
+		{
+		// Generate an error response. 400 Bad Request
+		CHttpServerHandler::CreateResponse ( *(iTransaction->Response ()), HTTPStatus::EBadRequest );
+		iComposer->ComposeResponse ( iTransaction->Response () );
+		}
+
+	// If we are accepting the connection application protocol interface will
+	// send a TTransferConnection msg. In other case we will send a 404 Not Found response
+	else if ( MatchRequestUri () )
+		{
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( MeshMachine::KActivityNull, NodeId () ), iAppProtIntfId, TAppProtIntfMessage::TAcceptConnection ().CRef () );	
+		}
+	else
+		{
+		// Generate an error response. 404 Not Found
+		CHttpServerHandler::CreateResponse ( *(iTransaction->Response ()), HTTPStatus::ENotFound );
+		iComposer->ComposeResponse ( iTransaction->Response () );
+		}
+	// We can reset the parser now as we completed the URI matching.
+	// Reset the parser as we don't need to parse anymore
+	iParser->ResetParser ();
+	}
+
+void CHttpServer::DataParsed ()
+	{
+	RClientInterface::OpenPostMessageClose ( NodeId (), iAppProtIntfId, TAppProtIntfMessage::TMoreData ().CRef () );	
+	}
+
+void CHttpServer::ParserError ( TInt /*aError*/ )
+	{
+	// Reset the parser as we don't need to parse anymore
+	iParser->ResetParser ();
+	// Generate an error response. 400 Bad request
+	CHttpServerHandler::CreateResponse ( *(iTransaction->Response ()), HTTPStatus::EBadRequest );
+	iComposer->ComposeResponse ( iTransaction->Response () );
+	}
+
+void CHttpServer::MessageDataReadyL ( RBuf8& aData )
+	{
+	RMBufChain data;	//Need to Check
+	data.CreateL(aData);
+	RejectConnection ( data );
+	iComposer->ResponseDataSent ();
+ 	iComposer->ResetComposer (); // composer's DataState is left in WaitingForRelease, so Reset it
+	}
+
+void CHttpServer::ComposerError ( TInt /*aError*/ )
+	{
+	RMBufChain data;
+	RejectConnection ( data );
+	iComposer->ResetComposer ();
+	}
+
+void CHttpServer::RejectConnection ( RMBufChain& aData )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::RejectConnection")));
+	
+	// Sending an eror response.
+	TAppProtIntfMessage::TRejectConnection msg ( aData );
+	RClientInterface::OpenPostMessageClose ( NodeId (), iAppProtIntfId, msg );
+	
+	// Reset our current transaction
+	iTransaction->Reset ();
+	}
+
+
+void CHttpServer::TransferConnectionL ( RInternalSocket& aSocket, RMBufChain& aData )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpServer, KComponent, _L8("CHttpServer::TransferConnectionL")));
+
+	if ( iIsLeaving )
+		{
+		aSocket.Close ();
+		}
+	else
+		{
+		CChunkManager* chunkMgr = static_cast<CUPnPProtocolIntfBase *>( iProtIntf )->GetMemoryChunkManager();
+		CHttpServerHandler* serverHandler = CHttpServerHandler::NewL ( aSocket, iMemChunk, *iServiceInfos, iServerHandlerArray, *iCodec, iStringPool, chunkMgr );
+		CleanupStack::PushL ( serverHandler );
+		iServerHandlerArray.AppendL ( serverHandler );
+		CleanupStack::Pop (); // serverHandler
+
+		iTransaction->Reset ();
+		}
+	aData.Free ();
+	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpserverflow.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,900 @@
+// 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:
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_nodeinterfaces.h>
+
+#include <httpstringconstants.h>
+#include <http/thttphdrval.h>
+#include <httperr.h>
+#include <http/thttptable.h>
+#include <upnp/tupnptable.h>
+
+//Local Includes
+#include "httpserverflow.h"
+#include "upnppint.h"
+#include "httpserver.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+#include "upnpmemoryutils.h"
+
+__FLOG_STMT(_LIT8(KComponent,"Flow");)
+using namespace ESock;
+
+CHttpServerFlow* CHttpServerFlow::NewL ( CSubConnectionFlowFactoryBase& aFactory, CProtocolIntfBase* aProtocolIntf, const TDesC8& aUri, const TNodeId& aSubConnId )
+	{
+	CHttpServerFlow* self = new (ELeave) CHttpServerFlow( aFactory, aProtocolIntf, aSubConnId);
+	CleanupStack::PushL ( self );
+	self->ConstructL ( aUri );
+	CleanupStack::Pop (); // self
+	return self;
+	}
+
+CHttpServerFlow::CHttpServerFlow(CSubConnectionFlowFactoryBase& aFactory, ESock::CProtocolIntfBase* aProtocolIntf, const TNodeId& aSubConnId )
+	: CUPnPFlowBase( aFactory, aProtocolIntf, EHttpServerFlow, aSubConnId ),
+	iControlId ( 1 )
+	{
+	LOG_NODE_CREATE ( KESockFlowTag, CHttpServerFlow );
+	}
+
+void CHttpServerFlow::ConstructL ( const TDesC8& aUri )
+	{
+	iUri.CreateL ( aUri );
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("Created CHttpServerFlow")));
+	}
+
+CHttpServerFlow::~CHttpServerFlow ()
+	{
+	iUri.Close ();
+	iSubConnectionProvider.Close ();
+	iControlTransactions.Reset();
+	iControlTransactions.Close ();
+
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("Destroyed CHttpServerFlow")));
+	LOG_NODE_DESTROY(KESockFlowTag, CHttpServerFlow);
+	}
+
+//From CSubConnectionFlowBase MNode
+void CHttpServerFlow::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ReceivedL")));
+    
+   	if ( aMessage.IsMessage<TEChild::TDestroy> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ReceivedL - Deleting current flow")));
+        if ( iSessionControlNotify )
+	       	{
+           	iSessionControlNotify->CanClose( MSessionControlNotify::EDelete );
+	       	}
+       	DeleteThisFlow ();
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStart> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ReceivedL - TCFMessage::TDataClientStart")));
+        StartFlow ( address_cast < TNodeCtxId > ( aSender ) );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStop> () )
+		{
+       	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ReceivedL - TCFMessage::TDataClientStop")));
+       	StopFlow ( address_cast < TNodeCtxId > ( aSender ) );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPResponseInfo> () )
+    	{
+    	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ReceivedL - TUpnpMessage::TUPnPResponseInfo")));
+    	const TUpnpMessage::TUPnPResponseInfo& msg = message_cast < TUpnpMessage::TUPnPResponseInfo > ( aMessage );
+    	CServerTransaction* trans = static_cast < CServerTransaction* > ( msg.iTrans );
+    	RMBufChain dataChain;
+    	TUPnPMemoryUtils::CreateMBuf(dataChain, trans->MemParts());
+    	trans->FreeMemChunk();
+    	trans->AddBodyPart(dataChain);
+    	HandleUPnPResponseL ( trans, msg.iStatus, msg.iInfo );
+    	}
+	}
+	
+
+MFlowBinderControl* CHttpServerFlow::DoGetBinderControlL()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::DoGetBinderControlL")));
+    return this;
+	}
+
+// MFlowBinderControl
+CSubConnectionFlowBase* CHttpServerFlow::Flow()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::Flow")));
+	return	this;
+	}
+
+MSessionControl* CHttpServerFlow::GetControlL (TInt /*aSessionType*/, MSessionControlNotify& aSessionControlNotify)
+    {
+    LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::GetControlL")));
+    ASSERT(iSessionControlNotify == NULL);
+	iSessionControlNotify = &aSessionControlNotify;
+
+    //As of now UPnP Flow doesn't care more abt SessionType, since i'm caring abt only CSocket Binding,
+    //May be for RInternalSocket binding this needs to be iterated.
+
+	return this;
+    }
+
+MSessionData* CHttpServerFlow::BindL(MSessionDataNotify& aNotify)
+    {
+    LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::BindL")));
+	ASSERT(iSessionDataNotify == NULL);
+	iSessionDataNotify = &aNotify;
+	iSubConnectionProvider.PostMessage ( Id (), TCFControlProvider::TActive ().CRef () );
+	return this;
+    }
+
+void CHttpServerFlow::Unbind()
+    {
+    LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::Unbind")));
+    iSessionControlNotify = NULL;
+	iSessionDataNotify = NULL;
+	}
+
+// MSessionControl
+void CHttpServerFlow::Shutdown(MSessionControl::TCloseType aOption)
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::Shutdown")));
+
+	if ( MSessionControl::ENormal == aOption )
+		{
+		// error the pending control transactions
+		TUint count = iControlTransactions.Count ();
+
+		for ( TInt pos = 0; pos < count; pos++ )
+			{
+			CServerTransaction& trans = iControlTransactions[pos].iTransaction;
+			if ( !trans.ReadyToSend () )
+				{
+				// If we are not in ready to send state, it means that, we haven't created the response yet.
+				CHttpServerHandler::CreateResponse ( *( trans.Response() ), HTTPStatus::EInternalServerError, &trans.ServerObserver() );
+				trans.SetReadyToSend ();
+				THTTPEvent evt ( THTTPEvent::EGotResponseHeaders );
+				trans.ServerObserver ().OnHttpEvent ( &trans, evt );
+				}
+			else if ( trans.CloseNeeded () )
+				{
+				THTTPEvent evt ( THTTPEvent::EFailed );
+				trans.ServerObserver ().OnHttpEvent ( &trans, evt );
+				}
+			}
+
+		// remove control uri from http server, in order not to service further requests
+		TNodeCtxId serviceId ( MeshMachine::KActivityNull, NodeId () );
+		TNodeCtxId controlProviderId ( MeshMachine::KActivityNull, TNodeId::NullId () );
+		static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf () )->RemoveServiceUri ( iUri, serviceId, controlProviderId );
+
+		// send data client idle to scpr
+		iSubConnectionProvider.PostMessage ( Id (), TCFControlProvider::TIdle ().CRef () );
+		}
+	}
+
+void CHttpServerFlow::ActiveOpen()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ActiveOpen")));
+	iSessionControlNotify->ConnectComplete();
+	}
+
+TInt CHttpServerFlow::GetOption(TUint aLevel, TUint aName, TDes8& anOption) const
+	{
+	if ( aLevel == KCHOptionLevel )
+		{
+
+		TControlTransaction trans ( FirstControlTransactionToNotify () );
+		switch ( aName )
+			{
+			case KCHMaxLength:
+				{
+				THTTPHdrVal value;
+				if ( GetHeaderValue ( *(trans.iTransaction.Request()), HTTP::EContentLength, value, THTTPTable::Table() ) == KErrNotFound )
+					{
+					*(TInt*) anOption.Ptr () = KErrUnknown;
+					}
+				else
+					{
+					*(TInt*) anOption.Ptr () = value.Int ();
+					}
+				}
+			break;
+
+			case KCHLastMessage:
+				{
+				*(TUint*) anOption.Ptr() = ( trans.iReadComplete && trans.iTransaction.BodyParts ().Length () == 0 );
+				}
+			break;
+
+			default:
+			ASSERT(0);
+			}
+		}
+	return 0;
+	}
+
+TInt CHttpServerFlow::SetOption(TUint level, TUint name, const TDesC8& anOption)
+	{
+	TInt err = KErrNone;
+	if ( level == KCHOptionLevel )
+		{
+		TPckgBuf <TCHMessageOption> option;
+		option.Copy ( anOption );
+		TInt pos = FindControlTransaction ( option().iId );
+		if ( pos == KErrNotFound )
+			return pos;
+		TControlTransaction trans ( iControlTransactions[pos] );
+		switch ( name )
+			{
+			case KCHMaxLength:
+				{
+				TRAP ( err, SetHeaderL ( *( trans.iTransaction.Response() ), HTTP::EContentLength, option().iValue, THTTPTable::Table() ) );
+
+				if ( err == KErrNone )
+					{
+					// This will set the basic headers
+					CHttpServerHandler::CreateResponse( *( trans.iTransaction.Response() ), HTTPStatus::EOk, &trans.iTransaction.ServerObserver() );
+					}
+				else
+					{
+					CHttpServerHandler::CreateResponse( *( trans.iTransaction.Response() ), HTTPStatus::EInternalServerError, &trans.iTransaction.ServerObserver() );
+					}
+
+				// Set the content length.
+				trans.iTransaction.SetDataLeft ( option().iValue );
+				// commented to solve race issue...
+				//trans.iTransaction.SetReadyToSend ();   // Move to the ready to send state. When the next write happens
+														// we just say body data is available
+				//THTTPEvent evt ( THTTPEvent::EGotResponseHeaders );
+				//trans.iTransaction.ServerObserver().OnHttpEvent ( &trans.iTransaction, evt );
+				}
+			break;
+
+			case KCHLastMessage:
+				{
+				trans.iTransaction.SetComplete();
+				THTTPEvent evt ( THTTPEvent::EResponseComplete );
+				trans.iTransaction.ServerObserver().OnHttpEvent ( &trans.iTransaction, evt );
+				}
+			break;
+
+			default:
+			ASSERT(0);
+			}
+		}
+	return err;
+	}
+
+// MSessionData
+
+TInt CHttpServerFlow::Write ( RMBufChain& aData, TUint aOptions, TSockAddr* /* anAddr */ )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::Write")));
+	TInt pos = FindControlTransaction ( aOptions );
+	TInt ret = KErrNone;
+	if ( pos == KErrNotFound )
+		return pos;
+
+	TInt len = aData.Length ();
+	CServerTransaction& trans = iControlTransactions[pos].iTransaction;
+	trans.AddBodyPart( aData );
+
+	if ( !trans.ReadyToSend() )
+		{
+		// If we are not in ready to send state, it means that, we haven't created the response yet.
+		trans.SetReadyToSend ();
+		THTTPEvent evt ( THTTPEvent::EGotResponseHeaders );
+		ret = trans.ServerObserver().OnHttpEvent ( &trans, evt );
+		}
+	else
+		{
+		THTTPEvent evt ( THTTPEvent::EGotResponseBodyData );
+		ret = trans.ServerObserver().OnHttpEvent ( &trans, evt );
+		}
+	if(ret != KErrNone)
+		{
+		RemoveControlTransaction ( iControlTransactions[pos].iId );
+		//Ownership is transferred to trans Object.
+		aData.Init ();
+		return ret;
+		}
+	
+	// remove control transaction object if complete data is received from socket
+	if ( !trans.CloseNeeded () ) // closed needed informs that complete data is not yet received
+		{
+		RemoveControlTransaction ( iControlTransactions[pos].iId );
+		}
+	
+	aData.Init ();
+	return len;
+	}
+
+TInt CHttpServerFlow::GetData ( RMBufChain& aData, TUint aLength, TUint /*aOptions*/, TSockAddr* /*anAddr*/ )
+	{
+	__ASSERT_DEBUG ( iControlTransactions.Count(), User::Invariant() );
+	CServerTransaction& trans = FirstControlTransactionToNotify ().iTransaction;
+
+	RMBufChain newChain;
+	RMBufChain& bodyChain = trans.BodyParts ();
+	TInt err = bodyChain.Split ( aLength, newChain );
+	if ( err != KErrNone )
+		{
+		// Our request validation failed. Generate the response
+		CHttpServerHandler::CreateResponse ( *( trans.Response () ), err, &trans.ServerObserver() );
+		THTTPEvent evt ( THTTPEvent::ECompleteResponse );
+		trans.ServerObserver().OnHttpEvent ( &trans, evt );
+		}
+
+	aData.Assign ( bodyChain );
+	bodyChain = newChain;
+
+	return aData.Length();
+	}
+
+// From MHttpEventObserver
+TInt CHttpServerFlow::OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::OnHttpEvent")));
+	TInt ret = KErrNone;
+
+	switch ( aEvent.iStatus  )
+		{
+		case THTTPEvent::EGotRequestHeaders:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::OnHttpEvent - THTTPEvent::EGotRequestHeaders")));
+			ret = ValidateUPnPRequest( *aTransaction );
+			}
+			break;
+
+		default:
+			ret = RouteTransaction ( static_cast < CServerTransaction& > (*aTransaction), aEvent );
+			break;
+		}
+
+	if ( ret != KErrNone )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::OnHttpEvent - THTTPEvent::EGotRequestHeaders - Creating response")));
+		// Our request validation failed. Generate the response
+		CHttpServerHandler::CreateResponse ( *( aTransaction->Response () ), ret, &(static_cast < CServerTransaction& > (*aTransaction).ServerObserver()) );
+		( static_cast < CServerTransaction* > ( aTransaction ) )->SetComplete ();
+		( static_cast < CServerTransaction* > ( aTransaction ) )->SetReadyToSend ();
+		}
+	return KErrNone;
+	}
+
+void CHttpServerFlow::StartFlow ( TNodeCtxId aSender )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::StartFlow")));
+
+	TNodeCtxId serviceId ( MeshMachine::KActivityNull, NodeId () );	
+	TRAPD ( err, static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf() )->AddServiceUriL( iUri, *this, serviceId, aSender ) );
+	
+	if ( err != KErrNone )
+		iSubConnectionProvider.PostMessage ( Id (), TEBase::TError ( TCFDataClient::TStart::Id (), err ).CRef() );
+	}
+
+void CHttpServerFlow::StopFlow ( TNodeCtxId aSender )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::StopFlow")));
+
+	TNodeCtxId serviceId ( MeshMachine::KActivityNull, NodeId () );	
+	__ASSERT_DEBUG  ( iSubConnectionProvider.RecipientId () == aSender, User::Invariant () );
+
+	static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf () )->RemoveServiceUri ( iUri, serviceId, aSender );
+	}
+
+TInt CHttpServerFlow::RouteTransaction ( CServerTransaction& aTrans, THTTPEvent& aEvent )
+	{
+	//  ... Support chunked-encoding here for the request body data incase of POST & MPOST.
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::RouteTransaction")));
+	TBool dataUp = EFalse;
+
+	RStringF post = aTrans.Request()->Method().Pool().StringF(HTTP::EPOST, THTTPTable::Table());
+	RStringF mPost = aTrans.Request()->Method().Pool().StringF(UPnP::EMPost, TUPnPTable::Table());
+	
+	if((aTrans.Request()->Method() == post) || (aTrans.Request()->Method() == mPost))
+		{
+		dataUp = ETrue;
+		}
+
+	switch ( aEvent.iStatus )
+		{
+		case THTTPEvent::EGotRequestBodyData:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::RouteTransaction - THTTPEvent::EGotRequestBodyData")));
+			MHTTPDataSupplier* bodySupplier = aTrans.Request( )->Body( );
+			ASSERT(bodySupplier);
+
+			TPtrC8 bodyPtr;
+			RMBufChain bodyChain;
+			bodySupplier->GetNextDataPart ( bodyPtr );
+			bodyChain.Create ( bodyPtr );
+			aTrans.AddBodyPart( bodyChain );
+			bodySupplier->ReleaseData( );
+
+			if ( dataUp )
+				{
+				TInt index = FindOrCreateControlTransaction ( aTrans );
+				if ( index < KErrNotFound )
+					{
+					return HTTPStatus::EInternalServerError;
+					}
+
+				TInt notifyDataLen = 0;
+				if ( !iControlTransactions[index].iReadTriggered )
+					{
+					notifyDataLen = sizeof ( TInt );
+					iControlTransactions[index].iReadTriggered = ETrue;
+					}
+
+				iSessionDataNotify->NewData ( notifyDataLen + bodyPtr.Length () );
+				}
+			}
+			break;
+		case THTTPEvent::ERequestComplete:
+			{
+			if ( !dataUp )
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::RouteTransaction - THTTPEvent::ERequestComplete")));
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::RouteTransaction - THTTPEvent::ERequestComplete - Posting message TUpnpMessage::TUPnPRequestInfo")));
+
+				IterateHeaders ( *aTrans.Request() );		
+				// Post the response to the SCPR
+				iSubConnectionProvider.PostMessage ( Id (), TUpnpMessage::TUPnPRequestInfo ( &aTrans ).CRef () );
+				}
+			else
+				{
+				TInt index = FindOrCreateControlTransaction ( aTrans );
+				iControlTransactions[index].iReadComplete = ETrue;
+				// make sure if receive is pending, ASocket will complete it
+				iSessionDataNotify->NewData ( 0 );
+				}
+			}
+		break;
+
+		default:
+		ASSERT(0);
+		break;
+		}
+	return KErrNone;
+	}
+
+TInt CHttpServerFlow::GetHeaderValue ( const CRequest& aRequest, TInt aFieldIndex, THTTPHdrVal& aFieldVal, const TStringTable& aTable ) const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::GetHeaderValue")));
+	CRequest& req = const_cast < CRequest& > ( aRequest );
+	RRequest request = req.Handle ();
+	RHTTPHeaders headers = request.GetHeaderCollection ();
+	RStringF fieldStr = aRequest.StringPool ().StringF ( aFieldIndex, aTable );
+	return headers.GetField ( fieldStr, 0, aFieldVal );
+	}
+
+TBool CHttpServerFlow::MatchHeaderValue ( const CRequest& aRequest, TInt aFieldIndex, const TDesC8& aFieldValue, const TStringTable& aTable )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::MatchHeaderValue")));
+	THTTPHdrVal value;
+	if (  GetHeaderValue ( aRequest, aFieldIndex, value, aTable ) == KErrNone )
+		{
+		RStringF valStr = value.StrF();
+		if ( valStr.DesC ().Compare ( aFieldValue ) == 0 )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::MatchHeaderValue - Returned ETrue")));
+			return ETrue;
+			}
+		}
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::MatchHeaderValue - Returned EFalse")));
+	return EFalse;
+	}
+
+TBool CHttpServerFlow::IsHeaderPresent ( const CRequest& aRequest, TInt aFieldIndex, const TStringTable& aTable )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::IsHeaderPresent")));
+	THTTPHdrVal value;
+	return GetHeaderValue ( aRequest, aFieldIndex, value, aTable ) == KErrNone;
+	}
+
+TBool CHttpServerFlow::IsValidNTHeader ( const CRequest& aRequest )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::IsValidNTHeader")));
+	_LIT8 ( KNTValue, "upnp:event" );
+	return MatchHeaderValue ( aRequest, UPnP::ENT, KNTValue(), TUPnPTable::Table() );
+	}
+
+TBool CHttpServerFlow::IsValidContentTypeHeader ( const CRequest& aRequest )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::IsValidContentTypeHeader")));
+	_LIT8 ( KContentTypeValue, "text/xml" );
+	return MatchHeaderValue ( aRequest, HTTP::EContentType, KContentTypeValue(), THTTPTable::Table() );
+	}
+
+TBool CHttpServerFlow::IsValidNTSHeader ( const CRequest& aRequest )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::IsValidNTSHeader")));
+	_LIT8 ( KNTSValue, "upnp:propchange" );
+	return MatchHeaderValue ( aRequest, UPnP::ENTS, KNTSValue(), TUPnPTable::Table() );
+	}
+
+TBool CHttpServerFlow::IsValidManHeader ( const CRequest& aRequest )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::IsValidManHeader")));
+	_LIT8 ( KManValue, "http://schemas.xmlsoap.org/soap/envelope/");
+	return MatchHeaderValue ( aRequest, UPnP::EMAN, KManValue(), TUPnPTable::Table() );
+	}
+
+void CHttpServerFlow::SetHeaderL ( CResponse& aRequest, TInt aFieldIndex, RMemChunk& aVal, const TStringTable& aTable )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::SetHeaderL")));
+	RStringPool sp = aRequest.StringPool ();
+	RHTTPHeaders hdr = aRequest.Handle ().GetHeaderCollection ();
+	TPtrC8 value;
+	value.Set ( aVal.First()->Ptr (), aVal.Length () );
+	RStringF valStr = sp.OpenFStringL ( value );
+	THTTPHdrVal hdrVal ( valStr );
+	hdr.SetFieldL ( sp.StringF(aFieldIndex, aTable ), hdrVal );
+	valStr.Close ();
+	}
+
+void CHttpServerFlow::SetHeaderL ( CResponse& aRequest, TInt aFieldIndex, TInt aVal, const TStringTable& aTable )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::SetHeaderL")));
+	RStringPool sp = aRequest.StringPool ();
+	RHTTPHeaders hdr = aRequest.Handle ().GetHeaderCollection ();
+	THTTPHdrVal hdrVal ( aVal );
+	hdr.SetFieldL ( sp.StringF(aFieldIndex, aTable ), hdrVal );
+	}
+
+
+// Returns KErrNone if validation is suceeded otherwise one of the HTTP error status code will be returned
+TInt CHttpServerFlow::ValidateUPnPRequest ( const CTransaction& aTrans )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest")));
+	
+	RStringF get = aTrans.Request()->Method().Pool().StringF(HTTP::EGET, THTTPTable::Table());
+	RStringF post = aTrans.Request()->Method().Pool().StringF(HTTP::EPOST, THTTPTable::Table());
+	TInt method = KErrNotFound;
+	TInt ret = KErrNone;
+	
+	if((aTrans.Request()->Method() == get)||(aTrans.Request()->Method() == post))
+		{
+		method = aTrans.Request()->Method().Index(THTTPTable::Table());
+		switch ( method )
+			{
+			case HTTP::EGET:
+			break;
+
+			case HTTP::EPOST:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest - Validating POST request")));
+				ret = ValidatePostRequest ( aTrans );
+				}
+			break;
+
+			default:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest - HTTPStatus::ENotImplemented")));
+				ret = HTTPStatus::ENotImplemented;
+				}
+			break;
+			}
+		}
+	
+	else
+		{
+		method = aTrans.Request()->Method().Index(TUPnPTable::Table());
+		switch ( method )
+			{
+			case UPnP::EMPost:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest - Validating MPOST request")));
+				ret = ValidateMPostRequest ( aTrans );
+				}
+			break;
+
+			case UPnP::ESubscribe:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest - Validating SUBSCRIBE request")));
+				ret = ValidateSubscribeRequest ( aTrans );
+				}
+			break;
+
+			case UPnP::EUnsubscribe:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest - Validating UNSUBSCRIBE request")));
+				ret = ValidateUnsubscribeRequest ( aTrans );
+				}
+			break;
+
+			case UPnP::ENotify:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest - Validating NOTIFY request")));
+				ret = ValidateNotifyRequest ( aTrans );
+				}
+			break;
+
+			default:
+				{
+				LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest - HTTPStatus::ENotImplemented")));
+				ret = HTTPStatus::ENotImplemented;
+				}
+			break;
+			}
+		}
+	
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUPnPRequest - Returned with error code = %d"), ret));
+	return ret;
+	}
+
+// Returns KErrNone if validation is suceeded otherwise one of the HTTP error status code will be returned
+TInt CHttpServerFlow::ValidateSubscribeRequest ( const CTransaction& aTrans )
+	{
+	// General: SUBSCRIBE request MUST not contain a body
+	// 1. Subscribing: SUBSCRIBE request MUST contain a CALLBACK, NT headers. The NT header valus MUST be
+	// "upnp:event".
+	// Response: 412 status code ( pre-condition failed) - If NT or CALLBACK request header is not present
+	//	400 Bad request - If SID header and one of NT or CALLBACK headers are present
+	// 2. Re-subscribing: SUBSCRIBE request MUST contain a SID header and MUST not contain
+	// a CALLBACK or NT header.
+	// Response: Same as 1 except, if the SID is not valid we respond with 412 ( pre-condition failed )
+	// The 412 error condition is handled in this case by the SCPR. Here we will not check whether the
+	// SID is valid or not
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateSubscribeRequest")));
+	CRequest& request = *( aTrans.Request () );
+
+	if ( request.Handle ().HasBody () )
+		return HTTPStatus::EBadRequest; // MUST not contain a body
+
+	TBool callback = IsHeaderPresent ( request, UPnP::ECallback, TUPnPTable::Table() );
+	TBool nt = 	IsHeaderPresent ( request, UPnP::ENT, TUPnPTable::Table() );
+	TBool sid = IsHeaderPresent ( request, UPnP::ESID, TUPnPTable::Table() );
+
+	if ( callback && nt )
+		{
+		// Subscription request
+		// Check the NT header value == MUST be "upnp:event"
+		if ( IsValidNTHeader ( request ) )
+			return sid ? HTTPStatus::EBadRequest : KErrNone;
+		}
+	if ( sid )
+		{
+		// Re-subscribe request
+		return ( callback || nt ) ? HTTPStatus::EBadRequest : KErrNone;
+		}
+
+	// Otherwise pre-condition failed
+	return HTTPStatus::EPreconditionFailed;
+	}
+
+// Returns KErrNone if validation is suceeded otherwise one of the HTTP error status code will be returned
+TInt CHttpServerFlow::ValidateUnsubscribeRequest ( const CTransaction& aTrans )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateUnsubscribeRequest")));
+	// General: UNSUBSCRIBE request MUST not contain a body
+	CRequest& request = *( aTrans.Request () );
+
+	if ( request.Handle ().HasBody () )
+		return HTTPStatus::EBadRequest; // MUST not contain a body
+
+	TBool callback = IsHeaderPresent ( request, UPnP::ECallback, TUPnPTable::Table() );
+	TBool nt = 	IsHeaderPresent ( request, UPnP::ENT, TUPnPTable::Table() );
+	TBool sid = IsHeaderPresent ( request, UPnP::ESID, TUPnPTable::Table() );
+	if ( sid )
+		{
+		return ( callback || nt ) ? HTTPStatus::EBadRequest : KErrNone;
+		}
+	// Otherwise pre-condition failed
+	return HTTPStatus::EPreconditionFailed;
+	}
+
+// Returns KErrNone if validation is suceeded otherwise one of the HTTP error status code will be returned
+TInt CHttpServerFlow::ValidateNotifyRequest ( const CTransaction& aTrans )
+	{
+	// NOTIFY request
+	// 1. Content-Type header value MUST be "text/xml"
+	// 2. NT header value MUST be "upnp:event"
+	// 3. NTS header value MUST be "upnp:propchange"
+	// 4. SID header value MUST be present. ( we check only the presence here )
+	// 5. SEQ header value MUST be present ( we check only the presence here )
+	// 6. MUST contain a body
+	// Errors:
+	// Bad request - If NT or NTS header is missing
+	// Pre-condition failed - If the above 1-5 condition is failed
+
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::ValidateNotifyRequest")));
+	CRequest& request = *( aTrans.Request () );
+
+	if ( IsValidContentTypeHeader ( request ) )
+		{
+		if ( IsValidNTHeader ( request ) && IsValidNTSHeader ( request ) )
+			{
+			if ( IsHeaderPresent ( request, UPnP::ESID, TUPnPTable::Table() ) && IsHeaderPresent ( request, UPnP::ESEQ, TUPnPTable::Table() ) )
+				{
+				return KErrNone;
+				}
+			}
+		else if ( !IsHeaderPresent ( request, UPnP::ENT, TUPnPTable::Table() ) || !IsHeaderPresent ( request, UPnP::ENTS, TUPnPTable::Table() ) )
+			{
+			return HTTPStatus::EBadRequest;
+			}
+		}
+	// Otherwise pre-condition failed
+	return HTTPStatus::EPreconditionFailed;
+	}
+
+// Returns KErrNone if validation is suceeded otherwise one of the HTTP error status code will be returned
+TInt CHttpServerFlow::ValidatePostRequest ( const CTransaction& aTrans )
+	{
+	// 1. Content-Type header MUST contain text/xml value  -- On failure responds with EUnsupportedMediaType status code
+	// 2. Content-Type header MUST contain charset as utf-8 --- On failure responds with EBadRequest status code
+	// 3. SOAPACTION header field MUST be present -- On failure responds with EPreconditionFailed status code
+	// 4. POST request MUST contain a body	-- On failure responds with EBadRequest
+	// 5. Currently we support only the POST method with Content-Length header on the request. If it is not present
+	// we return Not Implemented ( 501 ) error response. In the future it may need implementation.
+
+	CRequest& request = *( aTrans.Request () );
+
+	if ( !IsHeaderPresent ( request, HTTP::EContentLength, THTTPTable::Table() ) )
+		return HTTPStatus::ENotImplemented;
+
+	if ( IsValidContentTypeHeader ( request ) && IsValidCharset ( request ) )
+		{
+		if ( IsHeaderPresent ( request , UPnP::ESoapAction, TUPnPTable::Table() ) )
+			{
+			return KErrNone;
+			}
+		else
+			{
+			return HTTPStatus::EPreconditionFailed;
+			}
+		}
+	return HTTPStatus::EUnsupportedMediaType;
+	}
+
+// Returns KErrNone if validation is suceeded otherwise one of the HTTP error status code will be returned
+TInt CHttpServerFlow::ValidateMPostRequest ( const CTransaction& aTrans )
+	{
+	// 1. MAN header must be present with value "http://schemas.xmlsoap,org/soap/envelope/"
+	// On failure responds with KEBadRequest
+	// 2. Checks the namespace and that matches with ns-SOAPACTION... ??
+	// 3. Validate like the normal POST request
+	CRequest& request = *( aTrans.Request () );
+
+	if ( IsHeaderPresent ( request, UPnP::EMAN, TUPnPTable::Table() ) && IsValidManHeader( request ) )
+		{
+		return ValidatePostRequest ( aTrans );
+		}
+	return HTTPStatus::EBadRequest;
+	}
+
+void CHttpServerFlow::HandleUPnPResponseL ( CServerTransaction* aTrans, TInt aStatus, SMetaDataNetCtorExt* aInfo )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrFlow, KComponent, _L8("CHttpServerFlow::HandleUPnPResponseL")));
+	CResponse* response = aTrans->Response ();
+
+	CHttpServerHandler::CreateResponse ( *response, aStatus, &aTrans->ServerObserver ()  );
+
+	if ( aTrans->Request ()->Handle ().Method ().Index ( TUPnPTable::Table() ) ==  UPnP::ESubscribe && aStatus == HTTPStatus::EOk )
+		{
+		TSubsribeResponseInfo& info = *( reinterpret_cast < TSubsribeResponseInfo* > ( aInfo ) );
+		SetHeaderL ( *response, UPnP::ESID, info.iSid, TUPnPTable::Table());
+		SetHeaderL ( *response, UPnP::ETimeout, info.iTimeout, TUPnPTable::Table() );
+		info.iSid.Free (); // Free the RMBufChain
+		}
+
+	// Set the Content-Length header
+	SetHeaderL ( *response, HTTP::EContentLength, aTrans->BodyParts ().Length (), THTTPTable::Table() );
+	aTrans->SetDataLeft ( aTrans->BodyParts ().Length () );
+	aTrans->SetComplete ();
+	
+	THTTPEvent evt ( THTTPEvent::ECompleteResponse );	
+	aTrans->ServerObserver().OnHttpEvent ( aTrans, evt );
+	}
+
+void CHttpServerFlow::IterateHeaders ( CRequest& aRequest )
+	{
+	RHTTPHeaders hdr = aRequest.Handle ().GetHeaderCollection ();
+	RStringPool sp = aRequest.StringPool ();
+	THTTPHdrFieldIter it = hdr.Fields ();
+
+	while ( it.AtEnd () == EFalse )
+		{
+		RStringTokenF fieldName = it ();
+		RStringF fieldNameStr = sp.StringF ( fieldName );
+
+		THTTPHdrVal fieldVal;
+		hdr.GetField ( fieldNameStr, 0, fieldVal );
+
+		++it;
+		}
+	}
+
+TInt CHttpServerFlow::FindOrCreateControlTransaction ( CServerTransaction& aTrans )
+	{
+	TInt index = FindControlTransaction ( aTrans );
+	if ( index == KErrNotFound )
+		{
+		return AddControlTransaction ( iControlId++, aTrans );
+		}
+	return index;
+	}
+
+
+TInt CHttpServerFlow::FindControlTransaction ( TInt aId ) const
+	{
+	for ( TInt i = 0; i < iControlTransactions.Count (); ++i )
+		{
+		if ( iControlTransactions[i].iId == aId )
+			{
+			return i;
+			}
+		}
+	return KErrNotFound;
+	}
+
+TInt CHttpServerFlow::FindControlTransaction ( CServerTransaction& aTrans ) const
+	{
+	for ( TInt i = 0; i < iControlTransactions.Count (); ++i )
+		{
+		if ( &(iControlTransactions[i].iTransaction) == &aTrans )
+			{
+			return i;
+			}
+		}
+	return KErrNotFound;
+	}
+
+void CHttpServerFlow::RemoveControlTransaction ( TInt aId )
+	{
+	TInt pos = FindControlTransaction ( aId );
+	if ( pos != KErrNotFound )
+		{
+		iControlTransactions.Remove ( pos );
+		}
+	}
+
+TInt CHttpServerFlow::AddControlTransaction ( TInt aId, CServerTransaction& aTrans )
+	{
+	TControlTransaction trans ( aId, aTrans );
+	TInt err = iControlTransactions.Append ( trans );
+	if ( err == KErrNone )
+		{
+		const TUint KIdentifiersLen = sizeof ( TInt );
+		TBuf8<KIdentifiersLen> controlBuf;
+		controlBuf.AppendNumFixedWidth ( aId, EDecimal, KIdentifiersLen );
+
+		RMBufChain bufChain;
+		err = bufChain.Create ( controlBuf );
+		if ( err != KErrNone )
+			return err;
+		aTrans.BodyParts().Prepend ( bufChain );
+		}
+
+	return err == KErrNone ? iControlTransactions.Count() - 1 : err;
+	}
+
+CHttpServerFlow::TControlTransaction CHttpServerFlow::FirstControlTransactionToNotify () const
+	{
+	TInt i = 0;
+	for ( i = 0; i < iControlTransactions.Count (); ++i )
+		{
+		if ( iControlTransactions[i].iNotifyComplete == EFalse )
+			{
+			break;
+			}
+		}
+	return iControlTransactions[i];
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpserverhandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,681 @@
+// 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 <httpstringconstants.h>
+#include <httperr.h>
+#include <http/thttptable.h>
+#include <upnp/tupnptable.h>
+
+#include "httpserverhandler.h"
+#include "httpserver.h"
+#include "httpevent.h"
+
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+#include "upnpmemoryutils.h"
+
+const TUint KRecvTimeOutVal = 30000000; // 30secs
+
+
+__FLOG_STMT(_LIT8(KComponent,"Flow");)
+
+
+CHttpServerHandler* CHttpServerHandler::NewL ( RInternalSocket& aSocket, RMemChunk& aData, CServiceInfoArray& aServiceInfos, CServerHandlerArray& aServerHandlers, CHeaderCodec& aCodec, RStringPool& aStringPool, CChunkManager* aChunkMgr )
+	{
+	CHttpServerHandler* self = new ( ELeave ) CHttpServerHandler ( aSocket, aData, aServiceInfos, aServerHandlers, aCodec, aStringPool, aChunkMgr );
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop (); // self
+	return self;
+	}
+
+void CHttpServerHandler::ConstructL ()
+	{
+	CProtocolHandler::ConstructL ();
+	iRequestParser = CUpnpRequestParser::NewL ( *this );
+	iResponseComposer = CUpnpResponseComposer::NewL ( *this );
+	StartNewTransactionL ();
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("Created CHttpServerHandler")));
+	}
+
+CHttpServerHandler::~CHttpServerHandler ()
+	{
+	if ( !iReceivedData.IsEmpty() )
+		iReceivedData.Free ();
+	delete	iRequestParser;
+	delete	iResponseComposer;	
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("Destroyed CHttpServerHandler")));
+	}
+
+CHttpServerHandler::CHttpServerHandler ( RInternalSocket& aSocket, RMemChunk& aData, CServiceInfoArray& aServiceInfos, CServerHandlerArray& aServerHandlers, CHeaderCodec& aCodec, RStringPool& aStringPool, CChunkManager* aChunkMgr )
+: CProtocolHandler (aSocket ),
+iServiceInfos ( aServiceInfos ),
+iServerHandlers ( aServerHandlers ),
+iServerCodec ( aCodec ),
+iStringPool ( aStringPool )
+	{
+	iSocketHandler.Attach ( iSocket );
+	iAllocator.SetChunkManager(aChunkMgr);
+	iReceivedData.Assign( aData );
+	}
+
+// MParserObserver
+void CHttpServerHandler::GotHeaders ()
+	{
+	CServerTransaction& trans = LastTransaction ();
+	RRequest request = trans.Request ()->Handle ();
+	RStringF hostStr = trans.Request ()->StringPool().StringF(HTTP::EHost, THTTPTable::Table());
+
+	if(!HttpRequestUtils::IsConnectionRequired( *( trans.Request () ) ))
+		trans.SetClosing();
+
+	TRAPD ( err, HttpRequestUtils::ValidateL ( *( trans.Request () ) ) );
+
+	if ( err == KErrNone )
+		{
+		// Notify the flow that the headers are received
+		THTTPEvent evt (THTTPEvent::EGotRequestHeaders);
+		NotifyEvent ( evt );
+		}
+	else
+		{
+		TInt statusCode = KErrNone;;
+		switch ( err )
+			{
+			case KErrNotSupported:
+			statusCode = HTTPStatus::ENotImplemented;
+			break;
+
+			case KErrCorrupt:
+			statusCode = HTTPStatus::EBadRequest;
+			break;
+
+			default:
+			// Internal server error
+			statusCode = HTTPStatus::EInternalServerError;
+			break;
+			}
+		CHttpServerHandler::CreateResponse ( *(trans.Response()), statusCode, this );
+		trans.SetReadyToSend ();
+		trans.SetClosing ();
+		// We have an error and we no longer parse
+		iRequestParser->ResetParser ();
+		// If this is the only transaction we can compose the response.
+		if ( &LastTransaction () == &CurrentTransaction () )
+			{
+			CurrentTransaction ().SetComposing ( ETrue );
+			iResponseComposer->ComposeResponse ( trans.Response () );
+			}
+		}
+	}
+
+
+void CHttpServerHandler::GotBodyData ()
+	{
+	THTTPEvent evt( THTTPEvent::EGotRequestBodyData );
+	NotifyEvent ( evt );
+	}
+
+void CHttpServerHandler::DataParsed ()
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::DataParsed")));
+	
+	// Reset parser on completion one parsing successfully.
+	if ( !LastTransaction ().Parsing () )
+		{
+		iRequestParser->ResetParser ();
+		}
+
+	// Handle excess data & start new transaction
+	if ( !iReceivedData.IsEmpty() )
+		{
+		// Start a new transaction with the pending data. We are getting pipelined request
+		StartNewTransaction ();
+		// Free up the data that we received
+		iReceivedData.Free ();
+		}
+	else
+		{
+		iSocketHandler.Recv ();
+		iTimer->StartTimer ( KRecvTimeOutVal );
+		}
+	}
+
+void CHttpServerHandler::ParsingComplete ( RMemChunk& aExcessData )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::ParsingComplete")));
+	
+	// Notify the flow that our request is complete
+	THTTPEvent evt( THTTPEvent::ERequestComplete );
+	NotifyEvent ( evt );
+
+	LastTransaction ().SetParsing ( EFalse );
+	
+	if ( !aExcessData.IsEmpty () )
+		iReceivedData.Append ( aExcessData );
+	
+	if ( Error () == KErrNone )
+		{
+		// Check do we have to send the response for our first transaction. This typically happens
+		// in the case of URI not found
+		CServerTransaction& currentTrans = CurrentTransaction ();
+		if ( currentTrans.ReadyToSend ()
+				&& !currentTrans.Composing () )
+			{
+			CurrentTransaction ().SetComposing ( ETrue );
+			iResponseComposer->ComposeResponse ( currentTrans.Response () );
+			}
+		}
+	else if ( Error () != KErrNone && iTransactions.Count () == 0 )
+		{
+		// We give a chance to send any pending responses
+		DestroySelf ();
+		}
+
+	}
+
+void CHttpServerHandler::ParserError ( TInt aError )
+	{
+	// If we got a parser error we should see whether we had more than one transaction.
+	// Yes? Then we should wait for the previous transactions completion then
+	// close the connection.
+	// No? we just cleanup ourself. We will not send any response as we got an invalid request
+	// and we have no previous transactions.
+
+	// Note: The above is what we have to do... But for now Cleanup ourself by doing nothing
+	SetError ( aError );
+	DestroySelf ();	 // ... more
+	}
+
+// MComposerObserver
+void CHttpServerHandler::MessageDataReadyL ( RBuf8& aData )
+	{
+	RMBufChain sendData;
+	sendData.CreateL(aData);
+	iSocketHandler.Send ( sendData );
+	}
+
+void CHttpServerHandler::ComposingConcluded ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::ComposingConcluded")));
+	iResponseComposer->ResetComposer ();
+
+	TBool needToClose = CurrentTransaction ().IsClosing ();
+
+	// Delete the first transaction
+	DeleteTransaction ( iTransactions[0] );
+
+	// Check we should close the connection once we sent response to this transaction
+	if ( needToClose )
+		{
+		DestroySelf ();
+		return;
+		}
+
+	if ( iTransactions.Count () > 0 )
+		{
+		// Check the next transaction is ready to send
+		CServerTransaction& trans = CurrentTransaction ();
+		if ( trans.ReadyToSend () )
+			{
+			CurrentTransaction ().SetComposing ( ETrue );
+			iResponseComposer->ComposeResponse ( trans.Response () );
+			}
+		}
+	}
+
+void CHttpServerHandler::ComposerError ( TInt aError )
+	{
+	// Now we have an error. We just cleanup ourself
+	SetError ( aError );
+	DestroySelf ();
+	}
+
+void CHttpServerHandler::SendComplete ( TInt /* aLength */ )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::SendComplete")));
+	CurrentTransaction ().SetComposing ( EFalse );
+	iResponseComposer->ResponseDataSent	();
+	}
+
+void CHttpServerHandler::RecvComplete ( RMBufChain& aData )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::RecvComplete")));
+	
+	iTimer->StopTimer ();
+	
+	RMemChunk memChunk;
+	TUPnPMemoryUtils::CreateMemChunk(memChunk, aData, iAllocator);
+	iReceivedData.Append ( memChunk );	
+	// Check we have some transactions to give the received data or should we create a new one
+	if ( iTransactions.Count () > 0 && LastTransaction ().Parsing () )
+		{
+		iRequestParser->ParseRequest ( iReceivedData, LastTransaction ().Request () );
+		// parser takes ownership of aData, so it can be cleaned-up
+		iReceivedData.Free ();
+		return;
+		}
+	StartNewTransaction ();
+
+	if ( Error () != KErrNone && iTransactions.Count () == 0 )
+		{
+		// We give a chance to send any pending responses
+		DestroySelf ();
+		}
+	aData.Free();
+	}
+
+void CHttpServerHandler::TimeOut ()
+	{
+	if ( iTransactions.Count () > 0 )		
+		{
+		CServerTransaction& trans = CurrentTransaction ();
+		if ( trans.Parsing () )
+			{
+			// reset the request parser that is waiting for more data
+			iRequestParser->ResetParser ();
+			trans.SetParsing ( EFalse );
+			//create reponse with 408 status code
+			CHttpServerHandler::CreateResponse ( *( trans.Response () ), KRequestTimeoutStatusCode, this );
+			trans.SetReadyToSend ();
+			trans.SetComplete ();
+			// trigger compose self start event for the timed-out transaction
+			THTTPEvent evt ( THTTPEvent::ECompleteResponse );
+			OnHttpEvent ( iTransactions[0], evt );
+			}
+		}
+	else
+		{
+		// no transactions are pending,simply make self destroy.
+		DestroySelf ();
+		}
+	}
+
+void CHttpServerHandler::Error ( TOperation /*aOperation*/, TInt aError  )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::Error - %D"), aError));
+	// This is a socket error. We cannot do anything here.
+	// We just cleanup ourself
+	SetError ( aError );
+	
+	iResponseComposer->DataSentFailed ();		
+	iResponseComposer->ResetComposer ();
+	iRequestParser->ResetParser ();
+	iSocketHandler.CancelAll ();	
+	
+	TInt i = iTransactions.Count () - 1;
+	while ( i >= 0 )
+		{
+		CTransaction* trans = iTransactions[i];
+		if ( trans->Complete () )
+			{
+			iTransactions.Remove ( i );
+			delete trans;
+			}
+		--i;
+		}
+		
+	DestroySelf ();
+	}
+
+CServerTransaction& CHttpServerHandler::CurrentTransaction () const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::CurrentTransaction")));
+	__ASSERT_DEBUG ( iTransactions.Count () > 0, User::Invariant () );
+	return static_cast < CServerTransaction& > ( *( iTransactions[0] ) );
+	}
+
+CServerTransaction& CHttpServerHandler::LastTransaction () const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::LastTransaction")));
+	TInt count = iTransactions.Count ();
+	__ASSERT_DEBUG ( count > 0, User::Invariant () );
+	return static_cast < CServerTransaction& > ( *( iTransactions[ count - 1 ]  ) );
+	}
+
+void CHttpServerHandler::NotifyEvent ( THTTPEvent& aEvent )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::NotifyEvent")));
+	CServerTransaction& trans = LastTransaction ();
+	// Ensure that the flow still exists
+	CRequest* request = trans.Request ();
+	TInt pos = iServiceInfos.MatchServiceUri ( request->Handle ().URI (), HttpRequestUtils::HostStr ( *request ) );
+	if ( pos == KErrNotFound )
+		{
+		if ( !trans.Composing () )
+			{
+			CHttpServerHandler::CreateResponse ( *( trans.Response () ), HTTPStatus::ENotFound, this );
+			trans.SetReadyToSend ();
+			}
+		}
+	else if ( !trans.Complete () ) // Server flow on validation failure, 
+								   // completes the transaction after creating error response
+								   // so no need to push ERequestComplete Event to ServerFlow.
+								   // start composing error response
+		{
+		CServiceInfo& info = iServiceInfos [ pos ];
+		info.Observer ().OnHttpEvent ( &trans, aEvent );
+		}
+	}
+
+void CHttpServerHandler::CreateResponse ( CResponse& aResponse, TInt aStatusCode, MHttpEventObserver* aServerHandler )
+	{
+	TRAPD ( err, CHttpServerHandler::CreateResponseL ( aResponse, aStatusCode ) );
+
+	if ( err != KErrNone )
+		{
+		RResponse response = aResponse.Handle ();
+		response.SetStatusCode ( HTTPStatus::EInternalServerError );
+
+		// Should be changed once the status text us moved to te string table
+		RStringF responseTextString;
+		responseTextString = aResponse.StringPool().StringF ( UPnP::EInternalServerError, TUPnPTable::Table() );
+		response.SetStatusText ( responseTextString );
+		
+		if ( aServerHandler != NULL )
+			{
+			CHttpServerHandler& handler = static_cast < CHttpServerHandler& > ( *aServerHandler );
+			handler.SetError ( err );
+			}
+		}
+	}
+
+void CHttpServerHandler::CreateResponseL ( CResponse& aResponse, TInt aStatusCode )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::CreateResponse")));
+	TVersion version ( KMajorVersion, KMinorVersion, 0 );
+	RResponse response = aResponse.Handle ();
+	RStringPool sp = aResponse.StringPool ();
+
+	response.SetStatusCode ( aStatusCode );
+	response.SetVersion ( version );
+
+	// Add current date header
+	RHTTPHeaders hdrs = response.GetHeaderCollection ();
+	TTime time;
+	time.UniversalTime();
+	THTTPHdrVal timeHdrVal ( time.DateTime() );
+	hdrs.SetFieldL ( aResponse.StringPool().StringF(HTTP::EDate, THTTPTable::Table() ), timeHdrVal );
+
+	_LIT8 ( KServerName, "Symbian UPnP/1.0 server" );
+	RStringF serverStr = sp.OpenFStringL ( KServerName () );
+	THTTPHdrVal serverHdrVal ( serverStr );
+	hdrs.SetFieldL ( sp.StringF ( HTTP::EServer, THTTPTable::Table() ), serverHdrVal );
+	serverStr.Close ();
+
+	if ( aStatusCode != HTTPStatus::EOk )
+		{// Content Length
+		hdrs.SetFieldL ( sp.StringF( HTTP::EContentLength, THTTPTable::Table() ), THTTPHdrVal ( 0 ) );
+		}
+
+	RStringF responseTextString;
+	response.SetStatusText ( responseTextString );
+
+	switch ( aStatusCode )
+		{
+		case HTTPStatus::EOk:
+		responseTextString = sp.StringF ( UPnP::EOk, TUPnPTable::Table() );
+		break;
+
+		case HTTPStatus::ENotFound:
+		responseTextString = sp.StringF ( UPnP::ENotFound, TUPnPTable::Table() );
+		break;
+
+		case HTTPStatus::EBadRequest:
+		responseTextString = sp.StringF ( UPnP::EBadRequest, TUPnPTable::Table() );
+		break;
+
+		case HTTPStatus::EInternalServerError:
+		responseTextString = sp.StringF ( UPnP::EInternalServerError, TUPnPTable::Table() );
+		break;
+
+		case HTTPStatus::ENotImplemented:
+		responseTextString = sp.StringF ( UPnP::ENotImplemented, TUPnPTable::Table() );
+		break;
+
+		case HTTPStatus::EPreconditionFailed:
+		responseTextString = sp.StringF ( UPnP::EPreconditionFailed, TUPnPTable::Table() );
+		break;
+
+		case HTTPStatus::EMethodNotAllowed:
+		responseTextString = sp.StringF ( UPnP::EMethodNotAllowed, TUPnPTable::Table() );
+		break;
+	
+		case HTTPStatus::EUnsupportedMediaType:
+		responseTextString = sp.StringF ( UPnP::EUnsupportedMediaType, TUPnPTable::Table() );
+		break;
+
+		case KRequestTimeoutStatusCode:
+		responseTextString = sp.StringF ( UPnP::ERequestTimeout, TUPnPTable::Table() );
+		break;
+		
+		case KInvalidSeqStatusCode:
+		responseTextString = sp.StringF ( UPnP::EMethodNotAllowed, TUPnPTable::Table() );
+		break;
+
+		default:
+		ASSERT ( 0 );
+		break;
+		}
+	response.SetStatusText ( responseTextString );
+	}
+
+void CHttpServerHandler::StartNewTransactionL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::StartNewTransaction")));
+	CServerTransaction* trans = CServerTransaction::NewL ( iServerCodec, iStringPool, *this );
+	CleanupStack::PushL ( trans );
+	User::LeaveIfError ( iTransactions.Append ( trans ) );
+	CleanupStack::Pop (); // trans
+	iRequestParser->ParseRequest ( iReceivedData, trans->Request () ); // Needs change
+	iReceivedData.Free (); // Free up the data that we received, parser takes ownership
+	trans->SetParsing ( ETrue );
+	trans->Response()->Handle().SetBody ( *this ); // Set self as the response body supplier
+	}
+
+void CHttpServerHandler::StartNewTransaction ()
+	{
+	TRAPD ( err, StartNewTransactionL () );
+	if ( err != KErrNone )
+		{
+		SetError ( err );
+		}
+	}
+
+void CHttpServerHandler::DeleteTransaction ( CTransaction* aTrans )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::DeleteTransaction")));
+	for ( TInt i = 0; i < iTransactions.Count (); ++i )
+		{
+		CTransaction* trans = iTransactions[i];
+		if ( trans == aTrans )
+			{
+			iTransactions.Remove ( i );
+			delete trans;
+			return;
+			}
+		}
+	}
+
+TInt CHttpServerHandler::OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::OnHttpEvent")));
+	CServerTransaction& trans = static_cast< CServerTransaction& > (*aTransaction);
+	
+	if ( Error ()
+		|| aEvent == THTTPEvent::EFailed ) // ControlChannel transaction response is half send, so close it
+		{
+		if ( &trans == &CurrentTransaction () )
+			{
+			iResponseComposer->ResetComposer ();
+			}
+		DeleteTransaction ( aTransaction );
+		TInt err = iError;
+		DestroySelf ();
+		return err;
+		}
+		
+	// Check if this is the first transaction that we have to respond. Otherwise just move
+	// this into a ready to send state.	
+	if ( &trans != &CurrentTransaction() )
+		{
+		// THTTPEvent::EFailed is used for control channel pending transactions
+		if ( aEvent == THTTPEvent::EFailed )
+			{
+			DeleteTransaction ( aTransaction );
+			return KErrNone;
+			}
+		else
+			{
+			trans.SetReadyToSend ();
+			return KErrNone;
+			}
+		}	
+
+	// The flow can Notify us in 2 ways.
+	// 1. Complete response information is available including any body data. This happens when
+	// the flow receives the response from the control plane
+	// In this case we will receives a THTTPEvent::ECompleteResponse event from the flow
+	// in which case we start composing the response
+	// 2. The flow receives the data via RControlChannel send from the application
+	// Here, we have to start composing when we receive the THTTPEvent::EGotResponseHeaders &
+	// THTTPEvent::EGotResponseBodyData in which case we notify the composer about the body data.
+	// 1. We have to start composing when we get THTTPEvent::EGotResponseHeaders
+	// 2. We have to inform the composer that we have new response body data available
+	// 3. Response completion --- we don't do anything here, just an indication that we are concluded the response.
+	//  keep going ComposingConcluded will reset the composer
+	switch ( aEvent.iStatus )
+		{
+		case THTTPEvent::EGotResponseHeaders: // for control channel
+		case THTTPEvent::ECompleteResponse:	  // for control plane
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::OnHttpEvent - THTTPEvent::EGotResponseHeaders")));
+			CurrentTransaction ().SetComposing ( ETrue );
+			iResponseComposer->ComposeResponse ( CurrentTransaction ().Response() );
+			}
+		break;
+
+		case THTTPEvent::EGotResponseBodyData:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::OnHttpEvent - THTTPEvent::EGotResponseBodyData")));
+
+			if ( !CurrentTransaction ().Composing () )
+				iResponseComposer->NotifyNewBodyData ();
+			}
+		break;
+
+		case THTTPEvent::EResponseComplete:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::OnHttpEvent - THTTPEvent::EResponseComplete")));
+			// We don't do anything here. We completed the whole response.
+			iResponseComposer->NotifyNewBodyData (); // This is the last chunk. This happens when we send via chunked encoding
+			}
+		break;
+
+		default:
+			ASSERT(0);
+			break;
+		}
+	return KErrNone;
+	}
+
+TBool CHttpServerHandler::CanDestroy () const
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::CanDestroy")));
+	return ( iTransactions.Count () == 0 );
+	}
+
+// We will destroy ourself if we are not waiting for any response.
+void CHttpServerHandler::DestroySelf ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::DestroySelf")));
+	if ( CanDestroy () )
+		{
+		// Remove from the server handler array	 ...
+		for ( TInt i = 0; i < iServerHandlers.Count (); ++i )
+			{
+			if ( iServerHandlers[i] == this )
+				{
+				iServerHandlers.Remove ( i );
+				break;
+				}
+			}
+
+		// We don't have any more transactions. We can delete ourself
+		delete this;
+		}
+
+	}
+
+void CHttpServerHandler::SetError ( TInt aError )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::SetError - %d"), aError));
+	iError = aError;
+	}
+
+TBool CHttpServerHandler::Error () const
+	{
+	return ( iError != KErrNone );
+	}
+
+// -------------------------------------
+
+TBool CHttpServerHandler::GetNextDataPart ( TPtrC8& aDataPart )
+	{
+	CServerTransaction& trans = CurrentTransaction ();
+	trans.GetBodyPart ( aDataPart );
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::GetNextDataPart - %d, %d"), trans.IsLastBodyPart (), aDataPart.Length () ));
+	return trans.IsLastBodyPart ();
+	}
+
+void CHttpServerHandler::ReleaseData ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::ReleaseData" )));
+	CServerTransaction& trans = CurrentTransaction ();
+	trans.RemoveBodyPart ();
+	if ( !trans.BodyParts ().IsEmpty () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler::ReleaseData body part present" )));
+		TInt count = trans.BodyParts().NumBufs();
+		// We will call NotifyNewBodyData only when we are sending it as a chunked-encoding &
+		// the number of MBuf available is > 1. Last MBuf we will notify via a EResponseComplete from OnHttpEvent
+		if ( ( trans.DataLeft() == KErrUnknown && count > 1 )
+				|| ( count > 0 ) ) // Normal send by knowing the length. we will notify if we have > 0 MBufs
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpSrvrHndlr, KComponent, _L8("CHttpServerHandler - Calling NotifyNewBodyData on composer" )));
+			trans.SetComposing ( ETrue );
+			iResponseComposer->NotifyNewBodyData ();
+			}
+		}
+	}
+
+TInt CHttpServerHandler::OverallDataSize ()
+	{
+	CServerTransaction& trans = CurrentTransaction ();
+	// For now we calculate the total data size based on the Content-Length field
+	// Note: In the futre, ( for full HTTP server ) this should be based on the chunked encoding
+	// field or Content-Length
+	TInt dataSize = MHttpMessageParserObserver::ENoBody;
+	// Check is there a Content-Length field?
+	CResponse* response = trans.Response ();
+	RStringF contentLength = response->StringPool().StringF( HTTP::EContentLength, THTTPTable::Table() );
+	THTTPHdrVal value;
+	TInt err = response->Handle().GetHeaderCollection().GetField( contentLength, 0, value );
+	if ( err == KErrNone )
+		{
+		dataSize = value.Int ();
+		}
+	return dataSize;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/httpudpflow.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,837 @@
+// 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:
+// upnpflow.cpp
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_nodeinterfaces.h>
+
+
+#include <http/thttptable.h>
+#include <http/framework/cheadercodecplugin.h>
+#include <httpstringconstants.h>
+#include <inetprottextutils.h>
+#include <upnp/tupnptable.h>
+
+//Local Includes
+#include "httpudpflow.h"
+#include "upnppint.h"
+#include "upnp_cf_msgs.h"
+#include "upnpctrlscprstates.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+#include "upnpmemoryutils.h"
+
+const TUint KDeftMaxAgeVal = 1800;
+const TUint KDeftSendCount = 9;
+const TUint KDeftTimeOutVal = 200000;	//200ms,Requirements [7.2.4.2] & [7.2.4.7] of DLNA
+
+__FLOG_STMT(_LIT8(KComponent,"Flow");)
+
+CHttpUdpFlow* CHttpUdpFlow::NewL ( CSubConnectionFlowFactoryBase& aFactory,
+						  			CUPnPProtocolIntfBase* aProtocolIntf,
+					  			const TNodeId& aSubConnId )
+	{
+	CHttpUdpFlow* self = new ( ELeave )CHttpUdpFlow ( aFactory, aProtocolIntf, aSubConnId );
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop (); // self
+	return self;
+	}
+
+CHttpUdpFlow::CHttpUdpFlow ( CSubConnectionFlowFactoryBase& aFactory,
+					CUPnPProtocolIntfBase* aProtocolIntf,
+					const TNodeId& aSubConnId )
+	: CUPnPFlowBase ( aFactory, aProtocolIntf, EHttpUdpFlow, aSubConnId ),
+	iSocketHandler ( *this ), iSocketCreated ( EFalse ),iSendCount ( 0 ),  
+	iIsLeaving ( EFalse ),iSendFlag ( EFalse ),iIsComposeCompleted ( EFalse )
+	{
+	LOG_NODE_CREATE(KESockFlowTag, CHttpUdpFlow);
+	}
+
+CHttpUdpFlow::~CHttpUdpFlow ()
+	{
+	delete iRequestComposer;
+	delete iResponseParser;
+	delete iResponseComposer;
+	delete iSendTimer;
+
+	delete iSocketOpener;
+	iSocketHandler.CancelAll ();
+
+	iSocket.Close ();
+	iSearchTargetArray.Close ();
+	delete iUPnPResponse;
+	//delete iCodec;
+	iSendElements.Close ();
+	iStringPool.Close();
+	iSubConnectionProvider.Close ();
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("Destroyed CHttpUdpFlow")));
+	LOG_NODE_DESTROY(KESockFlowTag, CHttpUdpFlow);
+	}
+
+
+void CHttpUdpFlow::ConstructL ()
+	{
+	iStringPool.OpenL ( TUPnPTable::Table() );
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL ( KUPnPCodecName, iStringPool );
+	iResponseParser = CUpnpResponseParser::NewL ( *this );
+	iRequestComposer = CUpnpRequestComposer::NewL ( *this );
+	iResponseComposer = CUpnpResponseComposer::NewL ( *this );
+	iUPnPResponse = CResponse::NewL ( *iCodec, iStringPool );
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("Created CHttpUdpFlow")));
+	}
+
+void CHttpUdpFlow::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL")));
+	
+	if ( aMessage.IsMessage<TEChild::TDestroy> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TCFMessage::TDestroy")));
+    	if ( RemoveControlClient ( FindControlClient ( address_cast<TNodeId> ( aSender ) ) ) == 0 )
+    		{
+    		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TCFMessage::TDestroy - Deleting current flow")));
+    		DeleteThisFlow ();
+    		}
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStart> () )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TCFMessage::TDataClientStart")));
+        RClientInterface::OpenPostMessageClose ( NodeId (), address_cast<TNodeCtxId> ( aSender ), TCFDataClient::TStarted ().CRef () );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStop> () )
+		{
+       	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TUpnpMessage::TUPnPStopSearch")));
+
+    	SetClientLeaving ( address_cast<TNodeId> ( aSender ) ); // set the control client leaving
+
+		if ( CheckIfAllClientsLeaving ( ) && iSendElements.Count () != 0 )
+		   	{
+		   	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TUpnpMessage::TUPnPStopSearch -- Marked for Deletion")));
+
+		   	MarkMeForDeletion ();
+		   	iIsLeaving = ETrue;
+			iLastLeavingClient = address_cast<TNodeCtxId> ( aSender );
+		   	}
+		else
+			{
+		    PostDataClientStopped ( address_cast<TNodeCtxId> ( aSender ) );
+			}
+		}
+	else if ( TUpnpMessage::ERealmId == aMessage.MessageId( ).Realm( ) )		
+    	{
+	   	switch ( aMessage.MessageId( ).MessageId( ) )
+			{
+			case TUpnpMessage::TUPnPSearchRequest::EId:
+            	{
+            	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TUpnpMessage::TUPnPSearchRequest")));
+            	HandleSearchRequestL ( address_cast<TNodeCtxId> ( aSender ), static_cast < TUpnpMessage::TUPnPSearchRequest& > ( aMessage ) );
+            	CreateSendTimerL();
+				SendIfOneElement ();
+            	}
+            break;
+
+			case TUpnpMessage::TCancelRequest::EId:
+				{
+            	HandleStopSearch ( address_cast<TNodeCtxId> ( aSender ) );
+            	}
+			break;
+
+            case TUpnpMessage::TUPnPSearchResponse::EId:
+            	{
+            	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TUpnpMessage::TUPnPSearchResponse")));
+            	HandleSearchResponseL ( static_cast < TUpnpMessage::TUPnPSearchResponse& > ( aMessage ) );
+				SendIfOneElement ();
+            	}
+            break;
+
+            case TUpnpMessage::TUPnPPublishAliveRequest::EId:
+            	{
+            	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TUpnpMessage::TUPnPPublishAliveRequest")));
+            	HandlePublishAliveRequestL ( static_cast < TUpnpMessage::TUPnPPublishAliveRequest& > ( aMessage ) );
+            	CreateSendTimerL();
+            	SendIfOneElement ();
+            	}
+            break;
+
+            case TUpnpMessage::TUPnPPublishByeRequest::EId:
+            	{
+            	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReceivedL - TUpnpMessage::TUPnPPublishByeRequest")));
+            	HandlePublishByeRequestL ( static_cast < TUpnpMessage::TUPnPPublishByeRequest& > ( aMessage ) );
+            	SendIfOneElement ();
+            	}
+            break;
+	        }
+		}
+	}
+
+// From MSocketHandlerObserver
+void CHttpUdpFlow::OpenComplete ( RInternalSocket& aSocket )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::OpenComplete")));
+	iSocket = aSocket;
+	TInt err = KErrNone;
+	TUint port = KUpnpUdpPort;
+	do
+		{
+		// [REF] DLNA Requirement-7.2.3.4
+		if ( port == KUpnpMCPort )
+			++port;
+
+		TInetAddr addr ( port++ );
+		addr.SetAddress ( KInetAddrAny );
+
+		err = aSocket.Bind( addr );
+
+		}while ( err == KErrInUse && port != KMaxTUint );
+
+	if ( err == KErrInUse || port == KMaxTUint )
+		{
+		return; // bind error is ignored, needs to be handled
+		}
+
+	iSocketHandler.Attach ( aSocket );
+	iSocketCreated = ETrue;
+	HandleSendElement (); // This call will happen only once.
+	StartRecv(); //keep Socket in receive mode
+	}
+
+void CHttpUdpFlow::SendToComplete ( TInt /*aLength*/ )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::SendToComplete")));
+
+	if ( !iSendFlag && iSendElements[0]->iType != CSendElement::EMSearchResponse )
+		{
+		IncrementSendCount();
+		iSendFlag = ETrue;
+		iSocketHandler.SendTo ( iBackupData, iSendElements[0]->iSockAddr );
+		}
+	else
+		{
+		iBackupData.Init ();
+		iSendFlag = EFalse;
+
+		iIsComposeCompleted = ETrue;
+		CSendElement::TSendType currentSendType = RemoveFirstSendElement ();
+		if ( CSendElement::EMSearchResponse == currentSendType )
+			{
+			//M-Serach Response
+			iResponseComposer->ResponseDataSent ();
+			iResponseComposer->ResetComposer ();
+			}
+		else
+			{
+			//Publish
+			iRequestComposer->RequestDataSent();
+			iRequestComposer->ResetComposer ();
+			}
+
+		HandleSendElement ();
+		}
+	}
+
+void CHttpUdpFlow::RecvFromComplete ( RMBufChain& aData, const TSockAddr& /*aAddr*/ )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::RecvFromComplete")));
+
+	RMemoryAllocator allocator(static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf () )->GetMemoryChunkManager());
+	RMemChunk memChunk;
+	TUPnPMemoryUtils::CreateMemChunk(memChunk, aData, allocator);
+
+	iResponseParser->ParseResponse ( memChunk, iUPnPResponse );
+	
+	aData.Free();
+	}
+
+// From MComposerObserver
+void CHttpUdpFlow::MessageDataReadyL ( RBuf8& aData )
+	{
+	ASSERT ( iSendElements.Count() > 0 );
+
+	if ( !iSendFlag && iSendElements[0]->iType != CSendElement::EMSearchResponse)
+		{
+		iBackupData.CreateL(aData);
+		}
+	RMBufChain sendData;
+	sendData.CreateL(aData);
+	iSocketHandler.SendTo ( sendData, iSendElements[0]->iSockAddr );
+	}
+
+void CHttpUdpFlow::ComposingConcluded ()
+	{
+	if ( iIsLeaving && iSendElements.Count () == 0 )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ComposingConcluded - Deleting current flow")));
+
+		PostDataClientStopped ( iLastLeavingClient );
+		}
+	}
+
+void CHttpUdpFlow::ComposerError ( TInt /*aError*/ )
+	{
+	RemoveFirstSendElement ();
+	HandleSendElement ();
+	}
+
+// From MParserObserver
+void CHttpUdpFlow::GotHeaders ()
+	{
+	if ( ValidateSearchResponse () != KErrNone )
+		{
+		// Corrupt message. Reset the parser and restart the receive
+		StartRecv ();
+		}
+	// Else we will notify the SCPR from ::ParsingComplete
+	}
+
+void CHttpUdpFlow::ParsingComplete ( RMemChunk& /*aExcessData*/ )
+	{
+	TRAP_IGNORE ( NotifyClientsL () );
+	StartRecv ();
+	iUPnPResponse->Reset();
+	}
+
+void CHttpUdpFlow::ParserError ( TInt /*aError*/ )
+	{
+	StartRecv ();
+	}
+
+TInt CHttpUdpFlow::GetHeaderValue ( const CResponse& aResponse, TInt aFieldIndex, THTTPHdrVal& aFieldVal, const TStringTable& aTable )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::GetHeaderValue")));
+	CResponse& response = const_cast < CResponse& > ( aResponse );
+	RResponse res = response.Handle ();
+	RHTTPHeaders headers = res.GetHeaderCollection ();
+	RStringF fieldStr = aResponse.StringPool ().StringF ( aFieldIndex, aTable );
+	return headers.GetField ( fieldStr, 0, aFieldVal );
+	}
+
+TInt CHttpUdpFlow::GetParamValue ( const CResponse& aResponse, TInt aFieldIndex, TInt aParamIndex, THTTPHdrVal& aParamVal,  const TStringTable& aTable )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::GetParamValue")));
+	CResponse& response = const_cast < CResponse& > ( aResponse );
+	RResponse res = response.Handle ();
+	RHTTPHeaders headers = res.GetHeaderCollection ();
+	RStringF fieldStr = aResponse.StringPool ().StringF ( aFieldIndex, aTable );
+	RStringF paramStr = aResponse.StringPool ().StringF ( aParamIndex, aTable );
+	TInt err = KErrNotFound;
+	TInt fieldCount =  0;
+	TRAP ( err, fieldCount = headers.FieldPartsL(fieldStr) );
+	while (fieldCount>0)
+		{
+		err = headers.GetParam ( fieldStr, paramStr, aParamVal, fieldCount-1 );
+		if(err == KErrNone )
+			break;
+		fieldCount--;
+		}
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::GetParamValue - Returned with error code %d"), err));
+	return err;
+	}
+
+TInt CHttpUdpFlow::IsHeaderPresent ( const CResponse& aResponse, TInt aFieldIndex, const TStringTable& aTable )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::IsHeaderPresent")));
+	THTTPHdrVal value;
+	return GetHeaderValue ( aResponse, aFieldIndex, value, aTable );
+	}
+
+TInt CHttpUdpFlow::IsValidCacheControlHeader ( const CResponse& aResponse )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::IsValidCacheControlHeader")));
+	THTTPHdrVal value;
+	return GetParamValue ( aResponse, HTTP::ECacheControl, HTTP::EMaxAge, value, THTTPTable::Table() );
+	}
+
+
+void CHttpUdpFlow::SetHeaderValueL ( RHTTPHeaders& aHdr, TInt aFieldIndex, const TDesC8& aFieldVal, const TStringTable& aTable )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::SetHeaderValueL")));
+	RStringF hdrValStr = iStringPool.OpenFStringL ( aFieldVal );
+	THTTPHdrVal hdrVal ( hdrValStr );
+	aHdr.SetFieldL ( iStringPool.StringF ( aFieldIndex, aTable ), hdrVal );
+	hdrValStr.Close();
+	}
+
+TInt CHttpUdpFlow::ValidateSearchResponse ()
+	{
+	// 1. MUST be a HTTP/1.1 version
+	// 2. MUST contain cache-control header with max-age directive
+	// 3. EXT header MUST be present
+	// 4. Location header MUST be present
+	// 5. ST header MUST be present
+	// 6. USN header MUST be present
+	// 7. No body
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ValidateSearchResponse")));
+
+	if ( !iUPnPResponse->IsHTTP10() && IsValidCacheControlHeader ( *iUPnPResponse ) == KErrNone &&
+		IsHeaderPresent ( *iUPnPResponse, UPnP::EExt, TUPnPTable::Table() ) == KErrNone &&
+		IsHeaderPresent ( *iUPnPResponse, HTTP::ELocation, THTTPTable::Table() ) == KErrNone &&
+		IsHeaderPresent ( *iUPnPResponse, UPnP::EST, TUPnPTable::Table() ) == KErrNone &&
+		IsHeaderPresent ( *iUPnPResponse, UPnP::EUSN, TUPnPTable::Table() ) == KErrNone &&
+		IsContentLengthZero ( *iUPnPResponse ) )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ValidateSearchResponse - Returned with KErrNone")));
+		return KErrNone;
+		}
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ValidateSearchResponse - Returned with KErrCorrupt")));
+	return KErrCorrupt;
+	}
+
+void CHttpUdpFlow::ReadResponseValues ( TInt& aMaxAge, RStringF& aLocation, RStringF& aUsn, RStringF& aST )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::ReadResponseValues")));
+	// We already checked the presence of these headers. We can just read those here
+	// Read maxAge, Location & USN values from the response
+	THTTPHdrVal value(KDeftMaxAgeVal);
+	GetParamValue ( *iUPnPResponse, HTTP::ECacheControl, HTTP::EMaxAge, value, THTTPTable::Table() );
+	aMaxAge = value.Int ();
+
+	GetHeaderValue ( *iUPnPResponse, HTTP::ELocation, value, THTTPTable::Table() );
+	aLocation = value.StrF ();
+
+	GetHeaderValue ( *iUPnPResponse, UPnP::EUSN, value, TUPnPTable::Table() );
+	aUsn = value.StrF ();
+
+	GetHeaderValue ( *iUPnPResponse, UPnP::EST, value, TUPnPTable::Table() );
+	aST = value.StrF ();
+	}
+
+void CHttpUdpFlow::NotifyClientsL ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::NotifyClients")));
+	TInt maxAge;
+	RStringF location;
+	RStringF usn;
+	RStringF st;
+	ReadResponseValues ( maxAge, location, usn, st );
+	for ( TInt i = 0; i < iSearchTargetArray.Count (); ++i )
+		{
+		const CSearchTarget& target = *(iSearchTargetArray[i]);
+		if ( target.Match ( st.DesC() ) != KErrNotFound
+							&& !IsClientLeaving ( target.Originator () ) )
+			{
+			// We have a match. Post the information to our control client
+			RMemoryAllocator allocator(static_cast<CUPnPProtocolIntfBase *>( ProtocolIntf () )->GetMemoryChunkManager());
+			
+			RMemChunk locBuf;
+			RMemChunk usnBuf;
+			RMemChunk stBuf;
+			locBuf.CreateL ( location.DesC (), allocator );
+			TCleanupItem item1 ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &locBuf );
+			CleanupStack::PushL ( item1 );
+			usnBuf.CreateL ( usn.DesC (), allocator );
+			TCleanupItem item2 ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &usnBuf );
+			CleanupStack::PushL ( item2 );
+			stBuf.CreateL ( st.DesC (), allocator );
+			TCleanupItem item3 ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &stBuf );
+			CleanupStack::PushL ( item3 );
+
+			TSsdpInfo info ( maxAge, locBuf, usnBuf, stBuf );
+			
+			LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::NotifyClients - Posting message TUpnpMessage::TUPnPSearchResponse")));
+			TUpnpMessage::TUPnPSearchResponse msg ( info );
+	        RClientInterface::OpenPostMessageClose ( NodeId (), target.Originator (), msg );
+
+			CleanupStack::Pop (); // item1
+			CleanupStack::Pop (); // item2
+			CleanupStack::Pop (); // item3
+			}
+		}
+	}
+
+void CHttpUdpFlow::StartRecv ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::StartRecv")));
+	// Reset the parser and recv
+	iResponseParser->ResetParser ();
+	iSocketHandler.RecvFrom ();
+	}
+
+// -----------------------
+// The below functions to be genralised
+void CHttpUdpFlow::HandleSearchRequestL ( TNodeCtxId aChannelId, TUpnpMessage::TUPnPSearchRequest& aMessage )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::HandleSearchRequestL")));
+	_LIT8 ( KMultiCastAddr, "239.255.255.250:1900" );
+	_LIT8 ( KManHeaderValue, "ssdp:discover" );
+	_LIT8 ( KSearchUri, "*" );
+	CRequest* searchRequest = CRequest::NewL ( *iCodec, iStringPool );
+	CleanupStack::PushL ( searchRequest );
+
+	RStringF method = iStringPool.StringF ( UPnP::EMSearch, TUPnPTable::Table() );
+	// Set the method and URI
+	RRequest req = searchRequest->Handle ();
+	req.SetMethod ( method );
+	TUriParser8 parser;
+	parser.Parse ( KSearchUri () );
+	req.SetURIL ( parser );
+
+	RHTTPHeaders hdr = searchRequest->Handle ().GetHeaderCollection ();
+
+	// Set host header
+	SetHeaderValueL ( hdr, HTTP::EHost, KMultiCastAddr(), THTTPTable::Table() );
+
+	// Set MAN header
+	SetHeaderValueL ( hdr, UPnP::EMAN, KManHeaderValue(), TUPnPTable::Table() );
+
+
+	// Set MX header
+	THTTPHdrVal mxVal ( aMessage.iSsdpInfo.iMx );
+	hdr.SetFieldL ( iStringPool.StringF ( UPnP::EMX, TUPnPTable::Table() ), mxVal );
+
+	// Set ST header
+	TPtrC8 stPtr ( aMessage.iSsdpInfo.iSearchTarget.First ()->Ptr (), aMessage.iSsdpInfo.iSearchTarget.First ()->Length () );
+	SetHeaderValueL ( hdr, UPnP::EST, stPtr, TUPnPTable::Table() );
+
+	CSearchTarget* searchTarget = new ( ELeave ) CSearchTarget ( aChannelId );
+	CleanupStack::PushL ( searchTarget );
+	searchTarget->AddTargetL ( aMessage.iSsdpInfo.iSearchTarget );
+	iSearchTargetArray.AppendL ( searchTarget );
+	CleanupStack::Pop (); // searchTarget
+	TAppProtAddr addr ( KSsdpMulticastAddr, KUpnpMCPort );
+
+	CSendElement* sendElement = new ( ELeave ) CSendElement ( CSendElement::EMSearchRequest, *searchRequest, addr );
+	CleanupStack::PushL ( sendElement );
+	iSendElements.AppendL ( sendElement );
+	CleanupStack::Pop (); // sendElement
+
+	CleanupStack::Pop (); // searchRequest
+	}
+
+void CHttpUdpFlow::HandleStopSearch ( TNodeCtxId aChannelId )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::HandleStopSearch")));
+
+	TInt pos = FindSearchTarget ( aChannelId );
+
+	if ( pos != KErrNotFound )
+		{
+		CSearchTarget *target = iSearchTargetArray[pos];
+		iSearchTargetArray.Remove ( pos );
+		delete target;
+
+		RClientInterface::OpenPostMessageClose ( NodeId (), aChannelId, TUpnpMessage::TCancelled ().CRef () );
+		}
+	}
+
+void CHttpUdpFlow::HandleSearchResponseL ( TUpnpMessage::TUPnPSearchResponse& aMessage )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::HandleSearchResponseL")));
+	CResponse* searchResponse = CResponse::NewL ( *iCodec, iStringPool );
+
+	RResponse response = searchResponse->Handle ();
+	RHTTPHeaders hdr = response.GetHeaderCollection ();
+
+	const TInt KStatusCode = 200;
+	_LIT8 ( KStatusText, "OK" );
+	// Set status code & text
+	response.SetStatusCode ( KStatusCode );
+
+	RStringF statusTextStr = iStringPool.OpenFStringL ( KStatusText() );
+	CleanupClosePushL ( statusTextStr );
+	response.SetStatusText ( statusTextStr );
+	CleanupStack::PopAndDestroy (); // statusTextStr
+
+	// Set CACHE-CONTROL: max-age=""
+	SetMaxAgeHeaderValueL ( aMessage.iSsdpInfo.iMx, hdr );
+
+	// Set Date header
+	TTime time;
+	time.UniversalTime();
+	THTTPHdrVal timeHdrVal ( time.DateTime() );
+	hdr.SetFieldL ( iStringPool.StringF(HTTP::EDate, THTTPTable::Table() ), timeHdrVal );
+
+	// set EXT header
+	SetHeaderValueL ( hdr, UPnP::EExt, KNullDesC8 (), TUPnPTable::Table() );
+
+	// Set location str
+	TPtrC8 locationPtr ( aMessage.iSsdpInfo.iLocation.First ()->Ptr (), aMessage.iSsdpInfo.iLocation.First ()->Length () );
+	SetHeaderValueL ( hdr, HTTP::ELocation, locationPtr, THTTPTable::Table() );
+
+	// Set ST str
+	TPtrC8 stPtr ( aMessage.iSsdpInfo.iSearchTarget.First ()->Ptr (), aMessage.iSsdpInfo.iSearchTarget.First ()->Length () );
+	SetHeaderValueL ( hdr, UPnP::EST, stPtr, TUPnPTable::Table() );
+
+	// Set USN str
+	TPtrC8 usnPtr ( aMessage.iSsdpInfo.iUsn.First ()->Ptr (), aMessage.iSsdpInfo.iUsn.First ()->Length () );
+	SetHeaderValueL ( hdr, UPnP::EUSN, usnPtr, TUPnPTable::Table() );
+
+	//Set Content Length
+	hdr.SetFieldL ( iStringPool.StringF ( HTTP::EContentLength, THTTPTable::Table() ), THTTPHdrVal ( 0 ) );
+
+	CSendElement* sendElement = new ( ELeave ) CSendElement ( CSendElement::EMSearchResponse, *searchResponse, aMessage.iSsdpInfo.iAddr );
+	iSendElements.AppendL ( sendElement );
+	}
+
+
+
+void CHttpUdpFlow::HandlePublishAliveRequestL ( TUpnpMessage::TUPnPPublishAliveRequest& aMessage )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::HandlePublishAliveRequestL")));
+	CRequest& request = CreatePublishRequestLC ();
+
+	RHTTPHeaders hdr = request.Handle ().GetHeaderCollection ();
+	// Set CACHE-CONTROL: max-age=""
+	SetMaxAgeHeaderValueL ( aMessage.iSsdpInfo.iMx, hdr );
+
+	// Set location str
+	TPtrC8 locationPtr ( aMessage.iSsdpInfo.iLocation.First ()->Ptr (), aMessage.iSsdpInfo.iLocation.First ()->Length () );
+	SetHeaderValueL ( hdr, HTTP::ELocation, locationPtr, THTTPTable::Table() );
+
+	// Set NT str
+	TPtrC8 ntPtr ( aMessage.iSsdpInfo.iSearchTarget.First ()->Ptr (), aMessage.iSsdpInfo.iSearchTarget.First ()->Length () );
+	SetHeaderValueL ( hdr, UPnP::ENT, ntPtr, TUPnPTable::Table() );
+
+	SetHeaderValueL ( hdr, UPnP::ENTS, KSsdpAlive(), TUPnPTable::Table() );
+	TPtrC8 usnPtr ( aMessage.iSsdpInfo.iUsn.First ()->Ptr (), aMessage.iSsdpInfo.iUsn.First ()->Length () );
+	SetHeaderValueL ( hdr, UPnP::EUSN, usnPtr, TUPnPTable::Table() );
+
+	//Set Server
+	_LIT8 ( KServerName, "Symbian UPnP/1.0 server" );
+	RStringF serverStr = iStringPool.OpenFStringL ( KServerName () );
+	THTTPHdrVal serverHdrVal ( serverStr );
+	hdr.SetFieldL ( iStringPool.StringF ( HTTP::EServer, THTTPTable::Table () ), serverHdrVal );
+	serverStr.Close ();
+
+	//Set Content Length
+	hdr.SetFieldL ( iStringPool.StringF ( HTTP::EContentLength, THTTPTable::Table() ), THTTPHdrVal ( 0 ) );
+
+	TAppProtAddr addr ( KSsdpMulticastAddr, KUpnpMCPort  );
+	CSendElement* sendElement = new ( ELeave ) CSendElement ( CSendElement::ENotifyAliveRequest, request, addr );
+	iSendElements.AppendL ( sendElement );
+
+	CleanupStack::Pop (); //request
+	}
+
+void CHttpUdpFlow::SetMaxAgeHeaderValueL ( TInt aMaxAgeVal, RHTTPHeaders aHeaders )
+	{
+	_LIT8 ( KMaxAge, "max-age=" );
+
+	RStringF cacheControl = iStringPool.StringF( HTTP::ECacheControl, THTTPTable::Table() );
+	HBufC8* buf;
+	InetProtTextUtils::ConvertIntToDescriptorL ( aMaxAgeVal, buf );
+	CleanupStack::PushL ( buf );
+	RBuf8 rBuf;
+	rBuf.CreateMaxL ( KMaxAge ().Length () + buf->Length () );
+	rBuf.Copy ( KMaxAge );
+	rBuf.Append ( buf->Des () );
+
+	RStringF cacheControlValStrF = iStringPool.OpenFStringL( rBuf );
+	CleanupClosePushL ( cacheControlValStrF );
+	THTTPHdrVal cacheControlVal;
+	cacheControlVal.SetStrF ( cacheControlValStrF );
+
+	aHeaders.SetFieldL ( cacheControl, cacheControlVal );
+
+	CleanupStack::PopAndDestroy ( &cacheControlValStrF );
+	CleanupStack::PopAndDestroy ( );
+	}
+
+void CHttpUdpFlow::HandlePublishByeRequestL ( TUpnpMessage::TUPnPPublishByeRequest& aMessage )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::HandlePublishByeRequestL")));
+	CRequest& request = CreatePublishRequestLC ();
+
+	RHTTPHeaders hdr = request.Handle ().GetHeaderCollection ();
+
+	// Set NT str
+	TPtrC8 ntPtr ( aMessage.iSsdpInfo.iSearchTarget.First ()->Ptr (), aMessage.iSsdpInfo.iSearchTarget.First ()->Length () );
+	SetHeaderValueL ( hdr, UPnP::ENT, ntPtr, TUPnPTable::Table() );
+
+	SetHeaderValueL ( hdr, UPnP::ENTS, KSsdpBye(), TUPnPTable::Table() );
+	TPtrC8 usnPtr ( aMessage.iSsdpInfo.iUsn.First ()->Ptr (), aMessage.iSsdpInfo.iUsn.First ()->Length () );
+	SetHeaderValueL ( hdr, UPnP::EUSN, usnPtr, TUPnPTable::Table() );
+
+	//Set Content Length
+	hdr.SetFieldL ( iStringPool.StringF ( HTTP::EContentLength, THTTPTable::Table() ), THTTPHdrVal ( 0 ) );
+
+	TAppProtAddr addr ( KSsdpMulticastAddr, KUpnpMCPort  );
+	CSendElement* sendElement = new ( ELeave ) CSendElement ( CSendElement::ENotifyByeRequest, request, addr );
+	iSendElements.AppendL ( sendElement );
+
+	CleanupStack::Pop (); //request
+	}
+
+CRequest& CHttpUdpFlow::CreatePublishRequestLC ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::CreatePublishRequestLC")));
+	CRequest* publishRequest = CRequest::NewL ( *iCodec, iStringPool );
+	CleanupStack::PushL ( publishRequest );
+
+	RStringF method = iStringPool.StringF ( UPnP::ENotify, TUPnPTable::Table() );
+	// Set the method and URI
+	RRequest req = publishRequest->Handle ();
+	req.SetMethod ( method );
+	TUriParser8 parser;
+	parser.Parse ( KSearchUri () );
+	req.SetURIL ( parser );
+
+	RHTTPHeaders hdr = publishRequest->Handle ().GetHeaderCollection ();
+
+	// Set host header
+	SetHeaderValueL ( hdr, HTTP::EHost, KMultiCastAddr(), THTTPTable::Table() );
+
+	return *publishRequest;
+	}
+
+// --------------------------------------------
+
+void CHttpUdpFlow::SendIfOneElement ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::SendIfOneElement")));
+	if ( iSendElements.Count () == 1 )
+		{
+		HandleSendElement ();
+		}
+	}
+
+void CHttpUdpFlow::HandleSendElement ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::HandleSendElement")));
+
+	if ( !IsSocketCreated () )
+		{
+		TRAP_IGNORE ( CreateSocketL () );
+		return;
+		}
+	// Sent the first element
+	if ( iSendElements.Count() > 0 )
+		{
+		CSendElement* element = iSendElements[0];
+		
+		if(iSendCount > KDeftSendCount)
+			{
+			if(iSendTimer && iSendTimer->IsActive())
+				return;
+			}
+		iIsComposeCompleted = EFalse; 
+		if ( element->Type() == CSendElement::EMSearchResponse )
+			{
+			iSendCount = 0;
+			iResponseComposer->ComposeResponse ( static_cast < CResponse* > ( element->Message () ) );
+			}
+		else
+			{
+			StartSendTimer();
+			IncrementSendCount();
+			iRequestComposer->ComposeRequest ( static_cast <CRequest*> ( (element->Message ()) ) );
+			}		
+		}
+	}
+
+void CHttpUdpFlow::CreateSocketL ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::CreateSocketL")));
+	if ( !iSocketOpener )
+		{
+		iSocketOpener = CSocketOpener::NewL ( *this );
+		iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+		}
+	}
+
+CSendElement::TSendType CHttpUdpFlow::RemoveFirstSendElement ()
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::RemoveFirstSendElement")));
+	ASSERT ( iSendElements.Count () > 0 );
+	CSendElement* element = iSendElements[0];
+	iSendElements.Remove (0);
+	CSendElement::TSendType sendType = element->Type ();
+	delete element;
+	return sendType;
+	}
+
+TInt CHttpUdpFlow::FindSearchTarget ( TNodeCtxId& aChannelId )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::FindSearchTarget")));
+	for ( TInt i = 0; i < iSearchTargetArray.Count (); ++i )
+	{
+	if ( iSearchTargetArray[i]->Originator () == aChannelId )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::FindSearchTarget - Search target found")));
+		return i;
+		}
+	}
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::FindSearchTarget - Search target not found")));
+	return KErrNotFound;
+	}
+
+
+TBool CHttpUdpFlow::IsContentLengthZero ( const CResponse& aResponse )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::IsContentLengthZero")));
+	THTTPHdrVal contentLenVal;
+	if ( GetHeaderValue ( aResponse, HTTP::EContentLength, contentLenVal, THTTPTable::Table() ) == KErrNone )
+		{
+		if ( contentLenVal.Int( ) == 0 )
+			{
+			LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::IsContentLengthZero - Returned ETrue")));
+			return ETrue;
+			}
+		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::IsContentLengthZero - Returned EFalse")));
+		return EFalse;
+		}
+	LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::IsContentLengthZero - Content-Length header was not found")));
+	return EFalse;
+	}
+
+void CHttpUdpFlow::CreateSendTimerL()
+	{
+	if(!iSendTimer)
+		{
+		iSendTimer = CUPnPTimer::NewL(*this);
+		}
+	}
+
+void CHttpUdpFlow::TimeOut()
+	{
+	iSendCount = 0;
+	if(iIsComposeCompleted)
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::TimeOut[HandleSendElement]")));
+		HandleSendElement();
+		}
+	return;
+	}
+
+void CHttpUdpFlow::IncrementSendCount()
+	{
+	if(IsMSearchOrAliveRequest())
+		{
+		++iSendCount;
+		}
+	else
+		{
+		iSendCount = 0;
+		}
+	}
+
+void CHttpUdpFlow::StartSendTimer()
+	{
+	if( IsMSearchOrAliveRequest() )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysHttpUDPFlow, KComponent, _L8("CHttpUdpFlow::StartSendTimer[Timer Started]")));
+		iSendTimer->StartTimer(KDeftTimeOutVal);
+		}
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnpflowbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,122 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+//Local Includes
+#include "upnpflowbase.h"
+#include "upnppint.h"
+
+using namespace Messages;
+
+
+CUPnPFlowBase::CUPnPFlowBase(CSubConnectionFlowFactoryBase& aFactory, ESock::CProtocolIntfBase* aProtocolIntf, TFlowType aFlowType, const TNodeId& aSubConnId)
+		: CSubConnectionFlowBase(aFactory, aSubConnId, aProtocolIntf), iFlowType ( aFlowType )
+	{
+	}
+
+CUPnPFlowBase::~CUPnPFlowBase()
+	{
+	iClients.Close ( );
+	}
+
+/*
+//From CSubConnectionFlowBase MNode
+TInt CUPnPFlowBase::ReceivedL(TCFSignatureBase& )
+	{
+	//This is just a base flow and should not receive any messages.
+	ASSERT(0);
+	return KErrNone;
+	}
+*/
+
+void CUPnPFlowBase::AddControlClientL ( const TNodeId& aId )
+	{
+	if ( KErrNotFound == FindControlClient ( aId ) )
+		{
+		RNodeInterface client;
+    	client.Open ( aId );
+    	iClients.AppendL ( client );
+		}
+	}
+
+TInt CUPnPFlowBase::RemoveControlClient ( TInt aIndex )
+	{
+	__ASSERT_DEBUG ( aIndex >= 0 && aIndex < iClients.Count () , User::Invariant ( ) );
+	
+	iClients.Remove ( aIndex );
+	return iClients.Count ( );
+	}
+
+TInt CUPnPFlowBase::FindControlClient ( const TNodeId& aId )
+	{
+	for ( TInt i = 0; i < iClients.Count ( ); i++ )
+		{
+		if ( aId == iClients[i].RecipientId ( ) )
+			{
+			return i;
+			}
+		}
+	return KErrNotFound;
+	}
+
+TInt CUPnPFlowBase::CountControlClients ( )
+	{
+	return iClients.Count ( );
+	}
+
+void CUPnPFlowBase::SetClientLeaving ( const TNodeId& aId )
+	{
+	TInt idx = FindControlClient ( aId );
+	__ASSERT_DEBUG ( idx != KErrNotFound, User::Invariant ( ) );
+
+	iClients[idx].SetFlags ( TClientType::ELeaving );
+	}
+
+TBool CUPnPFlowBase::IsClientLeaving ( const TNodeId& aId )
+	{
+	TInt idx = FindControlClient ( aId );
+	__ASSERT_DEBUG ( idx != KErrNotFound, User::Invariant ( ) );
+
+	if ( iClients[idx].Flags () == TClientType::ELeaving )
+		{
+		return ETrue;
+		}
+	return EFalse;
+	}
+
+TBool CUPnPFlowBase::CheckIfAllClientsLeaving ( )
+	{
+	TUint count = CountControlClients ( );
+	for ( TInt i = 0; i < count; i++ )
+		{
+		if ( iClients[i].Flags () != TClientType::ELeaving )
+			{
+			return EFalse;
+			}
+		}
+	return ETrue;
+	}
+
+void CUPnPFlowBase::PostDataClientStopped ( TNodeCtxId aSenderId )
+	{
+	//ESock::TCFDataClient::TDataClientStopped dataClientStopped ( NodeId (), aChannelId.iActivityId, 0 );
+	//dataClientStopped.PostTo ( aChannelId.iNodeId );
+	RClientInterface::OpenPostMessageClose(Id(), aSenderId, ESock::TCFDataClient::TStopped(0).CRef() );
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnpflowfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,168 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <ss_glob.h>
+#include <ss_thread.h>
+
+#include "upnpflowfactory.h"
+#include "httpclientflow.h"
+#include "httpserverflow.h"
+#include "httpudpflow.h"
+#include "httpmudpflow.h"
+
+using namespace ESock;
+using namespace Messages;
+
+CUPnPFlowFactory* CUPnPFlowFactory::NewL(TAny* aConstructionParameters)
+	{
+	CUPnPFlowFactory* factory = new (ELeave) CUPnPFlowFactory(TUid::Uid(CUPnPFlowFactory::iUid), *(reinterpret_cast<CSubConnectionFlowFactoryContainer*>(aConstructionParameters)));
+	CleanupStack::PushL(factory);
+	factory->ConstructL();
+	CleanupStack::Pop();
+	return factory;
+	}
+
+CUPnPFlowFactory::CUPnPFlowFactory(TUid aFactoryId, CSubConnectionFlowFactoryContainer& aParentContainer)
+	: CSubConnectionFlowFactoryBase(aFactoryId, aParentContainer)
+	{
+//	LOG_NODE_CREATE(KESockDataFactTag, CUPnPFlowFactory)
+	}
+
+void CUPnPFlowFactory::ConstructL()
+	{
+	// Register with comms transport to be able to receive our
+	// custom Upnp messages	
+	TUpnpMessage::RegisterL(SockManGlobals::Get ()->SelfWorker ());	
+	}
+
+CProtocolIntfFactoryBase* CUPnPFlowFactory::CreateProtocolIntfFactoryL(CProtocolIntfFactoryContainer& aParentContainer)
+    {
+   	ESock::CProtocolIntfFactoryBase* factory = CUPnPProtocolIntfFactory::NewL(Uid(), aParentContainer);
+    return factory;
+    }
+
+CUPnPFlowFactory::~CUPnPFlowFactory()
+	{
+//	LOG_NODE_DESTROY(KESockDataFactTag, CUPnPFlowFactory)
+	TUpnpMessage::DeRegister();	
+ 	}
+ 	 	
+CSubConnectionFlowBase* CUPnPFlowFactory::DoCreateFlowL(CProtocolIntfBase* aProtocolIntf, TFactoryQueryBase& aQuery)
+	{
+	CSubConnectionFlowBase * flow = NULL;
+	const TUPnPFlowQuery& queryBase = static_cast<const TUPnPFlowQuery&>( aQuery );
+	CChunkManager* chunkMgr = reinterpret_cast<CChunkManager*>(queryBase.iChunkManager);
+
+	if(chunkMgr != NULL)
+		{
+		static_cast<CUPnPProtocolIntfBase *>(aProtocolIntf)->SetChunkManager(chunkMgr);
+		}
+	
+	switch( (static_cast < const TUPnPFlowQuery& >( aQuery )).iDataClientType)
+		{
+		case  EHttpClientFlow:
+			{
+			const THttpClientFlowQuery& clientData = static_cast<const THttpClientFlowQuery&>( aQuery );
+			flow = CHttpClientFlow::NewL(*this, aProtocolIntf, queryBase.iSCPRId, clientData.iSockAddr);
+			}
+			break;
+
+		case EHttpServerFlow:
+			{
+			const THttpServerFlowQuery& serverData = static_cast<const THttpServerFlowQuery&>( aQuery );
+			TPtr8 reqUri ( const_cast<TUint8*>( serverData.iUri ), serverData.iLength, serverData.iLength );
+			flow = CHttpServerFlow::NewL(*this, aProtocolIntf, reqUri, queryBase.iSCPRId );
+			}
+			break;
+
+		case EHttpUdpFlow:
+			{
+			flow = CHttpUdpFlow::NewL( *this, static_cast<CUPnPProtocolIntfBase *>(aProtocolIntf), queryBase.iSCPRId );
+			}
+			break;
+
+		case EHttpMUdpFlow:
+			{
+			flow = CHttpMUdpFlow::NewL( *this, static_cast<CUPnPProtocolIntfBase *>(aProtocolIntf), queryBase.iSCPRId );
+			}
+			break;
+
+		default:
+			ASSERT (0);
+		}
+	return flow;
+	}
+
+ACommsFactoryNodeId* CUPnPFlowFactory::DoFindOrCreateObjectL( TFactoryQueryBase& aQuery )
+	{
+	//Find the flow first
+	const TUPnPFlowQuery& query = static_cast<const TUPnPFlowQuery&> ( aQuery );
+	ACommsFactoryNodeId* flow = NULL;
+
+	if ( query.iDataClientType == EHttpClientFlow )
+		{
+		const THttpClientFlowQuery& clientData = static_cast<const THttpClientFlowQuery&> ( query );
+
+		if ( clientData.iClientFlags == THttpClientFlowQuery::ECreateNew )
+			{ // For UPnP POST request, control plane always creates new flow for attaching it to CSocket.
+			flow = CreateL ( aQuery );
+			}
+		else if ( clientData.iClientFlags == THttpClientFlowQuery::EUseExisting ) // HOST should match
+			{
+			flow = Find ( aQuery );
+			if ( flow == NULL )
+				flow = CreateL ( aQuery );			
+			}
+		static_cast<CUPnPFlowBase*>(flow)->AddControlClientL ( query.iSCPRId );
+		}
+	else if ( query.iDataClientType == EHttpServerFlow )
+		{
+		flow = Find ( aQuery );
+		if ( flow != NULL )
+			User::Leave ( KErrAlreadyExists );
+		else
+			flow = CreateL ( aQuery );
+		}
+	else
+		{
+		//Could be either udp flow or mudp flow.
+		flow = Find ( aQuery );
+		if ( flow == NULL )
+			flow = CreateL ( aQuery );
+		static_cast<CUPnPFlowBase*>(flow)->AddControlClientL ( query.iSCPRId );
+		}
+	return flow;
+	}
+
+CSubConnectionFlowBase* CUPnPFlowFactory::CreateL ( TFactoryQueryBase& aQuery )
+	{
+	TDefaultProtocolIntfFactoryQuery pintfQuery ( TNodeId::NullId () ); /*flowQuery.iCprId*/
+	CProtocolIntfBase* proto = SockManGlobals::Get ()->iProtocolIntfFactories->FindOrCreateProtocolIntfL ( Uid (), pintfQuery );
+	
+	if ( NULL == proto )
+    	{
+    	User::Leave ( KErrNotFound );
+    	}
+    CSubConnectionFlowBase* flow = DoCreateFlowL ( proto, aQuery );
+	CleanupStack::PushL(flow);
+
+	AddManagedObjectL(*flow);
+
+	CleanupStack::Pop(flow);
+	return flow;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnpmemoryutils.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,154 @@
+/*
+* 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:
+*
+*/
+
+
+#include <rmemcell.h>
+#include <rmemchunk.h>
+#include <es_mbuf.h>
+#include <comms-infras/mbufchain.h>
+
+#include "upnpmemoryutils.h"
+
+
+TInt TUPnPMemoryUtils::CreateMemChunk(RMemChunk& aMemChunk, RMBufChain& aData, RMemoryAllocator& aAllocator)
+	{
+	TInt n, n1, n2;
+	TUint8* p1, *p2;
+	RMBuf* m1;
+	RMemCell* m2;
+
+	TInt len = aData.Length();
+	
+	if(!len)
+		{
+		aMemChunk.Init();
+		return KErrNone;
+		}
+		
+	TInt err = aMemChunk.Alloc ( len, aAllocator );
+	
+	if(err != KErrNone)
+		{
+		return err;
+		}
+	m1 = aData.First();
+	p1 = m1->Ptr();
+	n1 = m1->Length();
+	
+	m2 = aMemChunk.First();
+	p2 = m2->Ptr();
+	n2 = m2->Length();
+
+	while (len>0)
+		{
+		__ASSERT_DEBUG(n1>0 && n2>0, User::Invariant ());
+
+		n = n1 < n2 ? n1 : n2;
+
+		Mem::Copy(p2, p1, n);
+
+		if (n1 -= n, n1 == 0)
+			{
+			if (m1 = m1->Next(), m1==NULL)
+				break;
+			p1 = m1->Ptr();
+			n1 = m1->Length();
+			}
+		else
+			p1 += n;
+
+		if (n2 -= n, n2 == 0)
+			{
+			if (m2 = m2->Next(), m2==NULL)
+				break;
+			p2 = m2->Ptr();
+			n2 = m2->Length();
+			}
+		else
+			p2 += n;
+
+		len -= n;
+		}
+	
+	return KErrNone;
+	}
+
+TInt TUPnPMemoryUtils::CreateMBuf(RMBufChain& aBufChain, RMemChunk& aData)
+	{
+	TInt n, n1, n2;
+	TUint8* p1, *p2;
+	RMemCell* m1;
+	RMBuf* m2;
+
+	TInt len = aData.Length();
+	
+	if(!len)
+		{
+		aBufChain.Init();
+		return KErrNone;
+		}
+		
+	TInt err = aBufChain.Alloc ( len );
+	
+	if(err != KErrNone)
+		{
+		return err;
+		}
+	m1 = aData.First();
+	p1 = m1->Ptr();
+	n1 = m1->Length();
+	
+	m2 = aBufChain.First();
+	p2 = m2->Ptr();
+	n2 = m2->Length();
+
+	while (len>0)
+		{
+		__ASSERT_DEBUG(n1>0 && n2>0, User::Invariant ());
+
+		n = n1 < n2 ? n1 : n2;
+
+		Mem::Copy(p2, p1, n);
+
+		if (n1 -= n, n1 == 0)
+			{
+			if (m1 = m1->Next(), m1==NULL)
+				break;
+			p1 = m1->Ptr();
+			n1 = m1->Length();
+			}
+		else
+			p1 += n;
+
+		if (n2 -= n, n2 == 0)
+			{
+			if (m2 = m2->Next(), m2==NULL)
+				break;
+			p2 = m2->Ptr();
+			n2 = m2->Length();
+			}
+		else
+			p2 += n;
+
+		len -= n;
+		}
+
+	return KErrNone;
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnppint.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,90 @@
+// 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:
+// @file
+// @internalComponent
+// System Includes
+// 
+//
+
+#include<ss_glob.h>
+#include <ecom/ecom.h>
+
+//Local Includes
+#include "upnppint.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "httpserver.h"
+#include "app_protintf_msgs.h"
+
+using namespace ESock;
+using namespace Messages;
+
+CUPnPProtocolIntfBase* CUPnPProtocolIntfBase::NewL(CProtocolIntfFactoryBase& aFactory,const TNodeId& aId)
+	{
+	CUPnPProtocolIntfBase* protProv = new(ELeave) CUPnPProtocolIntfBase(aFactory, aId);
+	CleanupStack::PushL(protProv);
+	protProv->ConstructL();
+	CleanupStack::Pop(protProv);
+	return protProv;
+	}
+
+CUPnPProtocolIntfBase::CUPnPProtocolIntfBase ( CProtocolIntfFactoryBase& aFactory,const TNodeId& aId )
+										: CProtocolIntfBase ( aFactory, aId )							
+	{	}
+
+void CUPnPProtocolIntfBase::ConstructL()
+	{
+	//The genreric listener. Should be moved to seperate library once EC120 is done.
+    iAppProtIntfFactoryContainer = CAppProtIntfFactoryContainer::NewL();
+    TAppProtIntfMessage::RegisterL();
+	}
+
+CUPnPProtocolIntfBase::~CUPnPProtocolIntfBase ()
+	{
+	delete iAppProtIntfFactoryContainer;
+	TAppProtIntfMessage::DeRegister();
+	}	
+
+void CUPnPProtocolIntfBase::AddServiceUriL ( const TDesC8& aUri, MHttpEventObserver& aObserver,  TNodeCtxId aServiceId, TNodeCtxId aControlProviderId )
+	{
+	if ( !iHttpServer )
+		iHttpServer = CHttpServer::NewL (this);
+	
+	iHttpServer->AddServiceUriL( aUri, aObserver, aServiceId, aControlProviderId );
+	}
+
+void CUPnPProtocolIntfBase::RemoveServiceUri ( const TDesC8& aUri,  TNodeCtxId aServiceId, TNodeCtxId aControlProviderId )
+	{
+	if ( iHttpServer->RemoveServiceUri( aUri, aServiceId, aControlProviderId ) )
+		{
+		iHttpServer = NULL; // httpserver makes self deletion, once listener leave completes
+		}
+	}
+
+void CUPnPProtocolIntfBase::SetChunkManager(CChunkManager* aChunkManager)
+	{
+	iMemChunkManager = aChunkManager;
+	}
+
+CChunkManager* CUPnPProtocolIntfBase::GetMemoryChunkManager()
+	{
+	return iMemChunkManager;
+	}
+
+const TNodeId& CUPnPProtocolIntfBase::GetAppProtIntfContainerId()
+	{
+	return iAppProtIntfFactoryContainer->Id();
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/src/upnppintfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "upnppint.h"
+
+using namespace ESock;
+// =====================================================================================
+// UPnP Protocol-Interface Factory
+
+CUPnPProtocolIntfFactory* CUPnPProtocolIntfFactory::NewL(TUid aFactoryId, CProtocolIntfFactoryContainer& aParentContainer)
+	{
+	CUPnPProtocolIntfFactory* factory = new (ELeave) CUPnPProtocolIntfFactory(aFactoryId, aParentContainer);
+	//Note!!!! UPnP PINT Factory is not a Plugin,so make self construct that adds this factory to its
+	//parent container, which is not the case with other factory that were created as Plugin's
+	CleanupStack::PushL(factory);
+    factory->ConstructL();
+    CleanupStack::Pop(factory);
+	return factory;
+	}
+
+CUPnPProtocolIntfFactory::CUPnPProtocolIntfFactory(TUid aFactoryId,
+												   CProtocolIntfFactoryContainer& aParentContainer)
+												: CProtocolIntfFactoryBase(aFactoryId, aParentContainer)
+	{
+	}
+
+CProtocolIntfBase* CUPnPProtocolIntfFactory::DoCreateProtocolIntfL(TFactoryQueryBase& aQuery)
+	{	
+	const TDefaultProtocolIntfFactoryQuery& query = static_cast<const TDefaultProtocolIntfFactoryQuery&>(aQuery);
+	return CUPnPProtocolIntfBase::NewL(*this, query.iCprId);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicecpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,82 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSERVICECPR_H
+#define __UPNPSERVICECPR_H
+
+#include <comms-infras/corecpr.h>
+#include <comms-infras/ss_linkcprnodemessages.h>
+#include <comms-infras/ss_api_ext.h>
+#include <comms-infras/ss_platsec_apiext.h>
+
+#include "upnpcpr.h"
+
+#include "upnpsppublishinfocontainer.h"
+
+
+using namespace ESock;
+
+//Forward Declarations
+	
+class CUPnPServiceConnectionProvider : 	public CUPnPConnectionProvider
+  	{
+public:
+	static CUPnPServiceConnectionProvider* NewL ( CConnectionProviderFactoryBase& aFactory );
+	virtual ~CUPnPServiceConnectionProvider ( );
+		
+	static TInt RootDeviceRepublishTimerCallbackL ( TAny* aPtr );
+	inline TInt IsRootDeviceRegistered ( );
+	inline void SetRootDeviceRegistered ( TBool aValue );
+	void ProcessRootDeviceRegisteredL ( );	
+	CUPnPRootDeviceInfoContainer& GetRootDeviceInfoContainer ( );
+	CStringPoolManager& StringPoolManager ( );
+	inline const CUPnPDevice& RootDevice ();
+		
+private:
+	CUPnPServiceConnectionProvider ( CConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap );
+	void ConstructL ( );	
+    virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+#ifdef SYMBIAN_NETWORKING_UPS
+    TInt GetProcessAndThreadId ( TProcessId& aProcessId, TThreadId& aThreadId ) const;
+#endif
+ 	 	
+private:
+ 	CUPnPRootDeviceInfoContainer*	iRootDeviceInfoContainer;
+	CPeriodic*						iRepublishTimer;
+	TBool							iRootDeviceRegistered;
+	};
+
+TBool CUPnPServiceConnectionProvider::IsRootDeviceRegistered ( )
+   	{
+   	return iRootDeviceRegistered;
+   	}
+   
+void CUPnPServiceConnectionProvider::SetRootDeviceRegistered ( TBool aValue )
+   	{
+   	iRootDeviceRegistered = aValue;
+   	}
+   	
+const CUPnPDevice& CUPnPServiceConnectionProvider::RootDevice ()
+	{	
+	CUPnPDeviceDescription& deviceDesc = iRootDeviceInfoContainer->GetRootDeviceDesciption (); 
+	return *deviceDesc.DeviceObject ();
+	}
+	
+	
+	
+#endif // UPNPSERVICECPR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicecpractivities.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,103 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSERVICECPRACTIVITIES_H
+#define __UPNPSERVICECPRACTIVITIES_H
+
+#include <comms-infras/corecpractivities.h>
+
+#include "upnpservicecpr.h"
+#include "upnp_cf_msgs.h"
+
+using namespace MeshMachine;
+
+namespace UPnPServiceCprActivities
+{
+	DECLARE_ACTIVITY_MAP(activityMap)
+	
+	class CUpnpNewServiceRegisterActivity: public CNodeActivityBase	
+		{
+	public:
+		static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		~CUpnpNewServiceRegisterActivity ( );
+		
+	private:
+		CUpnpNewServiceRegisterActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+		: CNodeActivityBase ( aActivitySig, aNode )
+			{	}	
+	public:
+		typedef MeshMachine::TNodeContext<CUPnPServiceConnectionProvider, CprStates::TContext> TContext;
+		
+		typedef TAwaitingMessageState<TUpnpMessage::TRootDeviceRegistered> TAwiatingRootDeviceRegistered;
+
+		DECLARE_SMELEMENT_HEADER ( TRegisterRootDevice, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			virtual void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TRegisterRootDevice )
+
+		DECLARE_SMELEMENT_HEADER ( TReplyToPendingServices, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			virtual void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TReplyToPendingServices )
+		
+		DECLARE_SMELEMENT_HEADER ( TReplyToCurrentService, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			virtual void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TReplyToCurrentService )		
+		};
+		
+	class CUpnpSubscriptionTimerActivity: public CNodeActivityBase
+		{
+	public:
+		static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		~CUpnpSubscriptionTimerActivity ( );
+		
+		static TInt SubscriptionTimerCallBackL ( TAny* aPtr );	
+		
+	private:
+		CUpnpSubscriptionTimerActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+			: CNodeActivityBase ( aActivitySig, aNode )
+			{	}
+			
+		void ConstructL ( );
+		
+	private:
+		CPeriodic*	iPeriodicTimer;
+		
+	public:
+		typedef MeshMachine::TNodeContext<CUPnPServiceConnectionProvider, CprStates::TContext> TContext;
+		
+		typedef TAwaitingMessageState<TUpnpMessage::TStartTimer> TAwaitingStartTimer;		
+		typedef TAwaiting2MessagesState<TUpnpMessage::TStartTimer, TUpnpMessage::TStopTimer> TAwaitingStartOrStopTimer;
+	
+		DECLARE_SMELEMENT_HEADER ( TStartTimer, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			virtual void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TStartTimer )
+
+		DECLARE_SMELEMENT_HEADER ( TDequeueClient, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			virtual void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TDequeueClient )
+		
+		DECLARE_SMELEMENT_HEADER ( TStartOrStopTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+			virtual TInt TransitionTag ( );
+		DECLARE_SMELEMENT_FOOTER ( TStartOrStopTag )
+
+		DECLARE_SMELEMENT_HEADER ( TLoopOrCancelTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+			virtual TInt TransitionTag ( );
+		DECLARE_SMELEMENT_FOOTER ( TLoopOrCancelTag )		
+		};		
+}
+
+#endif // UPNPSERVICECPRACTIVITIES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicecprfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSERVICECPRFACTORY_H
+#define __UPNPSERVICECPRFACTORY_H
+
+#include <comms-infras/ss_connprov.h>
+#include <comms-infras/ss_linkcprnodemessages.h>
+
+class CUPnPServiceConnectionProviderFactory : public ESock::CConnectionProviderFactoryBase
+	{		
+public:
+	// ECOM interface implementation ID
+	static const TUint iUid = 0x2000D058;
+
+public:
+	static CUPnPServiceConnectionProviderFactory* NewL(TAny* aParentContainer);
+
+protected:
+	CUPnPServiceConnectionProviderFactory(
+		TUid aFactoryId, 
+		ESock::CConnectionFactoryContainer& aParentContainer);
+
+protected:
+    // CConnectionProviderFactoryBase overrides
+    virtual ESock::ACommsFactoryNodeId* DoCreateObjectL(ESock::TFactoryQueryBase& aQuery);	
+	};
+	
+#endif // UPNPSERVICECPRFACTORY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicecprstates.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,79 @@
+// 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 __UPNPSERVICECPRSTATES_H
+#define __UPNPSERVICECPRSTATES_H
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/corecprstates.h>
+
+//Local Includes
+#include "upnpservicecpr.h"
+#include "upnp_cf_msgs.h"
+
+using namespace MeshMachine;
+
+namespace UPnPServiceCprStates
+{
+typedef TNodeContext<CUPnPServiceConnectionProvider, CprStates::TContext> TContext;
+
+// States
+typedef TAwaiting2MessagesState<TUpnpMessage::TServiceJoinRequest, TUpnpMessage::TDeviceJoinRequest> TAwaitingServiceOrDeviceJoin;
+typedef TAwaiting2MessagesState<TUpnpMessage::TRegisterService, TUpnpMessage::TRegisterDevice> TAwaitingServiceOrDeviceRegister;
+typedef TAwaiting2MessagesState<TUpnpMessage::TUnregisterService, TUpnpMessage::TUnregisterDevice> TAwaitingServiceOrDeviceUnregister;
+
+// State Forks
+DECLARE_SMELEMENT_HEADER ( TServiceOrDeviceTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TServiceOrDeviceTag )
+
+
+DECLARE_SMELEMENT_HEADER ( TRootRegisteredOrNoTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TRootRegisteredOrNoTag )
+
+
+// Transitions
+DECLARE_SMELEMENT_HEADER ( TPerformServiceOrDeviceValidationAndSendResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TPerformServiceOrDeviceValidationAndSendResponse )
+
+
+DECLARE_SMELEMENT_HEADER ( TAppendServiceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TAppendServiceInfo )
+
+
+DECLARE_SMELEMENT_HEADER ( TAppendDeviceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TAppendDeviceInfo )
+
+
+DECLARE_SMELEMENT_HEADER ( TDeleteServiceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TDeleteServiceInfo )
+
+
+DECLARE_SMELEMENT_HEADER ( TDeleteDeviceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TDeleteDeviceInfo )
+
+}
+
+
+#endif // UPNPSERVICECPRSTATES_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicedeftscpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,143 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSERVICEDEFAULTSCPR_H
+#define __UPNPSERVICEDEFAULTSCPR_H
+
+#include <comms-infras/corescpr.h>
+#include <comms-infras/corescprstates.h>
+#include <comms-infras/corescpractivities.h>
+
+
+#include "cupnpdescriptioncomposer.h"
+#include "upnpsppublishinfo.h"
+#include "upnpservicecpr.h"
+#include "upnpscpr.h"
+
+using namespace Messages;
+
+
+class CUPnPServiceDefaultSubConnectionProvider: public CUPnPSubConnectionProvider
+	{
+public:
+	static CUPnPServiceDefaultSubConnectionProvider* NewL ( CSubConnectionProviderFactoryBase& aFactory );
+	~CUPnPServiceDefaultSubConnectionProvider ( );
+ 	
+ 	void SetUdpServerFlow ( const TNodeId& aCommsId );
+	void SetUdpClientFlow ( const TNodeId& aCommsId );
+	TNodeId UdpClientFlow ( );
+	TNodeId UdpServerFlow ( );
+	const TDesC8& Key ( );	
+	void SetPublishInfoL ( CUPnPPublishInfoElement* aPublishInfo );
+	CUPnPPublishInfoElement* PublishInfo ( );
+	const TDesC8& RootDeviceUrn ( );
+	void SetRootDeviceUrnL ( const TDesC8& aDeviceType );
+	const TDesC8& RootDeviceUsn ( );	
+	CUPnPDescriptionComposer& DeviceDescriptionComposerL ( );	
+	CUPnPServiceConnectionProvider& ConnectionProvider ( );	
+	TBool RootDevicePublished ( );
+	void SetRootDevicePublished ( TBool aValue );	
+	TBool IsClosing ( );		
+	void SetClosing ( );
+		
+private:
+	CUPnPServiceDefaultSubConnectionProvider ( ESock::CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap );
+	void ConstructL ( );
+    virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );	
+    
+private:
+	CUPnPDescriptionComposer* 	iDeviceDescriptionComposer;
+	CUPnPPublishInfoElement*	iRootDevicePublishInfo;
+	RBuf8						iRootDeviceUrn; // = urn:domain-name-device:deviceType:v
+	RBuf8						iRootDeviceUsn; // = upnp:rootdevice::uuid:device-UUID
+    TNodeId						iUdpClientFlow;
+	TNodeId 					iUdpServerFlow;
+	TBool						iRootDevicePublished;
+	TBool						iClosing;
+	};
+	
+	
+inline TBool CUPnPServiceDefaultSubConnectionProvider::IsClosing ( )
+	{
+	return iClosing;
+	}
+		
+inline void CUPnPServiceDefaultSubConnectionProvider::SetClosing ( )
+	{
+	iClosing = ETrue;
+	}
+	
+inline TNodeId CUPnPServiceDefaultSubConnectionProvider::UdpClientFlow ( )
+	{
+	return iUdpClientFlow;
+	}
+	
+inline void CUPnPServiceDefaultSubConnectionProvider::SetUdpClientFlow ( const TNodeId& aCommsId )
+	{
+	iUdpClientFlow = aCommsId;
+	}
+	
+inline TNodeId CUPnPServiceDefaultSubConnectionProvider::UdpServerFlow ( )
+	{
+	return iUdpServerFlow;
+	}
+	
+inline void CUPnPServiceDefaultSubConnectionProvider::SetUdpServerFlow ( const TNodeId& aCommsId )
+	{
+	iUdpServerFlow = aCommsId;
+	}
+
+inline const TDesC8& CUPnPServiceDefaultSubConnectionProvider::Key ( )
+	{
+	return iRootDevicePublishInfo->Key( );
+	}
+
+inline CUPnPPublishInfoElement* CUPnPServiceDefaultSubConnectionProvider::PublishInfo ( )
+	{
+	return iRootDevicePublishInfo;
+	}
+	
+inline const TDesC8& CUPnPServiceDefaultSubConnectionProvider::RootDeviceUrn ( )
+	{
+	return iRootDeviceUrn;
+	}
+
+inline void CUPnPServiceDefaultSubConnectionProvider::SetRootDeviceUrnL ( const TDesC8& aDeviceUrn )
+	{
+	iRootDeviceUrn.Close ( );
+	iRootDeviceUrn.CreateL ( aDeviceUrn );
+	}
+	
+inline const TDesC8& CUPnPServiceDefaultSubConnectionProvider::RootDeviceUsn ( )
+	{
+	return iRootDeviceUsn;
+	}
+
+inline TBool CUPnPServiceDefaultSubConnectionProvider::RootDevicePublished ( )
+	{
+	return iRootDevicePublished;
+	}
+
+inline void CUPnPServiceDefaultSubConnectionProvider::SetRootDevicePublished ( TBool aValue )
+	{
+ 	iRootDevicePublished = aValue;
+	}	
+	
+
+
+#endif //UPNPSERVICEDEFAULTSCPR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicedeftscpractivities.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSERVICEDEFAULTSCPRACTIVITIES_H
+#define __UPNPSERVICEDEFAULTSCPRACTIVITIES_H
+
+#include <comms-infras/corescpractivities.h>
+#include "upnpservicedeftscpr.h"
+
+
+using namespace ESock;
+using namespace MeshMachine;
+
+
+namespace UPnPServiceDefaultActivities
+{
+	DECLARE_ACTIVITY_MAP ( activityMap )
+	
+	class CUpnpRootDeviceInfoRequestActivity: public CNodeParallelActivityBase
+		{
+		public:
+			static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+			~CUpnpRootDeviceInfoRequestActivity ( );			
+			
+		private:
+			CUpnpRootDeviceInfoRequestActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount );			
+			
+		private: // Context
+			typedef TNodeContext<CUPnPServiceDefaultSubConnectionProvider, CoreStates::TContext> TContext;
+			
+		public:
+			// Transitions
+			DECLARE_SMELEMENT_HEADER ( TComposeAndSendRootDescription, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+				void DoL ( );
+			DECLARE_SMELEMENT_FOOTER ( TComposeAndSendRootDescription )
+			
+			DECLARE_SMELEMENT_HEADER ( TFindAndSendIconData, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+				void DoL ( );
+			DECLARE_SMELEMENT_FOOTER ( TFindAndSendIconData )
+		};
+	
+	class CUpnpRegisterRootDeviceActivity: public CNodeActivityBase
+		{
+	public:
+		static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		~CUpnpRegisterRootDeviceActivity ();
+		
+	private:
+		CUpnpRegisterRootDeviceActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		
+	private:
+		RBuf8						iIconUrl;
+		TInt						iIconUrlIdx;
+		
+	public:
+		typedef TNodeContext<CUPnPServiceDefaultSubConnectionProvider, CoreStates::TContext> TContext;
+		
+		DECLARE_SMELEMENT_HEADER ( TCreateIconFlow, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ();
+		DECLARE_SMELEMENT_FOOTER ( TCreateIconFlow )
+				
+		// StateForks
+		DECLARE_SMELEMENT_HEADER ( TIconCreateOrNoTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+			TInt TransitionTag ();
+		DECLARE_SMELEMENT_FOOTER ( TIconCreateOrNoTag )
+		
+		DECLARE_SMELEMENT_HEADER ( TIconOrNoTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+			TInt TransitionTag ();
+		DECLARE_SMELEMENT_FOOTER ( TIconOrNoTag )		
+		};		
+}
+
+#endif // UPNPSERVICEDEFAULTSCPRACTIVITIES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicedeftscprstates.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,135 @@
+// 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 __UPNPSERVICEDEFAULTSCPRSTATES_H
+#define __UPNPSERVICEDEFAULTSCPRSTATES_H
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_nodemessages.h>
+#include <comms-infras/corescprstates.h>
+
+//Local Includes
+#include "upnpservicedeftscpr.h"
+#include "upnp_cf_msgs.h"
+
+using namespace MeshMachine;
+
+namespace UPnPServiceDefaultStates
+{
+typedef TNodeContext<CUPnPServiceDefaultSubConnectionProvider, SCprStates::TContext> TContext;
+
+
+//========================================States==============================================
+typedef TAwaitingMessageState<TUpnpMessage::TRegisterRootDevice> TAwaitingRootDeviceRegister;
+typedef TAwaitingMessageState<TUpnpMessage::TDeviceRepublish> TAwaitingDeviceRepublish;
+
+//=================================Transitions================================================
+DECLARE_SMELEMENT_HEADER ( TStoreUdpClient, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreUdpClient )			
+
+DECLARE_AGGREGATED_TRANSITION2 (
+	TProcessUdpClientFlowCreation,
+	PRStates::TProcessDataClientCreation,
+	TStoreUdpClient
+	)	
+
+
+DECLARE_SMELEMENT_HEADER ( TStoreUdpServer, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreUdpServer )
+
+DECLARE_AGGREGATED_TRANSITION2 (
+	TProcessUdpServerFlowCreation,
+	PRStates::TProcessDataClientCreation,
+	TStoreUdpServer
+	)
+
+
+DECLARE_SMELEMENT_HEADER ( TStartMuClient, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStartMuClient )			
+
+
+DECLARE_SMELEMENT_HEADER ( TStartMuServer, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStartMuServer )			
+
+
+DECLARE_SMELEMENT_HEADER ( TBuildPublishAndRootDeviceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TBuildPublishAndRootDeviceInfo )
+
+
+DECLARE_SMELEMENT_HEADER ( TSendPublishRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+	void DoPublishL ( const TDesC8& aSearchTarget, const TDesC8& aUsn, TInt aMaxAge );
+DECLARE_SMELEMENT_FOOTER ( TSendPublishRequest )			
+
+
+DECLARE_SMELEMENT_HEADER ( TRegisterRootDeviceWithMuServer, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+	void RegisterForMSearchL ( const TDesC8& aSearchTarget );
+DECLARE_SMELEMENT_FOOTER ( TRegisterRootDeviceWithMuServer )
+
+
+DECLARE_SMELEMENT_HEADER ( TSendRootDeviceRegistered, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TSendRootDeviceRegistered )
+
+
+DECLARE_SMELEMENT_HEADER ( TSendSearchResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+	void SendSearchResponseL ( const TDesC8& aSearchTarget, const TDesC8& aUsn, TInt aMaxAge );
+DECLARE_SMELEMENT_FOOTER ( TSendSearchResponse )
+
+
+DECLARE_SMELEMENT_HEADER ( TLeaveRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TLeaveRequest )
+
+
+DECLARE_AGGREGATED_TRANSITION3 (
+	TProcessClientLeave,
+   	MeshMachine::TRemoveClient,
+   	CoreNetStates::TSendLeaveCompleteIfRequest,
+   	TLeaveRequest
+   	)
+
+
+DECLARE_SMELEMENT_HEADER ( TProcessDataClientStop, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+	void SendByeRequestL ( const TDesC8& aSearchTarget, const TDesC8& aUsn );
+DECLARE_SMELEMENT_FOOTER ( TProcessDataClientStop )			
+
+
+//=================================StateForks================================================
+DECLARE_SMELEMENT_HEADER ( TRequestOrIgnoreTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TRequestOrIgnoreTag )
+
+
+DECLARE_SMELEMENT_HEADER ( TNoTagOrIgnoreTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TNoTagOrIgnoreTag )
+
+
+DECLARE_SMELEMENT_HEADER ( TNoTagOrDataClientIdle, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TNoTagOrDataClientIdle )
+
+}
+#endif // UPNPSERVICEDEFAULTSCPRSTATES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicescpr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,180 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSERVICESCPR_H
+#define __UPNPSERVICESCPR_H
+
+#include <comms-infras/corescpr.h>
+
+#include "upnpservicecpr.h"
+#include "upnpspsubscribeinfocontainer.h"
+#include "upnpparamset.h"
+#include "upnp_cf_msgs.h"
+#include "upnpsppublishinfo.h"
+#include "upnpscpr.h"
+
+
+using namespace Messages;
+
+
+//Forward Declarations
+namespace UPnPServiceSCprStates
+	{
+	class TStoreRequestParams;
+	class TSendRequestParamResponse;
+	class TInitiateActivities;
+	}
+
+#ifdef __X86GCC__
+ 	inline ESock::CSubConnectionProviderBase* __x86gcc_subconnection_provider_base_cast(Messages::ANode* aNode)
+     	{
+ 	    return static_cast<ESock::CSubConnectionProviderBase*>(ESock::__x86gcc_mm_comms_provider_base_cast(aNode));
+     	}
+ 
+ 	inline ESock::CSubConnectionProviderBase& __x86gcc_subconnection_provider_base_cast(Messages::ANode& aNode)
+     	{
+ 	    return static_cast<ESock::CSubConnectionProviderBase&>(ESock::__x86gcc_mm_comms_provider_base_cast(aNode));
+     	}
+namespace Messages
+ 	{
+ 	// gcc-mingw does not support declaring friends from different namespaces so we define proxy
+  	// functions to do the cast.
+ 	template <>
+ 	inline ESock::CSubConnectionProviderBase* mnode_cast<ESock::CSubConnectionProviderBase>(Messages::ANode* aNode)
+ 		{
+ 		return __x86gcc_subconnection_provider_base_cast(aNode);
+ 		}
+ 
+ 	template <>
+ 	inline ESock::CSubConnectionProviderBase& mnode_cast<ESock::CSubConnectionProviderBase>(Messages::ANode& aNode)
+ 		{
+ 		return __x86gcc_subconnection_provider_base_cast(aNode);
+ 		}
+ 	}
+#endif
+
+class CUPnPServiceSubConnectionProvider : public CUPnPSubConnectionProvider
+	{
+	friend class UPnPServiceSCprStates::TStoreRequestParams;
+	friend class UPnPServiceSCprStates::TSendRequestParamResponse;
+	friend class UPnPServiceSCprStates::TInitiateActivities;
+
+#ifdef __X86GCC__
+  	// gcc-mingw does not support declaring friends from different namespaces so we define proxy
+  	// functions to do the cast.
+    friend  ESock::CSubConnectionProviderBase* __x86gcc_subconnection_provider_base_cast(Messages::ANode* aNode);
+    friend  ESock::CSubConnectionProviderBase& __x86gcc_subconnection_provider_base_cast(Messages::ANode& aNode);
+#elif !defined(__GCCXML__)
+    friend  CSubConnectionProviderBase* mcfnode_cast<CSubConnectionProviderBase>(Messages::ANode* aNode);
+    friend  CSubConnectionProviderBase& mcfnode_cast<CSubConnectionProviderBase>(Messages::ANode& aNode);
+#endif
+
+public:
+	static CUPnPServiceSubConnectionProvider* NewL ( ESock::CSubConnectionProviderFactoryBase& aFactory );
+	virtual ~CUPnPServiceSubConnectionProvider ( );
+	
+	void SetKeyL ( const TDesC8& aKey );
+	const TDesC8& Key ( );
+	void SetEventUrlL ( const TDesC8& aEventUrl );
+	const TDesC8& EventUrl ( );
+	void SetControlUrlL ( const TDesC8& aControlUrl );
+	const TDesC8& ControlUrl ( );
+	void SetDevice ( const TBool aIsDevice );	
+	TBool IsDevice ( );
+	const TDesC8& SCPDData ( );
+	TNodeId UdpClientFlow ( );
+	TNodeId UdpServerFlow ( );
+	void SetUdpServerFlow ( const TNodeId& aCommsId );
+	void SetUdpClientFlow ( const TNodeId& aCommsId );
+	void SetPublishInfo ( CUPnPPublishInfoElement* aPublishInfo );
+	CUPnPPublishInfoElement* PublishInfo ( );
+	CUPnPSubscribeInfoContainer* GetSubscribeInfoContainer ( );	
+	CUPnPServiceConnectionProvider& ConnectionProvider ( );	
+	TBool IsClosing ( );
+	void SetClosing ( );	
+	
+	void AddResponseParamSetL ( TUPnPEvent aEvent );
+	void ClearResponseParamL ( );
+	
+	void DoPublishL ( const TDesC8& aSearchTarget, const TDesC8& aUsn, TInt aMaxAge );    
+	void DeprecateExpiredSubscriptions ( );	
+    void DestroyDataClients ( );
+		
+private:	
+	CUPnPServiceSubConnectionProvider ( ESock::CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap );
+	void ConstructL ( );
+    virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );	   
+	
+	void NotifySubConnectionL ( );		
+	void SendNotifyToRemoteClientsL ( RParameterFamily& aReqFamily );
+    void InitiateActivitiesL ( );
+    void InitiateRequestL ( RParameterFamily& aReqFamily );
+    void CreatePropertyUrlL ( const TDesC8& aRelativeUrl, RBuf8& aTargetUrl );
+    
+    CUPnPDeviceRegisterParamSet* CopyWithIconInfoL ( CUPnPDeviceRegisterParamSetExt* aDeviceParam );
+    void LoadIconListL ( const TDesC8& aIconData, CUPnPDeviceRegisterParamSet* aDeviceParamSet );
+    void ReadTInt ( TPtrC8& aBuffer, TInt& aValue );    
+    
+private:
+	RParameterFamilyBundle 	iRequestBundle;	
+	RCFParameterFamilyBundle	iResponseBundle;
+		
+	CUPnPSubscribeInfoContainer*	iSubscribeInfoCont;
+	CUPnPPublishInfoElement*		iPublishInfo;
+	RBuf8							iDescUrl;
+	RBuf8							iControlUrl; 
+	RBuf8							iEventUrl;
+	TBool							iDevice;
+	
+	TNodeId 						iUdpClientFlow;
+	TNodeId 						iUdpServerFlow;
+	TBool 							iClosing;	
+	};
+
+inline TBool CUPnPServiceSubConnectionProvider::IsClosing ( )
+	{
+    return iClosing;
+    }
+    
+inline void CUPnPServiceSubConnectionProvider::SetClosing ( )
+	{
+	iClosing = ETrue;
+	}    
+
+inline TNodeId CUPnPServiceSubConnectionProvider::UdpClientFlow ( )
+	{
+	return iUdpClientFlow;
+	}
+	
+inline void CUPnPServiceSubConnectionProvider::SetUdpClientFlow ( const TNodeId& aCommsId )
+	{
+	iUdpClientFlow = aCommsId;
+	}
+	
+inline TNodeId CUPnPServiceSubConnectionProvider::UdpServerFlow ( )
+	{
+	return iUdpServerFlow;
+	}
+	
+inline void CUPnPServiceSubConnectionProvider::SetUdpServerFlow ( const TNodeId& aCommsId )
+	{
+	iUdpServerFlow = aCommsId;
+	}
+
+
+#endif // UPNPSERVICESCPR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicescpractivities.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,242 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSERVICESCPRACTIVITIES_H
+#define __UPNPSERVICESCPRACTIVITIES_H
+
+// System Include
+#include <comms-infras/corescpractivities.h>
+
+// User Include
+#include "upnpservicescpr.h"
+
+using namespace ESock;
+using namespace MeshMachine;
+
+namespace UPnPServiceSCprActivities
+	{
+	DECLARE_ACTIVITY_MAP(activityMap)
+	
+		
+	//-------------------New Service Registration using SCRP----------------------------
+	class CUpnpServiceRegistrationActivity: public CNodeActivityBase
+		{
+	public:
+		static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		~CUpnpServiceRegistrationActivity ( );
+				
+	private:
+		CUpnpServiceRegistrationActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );			
+		
+		void GenerateServiceIdL ( CStringPoolManager& aStringPoolMgr, const TDesC8& aUri, RBuf8& aServiceId );
+		void CreateRelativeUrlL ( const TDesC8& aServiceId, const TDesC8& aUri, RBuf8& aResultUrl );
+		
+	private:
+		CUPnPServiceRegisterParamSet*	iParamSet;
+		CUPnPServiceInfo*				iServiceInfo; // Dont delete ownership will be passed to CPR		
+		
+	public:			
+		typedef TNodeContext<CUPnPServiceSubConnectionProvider, CoreStates::TContext> TContext;
+	
+		// States
+		typedef TAwaitingMessageState<TUpnpMessage::TServiceRegistration> TAwaitingServiceRegistration;
+				
+		
+		//Transitions
+		DECLARE_SMELEMENT_HEADER ( TRequestServiceJoin, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TRequestServiceJoin )
+		
+		DECLARE_SMELEMENT_HEADER ( TBuildPublishAndServiceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TBuildPublishAndServiceInfo )
+		
+		DECLARE_SMELEMENT_HEADER ( TRegisterServiceInfoWithCPR, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TRegisterServiceInfoWithCPR )
+		
+		DECLARE_SMELEMENT_HEADER ( TSendPublishRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TSendPublishRequest )
+		
+		DECLARE_SMELEMENT_HEADER ( TRegisterSsdpInfoWithServer, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TRegisterSsdpInfoWithServer )
+				
+		DECLARE_SMELEMENT_HEADER ( TInitiateTcpFlowCreation, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TInitiateTcpFlowCreation )
+				
+		};
+			
+	
+	//-------------------New Device Registration using SCRP----------------------------
+	class CUpnpDeviceRegistrationActivity: public CNodeActivityBase			
+		{
+	public:
+		static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		~CUpnpDeviceRegistrationActivity ( );
+				
+	private:
+		CUpnpDeviceRegistrationActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );		
+
+	private:
+		CUPnPDeviceRegisterParamSet *iParamSet;
+		CUPnPDevice*				iDeviceInfo; // Dont delete ownership will be passed to CPR
+		RBuf8						iIconUrl;
+		TInt						iIconUrlIdx;
+	public:
+		typedef TNodeContext<CUPnPServiceSubConnectionProvider, CoreStates::TContext> TContext;
+	
+		// States 		
+		typedef TAwaitingMessageState<TUpnpMessage::TDeviceRegistration> TAwaitingDeviceRegistration;
+		
+		// Transitions
+		DECLARE_SMELEMENT_HEADER ( TRequestDeviceJoin, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TRequestDeviceJoin )
+		
+		DECLARE_SMELEMENT_HEADER ( TBuildPublishAndDeviceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TBuildPublishAndDeviceInfo )
+		
+		DECLARE_SMELEMENT_HEADER ( TRegisterDeviceInfoWithCPR, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TRegisterDeviceInfoWithCPR )
+		
+		DECLARE_SMELEMENT_HEADER ( TSendPublishRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TSendPublishRequest )
+		
+		DECLARE_SMELEMENT_HEADER ( TRegisterSsdpInfoWithServer, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+			void RegisterForMSearchL ( const TDesC8& aSearchTarget );
+		DECLARE_SMELEMENT_FOOTER ( TRegisterSsdpInfoWithServer )	
+		
+		DECLARE_SMELEMENT_HEADER ( TCreateIconFlow, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ();
+		DECLARE_SMELEMENT_FOOTER ( TCreateIconFlow )
+				
+		// StateForks
+		DECLARE_SMELEMENT_HEADER ( TIconCreateOrNoTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+			TInt TransitionTag ();
+		DECLARE_SMELEMENT_FOOTER ( TIconCreateOrNoTag )
+		
+		DECLARE_SMELEMENT_HEADER ( TIconOrNoTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+			TInt TransitionTag ();
+		DECLARE_SMELEMENT_FOOTER ( TIconOrNoTag )
+		};
+							
+	
+	//-------------------TCP ( Get/Subscribe/UnSubscribe ) Response Activity----------------------------
+	class CUpnpSPRequestInfoActivity: public CNodeActivityBase
+		{
+	public:
+		static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		
+		~CUpnpSPRequestInfoActivity ( );
+			
+	private:
+		CUpnpSPRequestInfoActivity::CUpnpSPRequestInfoActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+		: CNodeActivityBase ( aActivitySig, aNode )
+		{  }
+				
+		TInt HandleSubscribeRequestL ( CRequest& aRequest, TSubsribeResponseInfo& aSubscribeResponse, CUPnPPublishInfoElement& aPublishInfo );
+		void ProcessCallBackUrlL ( const TDesC8& aUrl, CUPnPSubscribeInfoElement* aSubscribeElement );
+		
+		TInt HandleResubscribeRequestL ( CRequest& aRequest, TSubsribeResponseInfo& aSubscribeResponse, CUPnPPublishInfoElement& aPublishInfo );			
+		TInt GetHeaderValue ( CRequest& aRequest, TInt aFieldIndex, THTTPHdrVal& aFieldVal, const TStringTable& aTable );
+			
+	private: // Context
+		typedef TNodeContext<CUPnPServiceSubConnectionProvider, CoreStates::TContext> TContext;								
+
+	public: // Transitions
+		
+		DECLARE_SMELEMENT_HEADER ( TSendDescribeResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TSendDescribeResponse )
+
+		DECLARE_SMELEMENT_HEADER ( TSendSubscribeResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+			TBool IsFirstSubscription ( );		
+		DECLARE_SMELEMENT_FOOTER ( TSendSubscribeResponse )
+		
+		DECLARE_SMELEMENT_HEADER ( TSendUnsubscribeResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+			void DoL ( );
+			TBool IsLastSubscription ( );		
+		DECLARE_SMELEMENT_FOOTER ( TSendUnsubscribeResponse )				
+		};
+		
+		
+	class CNotifyFlowFinder: public CNodeParallelActivityBase
+		{
+	public:
+		static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		~CNotifyFlowFinder ( );
+		
+	private:
+		CNotifyFlowFinder ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount );
+		
+	private:
+		CUPnPSubscribeInfoElement*	iSubscribeInfo; // don't delete, not owned
+	
+		// Context
+		typedef TNodeContext<CUPnPServiceSubConnectionProvider, CoreStates::TContext> TContext;
+	
+	public:
+		// States
+		typedef TAwaitingMessageState<TUpnpMessage::TCreateNotifyFlow> TAwaitingFlowCreationRequest;
+	
+		// Transitions
+		DECLARE_SMELEMENT_HEADER ( TFindOrCreateFlow, TStateTransition<TContext>, NetStateMachine::MStateTransition, CNotifyFlowFinder::TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TFindOrCreateFlow )
+	
+		DECLARE_SMELEMENT_HEADER ( TProcessDataClient, TStateTransition<TContext>, NetStateMachine::MStateTransition, CNotifyFlowFinder::TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TProcessDataClient )
+		};
+		
+		
+	class CUpnpEventNotificationActivity: public CNodeParallelActivityBase
+		{
+	public:
+		static CNodeActivityBase* NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode );
+		~CUpnpEventNotificationActivity ( ) 
+		{ }
+		
+	private:
+		CUpnpEventNotificationActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount );
+		
+	private:		
+		// Context
+		typedef TNodeContext<CUPnPServiceSubConnectionProvider, CoreStates::TContext> TContext;
+		
+	public: 
+		// States
+		typedef TAwaitingMessageState<TUpnpMessage::TNotifyRequest> TAwaitingNotifyRequest;
+		typedef TAwaiting2MessagesState<TEBase::TError, TUpnpMessage::TResponse> TAwaitingErrorOrResponse;
+			
+		// Transitions		
+		DECLARE_SMELEMENT_HEADER ( TSendRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, CUpnpEventNotificationActivity::TContext )
+			void DoL ( );
+		DECLARE_SMELEMENT_FOOTER ( TSendRequest )			
+		};	
+	}
+
+#endif // UPNPSERVICESCPRACTIVITIES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicescprfactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __UPNPSERVICESCPRFACTORY_H
+#define __UPNPSERVICESCPRFACTORY_H
+
+#include <comms-infras/ss_subconnprov.h>
+
+class CUPnPServiceSubConnectionProviderFactory : public ESock::CSubConnectionProviderFactoryBase
+	{		
+public:
+	// ECOM interface implementation ID
+	static const TUint iUid = 0x2000D059;
+
+public:
+	static CUPnPServiceSubConnectionProviderFactory* NewL(TAny* aParentContainer);
+
+protected:
+	CUPnPServiceSubConnectionProviderFactory(
+		TUid aFactoryId, 
+		ESock::CSubConnectionFactoryContainer& aParentContainer);
+
+protected:
+    // CSubConnectionProviderFactoryBase overrides
+    virtual ESock::ACommsFactoryNodeId* DoCreateObjectL(ESock::TFactoryQueryBase& aQuery);
+	};
+
+#endif // UPNPSERVICESCPRFACTORY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpservicescprstates.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,122 @@
+// 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 __UPNPSERVICESCPRSTATES_H
+#define __UPNPSERVICESCPRSTATES_H
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/corescprstates.h>
+
+//Local Includes
+#include "upnpservicescpr.h"
+
+using namespace MeshMachine;
+
+namespace UPnPServiceSCprStates
+{
+typedef MeshMachine::TNodeContext<CUPnPServiceSubConnectionProvider, SCprStates::TContext> TContext;
+
+
+//-------------------------------------------------States-----------------------------------------------------
+DECLARE_SMELEMENT_HEADER ( TAwaitingServiceValidated, TState<TContext>, NetStateMachine::MState, TContext )
+	TBool Accept ( );
+DECLARE_SMELEMENT_FOOTER ( TAwaitingServiceRegistration )		
+
+
+DECLARE_SMELEMENT_HEADER ( TAwaitingServiceRegisteredFromCpr, TState<TContext>, NetStateMachine::MState, TContext )
+	TBool Accept ( );
+DECLARE_SMELEMENT_FOOTER ( TAwaitingServiceRegisteredFromCpr )
+		
+//---------------------------------------------Transitions-----------------------------------------------------
+DECLARE_SMELEMENT_HEADER ( TStoreRequestParams, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreRequestParams )
+
+DECLARE_SMELEMENT_HEADER ( TSendRequestParamResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TSendRequestParamResponse )
+
+DECLARE_AGGREGATED_TRANSITION2 (
+	TStoreParamsAndSendResponse,
+   	TStoreRequestParams,
+   	TSendRequestParamResponse
+   	)
+
+DECLARE_SMELEMENT_HEADER ( TInitiateActivities, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TInitiateActivities )
+
+
+DECLARE_SMELEMENT_HEADER ( TLeaveRequest, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TLeaveRequest )
+
+DECLARE_AGGREGATED_TRANSITION3 (
+	TProcessClientLeave,
+   	MeshMachine::TRemoveClient,
+   	CoreNetStates::TSendLeaveCompleteIfRequest,
+   	TLeaveRequest
+   	)
+   	
+DECLARE_SMELEMENT_HEADER ( TSendPublishResponseToClient, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TSendPublishResponseToClient )
+
+
+DECLARE_SMELEMENT_HEADER ( TSendDataClientStart, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TSendDataClientStart )			
+
+
+DECLARE_SMELEMENT_HEADER ( TProcessDataClientStop, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+	void SendByeRequestL ( const TDesC8& aSearchTarget, const TDesC8& aUsn );
+DECLARE_SMELEMENT_FOOTER ( TProcessDataClientStop )			
+
+
+DECLARE_SMELEMENT_HEADER ( TAwaitingDataClientsStopped, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );	
+DECLARE_SMELEMENT_FOOTER ( TAwaitingDataClientsStopped )			
+
+
+DECLARE_SMELEMENT_HEADER ( TSendDataClientIdleOrUnregister, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	void DoL ( );
+DECLARE_SMELEMENT_FOOTER ( TSendDataClientIdleOrUnregister )			
+
+
+DECLARE_SMELEMENT_HEADER ( TValidateAndSendResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
+	virtual void DoL ( );
+	void SendSearchResponseL ( const TDesC8& aSearchTarget, const TDesC8& aUsn, TInt aMaxAge );
+DECLARE_SMELEMENT_FOOTER ( TValidateAndSendResponse )
+ 	    
+
+//------------------------------------------State Forks---------------------------------------------
+DECLARE_SMELEMENT_HEADER ( TStoreUdpClientAndSendRequest, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	virtual TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreUdpClientAndSendRequest )
+
+
+DECLARE_SMELEMENT_HEADER ( TStoreUdpServer, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TStoreUdpServer )
+   	
+// Note! will return KIgnore Tag if node is closing
+DECLARE_SMELEMENT_HEADER ( TNoTagOrIgnoreTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext )
+	TInt TransitionTag ( );
+DECLARE_SMELEMENT_FOOTER ( TNoTagOrIgnoreTag )
+}
+
+#endif // UPNPSERVICESCPRSTATES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpsppublishinfo.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,57 @@
+// 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 __UPNPSPPUBLISHINFO_H_
+#define __UPNPSPPUBLISHINFO_H_
+
+
+class CUPnPPublishInfoElement : public CBase
+	{
+	private:
+	RBuf8 		iSearchTarget;
+	RBuf8		iUsn;
+	TInt		iCacheControl;
+	RBuf8		iServiceDescription;
+	RBuf8		iUuid;
+	RBuf8		iKey;
+	TInt		iTimeOut;
+
+	public:
+	// Internal APIs
+	inline static CUPnPPublishInfoElement* NewL( );
+	// D'tor
+	inline ~CUPnPPublishInfoElement ();
+	
+	// Get and set methods
+	inline void SetSearchTargetL( const TDesC8& aSearchTarget );
+	inline void SetUsnL( const TDesC8& aUsn );
+	inline void SetCacheControlL( TInt aCacheControl );
+	inline void SetServiceDescriptionL( const TDesC8& aServiceDescription );
+	inline void SetUuidL( const TDesC8& aUuid );
+	inline void SetKeyL( const TDesC8& aKey );
+	inline void SetTimeOut( TInt aTimeOut );
+
+	inline const TDesC8& SearchTarget( ) const ;
+	inline const TDesC8& Usn( ) const ;
+	inline TInt CacheControl( ) const ;
+	inline const TDesC8& ServiceDescription( ) const ;
+	inline const TDesC8& Uuid( ) const ;
+	inline const TDesC8& Key( ) const ;
+	inline TInt TimeOut( ) const;
+	
+	};
+
+#include "upnpsppublishinfo.inl"
+#endif /*UPNPSPPUBLISHINFO_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpsppublishinfo.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+// 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:
+// upnppublishinfo.inl
+// 
+//
+
+
+CUPnPPublishInfoElement* CUPnPPublishInfoElement::NewL( )
+	{
+	return  new (ELeave) CUPnPPublishInfoElement();
+	}
+
+CUPnPPublishInfoElement::~CUPnPPublishInfoElement ()
+	{
+	iSearchTarget.Close();
+	iUsn.Close();
+	iServiceDescription.Close();
+	iUuid.Close();
+	iKey.Close();
+	}
+
+
+void CUPnPPublishInfoElement::SetSearchTargetL( const TDesC8& aSearchTarget )
+	{
+	iSearchTarget.Close ();
+	iSearchTarget.CreateL ( aSearchTarget );
+	}
+
+void CUPnPPublishInfoElement::SetUsnL( const TDesC8& aUsn )
+	{
+	iUsn.Close ();
+	iUsn.CreateL ( aUsn );
+	}
+
+void CUPnPPublishInfoElement::SetCacheControlL( TInt aCacheControl )
+	{
+	iCacheControl = aCacheControl;
+	}
+
+void CUPnPPublishInfoElement::SetServiceDescriptionL( const TDesC8& aServiceDescription )
+	{
+	iServiceDescription.Close ();
+	iServiceDescription.CreateL ( aServiceDescription );
+	}
+
+void CUPnPPublishInfoElement::SetUuidL( const TDesC8& aUuid )
+	{
+	iUuid.Close ();
+	iUuid.CreateL ( aUuid );
+	}
+
+void CUPnPPublishInfoElement::SetKeyL( const TDesC8& aKey )
+	{
+	iKey.Close ();
+	iKey.CreateL ( aKey );
+	}
+
+
+const TDesC8& CUPnPPublishInfoElement::SearchTarget( ) const 
+	{
+	return iSearchTarget;
+	}
+
+const TDesC8& CUPnPPublishInfoElement::Usn( ) const 
+	{
+	return iUsn;
+	}
+
+TInt CUPnPPublishInfoElement::CacheControl( ) const 
+	{
+	return iCacheControl;
+	}
+
+const TDesC8& CUPnPPublishInfoElement::ServiceDescription( ) const 
+	{
+	return iServiceDescription;
+	}
+
+const TDesC8& CUPnPPublishInfoElement::Uuid( ) const 
+	{
+	return iUuid;
+	}
+
+const TDesC8& CUPnPPublishInfoElement::Key( ) const 
+	{
+	return iKey;
+	}
+
+void CUPnPPublishInfoElement::SetTimeOut( TInt aTimeOut )
+	{
+	iTimeOut = aTimeOut;
+	}
+
+TInt CUPnPPublishInfoElement::TimeOut( ) const
+	{
+	return iTimeOut;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpsppublishinfocontainer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,58 @@
+// 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 __UPNPSPPUBLISHINFOCONTAINER_H_
+#define __UPNPSPPUBLISHINFOCONTAINER_H_
+
+#include "cpnpdeviceparam.h"
+#include "cstringpoolmanager.h"
+
+
+class CUPnPRootDeviceInfoContainer : public CBase
+	{
+public:		
+	static CUPnPRootDeviceInfoContainer* NewL ( );
+	~CUPnPRootDeviceInfoContainer ( );
+	
+	void AppendServiceInfoL ( const TDesC8& aParentUuid, CUPnPServiceInfo* aServiceInfo );
+	void AppendEmbeddedDeviceL ( const TDesC8& aParentUuid, CUPnPDevice* aDevice );
+	
+	void DeleteServiceInfoL ( const TDesC8& aScpdUrl );
+	void DeleteDeviceInfoL ( const TDesC8& aUuid );
+	
+	CUPnPDeviceDescription& GetRootDeviceDesciption ( ) const;
+	const TDesC8& GetRootdeviceUid() const;
+	CStringPoolManager& StringPoolManager ( ) const;
+	CUPnPDevice* GetDeviceByUuid ( const TDesC8& aDeviceUuid );
+	
+	TInt PerformValidation ( const TDesC8& aDeviceUid, const TDesC8& aServiceType );
+	
+private:
+	CUPnPRootDeviceInfoContainer ( );
+    void ConstructL ( );
+    TBool AppendServiceL ( const TDesC8& aParentUuid, const CUPnPServiceInfo* aServiceInfo, CUPnPDevice* aDevice );
+	TBool DeleteServiceL ( const TDesC8& aScpdUrl, CUPnPDevice* aDevice );
+	TBool DeleteDeviceL ( const TDesC8& aUuid, CUPnPDevice* aDevice );
+	const CUPnPDevice* SearchDevice ( const CUPnPDevice* aDevice, const TDesC8& aDeviceUuid );
+
+private:
+	CUPnPDeviceDescription*		iRootDeviceDescription;
+    CStringPoolManager* 		iStringPoolMgr;
+    };
+
+
+	
+#endif /*UPNPSPPUBLISHINFOCONTAINER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpspsubscribeinfo.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,58 @@
+// 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 __UPNPSPSUBSCRIBEINFO_H_
+#define __UPNPSPSUBSCRIBEINFO_H_
+
+#include <appprotintf/app_protintf_msgs.h>
+
+using namespace Messages;
+
+class CUPnPSubscribeInfoElement : public CBase
+	{
+	private:
+	RBuf8 			iSubscriptionIdentifier;
+	RBuf8			iCallBackUrl;
+	TAppProtAddr	iRemoteAddr;
+	TInt			iEventKey;
+	TInt			iSubscriptionDuration;
+	TNodeId	iFlowId;
+
+	public:
+
+	// Internal APIs
+	inline static CUPnPSubscribeInfoElement* NewL ( );
+	// D'tor
+	inline ~CUPnPSubscribeInfoElement ( );
+	
+	// Get and set methods
+	inline void SetSubscriptionIdentifierL ( const TDesC8& aSubscriptionIdentifier );
+	inline void SetCallBackUrlL ( const TDesC8& aCallBackUrl );
+	inline void SetRemoteAddr ( TAppProtAddr aRemoteAddr );
+	inline void SetEventKey ( TInt aEventKey );
+	inline void SetSubscriptionDuration ( TInt aSubscriptionDuration );
+	inline void SetFlowId ( TNodeId aFlowId );
+	
+	inline const TDesC8& SubscriptionIdentifier ( ) const;	
+	inline const TDesC8& CallBackUrl ( );	
+	inline TAppProtAddr RemoteAddr ( ) const;
+	inline TInt EventKey ( ) const;
+	inline TInt SubscriptionDuration ( ) const;
+	inline TNodeId FlowId ( );	
+	};
+
+#include "upnpspsubscribeinfo.inl"
+
+#endif /*UPNPSPSUBSCRIBEINFO_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpspsubscribeinfo.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,94 @@
+// 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 __UPNPSPSUBSCRIBEINFO_INL_
+#define __UPNPSPSUBSCRIBEINFO_INL_
+
+
+CUPnPSubscribeInfoElement* CUPnPSubscribeInfoElement::NewL ( )
+	{
+	return new ( ELeave ) CUPnPSubscribeInfoElement ( );
+	}
+
+CUPnPSubscribeInfoElement::~CUPnPSubscribeInfoElement ( )
+	{
+	iSubscriptionIdentifier.Close ( );
+	iCallBackUrl.Close ( );		
+	}
+
+void CUPnPSubscribeInfoElement::SetSubscriptionIdentifierL ( const TDesC8& aSubscriptionIdentifier )
+	{
+	iSubscriptionIdentifier.Close ( );
+	iSubscriptionIdentifier.CreateL ( aSubscriptionIdentifier );
+	}
+	
+void CUPnPSubscribeInfoElement::SetCallBackUrlL ( const TDesC8& aCallBackUrl )
+	{
+	iCallBackUrl.Close ( );
+	iCallBackUrl.CreateL ( aCallBackUrl );
+	}
+	
+const TDesC8& CUPnPSubscribeInfoElement::CallBackUrl ( )
+	{
+	return iCallBackUrl;
+	}
+	
+void CUPnPSubscribeInfoElement::SetRemoteAddr ( TAppProtAddr aRemoteAddr )
+	{
+	iRemoteAddr = aRemoteAddr;
+	}
+	
+void CUPnPSubscribeInfoElement::SetEventKey ( TInt aEventKey )
+	{
+	iEventKey = aEventKey;
+	}
+	
+void CUPnPSubscribeInfoElement::SetSubscriptionDuration ( TInt aSubscriptionDuration )
+	{
+	iSubscriptionDuration = aSubscriptionDuration;
+	}
+
+void CUPnPSubscribeInfoElement::SetFlowId ( TNodeId aFlowId )
+	{
+	iFlowId = aFlowId;
+	}
+
+const TDesC8& CUPnPSubscribeInfoElement::SubscriptionIdentifier ( ) const 
+	{
+	return iSubscriptionIdentifier;
+	}
+	
+TAppProtAddr CUPnPSubscribeInfoElement::RemoteAddr ( ) const 
+	{
+	return iRemoteAddr;
+	}
+	
+TInt CUPnPSubscribeInfoElement::EventKey ( ) const 
+	{
+	return iEventKey;
+	}
+	
+TInt CUPnPSubscribeInfoElement::SubscriptionDuration ( ) const 
+	{
+	return iSubscriptionDuration;
+	}
+	
+TNodeId CUPnPSubscribeInfoElement::FlowId ( )
+	{
+	return iFlowId;
+	}
+
+
+#endif /*UPNPSPSUBSCRIBEINFO_INL_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpspsubscribeinfocontainer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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 __UPNPSPSUBSCRIBEINFOCONTAINER_H_
+#define __UPNPSPSUBSCRIBEINFOCONTAINER_H_
+
+#include "upnpspsubscribeinfo.h"
+
+class CUPnPSubscribeInfoContainer : public CBase
+	{
+	private:
+	mutable RBuf8 iEventData;
+	mutable RPointerArray<CUPnPSubscribeInfoElement>	iSubscribeInfoElementArr;
+	
+	public:
+	// Internal APIs
+	inline static CUPnPSubscribeInfoContainer* NewL ( );
+	// D'tor
+	inline ~CUPnPSubscribeInfoContainer ( );
+	inline void SetEventDataL ( const TDesC8& aEventData ) const;
+	inline const TDesC8& EventData ( ) const ;
+	inline void AppendSubscribeInfoElementL ( CUPnPSubscribeInfoElement* aElement ) const;	
+	inline void DeleteSubscribeInfoElement ( CUPnPSubscribeInfoElement* aElement );
+	inline CUPnPSubscribeInfoElement* GetSubscribeInfoBySid ( const TDesC8& aSid ) const;
+	inline TInt CountOfSubscribeInfoElementArray ( ) const;
+	inline CUPnPSubscribeInfoElement* AtSubscribeInfoElementArray ( TInt aIndex ) const;	
+	};
+	
+#include "upnpspsubscribeinfocontainer.inl"	
+
+#endif /*UPNPSPSUBSCRIBEINFOCONTAINER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpspsubscribeinfocontainer.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,83 @@
+// 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 __UPNPSPSUBSCRIBEINFOCONTAINER_INL_
+#define __UPNPSPSUBSCRIBEINFOCONTAINER_INL_
+
+#include "upnpspsubscribeinfocontainer.h"	
+
+CUPnPSubscribeInfoContainer* CUPnPSubscribeInfoContainer::NewL ( )
+	{
+	return  new ( ELeave ) CUPnPSubscribeInfoContainer ( );
+	}
+
+CUPnPSubscribeInfoContainer::~CUPnPSubscribeInfoContainer ( )
+	{	
+	iEventData.Close ( );
+	iSubscribeInfoElementArr.ResetAndDestroy ( );
+	}
+
+void CUPnPSubscribeInfoContainer::AppendSubscribeInfoElementL ( CUPnPSubscribeInfoElement* aElement ) const
+	{
+	iSubscribeInfoElementArr.AppendL ( aElement );
+	}
+
+void CUPnPSubscribeInfoContainer::SetEventDataL ( const TDesC8& aEventData) const
+	{
+	iEventData.Close ( );
+	iEventData.CreateL ( aEventData );
+	}
+
+const TDesC8&CUPnPSubscribeInfoContainer::EventData ( ) const 
+	{
+	return iEventData;
+	}
+
+inline void CUPnPSubscribeInfoContainer::DeleteSubscribeInfoElement ( CUPnPSubscribeInfoElement* aElement )
+	{
+	TInt index = iSubscribeInfoElementArr.Find(aElement);
+	__ASSERT_DEBUG(index!=KErrNotFound,User::Invariant());
+	delete aElement;
+	aElement = NULL;
+	iSubscribeInfoElementArr.Remove(index);
+	}
+
+TInt CUPnPSubscribeInfoContainer::CountOfSubscribeInfoElementArray ( ) const
+	{
+	return iSubscribeInfoElementArr.Count ( );
+	}
+
+CUPnPSubscribeInfoElement* CUPnPSubscribeInfoContainer::AtSubscribeInfoElementArray ( TInt aIndex ) const
+	{	
+	__ASSERT_DEBUG ( aIndex >= 0 && aIndex < iSubscribeInfoElementArr.Count ( ), User::Invariant ( ) );
+
+	return iSubscribeInfoElementArr[aIndex];
+	}
+
+CUPnPSubscribeInfoElement* CUPnPSubscribeInfoContainer::GetSubscribeInfoBySid ( const TDesC8& aSid ) const
+	{
+	TUint count = iSubscribeInfoElementArr.Count ( );
+	for ( TInt i = 0; i < count; i++  )
+		{
+		CUPnPSubscribeInfoElement* element = iSubscribeInfoElementArr[i];
+		if ( aSid.CompareF( element->SubscriptionIdentifier ( ) ) == 0 )
+			{
+			return element;
+			}
+		}		
+	return NULL;
+	}
+
+#endif /*UPNPSPSUBSCRIBEINFOCONTAINER_INL_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/inc/upnpuuid.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,79 @@
+// 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:
+// Simple UUID generation and formatting support
+// 
+//
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef __UPNPUUID_H__
+#define __UPNPUUID_H__
+
+const TInt KNodeMacOctets = 6;
+const TInt KUuidStringLen = 36;
+
+typedef TBuf<KUuidStringLen> TUuidString;
+typedef TBuf8<KUuidStringLen> TUuidString8;
+
+// Example UUID string: f81d4fae-7dec-11d0-a765-00a0c91e6bf6
+_LIT(KUuidFormatString,   "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x");
+_LIT8(KUuidFormatString8, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x");
+
+/**
+ * Generally known UUID versions.
+ * NOTE. This implementation supports
+ * only version 4 (ERandomBased)
+ */
+enum TUuidVersion
+    {
+    ETimeBased      = (1 << 0), //< v1, time-based version
+    EDceSecurity    = (1 << 1), //< v2, DCE Security version
+    ENameBasedMd5   = (1 << 2), //< v3, name-based version with MD5 hashing
+    ERandomBased    = (1 << 3), //< v4, randomly or pseudo-randomly generated version
+    ENameBasedSha1  = (1 << 4)  //< v5, name-based version with SHA-1 hashing
+    };
+
+class TUpnpUuid
+/**
+ * A value type class that represents a UUID
+ */
+    {
+public:    
+    TUint32 iTimeLow;               /* bits  0-31 of time field */
+    TUint16 iTimeMid;               /* bits 32-47 of time field */
+    TUint16 iTimeHiAndVersion;      /* bits 48-59 of time field plus 4 bit version */
+    TUint8  iClockSeqHiAndReserved; /* bits  8-13 of clock sequence field plus 2 bit variant */
+    TUint8  iClockSeqLow;           /* bits  0-7  of clock sequence field */
+    TUint8  iNode[KNodeMacOctets];  /* bits  0-47 of node MAC address */
+    };
+
+class UpnpUuid
+/**
+ * A class for creating UUIDs and formatting them as strings
+ */
+    {
+public:    
+    static TInt MakeUuid(TUpnpUuid& aUuid, TUuidVersion aVersion = ERandomBased);
+    static void UuidToString(const TUpnpUuid& aUuid, TUuidString8& aUuidString);
+    static void GenerateUuidL(RBuf8& aUuid);
+    
+private:
+    static void RandomizeL(TUpnpUuid& aUuid);
+    static void Brand(TUpnpUuid& aUuid, TUuidVersion aVersion);
+    };
+
+#endif // __UPNPUUID_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicecpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,140 @@
+// 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:
+// UPnPCtrlCpr.cpp
+// @file
+// @internalComponent
+// 
+//
+
+#include <comms-infras/ss_msgintercept.h>
+
+#include "upnpservicecpractivities.h"
+#include "upnpmcpr.h"
+#include "upnp_cf_msgs.h"
+#include "upnpserverconstants.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPCprTag KESockConnectionTag
+#endif
+
+using namespace ESock;
+using namespace MeshMachine;
+
+CUPnPServiceConnectionProvider* CUPnPServiceConnectionProvider::NewL ( CConnectionProviderFactoryBase& aFactory )
+	{
+    CUPnPServiceConnectionProvider* provider = new ( ELeave ) CUPnPServiceConnectionProvider ( aFactory, UPnPServiceCprActivities::activityMap::Self() );
+    CleanupStack::PushL ( provider );
+    provider->ConstructL ( );
+    CleanupStack::Pop ( provider );
+	return provider;
+	}
+
+CUPnPServiceConnectionProvider::~CUPnPServiceConnectionProvider ( )
+	{
+	LOG_NODE_DESTROY ( KUPnPCprTag, CUPnPServiceConnectionProvider );	
+	delete iRootDeviceInfoContainer;
+	if ( iRepublishTimer )
+		iRepublishTimer->Cancel( );
+	delete iRepublishTimer;
+	}
+
+CUPnPServiceConnectionProvider::CUPnPServiceConnectionProvider ( CConnectionProviderFactoryBase& aFactory, const TNodeActivityMap& aActivityMap )
+	: CUPnPConnectionProvider ( aFactory, aActivityMap ),
+	iRootDeviceRegistered ( EFalse )
+	{
+	LOG_NODE_CREATE ( KUPnPCprTag, CUPnPServiceConnectionProvider );
+	}
+
+void CUPnPServiceConnectionProvider::ConstructL ( )
+	{		
+	iRootDeviceInfoContainer = CUPnPRootDeviceInfoContainer::NewL ( );
+	CCoreConnectionProvider::ConstructL ( );
+	
+	// create the timer object
+	iRepublishTimer = CPeriodic::NewL ( CActive::EPriorityLow );	
+	}
+
+
+#ifdef SYMBIAN_NETWORKING_UPS
+TInt CUPnPServiceConnectionProvider::GetProcessAndThreadId ( TProcessId& aProcessId, TThreadId& aThreadId ) const
+	{
+	return iPlatsecApiExt->GetProcessAndThreadId ( aProcessId, aThreadId );	
+	}
+#endif  	
+
+CUPnPRootDeviceInfoContainer& CUPnPServiceConnectionProvider::GetRootDeviceInfoContainer ( )
+	{
+	return *iRootDeviceInfoContainer;
+	}
+	
+CStringPoolManager& CUPnPServiceConnectionProvider::StringPoolManager ( )
+	{
+	return iRootDeviceInfoContainer->StringPoolManager( );
+	}	
+
+
+void CUPnPServiceConnectionProvider::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	TNodeContext<CUPnPServiceConnectionProvider> ctx(*this, aMessage, aSender, aRecipient);
+	ESOCK_DEBUG_MESSAGE_INTERCEPT ( aSender, aMessage, aRecipient );	
+	if ( aMessage.IsMessage<TCFServiceProvider::TStart> ( ) || aMessage.IsMessage<TCFServiceProvider::TStop> ( ) )
+		{
+  		iPlatsecApiExt = reinterpret_cast<MPlatsecApiExt*> ( address_cast<TNodeId> ( aSender ).Node ( ).FetchNodeInterfaceL ( MPlatsecApiExt::KInterfaceId ) );
+  		}
+    
+   	CCoreConnectionProvider::ReceivedL ( aSender, aRecipient, aMessage );
+	User::LeaveIfError ( ctx.iReturn );
+	}
+
+void CUPnPServiceConnectionProvider::ProcessRootDeviceRegisteredL ( )
+	{
+	__ASSERT_DEBUG ( iRootDeviceRegistered == EFalse, User::Invariant ( ) );
+  	SetRootDeviceRegistered ( ETrue );
+
+	TCallBack updateCallback ( &CUPnPServiceConnectionProvider::RootDeviceRepublishTimerCallbackL, this );
+	iRepublishTimer->Start( TTimeIntervalMicroSeconds32 ( KRootDeviceRepublishFrequency ), TTimeIntervalMicroSeconds32 ( KRootDeviceRepublishFrequency ), updateCallback );
+	}
+
+TInt CUPnPServiceConnectionProvider::RootDeviceRepublishTimerCallbackL ( TAny* aPtr )
+	{
+	CUPnPServiceConnectionProvider* self = static_cast<CUPnPServiceConnectionProvider*> ( aPtr );
+	
+	TClientIter<TDefaultClientMatchPolicy> dciter = self->GetClientIter<TDefaultClientMatchPolicy> ( TCFClientType::EData );
+ 	
+    TInt i = 0;
+    // skip the first data client i.e default SCPR (root device)
+    RNodeInterface* dc = dciter[i++];
+	TBool canStop = ETrue;
+	while ( ( dc = dciter[i++] ) != NULL )
+    	{
+       	if ( dc->Flags( ) != TClientType::ELeaving )
+       		{
+			canStop = EFalse;
+			break;
+       		}
+       	}
+       
+    if ( canStop || !self->IsRootDeviceRegistered( ) )
+    	{
+    	self->iRepublishTimer->Cancel( );
+    	self->SetRootDeviceRegistered ( EFalse );
+    	}
+    else
+    	{
+    	RNodeInterface* dc = self->GetFirstClient<TDefaultClientMatchPolicy> ( TCFClientType::EData );				
+		RClientInterface::OpenPostMessageClose ( self->NodeId (), dc->RecipientId (), TUpnpMessage::TDeviceRepublish ().CRef () );
+		}
+    
+    return KErrNone;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicecpractivities.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,271 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <comms-infras/ss_corepractivities.h>
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_log.h>
+#include <comms-infras/ss_logext.h>
+
+#include "upnpservicecprstates.h"
+#include "upnpstatemachine.h"
+#include "upnpservicecpractivities.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+__FLOG_STMT(_LIT8(KComponent,"UPnPSPScpr");)
+
+using namespace ESock;
+using namespace PRActivities;
+using namespace MeshMachine;
+using namespace UPnPServiceCprStates;
+using namespace UPnPStateMachine;
+using namespace UPnPServiceCprActivities;
+using namespace Messages;
+
+namespace UpnPServiceCprServiceJoinRequestActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( TUpnpMessage::EActivityServiceJoinRequest, UpnpServiceJoinRequest, TNodeSignal::TNullMessageId  ) //Waiting for both Service / Embedded Device Join messages
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingServiceOrDeviceJoin, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TPerformServiceOrDeviceValidationAndSendResponse )
+NODEACTIVITY_END ( )
+}
+
+namespace UPnPServiceCprNewServiceRegisterActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityNewServiceRegister, UpnpNewServiceRegister, TNodeSignal::TNullMessageId , CUpnpNewServiceRegisterActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingServiceOrDeviceRegister, TServiceOrDeviceTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KServiceTag, TAppendServiceInfo, TRootRegisteredOrNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KDeviceTag, TAppendDeviceInfo, TRootRegisteredOrNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, CUpnpNewServiceRegisterActivity::TRegisterRootDevice, CUpnpNewServiceRegisterActivity::TAwiatingRootDeviceRegistered, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CUpnpNewServiceRegisterActivity::TReplyToPendingServices )
+	
+	LAST_NODEACTIVITY_ENTRY ( KRootRegisteredTag, CUpnpNewServiceRegisterActivity::TReplyToCurrentService )
+NODEACTIVITY_END ( )
+}
+	
+namespace UPnPServiceCprUnregisterServiceActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityDataClientIdle, UPnPServiceCprUnregisterService, TNodeSignal::TNullMessageId )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingServiceOrDeviceUnregister, TServiceOrDeviceTag )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KServiceTag, TDeleteServiceInfo, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KDeviceTag, TDeleteDeviceInfo, TNoTag )
+	
+    LAST_NODEACTIVITY_ENTRY ( KNoTag, CprStates::THandleDataClientIdle )
+NODEACTIVITY_END ( )
+}
+
+namespace UpnpServiceCprSubscriptionTimerActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivitySubscriptionTimer, UpnpServiceCprSubscriptionTimer, TUpnpMessage::TStartTimer, CUpnpSubscriptionTimerActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUpnpSubscriptionTimerActivity::TAwaitingStartTimer, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CUpnpSubscriptionTimerActivity::TStartTimer, TTag< CoreStates::KLoopTag | NetStateMachine::EForward > )
+	
+	NODEACTIVITY_ENTRY ( CoreStates::KLoopTag, TDoNothing, CUpnpSubscriptionTimerActivity::TAwaitingStartOrStopTimer, CUpnpSubscriptionTimerActivity::TStartOrStopTag )	
+	THROUGH_NODEACTIVITY_ENTRY ( UPnPStateMachine::KStart, TDoNothing, TTag< CoreStates::KLoopTag | NetStateMachine::EBackward > )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( UPnPStateMachine::KStop, CUpnpSubscriptionTimerActivity::TDequeueClient, CUpnpSubscriptionTimerActivity::TLoopOrCancelTag )	
+	LAST_NODEACTIVITY_ENTRY ( KCancelTag, TDoNothing )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPServiceCprStartActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivityStart, UPnPServiceCprStart, TCFServiceProvider::TStart, PRActivities::CStartActivity::NewL)
+    FIRST_NODEACTIVITY_ENTRY(CoreNetStates::TAwaitingStart, CoreNetStates::TNoTagOrBearerPresentBlockedByStop)
+	NODEACTIVITY_ENTRY(CoreNetStates::KBearerPresent, CoreNetStates::TBindSelfToPresentBearer, CoreNetStates::TAwaitingBindToComplete, TTag<CoreNetStates::KBearerPresent>)
+	NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendNoBearer, MeshMachine::TAwaitingMessageState<TCFControlProvider::TBearer>, TTag<CoreNetStates::KBearerPresent>)
+
+	//Start the service provider, use the default cancellation.
+	//Forward TCancel to the service provider, wait for TStarted or TError (via the Error Activity)
+	//When TStarted arrives after TCancel the activity will move to the nearest KErrorTag
+	NODEACTIVITY_ENTRY(CoreNetStates::KBearerPresent, CoreNetStates::TStartServiceProviderRetry, CoreNetStates::TAwaitingStarted, TNoTagOrErrorTag)
+	LAST_NODEACTIVITY_ENTRY(KErrorTag, MeshMachine::TDoNothing)
+	//Start data clients, use the default cancellation.
+	//Forward TCancel to the self, wait for TDataClientStarted or TError (via the Error Activity)
+	//When TDataClientStarted arrives after TCancel the activity will move to the nearest KErrorTag
+	NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TStartSelf, CoreNetStates::TAwaitingDataClientStarted, TNoTagOrErrorTag)	
+	NODEACTIVITY_ENTRY(KNoTag, UPnPStateMachine::TRequestLocalHost, UPnPStateMachine::TAwaitingLocalHostFromMCpr, TNoTagOrErrorTag)
+	
+	NODEACTIVITY_ENTRY(KErrorTag, CoreNetStates::TStopSelf, CoreNetStates::TAwaitingDataClientStopped, TErrorTag)
+	LAST_NODEACTIVITY_ENTRY(KErrorTag, MeshMachine::TDoNothing)
+	
+	LAST_NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendStarted)
+NODEACTIVITY_END()
+}
+
+
+	
+namespace UPnPServiceCprActivities
+{
+DEFINE_ACTIVITY_MAP ( activityMap )
+	ACTIVITY_MAP_ENTRY ( UpnPServiceCprServiceJoinRequestActivity, UpnpServiceJoinRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceCprNewServiceRegisterActivity, UpnpNewServiceRegister )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceCprUnregisterServiceActivity, UPnPServiceCprUnregisterService )
+	ACTIVITY_MAP_ENTRY ( UpnpServiceCprSubscriptionTimerActivity, UpnpServiceCprSubscriptionTimer )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceCprStartActivity, UPnPServiceCprStart )
+ACTIVITY_MAP_END_BASE ( CprActivities, coreCprActivities )
+}
+
+
+CNodeActivityBase* CUpnpNewServiceRegisterActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	return new ( ELeave ) CUpnpNewServiceRegisterActivity ( aActivitySig, aNode ) ;
+	}
+
+CUpnpNewServiceRegisterActivity::~CUpnpNewServiceRegisterActivity ( )
+	{
+	SetError ( KErrNone );
+	}
+
+DEFINE_SMELEMENT ( CUpnpNewServiceRegisterActivity::TRegisterRootDevice, NetStateMachine::MStateTransition, CUpnpNewServiceRegisterActivity::TContext )
+void CUpnpNewServiceRegisterActivity::TRegisterRootDevice::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPNewSrvcRegActivity, KComponent, _L8("CUpnpNewServiceRegisterActivity::TRegisterRootDevice::DoL")));
+	CUpnpNewServiceRegisterActivity& activity = static_cast< CUpnpNewServiceRegisterActivity& > ( *iContext.iNodeActivity );
+	
+	if ( activity.iOriginators.Count ( ) == KFirstRegistration )
+		{
+		// send data client to default SCPR to publish root device and start listening for root device.
+		RNodeInterface* dc = iContext.Node ( ).GetFirstClient<TDefaultClientMatchPolicy> ( TClientType ( TCFClientType::EData, TCFClientType::EDefault ) );	
+				
+		const CUPnPRootDeviceInfoContainer& container = iContext.Node ( ).GetRootDeviceInfoContainer ( );
+		const CUPnPDeviceDescription& deviceDesc = container.GetRootDeviceDesciption ( );
+		//root device info
+		CUPnPDevice* deviceObj = deviceDesc.DeviceObject ( );
+		__ASSERT_DEBUG ( deviceObj != NULL, User::Invariant ( ) );
+		
+		LOG(ESockLogExternal::Printf(KSubsysSPNewSrvcRegActivity, KComponent, _L8("CUpnpNewServiceRegisterActivity::TRegisterRootDevice::DoL - Posting message TUpnpMessage::TRegisterRootDevice")));
+		activity.PostRequestTo ( *dc, TUpnpMessage::TRegisterRootDevice ( deviceObj ).CRef () );
+		}
+	}
+	
+DEFINE_SMELEMENT ( CUpnpNewServiceRegisterActivity::TReplyToPendingServices, NetStateMachine::MStateTransition, CUpnpNewServiceRegisterActivity::TContext )
+void CUpnpNewServiceRegisterActivity::TReplyToPendingServices::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPNewSrvcRegActivity, KComponent, _L8("CUpnpNewServiceRegisterActivity::TReplyToPendingServices::DoL")));
+	TUpnpMessage::TRootDeviceRegistered& currentMsg = message_cast< TUpnpMessage::TRootDeviceRegistered > ( iContext.iMessage );
+	
+	if ( currentMsg.iValue == KErrNone )
+		{
+		iContext.Node ( ).ProcessRootDeviceRegisteredL ( );
+		}
+	LOG(ESockLogExternal::Printf(KSubsysSPNewSrvcRegActivity, KComponent, _L8("CUpnpNewServiceRegisterActivity::TReplyToPendingServices::DoL - Posting message TUpnpMessage::TServiceRegistered")));	
+	TUpnpMessage::TServiceRegistered msg ( currentMsg.iValue );	
+  	iContext.iNodeActivity->PostToOriginators( msg );
+	}
+	
+DEFINE_SMELEMENT ( CUpnpNewServiceRegisterActivity::TReplyToCurrentService, NetStateMachine::MStateTransition, CUpnpNewServiceRegisterActivity::TContext )
+void CUpnpNewServiceRegisterActivity::TReplyToCurrentService::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPNewSrvcRegActivity, KComponent, _L8("CUpnpNewServiceRegisterActivity::TReplyToCurrentService::DoL")));
+	LOG(ESockLogExternal::Printf(KSubsysSPNewSrvcRegActivity, KComponent, _L8("CUpnpNewServiceRegisterActivity::TReplyToCurrentService::DoL - Posting message TUpnpMessage::TServiceRegistered")));
+	TUpnpMessage::TServiceRegistered msg ( KErrNone );	
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId ( ), address_cast<TNodeCtxId> ( iContext.iSender ), msg );
+  	}
+	
+	
+CNodeActivityBase* CUpnpSubscriptionTimerActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	CUpnpSubscriptionTimerActivity* self = new ( ELeave ) CUpnpSubscriptionTimerActivity ( aActivitySig, aNode ) ;
+	CleanupStack::PushL ( self );
+	self->ConstructL( );
+	CleanupStack::Pop ( self );
+	return self;
+	}
+	
+void CUpnpSubscriptionTimerActivity::ConstructL ( )	
+	{
+	// create the timer object
+	iPeriodicTimer = CPeriodic::NewL ( CActive::EPriorityLow );	
+	}
+
+CUpnpSubscriptionTimerActivity::~CUpnpSubscriptionTimerActivity ( )
+	{
+	SetError ( KErrNone );
+	if ( iPeriodicTimer )
+		iPeriodicTimer->Cancel( );
+	delete iPeriodicTimer;
+	}
+
+DEFINE_SMELEMENT ( CUpnpSubscriptionTimerActivity::TStartTimer, NetStateMachine::MStateTransition, CUpnpSubscriptionTimerActivity::TContext )
+void CUpnpSubscriptionTimerActivity::TStartTimer::DoL ( )
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysSPSubsTimerActivity, KComponent, _L8("CUpnpSubscriptionTimerActivity::TStartTimer::DoL")));
+	CUpnpSubscriptionTimerActivity& activity = static_cast<CUpnpSubscriptionTimerActivity&> ( *iContext.iNodeActivity );
+	
+	TCallBack updateCallback ( &CUpnpSubscriptionTimerActivity::SubscriptionTimerCallBackL, &activity );
+	activity.iPeriodicTimer->Start ( TTimeIntervalMicroSeconds32 ( KSubscriptionCleanupFrequency ), TTimeIntervalMicroSeconds32 ( KSubscriptionCleanupFrequency ), updateCallback );
+	}
+	
+DEFINE_SMELEMENT ( CUpnpSubscriptionTimerActivity::TDequeueClient, NetStateMachine::MStateTransition, CUpnpSubscriptionTimerActivity::TContext )
+void CUpnpSubscriptionTimerActivity::TDequeueClient::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPSubsTimerActivity, KComponent, _L8("CUpnpSubscriptionTimerActivity::TDequeueClient::DoL")));
+	TInt pos = iContext.iNodeActivity->FindOriginator ( iContext.iSender );
+	if ( pos != KErrNotFound )
+		{		
+		iContext.iNodeActivity->RemoveOriginator( pos );
+		}
+	}
+	
+DEFINE_SMELEMENT ( CUpnpSubscriptionTimerActivity::TStartOrStopTag, NetStateMachine::MStateFork, CUpnpSubscriptionTimerActivity::TContext )
+TInt CUpnpSubscriptionTimerActivity::TStartOrStopTag::TransitionTag ( )
+	{
+	if  ( iContext.iMessage.IsMessage<TUpnpMessage::TStartTimer> ( ) )
+		{
+		return KStart;
+		}	
+	return KStop;
+	}
+
+DEFINE_SMELEMENT ( CUpnpSubscriptionTimerActivity::TLoopOrCancelTag, NetStateMachine::MStateFork, CUpnpSubscriptionTimerActivity::TContext )
+TInt CUpnpSubscriptionTimerActivity::TLoopOrCancelTag::TransitionTag ( )
+	{
+	CUpnpSubscriptionTimerActivity& activity = static_cast<CUpnpSubscriptionTimerActivity&> ( *iContext.iNodeActivity );	
+	return activity.iOriginators.Count() == 0 ? KCancelTag : (CoreStates::KLoopTag | NetStateMachine::EBackward);
+	}
+
+
+TInt CUpnpSubscriptionTimerActivity::SubscriptionTimerCallBackL ( TAny* aPtr )
+	{
+	CUpnpSubscriptionTimerActivity* activity = static_cast<CUpnpSubscriptionTimerActivity*> ( aPtr );
+	TUint orgCount = activity->iOriginators.Count ( );
+	
+    if ( orgCount != 0 )
+    	{
+    	for ( TInt i = 0; i < orgCount; i++ )
+	    	{
+	    	TNodeId dc = address_cast<TNodeId> ( activity->iOriginators[i].RecipientId () );
+ 	    #if !defined(__GCCXML__)
+ 			CSubConnectionProviderBase& scprBase = mnode_cast<CSubConnectionProviderBase> ( dc.Node () );
+ 		#else
+ 			CSubConnectionProviderBase& scprBase = reinterpret_cast<CSubConnectionProviderBase&> ( dc.Node () );
+ 		#endif
+ 
+ 	    	CUPnPServiceSubConnectionProvider& subConnProv = static_cast<CUPnPServiceSubConnectionProvider&> ( scprBase );
+ 	    	subConnProv.DeprecateExpiredSubscriptions ();
+	    	}
+        }
+    else
+    	{
+    	activity->SetIdle( );
+    	activity->iPeriodicTimer->Cancel();
+    	}   
+    return KErrNone;
+	}	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicecprfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+// 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 <comms-infras/ss_msgintercept.h>
+
+#include "upnpservicecprfactory.h"
+#include "upnpservicecpr.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPCprFactoryTag KESockConnectionTag
+#endif
+
+using namespace ESock;
+
+CUPnPServiceConnectionProviderFactory* CUPnPServiceConnectionProviderFactory::NewL(TAny* aParentContainer)
+	{
+	return new (ELeave) CUPnPServiceConnectionProviderFactory(
+		TUid::Uid(CUPnPServiceConnectionProviderFactory::iUid), 
+		*reinterpret_cast<CConnectionFactoryContainer*>(aParentContainer));
+	}
+	
+CUPnPServiceConnectionProviderFactory::CUPnPServiceConnectionProviderFactory(TUid aFactoryId, CConnectionFactoryContainer& aParentContainer)
+	: CConnectionProviderFactoryBase(aFactoryId, aParentContainer)
+    {
+//	LOG_NODE_CREATE(KUPnPCprFactoryTag, CUPnPServiceConnectionProviderFactory);
+    }
+
+ACommsFactoryNodeId* CUPnPServiceConnectionProviderFactory::DoCreateObjectL(TFactoryQueryBase& /*aQuery*/)
+    {    
+    CConnectionProviderBase* provider = CUPnPServiceConnectionProvider::NewL(*this);    
+	ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
+    return provider;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicecprstates.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,138 @@
+// 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:
+//
+
+//Local Includes
+#include "upnpservicecprstates.h"
+#include "upnpstatemachine.h"
+
+using namespace UPnPServiceCprStates;
+
+//-=========================================================
+//
+//State Forks
+//
+//-=========================================================
+DEFINE_SMELEMENT ( TServiceOrDeviceTag, NetStateMachine::MStateFork, TContext )
+TInt TServiceOrDeviceTag::TransitionTag ( )
+	{
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TRegisterService> ( )	
+		|| iContext.iMessage.IsMessage<TUpnpMessage::TUnregisterService> ( ) )
+		{
+		return UPnPStateMachine::KServiceTag;
+		}
+	else if  ( iContext.iMessage.IsMessage<TUpnpMessage::TRegisterDevice> ( )
+		|| iContext.iMessage.IsMessage<TUpnpMessage::TUnregisterDevice> ( ) )
+		{
+		return UPnPStateMachine::KDeviceTag;
+		}
+	return MeshMachine::KErrorTag;	
+	}
+
+
+DEFINE_SMELEMENT ( TRootRegisteredOrNoTag, NetStateMachine::MStateFork, TContext )
+TInt TRootRegisteredOrNoTag::TransitionTag ( )
+	{
+	return iContext.Node ( ).IsRootDeviceRegistered ( ) ? UPnPStateMachine::KRootRegisteredTag : MeshMachine::KNoTag;
+	}
+	
+//-=========================================================
+//
+//Transitions
+//
+//-=========================================================
+DEFINE_SMELEMENT ( TPerformServiceOrDeviceValidationAndSendResponse, NetStateMachine::MStateTransition, TContext )
+void TPerformServiceOrDeviceValidationAndSendResponse::DoL ( )
+	{
+	TInt err = KErrNone;
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TServiceJoinRequest> ( ) )
+		{
+		TUpnpMessage::TServiceJoinRequest& joinMsg = message_cast<TUpnpMessage::TServiceJoinRequest>( iContext.iMessage );
+		
+		CUPnPServiceRegisterParamSet* paramSet = static_cast<CUPnPServiceRegisterParamSet*> ( joinMsg.iParamSet );
+		CUPnPRootDeviceInfoContainer& container = static_cast <CUPnPRootDeviceInfoContainer&> ( iContext.Node ( ).GetRootDeviceInfoContainer ( ) );
+		if(!paramSet->DeviceUid( ).Size())
+			{
+			paramSet->SetDeviceUidL(container.GetRootdeviceUid());
+			}
+		
+		err = container.PerformValidation ( paramSet->DeviceUid( ), paramSet->Uri( ) );
+		}
+	else if ( iContext.iMessage.IsMessage<TUpnpMessage::TDeviceJoinRequest> ( ) )
+		{
+		TUpnpMessage::TDeviceJoinRequest& joinMsg = message_cast<TUpnpMessage::TDeviceJoinRequest>( iContext.iMessage );
+		
+		CUPnPDeviceRegisterParamSet* paramSet = static_cast<CUPnPDeviceRegisterParamSet*> ( joinMsg.iParamSet );
+		CUPnPRootDeviceInfoContainer& container = static_cast <CUPnPRootDeviceInfoContainer&> ( iContext.Node ( ).GetRootDeviceInfoContainer ( ) );
+		if(!paramSet->ParentDeviceUid( ).Size())
+			{
+			paramSet->SetParentDeviceUidL(container.GetRootdeviceUid());
+			}
+		if ( container.GetDeviceByUuid ( paramSet->ParentDeviceUid( ) )
+			&& !( container.GetDeviceByUuid ( paramSet->UDN( ) ) ) )
+			{
+			err = KErrNone;
+			}
+		else
+			{
+			err = KErrAlreadyExists;
+			}
+		}
+	
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), address_cast<TNodeCtxId> ( iContext.iSender ), TUpnpMessage::TServiceValidated ( err ).CRef () );
+	}
+
+
+DEFINE_SMELEMENT ( TAppendServiceInfo, NetStateMachine::MStateTransition, TContext )
+void TAppendServiceInfo::DoL ( )
+	{
+	TUpnpMessage::TRegisterService& msg = message_cast<TUpnpMessage::TRegisterService>( iContext.iMessage );
+	
+	CUPnPServiceRegisterParamSet* paramSet = static_cast<CUPnPServiceRegisterParamSet*> ( msg.iParamSet );
+	CUPnPServiceInfo* serviceInfo = static_cast<CUPnPServiceInfo*> ( msg.iPtr );
+	
+	iContext.Node ( ).GetRootDeviceInfoContainer ( ).AppendServiceInfoL ( paramSet->DeviceUid(), serviceInfo );
+	}
+
+
+DEFINE_SMELEMENT ( TAppendDeviceInfo, NetStateMachine::MStateTransition, TContext )
+void TAppendDeviceInfo::DoL ( )
+	{
+	TUpnpMessage::TRegisterDevice& msg = message_cast<TUpnpMessage::TRegisterDevice>( iContext.iMessage );
+	
+	CUPnPDeviceRegisterParamSet* paramSet = static_cast<CUPnPDeviceRegisterParamSet*> ( msg.iParamSet );
+	CUPnPDevice* device = static_cast<CUPnPDevice*> ( msg.iPtr );
+	
+	iContext.Node ( ).GetRootDeviceInfoContainer ( ).AppendEmbeddedDeviceL ( paramSet->ParentDeviceUid( ), device );
+	}
+	
+	
+DEFINE_SMELEMENT ( TDeleteServiceInfo, NetStateMachine::MStateTransition, TContext )
+void TDeleteServiceInfo::DoL ( )
+	{
+	TUpnpMessage::TUnregisterService& msg = message_cast<TUpnpMessage::TUnregisterService>( iContext.iMessage );
+	TPtr8 scpdUrl ( const_cast<TUint8*> ( msg.iPtr ), msg.iSize, msg.iSize );
+	
+	iContext.Node ( ).GetRootDeviceInfoContainer ( ).DeleteServiceInfoL ( scpdUrl );
+	}
+
+	
+DEFINE_SMELEMENT ( TDeleteDeviceInfo, NetStateMachine::MStateTransition, TContext )
+void TDeleteDeviceInfo::DoL ( )
+	{
+	TUpnpMessage::TUnregisterDevice& msg = message_cast<TUpnpMessage::TUnregisterDevice>( iContext.iMessage );
+	TPtr8 deviceUuid ( const_cast<TUint8*> ( msg.iPtr ), msg.iSize, msg.iSize );
+	
+	iContext.Node ( ).GetRootDeviceInfoContainer ( ).DeleteDeviceInfoL ( deviceUuid );	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicedeftscpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,100 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_msgintercept.h>
+
+#include "upnpservicedeftscpr.h"
+#include "upnpservicedeftscpractivities.h"
+#include "upnpserverconstants.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPDefaultSCprTag KESockSubConnectionTag
+#endif
+
+using namespace ESock;
+
+
+CUPnPServiceDefaultSubConnectionProvider* CUPnPServiceDefaultSubConnectionProvider::NewL ( CSubConnectionProviderFactoryBase& aFactory )
+	{
+	CUPnPServiceDefaultSubConnectionProvider* provider = new ( ELeave ) CUPnPServiceDefaultSubConnectionProvider ( aFactory, UPnPServiceDefaultActivities::activityMap::Self ( ) );
+	CleanupStack::PushL ( provider );
+	provider->ConstructL( );
+	CleanupStack::Pop ( provider );
+	return provider;
+	}
+
+CUPnPServiceDefaultSubConnectionProvider::~CUPnPServiceDefaultSubConnectionProvider ( )
+	{
+	LOG_NODE_DESTROY ( KUPnPDefaultSCprTag, CUPnPServiceDefaultSubConnectionProvider );
+	iRootDeviceUrn.Close ( );
+	delete iRootDevicePublishInfo;
+	delete iDeviceDescriptionComposer;
+	}
+
+CUPnPServiceDefaultSubConnectionProvider::CUPnPServiceDefaultSubConnectionProvider ( CSubConnectionProviderFactoryBase& aFactory, const TNodeActivityMap& aActivityMap )
+	: CUPnPSubConnectionProvider ( aFactory, aActivityMap ), iRootDevicePublished ( EFalse ), iClosing ( EFalse )
+	{
+	LOG_NODE_CREATE ( KUPnPDefaultSCprTag, CUPnPServiceDefaultSubConnectionProvider );
+	}
+
+void CUPnPServiceDefaultSubConnectionProvider::ConstructL ( )
+	{
+	CCoreSubConnectionProvider::ConstructL ( );
+	}
+
+void CUPnPServiceDefaultSubConnectionProvider::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	ESOCK_DEBUG_MESSAGE_INTERCEPT ( aSender, aMessage, aRecipient );	
+	TNodeContext<CUPnPServiceDefaultSubConnectionProvider> ctx(*this, aMessage, aSender, aRecipient);	
+    CCoreSubConnectionProvider::ReceivedL ( aSender, aRecipient, aMessage );
+    User::LeaveIfError ( ctx.iReturn );
+	}
+
+void CUPnPServiceDefaultSubConnectionProvider::SetPublishInfoL ( CUPnPPublishInfoElement* aPublishInfo )
+	{
+	iRootDevicePublishInfo = aPublishInfo;
+	
+	// RootDevice Specific Publish Info -- upnp:rootdevice::uuid:device-UUID
+	TInt size = aPublishInfo->Uuid( ).Size ( ) + KSeperator.iTypeLength + aPublishInfo->SearchTarget( ).Size ( );
+	iRootDeviceUsn.CreateMaxL ( size );
+	
+	iRootDeviceUsn.Copy ( aPublishInfo->Uuid ( ) );
+	iRootDeviceUsn.Append ( KSeperator ( ) );
+	iRootDeviceUsn.Append ( aPublishInfo->SearchTarget ( ) );
+	}
+
+CUPnPDescriptionComposer& CUPnPServiceDefaultSubConnectionProvider::DeviceDescriptionComposerL ( )
+	{
+	if ( !iDeviceDescriptionComposer )
+		{
+		CStringPoolManager& stringpoolmgr =  ConnectionProvider().StringPoolManager();
+		const RStringPool& pool = stringpoolmgr.StringPool();
+		iDeviceDescriptionComposer = CUPnPDescriptionComposer::NewL ( pool );
+		return *iDeviceDescriptionComposer;
+		}
+	else
+		return *iDeviceDescriptionComposer;
+	}
+
+CUPnPServiceConnectionProvider& CUPnPServiceDefaultSubConnectionProvider::ConnectionProvider ( )
+	{
+	CUPnPConnectionProvider& cprBase = BaseConnectionProvider();
+	return static_cast<CUPnPServiceConnectionProvider&>(cprBase);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicedeftscpractivities.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,334 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_corepractivities.h>
+
+
+#include <httperr.h>
+
+//Local Includes
+#include "upnpservicedeftscpractivities.h"
+#include "upnpservicedeftscprstates.h"
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+#include "upnplog.h"
+#include "upnpdescriptionschema.h"
+
+using namespace ESock;
+using namespace MeshMachine;
+using namespace CoreActivities;
+using namespace CoreNetStates;
+using namespace CoreStates;
+using namespace UPnPServiceDefaultStates;
+using namespace UPnPServiceDefaultActivities;
+using namespace UPnPStateMachine;
+
+
+__FLOG_STMT(_LIT8(KComponent,"UPnPSPDefltScpr");)
+
+namespace UPnPServiceDefaultBindToActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( ECFActivityBindTo, UPnPServiceDefaultBindToRequest, TCFDataClient::TBindTo, PRActivities::CBindToActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CoreNetStates::TAwaitingBindTo, PRActivities::CBindToActivity::TNoTagOrBearerReady )
+    
+    THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TStoreBindToOriginator, TNoTag )    
+    NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TSendControlClientJoinRequest, CoreStates::TAwaitingJoinComplete, TTag<KNoTag> )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TFindOrCreateUdpClientFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TProcessUdpClientFlowCreation, TTag<KDataClientReady> )
+	
+	NODEACTIVITY_ENTRY ( KDataClientReady, TFindOrCreateUdpServerFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TProcessUdpServerFlowCreation, TTag<KBindToComplete> )
+	
+	LAST_NODEACTIVITY_ENTRY ( KBindToComplete, ABindingActivity::TSendBindToComplete )
+	
+	NODEACTIVITY_ENTRY ( KErrorTag, CoreNetStates::TSendClientLeavingRequestToServiceProvider, CoreStates::TAwaitingLeaveComplete, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TRaiseAndClearActivityError )
+NODEACTIVITY_END ( )
+}
+
+
+// UPnP Default SCRP will only udp data client
+// unless an actual service is registered with CPR i.e UPnP root device
+namespace UPnPServiceDefaultDataClientStartActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityStartDataClient, UPnPServiceDefaultDataClientStart, TCFDataClient::TStart )
+    FIRST_NODEACTIVITY_ENTRY ( CoreNetStates::TAwaitingDataClientStart, TNoTag )
+    NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceDefaultStates::TStartMuClient, CoreNetStates::TAwaitingDataClientStarted, TNoTag )    
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TSendDataClientStarted )
+NODEACTIVITY_END ( )
+}
+
+namespace UPnPServiceDefaultClientLeaveActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityClientLeave, UPnPServiceDefaultClientLeave, TNodeSignal::TNullMessageId ) //May be waiting for both messages
+	FIRST_NODEACTIVITY_ENTRY ( CoreStates::TAwaitingClientLeave, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceDefaultStates::TProcessClientLeave, UPnPServiceDefaultStates::TNoTagOrDataClientIdle )
+	THROUGH_NODEACTIVITY_ENTRY ( KDataClientIdle, CoreNetStates::TSendDataClientIdle, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TDoNothing )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPServiceDefaultDataClientStopActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityStopDataClient, UPnPServiceDefaultDataClientStop, TCFDataClient::TStop  )
+	FIRST_NODEACTIVITY_ENTRY ( CoreNetStates::TAwaitingDataClientStop, CoreNetStates::TNoTagOrDataClientsToStop )
+	
+	NODEACTIVITY_ENTRY ( CoreNetStates::KDataClientsToStop, UPnPServiceDefaultStates::TProcessDataClientStop,  CoreNetStates::TAwaitingDataClientsStopped, TNoTag )	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TDoNothing, CoreNetStates::TNoTagOrUnbindOnStop )
+	
+	NODEACTIVITY_ENTRY ( CoreNetStates::KUnbind, CoreNetStates::TSendClientLeavingRequestToServiceProvider, CoreStates::TAwaitingLeaveComplete, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, UPnPStateMachine::TDestroyDataClients, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TSendDataClientStopped )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPServiceDefaultDestroyActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( ECFActivityDestroy, UPnPServiceDefaultDestroy, TEChild::TDestroy, CoreActivities::CDestroyActivity::New )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingDestroy, UPnPStateMachine::TBlockedByAllActivitiesStopped )
+
+	//Stop self first
+    NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TStopSelf, CoreNetStates::TAwaitingDataClientStopped, TNoTag )
+
+ 	LAST_NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TSendClientLeavingAndRemoveControlProvider )
+NODEACTIVITY_END()
+}
+
+
+namespace UPnPServiceDefaultRegisterRootDeviceActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityRegisterRootDevice, UPnPServiceDefaultRegisterRootDevice, TUpnpMessage::TRegisterRootDevice, CUpnpRegisterRootDeviceActivity::NewL )
+    FIRST_NODEACTIVITY_ENTRY ( TAwaitingRootDeviceRegister, TNoTag )
+    
+    THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TBuildPublishAndRootDeviceInfo, TTag<KSendRequest> )
+	THROUGH_NODEACTIVITY_ENTRY ( KSendRequest, UPnPServiceDefaultStates::TSendPublishRequest, TNoTag )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TRegisterRootDeviceWithMuServer, TNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceDefaultStates::TStartMuServer, CoreNetStates::TAwaitingDataClientStarted, TNoTag )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TCreateServerFlow<ERootDescription>, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	NODEACTIVITY_ENTRY ( KNoTag, UPnPStateMachine::TProcessServerFlowCreation, CoreNetStates::TAwaitingDataClientStarted, CUpnpRegisterRootDeviceActivity::TIconCreateOrNoTag )
+	
+	NODEACTIVITY_ENTRY ( KCreateIconTag, CUpnpRegisterRootDeviceActivity::TCreateIconFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KIconCreatedTag> > )
+	NODEACTIVITY_ENTRY ( KIconCreatedTag, TProcessServerFlowCreation, CoreNetStates::TAwaitingDataClientStarted, CUpnpRegisterRootDeviceActivity::TIconOrNoTag )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TSendRootDeviceRegistered, TNoTag )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KErrorTag, TSendRootDeviceRegistered, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TClearError )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPSerivceDefaultSearchResponseActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivitySearchResponse, UPnPServiceDefaultSearchResponse, TUpnpMessage::TUPnPSearchRequest, CNodeParallelActivityBase::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( UPnPStateMachine::TAwaitingSearchRequest, UPnPServiceDefaultStates::TNoTagOrIgnoreTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceDefaultStates::TSendSearchResponse )
+	LAST_NODEACTIVITY_ENTRY ( CoreStates::KIgnore, UPnPStateMachine::TDiscardSearchRequestData )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPSerivceDefaultDeviceRepublishActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( TUpnpMessage::EActivityDeviceRepublish, UPnPServiceDefaultDeviceRepublish, TUpnpMessage::TDeviceRepublish )
+	FIRST_NODEACTIVITY_ENTRY ( UPnPServiceDefaultStates::TAwaitingDeviceRepublish, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceDefaultStates::TSendPublishRequest )
+NODEACTIVITY_END ( )
+}
+	
+namespace UpnpRootDeviceInfoRequestActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityRequestInfo, UpnpRootDeviceInfoRequestInfo, TUpnpMessage::TUPnPRequestInfo, CUpnpRootDeviceInfoRequestActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingUpnpRequestInfo, UPnPServiceDefaultStates::TRequestOrIgnoreTag )
+	LAST_NODEACTIVITY_ENTRY ( KDescribeRequest, CUpnpRootDeviceInfoRequestActivity::TComposeAndSendRootDescription )
+	LAST_NODEACTIVITY_ENTRY ( KIconRequest, CUpnpRootDeviceInfoRequestActivity::TFindAndSendIconData )
+
+	LAST_NODEACTIVITY_ENTRY ( CoreStates::KIgnore, UPnPStateMachine::TSendIgnoreResponse )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPServiceDefaultActivities
+{
+DEFINE_ACTIVITY_MAP ( activityMap )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceDefaultBindToActivity, UPnPServiceDefaultBindToRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceDefaultDataClientStartActivity, UPnPServiceDefaultDataClientStart )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceDefaultClientLeaveActivity, UPnPServiceDefaultClientLeave )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceDefaultDataClientStopActivity, UPnPServiceDefaultDataClientStop )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceDefaultDestroyActivity, UPnPServiceDefaultDestroy )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceDefaultRegisterRootDeviceActivity, UPnPServiceDefaultRegisterRootDevice )
+	ACTIVITY_MAP_ENTRY ( UPnPSerivceDefaultSearchResponseActivity, UPnPServiceDefaultSearchResponse )
+	ACTIVITY_MAP_ENTRY ( UPnPSerivceDefaultDeviceRepublishActivity, UPnPServiceDefaultDeviceRepublish )
+	ACTIVITY_MAP_ENTRY ( UpnpRootDeviceInfoRequestActivity, UpnpRootDeviceInfoRequestInfo )
+ACTIVITY_MAP_END_BASE ( SCprActivities, coreSCprActivities )
+}
+
+
+// -------------- device description request activity------------------------
+CNodeActivityBase* CUpnpRootDeviceInfoRequestActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return ( new ( ELeave ) CUpnpRootDeviceInfoRequestActivity ( aActivitySig, aNode, activityId ) );
+	}
+
+
+CUpnpRootDeviceInfoRequestActivity::CUpnpRootDeviceInfoRequestActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivitiesCount )
+:CNodeParallelActivityBase ( aActivitySig, aNode, aActivitiesCount )
+	{	  	
+	}
+
+
+CUpnpRootDeviceInfoRequestActivity::~CUpnpRootDeviceInfoRequestActivity ( )
+	{
+	SetError ( KErrNone );
+	}
+
+
+DEFINE_SMELEMENT ( CUpnpRootDeviceInfoRequestActivity::TComposeAndSendRootDescription, NetStateMachine::MStateTransition, CUpnpRootDeviceInfoRequestActivity::TContext )
+void CUpnpRootDeviceInfoRequestActivity::TComposeAndSendRootDescription::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPRootDeviceInfoReqActivity, KComponent, _L8("CUpnpRootDeviceInfoRequestActivity::TComposeAndSendRootDescription::DoL")));
+	// compose current root device description xml data.
+	CUPnPServiceConnectionProvider& ctrlProv = iContext.Node ( ).ConnectionProvider ( );
+	
+	CUPnPRootDeviceInfoContainer& container = ctrlProv.GetRootDeviceInfoContainer ( );
+	CUPnPDeviceDescription& deviceDesc = container.GetRootDeviceDesciption ( );
+    
+    CUPnPDescriptionComposer& composer =  iContext.Node ( ).DeviceDescriptionComposerL ( );
+    RBuf8 deviceXmlBuf;
+    composer.ComposeDescriptionXmlL ( &deviceDesc,CUPnPDescriptionComposer::EDevice , deviceXmlBuf );
+	
+	CleanupClosePushL ( deviceXmlBuf );
+	//Send composed xml as response body to TCP Server Flow i.e current msg sender		
+	RMemChunk bufChain;
+	bufChain.CreateL ( deviceXmlBuf, ctrlProv.MemoryAllocator() );	
+	CleanupStack::PopAndDestroy ( &deviceXmlBuf );
+	
+	TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( iContext.iMessage );
+	CTransaction* trans = static_cast<CTransaction*> ( requestMsg.iPtr );
+	trans->AddBodyPart ( bufChain );
+		
+	LOG(ESockLogExternal::Printf(KSubsysSPRootDeviceInfoReqActivity, KComponent, _L8("CUpnpRootDeviceInfoRequestActivity::TComposeAndSendRootDescription::DoL - Posting messge TUpnpMessage::TUPnPResponseInfo")));	
+	TUpnpMessage::TUPnPResponseInfo msg ( trans, HTTPStatus::EOk, NULL );
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender, msg );
+	}
+	
+DEFINE_SMELEMENT ( CUpnpRootDeviceInfoRequestActivity::TFindAndSendIconData, NetStateMachine::MStateTransition, CUpnpRootDeviceInfoRequestActivity::TContext )
+void CUpnpRootDeviceInfoRequestActivity::TFindAndSendIconData::DoL ( )
+	{
+	TUpnpMessage::TUPnPRequestInfo& requestInfoMsg = message_cast<TUpnpMessage::TUPnPRequestInfo> ( iContext.iMessage );
+	
+	CTransaction* transaction = static_cast<CTransaction*> ( requestInfoMsg.iPtr );	
+	TInt statusCode;	
+	CUPnPUtils::FindAndSendIconDataL ( transaction, statusCode, iContext.Node ( ).ConnectionProvider().MemoryAllocator() );
+	
+	TUpnpMessage::TUPnPResponseInfo msg ( transaction, statusCode, NULL );
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender, msg );
+	}
+//-------------------------Embedded Device Session Registration Activity-------------------------------------
+CNodeActivityBase* CUpnpRegisterRootDeviceActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	return new ( ELeave ) CUpnpRegisterRootDeviceActivity ( aActivitySig, aNode ) ;
+	}
+
+
+CUpnpRegisterRootDeviceActivity::CUpnpRegisterRootDeviceActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode  )
+	: CNodeActivityBase ( aActivitySig, aNode ), iIconUrlIdx ( 0 )
+	{	  	
+	}
+
+CUpnpRegisterRootDeviceActivity::~CUpnpRegisterRootDeviceActivity ( )
+	{
+	SetError ( KErrNone	);
+	iIconUrl.Close ();
+	}
+
+DEFINE_SMELEMENT ( CUpnpRegisterRootDeviceActivity::TCreateIconFlow, NetStateMachine::MStateTransition, CUpnpRegisterRootDeviceActivity::TContext )
+void CUpnpRegisterRootDeviceActivity::TCreateIconFlow::DoL ()
+	{	
+	CUpnpRegisterRootDeviceActivity& activity = static_cast<CUpnpRegisterRootDeviceActivity&> ( *iContext.iNodeActivity );
+	CUPnPServiceConnectionProvider& ctrlProv = iContext.Node ().ConnectionProvider ();
+	
+	const CUPnPDevice& device = ctrlProv.RootDevice ();    
+    CStringPoolManager& stringPoolMgr = ctrlProv.StringPoolManager ();
+	RStringPool& sp = stringPoolMgr.StringPool ();
+
+	activity.iIconUrl.Close ();
+	const TDesC8& url = device.AtIconInfoTable ( activity.iIconUrlIdx )->Property ( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUrl, stringPoolMgr.GetUPnPTable () ) );
+	const TDesC8& rootLoc = ctrlProv.RootDeviceLocation ();
+	
+	if ( url[0] == TChar ('/') )
+		{
+		activity.iIconUrl.CreateL ( rootLoc.Length () + ( url.Length () - 1 ) );
+		activity.iIconUrl.Copy ( rootLoc );
+		activity.iIconUrl.Append ( url.Mid (1) );
+		}
+	else
+		{
+		activity.iIconUrl.CreateL ( rootLoc.Length () + url.Length () );
+		activity.iIconUrl.Copy ( rootLoc );
+		activity.iIconUrl.Append ( url );
+		}
+	
+	const TUint8* uriPtr = activity.iIconUrl.Ptr ();
+	TUint size = activity.iIconUrl.Size ();
+	const TUid requestedUid = { CUPnPFlowFactory::iUid };
+	THttpServerFlowQuery flowQuery ( uriPtr,
+									 size,
+									 iContext.NodeId (),
+									 EHttpServerFlow );
+	
+	ESock::TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery );
+	
+	TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+	Messages::TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+	activity.PostRequestTo( factoryContainer, msg );
+	}
+
+DEFINE_SMELEMENT ( CUpnpRegisterRootDeviceActivity::TIconCreateOrNoTag, NetStateMachine::MStateFork, CUpnpRegisterRootDeviceActivity::TContext )
+TInt CUpnpRegisterRootDeviceActivity::TIconCreateOrNoTag::TransitionTag ()
+	{
+	CUPnPServiceConnectionProvider& ctrlProv = iContext.Node ().ConnectionProvider ();
+	const CUPnPDevice& device = ctrlProv.RootDevice ();
+    
+	return device.CountOfIconInfoTable () != 0 ? KCreateIconTag : KNoTag;
+	}
+
+DEFINE_SMELEMENT ( CUpnpRegisterRootDeviceActivity::TIconOrNoTag, NetStateMachine::MStateFork, CUpnpRegisterRootDeviceActivity::TContext )
+TInt CUpnpRegisterRootDeviceActivity::TIconOrNoTag::TransitionTag ()
+	{
+	CUpnpRegisterRootDeviceActivity& activity = static_cast<CUpnpRegisterRootDeviceActivity&> ( *iContext.iNodeActivity );
+	CUPnPServiceConnectionProvider& ctrlProv = iContext.Node ( ).ConnectionProvider ( );	
+	const CUPnPDevice& device = ctrlProv.RootDevice ( );
+	
+	activity.iIconUrlIdx++;
+	if ( device.CountOfIconInfoTable () != activity.iIconUrlIdx )
+		{
+		return NetStateMachine::EBackward | KCreateIconTag;
+		}
+	
+	return NetStateMachine::EForward | KNoTag;
+	}	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicedeftscprstates.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,362 @@
+// 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:
+//
+
+//System Includes
+#include <comms-infras/ss_log.h>
+#include <comms-infras/ss_logext.h>
+
+#include <http/thttptable.h>
+#include <inetprottextutils.h>
+#include <upnpdescriptionschema.h>
+#include <rmemchunk.h>
+#include <rmemcell.h>
+//Local Includes
+#include "upnpservicedeftscprstates.h"
+#include "upnp_cf_msgs.h"
+#include "upnpstatemachine.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+using namespace UPnPServiceDefaultStates;
+using namespace ESock;
+
+
+//-=========================================================
+//
+//States
+//
+//-=========================================================
+
+//-=========================================================
+//
+//Transitions
+//
+//-=========================================================
+DEFINE_SMELEMENT ( TStoreUdpServer, NetStateMachine::MStateTransition, TContext )
+void TStoreUdpServer::DoL ( )
+	{
+	TCFFactory::TPeerFoundOrCreated &msg = message_cast<TCFFactory::TPeerFoundOrCreated> ( iContext.iMessage );
+	iContext.Node ( ).SetUdpServerFlow ( msg.iNodeId );
+	}
+
+
+DEFINE_SMELEMENT ( TStoreUdpClient, NetStateMachine::MStateTransition, TContext )
+void TStoreUdpClient::DoL ( )
+	{
+	TCFFactory::TPeerFoundOrCreated &msg = message_cast<TCFFactory::TPeerFoundOrCreated> ( iContext.iMessage );
+	iContext.Node ( ).SetUdpClientFlow ( msg.iNodeId );
+	}
+
+DEFINE_SMELEMENT ( TBuildPublishAndRootDeviceInfo, NetStateMachine::MStateTransition, TContext )
+void TBuildPublishAndRootDeviceInfo::DoL ( )
+	{
+	if ( iContext.Node ( ).PublishInfo ( ) )
+		{
+		return;
+		}
+	
+	TUpnpMessage::TRegisterRootDevice& msg = message_cast< TUpnpMessage::TRegisterRootDevice > ( iContext.iMessage );
+	CUPnPDevice* device = static_cast <CUPnPDevice*> ( msg.iPtr );
+	
+	CStringPoolManager& stringPoolMgr = iContext.Node ().ConnectionProvider ().StringPoolManager ();
+	RStringPool& sp = stringPoolMgr.StringPool ( );
+	const TStringTable& upnpTable = stringPoolMgr.GetUPnPTable();
+	CUPnPPublishInfoElement* publishInfo = CUPnPPublishInfoElement::NewL ( );
+    CleanupStack::PushL ( publishInfo );
+    
+    publishInfo->SetKeyL( iContext.Node ().ConnectionProvider ().RootDeviceLocation () );
+    publishInfo->SetSearchTargetL( KRootDevice ( ) ); //upnp:rootdevice
+	publishInfo->SetCacheControlL( KCacheControl );
+	
+	const TDesC8& udnPtr = device->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUdn, upnpTable ) );
+	const TDesC8& deviceTypePtr = device->Property( sp.String(UPNPDESCRIPTIONXMLTAGS::EDeviceType,upnpTable ) );
+	
+	publishInfo->SetUuidL ( udnPtr );
+	
+	// Set Usn to udn + devicetype
+	TInt len = udnPtr.Length ( ) + KSeperator.iTypeLength + deviceTypePtr.Length ( );	
+	RBuf8 tempBuf;
+	tempBuf.CreateMaxL ( len );
+	CleanupClosePushL ( tempBuf );
+	
+	tempBuf.Copy ( udnPtr );
+	tempBuf.Append ( KSeperator ( ) );
+	tempBuf.Append ( deviceTypePtr );
+	publishInfo->SetUsnL( tempBuf );
+		
+	iContext.Node ( ).SetPublishInfoL ( publishInfo );
+	// store deviceType in SCPr node for reference in M-Search Response Activity
+	iContext.Node ( ).SetRootDeviceUrnL ( deviceTypePtr );
+	
+	CleanupStack::PopAndDestroy ( &tempBuf );
+	CleanupStack::Pop ( publishInfo );	
+	}
+
+
+DEFINE_SMELEMENT ( TSendPublishRequest, NetStateMachine::MStateTransition, TContext )
+void TSendPublishRequest::DoL ( )
+	{
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	// Publish once for upnp:rootdevice::uuid:device-UUID
+	DoPublishL ( publishInfo->SearchTarget ( ), iContext.Node ( ).RootDeviceUsn ( ), publishInfo->CacheControl ( ) );
+		
+	// Publish once for uuid:device-UUID
+	DoPublishL ( publishInfo->Uuid ( ), publishInfo->Uuid ( ), publishInfo->CacheControl ( ) );
+		
+	// Publish once for uuid:device-UUID::urn:domain-name-device:deviceType:v	
+	DoPublishL ( iContext.Node ( ).RootDeviceUrn ( ), publishInfo->Usn ( ), publishInfo->CacheControl ( ) );
+		
+	iContext.Node ( ).SetRootDevicePublished ( ETrue );
+	}
+	
+void TSendPublishRequest::DoPublishL ( const TDesC8& aSearchTarget, const TDesC8& aUsn, TInt aMaxAge )
+	{
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	RMemChunk locationBuf;
+	locationBuf.CreateL ( iContext.Node ().ConnectionProvider ().RootDeviceLocation (), allocator );
+	
+	RMemChunk stBuf;
+	stBuf.CreateL ( aSearchTarget, allocator );	
+	TCleanupItem item ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &stBuf );
+	CleanupStack::PushL ( item );
+	
+	RMemChunk usnBuf;
+	usnBuf.CreateL ( aUsn, allocator );
+	
+	TSsdpInfo ssdpInfo ( aMaxAge, locationBuf, usnBuf, stBuf );
+	
+	TUpnpMessage::TUPnPPublishAliveRequest publishMsg ( ssdpInfo );			
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().UdpClientFlow (), publishMsg );
+	
+	CleanupStack::Pop ( ); // item
+	}
+
+
+DEFINE_SMELEMENT ( TRegisterRootDeviceWithMuServer, NetStateMachine::MStateTransition, TContext )
+void TRegisterRootDeviceWithMuServer::DoL ( )
+	{
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	// Register once for upnp:rootdevice
+	RegisterForMSearchL ( publishInfo->SearchTarget ( ) );
+	
+	// Register once for uuid:device-UUID
+	RegisterForMSearchL ( publishInfo->Uuid ( ) );
+	
+	// Register once for uuid:device-UUID::urn:domain-name-device:deviceType:v
+	RegisterForMSearchL ( iContext.Node ( ).RootDeviceUrn ( ) );
+	}
+	
+void TRegisterRootDeviceWithMuServer::RegisterForMSearchL ( const TDesC8& aSearchTarget )
+	{
+	RMemoryAllocator allocator(iContext.Node ( ).ConnectionProvider().MemoryManager());
+	RMemChunk stBuf;
+	stBuf.CreateL ( aSearchTarget, allocator );
+	
+	TSsdpInfo ssdpInfo ( stBuf );
+	
+	TUpnpMessage::TUPnPPublishRegistration msg ( ssdpInfo );
+	RClientInterface::OpenPostMessageClose ( TNodeCtxId ( MeshMachine::KActivityNull, iContext.NodeId () ), iContext.Node ().UdpServerFlow (), msg );
+	}
+	
+
+DEFINE_SMELEMENT ( TStartMuClient, NetStateMachine::MStateTransition, TContext )
+void TStartMuClient::DoL ( )
+	{
+	iContext.iNodeActivity->PostRequestTo ( iContext.Node ().UdpClientFlow (), TCFDataClient::TStart ().CRef () );
+	}
+
+DEFINE_SMELEMENT ( TStartMuServer, NetStateMachine::MStateTransition, TContext )
+void TStartMuServer::DoL ( )
+	{	
+	iContext.iNodeActivity->PostRequestTo ( iContext.Node ().UdpServerFlow (), TCFDataClient::TStart ().CRef () );
+	}
+	
+DEFINE_SMELEMENT ( TSendRootDeviceRegistered, NetStateMachine::MStateTransition, TContext )
+void TSendRootDeviceRegistered::DoL ( )
+	{
+	TUpnpMessage::TRootDeviceRegistered msg ( iContext.iNodeActivity->Error( ) );
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().ControlProvider ()->RecipientId (), msg );
+	}
+
+
+DEFINE_SMELEMENT ( TSendSearchResponse, NetStateMachine::MStateTransition, TContext )
+void TSendSearchResponse::DoL ( )
+	{	
+	if ( !iContext.Node ( ).RootDevicePublished ( ) )
+		{
+		return;		
+		}
+	
+	TUpnpMessage::TUPnPSearchRequest& reqMsg = message_cast< TUpnpMessage::TUPnPSearchRequest > ( iContext.iMessage );
+		
+	RMemCell* mBuf = reqMsg.iSsdpInfo.iSearchTarget.First ( );
+	TPtr8 stPtr ( mBuf->Ptr( ), mBuf->Length( ), mBuf->Length( ) );
+		
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+		
+	if ( stPtr.CompareF ( publishInfo->SearchTarget ( ) ) == 0 )
+		{
+		// Search Response for upnp:rootdevice::uuid:device-UUID
+		SendSearchResponseL ( publishInfo->SearchTarget ( ), iContext.Node ( ).RootDeviceUsn ( ), publishInfo->CacheControl ( ) );
+		}
+	else if ( stPtr.CompareF ( publishInfo->Uuid ( ) ) == 0 )
+		{
+		// Search Response for uuid:device-UUID
+		SendSearchResponseL ( publishInfo->Uuid ( ), publishInfo->Uuid ( ), publishInfo->CacheControl ( ) );
+		}
+	else
+		{
+		// Search Response for uuid:device-UUID::urn:domain-name-device:deviceType:v		
+		SendSearchResponseL ( stPtr, publishInfo->Usn ( ), publishInfo->CacheControl ( ) );
+		}
+	reqMsg.iSsdpInfo.iSearchTarget.Free ( );
+	}
+
+void TSendSearchResponse::SendSearchResponseL ( const TDesC8& aSearchTarget, const TDesC8& aUsn, TInt aMaxAge )
+	{		
+	TUpnpMessage::TUPnPSearchRequest& reqMsg = message_cast< TUpnpMessage::TUPnPSearchRequest > ( iContext.iMessage );	
+	TAppProtAddr remoteUnicastAddr = reqMsg.iSsdpInfo.iAddr;
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	RMemChunk locationBuf;
+	locationBuf.CreateL ( iContext.Node ().ConnectionProvider ().RootDeviceLocation (), allocator );
+	TCleanupItem item ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &locationBuf );
+	CleanupStack::PushL ( item );
+
+	RMemChunk stBuf;
+	stBuf.CreateL ( aSearchTarget, allocator );
+	TCleanupItem item1 ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &stBuf );
+	CleanupStack::PushL ( item1 );
+
+	RMemChunk usnBuf;
+	usnBuf.CreateL ( aUsn, allocator );
+	
+	TSsdpInfo ssdpInfo ( aMaxAge,
+						locationBuf,
+						usnBuf,
+						stBuf,
+						remoteUnicastAddr );
+	
+	TUpnpMessage::TUPnPSearchResponse msg ( ssdpInfo );
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().UdpClientFlow (), msg );
+	
+	CleanupStack::Pop ( ); // item
+	CleanupStack::Pop ( ); // item1
+	}
+
+
+DEFINE_SMELEMENT ( TProcessDataClientStop, NetStateMachine::MStateTransition, TContext )
+void TProcessDataClientStop::DoL ( )
+	{
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	if ( publishInfo && iContext.Node ( ).RootDevicePublished ( ) )
+		{
+		// for upnp:rootdevice::uuid:device-UUID
+		SendByeRequestL ( publishInfo->SearchTarget ( ), iContext.Node ( ).RootDeviceUsn ( ) );
+			
+		// for uuid:device-UUID
+		SendByeRequestL ( publishInfo->Uuid ( ), publishInfo->Uuid ( ) );
+		
+		// for uuid:device-UUID::urn:domain-name-device:deviceType:v
+		SendByeRequestL ( iContext.Node ( ).RootDeviceUrn ( ), publishInfo->Usn ( ) );
+		
+		iContext.Node ( ).SetRootDevicePublished ( EFalse );		
+		}
+
+	// StopDataClients
+	iContext.Node().PostToClients<TDefaultClientMatchPolicy> ( TNodeCtxId ( iContext.ActivityId (), iContext.NodeId () ),
+									TCFDataClient::TStop ( KErrNone ).CRef (), TClientType ( TCFClientType::EData, TCFClientType::EStarted ) );
+	iContext.iNodeActivity->SetPostedTo( TNodeId::NullId ( ) );
+	
+	return;
+	}
+
+void TProcessDataClientStop::SendByeRequestL ( const TDesC8& aSearchTarget, const TDesC8& aUsn )
+	{
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	RMemChunk stBuf;
+	stBuf.CreateL ( aSearchTarget, allocator );
+	TCleanupItem item ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &stBuf );
+	CleanupStack::PushL ( item );
+
+	RMemChunk usnBuf;
+	usnBuf.CreateL ( aUsn, allocator );
+	
+	TSsdpInfo ssdpInfo ( usnBuf, stBuf );
+	TUpnpMessage::TUPnPPublishByeRequest msg ( ssdpInfo );
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().UdpClientFlow (), msg );
+	
+	CleanupStack::Pop ( ); // item
+	}
+	
+DEFINE_SMELEMENT ( TLeaveRequest, NetStateMachine::MStateTransition, TContext )
+void TLeaveRequest::DoL ( )
+	{
+	TUint ccCount = iContext.Node ().CountClients<TDefaultClientMatchPolicy> ( TClientType ( TCFClientType::ECtrl ) );
+		
+	// -- If control client goes zero and the node is not having any pending activities
+	// then process the data client stop,  
+	// mark the default SCPR node for deletion and close it.
+	if ( ccCount == 0 )
+		{
+		iContext.Node ( ).SetClosing ( );		
+		}
+	}
+	
+DEFINE_SMELEMENT ( TNoTagOrDataClientIdle, NetStateMachine::MStateFork, TContext )
+TInt TNoTagOrDataClientIdle::TransitionTag ( )
+	{
+	return iContext.Node ( ).IsClosing ( ) ? CoreNetStates::KDataClientIdle : MeshMachine::KNoTag;
+	}	
+
+
+DEFINE_SMELEMENT ( TRequestOrIgnoreTag, NetStateMachine::MStateFork, TContext )
+TInt TRequestOrIgnoreTag::TransitionTag ( )
+	{
+	if ( iContext.Node ( ).IsClosing ( ) )
+		{
+		return CoreStates::KIgnore;
+		}
+	
+	TUpnpMessage::TUPnPRequestInfo& requestInfoMsg = message_cast<TUpnpMessage::TUPnPRequestInfo> ( iContext.iMessage );	
+	CTransaction* transaction = static_cast<CTransaction*> ( requestInfoMsg.iPtr );	
+	const RStringF& header =  transaction->Request( )->Handle( ).Method ( );
+
+	__ASSERT_DEBUG ( header == transaction->Request( )->StringPool ( ).StringF ( HTTP::EGET, THTTPTable::Table() ), User::Invariant () );
+	
+	const TDesC8& uriPath =  transaction->Request()->URI()->Uri().Extract ( EUriPath);
+	_LIT8 ( KRootPath, "/" );
+	if ( uriPath.Compare ( KRootPath ) == 0 )
+		{
+		return UPnPStateMachine::KDescribeRequest;
+		}
+	else
+		{
+		return UPnPStateMachine::KIconRequest;
+		}
+	}
+
+
+DEFINE_SMELEMENT ( TNoTagOrIgnoreTag, NetStateMachine::MStateFork, TContext )
+TInt TNoTagOrIgnoreTag::TransitionTag ( )
+	{
+	return iContext.Node ( ).IsClosing ( ) ? CoreStates::KIgnore : MeshMachine::KNoTag;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicescpr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,433 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <comms-infras/ss_msgintercept.h>
+#include <comms-infras/ss_log.h>
+#include <comms-infras/ss_logext.h>
+#include <inetprottextutils.h>
+#include <rmemchunk.h>
+
+#include "upnpservicescpr.h"
+#include "upnpservicescpractivities.h"
+#include "upnpsubconnevents.h"
+#include "upnpstatemachine.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+#include "upnpcpr.h"
+
+__FLOG_STMT(_LIT8(KComponent,"UPnPSPScpr");)
+
+
+using namespace ESock;
+
+
+CUPnPServiceSubConnectionProvider* CUPnPServiceSubConnectionProvider::NewL ( ESock::CSubConnectionProviderFactoryBase& aFactory )
+	{
+	CUPnPServiceSubConnectionProvider* provider = new ( ELeave ) CUPnPServiceSubConnectionProvider ( aFactory, UPnPServiceSCprActivities::activityMap::Self ( ) );
+	CleanupStack::PushL ( provider );
+	provider->ConstructL( );
+	CleanupStack::Pop ( provider );
+	return provider;
+	}
+
+CUPnPServiceSubConnectionProvider::~CUPnPServiceSubConnectionProvider ( )
+	{
+	iDescUrl.Close ( );
+	iControlUrl.Close ( );
+	iEventUrl.Close ( );	
+	iResponseBundle.Close ();
+		
+	delete iSubscribeInfoCont;		
+	delete iPublishInfo;				
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("Destroyed CUPnPServiceSubConnectionProvider")));	
+	LOG_NODE_DESTROY ( KSubsysSPScpr, CUPnPServiceSubConnectionProvider );
+	}
+
+CUPnPServiceSubConnectionProvider::CUPnPServiceSubConnectionProvider ( ESock::CSubConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap )
+	: CUPnPSubConnectionProvider ( aFactory, aActivityMap ), iDevice ( EFalse ), iClosing ( EFalse )
+	{
+	LOG_NODE_CREATE ( KSubsysSPScpr, CUPnPServiceSubConnectionProvider );
+	}
+
+void CUPnPServiceSubConnectionProvider::ConstructL ( )
+	{
+	CCoreSubConnectionProvider::ConstructL ( );	
+	iResponseBundle.CreateL ();	
+	iResponseBundle.Open ();
+	
+	iRequestBundle.CreateL ();	
+
+	iSubscribeInfoCont = CUPnPSubscribeInfoContainer::NewL ( );
+	// set intial event data
+	iSubscribeInfoCont->SetEventDataL ( KNullDesC8 ( ) );
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("Created CUPnPServiceSubConnectionProvider")));
+	}
+
+void CUPnPServiceSubConnectionProvider::SetPublishInfo ( CUPnPPublishInfoElement* aPublishInfo )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::SetPublishInfo")));
+	iPublishInfo = aPublishInfo;	
+	}
+
+CUPnPPublishInfoElement* CUPnPServiceSubConnectionProvider::PublishInfo ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::PublishInfo")));
+	return iPublishInfo;
+	}
+
+void CUPnPServiceSubConnectionProvider::SetKeyL ( const TDesC8& aKey )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::SetKeyL")));
+	iDescUrl.Close ( );
+	CreatePropertyUrlL ( aKey, iDescUrl );
+	}
+	
+const TDesC8& CUPnPServiceSubConnectionProvider::Key ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::Key")));
+	return iDescUrl;
+	}
+
+void CUPnPServiceSubConnectionProvider::SetEventUrlL ( const TDesC8& aEventUrl )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::SetEventUrlL")));
+	iEventUrl.Close ( );
+	CreatePropertyUrlL ( aEventUrl, iEventUrl );
+	}
+	
+const TDesC8& CUPnPServiceSubConnectionProvider::EventUrl ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::EventUrl")));
+	return iEventUrl;
+	}
+
+void CUPnPServiceSubConnectionProvider::SetControlUrlL ( const TDesC8& aControlUrl )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::SetControlUrlL")));
+	iControlUrl.Close ( );
+	CreatePropertyUrlL ( aControlUrl, iControlUrl );
+	}
+
+void CUPnPServiceSubConnectionProvider::CreatePropertyUrlL ( const TDesC8& aRelativeUrl, RBuf8& aTargetUrl )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::CreatePropertyUrlL")));
+	const TDesC8& rootLoc = ConnectionProvider ().RootDeviceLocation ();
+	
+	aTargetUrl.CreateMaxL ( rootLoc.Length ( ) + aRelativeUrl.Length ( ) );
+	aTargetUrl.Copy ( rootLoc );
+	aTargetUrl.Append ( aRelativeUrl );	
+	}
+const TDesC8& CUPnPServiceSubConnectionProvider::ControlUrl ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::ControlUrl")));
+	return iControlUrl;
+	}
+
+void CUPnPServiceSubConnectionProvider::SetDevice ( const TBool aIsDevice )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::SetDevice")));
+	iDevice = aIsDevice;
+	}
+
+TBool CUPnPServiceSubConnectionProvider::IsDevice ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::IsDevice")));
+	return iDevice;
+	}
+
+const TDesC8& CUPnPServiceSubConnectionProvider::SCPDData ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::SCPDData")));
+	return iPublishInfo->ServiceDescription( );	
+	}
+	
+CUPnPSubscribeInfoContainer* CUPnPServiceSubConnectionProvider::GetSubscribeInfoContainer ( )
+	{
+	return iSubscribeInfoCont;
+	}
+
+CUPnPServiceConnectionProvider& CUPnPServiceSubConnectionProvider::ConnectionProvider ( )
+	{
+	CUPnPConnectionProvider& cprBase = BaseConnectionProvider();
+	return static_cast<CUPnPServiceConnectionProvider&>(cprBase);
+	}	
+
+void CUPnPServiceSubConnectionProvider::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	ESOCK_DEBUG_MESSAGE_INTERCEPT ( aSender, aMessage, aRecipient );	
+	TNodeContext<CUPnPServiceSubConnectionProvider> ctx(*this, aMessage, aSender, aRecipient);	
+    CCoreSubConnectionProvider::ReceivedL ( aSender, aRecipient, aMessage );
+    User::LeaveIfError ( ctx.iReturn );
+	}
+
+void CUPnPServiceSubConnectionProvider::InitiateActivitiesL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateActivitiesL")));
+	
+	RParameterFamily paramFamily = iRequestBundle.GetFamilyAtIndex (0);
+	switch ( paramFamily.Id( ) )
+		{
+		case EUPnPClearParamSet:
+			LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateActivitiesL - TUPnPParamSetFamily::EUPnPClearParamSet")));
+			ClearResponseParamL ( );
+			break;
+			
+		case EUPnPServiceNotificationParamSet:
+			LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateActivitiesL - TUPnPParamSetFamily::EUPnPServiceNotificationParamSet")));
+			SendNotifyToRemoteClientsL ( paramFamily );
+			break;
+		
+		case EUPnPServiceRegisterParamSet:
+		case EUPnPServiceRefreshParamSet:
+		case EUPnPDeviceRegisterParamSetExt:
+			InitiateRequestL ( paramFamily );
+			break;
+			
+		default:
+			break;
+		}
+	//finally delete UPnP Clear Family
+	iRequestBundle.DeleteFamilyAtIndex (0);		
+	}
+
+	
+void CUPnPServiceSubConnectionProvider::InitiateRequestL ( RParameterFamily& aReqFamily )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateRequestL")));
+	switch ( aReqFamily.Id ( ) )
+		{		
+		case EUPnPServiceRegisterParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPServiceRegisterParamSet")));
+			LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPServiceRegisterParamSet - Posting message TUpnpMessage::TServiceRegistration")));
+			CSubConExtensionParameterSet* paramSet = static_cast<CSubConExtensionParameterSet*> ( aReqFamily.GetParameterSetAtIndex ( 0, RParameterFamily::ERequested ) );
+			TUpnpMessage::TServiceRegistration msg ( paramSet );
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( TUpnpMessage::EActivityServiceRegistration, NodeId () ) , msg );			
+			aReqFamily.ClearParameterSetPointer( 0, RParameterFamily::ERequested );			
+			}
+		break;
+		
+		case EUPnPDeviceRegisterParamSetExt:
+			{		
+			LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPDeviceRegisterParamSet")));
+			LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPDeviceRegisterParamSet - Posting message TUpnpMessage::TDeviceRegistration")));
+			CUPnPDeviceRegisterParamSetExt* paramSet = static_cast<CUPnPDeviceRegisterParamSetExt*> ( aReqFamily.GetParameterSetAtIndex ( 0, RParameterFamily::ERequested ) );
+			
+			CUPnPDeviceRegisterParamSet* deviceParams = CopyWithIconInfoL ( paramSet );
+			
+			TUpnpMessage::TDeviceRegistration msg ( deviceParams );
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( TUpnpMessage::EActivityDeviceRegistration, NodeId () ) , msg );
+			}
+		break;
+		
+		case EUPnPServiceRefreshParamSet:
+			{
+			LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::InitiateRequestL - TUPnPParamSetFamily::EUPnPServiceRefreshParamSet")));
+			if ( IsDevice ( ) )
+				{
+				// Publish once for uuid:device-UUID
+				DoPublishL ( iPublishInfo->Uuid( ), iPublishInfo->Uuid( ), iPublishInfo->CacheControl( ) );
+				}
+				
+			// Publish once for uuid:device-UUID::urn:domain-name-device:deviceType:v
+			// (or) Publish once for uuid:device-UUID::urn:domain-name-service:serviceType:v
+			DoPublishL ( iPublishInfo->SearchTarget( ), iPublishInfo->Usn( ), iPublishInfo->CacheControl( ) );					
+			}
+		break;
+		
+		default:
+		break;
+		}
+	}
+	
+void CUPnPServiceSubConnectionProvider::DoPublishL ( const TDesC8& aSearchTarget, const TDesC8& aUsn, TInt aMaxAge )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::DoPublishL")));
+	RMemoryAllocator allocator = ConnectionProvider().MemoryAllocator();
+	
+	RMemChunk locationBuf;
+	locationBuf.CreateL ( ConnectionProvider ().RootDeviceLocation (), allocator );
+	
+	RMemChunk stBuf;
+	stBuf.CreateL ( aSearchTarget, allocator );
+	TCleanupItem item ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &stBuf );
+	CleanupStack::PushL ( item );
+
+	RMemChunk usnBuf;
+	usnBuf.CreateL ( aUsn, allocator );
+	
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::DoPublishL - Posting message TUpnpMessage::TUPnPPublishAliveRequest")));
+	TSsdpInfo ssdpInfo ( aMaxAge, locationBuf, usnBuf, stBuf);
+	RClientInterface::OpenPostMessageClose ( NodeId (), UdpClientFlow (), TUpnpMessage::TUPnPPublishAliveRequest ( ssdpInfo ).CRef () );
+	CleanupStack::Pop ( ); // item
+	}
+
+
+// this will send notification to the clients
+void  CUPnPServiceSubConnectionProvider::SendNotifyToRemoteClientsL ( RParameterFamily& aReqFamily ) 
+	{	
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::SendNotifyToRemoteClientsL")));
+	CUPnPServiceNotificationParamSet* paramSet = static_cast<CUPnPServiceNotificationParamSet* > (aReqFamily.GetParameterSetAtIndex ( 0, RParameterFamily::ERequested ) );
+	__ASSERT_DEBUG ( paramSet != NULL, User::Invariant ( ) );
+	
+	// replace the existing data
+	iSubscribeInfoCont->SetEventDataL( paramSet->Notification( ) );
+	// now send it to all the subscribers
+	for ( TInt i =0; i < iSubscribeInfoCont->CountOfSubscribeInfoElementArray( ); i++ )
+		{
+		CUPnPSubscribeInfoElement* element = iSubscribeInfoCont->AtSubscribeInfoElementArray( i );
+		TInt eventKey = element->EventKey( );
+		eventKey++;
+		if(eventKey == 0)
+			{
+			eventKey++; //wrap around
+			}
+		element->SetEventKey(eventKey);
+		LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::SendNotifyToRemoteClientsL - Posting message TUpnpMessage::TNotifyRequest")));
+		// send the message to start the activty
+		RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( TUpnpMessage::EActivityNotifyRequest, NodeId () ), TUpnpMessage::TNotifyRequest ( element ).CRef () );
+		}	
+	}
+
+void CUPnPServiceSubConnectionProvider::NotifySubConnectionL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::NotifySubConnectionL")));
+	CUPnPSubConnEvent* subConnEvent = CUPnPSubConnEvent::NewL ( );
+	
+	TCleanupItem item ( &CUPnPSubConnEvent::CleanupSubConnEvent, subConnEvent );
+	CleanupStack::PushL ( item );
+	
+	subConnEvent->SetFamily ( EUPnPPublishResponseParamSet );
+	NotifyClientsL ( *subConnEvent );
+	CleanupStack::Pop ( ); // item
+	}
+
+void CUPnPServiceSubConnectionProvider::ClearResponseParamL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::ClearResponseParamL")));		
+	iResponseBundle.Close ();	// DEF126893 fix pending
+	}
+
+void CUPnPServiceSubConnectionProvider::AddResponseParamSetL ( TUPnPEvent aEvent )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::AddResponseParamSetL")));
+	if ( !IsClosing ( ) )
+		{
+		RParameterFamily responseFamily = iResponseBundle.CreateFamilyL ( EUPnPPublishResponseParamSet );
+		RParameterFamily family;
+		CUPnPPublishResponseParamSet* responseSet = CUPnPPublishResponseParamSet::NewL ( family );
+		responseFamily.AddParameterSetL ( responseSet, RParameterFamily::ERequested );
+		
+		if ( iPublishInfo )
+			responseSet->SetUriL( iPublishInfo->SearchTarget( ) );
+		responseSet->SetUPnPEvent( aEvent );
+		
+		NotifySubConnectionL ( );
+		}
+	}
+	
+
+void CUPnPServiceSubConnectionProvider::DeprecateExpiredSubscriptions ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScpr, KComponent, _L8("CUPnPServiceSubConnectionProvider::DeprecateExpiredSubscriptions")));
+	TInt duration;			
+	TUint count = iSubscribeInfoCont->CountOfSubscribeInfoElementArray( );
+	CUPnPSubscribeInfoElement* element = NULL;
+	
+	for ( TInt i = 0; i < count; i++ )
+		{
+		element = iSubscribeInfoCont->AtSubscribeInfoElementArray( i );
+		duration = element->SubscriptionDuration( );
+		if ( --duration == 0 )
+			{
+			// timer has expired so delete this entry
+			iSubscribeInfoCont->DeleteSubscribeInfoElement( element );
+			}
+		else
+			{
+			element->SetSubscriptionDuration( duration );
+			}
+		}		
+	}
+
+CUPnPDeviceRegisterParamSet* CUPnPServiceSubConnectionProvider::CopyWithIconInfoL ( CUPnPDeviceRegisterParamSetExt* aDeviceParam )
+	{
+	RParameterFamily family;
+	CUPnPDeviceRegisterParamSet* newParamSet = CUPnPDeviceRegisterParamSet::NewL ( family );
+	newParamSet->SetUriL ( aDeviceParam->Uri () );
+	newParamSet->SetCacheControlData ( aDeviceParam->CacheControlData () );
+	newParamSet->SetParentDeviceUidL ( aDeviceParam->ParentDeviceUid () );
+	newParamSet->SetFriendlyNameL ( aDeviceParam->FriendlyName () );
+	newParamSet->SetManufacturerL ( aDeviceParam->Manufacturer () );
+	newParamSet->SetManufactureUrlL ( aDeviceParam->ManufacturerUrl () );
+ 	newParamSet->SetModelDescL ( aDeviceParam->ModelDesc () );
+	newParamSet->SetModelNameL ( aDeviceParam->ModelName () );
+ 	newParamSet->SetModelNumberL ( aDeviceParam->ModelNumber () );
+ 	newParamSet->SetModelUriL ( aDeviceParam->ModelUri () );
+ 	newParamSet->SetPresentationL ( aDeviceParam->PresentationUri () );
+ 	newParamSet->SetSerialNumberL ( aDeviceParam->SerialNumber () );
+ 	newParamSet->SetUDNL ( aDeviceParam->UDN () );
+	newParamSet->SetUPCL ( aDeviceParam->UPC () );
+		
+	LoadIconListL ( aDeviceParam->IconData (), newParamSet );	
+	
+	return newParamSet;
+	}
+	
+void CUPnPServiceSubConnectionProvider::LoadIconListL ( const TDesC8& aIconData, CUPnPDeviceRegisterParamSet* aDeviceParamSet )
+	{
+	TPtrC8 buffer ( aIconData );	
+	TInt count = 0;	
+	ReadTInt ( buffer, count );
+	
+	TInt size = 0;
+	for ( TInt i = 0; i < count; i++ )
+		{
+		CUPnPIconParams* icon = CUPnPIconParams::NewL ();
+		CleanupStack::PushL ( icon );
+		
+		ReadTInt ( buffer, size );		
+		icon->SetMimeTypeL ( buffer.Left ( size ) );
+		buffer.Set ( buffer.Ptr () + size, buffer.Length () - size ); //update pointer
+		
+		ReadTInt ( buffer, size );		
+		icon->SetUrlL ( buffer.Left ( size ) );
+		buffer.Set ( buffer.Ptr () + size, buffer.Length () - size ); //update pointer
+				
+		ReadTInt ( buffer, size );		
+		icon->SetWidth ( size );
+		
+		ReadTInt ( buffer, size );		
+		icon->SetHeight ( size );
+		
+		ReadTInt ( buffer, size );		
+		icon->SetDepth ( size );
+		
+		aDeviceParamSet->SetIconInfoL ( icon );
+		CleanupStack::Pop (); // icon
+		}
+	}
+	
+void CUPnPServiceSubConnectionProvider::ReadTInt ( TPtrC8& aBuffer, TInt& aValue )
+	{	
+	TUint32 len = sizeof ( TUint32 );
+	TPtrC8 ptr ( aBuffer.Ptr (), len );
+	InetProtTextUtils::ConvertDescriptorToInt ( ptr, aValue );
+	aBuffer.Set ( aBuffer.Ptr () + len, aBuffer.Length () - len ); //update pointer
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicescpractivities.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1090 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+//System Includes
+#include <comms-infras/ss_coreprstates.h>
+#include <comms-infras/ss_corepractivities.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <ss_glob.h>
+#include <httpstringconstants.h>
+#include <http/thttptable.h>
+#include <upnp/tupnptable.h>
+#include <inetprottextutils.h>
+#include "upnpdescriptionschema.h"
+#include <httperr.h>
+#include <rmemchunk.h>
+
+//Local Includes
+#include "upnpservicescpractivities.h"
+#include "upnpservicescprstates.h"
+#include "upnpctrlscprstates.h"
+#include "upnpstatemachine.h"
+#include "upnpuuid.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+
+using namespace UPnPServiceSCprActivities;
+using namespace ESock;
+using namespace MeshMachine;
+using namespace CoreNetStates;
+using namespace CoreStates;
+using namespace CorePanics;
+using namespace PRActivities;
+using namespace CoreActivities;
+using namespace UPnPStateMachine;
+using namespace UPnPServiceSCprStates;
+
+__FLOG_STMT(_LIT8(KComponent,"UPnPSPScpr");)
+const TUint KHttpDefaultPort = 80;
+
+namespace UPnPServiceSCprParamRequestActivity
+{
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityParamRequest, UPnPServiceSCprParamRequest, TCFScpr::TSetParamsRequest )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingSetParamRequest, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceSCprStates::TStoreParamsAndSendResponse )
+NODEACTIVITY_END ( )
+#else
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityParamRequest, UPnPServiceSCprParamRequest, TCFScpr::TParamsRequest )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingSetParamRequest, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceSCprStates::TStoreParamsAndSendResponse )
+NODEACTIVITY_END ( )
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+}
+
+namespace UPnPServiceSCprApplyRequestActivity
+{
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityApplyChanges, UPnPServiceSCprApplyRequest, TCFScpr::TApplyRequest )
+	FIRST_NODEACTIVITY_ENTRY ( PRStates::TAwaitingApplyRequest, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceSCprStates::TInitiateActivities, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TSendApplyResponse )
+NODEACTIVITY_END ( )
+#else
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityApplyChanges, UPnPServiceSCprApplyRequest, TCFScpr::TApplyRequest )
+	FIRST_NODEACTIVITY_ENTRY ( SCprStates::TAwaitingApplyRequest, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceSCprStates::TInitiateActivities, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, SCprStates::TSendApplyResponse )
+NODEACTIVITY_END ( )
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+}
+
+//Activity to create UPnP Server Flow for RSocket used in UPnP Control Phase
+namespace UPnPServiceSCprBinderRequestActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( ECFActivityBinderRequest, UPnPServiceSCprBinderRequest, TCFServiceProvider::TCommsBinderRequest, CCommsBinderActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CoreNetStates::TAwaitingBinderRequest, CCommsBinderActivity::TNoTagOrUseExistingBlockedByBinderRequest )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TCreateServerFlow<EControl>, CoreNetStates::TAwaitingDataClientJoin, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CCommsBinderActivity::TProcessDataClientCreation, TNoTag )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TSendDataClientStart, CoreNetStates::TAwaitingDataClientStarted, TTag<KUseExisting> )
+	NODEACTIVITY_ENTRY ( CoreStates::KUseExisting, CCommsBinderActivity::TSendBinderResponse, CCommsBinderActivity::TAwaitingBindToComplete, TNoTagOrErrorTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TDoNothing )
+	
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TClearError )
+NODEACTIVITY_END ( )
+}
+
+// Note! Handle DataClientIdle from UPnP Flow created for RSocket used in UPnP CONTROL Phase
+namespace UPnPServiceSCprDataClientIdleActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityDataClientIdle, UPnPServiceSCprDataClientIdle, TCFControlProvider::TIdle )
+    NODEACTIVITY_ENTRY ( KNoTag, UPnPStateMachine::THandleControlChannelDataClientIdle, CoreNetStates::TAwaitingDataClientIdle, TNoTag )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPServiceSCprClientLeaveActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityClientLeave, UPnPServiceSCprClientLeave, TNodeSignal::TNullMessageId ) //May be waiting for both messages
+	FIRST_NODEACTIVITY_ENTRY ( CoreStates::TAwaitingClientLeave, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceSCprStates::TProcessClientLeave, TTag<KDataClientIdle> )
+	LAST_NODEACTIVITY_ENTRY ( KDataClientIdle, TSendDataClientIdleOrUnregister )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPServiceSCprDataClientStopActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( ECFActivityStopDataClient, UPnPServiceSCprDataClientStop, TCFDataClient::TStop  )
+	FIRST_NODEACTIVITY_ENTRY ( CoreNetStates::TAwaitingDataClientStop, CoreNetStates::TNoTagOrDataClientsToStop )
+	
+	NODEACTIVITY_ENTRY ( CoreNetStates::KDataClientsToStop, UPnPServiceSCprStates::TProcessDataClientStop, CoreNetStates::TAwaitingDataClientsStopped, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, TDoNothing, CoreNetStates::TNoTagOrUnbindOnStop )
+	
+	NODEACTIVITY_ENTRY ( CoreNetStates::KUnbind, CoreNetStates::TSendClientLeavingRequestToServiceProvider, CoreStates::TAwaitingLeaveComplete, TNoTag )
+	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, UPnPStateMachine::TDestroyDataClients, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TSendDataClientStopped )
+NODEACTIVITY_END ( )
+}
+
+namespace UPnPServiceSCprDestroyActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( ECFActivityDestroy, UPnPServiceSCprDestroy, TEChild::TDestroy, CoreActivities::CDestroyActivity::New )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingDestroy, UPnPStateMachine::TBlockedByAllActivitiesStopped )
+	
+	//Stop self first
+    NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TStopSelf, CoreNetStates::TAwaitingDataClientStopped, TNoTag )
+	
+    LAST_NODEACTIVITY_ENTRY ( KNoTag, CoreNetStates::TSendClientLeavingAndRemoveControlProvider )
+NODEACTIVITY_END()
+}
+
+
+namespace UPnPServiceScprServiceRegistrationActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityServiceRegistration, UPnPServiceSCprServiceRegistration, TUpnpMessage::TServiceRegistration, CUpnpServiceRegistrationActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUpnpServiceRegistrationActivity::TAwaitingServiceRegistration, TNoTag )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, CUpnpServiceRegistrationActivity::TRequestServiceJoin, TAwaitingServiceValidated, TErrorTagOr<TTag<KNoTag> > )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CUpnpServiceRegistrationActivity::TBuildPublishAndServiceInfo, TNoTag )	
+	NODEACTIVITY_ENTRY ( KNoTag, CUpnpServiceRegistrationActivity::TRegisterServiceInfoWithCPR, TAwaitingServiceRegisteredFromCpr, TErrorTagOr<TTag<KNoTag> > )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TFindOrCreateUdpClientFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, UPnPServiceSCprStates::TStoreUdpClientAndSendRequest )
+	NODEACTIVITY_ENTRY ( KSendRequest, TSendDataClientStart, CoreNetStates::TAwaitingDataClientStarted, TNoTag )	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CUpnpServiceRegistrationActivity::TSendPublishRequest, TNoTag )
+	// sendpublish request should be written as utility
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TFindOrCreateUdpServerFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, UPnPServiceSCprStates::TStoreUdpServer )
+	NODEACTIVITY_ENTRY ( KNoTag, TSendDataClientStart, CoreNetStates::TAwaitingDataClientStarted, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CUpnpServiceRegistrationActivity::TRegisterSsdpInfoWithServer, TNoTag )
+	
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CUpnpServiceRegistrationActivity::TInitiateTcpFlowCreation )	
+	// makes use of activity.Error ( ) && activity destruction clears error
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TSendPublishResponseToClient ) 
+NODEACTIVITY_END ( )
+}
+
+namespace UPnPServiceScprDeviceRegistrationActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityDeviceRegistration, UPnPServiceSCprDeviceRegistration, TUpnpMessage::TDeviceRegistration, CUpnpDeviceRegistrationActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUpnpDeviceRegistrationActivity::TAwaitingDeviceRegistration, TNoTag )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, CUpnpDeviceRegistrationActivity::TRequestDeviceJoin, TAwaitingServiceValidated, TErrorTagOr<TTag<KNoTag> > )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CUpnpDeviceRegistrationActivity::TBuildPublishAndDeviceInfo, TNoTag )		
+	NODEACTIVITY_ENTRY ( KNoTag, CUpnpDeviceRegistrationActivity::TRegisterDeviceInfoWithCPR, TAwaitingServiceRegisteredFromCpr, TErrorTagOr<TTag<KNoTag> > )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TFindOrCreateUdpClientFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, UPnPServiceSCprStates::TStoreUdpClientAndSendRequest )
+	NODEACTIVITY_ENTRY ( KSendRequest, TSendDataClientStart, CoreNetStates::TAwaitingDataClientStarted, TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CUpnpDeviceRegistrationActivity::TSendPublishRequest, TNoTag )
+	// sendpublish request should be written as utility
+	
+	NODEACTIVITY_ENTRY ( KNoTag, TFindOrCreateUdpServerFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )	
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, UPnPServiceSCprStates::TStoreUdpServer )
+	NODEACTIVITY_ENTRY ( KNoTag, TSendDataClientStart, CoreNetStates::TAwaitingDataClientStarted,  TNoTag )
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, CUpnpDeviceRegistrationActivity::TRegisterSsdpInfoWithServer, CUpnpDeviceRegistrationActivity::TIconCreateOrNoTag )
+	
+	NODEACTIVITY_ENTRY ( KCreateIconTag, CUpnpDeviceRegistrationActivity::TCreateIconFlow, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KIconCreatedTag> > )
+	NODEACTIVITY_ENTRY ( KIconCreatedTag, TProcessServerFlowCreation, CoreNetStates::TAwaitingDataClientStarted, CUpnpDeviceRegistrationActivity::TIconOrNoTag )
+	
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TSendPublishResponseToClient )
+	// activity destruction clears error
+	LAST_NODEACTIVITY_ENTRY ( KErrorTag, TSendPublishResponseToClient )
+	// no TCP flows for embedded device scpr
+NODEACTIVITY_END ( )
+}
+
+namespace UPnPServiceSCprFlowCreationActivity
+{
+DECLARE_DEFINE_NODEACTIVITY ( TUpnpMessage::EActivityCreateServerFlow, UPnPServiceSCprFlowCreation, TUpnpMessage::TCreateServerFlow )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingServerFlowRequest, TNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, TCreateServerFlow<EDescription>, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	NODEACTIVITY_ENTRY ( KNoTag, TProcessServerFlowCreation, CoreNetStates::TAwaitingDataClientStarted, TNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, TCreateServerFlow<ESubscription>, CoreNetStates::TAwaitingDataClientJoin, TErrorTagOr<TTag<KNoTag> > )
+	NODEACTIVITY_ENTRY ( KNoTag, TProcessServerFlowCreation, CoreNetStates::TAwaitingDataClientStarted, TNoTag )
+	
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TSendPublishResponseToClient )
+	THROUGH_NODEACTIVITY_ENTRY ( KErrorTag, TSendPublishResponseToClient, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TClearError )
+NODEACTIVITY_END ( )
+}
+
+namespace UPnPSerivceSearchResponseActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivitySearchResponse, UPnPServiceSearchResponse, TUpnpMessage::TUPnPSearchRequest, CNodeParallelActivityBase::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( UPnPStateMachine::TAwaitingSearchRequest, UPnPServiceSCprStates::TNoTagOrIgnoreTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, UPnPServiceSCprStates::TValidateAndSendResponse )
+	LAST_NODEACTIVITY_ENTRY ( CoreStates::KIgnore, UPnPStateMachine::TDiscardSearchRequestData )
+NODEACTIVITY_END ( )
+}
+
+namespace UpnpServiceRequestInfoActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityRequestInfo, UpnpServiceRequestInfo, TUpnpMessage::TUPnPRequestInfo, CUpnpSPRequestInfoActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( TAwaitingUpnpRequestInfo, UPnPStateMachine::TRequestOrIgnoreTag )
+	
+	LAST_NODEACTIVITY_ENTRY ( UPnPStateMachine::KDescribeRequest, CUpnpSPRequestInfoActivity::TSendDescribeResponse )
+	LAST_NODEACTIVITY_ENTRY ( UPnPStateMachine::KSubscribeRequest, CUpnpSPRequestInfoActivity::TSendSubscribeResponse )
+	LAST_NODEACTIVITY_ENTRY ( UPnPStateMachine::KUnsubscribeRequest, CUpnpSPRequestInfoActivity::TSendUnsubscribeResponse )
+	
+	LAST_NODEACTIVITY_ENTRY ( CoreStates::KIgnore, UPnPStateMachine::TSendIgnoreResponse )																 
+NODEACTIVITY_END ( )
+}
+
+
+namespace UpnpServiceClientFlowCreationActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityFindOrCreateFlow, FindOrCreateFlow, TUpnpMessage::TCreateNotifyFlow, CNotifyFlowFinder::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CNotifyFlowFinder::TAwaitingFlowCreationRequest, TNoTag )
+	
+	NODEACTIVITY_ENTRY ( KNoTag, CNotifyFlowFinder::TFindOrCreateFlow, CoreNetStates::TAwaitingDataClientJoin,  TNoTag ) 
+	THROUGH_NODEACTIVITY_ENTRY ( KNoTag, PRStates::TProcessDataClientCreation, TNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, TSendDataClientStart, CoreNetStates::TAwaitingDataClientStarted, TNoTag )
+	
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, CNotifyFlowFinder::TProcessDataClient )
+NODEACTIVITY_END ( )
+}
+
+namespace UpnpEventNotificationActivity
+{
+DECLARE_DEFINE_CUSTOM_NODEACTIVITY ( TUpnpMessage::EActivityNotifyRequest, UpnpEventNotification, TUpnpMessage::TNotifyRequest, CUpnpEventNotificationActivity::NewL )
+	FIRST_NODEACTIVITY_ENTRY ( CUpnpEventNotificationActivity::TAwaitingNotifyRequest, TNoTag )
+	NODEACTIVITY_ENTRY ( KNoTag, CUpnpEventNotificationActivity::TSendRequest, CUpnpEventNotificationActivity::TAwaitingErrorOrResponse, TNoTag )
+	LAST_NODEACTIVITY_ENTRY ( KNoTag, TClearError )
+NODEACTIVITY_END ( )
+}
+
+
+namespace UPnPServiceSCprActivities
+{
+DEFINE_ACTIVITY_MAP ( activityMap )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceSCprParamRequestActivity, UPnPServiceSCprParamRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceSCprApplyRequestActivity, UPnPServiceSCprApplyRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceSCprBinderRequestActivity, UPnPServiceSCprBinderRequest )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceSCprDataClientIdleActivity, UPnPServiceSCprDataClientIdle )	
+	ACTIVITY_MAP_ENTRY ( UPnPServiceSCprClientLeaveActivity, UPnPServiceSCprClientLeave )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceSCprDataClientStopActivity, UPnPServiceSCprDataClientStop ) 
+	ACTIVITY_MAP_ENTRY ( UPnPServiceSCprDestroyActivity, UPnPServiceSCprDestroy )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceScprServiceRegistrationActivity, UPnPServiceSCprServiceRegistration )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceScprDeviceRegistrationActivity, UPnPServiceSCprDeviceRegistration )
+	ACTIVITY_MAP_ENTRY ( UPnPServiceSCprFlowCreationActivity, UPnPServiceSCprFlowCreation )
+	ACTIVITY_MAP_ENTRY ( UPnPSerivceSearchResponseActivity, UPnPServiceSearchResponse )
+	ACTIVITY_MAP_ENTRY ( UpnpServiceRequestInfoActivity, UpnpServiceRequestInfo )
+	ACTIVITY_MAP_ENTRY ( UpnpServiceClientFlowCreationActivity, FindOrCreateFlow )
+	ACTIVITY_MAP_ENTRY ( UpnpEventNotificationActivity, UpnpEventNotification )
+ACTIVITY_MAP_END_BASE ( SCprActivities, coreSCprActivities )
+}
+
+
+//-------------------------Service Registration Activity-------------------------------------
+CNodeActivityBase* CUpnpServiceRegistrationActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	return new ( ELeave ) CUpnpServiceRegistrationActivity ( aActivitySig, aNode ) ;
+	}
+
+
+CUpnpServiceRegistrationActivity::CUpnpServiceRegistrationActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode  )
+	: CNodeActivityBase ( aActivitySig, aNode )
+	{	  	
+	}
+
+CUpnpServiceRegistrationActivity::~CUpnpServiceRegistrationActivity ( )
+	{
+	SetError ( KErrNone	);
+	delete iParamSet;
+	}
+	
+DEFINE_SMELEMENT ( CUpnpServiceRegistrationActivity::TRequestServiceJoin, NetStateMachine::MStateTransition, CUpnpServiceRegistrationActivity::TContext )
+void CUpnpServiceRegistrationActivity::TRequestServiceJoin::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPSrvcRegActivity, KComponent, _L8("CUpnpServiceRegistrationActivity::TRequestServiceJoin::DoL")));
+	TUpnpMessage::TServiceRegistration& msg = message_cast<TUpnpMessage::TServiceRegistration>( iContext.iMessage );
+	
+	CUpnpServiceRegistrationActivity& activity = static_cast<CUpnpServiceRegistrationActivity&> ( *iContext.iNodeActivity );
+	activity.iParamSet = static_cast<CUPnPServiceRegisterParamSet*> ( msg.iParamSet );
+	
+	LOG(ESockLogExternal::Printf(KSubsysSPSrvcRegActivity, KComponent, _L8("CUpnpServiceRegistrationActivity::TRequestServiceJoin::DoL - Posting message TUpnpMessage::TServiceJoinRequest")));	
+	activity.PostRequestTo ( iContext.Node ().ControlProvider ()->RecipientId (), TUpnpMessage::TServiceJoinRequest ( activity.iParamSet ).CRef () );
+	}
+	
+DEFINE_SMELEMENT ( CUpnpServiceRegistrationActivity::TBuildPublishAndServiceInfo, NetStateMachine::MStateTransition, CUpnpServiceRegistrationActivity::TContext )
+void CUpnpServiceRegistrationActivity::TBuildPublishAndServiceInfo::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPSrvcRegActivity, KComponent, _L8("CUpnpServiceRegistrationActivity::TBuildPublishAndServiceInfo::DoL")));
+	CUpnpServiceRegistrationActivity& activity = static_cast<CUpnpServiceRegistrationActivity&> ( *iContext.iNodeActivity );
+	
+	CStringPoolManager& stringPoolMgr = iContext.Node ().ConnectionProvider ().StringPoolManager ();
+	RStringPool& sp = stringPoolMgr.StringPool ( );
+
+	CUPnPPublishInfoElement* publishInfo = CUPnPPublishInfoElement::NewL ( );
+	CleanupStack::PushL ( publishInfo );
+	
+	publishInfo->SetUuidL( activity.iParamSet->DeviceUid( ) );
+	publishInfo->SetSearchTargetL( activity.iParamSet->Uri( ) ) ;
+	publishInfo->SetServiceDescriptionL( activity.iParamSet->ServiceDescription( ) );
+	publishInfo->SetCacheControlL( activity.iParamSet->CacheControlData( ) ) ;
+	publishInfo->SetTimeOut( activity.iParamSet->SubscriptionDuration() );
+	
+	const CUPnPSubscribeInfoContainer* subContainer = iContext.Node ( ).GetSubscribeInfoContainer ( );
+	subContainer->SetEventDataL( activity.iParamSet->InitialMessage( ) );
+	
+	//Set USN
+	RBuf8 resultUrl;
+	TInt length = activity.iParamSet->DeviceUid( ).Length ( )
+					+ activity.iParamSet->Uri( ).Length ( )
+					+ KSeperator ( ).Length ( );
+	resultUrl.CreateL ( length );
+	CleanupClosePushL ( resultUrl );
+	resultUrl.Copy ( activity.iParamSet->DeviceUid( ) );
+	resultUrl.Append ( KSeperator );
+	resultUrl.Append ( activity.iParamSet->Uri( ) );
+	publishInfo->SetUsnL( resultUrl );
+	CleanupStack::PopAndDestroy ( &resultUrl );
+	
+	activity.iServiceInfo = CUPnPServiceInfo::NewL ( );
+	activity.iServiceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EServiceType, stringPoolMgr.GetUPnPTable() ), activity.iParamSet->Uri( ) );
+	
+	// construct  serviceid
+	RBuf8 serviceId;
+	activity.GenerateServiceIdL ( stringPoolMgr, activity.iParamSet->Uri( ), serviceId );	
+	CleanupClosePushL ( serviceId );
+	activity.iServiceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EServiceId, stringPoolMgr.GetUPnPTable() ), serviceId );
+	
+	
+	// SCPD Url
+	activity.CreateRelativeUrlL ( serviceId,
+					 sp.String ( UPNPDESCRIPTIONXMLTAGS::EScpdUrl, stringPoolMgr.GetUPnPTable()).DesC ( ),
+					 resultUrl );
+	CleanupClosePushL ( resultUrl );
+	activity.iServiceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EScpdUrl, stringPoolMgr.GetUPnPTable ( ) ), resultUrl );	
+	//Note! result url is a relative url that starts with '/', avoid this in scpr properties, bare url will take care
+	TPtr8 urlPtr = resultUrl.MidTPtr ( 1 );
+	publishInfo->SetKeyL( urlPtr );
+	iContext.Node ( ).SetKeyL ( urlPtr );	
+	
+	CleanupStack::PopAndDestroy ( &resultUrl );
+	
+	// ControlUrl
+	activity.CreateRelativeUrlL ( serviceId,
+					sp.String ( UPNPDESCRIPTIONXMLTAGS::EContorlUrl, stringPoolMgr.GetUPnPTable() ).DesC ( ),
+					resultUrl );
+	CleanupClosePushL ( resultUrl );	
+	activity.iServiceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EContorlUrl, stringPoolMgr.GetUPnPTable() ), resultUrl );	
+	urlPtr.Set ( resultUrl.MidTPtr ( 1 ) );
+	iContext.Node ( ).SetControlUrlL ( urlPtr );	
+	CleanupStack::PopAndDestroy ( &resultUrl );
+		
+	// EventSubUrl
+	activity.CreateRelativeUrlL ( serviceId,
+						sp.String ( UPNPDESCRIPTIONXMLTAGS::EEventSubUrl, stringPoolMgr.GetUPnPTable() ).DesC ( ),
+						resultUrl );
+	CleanupClosePushL ( resultUrl );	
+	activity.iServiceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EEventSubUrl, stringPoolMgr.GetUPnPTable() ), resultUrl );	
+	urlPtr.Set ( resultUrl.MidTPtr ( 1 ) );
+	iContext.Node ( ).SetEventUrlL ( urlPtr );
+	CleanupStack::PopAndDestroy ( &resultUrl );
+	
+	
+	CleanupStack::PopAndDestroy ( &serviceId );	
+	CleanupStack::Pop ( publishInfo );
+	
+	iContext.Node ( ).SetPublishInfo ( publishInfo );
+	}
+
+void CUpnpServiceRegistrationActivity::GenerateServiceIdL ( CStringPoolManager& aStringPoolMgr, const TDesC8& aUri, RBuf8& aServiceId )
+	{
+	TLex8 parser ( aUri );
+	TChar ch = ':';
+	parser.Mark ( );
+	while ( !parser.Eos ( ) && parser.Peek ( ) != ch )
+		parser.Inc ( );
+	
+	parser.Inc ( );
+	while ( !parser.Eos ( ) && parser.Peek ( ) != ch )
+		parser.Inc ( );
+	
+	TPtrC8 schemaType = parser.MarkedToken ( );
+	
+	if ( schemaType.Compare ( KUrnSchema ( ) ) == 0 )
+		{
+		// Standard Upnp devices
+		aServiceId.CreateL ( KUrnService );
+		}
+	else
+		{
+		RStringPool& sp = aStringPoolMgr.StringPool ( );
+			
+		// Vendor specific devices
+		aServiceId.CreateL ( schemaType );
+		aServiceId.ReAllocL ( aServiceId.Length ( )
+							 + sp.String ( UPNPDESCRIPTIONXMLTAGS::EServiceId, aStringPoolMgr.GetUPnPTable() ).DesC ( ).Length ( )
+							 + KColon ( ).Length ( ) * 2 );
+		
+		aServiceId.Append ( KColon ( ) );
+		aServiceId.Append ( sp.String ( UPNPDESCRIPTIONXMLTAGS::EServiceId, aStringPoolMgr.GetUPnPTable() ).DesC ( ) );
+		aServiceId.Append ( KColon ( ) );
+		}
+	
+	parser.Inc ( );
+	
+	while ( !parser.Eos ( ) && parser.Peek ( ) != ch )
+		parser.Inc ( );
+
+	parser.Inc ( );
+	parser.Mark ( );
+
+	while ( !parser.Eos ( ) && parser.Peek ( ) != ch )
+		parser.Inc ( );
+	
+	TPtrC8 serviceType = parser.MarkedToken ( );
+    
+    RBuf8 uniqueId;
+	UpnpUuid::GenerateUuidL ( uniqueId );
+	CleanupClosePushL ( uniqueId );
+	
+    aServiceId.ReAllocL ( aServiceId.Length ( ) + serviceType.Length ( ) + uniqueId.Length ( ) );
+    aServiceId.Append ( serviceType );
+    aServiceId.Append ( uniqueId );
+    
+    CleanupStack::PopAndDestroy ( &uniqueId );
+	}
+	
+	
+
+void CUpnpServiceRegistrationActivity::CreateRelativeUrlL ( const TDesC8& aServiceId, const TDesC8& aUri, RBuf8& aResultUrl )
+	{	
+	_LIT8 ( KForwardSlash, "/" );
+	RBuf8 tempUrl;	
+	TInt length = KForwardSlash ().Length () + aServiceId.Length ( )
+			 + KUnderScore ( ).Length ( )
+			 + aUri.Length ( );	
+	
+	tempUrl.CreateL ( length );
+	tempUrl.Copy ( KForwardSlash );
+	tempUrl.Append ( aServiceId );
+	tempUrl.Append ( KUnderScore );
+	tempUrl.Append ( aUri );
+	aResultUrl.Assign ( tempUrl );
+	}
+
+	
+DEFINE_SMELEMENT ( CUpnpServiceRegistrationActivity::TRegisterServiceInfoWithCPR, NetStateMachine::MStateTransition, CUpnpServiceRegistrationActivity::TContext )
+void CUpnpServiceRegistrationActivity::TRegisterServiceInfoWithCPR::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPSrvcRegActivity, KComponent, _L8("CUpnpServiceRegistrationActivity::TRegisterServiceInfoWithCPR::DoL")));
+	CUpnpServiceRegistrationActivity& activity = static_cast<CUpnpServiceRegistrationActivity&> ( *iContext.iNodeActivity );
+	activity.PostRequestTo ( iContext.Node ().ControlProvider ()->RecipientId (), TUpnpMessage::TRegisterService ( activity.iParamSet, activity.iServiceInfo ).CRef () );
+	}
+
+DEFINE_SMELEMENT ( CUpnpServiceRegistrationActivity::TSendPublishRequest, NetStateMachine::MStateTransition, CUpnpServiceRegistrationActivity::TContext )
+void CUpnpServiceRegistrationActivity::TSendPublishRequest::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPSrvcRegActivity, KComponent, _L8("CUpnpServiceRegistrationActivity::TSendPublishRequest::DoL")));
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	// Publish once for uuid:device-UUID::urn:domain-name-service:serviceType:v
+	iContext.Node ( ).DoPublishL ( publishInfo->SearchTarget ( ), publishInfo->Usn ( ), publishInfo->CacheControl ( ) );
+	}
+	
+
+DEFINE_SMELEMENT ( CUpnpServiceRegistrationActivity::TRegisterSsdpInfoWithServer, NetStateMachine::MStateTransition, CUpnpServiceRegistrationActivity::TContext )
+void CUpnpServiceRegistrationActivity::TRegisterSsdpInfoWithServer::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPSrvcRegActivity, KComponent, _L8("CUpnpServiceRegistrationActivity::TRegisterSsdpInfoWithServer::DoL")));
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	RMemChunk stBuf;
+	stBuf.CreateL ( publishInfo->SearchTarget ( ), iContext.Node ( ).ConnectionProvider().MemoryAllocator() );	
+	
+	LOG(ESockLogExternal::Printf(KSubsysSPSrvcRegActivity, KComponent, _L8("CUpnpServiceRegistrationActivity::TInitiateTcpFlowCreation::DoL - Posting message TUpnpMessage::TUPnPPublishRegistration")));	
+	TSsdpInfo ssdpInfo ( stBuf );
+	RClientInterface::OpenPostMessageClose ( TNodeCtxId ( MeshMachine::KActivityNull, iContext.NodeId () ), iContext.Node ().UdpServerFlow (), TUpnpMessage::TUPnPPublishRegistration ( ssdpInfo ).CRef () );
+	}
+	
+	
+DEFINE_SMELEMENT ( CUpnpServiceRegistrationActivity::TInitiateTcpFlowCreation, NetStateMachine::MStateTransition, CUpnpServiceRegistrationActivity::TContext )
+void CUpnpServiceRegistrationActivity::TInitiateTcpFlowCreation::DoL ( )
+	{
+	// kickoff self activity to create tcp server flows
+	LOG(ESockLogExternal::Printf(KSubsysSPSrvcRegActivity, KComponent, _L8("CUpnpServiceRegistrationActivity::TInitiateTcpFlowCreation::DoL - Posting message TUpnpMessage::TCreateServerFlow")));		
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.NodeId (), TUpnpMessage::TCreateServerFlow ().CRef () );
+	}
+
+
+//-------------------------Embedded Device Session Registration Activity-------------------------------------
+CNodeActivityBase* CUpnpDeviceRegistrationActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	return new ( ELeave ) CUpnpDeviceRegistrationActivity ( aActivitySig, aNode ) ;
+	}
+
+
+CUpnpDeviceRegistrationActivity::CUpnpDeviceRegistrationActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode  )
+	: CNodeActivityBase ( aActivitySig, aNode ), iIconUrlIdx ( 0 )
+	{	  	
+	}
+
+CUpnpDeviceRegistrationActivity::~CUpnpDeviceRegistrationActivity ( )
+	{
+	SetError ( KErrNone	);
+	delete iParamSet;
+	iIconUrl.Close ();
+	}
+	
+DEFINE_SMELEMENT ( CUpnpDeviceRegistrationActivity::TRequestDeviceJoin, NetStateMachine::MStateTransition, CUpnpDeviceRegistrationActivity::TContext )
+void CUpnpDeviceRegistrationActivity::TRequestDeviceJoin::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPDeviceRegActivity, KComponent, _L8("CUpnpDeviceRegistrationActivity::TRequestDeviceJoin::DoL")));
+	TUpnpMessage::TDeviceRegistration& msg = message_cast<TUpnpMessage::TDeviceRegistration>( iContext.iMessage );
+	
+	CUpnpDeviceRegistrationActivity& activity = static_cast<CUpnpDeviceRegistrationActivity&> ( *iContext.iNodeActivity );
+	activity.iParamSet = static_cast<CUPnPDeviceRegisterParamSet*> ( msg.iParamSet );
+	
+	LOG(ESockLogExternal::Printf(KSubsysSPDeviceRegActivity, KComponent, _L8("CUpnpDeviceRegistrationActivity::TRequestDeviceJoin::DoL - Posting message TUpnpMessage::TDeviceJoinRequest")));	
+	activity.PostRequestTo ( iContext.Node ().ControlProvider ()->RecipientId (), TUpnpMessage::TDeviceJoinRequest ( activity.iParamSet ).CRef () );
+	}
+	
+DEFINE_SMELEMENT ( CUpnpDeviceRegistrationActivity::TBuildPublishAndDeviceInfo, NetStateMachine::MStateTransition, CUpnpDeviceRegistrationActivity::TContext )
+void CUpnpDeviceRegistrationActivity::TBuildPublishAndDeviceInfo::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPDeviceRegActivity, KComponent, _L8("CUpnpDeviceRegistrationActivity::TBuildPublishAndDeviceInfo::DoL")));
+	CUpnpDeviceRegistrationActivity& activity = static_cast<CUpnpDeviceRegistrationActivity&> ( *iContext.iNodeActivity );
+	
+	CUPnPPublishInfoElement* publishInfo = CUPnPPublishInfoElement::NewL ( );
+	CleanupStack::PushL ( publishInfo );
+	
+	publishInfo->SetUuidL( activity.iParamSet->UDN( ) );
+	publishInfo->SetSearchTargetL( activity.iParamSet->Uri( ) ) ;
+	publishInfo->SetCacheControlL( activity.iParamSet->CacheControlData( ) ) ;	
+	// for an embedded device both key and UDN are same, so...it can key can be used
+	// for deregistering embedded device.
+	publishInfo->SetKeyL( activity.iParamSet->UDN( ) );
+	
+	//Set USN
+	RBuf8 tempUrl;
+	TInt length = activity.iParamSet->UDN( ).Length ( ) 
+				+ activity.iParamSet->Uri( ).Length ( )
+				+ KSeperator ( ).Length ( );
+				
+	tempUrl.CreateMaxL ( length );
+	CleanupClosePushL ( tempUrl );
+	
+	tempUrl.Copy ( activity.iParamSet->UDN( ) );		
+	tempUrl.Append ( KSeperator );
+	tempUrl.Append ( activity.iParamSet->Uri( ) );
+	publishInfo->SetUsnL( tempUrl );
+	
+	activity.iDeviceInfo = CUPnPDevice::NewL ( );
+	
+	CStringPoolManager& stringPoolMgr = iContext.Node ().ConnectionProvider ().StringPoolManager ();
+	RStringPool& sp = stringPoolMgr.StringPool ( );
+
+	// set device info		
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EPresentationUrl, stringPoolMgr.GetUPnPTable() ), activity.iParamSet->PresentationUri( ) );
+	// set the device attributes
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EDeviceType, stringPoolMgr.GetUPnPTable() ), activity.iParamSet->Uri( ) );
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EFriendlyName, stringPoolMgr.GetUPnPTable() ),activity.iParamSet->FriendlyName( ) );
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUdn,stringPoolMgr.GetUPnPTable()), activity.iParamSet->UDN( ) );
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUpc, stringPoolMgr.GetUPnPTable()), activity.iParamSet->UPC( ) );
+	
+	// set manufacturer attributes
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EManufacturer, stringPoolMgr.GetUPnPTable() ), activity.iParamSet->Manufacturer( ) );
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EManufacturerUrl, stringPoolMgr.GetUPnPTable() ), activity.iParamSet->ManufacturerUrl( ) );
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::ESerialNumber, stringPoolMgr.GetUPnPTable() ), activity.iParamSet->SerialNumber( ) );
+
+	// set device model attributes
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EModelName, stringPoolMgr.GetUPnPTable() ), activity.iParamSet->ModelName( ) );
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EModelDescription,stringPoolMgr.GetUPnPTable() ), activity.iParamSet->ModelDesc( ) );
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EModelNumber, stringPoolMgr.GetUPnPTable()), activity.iParamSet->ModelNumber( ) );
+	activity.iDeviceInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EModel,stringPoolMgr.GetUPnPTable() ), activity.iParamSet->ModelUri( ) );
+
+	for (TInt i = 0; i <  activity.iParamSet->IconList ().Count (); i++ )
+		{
+		CUPnPIconParams* iconParams = activity.iParamSet->IconList ()[i];
+		CUPnPIconInfo* iconInfo = CUPnPIconInfo::NewL ();
+		CleanupStack::PushL ( iconInfo );
+		iconInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EMimeType, stringPoolMgr.GetUPnPTable() ), iconParams->MimeType () );
+		iconInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EWidth,stringPoolMgr.GetUPnPTable() ), iconParams->Width () );
+		iconInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EHeight, stringPoolMgr.GetUPnPTable()), iconParams->Height () );
+		iconInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EDepth,stringPoolMgr.GetUPnPTable() ), iconParams->Depth () );
+		iconInfo->SetPropertyL( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUrl,stringPoolMgr.GetUPnPTable() ), iconParams->Url () );
+		
+		activity.iDeviceInfo->AppendToIconInfoTableL ( iconInfo );
+		CleanupStack::Pop ( iconInfo );
+		}
+		
+	CleanupStack::PopAndDestroy ( &tempUrl );
+	CleanupStack::Pop ( publishInfo );
+	
+	iContext.Node ( ).SetPublishInfo ( publishInfo );
+	iContext.Node ( ). SetDevice ( ETrue );
+	}
+	
+DEFINE_SMELEMENT ( CUpnpDeviceRegistrationActivity::TRegisterDeviceInfoWithCPR, NetStateMachine::MStateTransition, CUpnpDeviceRegistrationActivity::TContext )
+void CUpnpDeviceRegistrationActivity::TRegisterDeviceInfoWithCPR::DoL ( )
+	{
+	CUpnpDeviceRegistrationActivity& activity = static_cast<CUpnpDeviceRegistrationActivity&> ( *iContext.iNodeActivity );		
+	LOG(ESockLogExternal::Printf(KSubsysSPDeviceRegActivity, KComponent, _L8("CUpnpDeviceRegistrationActivity::TRegisterDeviceInfoWithCPR::DoL - Posting message TUpnpMessage::TRegisterDevice")));	
+	activity.PostRequestTo ( iContext.Node ().ControlProvider ()->RecipientId (), TUpnpMessage::TRegisterDevice ( activity.iParamSet, activity.iDeviceInfo ).CRef () );	
+	}
+
+DEFINE_SMELEMENT ( CUpnpDeviceRegistrationActivity::TSendPublishRequest, NetStateMachine::MStateTransition, CUpnpDeviceRegistrationActivity::TContext )
+void CUpnpDeviceRegistrationActivity::TSendPublishRequest::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPDeviceRegActivity, KComponent, _L8("CUpnpDeviceRegistrationActivity::TSendPublishRequest::DoL")));
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );		
+		
+	// Publish once for uuid:device-UUID
+	iContext.Node ( ).DoPublishL ( publishInfo->Uuid ( ), publishInfo->Uuid ( ), publishInfo->CacheControl ( ) );
+	
+	// Publish once for uuid:device-UUID::urn:domain-name-device:deviceType:v
+	iContext.Node ( ).DoPublishL ( publishInfo->SearchTarget ( ), publishInfo->Usn ( ), publishInfo->CacheControl ( ) );
+	}
+
+DEFINE_SMELEMENT ( CUpnpDeviceRegistrationActivity::TRegisterSsdpInfoWithServer, NetStateMachine::MStateTransition, CUpnpDeviceRegistrationActivity::TContext )
+void CUpnpDeviceRegistrationActivity::TRegisterSsdpInfoWithServer::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPDeviceRegActivity, KComponent, _L8("CUpnpDeviceRegistrationActivity::TRegisterSsdpInfoWithServer::DoL")));
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	// Register once for uuid:device-UUID
+	RegisterForMSearchL ( publishInfo->Uuid ( ) );
+	
+	// Register once for uuid:device-UUID::urn:domain-name-device:deviceType:v
+	RegisterForMSearchL ( publishInfo->SearchTarget ( ) );
+	}
+
+void CUpnpDeviceRegistrationActivity::TRegisterSsdpInfoWithServer::RegisterForMSearchL ( const TDesC8& aSearchTarget )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPDeviceRegActivity, KComponent, _L8("CUpnpDeviceRegistrationActivity::TRegisterSsdpInfoWithServer::DoL")));
+	RMemChunk stBuf;
+	stBuf.CreateL ( aSearchTarget, iContext.Node ( ).ConnectionProvider().MemoryAllocator() );
+	
+	LOG(ESockLogExternal::Printf(KSubsysSPDeviceRegActivity, KComponent, _L8("CUpnpDeviceRegistrationActivity::TRegisterSsdpInfoWithServer::DoL - Posting message TUpnpMessage::TUPnPPublishRegistration")));		
+	TSsdpInfo ssdpInfo ( stBuf );
+	RClientInterface::OpenPostMessageClose ( TNodeCtxId ( MeshMachine::KActivityNull, iContext.NodeId () ), iContext.Node ().UdpServerFlow () , TUpnpMessage::TUPnPPublishRegistration ( ssdpInfo ).CRef () );
+	}	
+
+DEFINE_SMELEMENT ( CUpnpDeviceRegistrationActivity::TCreateIconFlow, NetStateMachine::MStateTransition, CUpnpDeviceRegistrationActivity::TContext )
+void CUpnpDeviceRegistrationActivity::TCreateIconFlow::DoL ()
+	{
+	CUpnpDeviceRegistrationActivity& activity = static_cast<CUpnpDeviceRegistrationActivity&> ( *iContext.iNodeActivity );		
+	activity.iIconUrl.Close ();
+	
+	const TDesC8& rootLoc = iContext.Node ().ConnectionProvider ().RootDeviceLocation ();
+	const TDesC8& url = activity.iParamSet->IconList()[activity.iIconUrlIdx]->Url ();
+	if ( url[0] == TChar ('/') )
+		{
+		activity.iIconUrl.CreateL ( rootLoc.Length () + ( url.Length () - 1 ) );
+		activity.iIconUrl.Copy ( rootLoc );
+		activity.iIconUrl.Append ( url.Mid (1) );
+		}
+	else
+		{
+		activity.iIconUrl.CreateL ( rootLoc.Length () + url.Length () );
+		activity.iIconUrl.Copy ( rootLoc );
+		activity.iIconUrl.Append ( url );
+		}
+	
+	const TUint8* uriPtr = activity.iIconUrl.Ptr ();
+	TUint size = activity.iIconUrl.Size ();
+	const TUid requestedUid = { CUPnPFlowFactory::iUid };
+	THttpServerFlowQuery flowQuery ( uriPtr,
+									 size,
+									 iContext.NodeId (),
+									 EHttpServerFlow );
+	
+	ESock::TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery );
+	
+	TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+	Messages::TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+	activity.PostRequestTo( factoryContainer, msg );
+	}
+
+DEFINE_SMELEMENT ( CUpnpDeviceRegistrationActivity::TIconCreateOrNoTag, NetStateMachine::MStateFork, CUpnpDeviceRegistrationActivity::TContext )
+TInt CUpnpDeviceRegistrationActivity::TIconCreateOrNoTag::TransitionTag ()
+	{
+	CUpnpDeviceRegistrationActivity& activity = static_cast<CUpnpDeviceRegistrationActivity&> ( *iContext.iNodeActivity );	
+	return activity.iParamSet->IconList ().Count () != 0 ? KCreateIconTag : KNoTag;
+	}
+
+DEFINE_SMELEMENT ( CUpnpDeviceRegistrationActivity::TIconOrNoTag, NetStateMachine::MStateFork, CUpnpDeviceRegistrationActivity::TContext )
+TInt CUpnpDeviceRegistrationActivity::TIconOrNoTag::TransitionTag ()
+	{
+	CUpnpDeviceRegistrationActivity& activity = static_cast<CUpnpDeviceRegistrationActivity&> ( *iContext.iNodeActivity );
+	
+	activity.iIconUrlIdx++;
+	if ( activity.iParamSet->IconList ().Count () != activity.iIconUrlIdx )
+		{
+		return NetStateMachine::EBackward | KCreateIconTag;
+		}
+	
+	return NetStateMachine::EForward | KNoTag;
+	}	
+
+// -------------- Request Info Activity--------------------------------------------------
+
+CNodeActivityBase* CUpnpSPRequestInfoActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	return ( new ( ELeave ) CUpnpSPRequestInfoActivity ( aActivitySig, aNode ) );
+	}
+
+CUpnpSPRequestInfoActivity::~CUpnpSPRequestInfoActivity ( )
+	{
+	SetError ( KErrNone	);
+	}	
+
+// Transitions
+DEFINE_SMELEMENT ( CUpnpSPRequestInfoActivity::TSendDescribeResponse, NetStateMachine::MStateTransition, CUpnpSPRequestInfoActivity::TContext )
+void CUpnpSPRequestInfoActivity::TSendDescribeResponse::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPServiceReqInfoActivity, KComponent, _L8("CUpnpSPRequestInfoActivity::TSendDescribeResponse::DoL")));
+	
+	TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( iContext.iMessage );
+	CTransaction* transaction = static_cast<CTransaction*> ( requestMsg.iPtr );
+	TInt statusCode;
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	if ( transaction->Request()->URI()->Uri().UriDes().Compare ( iContext.Node ().Key () ) == 0 )
+		{
+		RMemChunk dataChian;
+		dataChian.CreateL( iContext.Node ( ).SCPDData ( ), allocator );
+		transaction->AddBodyPart( dataChian );
+		statusCode = HTTPStatus::EOk;
+		}
+	else
+		{
+		CUPnPUtils::FindAndSendIconDataL ( transaction, statusCode, allocator );
+		}
+	
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender,
+									TUpnpMessage::TUPnPResponseInfo ( transaction, statusCode, NULL ).CRef () );
+	}
+
+
+DEFINE_SMELEMENT ( CUpnpSPRequestInfoActivity::TSendSubscribeResponse, NetStateMachine::MStateTransition, CUpnpSPRequestInfoActivity::TContext )
+void CUpnpSPRequestInfoActivity::TSendSubscribeResponse::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPServiceReqInfoActivity, KComponent, _L8("CUpnpSPRequestInfoActivity::TSendSubscribeResponse::DoL")));
+	CUpnpSPRequestInfoActivity& activity = static_cast< CUpnpSPRequestInfoActivity& > ( *iContext.iNodeActivity );
+	
+	TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( iContext.iMessage );
+	CTransaction* transaction = static_cast<CTransaction*> ( requestMsg.iPtr );
+		
+	TInt statusCode;
+	TSubsribeResponseInfo subscribeResponse;
+	
+	THTTPHdrVal fieldVal;
+	CUPnPPublishInfoElement* publishInfo = iContext.Node().PublishInfo();
+	if ( KErrNotFound == activity.GetHeaderValue ( *transaction->Request( ), UPnP::ESID, fieldVal, TUPnPTable::Table() ) )
+		{
+		statusCode = activity.HandleSubscribeRequestL ( *transaction->Request( ), subscribeResponse, *publishInfo );
+		
+		if ( statusCode == HTTPStatus::EOk && IsFirstSubscription ( ) )
+			{
+			// trigger CPR to start subscription timer			
+			RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().ControlProvider ()->RecipientId (),
+													TUpnpMessage::TStartTimer ().CRef () );
+			}
+		}
+	else
+		{
+		statusCode = activity.HandleResubscribeRequestL ( *transaction->Request( ), subscribeResponse, *publishInfo );
+		}
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender,
+											TUpnpMessage::TUPnPResponseInfo ( transaction, statusCode, &subscribeResponse ).CRef () );
+	}
+
+TInt CUpnpSPRequestInfoActivity::HandleSubscribeRequestL (  CRequest& aRequest, TSubsribeResponseInfo& aSubscribeResponse, CUPnPPublishInfoElement& aPublishInfo )
+	{
+	TInt statusCode = HTTPStatus::EOk;
+	// Note! as of now there is no limitation on subscribers or else send 5xx status code
+	// Note! duration is accepted what ever the client is requesting
+	
+	THTTPHdrVal timeOutField;
+	TInt err = GetHeaderValue ( aRequest, UPnP::ETimeout, timeOutField, TUPnPTable::Table() );  	
+	TInt timeout = aPublishInfo.TimeOut();
+	
+	// If the SUBSCRIBE request doesn't have the Timeout header,
+	// assume the standard DLNA specified value of 300 seconds.
+	if(err != KErrNotFound)
+		{
+		if(timeOutField.Int() < aPublishInfo.TimeOut())
+			timeout = timeOutField.Int ( );			
+		}
+	
+	THTTPHdrVal callbackField;
+	err = GetHeaderValue ( aRequest, UPnP::ECallback, callbackField, TUPnPTable::Table() );
+	__ASSERT_DEBUG ( err != KErrNotFound, User::Invariant ( ) );
+	const TDesC8& callBackUrl = callbackField.StrF ( ).DesC ( );
+	
+	// construct the subscribeinfoelement	
+	CUPnPSubscribeInfoElement* newSubscription = CUPnPSubscribeInfoElement::NewL ( );
+	newSubscription->SetEventKey ( 0 ); // initial value
+		
+	newSubscription->SetSubscriptionDuration ( timeout );
+	
+	RBuf8 uuid;
+	CleanupClosePushL ( uuid );
+	UpnpUuid::GenerateUuidL ( uuid );
+	newSubscription->SetSubscriptionIdentifierL ( uuid );
+	
+	// extract and cache callback urls
+	ProcessCallBackUrlL ( callBackUrl, newSubscription );
+	
+	// append element in subscription container list	
+	CUPnPServiceSubConnectionProvider& subConn = static_cast<CUPnPServiceSubConnectionProvider&> ( iNode );
+	const CUPnPSubscribeInfoContainer* container = subConn.GetSubscribeInfoContainer ( );
+	container->AppendSubscribeInfoElementL( newSubscription );
+	
+	// construct the response;
+	aSubscribeResponse.iTimeout = timeout;
+	aSubscribeResponse.iSid.CreateL ( uuid, subConn.ConnectionProvider().MemoryAllocator() );
+	CleanupStack::PopAndDestroy ( &uuid );
+	
+	// send a message find or create a flow.
+	// NOTE: This will also send the intial notify message and add it into the container.	
+	RClientInterface::OpenPostMessageClose ( iNode.Id(), iNode.Id (),
+											TUpnpMessage::TCreateNotifyFlow ( newSubscription ).CRef () );			
+	return statusCode;
+	}
+	
+	
+void CUpnpSPRequestInfoActivity::ProcessCallBackUrlL ( const TDesC8& aUrl, CUPnPSubscribeInfoElement* aSubscribeElement )
+	{
+	// extract the ip address and flow and add it to the info element
+	aSubscribeElement->SetCallBackUrlL( aUrl );
+	
+	TUriParser8 parsedUri;
+	parsedUri.Parse ( aUrl );
+	
+	TInt ip = 0;
+	InetProtTextUtils::ConvertDescriptorToInt ( parsedUri.Extract ( EUriHost ), ip );
+	
+	TInt port = KHttpDefaultPort;
+	if ( parsedUri.IsPresent ( EUriPort ) )
+		{
+		InetProtTextUtils::ConvertDescriptorToInt ( parsedUri.Extract ( EUriPort ), port );
+		}
+	
+	TAppProtAddr addr ( ip, port );
+	aSubscribeElement->SetRemoteAddr ( addr );
+	}
+	
+
+TBool CUpnpSPRequestInfoActivity::TSendSubscribeResponse::IsFirstSubscription ( )
+	{
+	const CUPnPSubscribeInfoContainer* container = iContext.Node ( ).GetSubscribeInfoContainer ( );
+	return container->CountOfSubscribeInfoElementArray( ) == 1 ? ETrue : EFalse;
+	}
+	
+	
+TInt CUpnpSPRequestInfoActivity::HandleResubscribeRequestL (  CRequest& aRequest, TSubsribeResponseInfo& aSubscribeResponse, CUPnPPublishInfoElement& aPublishInfo )
+	{
+	CUPnPServiceSubConnectionProvider& provider = static_cast<CUPnPServiceSubConnectionProvider&> ( iNode );
+		
+	// Note! as of now there is no limitation on subscribers or else send 5xx status code
+	// Note! duration is accepted what ever the client is requesting		
+	TInt statusCode = HTTPStatus::EOk;
+	THTTPHdrVal timeOutField;
+	TInt err = GetHeaderValue ( aRequest, UPnP::ETimeout, timeOutField, TUPnPTable::Table() );  	
+	TInt timeout = aPublishInfo.TimeOut();
+	
+	// If the Re-SUBSCRIBE request doesn't have the Timeout header,
+	// assume the standard DLNA specified value of 300 seconds.
+	if(err != KErrNotFound)
+		{
+		if(timeOutField.Int() < aPublishInfo.TimeOut())
+			timeout = timeOutField.Int ( );			
+		}
+	
+	THTTPHdrVal sidField;
+	err = GetHeaderValue ( aRequest, UPnP::ESID, sidField, TUPnPTable::Table() );
+	__ASSERT_DEBUG ( err != KErrNotFound, User::Invariant ( ) );
+		
+	const CUPnPSubscribeInfoContainer* container = provider.GetSubscribeInfoContainer ( );
+	CUPnPSubscribeInfoElement* element = container->GetSubscribeInfoBySid ( sidField.StrF ( ).DesC ( ) );
+		
+	if ( element == NULL )
+		{
+		// susbscription is expired send 412 error condition
+		statusCode = HTTPStatus::EPreconditionFailed;
+		}
+	else
+		{
+		element->SetSubscriptionDuration ( timeout );
+		
+		// construct the response;
+		aSubscribeResponse.iTimeout = timeout;
+		aSubscribeResponse.iSid.CreateL ( element->SubscriptionIdentifier( ), provider.ConnectionProvider().MemoryAllocator() );
+		}
+		
+	return statusCode;	
+	}
+	
+	
+DEFINE_SMELEMENT ( CUpnpSPRequestInfoActivity::TSendUnsubscribeResponse, NetStateMachine::MStateTransition, CUpnpSPRequestInfoActivity::TContext )
+void CUpnpSPRequestInfoActivity::TSendUnsubscribeResponse::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPServiceReqInfoActivity, KComponent, _L8("CUpnpSPRequestInfoActivity::TSendUnsubscribeResponse::DoL")));
+	
+	TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( iContext.iMessage );
+	CTransaction* transaction = static_cast<CTransaction*> ( requestMsg.iPtr );	
+	
+	
+	CUpnpSPRequestInfoActivity& activity = static_cast< CUpnpSPRequestInfoActivity& > ( *iContext.iNodeActivity );
+	THTTPHdrVal sidField;
+	TInt err = activity.GetHeaderValue ( *transaction->Request( ), UPnP::ESID, sidField, TUPnPTable::Table() );
+	__ASSERT_DEBUG ( err != KErrNotFound, User::Invariant ( ) );
+	
+	
+	CUPnPSubscribeInfoContainer* container = iContext.Node ( ).GetSubscribeInfoContainer ( );
+	CUPnPSubscribeInfoElement* element = container->GetSubscribeInfoBySid( sidField.StrF ( ).DesC ( ) );
+	
+	TInt statusCode = HTTPStatus::EOk;
+	if ( element == NULL )
+		{
+		// susbscription is expired send 412 error condition
+		statusCode = HTTPStatus::EPreconditionFailed;
+		}
+	else
+		{
+		container->DeleteSubscribeInfoElement(element);
+		}
+	if ( IsLastSubscription ( ) )
+		{
+		// trigger CPR to stop subscription timer				
+		RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().ControlProvider ()->RecipientId (),
+												TUpnpMessage::TStopTimer ().CRef () );	
+		}			
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender,
+											TUpnpMessage::TUPnPResponseInfo ( transaction, statusCode, NULL ).CRef () );
+	}
+
+
+TBool CUpnpSPRequestInfoActivity::TSendUnsubscribeResponse::IsLastSubscription ( )
+	{
+	const CUPnPSubscribeInfoContainer* container = iContext.Node ( ).GetSubscribeInfoContainer ( );
+	return container->CountOfSubscribeInfoElementArray( ) == 0 ? ETrue : EFalse;
+	}
+
+
+TInt CUpnpSPRequestInfoActivity::GetHeaderValue ( CRequest& aRequest, TInt aFieldIndex, THTTPHdrVal& aFieldVal, const TStringTable& aTable )
+	{	
+	RRequest request = aRequest.Handle ( );
+	RHTTPHeaders headers = request.GetHeaderCollection ( );
+	RStringF fieldStr = aRequest.StringPool ( ).StringF ( aFieldIndex , aTable );
+	return headers.GetField ( fieldStr, 0, aFieldVal );
+	}
+	
+// -----------------------Client Flow Creation---------------------------------------------	
+CNodeActivityBase* CNotifyFlowFinder::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return ( new ( ELeave ) CNotifyFlowFinder ( aActivitySig, aNode, activityId ) );
+	}
+
+
+CNotifyFlowFinder::~CNotifyFlowFinder ( )
+	{
+	SetError( KErrNone );
+	}
+
+
+CNotifyFlowFinder::CNotifyFlowFinder ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivityCount )
+:CNodeParallelActivityBase ( aActivitySig, aNode, aActivityCount )
+	{	
+	}
+
+DEFINE_SMELEMENT ( CNotifyFlowFinder::TFindOrCreateFlow, NetStateMachine::MStateTransition, CNotifyFlowFinder::TContext )
+void CNotifyFlowFinder::TFindOrCreateFlow::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPClntFlowCreationActivity, KComponent, _L8("CNotifyFlowFinder::TFindOrCreateFlow::DoL")));
+	CNotifyFlowFinder& activity = static_cast< CNotifyFlowFinder& > ( *iContext.iNodeActivity );
+	
+	TUpnpMessage::TCreateNotifyFlow& createFlowMsg = message_cast< TUpnpMessage::TCreateNotifyFlow > ( iContext.iMessage );
+	activity.iSubscribeInfo = static_cast< CUPnPSubscribeInfoElement* > ( createFlowMsg.iPtr );
+	
+	TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+	
+	const TUid requestedUid = { CUPnPFlowFactory::iUid };
+	THttpClientFlowQuery flowQuery ( activity.iSubscribeInfo->RemoteAddr( ), iContext.NodeId (), EHttpClientFlow, THttpClientFlowQuery::EUseExisting );
+		
+	activity.PostRequestTo ( factoryContainer, TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+	}
+
+
+DEFINE_SMELEMENT ( CNotifyFlowFinder::TProcessDataClient, NetStateMachine::MStateTransition, CNotifyFlowFinder::TContext )
+void CNotifyFlowFinder::TProcessDataClient::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPClntFlowCreationActivity, KComponent, _L8("CNotifyFlowFinder::TProcessDataClient::DoL")));
+	CNotifyFlowFinder& activity = static_cast< CNotifyFlowFinder& > ( *iContext.iNodeActivity );
+	
+	//TNodeId dataClient = ( message_cast<TCFDataClient::TDataClientStarted> ( iContext.iMessage ) ).iSender;
+	activity.iSubscribeInfo->SetFlowId ( address_cast<TNodeId> ( iContext.iSender ) );
+	
+	if ( !iContext.Node ( ).IsClosing ( ) )
+		{		
+		// send the intial notify message		
+		RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.NodeId (), TUpnpMessage::TNotifyRequest ( activity.iSubscribeInfo ).CRef () );
+		}
+	}
+	
+
+//---------------------Event Notification Activity-------------------------------------
+CNodeActivityBase* CUpnpEventNotificationActivity::NewL ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode )
+	{
+	TUint activityId = GetNextActivityCountL ( aActivitySig, aNode );
+	return ( new ( ELeave ) CUpnpEventNotificationActivity ( aActivitySig, aNode, activityId ) );
+	}
+
+
+CUpnpEventNotificationActivity::CUpnpEventNotificationActivity ( const TNodeActivity& aActivitySig, AMMNodeBase& aNode, TUint aActivitiesCount )
+:CNodeParallelActivityBase ( aActivitySig, aNode, aActivitiesCount )
+	{	  	
+	}
+	
+// Transitions
+DEFINE_SMELEMENT ( CUpnpEventNotificationActivity::TSendRequest, NetStateMachine::MStateTransition, CUpnpEventNotificationActivity::TContext )
+void CUpnpEventNotificationActivity::TSendRequest::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPEventNotifyActivity, KComponent, _L8("CUpnpEventNotificationActivity::TSendRequest::DoL")));
+	CUpnpEventNotificationActivity& activity = static_cast< CUpnpEventNotificationActivity& > ( *iContext.iNodeActivity );
+
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	const CUPnPSubscribeInfoContainer*  cont = iContext.Node ( ).GetSubscribeInfoContainer ( );
+
+	TUpnpMessage::TNotifyRequest& msg = message_cast< TUpnpMessage::TNotifyRequest > ( iContext.iMessage );
+	CUPnPSubscribeInfoElement* subscribeInfo = static_cast< CUPnPSubscribeInfoElement* > ( msg.iPtr );;
+
+	RMemChunk uriBuf;
+	uriBuf.CreateL( subscribeInfo->CallBackUrl( ), allocator );
+	TCleanupItem item ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &uriBuf );
+	CleanupStack::PushL ( item );
+
+	RMemChunk bodyBuf;
+	bodyBuf.CreateL( cont->EventData(), allocator );
+	TCleanupItem item1 ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &bodyBuf );
+	CleanupStack::PushL ( item1 );
+	
+	TEventNotifyRequestInfo notifyRequest;
+	RMemChunk sid;
+	notifyRequest.iSid.CreateL( subscribeInfo->SubscriptionIdentifier(), allocator );
+	notifyRequest.iSeqKey = subscribeInfo->EventKey();
+		
+	activity.PostRequestTo( subscribeInfo->FlowId(), 
+							TUpnpMessage::TUPnPClientRequestInfo ( UPnP::ENotify, uriBuf, bodyBuf, &notifyRequest ).CRef ()	);
+	
+	CleanupStack::Pop ( ); // item
+	CleanupStack::Pop ( ); // item1
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicescprfactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,60 @@
+// 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 <comms-infras/ss_msgintercept.h>
+
+#include "upnpservicescprfactory.h"
+#include "upnpservicescpr.h"
+#include "upnpservicedeftscpr.h"
+
+#if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
+#define KUPnPSCprFactoryTag KESockSubConnectionTag
+#endif
+
+using namespace ESock;
+
+CUPnPServiceSubConnectionProviderFactory* CUPnPServiceSubConnectionProviderFactory::NewL(TAny* aParentContainer)
+	{
+	return new (ELeave) CUPnPServiceSubConnectionProviderFactory(
+		TUid::Uid(CUPnPServiceSubConnectionProviderFactory::iUid), 
+		*reinterpret_cast<CSubConnectionFactoryContainer*>(aParentContainer));
+	}
+	
+CUPnPServiceSubConnectionProviderFactory::CUPnPServiceSubConnectionProviderFactory(TUid aFactoryId, CSubConnectionFactoryContainer& aParentContainer)
+	: CSubConnectionProviderFactoryBase(aFactoryId, aParentContainer)
+    {
+//	LOG_NODE_CREATE(KUPnPSCprFactoryTag, CUPnPServiceSubConnectionProviderFactory);
+    }
+
+ACommsFactoryNodeId* CUPnPServiceSubConnectionProviderFactory::DoCreateObjectL(TFactoryQueryBase& aQuery)
+    {
+    const TDefaultSCPRFactoryQuery& query = static_cast<const TDefaultSCPRFactoryQuery&>(aQuery);
+	CSubConnectionProviderBase* provider = NULL;
+    if (query.iSCPRType == RSubConnection::EAttachToDefault)
+        {
+        provider = CUPnPServiceDefaultSubConnectionProvider::NewL(*this);
+		ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
+        }
+    else if (query.iSCPRType == RSubConnection::ECreateNew)
+        {
+        provider = CUPnPServiceSubConnectionProvider::NewL(*this);
+		ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider);
+        }
+    else
+        {
+        User::Leave(KErrNotSupported);
+        }
+    return provider;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpservicescprstates.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,320 @@
+// 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:
+//
+
+//System Includes
+#include <ss_glob.h>
+#include <inetprottextutils.h>
+#include <rmemchunk.h>
+#include <rmemcell.h>
+
+//Local Includes
+#include "upnpservicescprstates.h"
+#include "upnpstatemachine.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowfactory.h"
+#include "upnpserverconstants.h"
+#include "upnplog.h"
+
+__FLOG_STMT(_LIT8(KComponent,"SPScprSts");)
+
+
+
+using namespace ESock;
+using namespace CorePanics;
+using namespace UPnPServiceSCprStates;
+
+
+//-=========================================================
+//
+//States
+//
+//-=========================================================  	
+DEFINE_SMELEMENT ( TAwaitingServiceValidated, NetStateMachine::MState, TContext )
+TBool TAwaitingServiceValidated::Accept ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TAwaitingServiceValidated::Accept")));
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TServiceValidated> ( ) )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TAwaitingServiceValidated::Accept - Message=TUpnpMessage::TServiceValidated")));
+		TUpnpMessage::TServiceValidated& msg = message_cast<TUpnpMessage::TServiceValidated> ( iContext.iMessage );
+		iContext.iNodeActivity->SetError( msg.iValue );	
+		return ETrue;
+		}
+	return EFalse;
+	}
+	
+DEFINE_SMELEMENT ( TAwaitingServiceRegisteredFromCpr, NetStateMachine::MState, TContext )
+TBool TAwaitingServiceRegisteredFromCpr::Accept ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TAwaitingServiceRegisteredFromCpr::Accept")));
+	if ( iContext.iMessage.IsMessage<TUpnpMessage::TServiceRegistered> ( ) )
+		{
+		LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TAwaitingServiceRegisteredFromCpr::Accept - Message=TUpnpMessage::TServiceRegistered")));
+		TUpnpMessage::TServiceRegistered& msg = message_cast<TUpnpMessage::TServiceRegistered> ( iContext.iMessage );
+		iContext.iNodeActivity->SetError( msg.iValue );		
+		return ETrue;
+		}
+	return EFalse;
+	}
+	
+//-=========================================================
+//
+//Transitions
+//
+//-=========================================================
+
+DEFINE_SMELEMENT ( TStoreRequestParams, NetStateMachine::MStateTransition, TContext )
+void TStoreRequestParams::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TStoreRequestParams::DoL")));	
+
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+	TCFScpr::TSetParamsRequest* setParamsRequest = message_cast<TCFScpr::TSetParamsRequest>( &iContext.iMessage );
+#else
+	TCFScpr::TParamsRequest* setParamsRequest = message_cast<TCFScpr::TParamsRequest>( &iContext.iMessage );
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+	ASSERT ( setParamsRequest );
+	
+	//Extract the parambundle from the request message.
+	if ( !setParamsRequest->iFamilyBundle.IsNull() )
+    	{
+    	iContext.Node().iRequestBundle.DeleteFamilyAtIndex (0);
+		
+    	HBufC8* buf = HBufC8::NewL ( setParamsRequest->iFamilyBundle.Length() );
+    	TPtr8 bufPtr ( buf->Des() );
+    	
+    	setParamsRequest->iFamilyBundle.Store ( bufPtr );        	
+    	iContext.Node().iRequestBundle.LoadL ( bufPtr );
+    	delete buf;
+    	}
+	}
+
+
+DEFINE_SMELEMENT ( TSendRequestParamResponse, NetStateMachine::MStateTransition, TContext )
+void TSendRequestParamResponse::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TSendRequestParamResponse::DoL")));	
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender, TCFScpr::TSetParamsResponse ( iContext.Node().iResponseBundle ).CRef () );
+#else
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.iSender, TCFScpr::TParamsResponse ( iContext.Node().iResponseBundle ).CRef () );
+#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+	}
+
+DEFINE_SMELEMENT ( TInitiateActivities, NetStateMachine::MStateTransition, TContext )
+void TInitiateActivities::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TInitiateActivities::DoL")));		
+	iContext.Node ( ).InitiateActivitiesL ( );
+	}
+
+
+DEFINE_SMELEMENT ( TLeaveRequest, NetStateMachine::MStateTransition, TContext )
+void TLeaveRequest::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TLeaveRequest::DoL")));	
+	iContext.Node ( ).SetClosing ( );
+	}
+	
+DEFINE_SMELEMENT ( TSendPublishResponseToClient, NetStateMachine::MStateTransition, TContext )
+void TSendPublishResponseToClient::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TSendPublishResponseToClient::DoL")));		
+	
+	TUPnPEvent event;
+		
+	event.iErrorCode = iContext.iNodeActivity->Error ( );
+	if ( event.iErrorCode != KErrNone )
+		event.iStatus = TUPnPEvent::EFail;
+	else 
+		event.iStatus = TUPnPEvent::ESuccess;
+	
+	iContext.Node ( ).AddResponseParamSetL ( event);
+	
+	//clear error code
+	iContext.iNodeActivity->SetError ( KErrNone );
+	}
+
+DEFINE_SMELEMENT ( TSendDataClientStart, NetStateMachine::MStateTransition, TContext )
+void TSendDataClientStart::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TSendDataClientStart::DoL")));	
+	TCFFactory::TPeerFoundOrCreated& msg = message_cast<TCFFactory::TPeerFoundOrCreated>( iContext.iMessage );
+	iContext.iNodeActivity->PostRequestTo ( msg.iNodeId, TCFDataClient::TStart ().CRef () );
+	}
+
+DEFINE_SMELEMENT ( TProcessDataClientStop, NetStateMachine::MStateTransition, TContext )
+void TProcessDataClientStop::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TProcessDataClientStop::DoL")));		
+	
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	if ( publishInfo )
+		{		
+		// Send UPnP ByeBye packets
+		if ( iContext.Node ( ).IsDevice ( ) )
+			{					
+			// Publish once for uuid:device-UUID
+			SendByeRequestL ( publishInfo->Uuid( ), publishInfo->Uuid( ) );
+			}
+		
+		// Publish once for uuid:device-UUID::urn:domain-name-device:deviceType:v
+		// (or) Publish once for uuid:device-UUID::urn:domain-name-service:serviceType:v
+		SendByeRequestL ( publishInfo->SearchTarget( ), publishInfo->Usn( ) );
+	
+		const CUPnPSubscribeInfoContainer* subscribeCont = iContext.Node ( ).GetSubscribeInfoContainer ( );	
+		if ( subscribeCont->CountOfSubscribeInfoElementArray( ) != 0 )
+			{
+			// trigger CPR to stop subscription timer			
+			RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().ControlProvider ()->RecipientId (), TUpnpMessage::TStopTimer ().CRef () );
+			}
+							 
+		// StopDataClients
+		iContext.Node().PostToClients<TDefaultClientMatchPolicy> ( TNodeCtxId ( iContext.ActivityId (), iContext.NodeId () ),
+									TCFDataClient::TStop ( KErrNone ).CRef (), TClientType ( TCFClientType::EData ) );		
+		iContext.iNodeActivity->SetPostedTo( TNodeId::NullId ( ) );
+		}	
+	}
+
+void TProcessDataClientStop::SendByeRequestL ( const TDesC8& aSearchTarget, const TDesC8& aUsn )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TProcessDataClientStop::SendByeRequestL")));		
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	RMemChunk stBuf;
+	stBuf.CreateL ( aSearchTarget, allocator );
+	TCleanupItem item ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &stBuf );
+	CleanupStack::PushL ( item );
+	
+	RMemChunk usnBuf;
+	usnBuf.CreateL ( aUsn, allocator );
+	
+	TSsdpInfo ssdpInfo ( usnBuf, stBuf );	
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().UdpClientFlow () , TUpnpMessage::TUPnPPublishByeRequest ( ssdpInfo ).CRef () );
+	CleanupStack::Pop ();
+	}
+
+DEFINE_SMELEMENT ( TSendDataClientIdleOrUnregister, NetStateMachine::MStateTransition, TContext )
+void TSendDataClientIdleOrUnregister::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TSendDataClientIdleOrUnregister::DoL")));
+	
+	CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	if ( publishInfo == NULL )
+		{		 
+		RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().ControlProvider ()->RecipientId (), TCFControlProvider::TIdle ().CRef () );	
+		}
+	else
+		{
+		const TDesC8& key = publishInfo->Key( );
+		if ( iContext.Node ( ).IsDevice ( ) )
+			{
+			RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().ControlProvider ()->RecipientId (), TUpnpMessage::TUnregisterDevice ( key.Ptr ( ), key.Size ( ) ).CRef () );		
+			}
+		else
+			{
+			RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().ControlProvider ()->RecipientId (), TUpnpMessage::TUnregisterService ( key.Ptr ( ), key.Size ( ) ).CRef () );
+			}
+		}
+	}
+
+
+//-------------------M-Search Response Activity----------------------------
+DEFINE_SMELEMENT ( TValidateAndSendResponse, NetStateMachine::MStateTransition, TContext )
+void TValidateAndSendResponse::DoL ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TValidateAndSendResponse::DoL")));
+	
+	TUpnpMessage::TUPnPSearchRequest& reqMsg = message_cast< TUpnpMessage::TUPnPSearchRequest > ( iContext.iMessage );
+		
+	RMemCell* mBuf = reqMsg.iSsdpInfo.iSearchTarget.First ( );
+	TPtr8 stPtr ( mBuf->Ptr( ), mBuf->Length( ), mBuf->Length( ) );
+		
+	CUPnPPublishInfoElement*  publishInfo = iContext.Node ( ).PublishInfo ( );
+	
+	if ( stPtr.CompareF ( publishInfo->Uuid ( ) ) == 0 )
+		{
+		// Respond once for uuid:device-UUID
+		SendSearchResponseL ( publishInfo->Uuid ( ), publishInfo->Uuid ( ), publishInfo->CacheControl ( ) );
+		}
+	else
+		{
+		SendSearchResponseL ( stPtr, publishInfo->Usn ( ), publishInfo->CacheControl ( ) );
+		}				
+
+	reqMsg.iSsdpInfo.iSearchTarget.Free ( );
+	}
+			
+void TValidateAndSendResponse::SendSearchResponseL ( const TDesC8& aSearchTarget, const TDesC8& aUsn, TInt aMaxAge )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TValidateAndSendResponse::SendSearchResponseL")));
+	
+	TUpnpMessage::TUPnPSearchRequest& reqMsg = message_cast< TUpnpMessage::TUPnPSearchRequest > ( iContext.iMessage );		
+	TAppProtAddr remoteUnicastAddr = reqMsg.iSsdpInfo.iAddr;
+	RMemoryAllocator allocator = iContext.Node ( ).ConnectionProvider().MemoryAllocator();
+	
+	RMemChunk locationBuf;
+	locationBuf.CreateL ( iContext.Node ().ConnectionProvider ().RootDeviceLocation (), allocator );
+	TCleanupItem item ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &locationBuf );
+	CleanupStack::PushL ( item );
+	
+	RMemChunk stBuf;
+	stBuf.CreateL ( aSearchTarget, allocator );	
+	TCleanupItem item1 ( &UPnPStateMachine::CUPnPUtils::CleanupMBufChain, &stBuf );
+	CleanupStack::PushL ( item1 );
+	
+	RMemChunk usnBuf;
+	usnBuf.CreateL ( aUsn, allocator );
+	
+	TSsdpInfo ssdpInfo ( aMaxAge, locationBuf, usnBuf, stBuf, remoteUnicastAddr );
+	RClientInterface::OpenPostMessageClose ( iContext.NodeId (), iContext.Node ().UdpClientFlow (), TUpnpMessage::TUPnPSearchResponse ( ssdpInfo ).CRef () );
+
+	CleanupStack::Pop ( ); // item
+	CleanupStack::Pop ( ); // item1
+	}
+		
+			
+//-=========================================================
+//
+//State Forks
+//
+//-=========================================================
+DEFINE_SMELEMENT ( TStoreUdpClientAndSendRequest, NetStateMachine::MStateFork, TContext )
+TInt TStoreUdpClientAndSendRequest::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TStoreUdpClientAndSendRequest::TransitionTag")));	
+	TCFFactory::TPeerFoundOrCreated &msg = message_cast<TCFFactory::TPeerFoundOrCreated> ( iContext.iMessage );
+	iContext.Node ( ).SetUdpClientFlow ( msg.iNodeId );
+	return UPnPStateMachine::KSendRequest;
+	}
+	
+DEFINE_SMELEMENT ( TStoreUdpServer, NetStateMachine::MStateFork, TContext )
+TInt TStoreUdpServer::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TStoreUdpServer::TransitionTag")));	
+	TCFFactory::TPeerFoundOrCreated &msg = message_cast<TCFFactory::TPeerFoundOrCreated>( iContext.iMessage );
+	iContext.Node ( ).SetUdpServerFlow ( msg.iNodeId );
+	return MeshMachine::KNoTag;
+	}
+
+	
+DEFINE_SMELEMENT ( TNoTagOrIgnoreTag, NetStateMachine::MStateFork, TContext )
+TInt TNoTagOrIgnoreTag::TransitionTag ( )
+	{
+	LOG(ESockLogExternal::Printf(KSubsysSPScprSts, KComponent, _L8("TNoTagOrIgnoreTag::TransitionTag")));	
+	return iContext.Node ( ).IsClosing ( ) ? CoreStates::KIgnore : MeshMachine::KNoTag;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpsppublishinfocontainer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,254 @@
+// 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 <f32file.h>
+#include <inetprottextutils.h>
+
+#include "upnpsppublishinfocontainer.h"
+#include "upnpdescriptionschema.h"
+#include "cupnpdescriptionparser.h"
+
+
+CUPnPRootDeviceInfoContainer* CUPnPRootDeviceInfoContainer::NewL ( )
+	{
+	CUPnPRootDeviceInfoContainer* self = new ( ELeave ) CUPnPRootDeviceInfoContainer (  );
+	CleanupStack::PushL ( self );
+	self->ConstructL ( );
+	CleanupStack::Pop ( self );
+	return self;
+	}
+
+CUPnPRootDeviceInfoContainer::CUPnPRootDeviceInfoContainer ( )
+	{
+	}
+
+CUPnPRootDeviceInfoContainer::~CUPnPRootDeviceInfoContainer ( )
+	{
+	iStringPoolMgr->Release( );
+	delete iRootDeviceDescription;
+	}
+
+void CUPnPRootDeviceInfoContainer::ConstructL ( )
+	{
+	iRootDeviceDescription = CUPnPDeviceDescription::NewL ( );
+
+	RFile	fileHandle;
+	RFs		fs;
+	User::LeaveIfError ( fs.Connect ( ) );
+    CleanupClosePushL ( fs );
+	
+	TInt err = fileHandle.Open ( fs, _L("z:\\private\\101F7989\\upnp\\device.xml"), EFileShareReadersOnly );
+	// ..remove Hard coded
+	User::LeaveIfError ( err );
+	CleanupClosePushL ( fileHandle );
+
+    iStringPoolMgr = CStringPoolManager::NewL ( );
+    const RStringPool& stringPool = iStringPoolMgr->StringPool();
+    
+	CUPnPDescriptionParser* parser = CUPnPDescriptionParser::NewL (stringPool, CUPnPDescriptionParser::EDevice);
+    CleanupStack::PushL ( parser );
+
+    TInt fileSize = 0;
+	fileHandle.Size ( fileSize );
+
+	HBufC8* buf = HBufC8::NewLC ( fileSize );
+	TPtr8 ptr = buf->Des( );
+
+	User::LeaveIfError ( fileHandle.Read ( ptr, fileSize ) );
+
+    iRootDeviceDescription = static_cast<CUPnPDeviceDescription*> (parser->ParseDescriptionBufL( ptr ));
+
+    CleanupStack::PopAndDestroy ( buf );
+    CleanupStack::PopAndDestroy ( parser );
+    CleanupStack::PopAndDestroy ( &fileHandle );
+    CleanupStack::PopAndDestroy ( &fs );
+	}
+
+
+CUPnPDeviceDescription& CUPnPRootDeviceInfoContainer::GetRootDeviceDesciption ( ) const
+	{
+	return *iRootDeviceDescription;
+	}
+
+const TDesC8& CUPnPRootDeviceInfoContainer::GetRootdeviceUid() const
+	{
+	CUPnPDevice* device = iRootDeviceDescription->DeviceObject( );
+	RStringPool& sp = iStringPoolMgr->StringPool( );
+	
+	return device->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUdn,iStringPoolMgr->GetUPnPTable() ) );
+	}
+
+CStringPoolManager& CUPnPRootDeviceInfoContainer::StringPoolManager ( ) const
+	{
+	return *iStringPoolMgr;
+	}
+
+TInt CUPnPRootDeviceInfoContainer::PerformValidation ( const TDesC8& aDeviceUid, const TDesC8& aServiceType )
+	{
+	RStringPool& sp = iStringPoolMgr->StringPool( );
+
+	const CUPnPDevice* device = GetDeviceByUuid ( aDeviceUid );
+	if ( device )
+		{
+		// device is present now look for service type;
+		const CUPnPServiceInfo* servInfo = NULL;
+		for ( TInt i = 0;  i < device->CountOfServiceInfoTable( ); i++ )
+			{
+			servInfo = device->AtServiceInfoTable( i );
+			if ( aServiceType.Compare ( servInfo->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EServiceType,iStringPoolMgr->GetUPnPTable()) ) ) == 0 )
+				return KErrAlreadyExists;
+			}
+		}
+	else
+		{
+		return KErrNotFound;
+		}
+	return KErrNone;
+	}
+
+void CUPnPRootDeviceInfoContainer::AppendEmbeddedDeviceL ( const TDesC8& aParentUuid, CUPnPDevice* aDevice )
+	{
+	CUPnPDevice* parentDevice = GetDeviceByUuid ( aParentUuid );
+	__ASSERT_DEBUG ( parentDevice != NULL, User::Invariant ( ) );  // Device to which service has to added is Not Found
+
+	parentDevice->AppendToEmbeddedDeviceInfoTableL( aDevice );
+	}
+
+void CUPnPRootDeviceInfoContainer::AppendServiceInfoL ( const TDesC8& aParentUuid, CUPnPServiceInfo* aServiceInfo )
+	{
+	CUPnPDevice* device = iRootDeviceDescription->DeviceObject( );
+	TBool res = AppendServiceL ( aParentUuid, aServiceInfo, device );
+
+	__ASSERT_DEBUG ( res, User::Invariant ( ) );  // Device to which service has to added is Not Found
+	}
+
+TBool CUPnPRootDeviceInfoContainer::AppendServiceL ( const TDesC8& aParentUuid, const CUPnPServiceInfo* aServiceInfo, CUPnPDevice* aDevice )
+	{
+	RStringPool& sp = iStringPoolMgr->StringPool( );
+
+	const TDesC8& uuid = aDevice->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUdn,iStringPoolMgr->GetUPnPTable() ) );
+	if ( uuid.Compare ( aParentUuid ) == 0 )
+		{
+		aDevice->AppendToServiceInfoTableL( aServiceInfo );
+		return ETrue;
+		}
+	else
+		{
+		for ( TInt i=0; i < aDevice->CountOfEmbeddedDeviceInfoTable( ); i++ )
+			{
+			if ( AppendServiceL ( aParentUuid, aServiceInfo, aDevice->AtEmbeddedDeviceInfoTable( i ) ) )
+				return ETrue;
+			}
+		}
+
+	return EFalse;
+	}
+
+void CUPnPRootDeviceInfoContainer::DeleteDeviceInfoL ( const TDesC8& aUuid )
+	{
+	CUPnPDevice* device = iRootDeviceDescription->DeviceObject( );
+	TBool res = DeleteDeviceL ( aUuid, device );
+	if ( res==EFalse )
+		User::Leave ( KErrNotFound );
+	}
+
+TBool CUPnPRootDeviceInfoContainer::DeleteDeviceL ( const TDesC8& aUuid, CUPnPDevice* aDevice )
+	{
+	RStringPool& sp = iStringPoolMgr->StringPool( );
+
+	for ( TInt i = 0; i < aDevice->CountOfEmbeddedDeviceInfoTable( ); i++)
+		{
+		if ( aUuid.Compare ( aDevice->AtEmbeddedDeviceInfoTable( i )->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUdn, iStringPoolMgr->GetUPnPTable() ) ) ) == 0 )
+			{
+			aDevice->DeleteEmbeddedDeviceInfoAtIndexL( i );
+			return ETrue;
+			}
+		else
+			{
+			if ( DeleteDeviceL ( aUuid, aDevice->AtEmbeddedDeviceInfoTable( i ) ) == 1 )
+				{
+				return ETrue;
+				}
+			}
+		}
+	return EFalse;
+	}
+
+void CUPnPRootDeviceInfoContainer::DeleteServiceInfoL ( const TDesC8& aScpdUrl )
+	{
+	CUPnPDevice* device = iRootDeviceDescription->DeviceObject( );
+	TBool res = DeleteServiceL ( aScpdUrl, device );
+	if ( res == EFalse )
+		User::Leave ( KErrNotFound );
+	}
+
+TBool CUPnPRootDeviceInfoContainer::DeleteServiceL ( const TDesC8& aScpdUrl, CUPnPDevice* aDevice )
+	{
+	RStringPool& sp = iStringPoolMgr->StringPool( );
+    const CUPnPServiceInfo* serviceInfo = NULL;
+    TPtrC8 urlPtr ( NULL, 0 );
+    
+    for ( TInt i = 0; i < aDevice->CountOfServiceInfoTable( ); i++ )
+    	{
+    	serviceInfo = aDevice->AtServiceInfoTable( i );
+    	urlPtr.Set ( serviceInfo->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EScpdUrl,iStringPoolMgr->GetUPnPTable() ) ).Mid (1) );
+    	
+    	if ( aScpdUrl.Compare ( urlPtr ) == 0 )
+    		{
+    		aDevice->DeleteServiceInfoAtIndexL( i );
+    		return ETrue;
+    		}
+    	}
+
+	for ( TInt i=0; i < aDevice->CountOfEmbeddedDeviceInfoTable( ); i++ )
+		{
+		if ( DeleteServiceL ( aScpdUrl, aDevice->AtEmbeddedDeviceInfoTable( i ) ) == 1 )
+			return ETrue;
+		}
+
+	return EFalse;
+	}
+
+
+CUPnPDevice* CUPnPRootDeviceInfoContainer::GetDeviceByUuid ( const TDesC8& aDeviceUuid )
+	{
+	CUPnPDevice* device = iRootDeviceDescription->DeviceObject( );
+	if ( SearchDevice ( device, aDeviceUuid ) )
+		return device;
+	else
+		return NULL;
+	}
+
+const CUPnPDevice* CUPnPRootDeviceInfoContainer::SearchDevice ( const CUPnPDevice* aDevice, const TDesC8& aDeviceUuid )
+	{
+	RStringPool& sp = iStringPoolMgr->StringPool( );
+
+	if ( aDeviceUuid.Compare ( aDevice->Property( sp.String ( UPNPDESCRIPTIONXMLTAGS::EUdn,iStringPoolMgr->GetUPnPTable() ) ) ) == 0 )
+		{
+		return aDevice;
+		}
+	else
+		{
+		for ( TInt i = 0; i < aDevice->CountOfEmbeddedDeviceInfoTable( ); i++ )
+			{
+			if ( SearchDevice ( aDevice->AtEmbeddedDeviceInfoTable( i ), aDeviceUuid ) != NULL )
+				{
+				return aDevice->AtEmbeddedDeviceInfoTable( i );
+				}
+			}
+		}
+	return NULL;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/ServicePoint/src/upnpuuid.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,130 @@
+// 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 <e32base.h>
+#include <random.h>
+#include <e32math.h>
+ 
+#include "upnpuuid.h"
+#include "upnpserverconstants.h"
+
+ 
+TInt UpnpUuid::MakeUuid(TUpnpUuid& aUuid, TUuidVersion aVersion)
+/**
+* Generate a UUID of the specified version.
+  * NOTE. As of this writing, only version 4
+  * (ERandomBased) is supported
+  **/
+     {
+     // We currently support only version 4
+     if (aVersion != ERandomBased)
+         {
+         return KErrNotSupported;
+         }
+     
+     /* Fill UUID with random data */
+     TRAPD(result, RandomizeL(aUuid));
+     
+     if (result == KErrNone)
+         {
+         /* Brand UUID with version and variant */
+         Brand(aUuid, aVersion);
+         }
+ 
+     return result;
+     }
+ 
+ void UpnpUuid::RandomizeL(TUpnpUuid& aUuid)
+ /**
+  * Fill the UUID with pseudo-random data
+  */
+     {
+     // Delegate the task to the Symbian Random Number Generator
+     // (we trust that it is the best alternative available)
+     
+     TPckg<TUpnpUuid> pckgUuid(aUuid);
+     TRandom::RandomL(pckgUuid);
+     }
+ 
+ void UpnpUuid::Brand(TUpnpUuid& aUuid, TUuidVersion aVersion)
+ /**
+  * Set variant and version information to the UUID
+  */
+     {
+     // We currently support only UUID version 4
+     if (aVersion != ERandomBased)
+         {
+         return;
+         }
+ 
+     // First set the variant information to value:
+     //     Msb0     Msb1    Msb2
+     //     1        0       x
+     // as specified in draft-mealling-uuid-urn-05.txt
+     // (a variable number of the most significant bits
+     // of the eight octet of the UUID, i.e. the
+     // clock_seq_hi_and_reserved octet)
+     aUuid.iClockSeqHiAndReserved &= 0x3F;     // Set Msb0 and Msb1 to 0, take the rest "as-is"
+     aUuid.iClockSeqHiAndReserved |= (1 << 7); // Set Msb0 to 1
+ 
+     // Then set the version number to indicate version 4
+     //     Msb0     Msb1    Msb2    Msb3
+     //     0        1       0       0
+     // as specified in draft-mealling-uuid-urn-05.txt
+     // (in the most significant four bits of the time
+     // stamp)
+     aUuid.iTimeHiAndVersion &= 0x0FFF;    // Set Msb0-Msb3 to 0, take the rest "as-is"
+     aUuid.iTimeHiAndVersion |= (1 << 14); // Set Msb1 to 1
+     }
+
+ void UpnpUuid::GenerateUuidL(RBuf8& aUuid)
+	 {
+		// uuid generation
+		TUpnpUuid uuid;
+		TUuidString8 uuidString;
+		UpnpUuid::MakeUuid(uuid);
+		
+		TTime now;
+		now.UniversalTime();
+		TInt64 randSeed = now.Int64();
+		TInt randomNum = Math::Rand(randSeed);
+		uuid.iTimeLow = static_cast<TUint32>(randomNum);
+		UpnpUuid::UuidToString(uuid, uuidString);
+		aUuid.CreateL(KUuidString.iTypeLength+KUuidStringLen);
+		aUuid.Copy(KUuidString);
+		aUuid.Append(uuidString);
+	 }
+ 
+ void UpnpUuid::UuidToString(const TUpnpUuid& aUuid, TUuidString8& aUuidString)
+ /**
+  * Create and return a string representation of the given UUID.
+  * E.g. f81d4fae-7dec-11d0-a765-00a0c91e6bf6
+  */
+     {
+     aUuidString.Format(KUuidFormatString8,
+                        static_cast<TUint>(aUuid.iTimeLow),
+                        static_cast<TUint>(aUuid.iTimeMid),
+                        static_cast<TUint>(aUuid.iTimeHiAndVersion),
+                        static_cast<TUint>(aUuid.iClockSeqHiAndReserved),
+                        static_cast<TUint>(aUuid.iClockSeqLow),
+                        static_cast<TUint>(aUuid.iNode[0]),
+                        static_cast<TUint>(aUuid.iNode[1]),
+                        static_cast<TUint>(aUuid.iNode[2]),
+                        static_cast<TUint>(aUuid.iNode[3]),
+                        static_cast<TUint>(aUuid.iNode[4]),
+                        static_cast<TUint>(aUuid.iNode[5]));
+     }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/StringDictionary/upnpdeviceschema.st	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+#
+# 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 the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+upnpdeviceXMLTagsstringtable UPNPDEVICEXMLTAGS
+ERoot root
+ESpecVersion specVersion
+EMajorNumber major
+EMinorNumber minor
+EUrlBase URLBase
+EDevice device
+EDeviceType deviceType
+EFriendlyName friendlyName
+EManufacturer manufacturer
+EManufacturerUrl manufacturerURL
+EModelDescription modelDescription
+EModelName modelName
+EModelNumber modelNumber
+EModel modelURL
+ESerialNumber serialNumber
+EUdn UDN
+EUpc UPC
+EIconList iconList
+EIcon icon
+EMimeType mimetype
+EWidth width
+EHeight height
+EDepth depth
+EUrl url
+EServiceList serviceList
+EService service
+EServiceType serviceType
+EServiceId serviceId
+EScpdUrl SCPDURL
+EContorlUrl controlURL
+EEventSubUrl eventSubURL
+EDeviceList deviceList
+EPresentationUrl presentationURL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/StringDictionary/upnpserviceschema.st	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+#
+# 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 the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+upnpserviceXMLTagsstringtable UPNPSERVICEXMLTAGS
+EScpd scpd
+ESpecVersion specVersion
+EMajorNumber major
+EMinorNumber minor
+EActionList actionList
+EAction action
+EName name
+EArgumentList argumentList
+EArgument argument
+EArgumentDirection direction
+ERelatedStateVar relatedStateVariable
+ERetValue retval
+EServiceStateTable serviceStateTable
+EStateVariable stateVariable
+EStateVariableDataType dataType
+EStateVariableDefaultValue defaultValue
+EAllowedValueList allowedValueList
+EAllowedValue allowedValue
+EAllowedValueRange allowedValueRange
+EMinimumValue minimum
+EMaximumValue maximum
+EStepValue step
+ESendEvents sendEvents
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/group/2000D053.rss	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,129 @@
+// 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:
+// @file
+// Registry info for UPnP ECOM plug-in
+// 
+//
+
+#include <ecom/registryinfo.rh>
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x2000D053;
+interfaces = 
+    {
+    INTERFACE_INFO
+        {
+        interface_uid =  0x10281DD7;
+        implementations = 
+            {
+            IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D054;
+                version_no = 1;
+                display_name = "UPnP Tier Manager Factory";
+                default_data = "UPnPTierManagerFactory";
+                }
+            };
+        },
+    INTERFACE_INFO
+        {
+        interface_uid =  0x10274546;
+        implementations = 
+            {
+            IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D055;
+                version_no = 1;
+                display_name = "UPnP Meta Connection Provider Factory";
+                default_data = "UPnPMetaConnectionProviderFactory";
+                opaque_data = "";
+                }
+            };
+        },
+    INTERFACE_INFO
+        {
+        interface_uid = 0x102070EE;
+        implementations = 
+            {
+            IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D056;
+                version_no = 1;
+                display_name = "UPnP Control Connection Provider Factory";
+                default_data = "UPnPControlConnectionProviderFactory";            
+                },
+    	    IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D058;
+                version_no = 1;
+                display_name = "UPnP Service Connection Provider Factory";
+                default_data = "UPnPServiceConnectionProviderFactory";              
+                }
+            };
+        },
+     INTERFACE_INFO
+        {
+        interface_uid = 0x10204301;
+        implementations = 
+            {
+            IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D057;
+                version_no = 1;
+                display_name = "UPnP Control Sub-Connection Provider Factory";
+                default_data = "UPnPControlSubConnectionProviderFactory";             
+                },
+	    IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D059;
+                version_no = 1;
+                display_name = "UPnP Service Sub-Connection Provider Factory";
+                default_data = "UPnPServiceSubConnectionProviderFactory";          
+                }
+            };
+        },
+    INTERFACE_INFO
+        {
+        interface_uid = 0x10281C33;
+        implementations = 
+            {
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D05A;
+                version_no = 1;
+                display_name = "UPnP Flow Factory";
+                default_data = "UPnPFlowFactory";
+                opaque_data = "";
+                }
+            };
+        },
+    INTERFACE_INFO
+        {//Right now using subconnection flow factory container uid, once comms genereic flow factory 
+         // container is ready should be replaced with that UID, 
+        interface_uid = 0x10281C33; //subconnflow interface UID
+        implementations = 
+            {
+           IMPLEMENTATION_INFO
+                {
+                implementation_uid = 0x2000D05B;
+                version_no = 1;
+                display_name = "Application Protocol Interface Factory";
+                default_data = "ApplicationProtocolIntfFactory";
+                }
+            };
+        }	 
+    };
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,28 @@
+// 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:
+//
+
+PRJ_TESTEXPORTS
+../AppProtIntf/inc/app_protintf_msgs.h	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(appprotintf/app_protintf_msgs.h)
+../AppProtIntf/inc/app_protintf_base.h	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(appprotintf/app_protintf_base.h)
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../Flow/inc/genericcontainer.h		/epoc32/include/appprotintf/genericcontainer.h
+#endif
+upnpserver.iby				/epoc32/rom/include/upnpserver.iby
+
+PRJ_TESTMMPFILES
+upnpserver.mmp
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/group/upnpserver.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,29 @@
+// 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 SYMBIAN_IPTRANSPORT_IBY
+#define SYMBIAN_IPTRANSPORT_IBY
+
+#include <mobilitycoreproviders.iby>
+
+REM ESock TCP/UDP Connection Provider
+
+#ifdef _DEBUG
+ECOM_PLUGIN_UDEB(iptransport.dll,102070ED.rss)
+#else
+ECOM_PLUGIN(iptransport.dll,102070ED.rss)
+#endif
+
+#endif //SYMBIAN_IPTRANSPORT_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/Server/group/upnpserver.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,152 @@
+// 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:
+// @file
+// @SYMPurpose UPnPServer.mmp HTTP UPnP Server plugin dll
+// 
+//
+
+TARGET          upnpserver.dll
+TARGETTYPE      PLUGIN
+
+UID             0x10009D8D 0x2000D053
+VENDORID        0x70000001
+
+USERINCLUDE     ../ControlPoint/inc
+USERINCLUDE     ../ServicePoint/inc
+USERINCLUDE     ../Flow/inc
+USERINCLUDE     ../../upnpmessage/inc
+USERINCLUDE     ../../upnpdescription/inc
+USERINCLUDE     ../../upnputils/inc
+USERINCLUDE     ../../Client/upnpplugin/inc
+USERINCLUDE     ../AppProtIntf/inc
+USERINCLUDE 	../../SocketHandler/inc
+
+SYSTEMINCLUDE   /epoc32/include
+SYSTEMINCLUDE	/epoc32/include/comms-infras
+SYSTEMINCLUDE   /epoc32/include/upnp
+
+
+SOURCEPATH  ../ControlPoint/src
+SOURCE		ecom_impl.cpp
+SOURCE		upnpctrlcpr.cpp
+SOURCE		upnpctrlcpractivities.cpp
+SOURCE		upnpctrlcprfactory.cpp
+SOURCE		upnpmcpr.cpp
+SOURCE		upnpmcpractivities.cpp
+SOURCE		upnpmcprfactory.cpp
+SOURCE		upnpctrlscpr.cpp
+SOURCE		upnpctrlscpractivities.cpp
+SOURCE		upnpctrlscprstates.cpp
+SOURCE		upnpctrldeftscpr.cpp
+SOURCE		upnpctrldeftscpractivities.cpp
+SOURCE		upnpctrlscprfactory.cpp
+SOURCE		upnptiermanager.cpp
+SOURCE		upnptiermanageractivities.cpp
+SOURCE		upnptiermanagerfactory.cpp
+SOURCE		upnptiermanagerselector.cpp
+SOURCE 		upnpstatemachine.cpp
+SOURCE 		upnpcpr.cpp
+SOURCE 		upnpscpr.cpp
+
+SOURCEPATH  ../ServicePoint/src
+SOURCE		upnpservicecpr.cpp
+SOURCE		upnpservicecpractivities.cpp
+SOURCE		upnpservicecprfactory.cpp
+SOURCE		upnpservicecprstates.cpp
+SOURCE		upnpservicedeftscpr.cpp
+SOURCE		upnpservicedeftscpractivities.cpp
+SOURCE		upnpservicedeftscprstates.cpp
+SOURCE		upnpservicescpr.cpp
+SOURCE		upnpservicescpractivities.cpp
+SOURCE		upnpservicescprfactory.cpp
+SOURCE		upnpservicescprstates.cpp 
+SOURCE		upnpsppublishinfocontainer.cpp
+SOURCE		upnpuuid.cpp
+
+SOURCEPATH  ../Flow/src
+SOURCE		upnpflowfactory.cpp
+SOURCE		upnpflowbase.cpp
+SOURCE		httpclientflow.cpp
+SOURCE		httpudpflow.cpp
+SOURCE		upnppintfactory.cpp
+SOURCE		upnppint.cpp
+SOURCE		httpserverflow.cpp
+SOURCE		ctransaction.cpp
+SOURCE		cprotocolhandler.cpp
+SOURCE		chttpclienthandler.cpp
+SOURCE		httpmudpflow.cpp
+SOURCE		httpserver.cpp
+SOURCE		httpserverhandler.cpp
+SOURCE		csoapparser.cpp
+SOURCE		genericcontainer.cpp
+SOURCE 		cupnptimer.cpp
+SOURCE 		upnpmemoryutils.cpp
+
+SOURCEPATH      ../AppProtIntf/src
+//SOURCE app_protintf.cpp
+SOURCE app_protintf_base.cpp
+SOURCE app_protintf_fact.cpp
+SOURCE app_protintf_tcp.cpp
+SOURCE app_protintf_udp.cpp
+
+SOURCEPATH      ../group
+START RESOURCE 2000D053.rss
+TARGET upnpserver.rsc
+END
+
+LIBRARY	euser.lib
+LIBRARY esocksvr.lib
+LIBRARY esock.lib
+LIBRARY netmeta.lib
+LIBRARY netsm.lib
+LIBRARY commsfw.lib
+LIBRARY coreproviders.lib
+LIBRARY mobilitycoreproviders.lib
+LIBRARY esock_api_ext.lib
+LIBRARY commsdat.lib
+LIBRARY simpleselectorbase.lib
+LIBRARY insock.lib 
+LIBRARY mbufmgr.lib
+LIBRARY sockethandler.lib
+LIBRARY http.lib
+LIBRARY bafl.lib
+LIBRARY inetprotutil.lib
+LIBRARY appprotinfmsgs.lib
+LIBRARY upnpdescription.lib
+LIBRARY efsrv.lib 
+LIBRARY upnputils.lib
+LIBRARY upnpmessage.lib
+LIBRARY charconv.lib
+LIBRARY random.lib
+LIBRARY xmlframework.lib
+LIBRARY	ecom.lib
+LIBRARY nodemessages.lib
+LIBRARY meshmachine.lib
+LIBRARY netinterfaces.lib
+LIBRARY factories.lib
+LIBRARY serverden.lib
+LIBRARY chunkmgr.lib
+
+//#include <comms-infras/esockdebug.mmh>
+#include <comms-infras/commsdebugutility.mmh>
+#include <cflog.mmh>
+#include <elements/sd_mintercept.mmh>
+
+CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+
+
+
+SMPSAFE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/bwins/sockethandleru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,14 @@
+EXPORTS
+	??0RSocketHandler@@QAE@AAVMSocketHandlerObserver@@@Z @ 1 NONAME ; RSocketHandler::RSocketHandler(class MSocketHandlerObserver &)
+	??1CSocketOpener@@UAE@XZ @ 2 NONAME ; CSocketOpener::~CSocketOpener(void)
+	?Accept@RSocketHandler@@QAEXXZ @ 3 NONAME ; void RSocketHandler::Accept(void)
+	?Attach@RSocketHandler@@QAEXAAVRInternalSocket@@@Z @ 4 NONAME ; void RSocketHandler::Attach(class RInternalSocket &)
+	?CancelAll@RSocketHandler@@QAEXXZ @ 5 NONAME ; void RSocketHandler::CancelAll(void)
+	?Connect@RSocketHandler@@QAEXABVTSockAddr@@@Z @ 6 NONAME ; void RSocketHandler::Connect(class TSockAddr const &)
+	?MakeSocket@CSocketOpener@@QAEXIII@Z @ 7 NONAME ; void CSocketOpener::MakeSocket(unsigned int, unsigned int, unsigned int)
+	?NewL@CSocketOpener@@SAPAV1@AAVMSocketHandlerObserver@@@Z @ 8 NONAME ; class CSocketOpener * CSocketOpener::NewL(class MSocketHandlerObserver &)
+	?Recv@RSocketHandler@@QAEXXZ @ 9 NONAME ; void RSocketHandler::Recv(void)
+	?RecvFrom@RSocketHandler@@QAEXXZ @ 10 NONAME ; void RSocketHandler::RecvFrom(void)
+	?Send@RSocketHandler@@QAEXAAVRMBufChain@@@Z @ 11 NONAME ; void RSocketHandler::Send(class RMBufChain &)
+	?SendTo@RSocketHandler@@QAEXABVRMBufChain@@AAVTSockAddr@@@Z @ 12 NONAME ; void RSocketHandler::SendTo(class RMBufChain const &, class TSockAddr &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/eabi/sockethandleru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+EXPORTS
+	_ZN13CSocketOpener10MakeSocketEjjj @ 1 NONAME
+	_ZN13CSocketOpener4NewLER22MSocketHandlerObserver @ 2 NONAME
+	_ZN13CSocketOpenerD0Ev @ 3 NONAME
+	_ZN13CSocketOpenerD1Ev @ 4 NONAME
+	_ZN13CSocketOpenerD2Ev @ 5 NONAME
+	_ZN14RSocketHandler4RecvEv @ 6 NONAME
+	_ZN14RSocketHandler4SendER10RMBufChain @ 7 NONAME
+	_ZN14RSocketHandler6AcceptEv @ 8 NONAME
+	_ZN14RSocketHandler6AttachER15RInternalSocket @ 9 NONAME
+	_ZN14RSocketHandler6SendToERK10RMBufChainR9TSockAddr @ 10 NONAME
+	_ZN14RSocketHandler7ConnectERK9TSockAddr @ 11 NONAME
+	_ZN14RSocketHandler8RecvFromEv @ 12 NONAME
+	_ZN14RSocketHandler9CancelAllEv @ 13 NONAME
+	_ZN14RSocketHandlerC1ER22MSocketHandlerObserver @ 14 NONAME
+	_ZN14RSocketHandlerC2ER22MSocketHandlerObserver @ 15 NONAME
+	_ZTI13CSocketOpener @ 16 NONAME
+	_ZTI14CSocketHandler @ 17 NONAME
+	_ZTV13CSocketOpener @ 18 NONAME
+	_ZTV14CSocketHandler @ 19 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,32 @@
+// 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:
+//
+
+PRJ_TESTEXPORTS
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/csocketopener.h /epoc32/include/csocketopener.h
+#endif
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/rsockethandler.h /epoc32/include/rsockethandler.h
+#endif
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/sockhandlerdefs.h /epoc32/include/sockhandlerdefs.h
+#endif
+
+./sockethandler.iby /epoc32/rom/include/sockethandler.iby
+
+PRJ_TESTMMPFILES
+sockethandler.mmp
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/group/sockethandler.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+// 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 __SOCKETHANDLER_IBY__
+#define __SOCKETHANDLER_IBY__
+
+REM SocketHandler
+
+file=ABI_DIR\BUILD_DIR\sockethandler.dll	Sys\bin\sockethandler.dll 
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/group/sockethandler.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+// 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:
+//
+
+
+
+TARGET		sockethandler.dll
+TARGETTYPE	dll
+//CAPABILITY	ALL -TCB
+CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+UID 0x10009D8D 0x2000D056
+VENDORID 0x70000001
+
+SOURCEPATH ../src
+SOURCE rsockethandler.cpp
+SOURCE csockethandler.cpp
+SOURCE csocketopener.cpp
+
+USERINCLUDE ../inc
+
+SYSTEMINCLUDE /epoc32/include 
+SYSTEMINCLUDE /epoc32/include/comms-infras
+
+LIBRARY euser.lib 
+LIBRARY esock.lib 
+LIBRARY esocksvr.lib 
+LIBRARY mbufmgr.lib
+
+DEFFILE         sockethandler.def
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/csockethandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,69 @@
+// 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:
+// @internalTechnology
+// 
+//
+
+#ifndef __CSOCKETHANDLER_H__
+#define __CSOCKETHANDLER_H__
+
+#include <e32base.h>
+#include <e32cmn.h>
+#include <es_mbuf.h>
+#include <es_sock.h>
+#include <sockhandlerdefs.h>
+#include <eintsock.h>
+
+// Forward class references.
+class MSocketHandlerObserver;
+
+using namespace SockHandler;
+/**
+This is an active object which performs all the asynchronous operations of RInternalSocket. 
+On completion of the operation CSocketHandler will notify its observer.
+
+@internalComponent
+*/
+class CSocketHandler : public CActive
+	{
+	public:
+		CSocketHandler ( RInternalSocket& aSocket, MSocketHandlerObserver& aObserver );
+		CSocketHandler ( MSocketHandlerObserver& aObserver );
+		~CSocketHandler ();
+		
+		void Activate ( const TSocketHandlerParams& aParams );
+		TBool IsRunning ( TOperation aOperation );
+		
+	protected:	
+		// CActive overloads
+		void RunL ();
+		void DoCancel ();
+	
+	private:
+		void NotifyCompletion ();
+		void CancelCurrent ();
+		void CompleteSelf ( TInt aError );
+
+	private:
+		RInternalSocket				iSocket;
+		MSocketHandlerObserver&		iObserver;	// Observer for socket operational success completion & error conditons
+		TOperation					iOperation;
+		
+		RMBufChain					iBufChain;
+		TSockAddr					iSockAddr;
+		RInternalSocket				iAcceptingSocket;
+		TSockXfrLength 				iLength;
+	};
+
+#endif // __CSOCKETHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/csocketopener.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+// 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:
+// Insert comment here
+// @file
+// @internalAll
+// 
+//
+
+#ifndef __CSOCKETOPENER_H__
+#define __CSOCKETOPENER_H__
+
+// System includes
+#include <e32base.h>
+
+// Forward class references.
+class CSocketHandler;
+class MSocketHandlerObserver;
+
+class CSocketOpener : public CBase
+	{
+	public:
+		IMPORT_C static CSocketOpener* NewL ( MSocketHandlerObserver& aObserver );
+//		IMPORT_C void MakeSocket ( const TDesC& aName );
+		IMPORT_C void MakeSocket ( TUint aAddrFamily,  TUint aSockType, TUint aProtocol );       
+		IMPORT_C ~CSocketOpener ();
+
+	private:
+		CSocketOpener ();
+		void ConstructL ( MSocketHandlerObserver& aObserver );
+
+	private:
+		CSocketHandler* iHandler;
+	};
+
+
+#endif // __SOCKETOPENER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/rsockethandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,93 @@
+// 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:
+// @internalAll
+// 
+//
+
+#ifndef __RSOCKETHANDLER_H__
+#define __RSOCKETHANDLER_H__
+
+#include <es_sock.h>
+#include <comms-infras/eintsock.h>
+
+#include "sockhandlerdefs.h"
+
+using namespace SockHandler;
+
+class CSocketHandler;
+
+
+/** 
+A SocketHandler observer.
+
+Implementor of this class will be notified on completion of socket operations from a socket handler.
+
+@internalAll
+*/
+class MSocketHandlerObserver
+	{
+public:
+	virtual void OpenComplete ( RInternalSocket& aSocket ) =0;
+	virtual void ConnectComplete () =0;
+	virtual void AcceptComplete ( RInternalSocket& aSocket ) =0;
+	virtual void SendComplete ( TInt aLength ) =0;
+	virtual void SendToComplete ( TInt aLength ) =0;
+	virtual void RecvComplete ( RMBufChain& aData ) =0;
+	virtual void RecvFromComplete ( RMBufChain& aData, const TSockAddr& aAddr ) =0;
+//	virtual void IoctlComplete () =0;
+	virtual void Error ( TOperation aOperation, TInt aError  ) =0;
+	};
+
+
+/**
+
+@internalAll
+*/
+class RSocketHandler
+	{
+	public:
+
+	IMPORT_C RSocketHandler ( MSocketHandlerObserver& aObserver );
+	IMPORT_C void Attach ( RInternalSocket& aSocket );
+
+	IMPORT_C void Connect ( const TSockAddr& aAddr );
+	IMPORT_C void Accept ();
+	
+	IMPORT_C void Send ( RMBufChain& aData );
+	IMPORT_C void SendTo ( const RMBufChain& aData, TSockAddr& aAddr );
+	IMPORT_C void Recv ();
+	IMPORT_C void RecvFrom ();
+
+//	IMPORT_C void Send ( const TDesC8& aData );
+//	IMPORT_C void SendTo ( const TDesC8& aData, TSockAddr& aAddr );
+	
+//	IMPORT_C void Ioctl ( TUint aCommand, TDes8* aData = 0, TUint aLevel = KLevelUnspecified );
+
+//	IMPORT_C void Cancel ( TOperation aOperation );
+	IMPORT_C void CancelAll ();
+	
+	private:
+	CSocketHandler* FreeSocketHandler ( TOperation aOperation );
+	CSocketHandler* ActiveSocketHandler ( TOperation aOperation );
+	void ActivateSocketHandler ( TSocketHandlerParams& aParams );
+	
+	private:
+	RInternalSocket					iSocket;			// Socket to perform operations. Not owned.
+	MSocketHandlerObserver&			iObserver;			// Observer for socket operational success completion & error conditons
+	
+	RPointerArray < CSocketHandler > iSocketHandlers;	// Number of socket handlers
+	TUint32							iReserved [ 2 ];	// reserved
+	};
+
+#endif // __RSOCKETHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/inc/sockhandlerdefs.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+// 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 __SOCKHANDLERDEFS_H__
+#define __SOCKHANDLERDEFS_H__
+
+
+namespace SockHandler
+{	
+// @internalAll
+
+	enum TOperation
+		{
+		EConnect =0,
+		EAccept =1,
+		EDescSend =2,
+		EMBufSend =3,
+		EDescSendTo =4,
+		EMBufSendTo =5,
+		ERecv =6,
+		ERecvFrom =7,  
+		EIoctl =8, 				// unused enums 9 - 11 ( inclusive )
+		EOpenByProtocol =12,  	// Used by CAsyncSocketOpener
+		EOpenByName =13	 		// Used by CAsyncSocketOpener
+		};
+
+//@internalComponent
+typedef TIpcArgs TSocketHandlerParams;
+}
+
+#endif // __SOCKHANDLERDEFS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/src/csockethandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,281 @@
+// 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 <in_sock.h>
+#include <eintsock.h>
+#include "rsockethandler.h"
+#include "csockethandler.h"
+
+
+
+const TInt KDefaultFlags = 0;
+/**
+Constructor.
+*/
+CSocketHandler::CSocketHandler ( RInternalSocket& aSocket, MSocketHandlerObserver& aObserver )
+: CActive ( EPriorityStandard ),
+	iSocket ( aSocket ),
+  iObserver ( aObserver )
+	{
+	CActiveScheduler::Add(this);	
+	}
+
+CSocketHandler::CSocketHandler ( MSocketHandlerObserver& aObserver )
+: CActive ( EPriorityNormal ),
+iObserver ( aObserver )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+/** 
+Destructor.
+*/
+CSocketHandler::~CSocketHandler ()
+	{
+	Cancel ();		
+	}
+
+/**
+Starts a socket operation on RInternalSocket.
+
+@param aParams. Socket operation parameters.
+*/
+void CSocketHandler::Activate ( const TSocketHandlerParams& aParams )
+	{
+	iOperation = static_cast < TOperation > ( aParams.iArgs[0] );
+	TInt err = KErrNone;
+	switch ( iOperation )
+		{
+		case EConnect:
+			{
+			TSockAddr* addr = reinterpret_cast < TSockAddr* > ( aParams.iArgs[1] );
+			iSocket.Connect ( *addr, iStatus );
+			}
+		break;
+		
+		case EAccept:
+			{
+			err = iAcceptingSocket.Open ();
+			iSocket.Accept ( iAcceptingSocket, iStatus );
+			}
+		break;
+		
+		case EMBufSend:
+			{
+			iBufChain.Init ( );
+			RMBufChain* bufChain = reinterpret_cast < RMBufChain* > ( aParams.iArgs[1] );
+			iLength = 0;
+			iSocket.Send ( *bufChain, KDefaultFlags, iStatus, iLength );
+			}
+		break;
+		
+/*		case EOpenByName:
+			{
+			const TDesC* buf = reinterpret_cast < const TDesC* > ( aParams.iArgs[1] );
+			iSocket.Open ( *buf, iStatus );
+			}
+		break;
+				
+		case EDescSend:
+			{
+			const TDesC8* buf = reinterpret_cast < const TDesC8* > ( aParams.iArgs[1] );
+			iSocket.Send ( *buf, KDefaultFlags, iStatus );
+			}
+		break;
+		
+		case EDescSendTo:
+			{
+			const TDesC8* buf = reinterpret_cast < const TDesC8* > ( aParams.iArgs[1] );
+			iSockAddr = *(reinterpret_cast < TSockAddr* > ( aParams.iArgs[2] ));
+			iSocket.SendTo ( *buf, iSockAddr, KDefaultFlags, iStatus );
+			}
+		break; 
+		
+*/		case EMBufSendTo:
+			{
+			iBufChain.Init ( );
+			iBufChain = *(reinterpret_cast < RMBufChain* > ( aParams.iArgs[1] ));
+			iSockAddr = *(reinterpret_cast < TSockAddr* > ( aParams.iArgs[2] ));
+			iLength = 0;
+			iSocket.SendTo ( iBufChain, iSockAddr, KDefaultFlags, iStatus, iLength );
+			}
+		break;
+
+		case ERecv:
+			{
+			iBufChain.Init ( );
+			iSocket.Recv ( iBufChain, KDefaultFlags, iStatus );
+			}
+		break;
+
+		case ERecvFrom:
+			{
+			iBufChain.Init ();
+			iSocket.RecvFrom ( iBufChain, iSockAddr, KDefaultFlags, iStatus );
+			}
+		break;
+
+		case EOpenByProtocol:
+			{
+			TUint addrFamily = static_cast < TUint> ( aParams.iArgs[1] );	
+			TUint sockType = static_cast < TUint> ( aParams.iArgs[2] );				
+			TUint prot = static_cast < TUint> ( aParams.iArgs[3] );
+			iSocket.Open ( addrFamily, sockType, prot, iStatus );
+			}
+		break;
+
+		default:
+			User::Invariant ();
+		};
+		
+	if ( KErrNone == err )
+		{
+		SetActive();
+		}
+	else
+		{
+		CompleteSelf ( err );
+		}
+	}
+
+void CSocketHandler::CompleteSelf ( TInt aError )
+	{
+    TRequestStatus* pStat = &iStatus;
+    User::RequestComplete ( pStat, aError );
+	SetActive ( );
+    }
+	
+/**
+Handles this idle active object's request completion event.
+*/
+void CSocketHandler::RunL ()
+	{
+	TInt err = iStatus.Int ();
+	if ( err == KErrNone )
+		{
+		NotifyCompletion ();
+		}
+	else
+		{
+		iObserver.Error ( iOperation, err );
+		}
+	}
+
+/**
+Cancellation of an outstanding request.
+*/
+void CSocketHandler::DoCancel ()
+	{
+	CancelCurrent ();
+	}
+	
+void CSocketHandler::NotifyCompletion ( )
+	{
+	switch ( iOperation )
+		{
+		case EConnect:
+			{
+			iObserver.ConnectComplete();
+			}
+		break;
+		
+		case EAccept:
+			{
+			iObserver.AcceptComplete( iAcceptingSocket );
+			RInternalSocket sock;
+			iAcceptingSocket = sock;
+			}
+		break;
+		
+//		case EDescSend:
+		case EMBufSend:	
+			{
+			iObserver.SendComplete( iLength() );
+			}
+		break;
+
+//		case EDescSendTo:
+		case EMBufSendTo:
+			{
+			iObserver.SendToComplete( iLength() );
+			}
+		break;
+			
+		case ERecv:		
+			{
+			iObserver.RecvComplete( iBufChain );
+			}
+		break;
+		
+		case ERecvFrom:
+			{
+			iObserver.RecvFromComplete( iBufChain, iSockAddr );
+			}
+		break;
+
+		case EOpenByProtocol:
+//		case EOpenByName:
+			{
+			iObserver.OpenComplete(iSocket);
+			}
+		break;
+		
+/*		case EIoctl:
+			iObserver.IoctlComplete();
+		break;				
+*/		 
+		};
+	}
+
+/**
+Determines whether the socket handler has a request outstanding
+*/
+TBool CSocketHandler::IsRunning ( TOperation aOperation )
+	{
+	return ( IsActive() && ( aOperation == iOperation  ) );
+	}
+
+void CSocketHandler::CancelCurrent ()
+	{
+	switch ( iOperation )
+		{
+		case EConnect:
+			iSocket.CancelConnect ();
+		break;
+		
+		case EAccept:
+			iSocket.CancelAccept ();
+			iAcceptingSocket.Close ();
+		break;
+		
+//		case EDescSend:
+		case EMBufSend:	
+//		case EDescSendTo:
+		case EMBufSendTo:
+			iSocket.CancelSend ();
+		break;
+
+		case ERecv:
+		case ERecvFrom:
+			iSocket.CancelRecv ();
+		break;
+
+		case EOpenByProtocol:
+//		case EOpenByName:
+			iSocket.Close (); 
+		break;	
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/src/csocketopener.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,63 @@
+// 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:
+// @file
+// @internalAll
+// 
+//
+
+#include "csocketopener.h"
+#include "csockethandler.h"
+#include "sockhandlerdefs.h"
+
+using namespace SockHandler;
+
+EXPORT_C CSocketOpener* CSocketOpener::NewL ( MSocketHandlerObserver& aObserver )
+	{
+	CSocketOpener* socketOpener = new (ELeave) CSocketOpener ();
+	CleanupStack::PushL ( socketOpener );
+	socketOpener->ConstructL ( aObserver );
+	CleanupStack::Pop ();
+	return socketOpener;
+	}
+
+EXPORT_C CSocketOpener::~CSocketOpener ()
+	{
+	delete iHandler;
+	}
+
+CSocketOpener::CSocketOpener ()
+	{
+	}
+
+void CSocketOpener::ConstructL ( MSocketHandlerObserver& aObserver )
+	{
+	iHandler = new (ELeave) CSocketHandler ( aObserver );
+	}
+
+
+/*EXPORT_C void CSocketOpener::MakeSocket ( const TDesC& aName )
+	{
+	TSocketHandlerParams params ( EOpenByName, &aName );
+	iHandler->Activate ( params );
+	}
+*/
+EXPORT_C void CSocketOpener::MakeSocket ( TUint aAddrFamily,  TUint aSockType, TUint aProtocol )
+	{
+	TSocketHandlerParams params ( EOpenByProtocol, aAddrFamily, aSockType, aProtocol );
+	iHandler->Activate ( params );
+	}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/SocketHandler/src/rsockethandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,236 @@
+// 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 <e32base.h>
+#include "rsockethandler.h"
+#include "csockethandler.h"
+
+/**
+Constructor.
+*/
+EXPORT_C RSocketHandler::RSocketHandler ( MSocketHandlerObserver& aObserver )
+: iObserver ( aObserver )
+	{
+	}
+
+/**
+Attaches to the open socket.
+
+@param aSocket. The open RInternalSocket.
+*/
+EXPORT_C void RSocketHandler::Attach ( RInternalSocket& aSocket )
+	{
+	CancelAll ();
+	iSocket = aSocket;
+	}
+
+/**
+Connects to a remote host.
+
+@param aAddr. A remote destination address.
+*/
+EXPORT_C void RSocketHandler::Connect ( const TSockAddr& aAddr )
+	{
+	TSocketHandlerParams params ( EConnect, &aAddr );
+	ActivateSocketHandler ( params );
+	}
+
+/**
+Facilitates a client/server connection from a remote socket.
+
+On successful completion a new connected socket is returned to the socket handler observer 
+and it may then be used to transfer data.
+@param: void.
+@return: void 
+*/
+EXPORT_C void RSocketHandler::Accept ()
+	{
+	TSocketHandlerParams params( EAccept );	
+	ActivateSocketHandler ( params );
+	}
+
+/**
+Sends data to remote host on a connected socket.
+
+@param aData. The data to be sent.
+*/
+EXPORT_C void RSocketHandler::Send (  RMBufChain& aData )
+	{
+	TSocketHandlerParams params ( EMBufSend, &aData );
+	ActivateSocketHandler ( params );	
+	}
+
+/**
+Sends data to remote host on a unconnected socket.
+
+@param aData. The data to be sent.
+@param aAddr. A remote destination address
+*/
+EXPORT_C void RSocketHandler::SendTo ( const RMBufChain& aData, TSockAddr& aAddr )
+	{
+	TSocketHandlerParams params ( EMBufSendTo, &aData, &aAddr );
+	ActivateSocketHandler ( params );	
+	}
+
+/**
+Receives data from a remote host.
+*/
+EXPORT_C void RSocketHandler::Recv ()
+	{
+	TSocketHandlerParams params ( ERecv );
+	ActivateSocketHandler ( params );
+	
+	}
+
+/**
+Receives data from a remote host through a unconnected socket and returns a source address.
+*/
+EXPORT_C void RSocketHandler::RecvFrom ()
+	{
+	TSocketHandlerParams params ( ERecvFrom );
+	ActivateSocketHandler ( params );
+
+	}
+
+/**
+Sends data to remote host on a connected socket.
+
+@param aData. The data to be sent.
+
+EXPORT_C void RSocketHandler::Send ( const TDesC8& aData )
+	{
+	TSocketHandlerParams params ( EDescSend, &aData );
+	ActivateSocketHandler ( params );
+
+	}
+
+Sends data to remote host on a unconnected socket.
+
+@param aData. The data to be sent.
+@param aAddr. A remote destination address
+
+EXPORT_C void RSocketHandler::SendTo ( const TDesC8& aData, TSockAddr& aAddr )
+	{
+	TSocketHandlerParams params ( EDescSendTo, &aData, &aAddr );
+	ActivateSocketHandler ( params );
+	}
+
+
+Applies an asynchronous I/O control operation on a socket.
+
+@param aCommand. Ioctl command.
+
+EXPORT_C void RSocketHandler::Ioctl ( TUint aCommand, TDes8* aData  = 0 , TUint aLevel  = KLevelUnspecified  )
+	{
+	TSocketHandlerParams params ( EIoctl, aCommand, aData, aLevel );	
+	ActivateSocketHandler ( params );					
+	}
+
+
+Cancels an outstanding socket operation.
+
+@param aOperation. Operation to be cancelled.
+
+EXPORT_C void RSocketHandler::Cancel ( TOperation aOperation )
+	{
+	CSocketHandler* handler = ActiveSocketHandler ( aOperation );
+	if ( handler )
+		handler->Cancel ();
+	}
+*/
+
+/**
+Cancels all outstanding operations.
+*/
+EXPORT_C void RSocketHandler::CancelAll ()
+	{
+	// The descrtrutor of CSocketHandler will take care of cancel
+	iSocketHandlers.ResetAndDestroy ();	
+	}
+
+/**
+Finds the first free socket handler to perform the socket operation and if none
+available it creates a new socket handler.
+
+@param aOperation. Socket operation to be performed.
+@return A free socket handler to perform the socket operation.
+*/
+CSocketHandler* RSocketHandler::FreeSocketHandler ( TOperation aOperation )
+	{
+	CSocketHandler* freeHandler = ActiveSocketHandler ( aOperation );
+	if ( freeHandler == NULL )
+		{
+		// No active socket handlers for this operation			
+		// Find the first free one
+		for ( TInt i = 0; i < iSocketHandlers.Count(); ++i )
+			{
+			if ( ( iSocketHandlers[i]->IsRunning ( aOperation ) ) )
+				{
+				return iSocketHandlers[i];	
+				}
+			}
+		// None available. Create one, append to the array and return
+		CSocketHandler* handler = new CSocketHandler ( iSocket, iObserver );
+		if ( handler != NULL )
+			{
+			iSocketHandlers.Append ( handler );
+			return handler;
+			}	
+		}
+	else if ( freeHandler->IsRunning ( aOperation ) )
+		{
+		__ASSERT_DEBUG ( 1, User::Invariant () );
+		}
+	
+	return freeHandler;
+	}
+
+/**
+Finds an active socket handler which matches the socket operation.
+
+@param aOperation. Socket operation to be performed.
+@return A free socket handler to perform the socket operation.
+*/
+CSocketHandler* RSocketHandler::ActiveSocketHandler ( TOperation aOperation )
+	{
+	// Find the active socket handler.
+	for ( TInt i = 0; i < iSocketHandlers.Count(); ++i )
+		{
+		if ( (iSocketHandlers[i]->IsRunning ( aOperation )) )
+			{
+			return iSocketHandlers[i];	
+			}
+		}
+	return NULL;	
+	}
+
+/**
+Finds or creates a socket handler which matches the socket operation and
+submits the request to socket handler.
+
+@param aParams. Socket operation parameters.
+*/
+void RSocketHandler::ActivateSocketHandler ( TSocketHandlerParams& aParams )
+	{
+	TOperation op = static_cast < TOperation > ( aParams.iArgs[0] );
+	CSocketHandler* handler = FreeSocketHandler ( op );
+	if ( handler == NULL )
+		{
+		// Possibly failed due to nomemory.
+		iObserver.Error ( op, KErrNoMemory ); 
+		return;			
+		}
+	handler->Activate ( aParams );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/bwins/chunkmgru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+EXPORTS
+	?Free@RMemChunk@@QAEXXZ @ 1 NONAME ; void RMemChunk::Free(void)
+	?CreateL@RMemChunk@@QAEXAAVTDesC8@@AAVRMemoryAllocator@@@Z @ 2 NONAME ABSENT ; void RMemChunk::CreateL(class TDesC8 &, class RMemoryAllocator &)
+	?Alloc@RMemChunk@@QAEHHAAVRMemoryAllocator@@@Z @ 3 NONAME ; int RMemChunk::Alloc(int, class RMemoryAllocator &)
+	?AddPoolL@CChunkManager@@QAEXHHHH@Z @ 4 NONAME ; void CChunkManager::AddPoolL(int, int, int, int)
+	?NewL@CChunkManager@@SAPAV1@H@Z @ 5 NONAME ; class CChunkManager * CChunkManager::NewL(int)
+	??1CChunkManager@@UAE@XZ @ 6 NONAME ; CChunkManager::~CChunkManager(void)
+	?Create@RMemChunk@@QAEHAAVTDesC8@@AAVRMemoryAllocator@@@Z @ 7 NONAME ABSENT ; int RMemChunk::Create(class TDesC8 &, class RMemoryAllocator &)
+	?CopyIn@RMemChunk@@QAEXABVTDesC8@@H@Z @ 8 NONAME ; void RMemChunk::CopyIn(class TDesC8 const &, int)
+	?Length@RMemChunk@@QBEHXZ @ 9 NONAME ; int RMemChunk::Length(void) const
+	?Goto@RMemChunk@@QBEHHAAPAVRMemCell@@AAH10@Z @ 10 NONAME ; int RMemChunk::Goto(int, class RMemCell * &, int &, int &, class RMemCell * &) const
+	?Assign@RMemChunk@@QAEXAAV1@@Z @ 11 NONAME ; void RMemChunk::Assign(class RMemChunk &)
+	?TrimStart@RMemChunk@@QAEXH@Z @ 12 NONAME ; void RMemChunk::TrimStart(int)
+	??ETMemCellIterator@@QAEPAVRMemCell@@H@Z @ 13 NONAME ; class RMemCell * TMemCellIterator::operator++(int)
+	?CopyOut@RMemChunk@@QBEXAAVTDes8@@H@Z @ 14 NONAME ; void RMemChunk::CopyOut(class TDes8 &, int) const
+	?Append@RMemChunk@@QAEXAAV1@@Z @ 15 NONAME ; void RMemChunk::Append(class RMemChunk &)
+	?Last@RMemCell@@QAEPAV1@XZ @ 16 NONAME ; class RMemCell * RMemCell::Last(void)
+	?Last@RMemChunk@@QBEPAVRMemCell@@XZ @ 17 NONAME ; class RMemCell * RMemChunk::Last(void) const
+	?Create@RMemChunk@@QAEHABVTDesC8@@AAVRMemoryAllocator@@@Z @ 18 NONAME ; int RMemChunk::Create(class TDesC8 const &, class RMemoryAllocator &)
+	?CreateL@RMemChunk@@QAEXABVTDesC8@@AAVRMemoryAllocator@@@Z @ 19 NONAME ; void RMemChunk::CreateL(class TDesC8 const &, class RMemoryAllocator &)
+	?Remove@RMemChunk@@QAEPAVRMemCell@@XZ @ 20 NONAME ; class RMemCell * RMemChunk::Remove(void)
+	?NumBufs@RMemChunk@@QBEHXZ @ 21 NONAME ; int RMemChunk::NumBufs(void) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/eabi/chunkmgru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,29 @@
+EXPORTS
+	_ZN13CChunkManager4NewLEi @ 1 NONAME
+	_ZN13CChunkManager8AddPoolLEiiii @ 2 NONAME
+	_ZN13CChunkManagerD0Ev @ 3 NONAME
+	_ZN13CChunkManagerD1Ev @ 4 NONAME
+	_ZN13CChunkManagerD2Ev @ 5 NONAME
+	_ZN16TMemCellIteratorppEi @ 6 NONAME
+	_ZN8RMemCell4LastEv @ 7 NONAME
+	_ZN9RMemChunk4FreeEv @ 8 NONAME
+	_ZN9RMemChunk5AllocEiR16RMemoryAllocator @ 9 NONAME
+	_ZN9RMemChunk6AppendERS_ @ 10 NONAME
+	_ZN9RMemChunk6AssignERS_ @ 11 NONAME
+	_ZN9RMemChunk6CopyInERK6TDesC8i @ 12 NONAME
+	_ZN9RMemChunk6CreateERK6TDesC8R16RMemoryAllocator @ 13 NONAME
+	_ZN9RMemChunk6RemoveEv @ 14 NONAME
+	_ZN9RMemChunk7CreateLERK6TDesC8R16RMemoryAllocator @ 15 NONAME
+	_ZN9RMemChunk9TrimStartEi @ 16 NONAME
+	_ZNK9RMemChunk4GotoEiRP8RMemCellRiS3_S2_ @ 17 NONAME
+	_ZNK9RMemChunk4LastEv @ 18 NONAME
+	_ZNK9RMemChunk6LengthEv @ 19 NONAME
+	_ZNK9RMemChunk7CopyOutER5TDes8i @ 20 NONAME
+	_ZNK9RMemChunk7NumBufsEv @ 21 NONAME
+	_ZTI13CChunkManager @ 22 NONAME
+	_ZTI15CChunkAllocator @ 23 NONAME
+	_ZTI9CMemChunk @ 24 NONAME
+	_ZTV13CChunkManager @ 25 NONAME
+	_ZTV15CChunkAllocator @ 26 NONAME
+	_ZTV9CMemChunk @ 27 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+/*
+* 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:
+*
+*/
+
+
+
+PRJ_TESTEXPORTS
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/cchunkmanager.h	/epoc32/include/cchunkmanager.h
+#endif
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/rmemchunk.h 		/epoc32/include/rmemchunk.h
+#endif
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/rmemcell.h 		/epoc32/include/rmemcell.h
+#endif
+
+
+PRJ_TESTMMPFILES
+chunkmgr.mmp
+#include "../ts_chunkmgr/group/bld.inf"
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/group/chunkmgr.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* 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:
+*
+*/
+
+
+TARGET		  chunkmgr.dll
+TARGETTYPE	  dll
+UID			 0x1000008d 0x2000D05A // TODO new UID3
+CAPABILITY	 CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+USERINCLUDE	 ../inc
+SYSTEMINCLUDE   /epoc32/include
+
+SOURCEPATH ../src
+SOURCE	cchunkallocator.cpp
+SOURCE	cchunkmanager.cpp
+SOURCE	cmemchunk.cpp
+SOURCE	rchunkpool.cpp
+SOURCE	rmemcell.cpp
+SOURCE	rmemchunk.cpp
+
+
+LIBRARY		 euser.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/cchunkallocator.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#ifndef __CCHUNKALLOCATOR_H_
+#define __CCHUNKALLOCATOR_H_
+
+class CChunkAllocator : public CBase
+	{
+public:
+	static CChunkAllocator* NewL ( TInt aHeapSize );
+	~CChunkAllocator ();
+	
+	TAny* Alloc ( TInt aSize );
+	void Free ( TAny* aPtr );
+	
+private:
+	CChunkAllocator ();
+	void ConstructL ( TInt aHeapSize );
+
+private:
+	RHeap* iHeap;
+	};
+
+
+#endif /*__CCHUNKALLOCATOR_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/cchunkmanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,59 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __CCHUNKMANAGER_H_
+#define __CCHUNKMANAGER_H_
+
+#include <e32def.h>
+
+//Forward declaration
+class CChunkAllocator;
+class RChunkPool;
+class RMemCellList;
+class RMemCell;
+
+class CChunkManager : public CBase
+	{
+public:
+	IMPORT_C static CChunkManager* NewL ( TInt aHeapSize );
+	IMPORT_C ~CChunkManager ();
+	
+	IMPORT_C void AddPoolL ( TInt aBlockSize, TInt aNumBlocks, TInt aThresholdValue, TInt aMinGrowth );
+	
+	CChunkAllocator& Allocator ();
+	TInt AllocChunk ( RChunkPool& aChunkPool, TInt aNumBlocks );
+	RMemCell* Alloc ( TInt aSize );
+	void Free ( RMemCell* aPtr );
+	
+	// returns free space that can be used for CMemChunk after excluding sizeof CMemChunk
+	TInt BytesAvailable ();
+	
+private:
+	CChunkManager ( TInt aHeapSize );
+	void ConstructL ();	
+	void SearchAndAlloc ( RMemCellList& aList, TInt aSize );	
+	
+private:
+	CChunkAllocator* 	iChunkAllocator;
+	RArray<RChunkPool> 	iChunkPools;
+	RFastLock 			iLock;
+	TInt				iHeapSize;
+	TInt				iUsedSpace;
+	};
+
+#endif /*__CCHUNKMANAGER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/cmemchunk.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,91 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#ifndef __CMEMCHUNK_
+#define __CMEMCHUNK_
+#include "rmemcell.h"
+
+class RMemCellList
+	{
+public:
+	RMemCellList ()
+		{
+		Init ();
+		}
+	RMemCellList ( RMemCell* aFirst, RMemCell* aLast )
+		: iNext ( aFirst ), iLast ( aLast )
+		{
+		
+		}
+	
+	void Append ( RMemCell* aPtr );
+	void Append ( RMemCellList& aList );
+	TInt Transfer ( RMemCellList& aList, TInt aSize );
+	
+	void Init ()
+		{
+		iNext = iLast = NULL;		
+		}
+	
+	TBool IsEmpty ()
+		{
+		return ( iNext == NULL ) ? ETrue : EFalse;	
+		}
+	RMemCell* First ()
+		{
+		return iNext;		
+		}
+	
+	RMemCell* Last ()
+		{
+		return iLast;
+		}
+		
+private:
+	RMemCell* iNext;
+	RMemCell* iLast;		
+	};
+
+class CMemChunk : public CBase
+	{
+public:
+	static CMemChunk* New ( CChunkAllocator& aAllocator, RChunkPool& aChunkPool, TInt aNumBlocks , TInt aBlockSize );
+	~CMemChunk ();
+	RMemCellList& List ()
+		{
+		return iQueue;
+		}
+	TInt NumBlocks ()
+		{
+		return iNumBlocks;
+		}
+		
+private:
+	CMemChunk ( CChunkAllocator& aAllocator, TInt aNumBlocks );
+	TAny* operator new (TUint aNumBlocks, TInt aExtra, CChunkAllocator& aAllocator );
+	void operator delete ( TAny* aPtr, TInt aExtra, CChunkAllocator& aAllocator );
+	void CMemChunk::operator delete ( TAny* aPtr );
+	
+private:
+	RMemCellList		iQueue;
+	CChunkAllocator&	iChunkAllocator;	
+	TUint				iNumBlocks;
+	};
+
+#endif /*__CMEMCHUNK_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/rchunkpool.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,94 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __RCHUNKPOOL_H_
+#define __RCHUNKPOOL_H_
+
+#include "cmemchunk.h"
+
+class RChunkPool
+	{
+public:
+	RChunkPool ( TInt aBlockSize, TInt aThresholdValue, TInt aMinGrowth, CChunkManager& aChunkManager );
+	RChunkPool ( CChunkManager& aChunkManager, TInt aBlockSize );
+	
+	void OpenL ();
+	void Close ();
+	
+	TInt Alloc ( RMemCellList& aList, TInt aSize );
+	TInt GrowAndAlloc ( RMemCellList& aList, TInt aSize, TInt aNumBlocks );
+	void FreeToPool ( RMemCell* aMemCell );
+	void AppendToFreeList ( CMemChunk* aChunk );
+	static TInt Compare ( const RChunkPool& aLHSPool, const RChunkPool& aRHSPool );
+	
+	TInt BlockSize () const
+		{
+		return iBlockSize;
+		}
+		
+	void Wait ()
+		{
+		iFreeListLock.Wait ();
+		}
+	
+	void Signal ()
+		{
+		iFreeListLock.Signal ();
+		}
+		
+	void SetThreshold ( TInt aThreshold )
+		{
+		iThresholdValue = aThreshold;
+		}
+		
+	void SetGrowth ( TInt aGrowth )
+		{
+		iMinGrowth = aGrowth;
+		}
+		
+	void Append ( CMemChunk* aNewChunk )
+		{
+		iAllocatedChunks.Append ( aNewChunk );
+		}
+		
+	TInt FreeSpace ()
+		{
+		return iFreeSpace;
+		}
+		
+	CChunkManager& ChunkManager ()
+		{
+		return iChunkManager;
+		}
+		
+private:	
+	TInt GrowPool ( TUint aNumBlocks );
+	
+private:
+	TInt						iBlockSize;
+	RPointerArray<CMemChunk>	iAllocatedChunks;
+	CChunkManager&				iChunkManager;
+	RMemCellList				iFreeBlocks;
+	RFastLock					iFreeListLock;
+	TInt						iFreeSpace;
+	TInt						iUsedSpace; //TODO: can be removed???
+	TInt 						iThresholdValue;
+	TInt 						iMinGrowth;
+	};
+
+#endif /*__RCHUNKPOOL_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/rmemcell.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,119 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __RMEMCELL_H_
+#define __RMEMCELL_H_
+
+#include <e32base.h>
+
+class RChunkPool;
+
+class RMemCell
+	{
+public:
+	RMemCell ( RChunkPool* aChunkPool, TUint8* aBuffer, TInt aBlockSize );	
+	
+	
+	inline TUint8* Ptr ();
+	
+	void Free ();
+	
+	TAny* operator new ( TUint aSize, RMemCell* aPtr );
+	void operator delete (  TAny* aPtr, RMemCell* aMemCell );
+	
+	inline TUint Size ();
+	inline TUint8* Buffer();
+	inline TInt Length() const;
+	inline void SetOffset(TInt aOffset);
+	inline TInt Offset() const;
+	inline void SetData(TInt aOffset, TInt aLength);
+	inline void Unlink();
+	inline void Link(RMemCell* aBuf);
+	inline RMemCell* Next ();
+	RChunkPool* Pool ();	
+	IMPORT_C RMemCell* Last();
+	
+	inline void SetLength ( TInt aLength );
+	
+private:
+	TUint8* const 	iBuffer;
+	RChunkPool* 	iChunkPool;
+	const TInt 		iMaxSize;
+	TInt 			iOffset;
+	TInt			iLength;	
+	RMemCell*		iNextCell;
+	};
+
+TUint RMemCell::Size ()	
+	{
+	return iMaxSize;
+	}
+
+inline TUint8* RMemCell::Buffer()
+	{ 
+	return iBuffer;
+	}
+
+inline TInt RMemCell::Length() const
+	{ 
+	return iLength; 
+	}
+
+inline void RMemCell::SetOffset(TInt aOffset)
+	{ 
+	iOffset = aOffset; 
+	}
+
+inline TInt RMemCell::Offset() const
+	{ 
+	return iOffset; 
+	}
+
+inline void RMemCell::Unlink()
+	{ 
+	iNextCell = NULL; 
+	}
+
+inline void RMemCell::SetData(TInt aOffset, TInt aLength)
+	{ 
+	SetOffset(aOffset);  
+	SetLength(aLength); 
+	}
+
+inline void RMemCell::SetLength ( TInt aLength )
+	{
+	iLength = aLength;
+	}
+
+inline TUint8* RMemCell::Ptr ()
+	{
+	return iBuffer+iOffset;
+	}
+
+inline void RMemCell::Link(RMemCell* aBuf)
+	{ 
+	iNextCell = aBuf; 
+	}
+	
+inline RMemCell* RMemCell::Next ()
+	{
+	return iNextCell;
+	}
+
+
+#endif /*__RMEMCELL_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/inc/rmemchunk.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,118 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#ifndef __RMEMCHUNK_
+#define __RMEMCHUNK_
+
+#include <e32base.h>
+#include <cchunkmanager.h>
+
+//forward Declaration
+class RMemoryAllocator;
+
+class RMemChunk
+	{
+public:
+	inline RMemChunk ()
+		{
+		iNextCell = NULL;
+		}
+		
+	IMPORT_C TInt Alloc ( TInt aSize, RMemoryAllocator& aAllocator );
+	IMPORT_C TInt Create ( const TDesC8& aDes, RMemoryAllocator& aAllocator );
+	IMPORT_C void CreateL ( const TDesC8& aDes,RMemoryAllocator& aAllocator );
+	IMPORT_C void Free ();
+	IMPORT_C RMemCell* Remove();
+	IMPORT_C TInt NumBufs() const;
+	IMPORT_C TInt Length() const;
+	IMPORT_C void TrimStart(TInt anOffset);
+	IMPORT_C void CopyIn(const TDesC8& aDes, TInt aOffset=0);
+	IMPORT_C void CopyOut(TDes8 &aDes, TInt aOffset=0) const;
+	IMPORT_C TBool Goto(TInt anOffset, RMemCell* &resBuf, TInt& resOffset, TInt& resLength, RMemCell* &resPrevBuf) const;
+	IMPORT_C void Assign(RMemChunk& aChain);
+	IMPORT_C void Append(RMemChunk& aChain);
+	IMPORT_C RMemCell* Last() const;
+	inline RMemCell* First ();
+	inline TBool IsEmpty() const;
+	inline void Init();
+	
+private:
+	RMemCell*	iNextCell;
+	};
+	
+inline TBool RMemChunk::IsEmpty() const
+	{ 
+	return iNextCell==NULL; 
+	}
+
+inline void RMemChunk::Init()
+	{ 
+	iNextCell = NULL;	
+	}
+
+class RMemoryAllocator
+	{
+public:
+	RMemoryAllocator ( CChunkManager* aManager )
+		: iManager ( aManager )
+		{	}
+	
+	CChunkManager* ChunkManager ()
+		{
+		return iManager;
+		}
+	
+	RMemoryAllocator (  )
+		: iManager ( NULL )
+			{	}
+	
+	void SetChunkManager (CChunkManager* aChunkMgr)
+		{
+		iManager = aChunkMgr;
+		}
+private:
+	CChunkManager* iManager;	
+	};	
+
+inline RMemCell* RMemChunk::First ()
+	{
+	return iNextCell;
+	}
+	
+
+class TMemCellIterator
+	{
+	public:
+		TMemCellIterator();
+		inline TMemCellIterator(RMemCell* aChain);
+		inline TMemCellIterator(RMemChunk& aMemChunk);
+		IMPORT_C RMemCell* operator++(TInt);
+	private:
+		RMemCell* iMemCell;
+		
+	};
+
+inline TMemCellIterator::TMemCellIterator(RMemChunk& aMemChunk)
+	: iMemCell(aMemChunk.First()) 
+	{ }
+
+inline TMemCellIterator::TMemCellIterator(RMemCell* aChain)
+	: iMemCell(aChain)
+	{ }
+
+#endif /*__RMEMCHUNK_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/cchunkallocator.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,60 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include "cchunkallocator.h"
+#include "cmemchunk.h"
+
+CChunkAllocator* CChunkAllocator::NewL ( TInt aHeapSize )
+	{
+	CChunkAllocator* chunkAllocator = new ( ELeave ) CChunkAllocator;
+	CleanupStack::PushL ( chunkAllocator );
+	chunkAllocator->ConstructL ( aHeapSize );
+	CleanupStack::Pop ();
+	
+	return chunkAllocator;
+	}
+
+CChunkAllocator::CChunkAllocator ()
+	{
+	}
+
+CChunkAllocator::~CChunkAllocator ()
+	{
+	iHeap->Close ();
+	}
+
+void CChunkAllocator::ConstructL ( TInt aHeapSize )
+	{
+	iHeap = UserHeap::ChunkHeap ( NULL, 0, aHeapSize );
+	if ( NULL == iHeap )
+		{
+		User::Leave ( KErrNoMemory );
+		}
+	}
+
+TAny* CChunkAllocator::Alloc ( TInt aSize )
+	{
+	return iHeap->Alloc ( aSize );
+	}
+
+void CChunkAllocator::Free ( TAny* aPtr )
+	{
+	CMemChunk* chunk = ( CMemChunk* ) aPtr;
+	iHeap->Free ( chunk );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/cchunkmanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,274 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include "cchunkmanager.h"
+#include "cchunkallocator.h"
+#include "cmemchunk.h"
+#include "rchunkpool.h"
+#include "rmemcell.h"
+
+EXPORT_C CChunkManager* CChunkManager::NewL ( TInt aHeapSize )
+	{
+	CChunkManager* self = new ( ELeave ) CChunkManager ( aHeapSize );
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop ( self );
+	return self;
+	}
+
+CChunkManager::CChunkManager ( TInt aHeapSize )
+	:iHeapSize ( aHeapSize )
+	{
+	}
+	
+EXPORT_C CChunkManager::~CChunkManager ()
+	{
+	delete iChunkAllocator;
+	for ( TInt i = 0; i < iChunkPools.Count (); i++ )
+		{
+		iChunkPools[i].Close ();
+		}
+	iChunkPools.Close ();
+	iLock.Close ();
+	}
+	
+void CChunkManager::ConstructL ()
+	{
+	User::LeaveIfError ( iLock.CreateLocal () );
+	iChunkAllocator = CChunkAllocator::NewL ( iHeapSize );
+	}
+	
+CChunkAllocator& CChunkManager::Allocator ()
+	{
+	return *iChunkAllocator;
+	}
+	
+EXPORT_C void CChunkManager::AddPoolL ( TInt aBlockSize, TInt aNumBlocks, TInt aThresholdValue, TInt aMinGrowth )
+	{
+	__ASSERT_ALWAYS ( aBlockSize > 0, User::Invariant () ); // TODO
+    __ASSERT_ALWAYS ( aNumBlocks > 0, User::Invariant () );
+    __ASSERT_ALWAYS ( aThresholdValue >= 0, User::Invariant () );
+   	__ASSERT_ALWAYS ( aMinGrowth >= 0, User::Invariant () );
+   	    
+    // aling the block size
+   	const TUint8 KMemAlignment = 8;
+   	TInt blockPadding = aBlockSize % KMemAlignment;
+	if ( blockPadding != 0 )
+    	{
+	 	aBlockSize += KMemAlignment - blockPadding;
+        }
+    if ( aMinGrowth == 0 )
+      	{
+        aMinGrowth = 1;
+        }
+ 	
+ 	
+ 	//maintains iChunkPools in blocks size order
+    TInt found = KErrNotFound;
+    TInt index = 0;
+    RChunkPool tempPool ( *this, aBlockSize );
+    found  = iChunkPools.FindInOrder ( tempPool, index, TLinearOrder<RChunkPool>(RChunkPool::Compare) );
+    
+    // create a new pool chain
+    if ( found == KErrNotFound )
+   		{
+        RChunkPool pool ( aBlockSize, aThresholdValue, aMinGrowth, *this );
+        //maintains iChunkPools in blocks size order
+        User::LeaveIfError ( iChunkPools.Insert ( pool, index ) );
+        
+        RChunkPool* chunkPool = &iChunkPools[index];
+		chunkPool->OpenL ();
+		
+        // Lock the freelist, inorder to add new blocks to the free list
+        chunkPool->Wait ();
+        TInt err = AllocChunk ( *chunkPool, aNumBlocks );
+        chunkPool->Signal ();
+		
+        User::LeaveIfError ( err );
+    	}
+	else
+    	{
+        // update existing values
+        iChunkPools[found].SetGrowth ( aMinGrowth );
+        iChunkPools[found].SetThreshold ( aThresholdValue );
+        }
+	}
+	
+TInt CChunkManager::AllocChunk ( RChunkPool& aChunkPool, TInt aNumBlocks )
+	{
+    // verify if maximum size is exceeded
+    if ( ( iUsedSpace + aNumBlocks * aChunkPool.BlockSize () ) > iHeapSize )
+        {
+        return KErrNoMemory;
+        }
+	
+    CMemChunk* newChunk = CMemChunk::New ( *iChunkAllocator, aChunkPool, aNumBlocks, aChunkPool.BlockSize () );
+	if ( newChunk != NULL )
+        {
+        iLock.Wait ();
+        aChunkPool.Append ( newChunk );
+        iLock.Signal ();
+		
+		// RChunkPool lock is already acquired
+        aChunkPool.AppendToFreeList ( newChunk );
+		
+        iUsedSpace += sizeof ( CMemChunk ) + ( aNumBlocks * aChunkPool.BlockSize () ) ;
+        return KErrNone;
+        }
+	
+	return KErrNoMemory;
+	}
+
+RMemCell* CChunkManager::Alloc ( TInt aSize )
+	{
+	TInt poolsCount = iChunkPools.Count ();
+	__ASSERT_DEBUG ( poolsCount != 0, User::Invariant () ); //TODO
+	
+	RMemCellList list;
+	// Search and get the avaliable memCell list
+	SearchAndAlloc ( list, aSize );
+	
+	return list.First ();
+	}
+	
+void CChunkManager::SearchAndAlloc ( RMemCellList& aList, TInt aSize )
+	{
+	if ( aSize == 0 ) 
+		{
+		__ASSERT_ALWAYS ( 0, User::Invariant () ); //TODO
+		}
+	
+	RChunkPool* poolChosen = NULL;
+	RChunkPool* startPool = &iChunkPools[0];
+	RChunkPool* pool = &iChunkPools[iChunkPools.Count () - 1];
+	
+	TInt minUnusedBytes = 0, minBlocks = 0;
+	
+	do
+		{
+		TInt blockSize = pool->BlockSize ();
+		
+		TInt unusedBytes = aSize % blockSize;
+		TInt neededBlocks = aSize / blockSize;
+		
+		if ( unusedBytes != 0 )
+			{
+			unusedBytes = blockSize - unusedBytes;
+			neededBlocks += 1;
+			}
+		
+		if ( poolChosen == NULL ) //for the first time this will be true
+			{
+			poolChosen = pool;
+			minUnusedBytes = unusedBytes;
+			minBlocks = neededBlocks;
+			}
+		else
+			{
+			if ( unusedBytes == minUnusedBytes )
+				{
+				if ( neededBlocks < minBlocks )
+					{
+					poolChosen = pool;
+					minUnusedBytes = unusedBytes;
+					minBlocks = neededBlocks;
+					}
+				}
+			else if ( unusedBytes < minUnusedBytes )
+				{
+				poolChosen = pool;
+				minUnusedBytes = unusedBytes;
+				minBlocks = neededBlocks;
+				}
+			}
+		} while ( pool-- != startPool );
+	
+	if ( poolChosen == NULL )
+		{
+		__ASSERT_DEBUG ( 0, User::Invariant () );
+		}
+	
+	TUint allocatedBytes = 0;
+	TBool growthFailed = EFalse;
+	if ( aSize <= poolChosen->FreeSpace () )
+		{
+		allocatedBytes = poolChosen->Alloc ( aList, aSize );
+		}
+	else
+		{
+		allocatedBytes = poolChosen->GrowAndAlloc ( aList, aSize, minBlocks );
+				
+		if ( allocatedBytes == 0 )
+			{
+			// need to search for the next best match and however, this time
+			// requesting pool to grow may not be worth :), as only error condition is KErrNoMemory
+			growthFailed = ETrue;
+			}
+		}
+	
+	if ( allocatedBytes >= aSize )
+		{
+		return;
+		}
+	else if ( growthFailed )
+		{
+		// just get the pool that can satisfy the request, no more best,good,worst match
+		for ( TInt i = 0; i < iChunkPools.Count (); i++ )
+			{			
+			if ( aSize <= iChunkPools[i].FreeSpace () )
+				{
+				allocatedBytes = iChunkPools[i].Alloc ( aList, aSize );
+				break;
+				}
+			}
+		}
+	}
+	
+TInt CChunkManager::BytesAvailable ()
+	{
+	TInt freeSpace = iHeapSize - iUsedSpace;
+	
+	freeSpace -= sizeof ( CMemChunk );
+	
+	return freeSpace <= 0 ? KErrNoMemory : freeSpace;
+	}
+	
+// return a chain of MBufs to the pool
+void CChunkManager::Free ( RMemCell* aPtr )
+	{
+	RChunkPool* pool ( aPtr->Pool () );
+	pool->Wait ();
+	
+	while ( aPtr != NULL )
+		{
+		RMemCell* nextPtr = aPtr->Next ();
+		
+		// reset length to the size of the block and break the link
+		aPtr->SetLength ( aPtr->Size () );
+		aPtr->Link ( NULL );
+		
+		// adds single block back to its free list and adjusts its free space
+		pool->FreeToPool ( aPtr );
+		
+		aPtr = nextPtr;
+		}
+	pool->Signal ();
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/cmemchunk.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,179 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include "cchunkallocator.h"
+#include "rmemcell.h"
+#include "cmemchunk.h"
+
+#define MASK 0x03
+#define WORD_ALIGN(x) ( ( ( (x) + (MASK) )& ~MASK ) ) // aligns 'x' to the nearest word size
+#define IS_WORD_ALIGNED(x) ( ( (TUint32)(x) & MASK ) == 0 )
+
+
+CMemChunk* CMemChunk::New ( CChunkAllocator& aAllocator, RChunkPool& aChunkPool, TInt aNumBlocks , TInt aBlockSize )
+	{
+	// allocates chunk on shared Heap using ::new operator
+	
+	// round of RMemCell & aBlockSize to the nearest word size.
+	TInt memCellSize = WORD_ALIGN ( sizeof ( RMemCell ) );
+	TInt blockSize = WORD_ALIGN ( aBlockSize );
+	
+	CMemChunk* chunk = new ( aNumBlocks * ( memCellSize + blockSize ), aAllocator ) CMemChunk ( aAllocator, aNumBlocks );
+	
+	// In the complete memory allocated on shared heap; first bytes are of CMemChunk,
+	// then start the memory required for RMemCell * NumBlocks and at the end contains
+	// the actual data buffer.
+	
+	if ( chunk != NULL )
+		{
+		// memory required for CMemChunk and for its parameters storage
+		TUint8* chunkSize = ( ( TUint8* ) chunk ) + sizeof ( CMemChunk );
+	 	__ASSERT_DEBUG ( IS_WORD_ALIGNED ( chunkSize ), User::Invariant () ); // TODO Proper panic code
+		
+	 	// memory required for RMemCell and its parameters storage
+		TUint8* dataBufStart = chunkSize + ( aNumBlocks * memCellSize );
+		
+		// now place each RMemCell and its databuffer in the address specified
+		for ( TInt i = 0; i < aNumBlocks ; i++ )
+			{
+			// address assigned for RMemCell 'i'
+			RMemCell* hdr = ( RMemCell* ) ( chunkSize + i * memCellSize );
+			
+			// overloaded ::new, that makes in-place allocation of MemCell at specified address
+			( void ) new ( hdr ) RMemCell ( &aChunkPool, dataBufStart + ( i * aBlockSize ), aBlockSize );
+			
+			// completed construction of a RMemCell.
+			chunk->iQueue.Append ( hdr );
+			}
+		}
+	
+	return chunk;
+	}
+
+CMemChunk::CMemChunk ( CChunkAllocator& aAllocator, TInt aNumBlocks )
+	: iChunkAllocator ( aAllocator ), iNumBlocks ( aNumBlocks )
+	{
+	}
+
+CMemChunk::~CMemChunk ()
+	{	
+	}
+
+TAny* CMemChunk::operator new ( TUint aSize, TInt aExtra, CChunkAllocator& aAllocator )
+	{
+	return aAllocator.Alloc ( aSize + aExtra );
+	}
+
+void CMemChunk::operator delete ( TAny* aPtr, TInt /*aExtra*/, CChunkAllocator& /*aAllocator*/ )
+	{
+	CMemChunk::operator delete ( aPtr );
+	}
+
+void CMemChunk::operator delete ( TAny* aPtr )
+	{
+	if ( aPtr )
+		{
+		( ( CMemChunk* ) aPtr )->iChunkAllocator.Free ( aPtr );
+		}
+	}
+
+void RMemCellList::Append ( RMemCell* aPtr )
+	{
+	if ( IsEmpty () )	
+		{
+		iNext = iLast = aPtr;
+		}
+	else
+		{
+		iLast->Link ( aPtr );
+		iLast = aPtr;
+		}
+	}
+	
+void RMemCellList::Append ( RMemCellList& aList )
+	{
+	if ( aList.IsEmpty () )
+		{
+		return;
+		}
+	
+	if ( this->IsEmpty () )
+		{
+		iNext = aList.First ();
+		iLast = aList.Last ();		
+		}
+	else
+		{
+		iLast->Link ( aList.First () );
+		iLast = aList.Last ();
+		}
+	aList.Init ();
+	}
+	
+TInt RMemCellList::Transfer ( RMemCellList& aList, TInt aSize )
+	{
+	__ASSERT_DEBUG ( aSize >= 0, User::Invariant () ); //TODO
+	TInt transferedBytes = 0;
+	
+	if ( !IsEmpty () )
+		{
+		RMemCell* first;
+		RMemCell* next;
+		RMemCell* last;
+		
+		// catch hold of first link
+		first = iNext;
+		next = first;
+		last = first;
+		
+		while ( aSize >= 0 && next != NULL )
+			{
+			transferedBytes += next->Size ();
+			aSize -= next->Size ();
+			
+			last = next;
+			
+			next = next->Next ();
+			
+			if ( aSize == 0 )
+				{
+				break;
+				}
+			}
+		last->SetLength(aSize + last->Size());
+		
+		if ( next == NULL ) // all the blocks are transfferred
+			{
+			Init ();
+			}
+		else 				// still left with more blocks, so adjust the start & End links
+			{
+			last->Link ( NULL );
+			iNext = next;
+			}
+		
+		// now the last link is ready to use
+		RMemCellList newList ( first, last );
+		aList.Append ( newList );
+		}
+	
+	return transferedBytes;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/rchunkpool.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,141 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include "cchunkmanager.h"
+#include "rmemcell.h"
+#include "cmemchunk.h"
+#include "rchunkpool.h"
+
+
+RChunkPool::RChunkPool ( TInt aBlockSize, TInt aThresholdValue, TInt aMinGrowth, CChunkManager& aChunkManager )
+		: iBlockSize ( aBlockSize ),
+	      iChunkManager ( aChunkManager ),
+		  iThresholdValue ( aThresholdValue ),
+	      iMinGrowth ( aMinGrowth )
+	{
+	iFreeBlocks.Init ();
+	iFreeSpace = 0;
+	}
+
+RChunkPool::RChunkPool ( CChunkManager& aChunkManager, TInt aBlockSize )
+	: iBlockSize ( aBlockSize ),
+	  iChunkManager ( aChunkManager )
+	{	
+	}
+	
+void RChunkPool::OpenL ()
+	{
+	User::LeaveIfError ( iFreeListLock.CreateLocal () );
+	}
+	
+void RChunkPool::Close ()
+	{
+	iFreeListLock.Close ();
+	iAllocatedChunks.Close ();
+	}
+	
+TInt RChunkPool::Compare ( const RChunkPool& aLHSPool, const RChunkPool& aRHSPool )
+	{
+	if ( aLHSPool.BlockSize () < aRHSPool.BlockSize () )
+		{
+		return -1;
+		}
+	else if ( aLHSPool.BlockSize () > aRHSPool.BlockSize ()  )
+		{
+		return 1;
+		}
+	return 0;
+	}
+		
+void RChunkPool::AppendToFreeList ( CMemChunk* aChunk )
+	{
+	iFreeSpace += iBlockSize * aChunk->NumBlocks ();
+	iFreeBlocks.Append ( aChunk->List () );
+	}	
+
+
+// transfer's blocks from free list and makes self growth if necessary
+TInt RChunkPool::Alloc ( RMemCellList& aList, TInt aSize )
+	{
+	// Lock the freelist so that 
+	// Transfer of free blocks will be an atomic operation
+	iFreeListLock.Wait ();
+	
+	TInt bytesTransfered = iFreeBlocks.Transfer ( aList, aSize );
+	iFreeSpace -= bytesTransfered;
+	
+	TInt freeHeapSpace = iChunkManager.BytesAvailable ();
+	
+	if ( freeHeapSpace ) // makes sure that heap has memory atleast for CMemChunk object, but not for its chunk
+		{
+		// check if freeblocks is down the threshold value and make self growth if necessary
+		// determine min number of blocks to allocate
+		TInt minGrowth = iThresholdValue - ( iFreeSpace / iBlockSize );
+		
+		if ( minGrowth >= 0 )
+			{
+			if ( GrowPool ( iMinGrowth ) == KErrNoMemory )
+				{
+			 	// unable to grow the minimum value set by the client
+			 	if ( minGrowth < iMinGrowth )
+				 	{
+			 		// so, now try with the min value adjusted with threshold value
+			 		GrowPool ( minGrowth );
+				 	}
+			 	}
+			}
+		}
+	
+	// free the freelistlock
+	iFreeListLock.Signal ();
+	
+	return bytesTransfered;
+	}
+	
+TInt RChunkPool::GrowPool ( TUint aNumBlocks )
+	{
+	return iChunkManager.AllocChunk ( *this, aNumBlocks );
+	}
+	
+TInt RChunkPool::GrowAndAlloc ( RMemCellList& aList, TInt aSize, TInt aNumBlocks )
+	{
+	// Lock the freelist so that
+	// Transfer of free blocks will be an atomic operation
+	TInt bytesTransfered = 0;
+	iFreeListLock.Wait ();
+	
+	if ( GrowPool ( aNumBlocks ) != KErrNoMemory )
+	 	{
+	 	bytesTransfered = iFreeBlocks.Transfer ( aList, aSize );
+		iFreeSpace -= bytesTransfered;
+	 	}
+	
+	// free the freelistlock
+	iFreeListLock.Signal ();
+	
+	return bytesTransfered;
+	}
+	
+void RChunkPool::FreeToPool ( RMemCell* aMemCell )
+	{
+	iFreeBlocks.Append ( aMemCell );
+	iFreeSpace += aMemCell->Size ();
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/rmemcell.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,66 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include "cchunkmanager.h"
+#include "cmemchunk.h"
+#include "rchunkpool.h"
+#include "rmemcell.h"
+
+RMemCell::RMemCell ( RChunkPool* aChunkPool, TUint8* aBuffer, TInt aBlockSize )
+	: iBuffer ( aBuffer ),
+	  iChunkPool ( aChunkPool ),
+	  iMaxSize ( aBlockSize ),
+	  iOffset ( 0 ),
+	  iLength ( aBlockSize ),
+	  iNextCell ( NULL )
+	{
+	}
+
+TAny* RMemCell::operator new ( TUint , RMemCell* aPtr )
+	{
+	return aPtr;
+	}
+	
+void RMemCell::operator delete ( TAny* , RMemCell* )
+	{
+	}
+
+void RMemCell::Free ()
+	{
+	iChunkPool->ChunkManager().Free ( this );
+	}
+	
+RChunkPool* RMemCell::Pool ()
+	{
+	return iChunkPool;
+	}
+
+EXPORT_C RMemCell* RMemCell::Last()
+{
+	RMemCell* c = iNextCell;
+	RMemCell* p = this;
+
+	while (c != NULL)
+		{
+		p = c;
+		c = c->Next();
+		}
+	return p;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/src/rmemchunk.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,232 @@
+ // 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include "rmemcell.h"
+#include "rmemchunk.h"
+
+EXPORT_C TInt RMemChunk::Alloc ( TInt aSize, RMemoryAllocator& aAllocator )
+	{
+	if ( aSize == 0 )
+		{
+		return KErrNone;
+		}
+		
+	__ASSERT_ALWAYS ( iNextCell == NULL, User::Invariant () ); //TODO
+	iNextCell = aAllocator.ChunkManager ()->Alloc ( aSize );
+	return iNextCell == NULL ? KErrNoMemory : KErrNone;
+	}
+	
+EXPORT_C void RMemChunk::CreateL ( const TDesC8& aDes, RMemoryAllocator& aAllocator )
+	{
+	User::LeaveIfError ( Create ( aDes, aAllocator ) );
+	}
+	
+EXPORT_C TInt RMemChunk::Create ( const TDesC8& aDes, RMemoryAllocator& aAllocator )
+	{
+	TInt err = Alloc ( aDes.Length (), aAllocator );
+	if ( err == KErrNone )
+		{
+		// copy descriptor to the memchunk allocated.
+		CopyIn(aDes);
+		}
+	return  err;
+	}
+	
+EXPORT_C void RMemChunk::Free ()
+	{
+	if ( iNextCell )
+		iNextCell->Free ();
+	iNextCell = NULL;
+	}
+
+EXPORT_C void RMemChunk::CopyIn(const TDesC8& aDes, TInt aOffset)
+	{
+	__ASSERT_ALWAYS(iNextCell!=NULL, User::Invariant ());
+	__ASSERT_ALWAYS(aOffset>=0, User::Invariant ());
+
+	TUint8* ptr = (TUint8*)aDes.Ptr();
+	TInt len = aDes.Length();
+
+	TInt n;
+	RMemCell* m=iNextCell;
+
+	while (len>0 && m!=NULL)
+		{
+		n = len > m->Length() ? m->Length() : len;
+		Mem::Copy(m->Ptr(), ptr, n);
+		ptr += n;
+		len -= n;
+		m = m->Next();
+		}
+	}
+
+EXPORT_C void RMemChunk::CopyOut(TDes8& aDes, TInt aOffset) const
+	{
+	__ASSERT_ALWAYS(aOffset>=0, User::Invariant ());
+
+	TUint8* ptr = (TUint8*)aDes.Ptr();
+	TInt len = aDes.Length();
+
+	TInt n;
+	RMemCell* m = iNextCell;
+	
+	while (len>0 && m!=NULL)
+		{
+		n = len > m->Length() ? m->Length() : len;
+		Mem::Copy(ptr, m->Ptr(), n);
+		ptr += n;
+		len -= n;
+		m = m->Next();
+		}
+	aDes.SetLength(ptr-aDes.Ptr());
+	}
+
+
+
+EXPORT_C TBool RMemChunk::Goto(TInt anOffset, RMemCell* &resBuf, TInt& resOffset, TInt& resLength, RMemCell* &resPrevBuf) const
+	{
+	__ASSERT_ALWAYS(iNextCell!=NULL, User::Invariant ());
+	__ASSERT_ALWAYS(anOffset>=0, User::Invariant ());
+
+	TInt o = 0;
+	RMemCell* p = NULL, *m = iNextCell;
+
+	while (m!=NULL)
+		{
+		if (o + m->Length() > anOffset)
+			{
+			resBuf = m;
+			resOffset = (anOffset - o) + m->Offset();
+			resLength = m->Length() - (anOffset - o);
+			resPrevBuf = p;
+			return ETrue;
+			}
+		o += m->Length();
+		p = m;
+		m = m->Next();
+		}
+
+	__ASSERT_ALWAYS(o==anOffset, User::Invariant ());
+	return EFalse;
+	}
+
+EXPORT_C TInt RMemChunk::Length() const
+	{
+	TInt len = 0;
+	RMemCell* m;
+	for (m = iNextCell; m!=NULL; m = m->Next())
+		len += m->Length();
+
+	return len;
+	}
+
+EXPORT_C void RMemChunk::TrimStart(TInt anOffset)
+	{
+	__ASSERT_ALWAYS(iNextCell!=NULL, User::Invariant ());
+	__ASSERT_ALWAYS(anOffset>=0, User::Invariant ());
+
+	if (anOffset==0)
+		return;
+
+	RMemCell* m, *p;
+	TInt o, n;
+	if (!Goto(anOffset, m, o, n, p))
+		{
+		Free();
+		return;
+		}
+
+	if (p!=NULL) 
+		{
+		p->Unlink();
+		iNextCell->Free();
+
+		iNextCell = m;
+		}
+
+	if (o!=m->Offset()) 
+		m->SetData(o, n);
+	}
+
+EXPORT_C void RMemChunk::Assign(RMemChunk& aChain)
+	{
+	__ASSERT_ALWAYS(iNextCell==NULL, User::Invariant ());
+	iNextCell = aChain.iNextCell;
+	aChain.Init();
+	}
+
+EXPORT_C RMemCell* TMemCellIterator::operator ++(TInt)
+	{ 
+	RMemCell* m=iMemCell; 
+	if ( m!=NULL) 
+		iMemCell=iMemCell->Next(); 
+	return m; 
+	}
+
+EXPORT_C RMemCell* RMemChunk::Last() const
+	{
+	__ASSERT_ALWAYS(iNextCell!=NULL, User::Invariant ());
+
+	return iNextCell->Last();
+	}
+
+
+EXPORT_C void RMemChunk::Append(RMemChunk& aChain)
+	{
+	__ASSERT_ALWAYS(iNextCell!=aChain.iNextCell, User::Invariant ());
+
+	if (iNextCell!=NULL)
+		{
+		RMemCell* last	= Last();
+		last->Link(aChain.iNextCell);
+		}
+	else
+		iNextCell = aChain.iNextCell;
+
+	aChain.Init();
+	}
+
+EXPORT_C RMemCell* RMemChunk::Remove()
+	{
+	if (IsEmpty())
+		return NULL;
+	else
+		{
+		RMemCell* m = iNextCell;
+		iNextCell = iNextCell->Next();
+		m->Unlink();
+		return m;
+		}
+	}
+
+EXPORT_C TInt RMemChunk::NumBufs() const
+	{
+	__ASSERT_ALWAYS(iNextCell!=NULL, User::Invariant ());
+
+	TInt len = 0;
+	RMemCell* m;
+	for (m = iNextCell; m!=NULL; m = m->Next())
+		len++;
+
+	return len;
+	}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/data/chunkmgr_test.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,97 @@
+//
+// 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:
+//
+//! @file
+//! @SYMTestSuiteName TS_ChunkManager
+//! @SYMScriptTestEnvironment Standard Symbian HRP or emulator environment
+
+PRINT TS_ChunkManager: Group test 
+PRINT ------------------------------
+PRINT
+
+LOAD_SUITE ts_chunkmgr
+PRINT ------------------------------
+PRINT
+
+START_TESTCASE			CHUNKMGR-0008
+//! @SYMTestCaseID		CHUNKMGR-0008
+PRINT Test 08: memory allocation using chunkmanager in multiple threads
+RUN_TEST_STEP 	500	ts_chunkmgr	ChunkMgrTest08
+PRINT ------------------------------
+END_TESTCASE			CHUNKMGR-0008
+PRINT
+
+
+START_TESTCASE			CHUNKMGR-0007
+//! @SYMTestCaseID		CHUNKMGR-0007
+PRINT Test 07: memory allocation, check pools exhausted with allcoation algorithm
+RUN_TEST_STEP 	500	ts_chunkmgr	ChunkMgrTest07
+PRINT ------------------------------
+END_TESTCASE			CHUNKMGR-0007
+PRINT
+
+
+START_TESTCASE			CHUNKMGR-0006
+//! @SYMTestCaseID		CHUNKMGR-0006
+PRINT Test 06: memory allocation, check expected block size
+RUN_TEST_STEP 	500	ts_chunkmgr	ChunkMgrTest06
+PRINT ------------------------------
+END_TESTCASE			CHUNKMGR-0006
+PRINT
+
+
+START_TESTCASE			CHUNKMGR-0005
+//! @SYMTestCaseID		CHUNKMGR-0005
+PRINT Test 05: memory allocation, deallocation performance measure test
+RUN_TEST_STEP 	500	ts_chunkmgr	ChunkMgrTest05
+PRINT ------------------------------
+END_TESTCASE			CHUNKMGR-0005
+PRINT
+
+
+START_TESTCASE			CHUNKMGR-0004
+//! @SYMTestCaseID		CHUNKMGR-0004
+PRINT Test 04: default heap, memory allocation failure
+RUN_TEST_STEP 	500	ts_chunkmgr	ChunkMgrTest04
+PRINT ------------------------------
+END_TESTCASE			CHUNKMGR-0004
+PRINT
+
+
+START_TESTCASE			CHUNKMGR-0003
+//! @SYMTestCaseID		CHUNKMGR-0003
+PRINT Test 03: Alloc/Free RMemChunk beyond heap bounds, expected KErrNoMemory
+RUN_TEST_STEP 	500	ts_chunkmgr	ChunkMgrTest03
+PRINT ------------------------------
+END_TESTCASE			CHUNKMGR-0003
+PRINT
+
+
+START_TESTCASE			CHUNKMGR-0002
+//! @SYMTestCaseID		CHUNKMGR-0002
+PRINT Test 02: Alloc/Free RMemChunk within heap bounds
+RUN_TEST_STEP 	500	ts_chunkmgr	ChunkMgrTest02
+PRINT ------------------------------
+END_TESTCASE			CHUNKMGR-0002
+PRINT
+
+
+START_TESTCASE			CHUNKMGR-0001
+//! @SYMTestCaseID		CHUNKMGR-0001
+PRINT Test 01: Create/Delete ChunkMgr
+RUN_TEST_STEP 	500	ts_chunkmgr	ChunkMgrTest01
+PRINT ------------------------------
+END_TESTCASE			CHUNKMGR-0001
+PRINT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTEXPORTS
+// TestComponent scripts & configs
+
+//../data/chunkmgr_test.script z:/ts_chunkmgr/scripts/chunkmgr_test.script
+
+//chunkmgrtest.iby			/epoc32/rom/include/chunkmgrtest.iby
+
+PRJ_TESTMMPFILES
+//ts_chunkmgr.mmp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/group/chunkmgrtest.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef __UPNPMESSAGETEST_IBY__
+#define __UPNPMESSAGETEST_IBY__
+
+#include <testexecute.iby>
+
+file=ABI_DIR\BUILD_DIR\ts_chunkmgr.exe	 System\Programs\ts_chunkmgr.exe
+
+// The ini files for the system
+
+//The script files for the system
+data=\epoc32\data\z\ts_chunkmgr\scripts\chunkmgr_test.script ts_chunkmgr\scripts\chunkmgr_test.script
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/group/ts_chunkmgr.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+*
+*/
+
+
+TARGET			ts_chunkmgr.exe
+TARGETTYPE  	exe
+UID         	0 0x101F529F
+
+
+USERINCLUDE   	../inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/test
+
+
+SOURCEPATH		../src
+SOURCE      	testsuitechunkmgr.cpp
+SOURCE      	chunkmgrteststepbase.cpp
+SOURCE      	test01createdeletechunkmgr.cpp
+SOURCE      	test02allocdealloc.cpp
+SOURCE      	test03allocerror.cpp
+SOURCE      	test04defaultheapfreecheck.cpp
+SOURCE      	test05allocdeallocperformance.cpp
+SOURCE      	test06alloccheckblocksize.cpp
+SOURCE      	test07exhaustchunkpools.cpp
+SOURCE      	test08multiplethreads.cpp
+
+
+LIBRARY			euser.lib
+LIBRARY     	chunkmgr.lib
+LIBRARY     	efsrv.lib
+LIBRARY			testexecuteutils.lib // for TEF
+LIBRARY			testexecutelogclient.lib // for TEF
+
+CAPABILITY	 CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/chunkmgrteststepbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#if ( !defined __CHUNKMGRTESTSTEPBASE_H__ )
+#define __CHUNKMGRTESTSTEPBASE_H__
+
+#include <e32base.h>
+#include <test/testexecutestepbase.h>
+#include <cchunkmanager.h>
+
+// forward declarations
+
+class CChunkMgrTestSuite;
+
+class CChunkMgrTestStepBase: public CTestStep
+	{			
+public:
+	static const TInt KMinHeapSize	= 256 * 1024;
+	
+	CChunkMgrTestStepBase ();
+	~CChunkMgrTestStepBase ();		
+	
+protected:
+	CChunkManager* CreateChunkMgrL ( TInt aMaxHeapSize );
+	CChunkManager *iChkMgr;
+	};
+
+#endif /* __CHUNKMGRTESTSTEPBASE_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test01createdeletechunkmgr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,33 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#if ( !defined __TEST01CREATEDELETECHUNKMGR_H__ )
+#define __TEST01CREATEDELETECHUNKMGR_H__
+
+#include "chunkmgrteststepbase.h"
+
+_LIT ( KTest01, "ChunkMgrTest01" );
+
+class CTest01CreateDeleteChunkMgr: public CChunkMgrTestStepBase
+	{
+public:	
+	TVerdict doTestStepL ();
+	};
+
+#endif // __TEST01CREATEDELETECHUNKMGR_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test02allocdealloc.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,33 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#if ( !defined __TEST02ALLOCDEALLOC_H__ )
+#define __TEST02ALLOCDEALLOC_H__
+
+#include "chunkmgrteststepbase.h"
+
+_LIT ( KTest02, "ChunkMgrTest02" );
+
+class CTest02AllocDealloc: public CChunkMgrTestStepBase
+	{
+public:
+	TVerdict doTestStepL ();
+	};
+
+#endif // __TEST02ALLOCDEALLOC_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test03allocerror.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,33 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#if ( !defined __TEST03ALLOCERROR_H__ )
+#define __TEST03ALLOCERROR_H__
+
+#include "chunkmgrteststepbase.h"
+
+_LIT ( KTest03, "ChunkMgrTest03" );
+
+class CTest03AllocError: public CChunkMgrTestStepBase
+	{
+public:
+	TVerdict doTestStepL ();
+	};
+
+#endif // __TEST03ALLOCERROR_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test04defaultheapfreecheck.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,32 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#if ( !defined __TEST14DEFAULTHEAPFREECHECK_H__ )
+#define __TEST14DEFAULTHEAPFREECHECK_H__
+
+#include "chunkmgrteststepbase.h"
+
+_LIT ( KTest04, "ChunkMgrTest04" );
+
+class CTest14DefaultHeapFreeCheck: public CChunkMgrTestStepBase
+	{
+public:	
+	TVerdict doTestStepL ();
+	};
+
+#endif // __TEST14DEFAULTHEAPFREECHECK_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test05allocdeallocperformance.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,33 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#if ( !defined __TEST05ALLOCDEALLOCPERFORMANCE_H__ )
+#define __TEST05ALLOCDEALLOCPERFORMANCE_H__
+
+#include "chunkmgrteststepbase.h"
+
+_LIT ( KTest05, "ChunkMgrTest05" );
+
+class CTest05AllocDeAllocPerformance: public CChunkMgrTestStepBase
+	{
+public:
+	TVerdict doTestStepL ();
+	};
+
+#endif // __TEST05ALLOCDEALLOCPERFORMANCE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test06alloccheckblocksize.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,32 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#if ( !defined __TEST06ALLOCCHECKBLOCKSIZE_H__ )
+#define __TEST06ALLOCCHECKBLOCKSIZE_H__
+
+#include "chunkmgrteststepbase.h"
+
+_LIT ( KTest06, "ChunkMgrTest06" );
+
+class CTest06AllocCheckBlockSize: public CChunkMgrTestStepBase
+	{
+public:
+	TVerdict doTestStepL ();
+	};
+
+#endif // __TEST06ALLOCCHECKBLOCKSIZE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test07exhaustchunkpools.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,32 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#if ( !defined __TEST07EXHAUSTCHUNKPOOLS_H__ )
+#define __TEST06ALLOCCHECKBLOCKSIZE_H__
+
+#include "chunkmgrteststepbase.h"
+
+_LIT ( KTest07, "ChunkMgrTest07" );
+
+class CTest07ExhaustChunkPools: public CChunkMgrTestStepBase
+	{
+public:
+	TVerdict doTestStepL ();
+	};
+
+#endif // __TEST07EXHAUSTCHUNKPOOLS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/test08multiplethreads.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,36 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#if ( !defined __TEST08MULTIPLETHREADS_H__ )
+#define __TEST08MULTIPLETHREADS_H__
+
+#include "chunkmgrteststepbase.h"
+
+_LIT ( KTest08, "ChunkMgrTest08" );
+
+class CTest08MultipleThreads: public CChunkMgrTestStepBase
+	{
+public:
+	TVerdict doTestStepL ();
+	static TInt ChildThreadStep ( TAny* aParams );
+private:
+	TInt iMainTryCount;
+	TInt iChildTryCount;
+	};
+
+#endif // __TEST08MULTIPLETHREADS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/inc/testsuitechunkmgr.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#if ( !defined __TESTSUITECHUNKMGR_H__ )
+#define __TESTSUITECHUNKMGR_H__
+
+#include <e32base.h>
+#include <test/testexecuteserverbase.h>
+
+
+class CChunkMgrTestSuite: public CTestServer
+	{
+public:
+	static CChunkMgrTestSuite* NewL ();
+	~CChunkMgrTestSuite ();
+
+	CTestStep* CreateTestStep ( const TDesC& aStepName );
+	
+private:
+	const TPtrC  ServerName ();
+	
+private:
+	CTestStep *iTestStep;
+	};
+	
+//  Function Prototypes
+GLDEF_C TInt E32Main ();
+
+
+#endif /* __TESTSUITECHUNKMGR_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/chunkmgrteststepbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include "chunkmgrteststepbase.h"
+
+// create an chunk manager instance with default block size alloc & info
+static const TInt K_BlockSize = 128;
+static const TInt K_MinGrowth = 64;
+static const TInt K_ThresholdGrowth = 40;
+static const TInt K_InitialAllocation = 128;
+
+CChunkMgrTestStepBase::CChunkMgrTestStepBase ()
+	{
+	}
+
+CChunkMgrTestStepBase::~CChunkMgrTestStepBase ()
+	{
+	}
+
+CChunkManager * CChunkMgrTestStepBase::CreateChunkMgrL ( TInt aMaxHeapSize )
+	{	
+	CChunkManager* mgr = CChunkManager::NewL ( aMaxHeapSize );
+	if ( mgr )
+		{
+		mgr->AddPoolL ( K_BlockSize, K_InitialAllocation, K_MinGrowth, K_ThresholdGrowth );
+		}
+	
+	iChkMgr = mgr;
+			
+	return mgr;	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test01createdeletechunkmgr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,35 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+
+#include "test01createdeletechunkMgr.h"
+
+
+TVerdict CTest01CreateDeleteChunkMgr::doTestStepL ( void )
+	{
+	__UHEAP_MARK;	
+	// -------------- step 1 --------------------
+	CleanupStack::PushL ( CreateChunkMgrL ( KMinHeapSize ) );
+
+	//-------------- step 2 --------------------
+	CleanupStack::PopAndDestroy ( iChkMgr );
+	
+	__UHEAP_MARKEND;
+	return EPass;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test02allocdealloc.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,75 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include <rmemchunk.h>
+
+#include "test02allocdealloc.h"
+
+TVerdict CTest02AllocDealloc::doTestStepL ( void )
+	{
+	__UHEAP_MARK;
+
+	//-------------- step 1 --------------------
+	CleanupStack::PushL ( CreateChunkMgrL ( KMinHeapSize ) );
+
+	TBool firstFail = EFalse;
+	TBool secondFail = EFalse;
+	
+	//-------------- step 2 --------------------
+	RMemChunk memChunk;
+	RMemoryAllocator allocator ( iChkMgr );
+	TInt ret = memChunk.Alloc ( 5000, allocator );
+	if ( ret != KErrNone )
+		{
+		firstFail = ETrue;
+		}
+	else
+		{
+		memChunk.Free ();
+		}
+	
+	//-------------- step 3 --------------------
+	TInt ret1 = memChunk.Alloc ( 0,  allocator );
+	if ( ret1 != KErrNone )
+		{
+		secondFail = ETrue;
+		}
+	else
+		{
+		/* // TODO uncomment this, once Length API is implemented.
+		
+		if ( memChunk.Length () != 0 )
+			{
+			secondFail = ETrue;
+			}
+		*/
+		memChunk.Free ();
+		}
+	
+	CleanupStack::PopAndDestroy ( iChkMgr );
+	
+    __UHEAP_MARKEND;
+    
+    if ( firstFail || secondFail )
+    	{
+    	return EFail;
+    	}
+    
+	return EPass;		
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test03allocerror.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,68 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#include <e32base.h>
+#include <rmemchunk.h>
+
+#include "test03allocerror.h"
+
+TVerdict CTest03AllocError::doTestStepL(void)
+	{
+	__UHEAP_MARK;
+			
+	TVerdict verdict ( EFail );
+	
+	// -------------- step 1: Create heap with 15K
+	CleanupStack::PushL ( CreateChunkMgrL ( 65536 ) );	
+	RMemoryAllocator allocator ( iChkMgr );	
+	// -------------- step 2: Allocate 42000 bytes long memchunks
+	RMemChunk memChunks[14];
+	TInt ret;	
+	for ( TInt i = 0; i < sizeof ( memChunks ) / sizeof ( memChunks[0] ); i++ )
+		{
+		ret = memChunks[i].Alloc ( 3000, allocator );
+		if ( ret != KErrNone )
+			{
+			User::Leave(EFail);
+			}
+		}
+	// -------------- step 3: Allocate 16384-bytes long memchunk
+	RMemChunk chunk;	
+	ret = chunk.Alloc ( 16384, allocator );	
+	if ( ret != KErrNone )
+		{
+		if ( ret == KErrNoMemory )
+			verdict =  EPass;
+		else
+			{
+			verdict =  EFail;
+			}
+		}		
+	// -------------- step 4: Cleanup
+	for ( TInt i = 0; i < sizeof ( memChunks ) / sizeof ( memChunks[0] ); i++ )
+		{
+		memChunks[i].Free ();
+		}
+	chunk.Free ();
+	
+	CleanupStack::PopAndDestroy ( iChkMgr );
+	
+	__UHEAP_MARKEND;
+	return verdict;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test04defaultheapfreecheck.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,63 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include <e32std.h>
+#include <rmemchunk.h>
+
+#include "test04defaultheapfreecheck.h"
+
+TVerdict CTest14DefaultHeapFreeCheck::doTestStepL ()
+	{
+#if defined ( _DEBUG )
+	__UHEAP_MARK;
+	
+	//-------------- step 1
+	CleanupStack::PushL ( CreateChunkMgrL ( KMinHeapSize ) );
+	RMemoryAllocator allocator ( iChkMgr );	
+	
+	TBuf8<1000> *aDes1;
+    CleanupStack::PushL ( aDes1 = new ( ELeave ) TBuf8<1000> );
+    aDes1->SetLength ( 1000 );
+	
+	//-------------- step 2: Set User heap to fail at the next alloc
+	User::__DbgSetAllocFail ( RHeap::EUser, RHeap::EFailNext, 0 );
+
+	//-------------- step 2 --------------------
+	RMemChunk chunk;
+	TInt ret = chunk.Alloc ( 1000, allocator );
+	if ( ret != KErrNone )
+		{
+		User::__DbgSetAllocFail ( RHeap::EUser, RHeap::ENone, 0 );
+		User::Leave ( EFail );
+		}
+
+	//-------------- step 3 Cleanup
+	chunk.Free ();
+	
+	User::__DbgSetAllocFail ( RHeap::EUser, RHeap::ENone, 0 );
+    
+    CleanupStack::PopAndDestroy ( aDes1 );
+    CleanupStack::PopAndDestroy ( iChkMgr );
+
+   	__UHEAP_MARKEND;
+	return EPass;
+#else
+	return EPass;
+#endif
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test05allocdeallocperformance.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,66 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include <rmemchunk.h>
+
+#include "test05allocdeallocperformance.h"
+
+TVerdict CTest05AllocDeAllocPerformance::doTestStepL ()
+	{
+	__UHEAP_MARK;
+	
+	TInt numBlocks = 200, numLoops = 10;
+	TUint8 KSmallBlockSize = 128;
+	
+	CleanupStack::PushL ( CreateChunkMgrL ( ( TUint ) ( 3 * KSmallBlockSize * numBlocks ) ) );
+	RMemoryAllocator allocator ( iChkMgr );
+	
+	TTime startTime, stopTime;
+	TInt64 timeSpent;
+	for ( TInt i = 0; i < numLoops; i++ )
+		{
+		INFO_PRINTF2 ( _L ( "\n********** Loop #%d **********" ), i + 1 );
+		INFO_PRINTF1 ( _L ( "\n Alloc memChunk and Free it" ) );
+		INFO_PRINTF1 ( _L ( "\n...Repeat the same 1000 times and print time spent" ) );
+		RMemChunk chunk;
+		startTime.UniversalTime ();
+		
+		for ( TInt j = 0; j < 1000; j++ )
+			{
+			TInt ret = chunk.Alloc ( KSmallBlockSize * numBlocks, allocator );
+			if ( ret != KErrNone )
+				{
+				INFO_PRINTF1 ( _L ( "\nError: Couldn't allocate" ) );
+				User::Leave ( EFail );
+				}
+			
+			chunk.Free ();
+			}
+		stopTime.UniversalTime ();
+		
+		timeSpent = stopTime.MicroSecondsFrom ( startTime ).Int64 () / 1000;
+		INFO_PRINTF2 ( _L ( "...Info: The time spent on 1000 alloc and free is %d microSecs" ), timeSpent );
+		}
+	
+    CleanupStack::PopAndDestroy ( iChkMgr );
+	
+	__UHEAP_MARKEND;
+	
+	return EPass;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test06alloccheckblocksize.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,112 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#include <e32base.h>
+#include <rmemchunk.h>
+#include <rmemcell.h>
+
+#include "test06alloccheckblocksize.h"
+
+
+TVerdict CTest06AllocCheckBlockSize::doTestStepL ()
+	{
+	__UHEAP_MARK;
+	
+	CleanupStack::PushL ( CreateChunkMgrL ( KMinHeapSize ) );
+	RMemoryAllocator allocator ( iChkMgr );
+	
+	iChkMgr->AddPoolL ( 2048, 8, 4, 3 );
+	iChkMgr->AddPoolL ( 1024, 16, 5, 4 );
+	iChkMgr->AddPoolL ( 512, 32, 6, 5 );
+	iChkMgr->AddPoolL ( 256, 64, 7, 6 );
+	iChkMgr->AddPoolL ( 128, 128, 64, 40 );
+	
+	TBool firstTestFail = EFalse;
+	TBool secondTestFail = EFalse;
+	TBool thirdTestFail = EFalse;
+	// --------------First Test
+	RMemChunk chunk;
+	INFO_PRINTF1 ( _L ( "\nAllocate 5000-bytes long RMemChunk" ) );
+	TInt ret = chunk.Alloc ( 5000, allocator );
+	if ( ret != KErrNone )
+		{
+		INFO_PRINTF1 ( _L ( "\nError: Couldn't allocate" ) );
+		User::Leave ( EFail );
+		}
+	
+	//Check Block size is really 512
+	RMemCell* block = chunk.First ();
+	if ( block->Size () != 1024 )
+		{
+		INFO_PRINTF1 ( _L ( "Error: Block size is not as expected" ) );
+		firstTestFail = ETrue;
+		}
+	
+	INFO_PRINTF1 ( _L ( "Deallocating RMemChunk" ) );
+	chunk.Free ();
+	
+	// --------------Second Test
+	INFO_PRINTF1 ( _L ( "Allocate 50-bytes long RMemChunk" ) );	
+	ret = chunk.Alloc ( 50, allocator );
+	if ( ret != KErrNone )
+		{
+		INFO_PRINTF1 ( _L ( "Error: Couldn't allocate" ) );
+		User::Leave ( EFail );
+		}
+	
+	//Check Block size is really 128
+	block = chunk.First ();
+	if ( block->Size () != 128 )
+		{
+		INFO_PRINTF1 ( _L ( "Error: Block size is not as expected" ) );
+		secondTestFail = ETrue;
+		}
+	
+	INFO_PRINTF1 ( _L ( "Deallocating RMemChunk" ) );
+	chunk.Free ();
+	
+	// --------------Third Test
+	INFO_PRINTF1 ( _L ( "Allocate 1024-bytes long RMemChunk" ) );
+	ret = chunk.Alloc ( 1024, allocator );
+	if ( ret != KErrNone )
+		{
+		INFO_PRINTF1 ( _L ( "Error: Couldn't allocate" ) );
+		User::Leave ( EFail );
+		}
+	
+	// Check Block size is really 1024
+	block = chunk.First ();
+	if ( block->Size () != 1024 )
+		{
+		INFO_PRINTF1 ( _L ( "Error: Block size is not as expected" ) );
+		thirdTestFail = ETrue;
+		}
+	
+	INFO_PRINTF1 ( _L ( "Deallocating RMemChunk" ) );
+	chunk.Free ();
+	
+	CleanupStack::PopAndDestroy ( iChkMgr );
+	
+	__UHEAP_MARKEND;
+	
+	if ( firstTestFail || secondTestFail || thirdTestFail )
+		return EFail;
+			
+	return EPass;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test07exhaustchunkpools.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,179 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include <rmemchunk.h>
+#include <rmemcell.h>
+
+#include "test07exhaustchunkpools.h"
+
+
+TVerdict CTest07ExhaustChunkPools::doTestStepL ()
+	{
+	__UHEAP_MARK;
+	
+	CleanupStack::PushL ( CreateChunkMgrL ( KMinHeapSize / 2) );
+	RMemoryAllocator allocator ( iChkMgr );	
+	iChkMgr->AddPoolL ( 128, 128, 64, 40 );
+	iChkMgr->AddPoolL ( 256, 64, 7, 6 );
+	iChkMgr->AddPoolL ( 512, 32, 6, 5 );
+	iChkMgr->AddPoolL ( 1024, 16, 5, 4 );
+	iChkMgr->AddPoolL ( 2048, 8, 4, 3 );	
+	INFO_PRINTF1 ( _L ( "\nStart allocating 500-bytes long RMemChunks" ) );
+	RArray<RMemChunk> chunkArr128, chunkArr256, chunkArr512, chunkArr1024, chunkArr2048;
+	TInt ret = KErrNone;
+	
+	TInt allocCount128 = 0, allocCount258 = 0, allocCount512 = 0, allocCount1024 = 0, allocCount2048 = 0;
+	while ( ret == KErrNone )
+		{
+		RMemChunk chunk;
+		TInt ret = chunk.Alloc ( 500, allocator );		
+		if ( ret != KErrNone )
+			{
+			break;
+			}
+		switch ( chunk.First ()->Size () )
+			{
+			case 128:
+				{
+				INFO_PRINTF1 ( _L ( "\nAllocated in 128 block Pool" ) );
+				chunkArr128.Append ( chunk );
+				break;
+				}
+			case 256:
+				{
+				INFO_PRINTF1 ( _L ( "\nAllocated in 256 block Pool" ) );
+				chunkArr256.Append ( chunk );
+				break;
+				}
+			case 512:
+				{
+				INFO_PRINTF1 ( _L ( "\nAllocated in 512 block Pool" ) );
+				chunkArr512.Append ( chunk );
+				break;
+				}
+			case 1024:
+				{
+				INFO_PRINTF1 ( _L ( "\nAllocated in 1024 block Pool" ) );				
+				chunkArr1024.Append ( chunk );
+				break;
+				}
+			case 2048:
+				{
+				INFO_PRINTF1 ( _L ( "\nAllocated in 2048 block Pool" ) );				
+				chunkArr2048.Append ( chunk );
+				break;
+				}
+			}
+		}
+
+	INFO_PRINTF2 ( _L ( "\nTotal allocation in 128 block Pool - %d" ), chunkArr128.Count () );
+	INFO_PRINTF2 ( _L ( "\nTotal allocation in 256 block Pool - %d" ), chunkArr256.Count () );
+	INFO_PRINTF2 ( _L ( "\nTotal allocation in 512 block Pool - %d" ), chunkArr512.Count () );
+	INFO_PRINTF2 ( _L ( "\nTotal allocation in 1024 block Pool - %d" ), chunkArr1024.Count () );
+	INFO_PRINTF2 ( _L ( "\nTotal allocation in 2048 block Pool - %d" ), chunkArr2048.Count () );
+	
+	
+	TBool firstSuccess = ETrue;
+	TBool secondSuccess = ETrue;
+	TBool thirdSuccess = ETrue;	
+		
+	INFO_PRINTF1 ( _L ( "Allocate 750-byte long RMemChunk after deallocating 3 128-byte and 2 512-byte long RMemChunks" ) );
+	chunkArr128[0].Free ();
+	chunkArr128.Remove ( 0 );
+	chunkArr128[0].Free ();
+	chunkArr128.Remove ( 0 );	
+	chunkArr128[0].Free ();
+	chunkArr128.Remove ( 0 );
+	
+	
+	chunkArr512[0].Free ();
+	chunkArr512.Remove ( 0 );	
+		
+	RMemChunk chunk1;	
+	ret = chunk1.Alloc ( 750, allocator );
+	
+	if ( ret != KErrNone )
+		{
+		INFO_PRINTF1 ( _L ( "Error: Couldn't allocate" ) );
+		firstSuccess = EFalse;
+		}	
+	else
+		{
+		if ( chunk1.First ()->Size () != 128 )
+			{
+			INFO_PRINTF1 ( _L ( "\nAllocated in 1024 block Pool" ) );				
+			firstSuccess = EFalse;
+			}
+		chunkArr128.Append ( chunk1 );
+		}	
+	
+		
+	INFO_PRINTF1 ( _L ( "Allocate 500-byte long RMemChunk" ) );
+	
+	RMemChunk chunk2;
+	ret = chunk2.Alloc ( 500, allocator );
+	if ( ret != KErrNone )
+		{
+		INFO_PRINTF1 ( _L ( "Error: Couldn't allocate" ) );
+		secondSuccess = EFalse;
+		}
+	else
+		{
+		if ( chunk2.First ()->Size () != 512 )
+			{
+			INFO_PRINTF1 ( _L ( "\nAllocated in 1024 block Pool" ) );				
+			firstSuccess = EFalse;
+			}
+		chunkArr512.Append ( chunk2 );
+		}	
+	
+	
+		
+	INFO_PRINTF1 ( _L ( "Allocate 2100-byte long RMemChunk after deallocating 2 2048-byte long RMemChunk" ) );	
+	chunkArr128[0].Free ();
+	chunkArr128.Remove ( 0 );
+	
+	chunkArr128[0].Free ();
+	chunkArr128.Remove ( 0 );
+	
+	
+	RMemChunk chunk3;
+	ret = chunk3.Alloc ( 2100, allocator );
+	if ( ret == KErrNone )
+		{		
+		thirdSuccess = EFalse;
+		chunkArr512.Append ( chunk3 );
+		}		
+	
+	chunkArr128.Close();
+	chunkArr256.Close();
+	chunkArr512.Close();
+	chunkArr1024.Close();
+	chunkArr2048.Close();
+	
+    CleanupStack::PopAndDestroy ( iChkMgr );
+	
+	__UHEAP_MARKEND;
+
+	if ( ret != KErrNone || !firstSuccess || !secondSuccess || !thirdSuccess)
+		{
+		return EFail;
+		}
+	return EPass;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/test08multiplethreads.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,124 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+#include <e32base.h>
+#include <ss_std.h>
+#include <rmemchunk.h>
+
+#include "test08multiplethreads.h"
+
+
+TVerdict CTest08MultipleThreads::doTestStepL ()
+	{
+	__UHEAP_MARK;
+	iMainTryCount = 0;
+	iChildTryCount = 0;
+	
+	CleanupStack::PushL ( CreateChunkMgrL ( KMinHeapSize ) );	
+	RMemoryAllocator allocator ( iChkMgr );
+	
+	INFO_PRINTF1 ( _L ( "Create high priority thread and resume it" ) );
+	
+	RThread childThread;
+	TInt err = childThread.Create ( _L ( "testChildThread" ),
+		                       		ChildThreadStep,
+ 							   		KDefaultStackSize,
+							   		KDefaultHeapSize,
+							   		KMaxHeapSize,
+							   		(TAny*)this,
+							   		EOwnerProcess );
+	if ( err != KErrNone )
+		{
+		INFO_PRINTF2 ( _L ( "\nError:%d Could not create child thread" ), err );		 
+		User::Leave ( EFail );
+		}
+	childThread.SetPriority ( EPriorityAbsoluteHigh );
+	childThread.Resume ();
+	
+	INFO_PRINTF1 ( _L ( "\nDo alloc/free in loop that ends when the child task completes" ) );	
+	TInt ret;
+	volatile TExitType exitType;
+	do {
+		RMemChunk chunk;
+		ret = chunk.Alloc ( 500, allocator );
+		if ( ret != KErrNone )
+			{
+			INFO_PRINTF1 ( _L ( "\nError: Couldn't allocate RMemChunk" ) );
+			User::Leave ( EFail );
+			}
+		iMainTryCount++;
+		chunk.Free ();
+		// Check if the child task is completed
+		exitType = childThread.ExitType ();
+		}
+	while ( exitType == EExitPending );
+	
+	CleanupStack::PopAndDestroy ( iChkMgr );
+	childThread.Close ();
+	if ( iChildTryCount < 1000 )
+		{
+		INFO_PRINTF1 ( _L ( "\nError: Child thread ended before 1000 loops completetion" ) );
+		return EFail;
+		}
+
+	INFO_PRINTF2 ( _L ( "\nChild thread Alloc/Dealloc's %d" ), iChildTryCount );	
+	INFO_PRINTF2 ( _L ( "\nMain Thread Alloc/Dealloc's %d" ), iMainTryCount );
+	
+	__UHEAP_MARKEND;
+	
+	return EPass;
+	}
+
+TInt CTest08MultipleThreads::ChildThreadStep ( TAny* aParams )
+	{
+	CTest08MultipleThreads* testObj = ( CTest08MultipleThreads* ) aParams;
+	RMemoryAllocator allocator ( testObj->iChkMgr );
+	
+	CTrapCleanup* trapHandler = CTrapCleanup::New ();
+    CActiveScheduler* scheduler = new CActiveScheduler;
+	if ( scheduler == NULL )
+		{
+		return KErrNoMemory;
+		}
+	CActiveScheduler::Install ( scheduler );
+	
+	RTimer timer;
+	TRequestStatus status;
+	timer.CreateLocal ();
+	TInt ret = KErrNone;
+	for ( TInt i = 0 ; i < 1000; i++ )
+		{
+		RMemChunk chunk;
+		ret = chunk.Alloc ( 500, allocator );
+		if ( ret != KErrNone )
+			break;
+		
+		testObj->iChildTryCount++;
+		
+		chunk.Free ();
+	 		 	
+	 	timer.After ( status, 500 ); // sleep for 5ms
+		User::WaitForRequest ( status );
+		}
+	
+	CActiveScheduler::Install ( NULL );
+	delete scheduler;
+	delete trapHandler;
+	
+	return ret;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/chunkmgr/ts_chunkmgr/src/testsuitechunkmgr.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,144 @@
+// 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:
+// @file
+// @internalComponent
+// 
+//
+
+
+#include <e32base.h>
+#include <e32std.h>
+#include <f32file.h>
+#include "testsuitechunkmgr.h"
+
+#include "test01createdeletechunkMgr.h"
+#include "test02allocdealloc.h"
+#include "test03allocerror.h"
+#include "test04defaultheapfreecheck.h"
+#include "test05allocdeallocperformance.h"
+#include "test06alloccheckblocksize.h"
+#include "test07exhaustchunkpools.h"
+#include "test08multiplethreads.h"
+
+
+#if ( !defined EKA2 )
+// The system-wide unique name for the test-server
+_LIT ( KServerName, "ts_chunkmgr" );
+#endif
+
+
+CChunkMgrTestSuite*  CChunkMgrTestSuite::NewL ()
+	{
+	CChunkMgrTestSuite* server = new ( ELeave ) CChunkMgrTestSuite ();
+	CleanupStack::PushL ( server );
+
+	server->StartL ( server->ServerName () );
+
+	CleanupStack::Pop ( server );
+	return server;
+	}
+	
+CChunkMgrTestSuite::~CChunkMgrTestSuite ()
+	{
+	delete iTestStep;
+	}
+	
+const TPtrC CChunkMgrTestSuite::ServerName ()
+	{
+#if (!defined EKA2 )
+	return KServerName ();
+#else
+	TParsePtrC serverName ( RProcess ().FileName () );
+	return serverName.Name ();
+#endif
+	}
+
+CTestStep* CChunkMgrTestSuite::CreateTestStep ( const TDesC& aStepName )
+	{
+	if ( aStepName == KTest01 )
+		{
+		iTestStep = new CTest01CreateDeleteChunkMgr ();
+		}
+	else if ( aStepName == KTest02 )
+		{
+		iTestStep = new CTest02AllocDealloc ();
+		}
+	else if ( aStepName == KTest03 )
+		{
+		iTestStep = new CTest03AllocError ();
+		}
+	else if ( aStepName == KTest04 )
+		{
+		iTestStep = new CTest14DefaultHeapFreeCheck ();
+		}	
+	else if ( aStepName == KTest05 )
+		{
+		iTestStep = new CTest05AllocDeAllocPerformance ();
+		}
+	else if ( aStepName == KTest06 )
+		{
+		iTestStep = new CTest06AllocCheckBlockSize ();
+		}
+	else if ( aStepName == KTest07 )
+		{
+		iTestStep = new CTest07ExhaustChunkPools ();
+		}
+	else if ( aStepName == KTest08 )
+		{
+		iTestStep = new CTest08MultipleThreads ();
+		}	
+	
+	return iTestStep;
+	}
+
+LOCAL_C void MainL ()
+	{
+	// For platform security
+#if ( defined __DATA_CAGING__ )
+	RProcess ().DataCaging ( RProcess::EDataCagingOn );
+	RProcess ().SecureApi ( RProcess::ESecureApiOn );
+#endif
+	CActiveScheduler* sched = NULL;
+	sched = new ( ELeave ) CActiveScheduler;
+	CActiveScheduler::Install ( sched );
+	CChunkMgrTestSuite* server = NULL;
+	
+	// Create the test-server
+	TRAPD ( err, server = CChunkMgrTestSuite::NewL () );
+	
+	if ( !err )
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous ( KErrNone );
+		sched->Start ();
+		}
+		
+	delete server;
+	delete sched;
+	}
+
+GLDEF_C TInt E32Main ()
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New ();
+	if ( cleanup == NULL )
+		{
+		return KErrNoMemory;
+		}
+	TInt err = KErrNone;
+	TRAP ( err, MainL () );
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return KErrNone;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,17 @@
+// 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:
+//
+
+PRJ_TESTMMPFILES
+upnpcodec.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/group/upnpcodec.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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:
+// upnpmessage.mmp
+// 
+//
+
+TARGET		 upnpcodec.dll
+TARGETTYPE	 plugin
+UID			 0x10009D8D 0x2001C597
+CAPABILITY	 All -TCB
+
+USERINCLUDE	 ../inc
+USERINCLUDE  ../../upnpmessage/inc
+SYSTEMINCLUDE	 /epoc32/include
+
+SOURCEPATH	 ../src
+
+SOURCE		 upnpcodecmain.cpp
+SOURCE		 cupnpcodec.cpp 
+SOURCE		 cupnpheaderreader.cpp
+SOURCE		 cupnpheaderwriter.cpp
+		 
+LIBRARY		 euser.lib 
+LIBRARY		 bafl.lib 
+LIBRARY		 http.lib 
+LIBRARY		 inetprotutil.lib 
+LIBRARY		 ecom.lib
+LIBRARY		 upnputils.lib
+LIBRARY		 upnpmessage.lib
+
+START RESOURCE 2001c597.RSS
+
+#ifdef SYMBIAN_SECURE_ECOM
+TARGET upnpcodec.rsc
+#endif
+
+END
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/inc/cupnpcodec.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+// 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:
+// cupnpcodec.cpp
+// 
+//
+
+#ifndef CUPNPCODEC_H_
+#define CUPNPCODEC_H_
+
+#include <http/framework/cheadercodecplugin.h>
+#include <stringpool.h>
+
+class CUPnPCodec: public CHeaderCodecPlugin
+	{
+public:
+	static CUPnPCodec* NewL(TAny* aStringPool);
+	virtual ~CUPnPCodec();
+	
+private:
+	TBool CanEncode(RStringF aHeaderField) const;
+	TBool CanDecode(RStringF aHeaderField) const;
+	CHeaderCodec* FindDelegateCodecL(RStringF aHeaderField) const;
+	
+private:
+	CUPnPCodec(RStringPool aStringPool);
+	void ConstructL();
+	
+private:
+	RStringPool iStringPool;
+	};
+
+#endif /*CUPNPCODEC_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/inc/cupnpheaderreader.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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 CUPNPHEADERREADER_H_
+#define CUPNPHEADERREADER_H_
+
+#include <stringpool.h>
+#include <http/framework/cheadercodec.h>
+
+#include "CHeaderField.h"
+
+
+class CUPnPHeaderReader: public CHeaderReader
+	{
+public:
+	static CUPnPHeaderReader* NewL(RStringPool aStringPool);
+	virtual ~CUPnPHeaderReader();
+	
+private:
+	void DecodeHeaderL(RHeaderField& aHeader);
+	
+private:
+	CUPnPHeaderReader(RStringPool aStringPool);
+	CHeaderFieldPart* SetNewPartL(RHeaderField& aHeader, TInt aPartIndex, THTTPHdrVal& aPartVal) const;
+	CHeaderFieldPart* SetNewFStringPartL(RHeaderField& aHeader, TInt aPartIndex, TPtrC8 aValue) const;
+	CHeaderFieldPart* SetNewIntegerPartL(RHeaderField& aHeader, TInt aPartIndex, TInt aValue) const;
+	void DecodeGenericNumberL(RHeaderField& aHeader) const;
+	CHeaderFieldParam* SetNewFStringParamL(CHeaderFieldPart& aHeaderPart, TPtrC8 aParamName, TPtrC8 aParamValue) const;
+	void DecodeExtL(RHeaderField& aHeader) const;
+	void DecodeGenericUpnpHeadersL(RHeaderField& aHeader) const;
+	void DecodeTimeoutHeaderL(RHeaderField& aHeader) const;
+	void DecodeCallbackL(RHeaderField& aHeader) const;
+	void DecodeManL(RHeaderField& aHeader) const;
+	
+private:
+	RStringPool iStringPool;
+	};
+
+#endif /*CUPNPHEADERREADER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/inc/cupnpheaderwriter.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+// 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 CUPNPHEADERWRITER_H_
+#define CUPNPHEADERWRITER_H_
+
+#include <stringpool.h>
+#include <http/framework/cheadercodec.h>
+
+
+class CUPnPHeaderWriter: public CHeaderWriter
+	{
+public:
+	static CUPnPHeaderWriter* NewL(RStringPool aStringPool);
+	virtual ~CUPnPHeaderWriter();
+	
+private:
+	void EncodeHeaderL(RHeaderField& aHeader);
+	
+private:
+	CUPnPHeaderWriter(RStringPool aStringPool);
+	void EncodeGenericUpnpHeaderL(RHeaderField& aHeader, TInt aErrorCode) const;
+	void EncodeGenericNumberHeaderL(RHeaderField& aHeader, TInt aErrorCodeToUseOnFailure) const;
+	void EncodeTimeoutHeaderL(RHeaderField& aHeader, TInt aErrorCode) const;
+	void EncodeMANL(RHeaderField& aHeader, TInt aErrorCode) const;
+	const CHeaderFieldPart* WriteRawStrFMANPartL(RHeaderField& aHeader, THeaderFieldPartIter& aIter, TInt aErrorCode) const;
+	void EncodeSoapActionL(RHeaderField& aHeader) const;
+	void EncodeCallbackL(RHeaderField& aHeader) const;
+	void EncodeExtL(RHeaderField& aHeader);
+	
+private:
+	RStringPool iStringPool;
+	};
+
+#endif /*CUPNPHEADERWRITER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/src/2001c597.RSS	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+// 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 <ecom/registryinfo.rh>
+		  
+RESOURCE REGISTRY_INFO theInfo
+	{
+	dll_uid = 0x2001C597;
+	interfaces =
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = 0x10272E5C;
+			implementations =
+				{
+				IMPLEMENTATION_INFO
+					{
+					// KUidUPnPCodec
+					implementation_uid = 0x2001C598;
+					version_no = 1;
+					display_name = "UPnP Codec";
+					default_data = "HTTP/UPnP";
+					opaque_data = "";
+					}
+				};
+			}
+		};
+	}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/src/cupnpcodec.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,115 @@
+// 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:
+// upnpcodecmain.cpp
+// 
+//
+
+#include <upnp/tupnptable.h>
+
+#include "cupnpcodec.h"
+#include "cupnpheaderreader.h"
+#include "cupnpheaderwriter.h"
+
+
+CUPnPCodec* CUPnPCodec::NewL(TAny* aStringPool)
+	{
+	RStringPool* strPool = static_cast<RStringPool*>(aStringPool);
+	CUPnPCodec* me = new (ELeave) CUPnPCodec(*strPool);
+	CleanupStack::PushL(me);
+	me->ConstructL();
+	CleanupStack::Pop(me);
+	return me;
+	}
+
+CUPnPCodec::~CUPnPCodec()
+	{
+	// do nothing.
+	}
+
+TBool CUPnPCodec::CanEncode(RStringF aHeaderField) const
+	{
+	TBool canEncode = EFalse;
+
+	RStringF st = iStringPool.StringF(UPnP::EST, TUPnPTable::Table());
+	RStringF usn = iStringPool.StringF(UPnP::EUSN, TUPnPTable::Table());
+	RStringF timeout = iStringPool.StringF(UPnP::ETimeout, TUPnPTable::Table());
+	RStringF ext = iStringPool.StringF(UPnP::EExt, TUPnPTable::Table());
+	RStringF sid = iStringPool.StringF(UPnP::ESID, TUPnPTable::Table());
+	RStringF nts = iStringPool.StringF(UPnP::ENTS, TUPnPTable::Table());
+	RStringF nt = iStringPool.StringF(UPnP::ENT, TUPnPTable::Table());
+	RStringF mx = iStringPool.StringF(UPnP::EMX, TUPnPTable::Table());
+	RStringF seq = iStringPool.StringF(UPnP::ESEQ, TUPnPTable::Table());
+	RStringF man = iStringPool.StringF(UPnP::EMAN, TUPnPTable::Table());
+	RStringF soapaction = iStringPool.StringF(UPnP::ESoapAction, TUPnPTable::Table());
+	RStringF callback = iStringPool.StringF(UPnP::ECallback, TUPnPTable::Table());
+
+	if(
+	  (aHeaderField == st)||(aHeaderField == usn)||(aHeaderField == timeout)||(aHeaderField == ext)||
+	  (aHeaderField == sid)||(aHeaderField == nts)||(aHeaderField == nt)||(aHeaderField == mx)||
+	  (aHeaderField == seq)||(aHeaderField == man)||(aHeaderField == soapaction)||(aHeaderField == callback)
+	  ) 
+		{
+		canEncode = ETrue; 
+		}
+
+	return canEncode;  
+	}
+
+TBool CUPnPCodec::CanDecode(RStringF aHeaderField) const
+	{
+	TBool canDecode = EFalse;
+
+	RStringF st = iStringPool.StringF(UPnP::EST, TUPnPTable::Table());
+	RStringF usn = iStringPool.StringF(UPnP::EUSN, TUPnPTable::Table());
+	RStringF timeout = iStringPool.StringF(UPnP::ETimeout, TUPnPTable::Table());
+	RStringF ext = iStringPool.StringF(UPnP::EExt, TUPnPTable::Table());
+	RStringF sid = iStringPool.StringF(UPnP::ESID, TUPnPTable::Table());
+	RStringF nts = iStringPool.StringF(UPnP::ENTS, TUPnPTable::Table());
+	RStringF nt = iStringPool.StringF(UPnP::ENT, TUPnPTable::Table());
+	RStringF mx = iStringPool.StringF(UPnP::EMX, TUPnPTable::Table());
+	RStringF seq = iStringPool.StringF(UPnP::ESEQ, TUPnPTable::Table());
+	RStringF man = iStringPool.StringF(UPnP::EMAN, TUPnPTable::Table());
+	RStringF soapaction = iStringPool.StringF(UPnP::ESoapAction, TUPnPTable::Table());
+	RStringF callback = iStringPool.StringF(UPnP::ECallback, TUPnPTable::Table());
+
+	if(
+	  (aHeaderField == st)||(aHeaderField == usn)||(aHeaderField == timeout)||(aHeaderField == ext)||
+	  (aHeaderField == sid)||(aHeaderField == nts)||(aHeaderField == nt)||(aHeaderField == mx)||
+	  (aHeaderField == seq)||(aHeaderField == man)||(aHeaderField == soapaction)||(aHeaderField == callback)
+	  ) 
+		{
+		canDecode = ETrue; 
+		}
+
+	return canDecode;
+	}
+
+CHeaderCodec* CUPnPCodec::FindDelegateCodecL(RStringF /*aHeaderField*/) const
+	{
+	return CHeaderCodecPlugin::CreateDelegateCodecL(iStringPool);
+	}
+
+CUPnPCodec::CUPnPCodec(RStringPool aStringPool)
+:CHeaderCodecPlugin(), iStringPool(aStringPool)
+	{
+	// do nothing.
+	}
+
+void CUPnPCodec::ConstructL()
+	{
+	CHeaderCodec::ConstructL();
+	
+	iWriter = CUPnPHeaderWriter::NewL(iStringPool);
+	iReader = CUPnPHeaderReader::NewL(iStringPool);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/src/cupnpheaderreader.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,311 @@
+// 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 <upnp/tupnptable.h>
+#include <inetprottextutils.h>
+#include <upnp/upnpconstants.h>
+
+#include "cupnpheaderreader.h"
+
+
+_LIT8(KSemiSpaceSep," ;");
+const TUint KOpenAngleBracket		= '<';
+const TUint KCloseAngleBracket		= '>';
+const TUint KCommaChar		= ',';
+const TUint KSemiColonChar	= ';';
+const TUint KEqualsChar		= '=';
+
+
+CUPnPHeaderReader* CUPnPHeaderReader::NewL(RStringPool aStringPool)
+	{
+	return new (ELeave) CUPnPHeaderReader(aStringPool);
+	}
+
+CUPnPHeaderReader::~CUPnPHeaderReader()
+	{
+	// do nothing.
+	}
+
+void CUPnPHeaderReader::DecodeHeaderL(RHeaderField& aHeader)
+	{
+	RStringF fieldStr = iStringPool.StringF(aHeader.Name());
+	switch( fieldStr.Index(TUPnPTable::Table()) )
+		{
+		case UPnP::ENTS:
+		case UPnP::ENT:
+		case UPnP::EST:
+		case UPnP::EUSN:
+		case UPnP::ESoapAction:
+		case UPnP::ESID:
+			DecodeGenericUpnpHeadersL(aHeader);	
+			break;
+		case UPnP::ETimeout:
+			DecodeTimeoutHeaderL(aHeader);
+			break;
+		case UPnP::EExt:
+			DecodeExtL(aHeader);
+			break;
+		case UPnP::EMX:
+		case UPnP::ESEQ:
+			DecodeGenericNumberL(aHeader);
+			break;
+		case UPnP::EMAN:
+			DecodeManL(aHeader);
+			break;
+		case UPnP::ECallback:
+			DecodeCallbackL(aHeader);
+			break;
+		default:
+			User::Leave(KErrNotSupported);
+		}	
+	}
+
+CUPnPHeaderReader::CUPnPHeaderReader(RStringPool aStringPool)
+:iStringPool(aStringPool)
+	{
+	// do nothing.
+	}
+
+CHeaderFieldPart* CUPnPHeaderReader::SetNewPartL(RHeaderField& aHeader, TInt aPartIndex, THTTPHdrVal& aPartVal) const
+	{
+	CHeaderFieldPart* part = CHeaderFieldPart::NewL(aPartVal);
+	CleanupStack::PushL(part);
+	aHeader.SetPartL(part, aPartIndex);
+	CleanupStack::Pop(part);
+	return part;
+	}
+
+CHeaderFieldPart* CUPnPHeaderReader::SetNewFStringPartL(RHeaderField& aHeader, TInt aPartIndex, TPtrC8 aValue) const
+	{
+	RStringF partStr = iStringPool.OpenFStringL(aValue);
+	CleanupClosePushL(partStr);
+	THTTPHdrVal partVal(partStr);
+	CHeaderFieldPart* part = SetNewPartL(aHeader, aPartIndex, partVal);
+	CleanupStack::PopAndDestroy(&partStr);
+	return part;
+	}
+
+CHeaderFieldPart* CUPnPHeaderReader::SetNewIntegerPartL(RHeaderField& aHeader, TInt aPartIndex, TInt aValue) const
+	{
+	THTTPHdrVal partVal(aValue);
+	CHeaderFieldPart* part = SetNewPartL(aHeader, aPartIndex, partVal);
+	return part;
+	}
+
+void CUPnPHeaderReader::DecodeGenericNumberL(RHeaderField& aHeader) const
+	{
+	TPtrC8 buffer;
+	aHeader.RawDataL(buffer);
+	TInt number = KErrNotFound;
+	
+	TInt decimalPos = buffer.Locate('.');
+	if(decimalPos == 0)
+		{
+		// first character is decimal. So, set the value as zero.
+		SetNewIntegerPartL(aHeader, 0, 0);
+		}
+	else
+	   	{
+		// Search for '\n' separator. In the case when a duplicate header has been received,
+		// only use the fist instance of the valid data.
+		TInt newLinePos = buffer.Locate('\n');
+		if (newLinePos != KErrNotFound)
+			{
+			buffer.Set(buffer.Left(newLinePos));
+			}
+		
+		TInt value = KErrNotFound;
+		TInt ret = InetProtTextUtils::ConvertDescriptorToInt(buffer, value);
+		if ( ret > KErrNone ) 
+			{
+			// Extract an integer.  Do not permit terminators other than WS or EOL.
+			InetProtTextUtils::ExtractIntegerValueL(buffer, number, EFalse);	
+			}
+		SetNewIntegerPartL(aHeader, 0, number); // part 0, i.e. the first (and only) part
+	   	}
+	}
+
+CHeaderFieldParam* CUPnPHeaderReader::SetNewFStringParamL(CHeaderFieldPart& aHeaderPart, TPtrC8 aParamName, TPtrC8 aParamValue) const
+	{
+	RStringF paramNameStr = iStringPool.OpenFStringL(aParamName);
+	CleanupClosePushL(paramNameStr);
+	RStringF paramValStr = iStringPool.OpenFStringL(aParamValue);
+	CleanupClosePushL(paramValStr);
+	THTTPHdrVal paramVal(paramValStr);
+	CHeaderFieldParam* param = CHeaderFieldParam::NewL(paramNameStr, paramVal);
+	CleanupStack::PushL(param);
+	aHeaderPart.AddParamL(param);
+	CleanupStack::Pop(param);
+	CleanupStack::PopAndDestroy(2, &paramNameStr); // and paramValStr
+	return param;
+	}
+
+void CUPnPHeaderReader::DecodeExtL(RHeaderField& aHeader) const
+	{
+	TPtrC8 nullPtr(KNullDesC8);
+	SetNewFStringPartL(aHeader, 0, nullPtr);	
+	}
+
+void CUPnPHeaderReader::DecodeGenericUpnpHeadersL(RHeaderField& aHeader) const
+	{
+	TPtrC8 buffer;
+	aHeader.RawDataL(buffer);
+	
+	// Search for '\n' separator. In the case when a duplicate header has been received,
+	// only use the fist instance of the valid data.
+	TInt newLinePos = buffer.Locate('\n');
+	if (newLinePos != KErrNotFound)
+		{
+		buffer.Set(buffer.Left(newLinePos));
+		}
+
+	TPtrC8 token;
+	InetProtTextUtils::ExtractNextTokenFromList(buffer, token, KSemiSpaceSep);
+	SetNewFStringPartL(aHeader, 0, token); // part 0, i.e. the first (and only) part
+	}
+
+void CUPnPHeaderReader::DecodeTimeoutHeaderL(RHeaderField& aHeader) const
+	{
+	TPtrC8 buffer;
+	aHeader.RawDataL(buffer);
+	
+	// Search for '\n' separator. In the case when a duplicate header has been received,
+	// only use the fist instance of the valid data.
+	TInt newLinePos = buffer.Locate('\n');
+	if (newLinePos != KErrNotFound)
+		{
+		buffer.Set(buffer.Left(newLinePos));
+		}
+		
+	RStringF infinite = iStringPool.StringF(UPnP::EInfinite, TUPnPTable::Table());
+	if(buffer.Compare(infinite.DesC()) == 0)
+		{
+		SetNewIntegerPartL(aHeader, 0, -(KMaxTInt));	
+		}
+	
+	else
+		{
+		TPtrC8 token;
+		InetProtTextUtils::ExtractNextTokenFromList(buffer, token, KSemiSpaceSep);
+		TInt consumed = token.Locate('-');
+		token.Set(token.Mid(consumed+1));
+		TInt intVal;
+		InetProtTextUtils::ConvertDescriptorToInt(token, intVal);
+		SetNewIntegerPartL(aHeader, 0, intVal); // part 0, i.e. the first (and only) part
+		}
+	}
+
+void CUPnPHeaderReader::DecodeCallbackL(RHeaderField& aHeader) const
+	{
+	//Callback: <token1><token2><token3>...<tokenN>
+	
+	TPtrC8 rawData;
+	aHeader.RawDataL(rawData);
+	TInt remaining = rawData.Length();
+	TPtrC8 token;
+	TInt tokensFound = 0;
+	TInt consumed;
+	while (remaining)
+		{
+		// Locate and remove the '<' character from the token
+		consumed = rawData.Locate(KOpenAngleBracket);
+		if(consumed == KErrNotFound)
+			{
+			// No more tokens.
+			break;	
+			}
+		// '<' character has now been removed.
+		rawData.Set(rawData.Mid(consumed+1));
+		// Now extract the value before '>' character. 
+		// This will be the actual value of the token.
+		remaining -= InetProtTextUtils::ExtractNextTokenFromList(rawData, token, KCloseAngleBracket);
+
+		// No parameters. Just store the field value
+		InetProtTextUtils::RemoveWhiteSpace(token, InetProtTextUtils::ERemoveBoth);
+		SetNewFStringPartL(aHeader, tokensFound, token);
+		++tokensFound;
+		}
+	}
+
+void CUPnPHeaderReader::DecodeManL(RHeaderField& aHeader) const
+	{
+	TPtrC8 rawData;
+	aHeader.RawDataL(rawData);
+	TInt remaining = rawData.Length();
+	TPtrC8 token;
+	TInt tokensFound = 0;
+	while (remaining > 0)
+		{
+		remaining -= InetProtTextUtils::ExtractNextTokenFromList(rawData, token, KCommaChar);
+
+		TInt pos = token.Locate(KSemiColonChar);
+		if (pos < 0)
+			{
+			// No parameters. Just store the field value
+			InetProtTextUtils::RemoveWhiteSpace(token, InetProtTextUtils::ERemoveBoth);
+			SetNewFStringPartL(aHeader, tokensFound, token);
+			}
+		else if (pos==0)
+			{
+			// No valid ns-value. Just store the parameter.
+			User::Leave(KErrUPnPDecodeMAN);
+			}
+		else
+			{
+			// parameter value(s) exist.
+
+			if (pos==token.Length())
+				// if no field value exists. i.e. an invalid header
+				User::Leave(KErrUPnPDecodeMAN);
+
+			// store the field
+			TPtrC8 fieldValue(token.Left(pos));
+			TPtrC8 parameters(token.Mid(pos+1));
+			InetProtTextUtils::RemoveWhiteSpace(fieldValue, InetProtTextUtils::ERemoveBoth);
+
+			CHeaderFieldPart* part = SetNewFStringPartL(aHeader, tokensFound, fieldValue);
+
+			TPtrC8 thisParam;
+			do {
+				// check if there is another parameter
+				pos = parameters.Locate(KSemiColonChar);
+				if (pos > 0)
+					{
+					if (pos==token.Length())
+						// if no field value exists. i.e. an invalid header
+						User::Leave(KErrUPnPDecodeMAN);
+
+					thisParam.Set(parameters.Left(pos));
+					parameters.Set(parameters.Mid(pos+1));
+					}
+				else
+					thisParam.Set(parameters);
+
+				
+				TInt pPos = thisParam.Locate(KEqualsChar);
+				if (pPos <= 0 || pPos==thisParam.Length())
+					// Invalid parameter, missing '=' char, or missing field value.
+					User::Leave(KErrUPnPDecodeMAN);
+
+				TPtrC8 paramField(thisParam.Left(pPos));
+ 				TPtrC8 paramData(thisParam.Mid(pPos + 1));
+
+				SetNewFStringParamL(*part, paramField, paramData);
+
+				} while (pos > 0);
+			}
+		++tokensFound;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/src/cupnpheaderwriter.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,302 @@
+// 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 <upnp/tupnptable.h>
+#include <inetprottextutils.h>
+#include <upnp/upnpconstants.h>
+
+#include "cupnpheaderwriter.h"
+#include "CHeaderField.h"
+
+
+const TInt KMaxNumDigits = 10;
+_LIT8(KTimeoutSecond, "Second-");
+_LIT8(KSemiSpaceSep,"; ");
+_LIT8(KQuotes, "\"");
+_LIT8(KOpenAngleBracket, "<");
+_LIT8(KCloseAngleBracket, ">");
+
+
+CUPnPHeaderWriter* CUPnPHeaderWriter::NewL(RStringPool aStringPool)
+	{
+	return new (ELeave) CUPnPHeaderWriter(aStringPool);
+	}
+
+CUPnPHeaderWriter::~CUPnPHeaderWriter()
+	{
+	// do nothing.
+	}
+
+void CUPnPHeaderWriter::EncodeHeaderL(RHeaderField& aHeader)
+	{
+	RStringF fieldStr = iStringPool.StringF(aHeader.Name());
+	switch( fieldStr.Index(TUPnPTable::Table()) )
+		{
+		case UPnP::EST:
+			EncodeGenericUpnpHeaderL(aHeader, KErrUPnPEncodeST);
+			break;
+		case UPnP::EUSN:
+			EncodeGenericUpnpHeaderL(aHeader, KErrUPnPEncodeUSN);
+			break;
+		case UPnP::ETimeout:
+			EncodeTimeoutHeaderL(aHeader, KErrUPnPEncodeTimeout);
+			break;
+		case UPnP::EExt:
+			EncodeExtL(aHeader);
+			break;
+		case UPnP::ESID:
+			EncodeGenericUpnpHeaderL(aHeader, KErrUPnPEncodeSID);
+			break;
+		case UPnP::ENTS:
+			EncodeGenericUpnpHeaderL(aHeader, KErrUPnPEncodeNTS);	
+			break;
+		case UPnP::ENT:
+			EncodeGenericUpnpHeaderL(aHeader, KErrUPnPEncodeNT);
+			break;
+		case UPnP::EMX:
+			EncodeGenericNumberHeaderL(aHeader, KErrUPnPEncodeMX);	
+			break;
+		case UPnP::ESEQ:
+			EncodeGenericNumberHeaderL(aHeader, KErrUPnPEncodeSEQ);	
+			break;
+		case UPnP::EMAN:
+			EncodeMANL(aHeader, KErrUPnPEncodeMAN);
+			break;
+		case UPnP::ESoapAction:
+			EncodeSoapActionL(aHeader);	
+			break;
+		case UPnP::ECallback:
+			EncodeCallbackL(aHeader);	
+			break;
+		default:
+			User::Leave(KErrNotSupported);
+		}	
+	}
+
+CUPnPHeaderWriter::CUPnPHeaderWriter(RStringPool aStringPool)
+:iStringPool(aStringPool)
+	{
+	// do nothing.
+	}
+
+void CUPnPHeaderWriter::EncodeGenericUpnpHeaderL(RHeaderField& aHeader, TInt aErrorCode) const
+	{
+	THeaderFieldPartIter iter = aHeader.PartsL();
+	iter.First();
+	if (iter.AtEnd())
+		User::Leave(aErrorCode);
+
+	aHeader.BeginRawDataL();
+	
+	const CHeaderFieldPart* part = iter();
+	if (part == NULL)
+		User::Leave(aErrorCode);
+	
+	THTTPHdrVal ptVal = part->Value();
+	if (ptVal.Type() != THTTPHdrVal::KStrFVal)
+		User::Leave(aErrorCode);
+	aHeader.WriteRawDataL(ptVal.StrF().DesC());
+	
+	aHeader.CommitRawData();	
+	}
+
+void CUPnPHeaderWriter::EncodeGenericNumberHeaderL(RHeaderField& aHeader, TInt aErrorCodeToUseOnFailure) const
+	{
+	// header = <header> ":" 1*DIGIT
+	THeaderFieldPartIter iter1 = aHeader.PartsL();
+	iter1.First();
+	if (!iter1.AtEnd())
+		{
+		const CHeaderFieldPart* part = iter1();
+		if (part)
+			{
+			THTTPHdrVal pt1val = part->Value();
+			if (pt1val.Type() == THTTPHdrVal::KTIntVal)
+				{
+				TBuf8<KMaxNumDigits> lenBuf;
+				lenBuf.Num(pt1val.Int());
+				aHeader.BeginRawDataL();
+				aHeader.WriteRawDataL(lenBuf);
+				aHeader.CommitRawData();
+				return;
+				}
+			}
+		}
+	User::Leave(aErrorCodeToUseOnFailure);
+	}
+
+void CUPnPHeaderWriter::EncodeTimeoutHeaderL(RHeaderField& aHeader, TInt aErrorCode) const
+	{
+	THeaderFieldPartIter iter = aHeader.PartsL();
+	iter.First();
+	if (iter.AtEnd())
+		User::Leave(aErrorCode);
+	
+	aHeader.BeginRawDataL();
+	
+	const CHeaderFieldPart* part = iter();
+	if (part == NULL)
+		User::Leave(aErrorCode);
+	
+	THTTPHdrVal ptVal = part->Value();
+	if (ptVal.Type() != THTTPHdrVal::KTIntVal)
+		User::Leave(aErrorCode);
+	
+	if(ptVal.Int() == -KMaxTInt)
+		{
+		RStringF infiniteStrF = iStringPool.StringF(UPnP::EInfinite, TUPnPTable::Table());
+		aHeader.WriteRawDataL(infiniteStrF.DesC());
+		}
+	else
+		{
+		HBufC8* ptValDesC;
+		InetProtTextUtils::ConvertIntToDescriptorL(ptVal.Int(), ptValDesC);
+		CleanupStack::PushL(ptValDesC);
+		RBuf8 buf;
+		buf.CreateL(KTimeoutSecond());
+		CleanupClosePushL(buf);
+		buf.ReAllocL(buf.Length() + ptValDesC->Length());
+		buf.Append(ptValDesC->Des());
+		aHeader.WriteRawDataL(buf);
+		CleanupStack::PopAndDestroy(&buf);
+		CleanupStack::PopAndDestroy(ptValDesC);
+		}
+	
+	aHeader.CommitRawData();	
+	}
+
+void CUPnPHeaderWriter::EncodeMANL(RHeaderField& aHeader, TInt aErrorCode) const
+	{
+	THeaderFieldPartIter iter = aHeader.PartsL();
+	iter.First();
+	if (iter.AtEnd())
+		User::Leave(aErrorCode);
+
+	aHeader.BeginRawDataL();
+	const CHeaderFieldPart* part = WriteRawStrFMANPartL(aHeader, iter, aErrorCode);
+
+	// Check for parameters
+	THeaderFieldParamIter iter2 = part->Parameters();
+	iter2.First();
+	
+	if(!iter2.AtEnd())
+		{
+		aHeader.WriteRawDataL(KSemiSpaceSep);
+		const CHeaderFieldParam* param = iter2();
+		if (!param)
+			User::Leave(aErrorCode);
+
+		RStringF nsStr = iStringPool.StringF(UPnP::ENS,TUPnPTable::Table());
+		THTTPHdrVal paramVal = param->Value();
+		if (param->Name() == nsStr)
+			{
+			// Get the ns value
+			if (paramVal.Type() != THTTPHdrVal::KTIntVal)
+				User::Leave(aErrorCode);
+			HBufC8* nsValBuf;
+			InetProtTextUtils::ConvertIntToDescriptorL(paramVal.Int(), nsValBuf);
+			CleanupStack::PushL(nsValBuf);
+			aHeader.WriteRawDataL(nsStr.DesC());
+			aHeader.WriteRawDataL('=');
+			aHeader.WriteRawDataL(*nsValBuf);
+			CleanupStack::PopAndDestroy(nsValBuf);				
+			}
+		else
+			{
+			// Extension parameter - handle strings only
+			if (paramVal.Type() != THTTPHdrVal::KStrFVal)
+				User::Leave(aErrorCode);
+			RStringF paramName = iStringPool.StringF(param->Name());
+			aHeader.WriteRawDataL(paramName.DesC());
+			aHeader.WriteRawDataL('=');
+			aHeader.WriteRawDataL(paramVal.StrF().DesC());
+			}
+		}
+
+	// Done
+	aHeader.CommitRawData();	
+	}
+
+const CHeaderFieldPart* CUPnPHeaderWriter::WriteRawStrFMANPartL(RHeaderField& aHeader, THeaderFieldPartIter& aIter, TInt aErrorCode) const
+	{
+	const CHeaderFieldPart* part = aIter();
+	if (part == NULL)
+		User::Leave(aErrorCode);
+	THTTPHdrVal ptVal = part->Value();
+	if (ptVal.Type() != THTTPHdrVal::KStrFVal)
+		User::Leave(aErrorCode);
+	
+	aHeader.WriteRawDataL(KQuotes());
+	aHeader.WriteRawDataL(ptVal.StrF().DesC());
+	aHeader.WriteRawDataL(KQuotes());
+	
+	return part;
+	}
+
+void CUPnPHeaderWriter::EncodeSoapActionL(RHeaderField& aHeader) const
+	{
+	THeaderFieldPartIter iter = aHeader.PartsL();
+	iter.First();
+	if (iter.AtEnd())
+		User::Leave(KErrUPnPEncodeSoapAction);
+	
+	aHeader.BeginRawDataL();
+
+	const CHeaderFieldPart* part = iter();
+	if (part == NULL)
+		User::Leave(KErrUPnPEncodeSoapAction);
+	THTTPHdrVal ptVal = part->Value();
+	if (ptVal.Type() != THTTPHdrVal::KStrFVal)
+		User::Leave(KErrUPnPEncodeSoapAction);
+	
+	aHeader.WriteRawDataL(KQuotes());
+	aHeader.WriteRawDataL(ptVal.StrF().DesC());
+	aHeader.WriteRawDataL(KQuotes());
+	aHeader.CommitRawData();
+	}
+
+void CUPnPHeaderWriter::EncodeCallbackL(RHeaderField& aHeader) const
+	{
+	THeaderFieldPartIter iter = aHeader.PartsL();
+	iter.First();
+	if (iter.AtEnd())
+		User::Leave(KErrUPnPEncodeCallback);
+	
+	aHeader.BeginRawDataL();
+
+	while (!iter.AtEnd())
+		{
+		const CHeaderFieldPart* part = iter();
+		if (part == NULL)
+			User::Leave(KErrUPnPEncodeCallback);
+		THTTPHdrVal ptVal = part->Value();
+		if (ptVal.Type() != THTTPHdrVal::KStrFVal)
+			User::Leave(KErrUPnPEncodeCallback);
+		
+		aHeader.WriteRawDataL(KOpenAngleBracket());
+		aHeader.WriteRawDataL(ptVal.StrF().DesC());
+		aHeader.WriteRawDataL(KCloseAngleBracket());
+		++iter;
+		}
+	
+	aHeader.CommitRawData();
+	}
+
+void CUPnPHeaderWriter::EncodeExtL(RHeaderField& aHeader)
+	{
+	aHeader.BeginRawDataL();
+	aHeader.WriteRawDataL(KNullDesC8);
+	aHeader.CommitRawData();	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/codec/src/upnpcodecmain.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,35 @@
+// 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 <e32std.h>
+#include <ecom/implementationproxy.h>
+
+#include "cupnpcodec.h"
+
+const TInt KUidUPnPCodec = 0x2001C598;
+
+// Map the interface UIDs to implementation factory functions
+const TImplementationProxy ImplementationTable[] = 
+	{
+	IMPLEMENTATION_PROXY_ENTRY(KUidUPnPCodec,	CUPnPCodec::NewL),
+	};
+
+// Exported proxy for instantiation method resolution
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+	{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+	return ImplementationTable;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/group/application-protocols_upnp.mrp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,12 @@
+component	application-protocols_upnp
+source	\sf\mw\srvdiscovery\servicediscoveryandcontrol\upnp
+binary	\sf\mw\srvdiscovery\servicediscoveryandcontrol\upnp\group	all
+exports	\sf\mw\srvdiscovery\servicediscoveryandcontrol\upnp\group
+
+notes_source	\component_defs\release.src
+
+
+
+ipr E 
+ipr T \sf\mw\srvdiscovery\servicediscoveryandcontrol\upnp\test
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+// 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:
+//
+
+// Subproject builds
+PRJ_TESTMMPFILES
+
+#include "../chunkmgr/group/bld.inf"
+#include "../upnputils/group/bld.inf"
+
+#include "../client/upnpplugin/group/bld.inf"
+#include "../client/pnp/group/bld.inf"
+#include "../SocketHandler/group/bld.inf"
+#include "../upnpmessage/group/bld.inf"
+#include "../upnpdescription/group/bld.inf"
+#include "../Server/AppProtIntf/group/bld.inf"
+#include "../Server/group/bld.inf"
+#include "../codec/group/bld.inf"
+#include "../chunkmgr/ts_chunkmgr/group/bld.inf"
+
+//#include "../IntegTest/group/bld.inf"
+//#include "../unittests/upnpmessagetest/group/bld.inf"
+//#include "../unittests/upnpdescriptiontest/group/bld.inf"
+
+//#include "../unittests/te_serverbase/group/bld.inf"
+//#include "../unittests/tcpserver/group/bld.inf"
+//#include "../unittests/tcpclient/group/bld.inf"
+//#include "../unittests/udpserver/group/bld.inf"
+//#include "../unittests/udpclient/group/bld.inf"
+
+
+PRJ_TESTEXPORTS
+upnp.iby /epoc32/rom/include/upnp.iby
+device.xml z:/private/101f7989/upnp/device.xml
+runtests.iby /epoc32/rom/include/runtests.iby
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/group/commsdbg.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+// TS_Flogger_serial2.ini
+// Source ini for Ts_flogger test harness for case of serial port #2 logging.
+
+MEDIA FILE
+
+Synchronous
+LOG RSModule Leak
+LOG Esock *
+LOG NIFMAN *
+LOG NETDIAL *
+LOG Conn *
+LOG SubConn *
+LOG MetaConn *
+LOG NIFSESSION *
+LOG PPP *
+LOG C32Bca *
+LOG C32 *
+LOG CSD *
+LOG CSDAgx *
+LOG IPProto *
+LOG c32start *
+LOG CFNode *
+LOG SPUD *
+LOG SimTsy *
+LOG Tier *
+LOG COMMSFW Trans
+LOG Ether802 *
+LOG EIntSock *
+LOG C32SerComms *
+LOG RootServer *
+LOG RInternalSocket *
+LOG dhcp  *
+//
+// UPNPMESSAGE
+// 
+LOG UPnPReqComposer *
+LOG UPnPReqParser *
+LOG UPnPResComposer *
+LOG UPnPResParser *
+//
+// UPNP CONTROL POINT ACTIVITIES
+//
+LOG CPSearch *
+LOG CPRegNotify *
+LOG CPDescribe *
+LOG CPSubscribe *
+LOG CPUnSubscribe *
+LOG CPEventNotify *
+//
+// UPNP CONTROL POINT STATES
+//
+LOG UPnPCtrlScprSts *
+//
+// UPNP CONTROL POINT SCPR
+//
+LOG UPnPCtrlScpr *
+//
+// UPNP SERVICE POINT ACTIVITIES
+//
+LOG SPSrvcReg *
+LOG SPSubsTimer *
+LOG SPRootDvcInfoReq *
+LOG SPServcReqInf *
+LOG SPClntFlowCreate *
+LOG SPEventNotify *
+LOG SPSrvcReg *
+LOG SPDeviceReg *
+LOG SPSearchRes *
+//
+// UPNP SERVICE POINT STATES
+LOG SPCprSts *
+LOG SPDeftScptSts *
+LOG SPScprSts *
+//
+// UPNP SERVICE POINT SCPR
+//
+LOG UPnPSPScpr *
+//
+// UPNP SERVER FLOW
+//
+LOG HTTPClntTrans *
+LOG HTTPClientFlow *
+LOG HTTPMUDPFlow *
+LOG HTTPServer *
+LOG HTTPServerFlow *
+LOG HTTPSrvrHndlr *
+LOG HTTPUDPFlow *
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/group/device.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,34 @@
+<root>
+<specVersion>
+<major>1</major>
+<minor>0</minor>
+</specVersion>
+<device>
+<deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+<presentationURL>/</presentationURL>
+<friendlyName>Symbian UPnP</friendlyName>
+<manufacturer>Symbian Corporation</manufacturer>
+<manufacturerURL>http://www.symbian.com</manufacturerURL>
+<modelDescription>Software Emulated Light Bulb</modelDescription>
+<modelName>Intel CLR Emulated Light Bulb</modelName>
+<modelNumber>XPCL1</modelNumber>
+<modelURL>http://www.symbian.com</modelURL>
+<UDN>uuid:25a0be80-8775-4988-b627-720fbd44a627</UDN>
+<iconList>
+<icon>
+<mimetype>image/png</mimetype>
+<width>32</width>
+<height>32</height>
+<depth>32</depth>
+<url>/icons/playstation1.png</url>
+</icon>
+<icon>
+<mimetype>image/png</mimetype>
+<width>32</width>
+<height>32</height>
+<depth>32</depth>
+<url>icons/playstation2.png</url>
+</icon>
+</iconList>
+</device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/group/runtests.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,22 @@
+// 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 __RUNTESTS_IBY__
+#define __RUNTESTS_IBY__
+
+file=ABI_DIR\BUILD_DIR\RUNTESTS.EXE		sys\bin\RUNTESTS.EXE HEAPMAX(0x10000)
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/group/te_upnp.cfg	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1132 @@
+############################################################
+## Network
+## 
+[Network]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=Intranet
+	FIELD_COUNT=1
+END_ADD
+
+
+############################################################
+## ModemBearer
+## 
+[ModemBearer]
+ADD_TEMPLATE
+	Name=Default Modem
+	IfName=PPP
+	PortName=COMM::0
+	TSYName=MM
+	CSYName=ECUART
+	LastSocketActivityTimeout=180
+	LastSessionClosedTimeout=30
+	LastSocketClosedTimeout=60
+	DataBits=8
+	StopBits=1
+	Parity=NONE
+	Rate=115200
+	Handshaking=0
+	SpecialRate=0
+	XonChar=0
+	XoffChar=0
+	FaxClassPref=AUTO
+	SpeakerPref=NEVER
+	SpeakerVolPref=QUIET
+	ModemInitString=AT
+	DataInitString=AT
+	FaxInitString=AT
+	DialPauseLength=S8=
+	SpeakerVolContorlLow=L0
+	SpeakerVolControlMedium=L1
+	SpeakerVolControlHigh=L2
+	SpeakerAlwaysOff=M0
+	SpeakerOnUntilCarrier=M1
+	SpeakerAlwaysOn=M2
+	SpeakerOnAfterUntilCarrier=M3
+	DialToneWaitModifier=W
+	CallProgress1=X1
+	CallProgress2=X2
+	CallProgress3=X3
+	CallProgress4=X4
+	EchoOff=E0
+	VerboseText=V1
+	QuietOff=Q0
+	QuietOn=Q1
+	DialCommandStateModifier=;
+	OnLine=O
+	ResetConfiguration=Z
+	ReturnToFactoryDefs=&F
+	DCDOnDuringLink=&C1
+	DTRHangUp=&D2
+	DSRAlwaysOn=&S0
+	RTSCTSHandshake=&K3
+	XonXoffHandshake=&K4
+	EscapeCharacter=+
+	EscapeGuardPeriod=S12
+	NoDialTone=NO DIAL TONE
+	Busy=BUSY
+	NoAnswer=NO ANSWER
+	Carrier=CARRIER
+	Connect=CONNECT
+	CompressionClass5=COMPRESSION:CLASS 5
+	CompressionV42bis=COMPRESSION:V.42 bis
+	CompressionNone=COMPRESSION:NONE
+	ProtocolLAPD=PROTOCOL:LAPD
+	ProtocolALT=PROTOCOL:ALT
+	ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR
+	ProtocolNone=PROTOCOL:NONE
+	MessageCentreNumber=+44123456789
+	MessageValidityPeriod=1440
+	MessageDeliveryReport=FALSE
+	MinimumSignalLevel=9905
+	CommRole=0
+	SIRSettings=0
+	Agent=CSD.agt
+	FIELD_COUNT=69
+END_TEMPLATE
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=Dummy (Long Timeout)
+	IfName=dummynif
+	PortName=COMM::0
+	TSYName=MM
+	CSYName=ECUART
+	LastSocketActivityTimeout=-1
+	LastSessionClosedTimeout=-1
+	LastSocketClosedTimeout=-1
+	DataBits=8
+	StopBits=1
+	Parity=NONE
+	Rate=115200
+	Handshaking=0
+	SpecialRate=0
+	XonChar=0
+	XoffChar=0
+	FaxClassPref=AUTO
+	SpeakerPref=NEVER
+	SpeakerVolPref=QUIET
+	ModemInitString=AT
+	DataInitString=AT
+	FaxInitString=AT
+	DialPauseLength=S8=
+	SpeakerVolContorlLow=L0
+	SpeakerVolControlMedium=L1
+	SpeakerVolControlHigh=L2
+	SpeakerAlwaysOff=M0
+	SpeakerOnUntilCarrier=M1
+	SpeakerAlwaysOn=M2
+	SpeakerOnAfterUntilCarrier=M3
+	DialToneWaitModifier=W
+	CallProgress1=X1
+	CallProgress2=X2
+	CallProgress3=X3
+	CallProgress4=X4
+	EchoOff=E0
+	VerboseText=V1
+	QuietOff=Q0
+	QuietOn=Q1
+	DialCommandStateModifier=;
+	OnLine=O
+	ResetConfiguration=Z
+	ReturnToFactoryDefs=&F
+	DCDOnDuringLink=&C1
+	DTRHangUp=&D2
+	DSRAlwaysOn=&S0
+	RTSCTSHandshake=&K3
+	XonXoffHandshake=&K4
+	EscapeCharacter=+
+	EscapeGuardPeriod=S12
+	NoDialTone=NO DIAL TONE
+	Busy=BUSY
+	NoAnswer=NO ANSWER
+	Carrier=CARRIER
+	Connect=CONNECT
+	CompressionClass5=COMPRESSION:CLASS 5
+	CompressionV42bis=COMPRESSION:V.42 bis
+	CompressionNone=COMPRESSION:NONE
+	ProtocolLAPD=PROTOCOL:LAPD
+	ProtocolALT=PROTOCOL:ALT
+	ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR
+	ProtocolNone=PROTOCOL:NONE
+	MessageValidityPeriod=0
+	MessageDeliveryReport=TRUE
+	MinimumSignalLevel=0
+	Agent=NULLAGT.agt
+	FIELD_COUNT=66
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=Null Modem 115200bps
+	IfName=PPP
+	PortName=COMM::0
+	TSYName=MM
+	CSYName=ECUART
+	LastSocketActivityTimeout=180
+	LastSessionClosedTimeout=30
+	LastSocketClosedTimeout=60
+	DataBits=8
+	StopBits=1
+	Parity=NONE
+	Rate=115200
+	Handshaking=4
+	SpecialRate=0
+	XonChar=0
+	XoffChar=0
+	FaxClassPref=AUTO
+	SpeakerPref=NEVER
+	SpeakerVolPref=QUIET
+	ModemInitString=AT
+	DataInitString=AT
+	FaxInitString=AT
+	DialPauseLength=S8=
+	SpeakerVolContorlLow=L0
+	SpeakerVolControlMedium=L1
+	SpeakerVolControlHigh=L2
+	SpeakerAlwaysOff=M0
+	SpeakerOnUntilCarrier=M1
+	SpeakerAlwaysOn=M2
+	SpeakerOnAfterUntilCarrier=M3
+	DialToneWaitModifier=W
+	CallProgress1=X1
+	CallProgress2=X2
+	CallProgress3=X3
+	CallProgress4=X4
+	EchoOff=E0
+	VerboseText=V1
+	QuietOff=Q0
+	QuietOn=Q1
+	DialCommandStateModifier=;
+	OnLine=O
+	ResetConfiguration=Z
+	ReturnToFactoryDefs=&F
+	DCDOnDuringLink=&C1
+	DTRHangUp=&D2
+	DSRAlwaysOn=&S0
+	RTSCTSHandshake=&K3
+	XonXoffHandshake=&K4
+	EscapeCharacter=+
+	EscapeGuardPeriod=S12
+	NoDialTone=NO DIAL TONE
+	Busy=BUSY
+	NoAnswer=NO ANSWER
+	Carrier=CARRIER
+	Connect=CONNECT
+	CompressionClass5=COMPRESSION:CLASS 5
+	CompressionV42bis=COMPRESSION:V.42 bis
+	CompressionNone=COMPRESSION:NONE
+	ProtocolLAPD=PROTOCOL:LAPD
+	ProtocolALT=PROTOCOL:ALT
+	ProtocolALTCELLULAR=PROTOCOL:ALT-CELLULAR
+	ProtocolNone=PROTOCOL:NONE
+	MessageCentreNumber=+44123456789
+	MessageValidityPeriod=1440
+	MessageDeliveryReport=FALSE
+	MinimumSignalLevel=9905
+	CommRole=0
+	SIRSettings=0
+	Agent=DoesNotExist.agt
+	FIELD_COUNT=69
+END_ADD
+
+
+############################################################
+## Location
+## 
+[Location]
+ADD_TEMPLATE
+	Name=Default Location
+	IntlPrefixCode=+
+	NatPrefixCode=0
+	NatCode=44
+	Mobile=TRUE
+	UsePulseDial=FALSE
+	WaitForDialTone=FALSE
+	PauseAfterDialout=0
+	FIELD_COUNT=8
+END_TEMPLATE
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=Office
+	IntlPrefixCode=00
+	NatPrefixCode=0
+	NatCode=44
+	AreaCode=171
+	DialOutCode=9,
+	Mobile=FALSE
+	UsePulseDial=FALSE
+	WaitForDialTone=FALSE
+	PauseAfterDialout=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=Office Direct Dial
+	IntlPrefixCode=00
+	NatPrefixCode=0
+	NatCode=44
+	AreaCode=171
+	Mobile=FALSE
+	UsePulseDial=FALSE
+	WaitForDialTone=FALSE
+	PauseAfterDialout=0
+	FIELD_COUNT=9
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Name=Mobile
+	IntlPrefixCode=+
+	NatPrefixCode=0
+	NatCode=44
+	Mobile=TRUE
+	UsePulseDial=FALSE
+	WaitForDialTone=FALSE
+	PauseAfterDialout=0
+	FIELD_COUNT=8
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Name=Home
+	IntlPrefixCode=00
+	NatPrefixCode=0
+	NatCode=44
+	AreaCode=181
+	Mobile=FALSE
+	UsePulseDial=TRUE
+	WaitForDialTone=TRUE
+	PauseAfterDialout=0
+	FIELD_COUNT=9
+END_ADD
+
+
+############################################################
+## GlobalSettings
+## 
+[GlobalSettings]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=DefaultRecordName-1
+	ConnectionAttempts=5
+	RedialAttempts=5
+	SmsBearer=1
+	SmsReceiveMode=2
+	GPRSAttachMode=1
+	AcceptIncomingGprs=1
+	GPRSClassCBearer=GSM
+	ModemForDataAndFax=2
+	ModemForPhoneServicesAndSMS=2
+	LocationForDataAndFax=2
+	LocationForPhoneServicesAndSMS=2
+	MaxMBufHeap=2
+	DefaultNetwork=1
+	DefaultTier=1
+	BearerAvailabilityCheckTSY=mm
+	FIELD_COUNT=16
+END_ADD
+
+
+############################################################
+## DialOutISP
+## 
+[DialOutISP]
+ADD_TEMPLATE
+	Name=Default Dial Out ISP
+	DialResolution=TRUE
+	UseLoginScript=FALSE
+	PromptForLogin=TRUE
+	DisplayPCT=FALSE
+	IfPromptForAuth=TRUE
+	IfCallbackEnabled=FALSE
+	IpAddrFromServer=TRUE
+	IpDNSAddrFromServer=TRUE
+	EnableIPHeaderComp=FALSE
+	EnableLCPExtension=FALSE
+	DisablePlainTextAuth=FALSE
+	EnableSWComp=FALSE
+	BearerService=0
+	BearerProtocol=UNSPECIFIED
+	RlpVersion=0
+	IwfToMs=0
+	MsToIwf=0
+	AckTimer=0
+	RetransmissionAttempts=0
+	ResequencePeriod=0
+	V42Compression=0
+	V42Codewords=0
+	V42MaxLength=0
+	Asymmetry=0
+	UserInitUpgrade=FALSE
+	UseEdge=FALSE
+	FIELD_COUNT=27
+END_TEMPLATE
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=NT RAS
+	Type=INTERNETONLY
+	DialResolution=TRUE
+	UseLoginScript=TRUE
+	LoginScript=CHARMAP \[windows-1252\]\nLOOP 10\n{\nSEND "CLIENT"+<0x0d>\nWAIT 3\n{\n"SERVER" OK\n}\n}\nEXIT KErrNoAnswer$\n\nOK:\nEXIT\n
+	PromptForLogin=FALSE
+	LoginName=RasUser
+	DisplayPCT=FALSE
+	IfNetworks=ip
+	IfPromptForAuth=FALSE
+	IfAuthName=RasUser
+	IfAuthPass=pass
+	AuthRetries=0
+	IfCallbackEnabled=FALSE
+	CallbackTimeout=0
+	IpAddrFromServer=TRUE
+	IpDNSAddrFromServer=TRUE
+	EnableIPHeaderComp=FALSE
+	EnableLCPExtension=FALSE
+	DisablePlainTextAuth=FALSE
+	EnableSWComp=FALSE
+	BearerName=ASYNCHRONOUS
+	BearerSpeed=UNSPECIFIED
+	BearerCE=UNSPECIFIED
+	BearerType=CSD
+	ChannelCoding=UNSPECIFIED
+	Aiur=0
+	RequestedTimeSlots=0
+	MaximumTimeSlots=0
+	BearerService=0
+	BearerProtocol=UNSPECIFIED
+	RlpVersion=0
+	IwfToMs=0
+	MsToIwf=0
+	AckTimer=0
+	RetransmissionAttempts=0
+	ResequencePeriod=0
+	V42Compression=0
+	V42Codewords=0
+	V42MaxLength=0
+	Asymmetry=0
+	UserInitUpgrade=FALSE
+	UseEdge=FALSE
+	FIELD_COUNT=43
+END_ADD
+
+############################################################
+## APPrioritySelectionPolicyTable
+## 
+[APPrioritySelectionPolicyTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=SelectionPolicy1
+	AP1=22
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=SelectionPolicy2
+	AP1=24
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=SelectionPolicy3
+	AP1=26
+	FIELD_COUNT=2
+END_ADD
+
+############################################################
+## AccessPointTable
+## 
+[AccessPointTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=1
+	Name=dummynifMappedFromIAP1
+	Tier=271064565
+	MCpr=8
+	SelectionPolicy=0
+	Cpr=3
+	CprConfig=1
+	SCpr=3
+	Protocol=8
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=2
+	Name=pppMappedFromIAP2
+	Tier=271064565
+	MCpr=3
+	SelectionPolicy=0
+	Cpr=3
+	CprConfig=2
+	SCpr=3
+	Protocol=3
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=3
+	Name=dummynifMappedFromIAP3
+	Tier=271064565
+	MCpr=8
+	SelectionPolicy=0
+	Cpr=3
+	CprConfig=3
+	SCpr=3
+	Protocol=8
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 21
+	Id=21
+	Name=NetworkMappedFromIAP1
+	Tier=271064536
+	MCpr=1
+	SelectionPolicy=1
+	Cpr=1
+	CprConfig=0
+	SCpr=1
+	Protocol=1
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 22
+	Id=22
+	Name=IPProtoMappedFromIAP1
+	Tier=271064560
+	MCpr=2
+	SelectionPolicy=1
+	Cpr=2
+	CprConfig=1
+	SCpr=2
+	Protocol=2
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 23
+	Id=23
+	Name=NetworkMappedFromIAP2
+	Tier=271064536
+	MCpr=1
+	SelectionPolicy=2
+	Cpr=1
+	CprConfig=0
+	SCpr=1
+	Protocol=1
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 24
+	Id=24
+	Name=IPProtoMappedFromIAP2
+	Tier=271064560
+	MCpr=2
+	SelectionPolicy=2
+	Cpr=2
+	CprConfig=2
+	SCpr=2
+	Protocol=2
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 25
+	Id=25
+	Name=NetworkMappedFromIAP3
+	Tier=271064536
+	MCpr=1
+	SelectionPolicy=3
+	Cpr=1
+	CprConfig=0
+	SCpr=1
+	Protocol=1
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 26
+	Id=26
+	Name=IPProtoMappedFromIAP3
+	Tier=271064560
+	MCpr=2
+	SelectionPolicy=3
+	Cpr=2
+	CprConfig=3
+	SCpr=2
+	Protocol=2
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 50
+	Id=50
+	Name=SNAP50
+	Tier=271064536
+	MCpr=1
+	SelectionPolicy=1
+	Cpr=1
+	CprConfig=0
+	SCpr=1
+	Protocol=1
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 51
+	Id=51
+	Name=UPnPControlPoint
+	Tier=536924244
+	MCpr=11
+	SelectionPolicy=50
+	Cpr=4
+	CprConfig=0
+	SCpr=5
+	Protocol=10
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 52
+	Id=52
+	Name=UPnPServicePoint
+	Tier=536924244
+	MCpr=11
+	SelectionPolicy=50
+	Cpr=5
+	CprConfig=0
+	SCpr=6
+	Protocol=10
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+############################################################
+## BearerTypeTable
+## 
+[BearerTypeTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=1
+	Name=ppp
+	Tier=271064565
+	MCpr=3
+	Cpr=3
+	SCpr=3
+	Protocol=3
+	FIELD_COUNT=7
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=2
+	Name=ethint
+	Tier=271064565
+	MCpr=4
+	Cpr=3
+	SCpr=3
+	Protocol=4
+	FIELD_COUNT=7
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=3
+	Name=rawip
+	Tier=271064565
+	MCpr=5
+	Cpr=3
+	SCpr=3
+	Protocol=5
+	FIELD_COUNT=7
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=4
+	Name=tunnelnif
+	Tier=271064565
+	MCpr=6
+	Cpr=3
+	SCpr=3
+	Protocol=6
+	FIELD_COUNT=7
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=qosppp
+	Tier=271064565
+	MCpr=7
+	Cpr=3
+	SCpr=3
+	Protocol=7
+	FIELD_COUNT=7
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 6
+	Id=6
+	Name=dummynif
+	Tier=271064565
+	MCpr=8
+	Cpr=3
+	SCpr=3
+	Protocol=8
+	FIELD_COUNT=7
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 7
+	Id=7
+	Name=hungrynif
+	Tier=271064565
+	MCpr=9
+	Cpr=3
+	SCpr=3
+	Protocol=9
+	FIELD_COUNT=7
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 8
+	Id=8
+	Name=spud-ppp
+	Tier=271064565
+	MCpr=3
+	Cpr=1
+	SCpr=4
+	Protocol=3
+	FIELD_COUNT=7
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 9
+	Id=9
+	Name=spud-rawip
+	Tier=271064565
+	MCpr=10
+	Cpr=1
+	SCpr=4
+	Protocol=5
+	FIELD_COUNT=7
+END_ADD
+
+
+############################################################
+## IAP
+## 
+[IAP]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=NT RAS with Null Modem
+	IAPServiceType=DialOutISP
+	IAPService=2
+	IAPBearerType=ModemBearer
+	IAPBearer=2
+	IAPNetwork=1
+	IAPNetworkWeighting=0
+	Location=2
+	FIELD_COUNT=8
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=NT RAS BROKEN
+	IAPServiceType=DialOutISP
+	IAPService=2
+	IAPBearerType=ModemBearer
+	IAPBearer=3
+	IAPNetwork=1
+	IAPNetworkWeighting=0
+	Location=2
+	FIELD_COUNT=8
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=NT RAS with Null Modem 2
+	IAPServiceType=DialOutISP
+	IAPService=2
+	IAPBearerType=ModemBearer
+	IAPBearer=2
+	IAPNetwork=1
+	IAPNetworkWeighting=0
+	Location=2
+	FIELD_COUNT=8
+END_ADD
+
+
+############################################################
+## ConnectionPreferences
+## 
+[ConnectionPreferences]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=DefaultRecordName-1
+	Ranking=1
+	Direction=OUTGOING
+	BearerSet=CSD
+	DialogPref=DONOTPROMPT
+	IAP=2
+	FIELD_COUNT=6
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=DefaultRecordName-1
+	Ranking=2
+	Direction=OUTGOING
+	BearerSet=CSD
+	DialogPref=DONOTPROMPT
+	IAP=1
+	FIELD_COUNT=6
+END_ADD
+
+
+############################################################
+## TierTable
+## 
+[TierTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=271064536
+	Name=Tier1
+	TierThreadName=ESock_IP
+	TierManagerName=NetworkTierManager
+	DefaultAccessPoint=50
+	PromptUser=0
+	FIELD_COUNT=6
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=271064560
+	Name=Tier2
+	TierThreadName=ESock_IP
+	TierManagerName=ProtoTierManager
+	DefaultAccessPoint=22
+	PromptUser=0
+	FIELD_COUNT=6
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=271064565
+	Name=Tier3
+	TierThreadName=ESock_IP
+	TierManagerName=LinkTierManager
+	DefaultAccessPoint=1
+	PromptUser=0
+	FIELD_COUNT=6
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=536924244
+	Name=UPnP
+	TierThreadName=ESock_IP
+	TierManagerName=UPnPTierManager
+	DefaultAccessPoint=51
+	PromptUser=0
+	FIELD_COUNT=6
+END_ADD
+
+
+############################################################
+## MCprTable
+## 
+[MCprTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=1
+	Name=netmcpr
+	MCprUid=271009095
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=2
+	Name=ipprotomcpr
+	MCprUid=271064558
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=3
+	Name=pppmcpr
+	MCprUid=271064556
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=4
+	Name=ethmcpr
+	MCprUid=271064572
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=rawipmcpr
+	MCprUid=271064576
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 6
+	Id=6
+	Name=tunnelmcpr
+	MCprUid=271064578
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 7
+	Id=7
+	Name=qospppmcpr
+	MCprUid=271064556
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 8
+	Id=8
+	Name=dummynifmcpr
+	MCprUid=271064580
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 9
+	Id=9
+	Name=hungrynifmcpr
+	MCprUid=271064580
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 10
+	Id=10
+	Name=pdpmcpr
+	MCprUid=271065840
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 11
+	Id=11
+	Name=UPnPMcpr
+	MCprUid=536924245
+	FIELD_COUNT=3
+END_ADD
+
+
+############################################################
+## CprTable
+## 
+[CprTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=1
+	Name=ipcpr
+	CprUid=270561519
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=2
+	Name=ipprotocpr
+	CprUid=271064531
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=3
+	Name=agentcpr
+	CprUid=271064552
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=4
+	Name=UPnPControlCpr
+	CprUid=536924246
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=UPnPServiceCpr
+	CprUid=536924248
+	FIELD_COUNT=3
+END_ADD
+
+############################################################
+## SCprTable
+## 
+[SCprTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=1
+	Name=ipscpr
+	SCprUid=270549768
+	#SCprUid=271012549
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=2
+	Name=ipprotoscpr
+	SCprUid=271064529
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=3
+	Name=agentscpr
+	SCprUid=271064554
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=4
+	Name=pdpscpr
+	SCprUid=271065824
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=UPnPControlScpr
+	SCprUid=536924247
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 6
+	Id=6
+	Name=UPnPServiceScpr
+	SCprUid=536924249
+	FIELD_COUNT=3
+END_ADD
+
+############################################################
+## ProtocolTable
+## 
+[ProtocolTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=1
+	Name=sapshim
+	ProtocolUid=270496898
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=2
+	Name=ipshim4
+	ProtocolUid=271064118
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=3
+	Name=ppp
+	ProtocolUid=271064143
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=4
+	Name=ethernet
+	ProtocolUid=271064539
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=rawip
+	ProtocolUid=271064562
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 6
+	Id=6
+	Name=tunnel
+	ProtocolUid=271064567
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 7
+	Id=7
+	Name=qosppp
+	ProtocolUid=271064148
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 8
+	Id=8
+	Name=dummynif
+	ProtocolUid=271064123
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 9
+	Id=9
+	Name=hungrynif
+	ProtocolUid=271064125
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 10
+	Id=10
+	Name=UPnPFlow
+	ProtocolUid=536924250
+	FIELD_COUNT=3
+END_ADD
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/group/te_upnp_wifi_ethernet.cfg	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,532 @@
+############################################################
+## Network
+## 
+[Network]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=Intranet
+	FIELD_COUNT=1
+END_ADD
+
+
+############################################################
+## LANBearer
+## 
+[LANBearer]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=EKA2 Emulator Ethernet
+	IfName=ethint
+	LDDFilename=enet
+	LDDName==Ethernet
+	PDDFilename=ethernet
+	PDDName=Ethernet.Wins
+	PacketDriverName=EtherPkt.drv
+	LastSocketActivityTimeout=-1
+	LastSessionClosedTimeout=-1
+	LastSocketClosedTimeout=-1
+	Agent=nullagt.agt
+	FIELD_COUNT=11
+END_ADD
+
+
+############################################################
+## Location
+## 
+[Location]
+ADD_TEMPLATE
+	Name=Default Location
+	IntlPrefixCode=+
+	NatPrefixCode=0
+	NatCode=44
+	Mobile=TRUE
+	UsePulseDial=FALSE
+	WaitForDialTone=FALSE
+	PauseAfterDialout=0
+	FIELD_COUNT=8
+END_TEMPLATE
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=Office
+	IntlPrefixCode=00
+	NatPrefixCode=0
+	NatCode=44
+	AreaCode=171
+	DialOutCode=9,
+	Mobile=FALSE
+	UsePulseDial=FALSE
+	WaitForDialTone=FALSE
+	PauseAfterDialout=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=Office Direct Dial
+	IntlPrefixCode=00
+	NatPrefixCode=0
+	NatCode=44
+	AreaCode=171
+	Mobile=FALSE
+	UsePulseDial=FALSE
+	WaitForDialTone=FALSE
+	PauseAfterDialout=0
+	FIELD_COUNT=9
+END_ADD
+
+
+############################################################
+## GlobalSettings
+## 
+[GlobalSettings]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=DefaultRecordName-1
+	ConnectionAttempts=5
+	RedialAttempts=5
+	SmsBearer=1
+	SmsReceiveMode=2
+	GPRSAttachMode=1
+	AcceptIncomingGprs=1
+	GPRSClassCBearer=GSM
+	ModemForDataAndFax=2
+	ModemForPhoneServicesAndSMS=2
+	LocationForDataAndFax=2
+	LocationForPhoneServicesAndSMS=2
+	MaxMBufHeap=2
+	DefaultNetwork=1
+	BearerAvailabilityCheckTSY=sim
+	DefaultTier=Link.TierTable.271064536
+	FIELD_COUNT=16
+END_ADD
+
+
+############################################################
+## LANService
+## 
+[LANService]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=Ethernet
+	IfNetworks=ip
+	IpNetMask=0.0.0.0
+	IpGateway=0.0.0.0
+	IpAddrFromServer=TRUE
+	IpAddr=0.0.0.0
+	IpDNSAddrFromServer=TRUE
+	IpNameServer1=0.0.0.0
+	IpNameServer2=0.0.0.0
+	ConfigDaemonManagerName=NetCfgExtnDhcp
+	ConfigDaemonName=!DhcpServ
+	FIELD_COUNT=11
+END_ADD
+
+############################################################
+## APPrioritySelectionPolicyTable
+## 
+[APPrioritySelectionPolicyTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=1
+	Name=SelectionPolicy1
+	AP1=Link.AccessPointTable.1
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=2
+	Name=SelectionPolicy2
+	AP1=Link.AccessPointTable.2
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=3
+	Name=SelectionPolicy3
+	AP1=Link.AccessPointTable.3
+	FIELD_COUNT=3
+END_ADD
+############################################################
+## AccessPointTable
+## 
+[AccessPointTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=1
+	Name=Network
+	Tier=Link.TierTable.271064536
+	MCpr=MCprTable.1
+	AccessPointSelectionPolicy=Link.APPrioritySelectionPolicyTable.2
+	Cpr=CprTable.1
+	CprConfig=1
+	SCpr=SCprTable.6
+	Protocol=ProtocolTable.1
+	AppSID=0
+	FIELD_COUNT=10
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=2
+	Name=Protocol
+	Tier=Link.TierTable.271064560
+	MCpr=MCprTable.2
+	AccessPointSelectionPolicy=0
+	Cpr=CprTable.2
+	CprConfig=1
+	SCpr=SCprTable.2
+	Protocol=ProtocolTable.2
+	AppSID=0
+	CustomSelectionPolicy=3
+	FIELD_COUNT=11
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=3
+	Name=Link
+	Tier=Link.TierTable.271064565
+	MCpr=MCprTable.4	
+	Cpr=CprTable.3
+	CprConfig=1
+	SCpr=SCprTable.3
+	Protocol=ProtocolTable.4
+	AppSID=0
+	FIELD_COUNT=9
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 51
+	Id=51
+	Name=UPnPControlPoint
+	Tier=Link.TierTable.536924244
+	MCpr=MCprTable.5
+	##This field can be used _only_ as a link to an APPrioritySelectionPolicy record.
+	AccessPointSelectionPolicy=0
+	Cpr=CprTable.4
+	CprConfig=0
+	SCpr=SCprTable.4
+	Protocol=ProtocolTable.5
+	AppSID=0
+	##This field is interpreted by the TierManager. From CommsDat point of view this
+	##is a pure integer.
+	CustomSelectionPolicy=1
+	FIELD_COUNT=11
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 52
+	Id=52
+	Name=UPnPServicePoint
+	Tier=Link.TierTable.536924244
+	MCpr=MCprTable.5
+	##This field can be used _only_ as a link to an APPrioritySelectionPolicy record.
+	AccessPointSelectionPolicy=0
+	Cpr=CprTable.5
+	CprConfig=0
+	SCpr=SCprTable.5
+	Protocol=ProtocolTable.5
+	AppSID=0
+	##This field is interpreted by the TierManager. From CommsDat point of view this
+	##is a pure integer.
+	CustomSelectionPolicy=1
+	FIELD_COUNT=11
+END_ADD
+
+############################################################
+## IAP
+## 
+[IAP]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=Emulator Lan IAP 1
+	IAPServiceType=LANService
+	IAPService=1
+	IAPBearerType=LANBearer
+	IAPBearer=1
+	IAPNetwork=1
+	IAPNetworkWeighting=0
+	Location=2
+	FIELD_COUNT=8
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=Emulator Lan IAP 2
+	IAPServiceType=LANService
+	IAPService=1
+	IAPBearerType=LANBearer
+	IAPBearer=1
+	IAPNetwork=1
+	IAPNetworkWeighting=0
+	Location=2
+	FIELD_COUNT=8
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=Emulator Lan IAP 3
+	IAPServiceType=LANService
+	IAPService=1
+	IAPBearerType=LANBearer
+	IAPBearer=1
+	IAPNetwork=1
+	IAPNetworkWeighting=0
+	Location=2
+	FIELD_COUNT=8
+END_ADD
+
+
+############################################################
+## ConnectionPreferences
+## 
+[ConnectionPreferences]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=DefaultRecordName-1
+	Ranking=1
+	Direction=OUTGOING
+	BearerSet=LAN
+	DialogPref=DONOTPROMPT
+	IAP=1
+	FIELD_COUNT=6
+END_ADD
+
+
+
+############################################################
+## TierTable
+## 271064536 = 0x10281DD8
+[TierTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Id=271064536
+	Name=Tier1
+	TierThreadName=ESock_IP
+	TierManagerName=NetworkTierManager
+	DefaultAccessPoint=Link.AccessPointTable.1
+	PromptUser=0
+	FIELD_COUNT=6
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Id=271064560
+	Name=Tier2
+	TierThreadName=ESock_IP
+	TierManagerName=ProtoTierManager
+	DefaultAccessPoint=Link.AccessPointTable.2
+	PromptUser=0
+	FIELD_COUNT=6
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Id=271064565
+	Name=Tier3
+	TierThreadName=ESock_IP
+	TierManagerName=LinkTierManager
+	DefaultAccessPoint=Link.AccessPointTable.3
+	PromptUser=0
+	FIELD_COUNT=6
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=536924244
+	Name=UPnP
+	TierThreadName=ESock_IP
+	TierManagerName=UPnPTierManager
+	DefaultAccessPoint=Link.AccessPointTable.51
+	PromptUser=0
+	FIELD_COUNT=6
+END_ADD
+
+############################################################
+## MCprTable
+## netmcpr = 0x10274547 = 271009095
+## ipprotomcpr = 0x10281DEE = 271064558
+## pppmcpr = 0x10281DEC = 271064556
+## EthMCpr = 0x10281DFC = 271064572
+## 
+[MCprTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=netmcpr
+	MCprUid=271009095
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=ipprotomcpr
+	MCprUid=271064558
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=pppmcpr
+	MCprUid=271064556
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Name=EthMCpr
+	MCprUid=271064572
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=UPnPMcpr
+	MCprUid=536924245
+	FIELD_COUNT=3
+END_ADD
+
+############################################################
+## CprTable
+## ipprotocpr = 0x10281DD3 = 271064531
+## ipcpr = 0x102070EF = 270561519
+## agentcpr = 0x10281DE8 = 271064552
+## WifiConnProvd = 0x10281E0B = 271064587
+## 
+[CprTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=ipcpr
+	CprUid=270561519
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=ipprotocpr
+	CprUid=271064531
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=agentcpr
+	CprUid=271064552
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=4
+	Name=UPnPControlCpr
+	CprUid=536924246
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=UPnPServiceCpr
+	CprUid=536924248
+	FIELD_COUNT=3
+END_ADD
+
+
+############################################################
+## SCprTable
+## ipscpr = 0x10204308 = 270549768
+## ipprotoscpr = 0x10281DD1 = 271064529
+## agentscpr = 0x10281DEA = 271064554
+## 
+[SCprTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=ipscpr
+	SCprUid=271012549
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=ipprotoscpr
+	SCprUid=271064529
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=agentscpr
+	SCprUid=271064554
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Id=4
+	Name=UPnPControlScpr
+	SCprUid=536924247
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=UPnPServiceScpr
+	SCprUid=536924249
+	FIELD_COUNT=3
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 6
+	Id=6
+	Name=qosscpr
+	SCprUid=271065811
+	FIELD_COUNT=3
+END_ADD
+
+############################################################
+## ProtocolTable
+## sapshim = 0x101F7482 = 270496898
+## IPShim6 = 0x10281C38 = 271064120
+## ppp = 0x10281C4F = 271064143
+## Ethernet = 0x10281DDB = 271064539
+## 802dot1X = 0x10281DE4 = 271064548
+[ProtocolTable]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=sapshim
+	ProtocolUid=270496898
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=IPShim4
+	ProtocolUid=271064118
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 3
+	Name=ppp
+	ProtocolUid=271064143
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 4
+	Name=Ethernet
+	ProtocolUid=271064539
+	FIELD_COUNT=2
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 5
+	Id=5
+	Name=UPnPFlow
+	ProtocolUid=536924250
+	FIELD_COUNT=3
+END_ADD
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/group/upnp.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+// 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 SYMBIAN_UPNP_IBY
+#define SYMBIAN_UPNP_IBY
+
+REM Upnp Components
+
+ECOM_PLUGIN(upnpserver.dll,2000D053.rsc)
+file=ABI_DIR\BUILD_DIR\sockethandler.dll system\libs\sockethandler.dll
+file=ABI_DIR\BUILD_DIR\upnpdescription.dll system\libs\upnpdescription.dll
+file=ABI_DIR\BUILD_DIR\upnpmessage.dll system\libs\upnpmessage.dll
+file=ABI_DIR\BUILD_DIR\chunkmgr.dll system\libs\chunkmgr.dll
+file=ABI_DIR\BUILD_DIR\upnputils.dll system\libs\upnputils.dll
+file=ABI_DIR\BUILD_DIR\pnp.dll system\libs\pnp.dll
+ECOM_PLUGIN(upnp.dll,2000D05D.rsc)
+//Currently the AppProtIntf flug-in is made internal to UPnP. 
+//ECOM_PLUGIN(appprotintf.dll,2000D05C.rsc)
+file=ABI_DIR\BUILD_DIR\appprotinfmsgs.dll system\libs\appprotinfmsgs.dll
+
+//UPnP Codec
+ECOM_PLUGIN(upnpcodec.dll,upnpcodec.rsc)
+
+data=EPOCROOT##epoc32\data\z\private\101F7989\upnp\device.xml	Private\101F7989\upnp\device.xml
+
+#endif //SYMBIAN_UPNP_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/bwins/tcpclientu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	InstallProxy @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/eabi/tcpclientu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,17 @@
+EXPORTS
+	InstallProxy @ 1 NONAME
+	_ZTI11CSoapParser @ 2 NONAME
+	_ZTI12CTransaction @ 3 NONAME
+	_ZTI14CTestTcpServer @ 4 NONAME
+	_ZTI16CProtocolHandler @ 5 NONAME
+	_ZTI18CHTTPClientHandler @ 6 NONAME
+	_ZTI22CHTTPClientTransaction @ 7 NONAME
+	_ZTI24CTestServerSocketHandler @ 8 NONAME
+	_ZTV11CSoapParser @ 9 NONAME
+	_ZTV12CTransaction @ 10 NONAME
+	_ZTV14CTestTcpServer @ 11 NONAME
+	_ZTV16CProtocolHandler @ 12 NONAME
+	_ZTV18CHTTPClientHandler @ 13 NONAME
+	_ZTV22CHTTPClientTransaction @ 14 NONAME
+	_ZTV24CTestServerSocketHandler @ 15 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,35 @@
+/*
+* 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:
+*
+*/
+
+
+/**
+@file
+*/
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+../group/tcpclient.iby	/epoc32/rom/include/tcpclient.iby
+
+
+
+PRJ_TESTMMPFILES
+
+./tcpclient.mmp support
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/group/tcpclient.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+/*
+* 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 __TCPCLIENT_IBY__
+#define __TCPCLIENT_IBY__
+
+file=ABI_DIR\DEBUG_DIR\tcpclient.prt 			                  System\Libs\tcpclient.prt
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/group/tcpclient.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,92 @@
+/*
+* 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:
+*
+*/
+
+TARGET			tcpclient.prt
+TARGETTYPE		DLL
+UID      0x10003d38
+VENDORID 0x70000001
+
+DEFFILE		tcpclient.def
+
+
+SOURCEPATH		../src
+SOURCE			protocolfamily.cpp
+SOURCE			proxyprotocol.cpp
+SOURCE			testtcpserver.cpp
+SOURCE			ctestserversockethandler.cpp
+
+SOURCE			ptcpclienttests.cpp ctcpclienttestupnp1.cpp ctcpclienttestupnp2.cpp ctcpclienttestupnp3.cpp ctcpclienttestupnp4.cpp ctcpclienttestupnp5.cpp
+
+
+USERINCLUDE		../inc
+USERINCLUDE		../../../server/flow/inc
+USERINCLUDE		../../../upnputils/inc
+USERINCLUDE		../../../upnpmessage/inc
+
+SOURCEPATH		../../../server/flow/src
+SOURCE			csoapparser.cpp
+SOURCE			chttpclienthandler.cpp
+SOURCE			upnpmemoryutils.cpp
+SOURCE			cprotocolhandler.cpp
+SOURCE			cupnptimer.cpp
+SOURCE			ctransaction.cpp
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/comms-infras
+SYSTEMINCLUDE   /epoc32/include/test
+
+LIBRARY		euser.lib     
+LIBRARY		esock.lib
+LIBRARY		esocksvr.lib
+LIBRARY		mbufmgr.lib
+LIBRARY		testexecutelogclient.lib
+LIBRARY		efsrv.lib
+LIBRARY		cinidata.lib
+LIBRARY 	bafl.lib
+LIBRARY 	xmlframework.lib
+LIBRARY     nifman.lib
+LIBRARY		commsfw.lib
+LIBRARY		testexecuteutils.lib
+LIBRARY		rfileloggerclient.lib
+LIBRARY     netmeta.lib		// for the ABIv2
+LIBRARY		insock.lib 
+LIBRARY		sockethandler.lib
+LIBRARY 	upnputils.lib
+LIBRARY		nodemessages.lib
+LIBRARY 	netinterfaces.lib
+LIBRARY		factories.lib
+LIBRARY		http.lib
+LIBRARY		upnpmessage.lib
+LIBRARY 	inetprotutil.lib
+LIBRARY 	chunkmgr.lib
+
+START WINS
+BASEADDRESS		0x59000000
+END
+
+#include <comms-infras/commsdebugutility.mmh>
+#include <cflog.mmh>
+
+
+CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+UNPAGED
+
+SOURCEPATH ..\src
+SOURCE ctcpclienttestupnp6.cpp ctcpclienttestupnp7.cpp ctcpclienttestupnp8.cpp ctcpclienttestupnp9.cpp ctcpclienttestupnp10.cpp ctcpclienttestupnp11.cpp ctcpclienttestupnp12.cpp ctcpclienttestupnp13.cpp ctcpclienttestupnp14.cpp
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/atestsocket.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* 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 ATESTSOCKET_H_
+#define ATESTSOCKET_H_
+
+NONSHARABLE_CLASS(ATestSocket):public MSessionControlNotify, 
+								public MSessionDataNotify
+	{
+	protected:
+		//MSessionDataNotify
+		virtual void NewData(TUint /*aCount*/)
+		{};
+		virtual void CanSend()
+		{};
+		//MSessionControlNotify
+		virtual void ConnectComplete()
+		{};
+		virtual void ConnectComplete(const TDesC8& /*aConnectData*/)
+		{};
+		virtual void ConnectComplete(CSubConnectionFlowBase& /*aSSP*/)
+		{};
+		virtual void ConnectComplete(CSubConnectionFlowBase& /*aSSP*/,const TDesC8& /*aConnectData*/)
+		{};
+		virtual void CanClose(MSessionControlNotify::TDelete /*aDelete=MSessionControlNotify::EDelete*/)
+		{};
+		virtual void CanClose(const TDesC8& /*aDisconnectData*/,MSessionControlNotify::TDelete /*aDelete=MSessionControlNotify::EDelete*/)
+		{};
+		virtual TInt Error(TInt /*anError*/,TUint /*anOperationMask=MSessionControlNotify::EErrorAllOperations*/)
+		{return KErrNone;};
+		virtual void Disconnect(void)
+		{};
+		virtual void Disconnect(TDesC8& /*aDisconnectData*/)
+		{};
+		virtual void IoctlComplete(TDesC8* /*aBuf*/)
+		{};
+		virtual void DisconnectFromListener(CSubConnectionFlowBase& /*aSSP*/)
+		{};
+		 
+		
+	};
+
+
+#endif /*ATESTSOCKET_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/cpipeliningtestcase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* 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 __CPIPELININGTESTCASE_H__
+#define __CPIPELININGTESTCASE_H__
+
+#include <e32base.h>
+#include <http.h>
+
+#include "mpipeliningtestcase.h"
+
+enum THeaderPosition
+	{
+	ENoHeader = -1,
+	EHttpHeader,
+	EConnectionHeader,
+	EBatchingHeader,
+	ETransactionHeader		
+	};
+
+//Forward declarations
+class CHTTPTestUtils;
+class CPipeliningTestParams;
+
+class CPipeliningTestCase :  public CBase, public MPipeliningTestCase, public MHTTPDataSupplier 
+ 
+
+	{
+public:
+	static CPipeliningTestCase* NewL(CHTTPTestUtils& aTestUtils, CPipeliningTestParams& aPipeliningTestParams);
+	~CPipeliningTestCase();
+		
+private:
+	CPipeliningTestCase(CHTTPTestUtils& aTestUtils, CPipeliningTestParams& aPipeliningTestParams);
+
+	// From MPipeliningTestCase
+	const TDesC& TestCaseName() const;
+	TInt TransactionCount(TInt aConnIndex) const;
+	TInt TotalTransactionCount() const;
+	RHTTPTransaction GetTransactionL(TInt aIndex, RHTTPSession aSession, MHTTPTransactionCallback& aClient);
+	const TDesC8& GetRawRequest(TInt aConnectionIndex, TInt aTransIndex);
+	const TDesC8& GetRawResponse(TInt aConnectionIndex, TInt aTransIndex);
+	TInt ConnectionCount() const;
+	void AddConnectionCloseHeaderL(RHTTPTransaction aTransaction);
+	TInt RealExpectedConnectionCount() const;
+	TInt ExpectedError(RHTTPTransaction aTrans);
+	void ProcessHeadersL(RHTTPTransaction aTrans);
+	TBool EnableBatching() const;
+	TBool BatchTransactions() const;
+	void FieldCompareL(TInt aStringPool, TInt aIniFile);
+	void FieldValueCompareL(RHTTPHeaders headers, TInt xyz, TInt xx, RStringF headerStr);
+	TInt ErrorVal() const;
+	
+	TBool GetNextDataPart(TPtrC8& aDataPart);
+	void ReleaseData();
+	TInt OverallDataSize();
+	TInt Reset();
+private:
+	CHTTPTestUtils&			iTestUtils;
+	CPipeliningTestParams&	iPipeliningTestParams;
+	
+	//for testcase 7
+	RHTTPTransaction		iTransToCancel;
+	TBool					iIsTransCancelled;
+	TBool					iBatchingBufferSizeSet;
+	CHTTPFormEncoder* 		iFormEncoder;
+		
+	};
+	
+#endif // __CPIPELININGTESTCASE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp1.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 CTCPCLIENTTESTUPNP1_H_
+#define CTCPCLIENTTESTUPNP1_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP1 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP1) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP1* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP1 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP1 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;	
+	RTimer				iTimer;
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP1_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp10.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+/*
+* 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 CTCPCLIENTTESTUPNP10_H_
+#define CTCPCLIENTTESTUPNP10_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP10 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP10) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP10* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP10 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP10 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;	
+	RTimer				iTimer;
+	};
+
+#endif /*CTCPCLIENTTESTUPNP10_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp11.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,66 @@
+/*
+* 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 CTCPCLIENTTESTUPNP11_H_
+#define CTCPCLIENTTESTUPNP11_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP11 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP11) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP11* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP11 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP11 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;	
+	RTimer				iTimer;
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP11_H_*/
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp12.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,73 @@
+/*
+* 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 CTCPCLIENTTESTUPNP12_H_
+#define CTCPCLIENTTESTUPNP12_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP12 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+#include "atestsocket.h"
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP12) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public ATestSocket,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP12* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+	void NewData(TUint aCount);
+				
+	~CTcpClientTestUPnP12 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP12 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	Messages::TNodeId 			iClientId;	
+	RTimer						iTimer;
+		
+	CSubConnectionFlowBase* 	iFlow;
+	MSessionData* 				iSSPData;
+	MFlowBinderControl* 		iFlowBinder;
+	MSessionControl* 			iSSP;
+	
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP12_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp13.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+/*
+* 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 CTCPCLIENTTESTUPNP13_H_
+#define CTCPCLIENTTESTUPNP13_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP13 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+#include "atestsocket.h"
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP13) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public ATestSocket,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP13* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+	void NewData(TUint aCount);
+				
+	~CTcpClientTestUPnP13 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP13 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	Messages::TNodeId 			iClientId;	
+	RTimer						iTimer;
+		
+	CSubConnectionFlowBase* 	iFlow;
+	MSessionData* 				iSSPData;
+	MFlowBinderControl* 		iFlowBinder;
+	MSessionControl* 			iSSP;
+	
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP13_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp14.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,73 @@
+/*
+* 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 CTCPCLIENTTESTUPNP14_H_
+#define CTCPCLIENTTESTUPNP14_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP14 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+#include "atestsocket.h"
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP14) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public ATestSocket,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP14* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+	void NewData(TUint aCount);
+				
+	~CTcpClientTestUPnP14 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP14 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	Messages::TNodeId 			iClientId;	
+	RTimer						iTimer;
+		
+	CSubConnectionFlowBase* 	iFlow;
+	MSessionData* 				iSSPData;
+	MFlowBinderControl* 		iFlowBinder;
+	MSessionControl* 			iSSP;
+	TBool						iTimerstart;
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP14_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp2.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,67 @@
+/*
+* 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 CTCPCLIENTTESTUPNP2_H_
+#define CTCPCLIENTTESTUPNP2_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP2 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP2) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP2* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP2 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP2 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;	
+	RTimer				iTimer;
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP2_H_*/
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp3.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,104 @@
+/*
+* 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 CTCPCLIENTTESTUPNP3_H_
+#define CTCPCLIENTTESTUPNP3_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP3 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP3) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP3* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP3 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP3 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;	
+	RTimer				iTimer;
+	};
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+NONSHARABLE_CLASS(CTcpClientTestUPnP15) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP15* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP15 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP15 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;	
+	RTimer				iTimer;
+	};
+
+#endif /*CTCPCLIENTTESTUPNP3_H_*/
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp4.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+/*
+* 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 CTCPCLIENTTESTUPNP4_H_
+#define CTCPCLIENTTESTUPNP4_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP4 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP4) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP4* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP4 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP4 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;	
+	RTimer				iTimer;
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP4_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp5.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 CTCPCLIENTTESTUPNP5_H_
+#define CTCPCLIENTTESTUPNP5_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP5 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP5) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP5* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP5 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP5 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;	
+	RTimer				iTimer;
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP5_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp6.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+/*
+* 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 CTCPCLIENTTESTUPNP6_H_
+#define CTCPCLIENTTESTUPNP6_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP6 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+#include "atestsocket.h"
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP6) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public ATestSocket,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP6* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+	void NewData(TUint aCount);
+				
+	~CTcpClientTestUPnP6 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP6 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	Messages::TNodeId 			iClientId;	
+	RTimer						iTimer;
+		
+	CSubConnectionFlowBase* 	iFlow;
+	MSessionData* 				iSSPData;
+	MFlowBinderControl* 		iFlowBinder;
+	MSessionControl* 			iSSP;
+	
+	};
+
+#endif /*CTCPCLIENTTESTUPNP6_H_*/
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp7.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+/*
+* 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 CTCPCLIENTTESTUPNP7_H_
+#define CTCPCLIENTTESTUPNP7_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP7 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+#include "atestsocket.h"
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP7) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public ATestSocket,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP7* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+					
+	~CTcpClientTestUPnP7 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP7 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	Messages::TNodeId 			iClientId;	
+	RTimer						iTimer;
+		
+	CSubConnectionFlowBase* 	iFlow;
+	MSessionData* 				iSSPData;
+	MFlowBinderControl* 		iFlowBinder;
+	MSessionControl* 			iSSP;
+	
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP7_H_*/
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp8.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,76 @@
+/*
+* 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 CTCPCLIENTTESTUPNP8_H_
+#define CTCPCLIENTTESTUPNP8_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP8 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+#include "atestsocket.h"
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP8) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public ATestSocket,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP8* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+	void NewData(TUint aCount);
+				
+	~CTcpClientTestUPnP8 ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP8 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	Messages::TNodeId 			iClientId;	
+	RTimer						iTimer;
+		
+	CSubConnectionFlowBase* 	iFlow;
+	MSessionData* 				iSSPData;
+	MFlowBinderControl* 		iFlowBinder;
+	MSessionControl* 			iSSP;
+	
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP8_H_*/
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctcpclienttestupnp9.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,168 @@
+/*
+* 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 CTCPCLIENTTESTUPNP9_H_
+#define CTCPCLIENTTESTUPNP9_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP9 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+//#include "atestsocket.h"
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP9) : public CTcpClientTestBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase,
+										public MHttpEventObserver
+	{
+public:
+	static CTcpClientTestUPnP9* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+	//void NewData(TUint aCount);
+				
+	~CTcpClientTestUPnP9 ();
+	
+	// From MHttpEventObserver
+	TInt OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent );
+	
+	//void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP9 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+	CHTTPClientTransaction* PrepareTransactionL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	RTimer						iTimer;
+	CHTTPClientHandler* 		iClientHandler;
+	RStringPool					iStringPool;
+	CHeaderCodec*				iCodec;
+	CHTTPClientTransaction* 	iTransaction;
+	};
+
+///////////////////////////////////////////////////////////////////////////////
+NONSHARABLE_CLASS(CTcpClientTestUPnP16) : public CTcpClientTestBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase,
+										public MHttpEventObserver
+	{
+public:
+	static CTcpClientTestUPnP16* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+	//void NewData(TUint aCount);
+				
+	~CTcpClientTestUPnP16 ();
+	
+	// From MHttpEventObserver
+	TInt OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent );
+	
+	//void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP16 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+	CHTTPClientTransaction* PrepareTransactionL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	RTimer						iTimer;
+	CHTTPClientHandler* 		iClientHandler;
+	RStringPool					iStringPool;
+	CHeaderCodec*				iCodec;
+	CHTTPClientTransaction* 	iTransaction;
+	};
+
+///////////////////////////////////////////////////////////////////////////////
+NONSHARABLE_CLASS(CTcpClientTestUPnP17) : public CTcpClientTestBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase,
+										public MHttpEventObserver
+	{
+public:
+	static CTcpClientTestUPnP17* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+	
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+	//void NewData(TUint aCount);
+				
+	~CTcpClientTestUPnP17 ();
+	
+	// From MHttpEventObserver
+	TInt OnHttpEvent ( CTransaction* aTransaction, THTTPEvent& aEvent );
+	
+	//void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+		
+	CTcpClientTestUPnP17 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+	CHTTPClientTransaction* PrepareTransactionL ();
+	
+private:	
+	CTestTcpServer*				iTestServer;
+	RTimer						iTimer;
+	CHTTPClientHandler* 		iClientHandler;
+	RStringPool					iStringPool;
+	CHeaderCodec*				iCodec;
+	CHTTPClientTransaction* 	iTransaction;
+	};
+
+
+#endif /*CTCPCLIENTTESTUPNP9_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ctestserversockethandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,81 @@
+/*
+* 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 __CTESTSERVERSOCKETHANDLER_H__
+#define __CTESTSERVERSOCKETHANDLER_H__
+
+#include <rsockethandler.h>
+#include <es_mbuf.h>
+#include <comms-infras/mbufchain.h>
+#include <testexecutestepbase.h>
+
+class MTcpClientTestCase;
+
+class CTestServerSocketHandler: public CTimer,
+								public MSocketHandlerObserver
+	{
+public:
+	static CTestServerSocketHandler* NewL ( MTcpClientTestCase* aTestCase, RInternalSocket& aIncomingConnection, CTestExecuteLogger& aLogger );
+	virtual ~CTestServerSocketHandler ();
+
+private:
+	CTestServerSocketHandler ( MTcpClientTestCase* aTestCase, RInternalSocket& aIncomingConnection, CTestExecuteLogger&	aLogger );
+	void ConstructL ();
+	TBool ProcessRequestL ();
+	TBool IsConnectionCloseInData ( const TDesC8& aRequest, const TDesC8& aResponse ) const;
+	TBool Is100ContinueInRequestData ( const TDesC8& aRequest ) const;
+	void SendDataL ();
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& /*Socket*/ )
+	{	}
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ )
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+		
+	// From CTimer
+	void RunL ();
+	
+private:
+	RInternalSocket 		iIncomingConnection;
+	RSocketHandler			iSocketHandler;
+	HBufC8*					iDataStore;
+	HBufC8*					iDataToSend;
+	RMBufChain				iSendChain;
+	MTcpClientTestCase*		iTestCase;		// Not owned
+	TInt					iTransCount;
+	TInt					iCurrentTrans;
+	TInt					iDataPos;
+	TBool					iCloseConnection;
+	TBool					iPost;
+	TBool					iSend100Continue;
+	CTestExecuteLogger&		iLogger;
+	};
+
+#endif // __CTESTSERVERSOCKETHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/es_ptest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined (__ES_PTESTINTERNALSOCKET_H__)
+#define __ES_PTESTINTERNALSOCKET_H__
+
+#include <e32def.h>
+#include <es_sock.h>
+#include <testexecutestepbase.h>
+#include <testexecuteclient.h>
+#include <es_dummy.h>
+
+
+//This property needs to be set to 0 for normal operation 
+//and 1 to request termination
+
+//Socket server test ioclts
+const TInt KProxyProtocolTestRequest 	= 0x00003001; // reuse ioctl value from pdummy
+
+typedef TVerdict TProxyProtocolTestResult;
+
+// Structure used to pass back result of ioctl (result of test)
+struct TProxyProtocolRequest
+	{
+	TBuf<KMaxTestExecuteNameLength> name;
+	TVerdict result;
+	};
+
+//Socket Protocols and families
+const TInt KPTestIntSocketNumProtocols=1;	// is this the right number?
+const TUint KProxyAddrFamily=0x20000;
+const TUint KProxy=1;
+const TUint KTargetDatagram=2;
+const TUint KTargetStream=3;
+
+// version numbers - dll wide?
+const TUint KPTestIntSocketMajor=0;
+const TUint KPTestIntSocketMinor=1;
+const TUint KPTestIntSocketBuild=0;
+
+//const TUint KDStreamServiceInfo = KSIReliable | KSIInOrder | KSIStreamBased | KSIUrgentData | KSIGracefulClose;
+//const TUint kDDatagramServiceInfo = KSIConnectionLess | KSIMessageBased | KSIBroadcast| KSIGracefulClose;
+  
+// Dummy protocol descriptive names
+_LIT(KProxyName, "Proxy Protocol");
+_LIT(KTargetDatagramName, "Target Datagram Protocol");
+_LIT(KTargetStreamName, "Target Stream Protocol");
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/mtcpclienttestcase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+/*
+* 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 __MTCPCLIENTTESTCASE_H__
+#define __MTCPCLIENTTESTCASE_H__
+
+class MTcpClientTestCase
+	{
+public:
+	/*
+	This method should return a descriptor that contains the display name of the test case.
+	*/
+	virtual const TDesC& TestCaseName() const = 0;
+
+	/*
+	This method should return the total number of transactions that are opened and involved
+	in the test case. This number can be dynamic during the running of the test, an example
+	of this would be if transactions are cancelled and therefore those should removed from
+	the count. The test HTTP client uses this value so it knows when all the transactions
+	have completed.
+	*/
+	virtual TInt TotalTransactionCount () const = 0;
+
+	/*
+	This method should return the number of transactions on a giving connection index. For
+	tests that open a number of connections on a server, this method should return the
+	number of transactions on a connection identified by its index (ie starting from 0).
+	Tests that don't use multiple conenctions, this should simply return the same value as
+	TotalTransactionCount(0).
+	*/
+	virtual TInt TransactionCount() const = 0;
+	
+	/*
+	This method should return the raw request data that is expected to be reeived by the
+	server for a giving connection and transaction on that connection. The connection
+	is indentified by its index and then the transaction index on that connection. For
+	instance, for the 3rd transaction on the 2nd connection will result in aConnectionIndex = 1
+	and aTransIndex = 2.
+	*/
+	virtual const TDesC8& GetRawRequest(TInt aTransIndex) = 0;
+
+	/*
+	This method should return the raw response data that the server should return for a
+	given transaction. This is similar to GetRawRequest() with the parameter values.
+	*/	
+	virtual const TDesC8& GetRawResponse(TInt aTransIndex) = 0;
+	};
+	
+#endif // __MTcpClientTestCase_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/protocolfamily.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(__PROTOCOLFAMILY_H__)
+#define __PROTOCOLFAMILY_H__
+
+#include "es_ptest.h"
+#include <es_prot.h>
+#include <comms-infras/nifif.h>
+#include <dns_qry.h>
+
+//---------------------------------------------------------------------------------------------------------
+
+NONSHARABLE_CLASS(CTestIntSocketProtocolFamily): public CProtocolFamilyBase
+	{
+private:
+	CTestIntSocketProtocolFamily();	
+public:
+	static CTestIntSocketProtocolFamily * NewL();
+	void ConstructL();
+	TInt Install();
+	TInt Remove();
+	CProtocolBase * NewProtocolL(TUint aSockType,TUint aProtocol);
+	TUint ProtocolList(TServerProtocolDesc *& aProtocolList);
+private:
+	void Construct();
+private:
+	TServerProtocolDesc iProtocolDescs[1];
+	};
+
+#endif //__PROTOCOLFAMILY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/proxyprotocol.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(__PROXYPROTOCOL_H)
+#define __PROXYPROTOCOL_H
+
+#include "es_ptest.h"
+#include <es_prot.h>
+#include <comms-infras/nifif.h>
+#include <dns_qry.h>
+
+enum TDPanic
+	{
+	EBadProtocol = 1000,
+	EBadCall = 1001,
+	ENotBound = 1002,
+	ENotStarted = 1003,
+	EInterfaceNotDeleted = 1004,
+	EIdAndNoHolder = 1005,
+	EIfAndHolder = 1006,
+	ETestPanic = 1007
+	};
+	
+void Panic(TDPanic aPanic);
+
+
+NONSHARABLE_CLASS(CProxyProtocol): public CProtocolBase
+	{
+public:
+
+	~CProxyProtocol();
+	
+	static CProxyProtocol *NewL(TInt aProtocol, TServerProtocolDesc* aProtoDesc);
+	CServProviderBase *NewSAPL(TUint aProtocol);
+	TBool CanCreateSockets();
+	void InitL(TDesC& aTag);
+	void BindL(CProtocolBase *aProtocol, TUint anId);
+	virtual void BindToL(CProtocolBase *protocol);
+	void StartL(void);
+	TInt Send(RMBufChain &,CProtocolBase* aSourceProtocol);
+	void Process(RMBufChain &,CProtocolBase* aSourceProtocol);
+	TInt Send(TDes8 &, TSockAddr *to,TSockAddr *from,CProtocolBase* aSourceProtocol);
+	void Process(TDes8 & ,TSockAddr *from,TSockAddr *to,CProtocolBase* aSourceProtocol);
+	void Identify(TServerProtocolDesc *)const;
+	TInt GetOption(TUint level,TUint name,TDes8 &anOption,CProtocolBase* aSourceProtocol);
+	TInt SetOption(TUint level,TUint name,const TDesC8& option,CProtocolBase* aSourceProtocol);
+	void Error(TInt anError,CProtocolBase* aSourceProtocol);
+	TBool IsStarted(){return iStarted;}
+private:
+	CProxyProtocol(TServerProtocolDesc* aProtoDesc);
+	
+private:
+	TInt iType;
+	TServerProtocolDesc* iProtoDesc;
+	TBool iStarted;
+	CArrayFixFlat<CProtocolBase *> iProtocols;
+	};
+
+NONSHARABLE_CLASS(CProxyProvd) : public CServProviderBase
+	{
+public:
+	static CProxyProvd *NewL(CProxyProtocol &aProtocol);
+	virtual void Ioctl(TUint level,TUint name,TDes8 *anOption);
+	void TestComplete(TProxyProtocolTestResult result);
+	
+	void LocalName(TSockAddr &anAddr)const;
+	virtual TInt SetLocalName(TSockAddr &anAddr);
+	virtual void RemName(TSockAddr &anAddr)const;
+	virtual TInt SetRemName(TSockAddr &anAddr);
+	virtual TInt GetOption(TUint level,TUint name,TDes8 &anOption)const;
+	virtual TInt SetOption(TUint level,TUint name,const TDesC8 &anOption);
+	
+	virtual void CancelIoctl(TUint aLevel,TUint aName);
+	virtual TInt Write(RMBufChain& aData, TUint options, TSockAddr* anAddr=NULL);
+	virtual TUint Write(const TDesC8& aDesc, TUint options, TSockAddr* anAddr);
+	virtual TInt GetData(RMBufChain& aData, TUint aLength, TUint options,TSockAddr* anAddr=NULL);
+	virtual void GetData(TDes8& aDesc,TUint options,TSockAddr* anAddr=NULL);
+	virtual void ActiveOpen(void);
+	virtual void ActiveOpen(const TDesC8 &aConnectionData);
+	virtual TInt PassiveOpen(TUint aQue);
+	virtual TInt PassiveOpen(TUint aQue,const TDesC8 &aConnectionData);
+	virtual void AutoBind( void );
+	virtual void Shutdown(TCloseType option);
+	virtual void Shutdown(TCloseType option,const TDesC8 &aDisconnectData);
+	virtual void Start();
+
+private:
+	CProxyProvd(CProxyProtocol &aProtocol);
+	
+private:
+	TBool iIsBound;
+	CProxyProtocol *iProtocol;
+	TSockAddr iAddr;
+	TBool iInputStopped;
+	TInt iListenErrorCode;
+	TBool iCancelIoctl; // Set when an IOCTL has been cancelled.
+	
+	TBool iBlockOnClose; //Used by and test Ioctl to cause the socket to hang on close
+	TBool iCompleteIoctl;
+	};
+
+#endif //__PROXYPROTOCOL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/ptcpclienttests.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,167 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(PTCPCLIENTTESTS_H)
+#define PTCPCLIENTTESTS_H
+
+#include <e32base.h>
+#include <testexecutestepbase.h>
+#include "proxyprotocol.h"
+#include <comms-infras/eintsock.h>
+#include "es_mbuf.h"
+#include "testtcpserver.h"
+#include <elements/nm_node.h>
+#include "mtcpclienttestcase.h"
+#include <cchunkmanager.h>
+#include <rmemchunk.h>
+
+_LIT8 ( KTestCase1, "testcase1" );
+_LIT8 ( KMissingContentLength, "HTTP/1.1 200 OK\r\nST: testcase1\r\nEXT: \r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\nCACHE-CONTROL: max-age=900\r\nLOCATION: http://10.192.196.204:54042/\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CTcpClientTestBase) : protected CActive
+	{
+public:
+	static void StartTestL(const TDesC& aTestName, CProxyProvd* aProvd);
+	virtual void RunL();
+
+protected:		
+	CTcpClientTestBase(CProxyProvd* aProvd);
+	virtual ~CTcpClientTestBase();
+	
+	//Utilities function to be use in RunTest()
+	void Reschedule();
+	CTestExecuteLogger iLogger;
+	void CompleteSelf ( TInt aError );
+	void FinishTest(TVerdict result);
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		ECleanup,
+		EComplete,
+		};
+	
+	RMemoryAllocator 			iAllocator;
+	CChunkManager*  iChunkManager;		
+	TState				iState;	
+private:
+
+	
+	//Implemented you own of these		
+	virtual TVerdict RunTestL() = 0;
+	virtual void Cleanup();
+	
+	void DoCancel();
+	void ConstructL();
+	void SetLoggerL();
+	CTestExecuteLogger& Logger();	
+	static CTcpClientTestBase* CreateTestL(const TDesC& aTestName, CProxyProvd* aProvd);
+		
+private:
+	CProxyProvd* iProvd;
+	TBool iReschedule; //Determines whether rescheduling is required
+	};
+	
+inline CTestExecuteLogger& CTcpClientTestBase::Logger()
+	{
+	return iLogger;
+	}
+
+
+class MTestServerObserver
+	{
+public:
+	/**
+	Callback method which returns the responses.
+	@param aObserverInfo bundle containg the response.
+	*/
+	virtual void OnTestServerEventL ( TInt aError ) = 0;
+	
+	
+	virtual MTcpClientTestCase* GetTestCase ( ) = 0;
+	
+	virtual CTestExecuteLogger& GetLogger ( ) = 0;
+	//virtual void OnTestServerEventL ( TBool aFlag) = 0;
+	/**
+	Callback method which handles the errors of OnPnPEventL.
+	@param aError error code.
+	*/
+	//virtual void OnTestServerError (TInt aError) = 0;
+	};
+
+/*class MTestClientObserver
+	{
+public:
+	/**
+	Callback method which returns the responses.
+	@param aObserverInfo bundle containg the response.
+	*
+	virtual void OnTestClientEventL ( TObserverBundle& aObserverInfo) = 0;
+	/**
+	Callback method which handles the errors of OnPnPEventL.
+	@param aError error code.
+	*
+	virtual void OnTestClientError (TInt aError) = 0;
+	};
+*/
+//----------------------------------------------------------//
+/////////////////// CTcpClientTestUPnP /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CTcpClientTestUPnP) : public CTcpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver,
+										public MTcpClientTestCase
+	{
+public:
+	static CTcpClientTestUPnP* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+	MTcpClientTestCase* GetTestCase ();
+	CTestExecuteLogger& GetLogger ();
+	//MTcpClientTestCase
+	const TDesC& TestCaseName () const;
+	TInt TotalTransactionCount () const;	
+	TInt TransactionCount () const;
+
+	const TDesC8& GetRawRequest ( TInt aTransIndex );
+	const TDesC8& GetRawResponse ( TInt aTransIndex );
+	
+
+	~CTcpClientTestUPnP ();
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	
+	CTcpClientTestUPnP ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	CTestTcpServer*		iTestServer;
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	//TState				iState;
+	};
+
+#endif //PTCPCLIENTTESTS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/testtcpserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* 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 __TESTTCPSERVER_H_
+#define __TESTTCPSERVER_H_
+
+// System Includes
+#include <comms-infras/eintsock.h>
+#include <es_mbuf.h>
+#include <comms-infras/mbufchain.h>
+
+#include <rsockethandler.h>
+#include <csocketopener.h>
+
+class MTestServerObserver;
+class CTestServerSocketHandler;
+class MTcpClientTestCase;
+
+//----------------------------------------------------------//
+/////////////////// CTestTcpServer /////////////////////////
+//----------------------------------------------------------//
+
+class CTestTcpServer : public CBase,
+						public MSocketHandlerObserver
+	{
+public:	
+	static CTestTcpServer* NewL ( MTestServerObserver& aObserver );
+	~CTestTcpServer ();
+	
+private:
+	TInt OpenSocket ();
+	TInt Startup ();
+	void Shutdown ();
+	void DoSendL ( RMBufChain& aData, TBool& aRecvAgain );
+	void DoAccept ();
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& aSocket );
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	CTestTcpServer ( MTestServerObserver& aObserver );
+	void ConstructL ();		
+
+private:
+	MTestServerObserver& iObserver;
+	RSocketHandler		iSocketHandler;
+	RInternalSocket 	iSocket;
+	CSocketOpener*		iSocketOpener;
+	
+	MTcpClientTestCase*        iTestCase;      // Not owned
+	RPointerArray<CTestServerSocketHandler> iIncomingHandlers;
+	};
+
+#endif /*__TESTTCPSERVER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/cpipeliningtestcase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,741 @@
+/*
+* 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:
+*
+*/
+
+
+#include "cpipeliningtestcase.h"
+
+//Helper function to convert TPtr to TInt
+//declared as extern as it is already defined in 
+//CPipeliningTestCaseParams.cpp as a static function
+static TInt Ptr2Int(const TDesC8& aPtr)
+	{
+	TInt aInt;
+	TLex8 aLex(aPtr);
+	aLex.Val(aInt);
+	return aInt;
+	}
+
+CPipeliningTestCase* CPipeliningTestCase::NewL ( CPipeliningTestParams& aPipeliningTestParams)
+	{
+	CPipeliningTestCase* self = new (ELeave) CPipeliningTestCase(aTestUtils, aPipeliningTestParams);
+	return self;
+	}
+
+
+
+CPipeliningTestCase::CPipeliningTestCase(CHTTPTestUtils& aTestUtils, CPipeliningTestParams& aPipeliningTestParams)
+: iTestUtils(aTestUtils), iPipeliningTestParams(aPipeliningTestParams)
+	{
+	}
+
+
+
+CPipeliningTestCase::~CPipeliningTestCase()
+	{
+	}
+
+
+
+const TDesC& CPipeliningTestCase::TestCaseName() const
+	{
+	return iPipeliningTestParams.TestCaseName();
+	}
+
+
+
+TInt CPipeliningTestCase::TransactionCount(TInt aConnectionIndex) const
+	{
+	return iPipeliningTestParams.TransactionCount(aConnectionIndex);
+	}
+
+
+
+TInt CPipeliningTestCase::TotalTransactionCount() const
+	{
+	return iPipeliningTestParams.TotalTransactionCount();
+	}
+
+
+	
+TBool CPipeliningTestCase::BatchTransactions() const
+	{
+	return ETrue;
+	}	
+
+
+
+TInt CPipeliningTestCase::ConnectionCount() const
+	{
+	return iPipeliningTestParams.ConnectionCount();
+	}
+	
+TInt CPipeliningTestCase::ErrorVal() const
+	{
+		return iPipeliningTestParams.Error();
+	}	
+
+RHTTPTransaction CPipeliningTestCase::GetTransactionL(TInt aIndex, RHTTPSession aSession, MHTTPTransactionCallback& aClient)
+	{
+	__ASSERT_ALWAYS( aIndex < iPipeliningTestParams.TotalTransactionCount(), User::Invariant());
+	
+	if(iPipeliningTestParams.TestCaseName().Compare(_L("IOP TEST CASE 6")) == 0)
+		{
+		_LIT8(KTxtUri, "http://127.0.0.1");
+		TUriParser8 uri; 
+		uri.Parse(KTxtUri());
+		
+		RStringF method = aSession.StringPool().StringF(HTTP::EPOST,RHTTPSession::GetTable());
+		RHTTPTransaction trans = aSession.OpenTransactionL(uri, aClient, method);
+		RHTTPHeaders headers = trans.Request().GetHeaderCollection();
+			
+			
+		_LIT8(KTxtHeaderName0, "Expect");
+		_LIT8(KTxtHeaderValue0, "100-Continue");
+		RStringF headerStrName0 = aSession.StringPool().OpenFStringL(KTxtHeaderName0());
+		CleanupClosePushL(headerStrName0);
+		RStringF headerStrValue0 = aSession.StringPool().OpenFStringL(KTxtHeaderValue0());
+		CleanupClosePushL(headerStrValue0);
+		THTTPHdrVal headerValue0(headerStrValue0);
+		headers.SetFieldL(headerStrName0, headerValue0);
+		CleanupStack::PopAndDestroy(2, &headerStrName0);
+		return trans;
+		}
+	
+	else if((iPipeliningTestParams.TestCaseName().Compare(_L("Test Case INC078630")) == 0) || (iPipeliningTestParams.TestCaseName().Compare(_L("Performance Test Case 8")) == 0))
+		{
+		
+		_LIT8(KTxtUri, "Microsoft-Server-ActiveSync?DeviceId=Foo&DeviceType=9999&Cmd=Ping");
+		TUriParser8 uri; 
+		uri.Parse(KTxtUri());
+		
+		
+		RStringF method = aSession.StringPool().StringF(HTTP::EPOST,RHTTPSession::GetTable());
+		RHTTPTransaction trans = aSession.OpenTransactionL(uri, aClient, method);
+		RHTTPHeaders headers = trans.Request().GetHeaderCollection();
+			
+			
+		_LIT8(KTxtHeaderName0, "Host");
+		_LIT8(KTxtHeaderValue0,	 "127.0.0.1");
+		RStringF headerStrName0 = aSession.StringPool().OpenFStringL(KTxtHeaderName0());
+		CleanupClosePushL(headerStrName0);
+		RStringF headerStrValue0 = aSession.StringPool().OpenFStringL(KTxtHeaderValue0());
+		CleanupClosePushL(headerStrValue0);
+		THTTPHdrVal headerValue0(headerStrValue0);
+		headers.SetFieldL(headerStrName0, headerValue0);
+		CleanupStack::PopAndDestroy(2, &headerStrName0);
+		
+		_LIT8(KTxtHeaderName, "Accept-Language");
+		_LIT8(KTxtHeaderValue, "en-us");
+		RStringF headerStrName = aSession.StringPool().OpenFStringL(KTxtHeaderName());
+		CleanupClosePushL(headerStrName);
+		RStringF headerStrValue = aSession.StringPool().OpenFStringL(KTxtHeaderValue());
+		CleanupClosePushL(headerStrValue);
+		THTTPHdrVal headerValue(headerStrValue);
+		headers.SetFieldL(headerStrName, headerValue);
+		CleanupStack::PopAndDestroy(2, &headerStrName);
+		
+		_LIT8(KTxtHeaderName1, "MS-ASProtocolVersion");
+		_LIT8(KTxtHeaderValue1, "2.5");
+		RStringF headerStrName1 = aSession.StringPool().OpenFStringL(KTxtHeaderName1());
+		CleanupClosePushL(headerStrName1);
+		RStringF headerStrValue1 = aSession.StringPool().OpenFStringL(KTxtHeaderValue1());
+		CleanupClosePushL(headerStrValue1);
+		THTTPHdrVal headerValue1(headerStrValue1);
+		headers.SetFieldL(headerStrName1, headerValue1);
+		CleanupStack::PopAndDestroy(2, &headerStrName1);
+		
+		return trans;
+
+		}
+	else if(iPipeliningTestParams.TestCaseName().Compare(_L("Performance Test Case 9")) == 0)
+		{
+		
+		_LIT8(KTxtUri, "http://www.newlc.com/Symbian-OS-Error-Codes.html");
+		TUriParser8 uri; 
+		uri.Parse(KTxtUri());
+		
+		
+		RStringF method = aSession.StringPool().StringF(HTTP::EPOST,RHTTPSession::GetTable());
+		RHTTPTransaction trans = aSession.OpenTransactionL(uri, aClient, method);
+		RHTTPHeaders headers = trans.Request().GetHeaderCollection();
+			
+		_LIT8(KTxtHeaderName3, "Host");
+		_LIT8(KTxtHeaderValue3,	 "194.146.227.34");
+		RStringF headerStrName3 = aSession.StringPool().OpenFStringL(KTxtHeaderName3());
+		CleanupClosePushL(headerStrName3);
+		RStringF headerStrValue3 = aSession.StringPool().OpenFStringL(KTxtHeaderValue3());
+		CleanupClosePushL(headerStrValue3);
+		THTTPHdrVal headerValue3(headerStrValue3);
+		headers.SetFieldL(headerStrName3, headerValue3);
+		CleanupStack::PopAndDestroy(2, &headerStrName3);
+			
+		_LIT8(KTxtHeaderName1, "Content-Type");
+		_LIT8(KTxtHeaderValue1, "*/*");
+		RStringF headerStrName1 = aSession.StringPool().OpenFStringL(KTxtHeaderName1());
+		CleanupClosePushL(headerStrName1);
+		RStringF headerStrValue1 = aSession.StringPool().OpenFStringL(KTxtHeaderValue1());
+		CleanupClosePushL(headerStrValue1);
+		THTTPHdrVal headerValue1(headerStrValue1);
+		headers.SetFieldL(headerStrName1, headerValue1);
+		CleanupStack::PopAndDestroy(2, &headerStrName1);
+			
+		//Set the body data
+		//The Content-Length will be set to 14
+		if (iFormEncoder)
+			{
+			delete iFormEncoder;
+			iFormEncoder = NULL;
+			}
+			
+		iFormEncoder = CHTTPFormEncoder::NewL(); 
+		TBuf8<256> name8;
+		TBuf8<256> value8;
+		_LIT(KName, "recherche");
+		_LIT(KValue, "asdf");
+		name8.Copy(KName);
+		value8.Copy(KValue);
+		iFormEncoder->AddFieldL(name8, value8);
+		
+		MHTTPDataSupplier* dataSupplier = this;
+		dataSupplier = iFormEncoder;
+		trans.Request().SetBody(*dataSupplier);
+	
+		return trans;
+
+		}
+	
+
+	TInt transType = iPipeliningTestParams.TransactionSequenceArray(aIndex);	
+	
+	// Check the transaction type to see if its a HTTP 1.0 transaction
+	// if 1.0 transaction then
+	// change the session properties for transaction 1
+	
+	// Check the value for the TransactionList header in the ini file if it carries a value 
+	// other than 1 at the position described by aIndex for the particular test case
+	if ( (transType != 1) && (aIndex == 0))
+		{
+		TransInfo thisTransInfo = iPipeliningTestParams.TransactionType(transType);
+		
+		TInt valueForHttpHdr = thisTransInfo.TransHeaderTypeArr[EHttpHeader];
+		if (( valueForHttpHdr != (ENoHeader) ) )
+			{
+			if ((thisTransInfo.TransHeaderInfoPtrArr[valueForHttpHdr])->Des().Compare(_L("1.0")))
+				{
+				RHTTPConnectionInfo connInfo = aSession.ConnectionInfo();
+				RStringPool strPool = aSession.StringPool();
+				THTTPHdrVal http10( strPool.StringF( HTTP::EHttp10, RHTTPSession::GetTable() ) );
+				connInfo.SetPropertyL( strPool.StringF( HTTP::EHTTPVersion,RHTTPSession::GetTable() ), http10 );
+				}
+			}
+		}
+	
+	//Check the request method type 
+	RStringF method;
+	if(iPipeliningTestParams.ReqMethod().Compare(_L("HEAD")) == 0)
+		{
+		method = aSession.StringPool().StringF(HTTP::EHEAD,RHTTPSession::GetTable());
+		}
+	else if(iPipeliningTestParams.ReqMethod().Compare(_L("POST")) == 0)
+		{
+		method = aSession.StringPool().StringF(HTTP::EPOST,RHTTPSession::GetTable());
+		}
+	else if(iPipeliningTestParams.ReqMethod().Compare(_L("GET")) == 0)
+		{
+		method = aSession.StringPool().StringF(HTTP::EGET,RHTTPSession::GetTable());
+		}		
+	else if(iPipeliningTestParams.ReqMethod().Compare(_L("OPTIONS")) == 0)
+		{
+		method = aSession.StringPool().StringF(HTTP::EOPTIONS,RHTTPSession::GetTable());
+		}		
+	TInt aTempIndex(0);
+	TInt uriCount(iPipeliningTestParams.UriCount());
+	aTempIndex = (uriCount > 1) ? aIndex : (uriCount-1);
+	
+	TUriParser8 uri;
+	uri.Parse(iPipeliningTestParams.UriL(aTempIndex));
+
+	if ((iPipeliningTestParams.BatchingEnabled() == 1) && (iBatchingBufferSizeSet == 1))
+		{
+		TInt bufferSize = iPipeliningTestParams.BufferSize();
+		RHTTPConnectionInfo connInfo = aSession.ConnectionInfo();
+		connInfo.SetPropertyL(aSession.StringPool().StringF(HTTP::EBatchingBufferSize,RHTTPSession::GetTable()), bufferSize);
+		}
+
+	if( (iPipeliningTestParams.Error() == KErrCancel) && (iPipeliningTestParams.TransactionSequenceArray(aIndex) == 2 ))
+		{
+		iTransToCancel = aSession.OpenTransactionL(uri, aClient, method);
+		return iTransToCancel;
+		}
+
+	// Check the value for the TransactionList header in the ini file if it carries a value 
+	// other than 1 at the position described by aIndex for the particular test case
+	else if ( transType != 1 )
+		{
+		//Get the transaction info
+		TransInfo thisTransInfo = iPipeliningTestParams.TransactionType(transType);
+		
+		//Check if there is a Cancel transaction
+		TInt valueForTransactionHdr = thisTransInfo.TransHeaderTypeArr[ETransactionHeader];
+		if (( valueForTransactionHdr != ENoHeader ) )
+			{
+			if ((thisTransInfo.TransHeaderInfoPtrArr[valueForTransactionHdr])->Des().Compare(_L("Cancel")))
+				{
+				iTransToCancel = aSession.OpenTransactionL(uri, aClient, method);
+				return iTransToCancel;
+				}
+			}
+		
+		//Create a plain-vanilla transaction
+		RHTTPTransaction trans = aSession.OpenTransactionL(uri, aClient, method);
+		
+		//Check if there is a connection header
+		TInt valueForConnectionHdr = thisTransInfo.TransHeaderTypeArr[::EConnectionHeader];
+		if (( valueForConnectionHdr != ENoHeader ) )
+			{
+			if ( ( thisTransInfo.TransHeaderInfoPtrArr[valueForConnectionHdr])->Des().Compare(_L("Close") ) )
+				{
+				AddConnectionCloseHeaderL(trans);
+				}
+			}
+		
+			
+		TInt valueForBatchingHdr = thisTransInfo.TransHeaderTypeArr[EBatchingHeader];
+		if (( valueForBatchingHdr != ENoHeader ) && (thisTransInfo.TransHeaderInfoPtrArr[valueForBatchingHdr])->Des().Compare(_L("True")) )//Transaction needs a large header
+			{
+			// Add a fairly large header
+			
+			RHTTPHeaders headers = trans.Request().GetHeaderCollection();
+			
+			_LIT8(KTxtHeaderName, "This_Is_A_Long_Header_Name");
+			_LIT8(KTxtHeaderValue, "This_Is_A_Long_Header_Value_abcdefghijklmnopqrstuvwxyz1234567890");
+			RStringF headerStrName = aSession.StringPool().OpenFStringL(KTxtHeaderName());
+			CleanupClosePushL(headerStrName);
+			RStringF headerStrValue = aSession.StringPool().OpenFStringL(KTxtHeaderValue());
+			CleanupClosePushL(headerStrValue);
+			THTTPHdrVal headerValue(headerStrValue);
+			headers.SetFieldL(headerStrName, headerValue);
+			CleanupStack::PopAndDestroy(2, &headerStrName);
+				
+			}
+		return trans;
+		}
+
+	return aSession.OpenTransactionL(uri, aClient, method);
+	}
+
+
+TBool CPipeliningTestCase::GetNextDataPart(TPtrC8& /*aDataPart*/)
+	{
+	return 0;
+	}
+
+void CPipeliningTestCase::ReleaseData()
+	{
+	
+	}
+TInt CPipeliningTestCase::OverallDataSize()
+	{
+	return 0;
+	}
+TInt CPipeliningTestCase::Reset()
+	{
+	return 0;
+	}
+const TDesC8& CPipeliningTestCase::GetRawRequest(TInt aConnectionIndex, TInt aTransIndex)
+	{
+	__ASSERT_ALWAYS( (aTransIndex<iPipeliningTestParams.TotalTransactionCount()) && (aConnectionIndex < iPipeliningTestParams.ConnectionCount()), User::Invariant());
+	
+	return iPipeliningTestParams.RawRequest(aConnectionIndex, aTransIndex);
+	}
+
+
+
+	
+const TDesC8& CPipeliningTestCase::GetRawResponse(TInt aConnectionIndex, TInt aTransIndex)
+	{
+	__ASSERT_ALWAYS( (aTransIndex<iPipeliningTestParams.TotalTransactionCount()) && (aConnectionIndex < iPipeliningTestParams.ConnectionCount()), User::Invariant());
+
+	return iPipeliningTestParams.RawResponse(aConnectionIndex, aTransIndex);
+	}
+
+
+
+	
+void CPipeliningTestCase::AddConnectionCloseHeaderL(RHTTPTransaction aTransaction)
+	{
+	RStringF name = aTransaction.Session().StringPool().StringF(HTTP::EConnection, RHTTPSession::GetTable());
+	THTTPHdrVal value = aTransaction.Session().StringPool().StringF(HTTP::EClose, RHTTPSession::GetTable());
+
+	aTransaction.Request().GetHeaderCollection().SetFieldL(name, value);
+	}
+
+
+
+	
+TInt CPipeliningTestCase::RealExpectedConnectionCount() const
+	{
+	TInt numUris = iPipeliningTestParams.UriCount();
+	_LIT8(KTxtUri, "http://127.0.0.1");
+	//Check if the number of URIs in the ini file is more than one for the particular test case
+	if ( numUris != 1)
+		{
+		TInt numLocalConnections = 0;
+		TInt numExternalConnections = 0;
+		for (TInt ii = 0; ii < numUris ; ++ ii)
+			{
+			TPtrC8 thisUri;
+			TRAPD(err,thisUri.Set(iPipeliningTestParams.UriL(ii)));
+			if(err != KErrArgument)
+				{
+				if (thisUri.Compare(KTxtUri) == 0)
+					{
+					++numLocalConnections;
+					}
+				else
+					{
+					++numExternalConnections;
+					}
+				}
+			}
+		
+		TInt totalConnections = numLocalConnections + ((numExternalConnections != 0) ? 1:0);
+		return totalConnections;
+		}		
+	else
+		{
+		TPtrC8 firstUri;
+		TRAPD(err,firstUri.Set(iPipeliningTestParams.UriL(0)));
+		if(err != KErrArgument)
+			{
+			if (firstUri.Compare(KTxtUri) == 0)
+				{
+				return iPipeliningTestParams.ConnectionCount();
+				}
+			else
+				{
+				return 1;
+				}
+			}
+		}
+	return 0;
+	}
+
+
+TInt CPipeliningTestCase::ExpectedError(RHTTPTransaction aTrans)
+	{
+	if (iPipeliningTestParams.Error() == KErrCancel)
+		{
+		if(!iIsTransCancelled)
+			{
+			if(aTrans.Id() == 3)
+				{
+				iTransToCancel.Cancel();
+				iIsTransCancelled = ETrue;
+				iPipeliningTestParams.DecreaseTotalTransactionCount();
+				}
+			}
+		
+		if( iTransToCancel.Id() == aTrans.Id() )
+			{
+			return KErrCancel;
+			}
+		}
+	else if ( iPipeliningTestParams.Error() == KErrDisconnected)
+		{
+		return KErrDisconnected;
+		}
+	
+	return KErrNone;
+	}
+
+void CPipeliningTestCase::ProcessHeadersL(RHTTPTransaction aTrans)
+	{
+
+	_LIT(KTxtFailed, "**TEST FAILED**");
+	_LIT(KExpectedValue, "Expected Value: %S");
+	_LIT(KActualValue, "Actual Value: %S");
+	_LIT(KExpectedLength, "Expected Content Length: %d");
+	_LIT(KActualLength, "Actual Content Length: %d");
+											
+					
+	if ( iPipeliningTestParams.ProcessHeader() )
+		{
+		TInt numHdrs = iPipeliningTestParams.NumHdrs();
+		
+		for (TInt xx=0; xx < numHdrs; ++xx )
+			{
+			//Check if the header to process is WWW-Authenticate
+			if((iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("WWW-Authenticate"))) == 0)
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				RHTTPHeaders headers = aTrans.Response().GetHeaderCollection();
+				RStringF headerStr = stringPool.StringF(HTTP::EWWWAuthenticate, aTrans.Session().GetTable());
+				FieldCompareL(headers.FieldPartsL(headerStr), iPipeliningTestParams.NumberOfHeaderVals(xx));
+				FieldValueCompareL(headers, headers.FieldPartsL(headerStr), xx, headerStr);
+				}
+			
+			//Check if the header to process is Upgrade
+			else if ( (iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("Upgrade"))) == 0 )
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				RHTTPHeaders headers = aTrans.Response().GetHeaderCollection();
+				RStringF headerStr = stringPool.StringF(HTTP::EUpgrade, aTrans.Session().GetTable());
+				FieldCompareL(headers.FieldPartsL(headerStr), iPipeliningTestParams.NumberOfHeaderVals(xx));
+				FieldValueCompareL(headers, headers.FieldPartsL(headerStr), xx, headerStr);
+				}
+
+			//Check if the header to process is Content-Language
+			else if ( (iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("Content-Language"))) == 0 )
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				RHTTPHeaders headers = aTrans.Response().GetHeaderCollection();
+				RStringF headerStr = stringPool.StringF(HTTP::EContentLanguage, aTrans.Session().GetTable());
+				FieldCompareL(headers.FieldPartsL(headerStr), iPipeliningTestParams.NumberOfHeaderVals(xx));
+				FieldValueCompareL(headers, headers.FieldPartsL(headerStr), xx, headerStr);
+				}
+
+			//Check if the header to process is Server
+			else if ( (iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("Server"))) == 0 )
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				RHTTPHeaders headers = aTrans.Response().GetHeaderCollection();
+				RStringF headerStr = stringPool.StringF(HTTP::EServer, aTrans.Session().GetTable());
+				FieldCompareL(headers.FieldPartsL(headerStr), iPipeliningTestParams.NumberOfHeaderVals(xx));
+				FieldValueCompareL(headers, headers.FieldPartsL(headerStr), xx, headerStr);
+				}	
+			
+			//Check if the header to process is Host
+			else if ( (iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("Host"))) == 0 )
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				RHTTPHeaders headers = aTrans.Request().GetHeaderCollection();
+				THTTPHdrVal hdrVal;
+				TBuf<100> buf1, buf2;
+				RStringF headerStr = stringPool.StringF(HTTP::EHost, aTrans.Session().GetTable());
+				FieldValueCompareL(headers, 1, xx, headerStr);
+				}		
+			
+			//Check if the header to process is Content-Length
+			else if ( (iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("Content-Length"))) == 0 )
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				RHTTPHeaders headers = aTrans.Response().GetHeaderCollection();
+				THTTPHdrVal hdrVal;
+
+				//Check Content-Length header parameter is stored correctly
+				RStringF headerStr = stringPool.StringF(HTTP::EContentLength, aTrans.Session().GetTable());
+				User::LeaveIfError(headers.GetField(headerStr,0,hdrVal));
+				
+				FieldCompareL(headers.FieldPartsL(headerStr), iPipeliningTestParams.NumberOfHeaderVals(xx));	
+	
+				if (hdrVal.Int() != Ptr2Int(iPipeliningTestParams.HeaderVal(xx+1,1)) )
+					{
+					iTestUtils.LogIt(KExpectedLength, hdrVal.Int());
+					iTestUtils.LogIt(KActualLength, Ptr2Int(iPipeliningTestParams.HeaderVal(xx + 1,1)));			
+					iTestUtils.LogIt(KTxtFailed);
+					User::Leave(KErrArgument);
+					}
+				iTestUtils.LogIt(KExpectedLength, hdrVal.Int());
+				iTestUtils.LogIt(KActualLength, Ptr2Int(iPipeliningTestParams.HeaderVal(xx + 1,1)));	
+				}
+				
+			//Check if the header to process is Content-Type
+			else if ( (iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("Content-Type"))) == 0 )
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				RHTTPHeaders headers = aTrans.Response().GetHeaderCollection();
+				THTTPHdrVal hdrVal;
+				TBuf<100> buf1, buf2;
+				
+				RStringF headerStr = stringPool.StringF(HTTP::EContentType, aTrans.Session().GetTable());
+				
+				FieldCompareL(headers.FieldPartsL(headerStr), iPipeliningTestParams.NumberOfHeaderVals(xx));
+				
+				for ( TInt mn =0; mn < headers.FieldPartsL(headerStr); ++mn)
+					{
+					User::LeaveIfError(headers.GetField(headerStr,mn,hdrVal));
+					TPtrC8 ptrValue1 ( hdrVal.StrF ().DesC() );   
+					if (TInt mno = ptrValue1.Compare(iPipeliningTestParams.HeaderVal(xx+1,mn+1)) != 0)
+						{
+						buf1.Copy(ptrValue1);
+						buf2.Copy(iPipeliningTestParams.HeaderVal(xx + 1,mn + 1));
+						iTestUtils.LogIt(KExpectedValue, &buf1);
+						iTestUtils.LogIt(KActualValue, &buf2);			
+						iTestUtils.LogIt(KTxtFailed);
+						User::Leave(KErrArgument);
+						}
+					buf1.Copy(ptrValue1);
+					buf2.Copy(iPipeliningTestParams.HeaderVal(xx + 1,mn + 1));
+					iTestUtils.LogIt(KExpectedValue, &buf1);
+					iTestUtils.LogIt(KActualValue, &buf2);
+					
+					/*
+					RStringF param = stringPool.StringF(HTTP::ECharset, aTrans.Session().GetTable());
+					THTTPHdrVal paramval;
+					User::LeaveIfError(headers.GetParam(headerStr, param, paramval, mn));
+					TPtrC8 paramval1(paramval.StrF().DesC());
+					TBuf<100> buf3;
+					buf3.Copy(paramval1);
+					_LIT(KTxtParam, "Parameter Charset= %S");
+					iTestUtils.LogIt(KTxtParam, &buf3);
+					*/
+					}
+				}
+			
+			//Check if the header to process is Date
+			else if ( (iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("Date"))) == 0 )
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				RHTTPHeaders headers = aTrans.Response().GetHeaderCollection();
+				THTTPHdrVal hdrVal;
+												
+				RStringF headerStr = stringPool.StringF(HTTP::EDate, aTrans.Session().GetTable());
+				
+				if( headers.FieldPartsL(headerStr) != iPipeliningTestParams.NumberOfHeaderVals(xx))
+					{	
+					User::Leave(KErrArgument);
+					}
+					
+				for ( TInt mn =0; mn < headers.FieldPartsL(headerStr); ++mn)
+					{
+					User::LeaveIfError(headers.GetField(headerStr,mn,hdrVal));
+					TDateTime rdt = hdrVal.DateTime();
+					}
+				}	
+			
+			//Check if the header to process is MsgBody
+			else if ( (iPipeliningTestParams.HeaderToProcess(xx).Compare(_L8("MsgBody"))) == 0 )
+				{
+				RStringPool stringPool = aTrans.Session().StringPool();
+				THTTPHdrVal hdrval;
+										
+				if(aTrans.Response().HasBody())
+					{
+					_LIT(KStrHasBody, "Response stream has a body");
+					iTestUtils.LogIt(KStrHasBody);	
+					}
+				else
+					{
+					_LIT(KStrNoBody, "Response stream has no body");
+					iTestUtils.LogIt(KStrNoBody);	
+					}	
+				
+				if ( iPipeliningTestParams.HeaderVal(xx+1, 1).Compare(_L8("Null")) == 0)
+					{
+					TBool hasBody = aTrans.Response().HasBody();
+					if ( hasBody )
+						{
+						_LIT(KTxtExpectedMsg, "Expected message body: NULL");
+						iTestUtils.LogIt(KTxtExpectedMsg);
+						iTestUtils.LogIt(KTxtFailed);
+						User::Leave(KErrArgument);
+						}
+					else
+						{
+						_LIT(KTxtHasBody, "Message Body: NULL");
+						iTestUtils.LogIt(KTxtHasBody);
+						}	
+					}
+				}
+			}	
+		}
+	}
+
+TBool CPipeliningTestCase::EnableBatching() const
+	{
+	return iPipeliningTestParams.BatchingEnabled();
+	}
+
+/**
+Compares the number fields in the String pool with those provided in the ini file
+@param aStringPool
+	The String Pool
+@param aIniFile
+	The fields from the ini file
+@leave
+	KErrArgument if the number of fields in the ini file do not match those from the string pool
+*/
+void CPipeliningTestCase::FieldCompareL(TInt aStringPool, TInt aIniFile)
+	{
+	
+	_LIT(KExpectedFields, "Expected number of fields: %d");
+	_LIT(KActualFields, "Actual number of fields: %d");
+	_LIT(KTxtFailed, "**TEST FAILED**");
+	
+	if( aStringPool != aIniFile)
+		{
+		iTestUtils.LogIt(KExpectedFields,aStringPool );
+		iTestUtils.LogIt(KActualFields, aIniFile);
+		iTestUtils.LogIt(KTxtFailed);
+		User::Leave(KErrArgument);
+		}
+	iTestUtils.LogIt(KExpectedFields,aStringPool);
+	iTestUtils.LogIt(KActualFields, aIniFile);
+	
+	}
+
+/**
+Compares the values provided for each header in the ini file with those obtained from
+the string pool 
+@param headers
+	Collection of headers from the response/request
+@param xyz
+	Number of fields/headers present in the string pool
+@param xx
+	Index value the header that needs to be processed
+@param headerStr
+	Holds the header name that is obtained from the string pool
+@leave
+	KErrArgument if the field values do not match
+*/
+void CPipeliningTestCase::FieldValueCompareL(RHTTPHeaders headers, TInt xyz, TInt xx, RStringF headerStr)
+	{
+	
+	_LIT(KTxtFailed, "**TEST FAILED**");
+	_LIT(KExpectedValue, "Expected Value: %S");
+	_LIT(KActualValue, "Actual Value: %S");
+	
+	TBuf<100> buf1, buf2;
+	THTTPHdrVal hdrVal;
+	
+	for ( TInt mn =0; mn < xyz; ++mn)
+		{
+		User::LeaveIfError(headers.GetField(headerStr,mn,hdrVal));
+		TPtrC8 ptrValue1 ( hdrVal.StrF ().DesC() );   
+		if (TInt mno = ptrValue1.Compare(iPipeliningTestParams.HeaderVal(xx+1,mn+1)) != 0)
+			{
+			buf1.Copy(ptrValue1);
+			buf2.Copy(iPipeliningTestParams.HeaderVal(xx + 1,mn + 1));
+			iTestUtils.LogIt(KExpectedValue, &buf1);
+			iTestUtils.LogIt(KActualValue, &buf2);			
+			iTestUtils.LogIt(KTxtFailed);
+			User::Leave(KErrArgument);
+			}
+		buf1.Copy(ptrValue1);
+		buf2.Copy(iPipeliningTestParams.HeaderVal(xx + 1,mn + 1));
+		iTestUtils.LogIt(KExpectedValue, &buf1);
+		iTestUtils.LogIt(KActualValue, &buf2);			
+		}		
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp1.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,213 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+#include "ctcpclienttestupnp1.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "GET / HTTP/1.1\r\nHost: [0:0:0:0:0:0:0:1]\r\nContent-Length: 0\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.0 200 OK\r\nContent-Length: 0\r\n\r\n" );
+
+
+CTcpClientTestUPnP1* CTcpClientTestUPnP1::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP1* ret = new ( ELeave ) CTcpClientTestUPnP1 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP1::CTcpClientTestUPnP1 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP1::~CTcpClientTestUPnP1 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP1::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP1::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk bodyBuf;
+			RMemChunk uriBuf;
+			//uriBuf.CreateL ( _L8 ("http://127.0.0.1:9999") );
+			uriBuf.CreateL ( _L8 ("http://[0:0:0:0:0:0:0:1]"), iAllocator );
+			TUpnpMessage::TUPnPClientRequestInfo msg ( HTTP::EGET, uriBuf, bodyBuf, NULL );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP1::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP1::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP1::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP1::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		TUpnpMessage::TResponse& msg = message_cast< TUpnpMessage::TResponse >(aMessage);
+		
+		RBuf8 responseBodyData;
+		responseBodyData.CreateMax ( msg.iBodyData.Length () );
+		responseBodyData.FillZ ( msg.iBodyData.Length () );
+		msg.iBodyData.CopyOut ( responseBodyData );	
+		responseBodyData.Close ();
+		msg.iBodyData.Free ();
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP1::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP1::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP1::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP1::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP1::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp10.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,202 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+#include "CTcpClientTestUPnP10.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 0\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nConnection: closed\r\nContent-Length: 0\r\n\r\n" );
+
+
+CTcpClientTestUPnP10* CTcpClientTestUPnP10::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP10* ret = new ( ELeave ) CTcpClientTestUPnP10 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP10::CTcpClientTestUPnP10 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP10::~CTcpClientTestUPnP10 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP10::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP10::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk bodyBuf;
+			RMemChunk uriBuf;
+			uriBuf.CreateL ( _L8 ("http://127.0.0.1:9999"), iAllocator );
+			TUpnpMessage::TUPnPClientRequestInfo msg ( HTTP::EGET, uriBuf, bodyBuf, NULL );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP10::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP10::GetTestCase ()
+	{
+	return this;
+	}
+
+CTestExecuteLogger& CTcpClientTestUPnP10::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+	
+void CTcpClientTestUPnP10::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+	}
+	
+const TDesC& CTcpClientTestUPnP10::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP10::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP10::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP10::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP10::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp11.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,204 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+#include "CTcpClientTestUPnP11.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 0\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.2 200 OK\r\nConnection: kept-alive\r\nContent-Length: 0\r\n\r\n" );
+
+
+CTcpClientTestUPnP11* CTcpClientTestUPnP11::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP11* ret = new ( ELeave ) CTcpClientTestUPnP11 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP11::CTcpClientTestUPnP11 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP11::~CTcpClientTestUPnP11 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP11::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP11::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk bodyBuf;
+			RMemChunk uriBuf;
+			uriBuf.CreateL ( _L8 ("http://127.0.0.1:9999"), iAllocator );
+			TUpnpMessage::TUPnPClientRequestInfo msg ( HTTP::EGET, uriBuf, bodyBuf, NULL );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP11::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP11::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP11::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP11::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP11::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP11::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP11::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP11::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP11::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp12.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,288 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpClientTestUPnP12.h"
+#include "upnpserverconstants.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nSoapAction: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nContent-Length: 330\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>\r\n\r\n" );
+_LIT8 ( KData1, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse " );
+_LIT8 ( KData2, "xmlns:u=\"urn:shemas-upnp");
+_LIT8 ( KData3, "-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>");
+
+CTcpClientTestUPnP12* CTcpClientTestUPnP12::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP12* ret = new ( ELeave ) CTcpClientTestUPnP12 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP12::CTcpClientTestUPnP12 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP12::~CTcpClientTestUPnP12 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP12::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP12::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+					
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			TPtrC8 data(KData1);
+			TPtrC8 data2(KData2);
+			TPtrC8 data3(KData3);
+			
+			iSSP->SetOption(KCHOptionLevel, KCHAbsoluteUri, _L8 ("http://127.0.0.1"));
+			
+			TCHMessageOption option ( 1, data.Length()+data2.Length()+data3.Length() );
+			
+			TPckg < TCHMessageOption > optionBuf ( option );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf);
+			
+			RMBufChain bodyBuf;
+			bodyBuf.CreateL(KData1);
+			iSSPData->Write(bodyBuf, 0, NULL);
+			
+			/*
+			
+			TCHMessageOption option2 ( 1, data2.Length() );
+			TPckg < TCHMessageOption > optionBuf2 ( option2 );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf2);
+			*/
+			
+			RMBufChain bodyBuf1;
+			bodyBuf1.CreateL(KData2);
+			iSSPData->Write(bodyBuf1, 0, NULL);
+
+			/*
+			
+			TCHMessageOption option3 ( 1, data3.Length() );
+			TPckg < TCHMessageOption > optionBuf3 ( option3 );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf3);
+			*/
+			
+			RMBufChain bodyBuf2;
+			bodyBuf2.CreateL(KData3);
+			iSSPData->Write(bodyBuf2, 0, NULL);
+
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP12::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP12::GetTestCase ()
+	{
+	return this;
+	}
+
+CTestExecuteLogger& CTcpClientTestUPnP12::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP12::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		
+		
+		iFlow = mcfnode_cast<CSubConnectionFlowBase>(
+		reinterpret_cast<Messages::ANode*>(	iClientId.Ptr()));
+		
+		
+		// Perform the binding to the flow below
+		iFlowBinder = iFlow->GetBinderControlL();
+		iSSP = iFlowBinder->GetControlL(KSockStream, *this);
+		iSSPData = iFlowBinder->BindL(*this);
+		
+		
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP12::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "CTcpClientTestMWrites" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP12::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP12::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP12::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP12::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+void CTcpClientTestUPnP12::NewData(TUint aCount)
+	{
+	RMBufChain data;
+	RBuf8 resData;
+	
+	iLogger.WriteFormat(_L("<i>NewData..... </i>"));
+	iSSP->GetOption(1,KCHMaxLength,resData);
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHMaxLength,resData);
+	TInt len = *(TUint*) resData.Ptr();
+	resData.Close();
+	
+	iSSPData->GetData(data,len,0);
+	resData.Create( len );
+	data.CopyOut(resData);
+	resData.Close();
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHLastMessage,resData);
+	TBool isLastMsg = *(TUint*) resData.Ptr();
+	resData.Close();
+	data.Init();
+	
+	if(isLastMsg)
+		{
+		iLogger.WriteFormat(_L("<i>NewData.LastMsg.... </i>"));
+		CompleteSelf ( KErrNone );
+		}
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp13.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,288 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpClientTestUPnP13.h"
+#include "upnpserverconstants.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nSoapAction: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nContent-Length: 330\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>\r\n\r\n" );
+_LIT8 ( KData1, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse " );
+_LIT8 ( KData2, "xmlns:u=\"urn:shemas-upnp-org:control-1-0\">");
+_LIT8 ( KData3, "<return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>");
+
+CTcpClientTestUPnP13* CTcpClientTestUPnP13::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP13* ret = new ( ELeave ) CTcpClientTestUPnP13 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP13::CTcpClientTestUPnP13 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP13::~CTcpClientTestUPnP13 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP13::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP13::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			TPtrC8 data(KData1);
+			TPtrC8 data2(KData2);
+			TPtrC8 data3(KData3);
+			
+			iSSP->SetOption(KCHOptionLevel, KCHAbsoluteUri, _L8 ("http://127.0.0.1"));
+			
+			TCHMessageOption option ( 1, data.Length()+data2.Length()+data3.Length() );
+			
+			TPckg < TCHMessageOption > optionBuf ( option );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf);
+			
+			RMBufChain bodyBuf;
+			bodyBuf.CreateL(KData1);
+			iSSPData->Write(bodyBuf, 0, NULL);
+			
+			/*
+			
+			TCHMessageOption option2 ( 1, data2.Length() );
+			TPckg < TCHMessageOption > optionBuf2 ( option2 );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf2);
+			*/
+			
+			RMBufChain bodyBuf1;
+			bodyBuf1.CreateL(KData2);
+			iSSPData->Write(bodyBuf1, 0, NULL);
+
+			/*
+			
+			TCHMessageOption option3 ( 1, data3.Length() );
+			TPckg < TCHMessageOption > optionBuf3 ( option3 );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf3);
+			*/
+			
+			RMBufChain bodyBuf2;
+			bodyBuf2.CreateL(KData3);
+			iSSPData->Write(bodyBuf2, 0, NULL);
+
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP13::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP13::GetTestCase ()
+	{
+	return this;
+	}
+
+CTestExecuteLogger& CTcpClientTestUPnP13::GetLogger ( )
+	{
+	return iLogger;
+	}
+	
+
+void CTcpClientTestUPnP13::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		
+		
+		iFlow = mcfnode_cast<CSubConnectionFlowBase>(
+		reinterpret_cast<Messages::ANode*>(	iClientId.Ptr()));
+		
+		
+		// Perform the binding to the flow below
+		iFlowBinder = iFlow->GetBinderControlL();
+		iSSP = iFlowBinder->GetControlL(KSockStream, *this);
+		iSSPData = iFlowBinder->BindL(*this);
+		
+		
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP13::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "CTcpClientTestMWrites" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP13::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP13::GetRawRequest ( TInt /*aTransIndex*/ )
+	{
+	//__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP13::GetRawResponse ( TInt /*aTransIndex*/ )
+	{
+	//__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP13::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+void CTcpClientTestUPnP13::NewData(TUint aCount)
+	{
+	RMBufChain data;
+	RBuf8 resData;
+	
+	iLogger.WriteFormat(_L("<i>NewData..... </i>"));
+	iSSP->GetOption(1,KCHMaxLength,resData);
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHMaxLength,resData);
+	TInt len = *(TUint*) resData.Ptr();
+	resData.Close();
+	
+	iSSPData->GetData(data,aCount,0);
+	resData.Create( aCount );
+	data.CopyOut(resData);
+	resData.Close();
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHLastMessage,resData);
+	TBool isLastMsg = *(TUint*) resData.Ptr();
+	resData.Close();
+	data.Init();
+	
+	if(isLastMsg)
+		{
+		iLogger.WriteFormat(_L("<i>NewData.LastMsg.... </i>"));
+		CompleteSelf ( KErrNone );
+		}
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp14.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,298 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpClientTestUPnP14.h"
+#include "upnpserverconstants.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nSoapAction: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nContent-Length: 330\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>\r\n\r\n" );
+_LIT8 ( KData1, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse " );
+_LIT8 ( KData2, "xmlns:u=\"urn:shemas-upnp-org:control-1-0\">");
+_LIT8 ( KData3, "<return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>");
+
+CTcpClientTestUPnP14* CTcpClientTestUPnP14::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP14* ret = new ( ELeave ) CTcpClientTestUPnP14 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP14::CTcpClientTestUPnP14 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL), iTimerstart(EFalse)
+	{
+	}
+
+CTcpClientTestUPnP14::~CTcpClientTestUPnP14 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP14::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP14::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			TPtrC8 data(KData1);
+			TPtrC8 data2(KData2);
+			TPtrC8 data3(KData3);
+			
+			if(!iTimerstart)
+				{
+				iSSP->SetOption(KCHOptionLevel, KCHAbsoluteUri, _L8 ("http://127.0.0.1"));
+				
+				TCHMessageOption option ( 1, data.Length()+data2.Length()+data3.Length() );
+				
+				TPckg < TCHMessageOption > optionBuf ( option );
+				
+				iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf);
+				
+				
+				RMBufChain bodyBuf;
+				bodyBuf.CreateL(KData1);
+				iSSPData->Write(bodyBuf, 0, NULL);
+				
+				/*
+				
+				TCHMessageOption option2 ( 1, data2.Length() );
+				TPckg < TCHMessageOption > optionBuf2 ( option2 );
+				
+				iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf2);
+				*/
+				
+				RMBufChain bodyBuf1;
+				bodyBuf1.CreateL(KData2);
+				iSSPData->Write(bodyBuf1, 0, NULL);
+	
+				iState = ESendRequestData;
+				
+				iTimerstart = ETrue;
+				iTimer.After ( iStatus, 1000000 );
+				/*
+				
+				TCHMessageOption option3 ( 1, data3.Length() );
+				TPckg < TCHMessageOption > optionBuf3 ( option3 );
+				
+				iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf3);
+				*/
+				}
+			else
+				{
+				RMBufChain bodyBuf2;
+				bodyBuf2.CreateL(KData3);
+				iSSPData->Write(bodyBuf2, 0, NULL);
+				iState = ECleanup;
+				}
+			
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP14::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP14::GetTestCase ()
+	{
+	return this;
+	}
+
+CTestExecuteLogger& CTcpClientTestUPnP14::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+	
+void CTcpClientTestUPnP14::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		
+		
+		iFlow = mcfnode_cast<CSubConnectionFlowBase>(
+		reinterpret_cast<Messages::ANode*>(	iClientId.Ptr()));
+		
+		
+		// Perform the binding to the flow below
+		iFlowBinder = iFlow->GetBinderControlL();
+		iSSP = iFlowBinder->GetControlL(KSockStream, *this);
+		iSSPData = iFlowBinder->BindL(*this);
+		
+		
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP14::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "CTcpClientTestMWrites" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP14::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP14::GetRawRequest ( TInt /*aTransIndex*/ )
+	{
+	//__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP14::GetRawResponse ( TInt /*aTransIndex*/ )
+	{
+	//__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP14::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+void CTcpClientTestUPnP14::NewData(TUint aCount)
+	{
+	RMBufChain data;
+	RBuf8 resData;
+	
+	iLogger.WriteFormat(_L("<i>NewData..... </i>"));
+	iSSP->GetOption(1,KCHMaxLength,resData);
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHMaxLength,resData);
+	TInt len = *(TUint*) resData.Ptr();
+	resData.Close();
+	
+	iSSPData->GetData(data,len,0);
+	resData.Create( len );
+	data.CopyOut(resData);
+	resData.Close();
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHLastMessage,resData);
+	TBool isLastMsg = *(TUint*) resData.Ptr();
+	resData.Close();
+	data.Init();
+	
+	if(isLastMsg)
+		{
+		iLogger.WriteFormat(_L("<i>NewData.LastMsg.... </i>"));
+		CompleteSelf ( KErrNone );
+		}
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp2.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,205 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+#include "CTcpClientTestUPnP2.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "GET / HTTP/1.1\r\nHost: [0:0:0:0:0:0:0:1]\r\nContent-Length: 0\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/2.2 200 OK\r\nContent-Length: 0\r\n\r\n" );
+
+
+CTcpClientTestUPnP2* CTcpClientTestUPnP2::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP2* ret = new ( ELeave ) CTcpClientTestUPnP2 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP2::CTcpClientTestUPnP2 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP2::~CTcpClientTestUPnP2 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP2::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP2::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk bodyBuf;
+			RMemChunk uriBuf;
+			//uriBuf.CreateL ( _L8 ("http://127.0.0.1:9999") );
+			uriBuf.CreateL ( _L8 ("http://[0:0:0:0:0:0:0:1]"), iAllocator );
+			TUpnpMessage::TUPnPClientRequestInfo msg ( HTTP::EGET, uriBuf, bodyBuf, NULL );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP2::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP2::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP2::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP2::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP2::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP2::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP2::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP2::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP2::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp3.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,374 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+#include "CTcpClientTestUPnP3.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 0\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length: 0\r\n\r\n" );
+
+
+CTcpClientTestUPnP3* CTcpClientTestUPnP3::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP3* ret = new ( ELeave ) CTcpClientTestUPnP3 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP3::CTcpClientTestUPnP3 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP3::~CTcpClientTestUPnP3 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP3::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP3::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk bodyBuf;
+			RMemChunk uriBuf;
+			uriBuf.CreateL ( _L8 ("http://127.0.0.1:9999"), iAllocator );
+			TUpnpMessage::TUPnPClientRequestInfo msg ( HTTP::EGET, uriBuf, bodyBuf, NULL );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP3::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP3::GetTestCase ()
+	{
+	return this;
+	}
+
+CTestExecuteLogger& CTcpClientTestUPnP3::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+	
+void CTcpClientTestUPnP3::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP3::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP3::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP3::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP3::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP3::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+////////////////////////////////////////////////////////////////////////////////////////////
+_LIT8 ( KTxtRawResponse2, "HTTP/1.1 200 OK\r\nConnection: close-close\r\nContent-Length: 0\r\n\r\n" );
+
+CTcpClientTestUPnP15* CTcpClientTestUPnP15::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP15* ret = new ( ELeave ) CTcpClientTestUPnP15 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP15::CTcpClientTestUPnP15 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP15::~CTcpClientTestUPnP15 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP15::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP15::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk bodyBuf;
+			RMemChunk uriBuf;
+			uriBuf.CreateL ( _L8 ("http://127.0.0.1:9999"), iAllocator );
+			TUpnpMessage::TUPnPClientRequestInfo msg ( HTTP::EGET, uriBuf, bodyBuf, NULL );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP15::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP15::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP15::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP15::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP15::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP15::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP15::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP15::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse2 ();
+	}
+
+TInt CTcpClientTestUPnP15::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp4.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,204 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+#include "CTcpClientTestUPnP4.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 0\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/2.2 200 OK\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n" );
+
+
+CTcpClientTestUPnP4* CTcpClientTestUPnP4::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP4* ret = new ( ELeave ) CTcpClientTestUPnP4 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP4::CTcpClientTestUPnP4 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP4::~CTcpClientTestUPnP4 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP4::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP4::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk bodyBuf;
+			RMemChunk uriBuf;
+			uriBuf.CreateL ( _L8 ("http://127.0.0.1:9999"), iAllocator );
+			TUpnpMessage::TUPnPClientRequestInfo msg ( HTTP::EGET, uriBuf, bodyBuf, NULL );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP4::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP4::GetTestCase ()
+	{
+	return this;
+	}
+
+CTestExecuteLogger& CTcpClientTestUPnP4::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP4::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP4::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP4::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP4::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP4::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP4::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp5.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,165 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+#include "CTcpClientTestUPnP5.h"
+
+#include "csoapparser.h"
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "" );
+_LIT8 ( KTxtRawResponse1, "" );
+
+_LIT8 ( KData1, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body1></s:Envelope>" );
+
+
+CTcpClientTestUPnP5* CTcpClientTestUPnP5::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP5* ret = new ( ELeave ) CTcpClientTestUPnP5 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP5::CTcpClientTestUPnP5 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP5::~CTcpClientTestUPnP5 ()
+	{	
+	//iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP5::ConstructL()
+	{	
+	//iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP5::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			CSoapParser* soapParser;
+			TInt err;
+			soapParser = CSoapParser::NewL();
+			
+			TRAP(err,soapParser->ParseSoapL(KData1));
+			TRAP(err,soapParser->ParseSoapL(KData1));
+			delete soapParser;
+			
+			soapParser = CSoapParser::NewL();
+			//TRAP(err,soapParser->ParseSoapL(KData2));
+			TRAP(err,soapParser->ParseSoapL(KTxtRawRequest));
+			delete soapParser;
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP5::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP5::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP5::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP5::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP5::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP5::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP5::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP5::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP5::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp6.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,263 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpClientTestUPnP6.h"
+#include "upnpserverconstants.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nSoapAction: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nContent-Length: 330\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>\r\n\r\n" );
+_LIT8 ( KData1, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>" );
+
+CTcpClientTestUPnP6* CTcpClientTestUPnP6::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP6* ret = new ( ELeave ) CTcpClientTestUPnP6 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP6::CTcpClientTestUPnP6 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP6::~CTcpClientTestUPnP6 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP6::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP6::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			TPtrC8 data(KData1);
+			
+			iSSP->SetOption(KCHOptionLevel, KCHAbsoluteUri, _L8 ("http://127.0.0.1"));
+			
+			TCHMessageOption option ( 1, data.Length() );
+			TPckg < TCHMessageOption > optionBuf ( option );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf);
+			
+			RMBufChain bodyBuf;
+			bodyBuf.CreateL(KData1);
+			iSSPData->Write(bodyBuf, 0, NULL);
+			/*
+			RMBufChain bodyBuf1;
+			bodyBuf1.CreateL(KData1);
+			iSSPData->Write(bodyBuf1, 0, NULL);
+			*/
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP6::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP6::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP6::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP6::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		
+		
+		iFlow = mcfnode_cast<CSubConnectionFlowBase>(
+		reinterpret_cast<Messages::ANode*>(	iClientId.Ptr()));
+		
+		
+		// Perform the binding to the flow below
+		iFlowBinder = iFlow->GetBinderControlL();
+		iSSP = iFlowBinder->GetControlL(KSockStream, *this);
+		iSSPData = iFlowBinder->BindL(*this);
+		
+		
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP6::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP6::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP6::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP6::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP6::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+void CTcpClientTestUPnP6::NewData(TUint aCount)
+	{
+	RMBufChain data;
+	RBuf8 resData;
+	
+	iLogger.WriteFormat(_L("<i>NewData..... </i>"));
+	iSSP->GetOption(1,KCHMaxLength,resData);
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHMaxLength,resData);
+	TInt len = *(TUint*) resData.Ptr();
+	resData.Close();
+	
+	iSSPData->GetData(data,len,0);
+	resData.Create( len );
+	data.CopyOut(resData);
+	resData.Close();
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHLastMessage,resData);
+	TBool isLastMsg = *(TUint*) resData.Ptr();
+	resData.Close();
+	data.Init();
+	
+	if(isLastMsg)
+		{
+		iLogger.WriteFormat(_L("<i>NewData...Last Msg.. </i>"));
+		CompleteSelf ( KErrNone );
+		}
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp7.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,231 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpClientTestUPnP7.h"
+#include "upnpserverconstants.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nSoapAction: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nContent-Length: 330\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>\r\n\r\n" );
+_LIT8 ( KData1, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body1></s:Envelope>" );
+
+CTcpClientTestUPnP7* CTcpClientTestUPnP7::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP7* ret = new ( ELeave ) CTcpClientTestUPnP7 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP7::CTcpClientTestUPnP7 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP7::~CTcpClientTestUPnP7 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP7::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP7::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			TPtrC8 data(KData1);
+			
+			iSSP->SetOption(KCHOptionLevel, KCHAbsoluteUri, _L8 ("http://127.0.0.1"));
+			
+			TCHMessageOption option ( 1, data.Length() );
+			TPckg < TCHMessageOption > optionBuf ( option );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf);
+			
+			RMBufChain bodyBuf;
+			bodyBuf.CreateL(KData1);
+			iSSPData->Write(bodyBuf, 0, NULL);
+			
+			//////Panic in this case--Defect
+			/*
+			RMBufChain bodyBuf1;
+			bodyBuf1.CreateL(KNullDesC8());
+			iSSPData->Write(bodyBuf1, 0, NULL);
+			*/
+
+			delete iTestServer;
+			
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP7::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP7::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP7::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+
+void CTcpClientTestUPnP7::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		
+		
+		iFlow = mcfnode_cast<CSubConnectionFlowBase>(
+		reinterpret_cast<Messages::ANode*>(	iClientId.Ptr()));
+		
+		
+		// Perform the binding to the flow below
+		iFlowBinder = iFlow->GetBinderControlL();
+		iSSP = iFlowBinder->GetControlL(KSockStream, *this);
+		iSSPData = iFlowBinder->BindL(*this);
+		
+		
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP7::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP7::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP7::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP7::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP7::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp8.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,267 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpClientTestUPnP8.h"
+#include "upnpserverconstants.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 2;
+_LIT8 ( KTxtRawRequest, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nSoapAction: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n" );
+_LIT8 ( KTxtRawRequest1, "M-POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nMAN: \r\n01-SOAPACTION: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 405 Method Not Allowed\r\nContent-Length: 0\r\n\r\n" );
+_LIT8 ( KData1, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>" );
+_LIT8 ( KTxtRawResponse2, "HTTP/1.1 200 OK\r\nContent-Length: 330\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>\r\n\r\n" );
+
+CTcpClientTestUPnP8* CTcpClientTestUPnP8::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP8* ret = new ( ELeave ) CTcpClientTestUPnP8 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP8::CTcpClientTestUPnP8 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP8::~CTcpClientTestUPnP8 ()
+	{	
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP8::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP8::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			TPtrC8 data(KData1);
+			
+			iSSP->SetOption(KCHOptionLevel, KCHAbsoluteUri, _L8 ("http://127.0.0.1"));
+			
+			TCHMessageOption option ( 1, data.Length() );
+			TPckg < TCHMessageOption > optionBuf ( option );
+			
+			iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf);
+			
+			RMBufChain bodyBuf;
+			bodyBuf.CreateL(KData1);
+			iSSPData->Write(bodyBuf, 0, NULL);
+			/*
+			RMBufChain bodyBuf1;
+			bodyBuf1.CreateL(KData1);
+			iSSPData->Write(bodyBuf1, 0, NULL);
+			*/
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;			
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP8::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP8::GetTestCase ()
+	{
+	return this;
+	}
+
+CTestExecuteLogger& CTcpClientTestUPnP8::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+	
+void CTcpClientTestUPnP8::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		
+		
+		iFlow = mcfnode_cast<CSubConnectionFlowBase>(
+		reinterpret_cast<Messages::ANode*>(	iClientId.Ptr()));
+		
+		
+		// Perform the binding to the flow below
+		iFlowBinder = iFlow->GetBinderControlL();
+		iSSP = iFlowBinder->GetControlL(KSockStream, *this);
+		iSSPData = iFlowBinder->BindL(*this);
+		
+		
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{
+		
+		CompleteSelf(EPass);
+		}
+	else if ( aMessage.IsMessage<TEBase::TError > () )
+		{
+		iLogger.WriteFormat(_L("<i>TEBase::TError..... </i>"));
+		CompleteSelf(EFail);
+		}
+
+	}
+	
+const TDesC& CTcpClientTestUPnP8::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "CTcpClientTestUPnP8" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP8::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP8::GetRawRequest ( TInt aTransIndex )
+	{
+	//__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	if(aTransIndex == 0)
+		return KTxtRawRequest ();
+	else if(aTransIndex == 1)
+		return KTxtRawRequest1 ();
+	else
+		return KNullDesC8 ();
+		
+	}
+	
+const TDesC8& CTcpClientTestUPnP8::GetRawResponse ( TInt aTransIndex )
+	{
+	//__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	if(aTransIndex == 0)
+		return KTxtRawResponse1 ();
+	else if(aTransIndex == 1)
+		return KTxtRawResponse2 ();
+	else
+		return KNullDesC8 ();
+	}
+
+TInt CTcpClientTestUPnP8::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+void CTcpClientTestUPnP8::NewData(TUint aCount)
+	{
+	RMBufChain data;
+	RBuf8 resData;
+	
+	iLogger.WriteFormat(_L("<i>NewData..... </i>"));
+	iSSP->GetOption(1,KCHMaxLength,resData);
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHMaxLength,resData);
+	TInt len = *(TUint*) resData.Ptr();
+	resData.Close();
+	
+	iSSPData->GetData(data,len,0);
+	resData.Create( len );
+	data.CopyOut(resData);
+	resData.Close();
+	resData.Create( aCount );
+	iSSP->GetOption(KCHOptionLevel,KCHLastMessage,resData);
+	TBool isLastMsg = *(TUint*) resData.Ptr();
+	resData.Close();
+	data.Init();
+	
+	if(isLastMsg)
+		{
+		iLogger.WriteFormat(_L("<i>NewData.LastMsg.... </i>"));
+		CompleteSelf ( KErrNone );
+		}
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctcpclienttestupnp9.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,614 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+
+#include <http/framework/cheadercodecplugin.h>
+#include <upnp/tupnptable.h>
+
+#include "CTcpClientTestUPnP9.h"
+#include "upnpserverconstants.h"
+
+//const TUint16 KActivityNull = 0;
+//const TUint KHttpDefaultPort = 80;
+
+
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "POST / HTTP/1.1\r\nHost: 127.0.0.1:80\r\nExpect: 100-Continue\r\nContent-Length: 330\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>" );
+_LIT8 ( KTxtRawResponse, "HTTP/1.1 200 OK\r\nContent-Length: 330\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>\r\n\r\n" );
+_LIT8 ( KBodyData, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>" );
+
+CTcpClientTestUPnP9* CTcpClientTestUPnP9::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP9* ret = new ( ELeave ) CTcpClientTestUPnP9 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP9::CTcpClientTestUPnP9 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP9::~CTcpClientTestUPnP9 ()
+	{	
+	iTimer.Close ();
+	delete iCodec;
+	iStringPool.Close();
+	delete iClientHandler;
+	delete iTransaction;
+	}
+
+void CTcpClientTestUPnP9::ConstructL()
+	{	
+	iTimer.CreateLocal ();
+	iStringPool.OpenL( TUPnPTable::Table() );
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL ( KUPnPCodecName, iStringPool );			
+	}
+
+TVerdict CTcpClientTestUPnP9::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			
+			
+			TInetAddr	remoteAddress( KInetAddrLoop, 80 );
+			iClientHandler = CHTTPClientHandler::NewL ( *this, iChunkManager, &remoteAddress );
+			iTransaction = PrepareTransactionL ();
+			iClientHandler->SubmitTransaction( iTransaction );
+					
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			
+			// cleanup tcp client flow
+			//delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+	
+CHTTPClientTransaction* CTcpClientTestUPnP9::PrepareTransactionL ()
+	{	
+	TNodeCtxId channelId ( MeshMachine::KActivityNull, TNodeId::NullId() );
+
+	CHTTPClientTransaction* ctrans = CHTTPClientTransaction::NewL ( *iCodec, iStringPool, channelId );
+	
+	CRequest* crequest = ctrans->Request( );
+	RHTTPHeaders headers = crequest->Handle( ).GetHeaderCollection ( );
+	RRequest rrequest = crequest->Handle( );
+
+	// Set request method
+	RStringF stringF = iStringPool.StringF ( HTTP::EPOST, THTTPTable::Table() );
+	rrequest.SetMethod ( stringF );
+
+	// Set request Uri	
+	TUriParser8 uriPath;
+	uriPath.Parse ( _L8 ("/") );
+	rrequest.SetURIL ( uriPath );	
+	
+	RStringF hostValStr = iStringPool.OpenFStringL( _L8("127.0.0.1:80"));
+	THTTPHdrVal hostVal ( hostValStr );
+	headers.SetFieldL ( iStringPool.StringF ( HTTP::EHost, THTTPTable::Table() ), hostVal );
+	hostValStr.Close ();
+	
+	//Set Content Length
+	THTTPHdrVal hdrVal ( 330 );
+	headers.SetFieldL ( iStringPool.StringF ( HTTP::EContentLength, THTTPTable::Table() ), hdrVal );
+
+	stringF = iStringPool.StringF ( HTTP::E100Continue, THTTPTable::Table() );
+	
+	// 100-continue    
+	THTTPHdrVal hdrStr ( stringF );
+	headers.SetFieldL ( iStringPool.StringF ( HTTP::EExpect, THTTPTable::Table() ), hdrStr );
+	
+	// Set Body Data	
+	RMBufChain buf;
+	buf.CreateL( KBodyData);	
+	ctrans->AddBodyPart( buf );
+	ctrans->SetComplete ();
+
+	stringF.Close ();
+	return ctrans;	
+	}
+	
+	
+void CTcpClientTestUPnP9::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP9::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP9::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+	
+const TDesC& CTcpClientTestUPnP9::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP9::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP9::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP9::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse ();
+	}
+
+TInt CTcpClientTestUPnP9::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+TInt CTcpClientTestUPnP9::OnHttpEvent ( CTransaction* /*aTransaction*/, THTTPEvent& /*aEvent*/ )
+	{
+	return KErrNone;
+	}
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+_LIT8 ( KTxtRawRequest1, "GET / HTTP/1.1\r\nHost: 127.0.0.1:80\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" );
+
+CTcpClientTestUPnP16* CTcpClientTestUPnP16::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP16* ret = new ( ELeave ) CTcpClientTestUPnP16 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP16::CTcpClientTestUPnP16 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP16::~CTcpClientTestUPnP16 ()
+	{	
+	iTimer.Close ();
+	delete iCodec;
+	iStringPool.Close();
+	delete iTransaction;
+	delete iTestServer;
+	delete iClientHandler;
+	}
+
+void CTcpClientTestUPnP16::ConstructL()
+	{		
+	iTimer.CreateLocal ();
+	iStringPool.OpenL( TUPnPTable::Table() );
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL ( KUPnPCodecName, iStringPool );	
+	}
+
+TVerdict CTcpClientTestUPnP16::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+					
+			
+			TInetAddr	remoteAddress( KInetAddrLoop, 80 );
+			iClientHandler = CHTTPClientHandler::NewL ( *this, iChunkManager, &remoteAddress );
+			iClientHandler->SetConnectionInfo ( remoteAddress );
+			iTransaction = PrepareTransactionL ();
+			iClientHandler->SubmitTransaction( iTransaction );
+								
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iClientHandler->SubmitTransaction( iTransaction );
+			iClientHandler->CancelTransaction( iTransaction );
+			
+			delete iClientHandler;
+			
+			TInetAddr	remoteAddress( KInetAddrLoop, 80 );
+			iClientHandler = CHTTPClientHandler::NewL ( *this, iChunkManager, &remoteAddress );			
+			iTransaction->SetComposingStarted ( EFalse );
+			iClientHandler->SubmitTransaction( iTransaction );
+			iClientHandler->CancelTransaction( iTransaction );
+			
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			
+			iState  = EComplete;			
+			Reschedule();
+			
+			return EPass;
+			}
+
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+	
+CHTTPClientTransaction* CTcpClientTestUPnP16::PrepareTransactionL ()
+	{	
+	TNodeCtxId channelId ( MeshMachine::KActivityNull, TNodeId::NullId() );
+
+	CHTTPClientTransaction* ctrans = CHTTPClientTransaction::NewL ( *iCodec, iStringPool, channelId );
+	
+	CRequest* crequest = ctrans->Request( );
+	RHTTPHeaders headers = crequest->Handle( ).GetHeaderCollection ( );
+	RRequest rrequest = crequest->Handle( );
+
+	// Set request method
+	RStringF stringF = iStringPool.StringF ( HTTP::EGET, THTTPTable::Table() );
+	rrequest.SetMethod ( stringF );
+
+	// Set request Uri	
+	TUriParser8 uriPath;
+	uriPath.Parse ( _L8 ("/") );
+	rrequest.SetURIL ( uriPath );	
+	
+	RStringF hostValStr = iStringPool.OpenFStringL( _L8("127.0.0.1:80"));
+	THTTPHdrVal hostVal ( hostValStr );
+	headers.SetFieldL ( iStringPool.StringF ( HTTP::EHost, THTTPTable::Table() ), hostVal );
+	hostValStr.Close ();
+	
+	ctrans->SetComplete ();
+
+	stringF.Close ();
+	return ctrans;	
+	}
+	
+	
+void CTcpClientTestUPnP16::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP16::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP16::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+	
+const TDesC& CTcpClientTestUPnP16::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP16::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP16::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest1 ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP16::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP16::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+TInt CTcpClientTestUPnP16::OnHttpEvent ( CTransaction* /*aTransaction*/, THTTPEvent& aEvent )
+	{
+	if ( aEvent.iStatus == THTTPEvent::EResponseComplete )		
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aEvent.iStatus < 0 )
+		{
+		CompleteSelf ( aEvent.iStatus );
+		}
+	return KErrNone;
+	}
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+_LIT8 ( KBodyData1, "12345678901234567890" );
+
+CTcpClientTestUPnP17* CTcpClientTestUPnP17::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP17* ret = new ( ELeave ) CTcpClientTestUPnP17 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP17::CTcpClientTestUPnP17 ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP17::~CTcpClientTestUPnP17 ()
+	{	
+	iTimer.Close ();
+	delete iCodec;
+	iStringPool.Close();
+	delete iTransaction;
+	delete iTestServer;
+	delete iClientHandler;
+	}
+
+void CTcpClientTestUPnP17::ConstructL()
+	{		
+	iTimer.CreateLocal ();
+	iStringPool.OpenL( TUPnPTable::Table() );
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL ( KUPnPCodecName, iStringPool );	
+	}
+
+TVerdict CTcpClientTestUPnP17::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+					
+			
+			TInetAddr	remoteAddress( KInetAddrLoop, 80 );
+			iClientHandler = CHTTPClientHandler::NewL ( *this, iChunkManager, &remoteAddress );
+			iClientHandler->SetConnectionInfo ( remoteAddress );
+			iTransaction = PrepareTransactionL ();
+			iClientHandler->SubmitTransaction( iTransaction );
+								
+			iState  = EComplete;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case EComplete:
+			{
+			iLogger.WriteFormat(_L("<i>TestCase: Complete..... </i>"));
+			return EPass;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+	
+CHTTPClientTransaction* CTcpClientTestUPnP17::PrepareTransactionL ()
+	{	
+	TNodeCtxId channelId ( MeshMachine::KActivityNull, TNodeId::NullId() );
+
+	CHTTPClientTransaction* ctrans = CHTTPClientTransaction::NewL ( *iCodec, iStringPool, channelId );
+	
+	CRequest* crequest = ctrans->Request( );
+	RHTTPHeaders headers = crequest->Handle( ).GetHeaderCollection ( );
+	RRequest rrequest = crequest->Handle( );
+
+	// Set request method
+	RStringF stringF = iStringPool.StringF ( HTTP::EGET, THTTPTable::Table() );
+	rrequest.SetMethod ( stringF );
+
+	// Set request Uri	
+	TUriParser8 uriPath;
+	uriPath.Parse ( _L8 ("/") );
+	rrequest.SetURIL ( uriPath );	
+	
+	RStringF hostValStr = iStringPool.OpenFStringL( _L8("127.0.0.1:80"));
+	THTTPHdrVal hostVal ( hostValStr );
+	headers.SetFieldL ( iStringPool.StringF ( HTTP::EHost, THTTPTable::Table() ), hostVal );
+	hostValStr.Close ();
+
+	//Set Content Length
+	THTTPHdrVal hdrVal ( 10 );
+	headers.SetFieldL ( iStringPool.StringF ( HTTP::EContentLength, THTTPTable::Table() ), hdrVal );
+
+	stringF = iStringPool.StringF ( HTTP::E100Continue, THTTPTable::Table() );
+
+	// Set Body Data	
+	RMBufChain buf;
+	buf.CreateL( KBodyData1);	
+	ctrans->AddBodyPart( buf );
+	ctrans->SetComplete ();
+		
+	stringF.Close ();
+	return ctrans;	
+	}
+	
+	
+void CTcpClientTestUPnP17::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP17::GetTestCase ()
+	{
+	return this;
+	}
+	
+CTestExecuteLogger& CTcpClientTestUPnP17::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+	
+const TDesC& CTcpClientTestUPnP17::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "CTcpClientTestUPnP17" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP17::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP17::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest1 ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP17::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+
+TInt CTcpClientTestUPnP17::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+TInt CTcpClientTestUPnP17::OnHttpEvent ( CTransaction* /*aTransaction*/, THTTPEvent& aEvent )
+	{
+	if ( aEvent.iStatus == THTTPEvent::EResponseComplete )		
+		{
+		CompleteSelf ( KErrNone );		
+		}
+	else if ( aEvent.iStatus < 0 )
+		{
+		CompleteSelf ( aEvent.iStatus );
+		}
+	return KErrNone;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ctestserversockethandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,263 @@
+/*
+* 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:
+*
+*/
+
+
+#include "ctestserversockethandler.h"
+#include "mtcpclienttestcase.h"
+
+_LIT8(KTxtConnectionClose, "Connection: Close");
+_LIT8(KTxtPost, "POST");
+_LIT8(KTxtMPost, "M-POST");
+_LIT8(KTxt100Continue, "Expect: 100-Continue");
+
+CTestServerSocketHandler* CTestServerSocketHandler::NewL ( MTcpClientTestCase* aTestCase, RInternalSocket& aIncomingConnection, CTestExecuteLogger&	aLogger )
+	{
+	CTestServerSocketHandler* self = new ( ELeave ) CTestServerSocketHandler ( aTestCase, aIncomingConnection, aLogger );
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop ( self );
+	return self;
+	}
+
+CTestServerSocketHandler::CTestServerSocketHandler ( MTcpClientTestCase* aTestCase, RInternalSocket& aIncomingConnection, CTestExecuteLogger& aLogger )
+	: CTimer ( EPriorityNormal ), iIncomingConnection ( aIncomingConnection ), iSocketHandler ( *this ), iTestCase ( aTestCase ), iLogger(aLogger)
+	{
+	CActiveScheduler::Add ( this );
+	iTransCount = iTestCase->TransactionCount ();
+	iSocketHandler.Attach(iIncomingConnection);
+	}
+
+CTestServerSocketHandler::~CTestServerSocketHandler ()
+	{
+	Cancel ();
+	iSocketHandler.CancelAll ();
+	iIncomingConnection.Close ();
+	delete iDataStore;
+	delete iDataToSend;
+	}
+
+void CTestServerSocketHandler::ConstructL ()
+	{
+	CTimer::ConstructL ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTestServerSocketHandler::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 aBuffer;
+	aBuffer.CreateMax ( aData.Length () );
+	aData.CopyOut ( aBuffer );
+	aData.Free ();
+	TPtrC8 ptr(aBuffer);
+	iLogger.WriteFormat(_L("<i> RecvComplete:Received data from client </i>"));
+
+	if ( iDataStore == NULL )
+		iDataStore = aBuffer.Alloc(); // First data chunk received
+	else
+		{
+		// Already got data before so append the data to the existing data
+		TInt newLength = ( iDataStore->Length () ) + aBuffer.Length ();
+		iDataStore = iDataStore->ReAlloc ( newLength );
+		TPtr8 buf = iDataStore->Des ();
+		buf.Append ( aBuffer );
+		}		
+	
+	_LIT ( KTxtTitle, "Defect Fix INC036954" );
+	if ( iTestCase->TestCaseName ().Match ( KTxtTitle ) == 0 )
+		{
+		// iInputStream->ShutdownReq ();
+		iSocketHandler.CancelAll ();
+		iIncomingConnection.Close ();
+		}
+	else
+		{
+		// Try processing the requests
+		TRAP_IGNORE(SendDataL ());
+		}
+	
+	if ( !iCloseConnection )
+		iSocketHandler.Recv ();
+	}
+	
+void CTestServerSocketHandler::SendDataL ()
+	{
+	Cancel ();
+	
+	_LIT ( KTcTitle, "CRecvTimeOut" );
+	if ( iTestCase->TestCaseName ().Match ( KTcTitle ) == 0 )
+		{
+		After ( 61000000 );
+		return;
+		}
+
+	// Try processing the requests
+	if ( ProcessRequestL () )
+		{
+		iLogger.WriteFormat(_L("<i>SendDataL:Sent data to client..... </i>"));
+		iSendChain.CreateL ( *iDataToSend );
+		iSocketHandler.Send ( iSendChain );
+		}
+	else if ( iSend100Continue )
+		{
+		TPtrC8 rawResponse ( _L8 ("HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 Ok\r\n\r\n") );
+
+		iDataToSend = rawResponse.Alloc();
+		
+		iLogger.WriteFormat(_L("<i>SendDataL:Sent data to client..... </i>"));
+		iSendChain.CreateL ( *iDataToSend );
+		iSocketHandler.Send ( iSendChain );
+		iSend100Continue = EFalse;
+		}
+	}
+	
+TBool CTestServerSocketHandler::ProcessRequestL ()
+	{
+	TBool processingRequest = ETrue;
+	_LIT ( KTcTitle, "CTcpClientTestUPnP8" );	//For Resubmit
+	_LIT ( KTcTitle1, "CTcpClientTestMWrites" );	//For multiple chunks
+	
+	iLogger.WriteFormat(_L("<i>ProcessRequestL..... </i>"));
+	while ( processingRequest &&  iCurrentTrans < iTransCount )
+		{
+		// Do we have enough data to respond to the current transaction?
+		TPtrC8 rawRequest = iTestCase->GetRawRequest ( iCurrentTrans );
+		TInt requestLength = rawRequest.Length ();
+		TPtrC8 dataWindow = iDataStore->Mid ( iDataPos );
+		
+		if(iPost && ((iTestCase->TestCaseName ().Match ( KTcTitle1 ) == 0 ) || (iTestCase->TestCaseName ().Match ( KTcTitle ) == 0 )))
+			{
+			if(iDataStore->Length() < (requestLength + 330)) //Hard coded length for this case.
+				break;
+			}
+		
+		if ( requestLength <= dataWindow.Length () )
+			{
+			// Check that the raw request and the actual request match
+			if (!iPost && dataWindow.FindF ( rawRequest ) != 0 )
+				{
+				User::Leave ( KErrNotFound );
+				}
+
+			// Prepare the response data to send
+			iDataPos += requestLength;
+			
+			processingRequest = ETrue;
+			
+			if((dataWindow.FindF(KTxtPost)!= KErrNotFound) || (dataWindow.FindF(KTxtMPost)!= KErrNotFound))
+				{
+				iPost = ETrue;
+				return EFalse;
+				}
+			else
+				iPost = EFalse;
+			
+
+			TPtrC8 rawResponse = iTestCase->GetRawResponse ( iCurrentTrans );
+			
+			if ( iDataToSend == NULL )
+				{
+				iDataToSend = rawResponse.AllocL ();
+				}
+			else
+				{
+				TInt responseLength = rawResponse.Length ();
+				iDataToSend = iDataToSend->ReAllocL ( (iDataToSend->Length () ) + responseLength );
+				TPtr8 buffer = iDataToSend->Des ();
+				buffer.Append ( rawResponse );
+				}
+			
+			++iCurrentTrans;
+			// Check for a Connection: Close in the request
+			iCloseConnection = IsConnectionCloseInData ( rawRequest, rawResponse );
+			if ( iCloseConnection )
+				processingRequest = EFalse;
+			
+			iSend100Continue = Is100ContinueInRequestData ( rawRequest );
+			}
+		else
+			{
+			// No more requests can be processed
+			processingRequest = EFalse;
+			}
+		
+		if(iTestCase->TestCaseName ().Match ( KTcTitle ) == 0 )
+			break;
+		}
+
+	if ( iDataToSend != NULL )
+		return ETrue;
+
+	return EFalse;
+	}
+
+TBool CTestServerSocketHandler::IsConnectionCloseInData ( const TDesC8& aRequest, const TDesC8& aResponse ) const
+	{
+	
+	if ( ( aRequest.FindF ( KTxtConnectionClose () ) != KErrNotFound ) || ( aResponse.FindF ( KTxtConnectionClose () ) != KErrNotFound ) )
+		{
+		return ETrue;
+		}
+	return EFalse;
+	}
+
+TBool CTestServerSocketHandler::Is100ContinueInRequestData ( const TDesC8& aRequest ) const
+	{	
+	if ( aRequest.FindF ( KTxt100Continue () ) != KErrNotFound )
+		{
+		return ETrue;
+		}
+	return EFalse;
+	}
+
+void CTestServerSocketHandler::SendComplete ( TInt /* aLength */ )
+	{
+
+	iSendChain.Init ();
+	delete iDataToSend;
+	iDataToSend = NULL;
+	
+	//Exclusively For M-Post Case.
+	delete iDataStore;
+	iDataStore = NULL;
+	iDataPos = 0;
+	
+	// Do we need to close the connection
+	if ( iCloseConnection )
+		{
+		iSocketHandler.CancelAll ();
+		iIncomingConnection.Close ();
+		}			
+	}
+	
+void CTestServerSocketHandler::RunL ()
+	{
+	_LIT ( KTcTitle, "CRecvTimeOut" );
+	if ( iTestCase->TestCaseName ().Match ( KTcTitle ) == 0 )
+		{
+		return;
+		}
+
+	if( iStatus.Int () == KErrNone )
+		{
+		// The connection has timed out.
+		iSocketHandler.CancelAll ();
+		iIncomingConnection.Close ();
+		}
+	}
+	
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/protocolfamily.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,158 @@
+/*
+* 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:
+*
+*/
+
+
+#include <es_prot.h>
+#include <e32test.h>
+#include "es_ptest.h"
+#include <comms-infras/nifif.h>
+#include <es_mbuf.h>
+#include "ss_std.h"
+#include <ss_pman.h>
+#include <ss_glob.h>
+#include <es_mbman.h>
+#include <e32math.h>
+#include <dns_qry.h>
+#include <agenterrors.h>
+#include <e32property.h>
+
+#include "proxyprotocol.h"
+#include "protocolfamily.h"
+
+extern "C"
+	{
+	IMPORT_C CProtocolFamilyBase* InstallProxy(void);	// Force export 
+
+	EXPORT_C CProtocolFamilyBase * InstallProxy(void)
+	//
+	// Create a new protocol family
+	//
+		{
+		CTestIntSocketProtocolFamily* protocolFamiliy = NULL;
+		TRAP_IGNORE(protocolFamiliy = CTestIntSocketProtocolFamily::NewL());
+		return protocolFamiliy;
+		}
+	}
+
+CTestIntSocketProtocolFamily* CTestIntSocketProtocolFamily::NewL()
+//
+//
+//
+	{
+	CTestIntSocketProtocolFamily* pf=new(ELeave) CTestIntSocketProtocolFamily();
+	CleanupStack::PushL(pf);
+	pf->ConstructL();
+	CleanupStack::Pop();
+	return pf;
+	}
+
+void CTestIntSocketProtocolFamily::ConstructL()
+//
+//
+//
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+
+	}
+
+CTestIntSocketProtocolFamily::CTestIntSocketProtocolFamily() : CProtocolFamilyBase()
+	{
+	iProtocolDescs[0].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[0].iSockType=KSockDatagram; // not important whether datagram or stream for proxy
+	iProtocolDescs[0].iProtocol=KProxy;
+	iProtocolDescs[0].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[0].iByteOrder=EBigEndian;
+	iProtocolDescs[0].iServiceInfo=kDDatagramServiceInfo|KSIPeekData;
+	iProtocolDescs[0].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[0].iMessageSize=0x300;
+	iProtocolDescs[0].iName=KProxyName;
+	iProtocolDescs[0].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[0].iNamingServices=KNSNameResolution|KNSServiceResolution|KNSInfoDatabase;
+	iProtocolDescs[0].iNumSockets=100;
+/*
+	iProtocolDescs[1].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[1].iSockType=KSockDatagram;
+	iProtocolDescs[1].iProtocol=KTargetDatagram;
+	iProtocolDescs[1].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[1].iByteOrder=EBigEndian;
+	iProtocolDescs[1].iServiceInfo=kDDatagramServiceInfo|KSIPeekData;
+	iProtocolDescs[1].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[1].iMessageSize=0x300;
+	iProtocolDescs[1].iName=KTargetDatagramName;
+	iProtocolDescs[1].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[1].iNamingServices=KNSNameResolution|KNSServiceResolution|KNSInfoDatabase;
+	iProtocolDescs[1].iNumSockets=100;
+
+	iProtocolDescs[2].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[2].iSockType=KSockStream;
+	iProtocolDescs[2].iProtocol=KTargetStream;
+	iProtocolDescs[2].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[2].iByteOrder=EBigEndian;
+	iProtocolDescs[2].iServiceInfo=KDStreamServiceInfo;
+	iProtocolDescs[2].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[2].iMessageSize=KSocketMessageSizeIsStream;
+	iProtocolDescs[2].iName=KTargetStreamName;
+	iProtocolDescs[2].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[2].iNamingServices=0;
+	iProtocolDescs[2].iNumSockets=100;
+*/
+	__DECLARE_NAME(_S("CTestIntSocketProtocolFamily"));
+	}
+
+#pragma warning( disable : 4100 )
+
+TInt CTestIntSocketProtocolFamily::Install()
+	{
+	// Force a fail on Memory tests
+	char* ptr=new char;
+	if (!ptr)
+		return KErrNoMemory;
+	delete ptr;
+//	TAppProtIntfMessage::RegisterL ();
+	return KErrNone;
+	}
+
+TInt CTestIntSocketProtocolFamily::Remove()
+	{
+	//TAppProtIntfMessage::DeRegister	();
+	return KErrNone;
+	}
+
+TUint CTestIntSocketProtocolFamily::ProtocolList(TServerProtocolDesc *& aProtocolDescPointer)
+	{
+
+  	aProtocolDescPointer=new TServerProtocolDesc[KPTestIntSocketNumProtocols];
+  	if (!aProtocolDescPointer)
+  		return 0;
+
+	Mem::Copy(aProtocolDescPointer, iProtocolDescs, sizeof(TServerProtocolDesc)*KPTestIntSocketNumProtocols);
+
+	TRAP_IGNORE(Nif::CheckInstalledMBufManagerL();)
+
+	return KPTestIntSocketNumProtocols;
+	};
+
+CProtocolBase * CTestIntSocketProtocolFamily::NewProtocolL(TUint /* aSockType */,TUint aProtocol)
+	{
+
+	CProtocolBase* p=CProxyProtocol::NewL(aProtocol, &iProtocolDescs[aProtocol-1]);	
+	return p;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/proxyprotocol.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,311 @@
+/*
+* 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:
+*
+*/
+
+
+#include "es_ptest.h"
+#include "proxyprotocol.h"
+
+#include "ptcpclienttests.h"
+
+//---------------------------------------------------------------------------------------------------------
+
+void Panic(TDPanic aPanic)
+//
+// Panic the Protocol
+//
+	{
+
+	User::Panic(_L("TestInternalSocket Prot"),aPanic);
+	}
+
+	
+CProxyProtocol::CProxyProtocol(TServerProtocolDesc* aProtoDesc)
+//
+//
+//
+	:CProtocolBase(),iProtoDesc(aProtoDesc),iProtocols(0x16)
+	{
+	__DECLARE_NAME(_S("CProxyProtocol"));
+	iStarted=EFalse;
+	}
+
+CServProviderBase * CProxyProtocol::NewSAPL(TUint /*aProtocol*/)
+	{
+	return CProxyProvd::NewL(*this);
+	}
+
+
+CProxyProtocol::~CProxyProtocol()
+	{
+	for (TInt i=0;i<iProtocols.Count();i++)
+		{
+		iProtocols[i]->Close();
+		}
+	}
+
+CProxyProtocol *CProxyProtocol::NewL(TInt aType, TServerProtocolDesc* aProtoDesc)
+	{
+
+	CProxyProtocol* prot=0;
+	switch (aType)
+		{
+	case KProxy:
+		prot=new (ELeave) CProxyProtocol(aProtoDesc);
+		break;
+
+	default:
+		prot=(CProxyProtocol*)0xABCD; // keep lint happy
+		Panic(EBadProtocol);
+		}
+	prot->iType=aType;
+	return prot;
+	}
+
+void CProxyProtocol::InitL(TDesC& /*aTag*/)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	}
+
+void CProxyProtocol::BindL(CProtocolBase* /*aProtocol*/, TUint /*anId*/)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	}
+
+void CProxyProtocol::BindToL(CProtocolBase* aProtocol)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	iProtocols.AppendL(aProtocol);
+	aProtocol->Open();
+	}
+
+
+void CProxyProtocol::StartL(void)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	iStarted=ETrue;
+	}
+
+TInt CProxyProtocol::Send(RMBufChain &,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return 1;
+	}
+
+TInt CProxyProtocol::Send(TDes8 &, TSockAddr* /*to*/,TSockAddr* /*from*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return 1;
+	}
+
+void CProxyProtocol::Process(RMBufChain &,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+
+void CProxyProtocol::Process(TDes8 & ,TSockAddr* /*from*/,TSockAddr* /*to*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+
+void CProxyProtocol::Identify(TServerProtocolDesc *aDesc) const
+	{
+	Mem::Copy(aDesc, iProtoDesc, sizeof(TServerProtocolDesc));
+	}
+
+TInt CProxyProtocol::GetOption(TUint level,TUint,TDes8&,CProtocolBase* /*aSourceProtocol*/)
+	{
+	
+	if(level==KNifOptLevel)
+		{
+		return KErrNotSupported;
+		}
+	return KErrNone;
+	}
+
+TInt CProxyProtocol::SetOption(TUint /*level*/,TUint /*name*/,const TDesC8& /*option*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return KErrNone;
+	}
+
+void CProxyProtocol::Error(TInt /*anerror*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+//----------------------------------------------------------------------------------------------
+CProxyProvd *CProxyProvd::NewL(CProxyProtocol &aProtocol)
+	{
+	CProxyProvd *sp=new(ELeave) CProxyProvd(aProtocol);
+//	CleanupStack::PushL(sp);
+//	sp->ConstructL();
+//	CleanupStack::Pop(sp);
+	return sp;
+	}
+
+CProxyProvd::CProxyProvd(CProxyProtocol &aProtocol)
+	{
+	__DECLARE_NAME(_S("CTestIntSocketProvd"));
+	iIsBound=EFalse;
+	iProtocol=&aProtocol;
+	iCompleteIoctl = FALSE;
+	}
+
+
+void CProxyProvd::LocalName(TSockAddr& anAddr) const
+	{
+	anAddr=iAddr;
+	}
+
+TInt CProxyProvd::SetLocalName(TSockAddr& anAddr)
+	{
+	iAddr=anAddr;
+	iIsBound=ETrue;
+	return KErrNone;
+	}
+
+void CProxyProvd::RemName(TSockAddr& /*anAddr*/)const
+	{
+	}
+
+TInt CProxyProvd::SetRemName(TSockAddr& /*anAddr*/)
+	{
+
+//	test.Printf(_L("CTestIntSocketProvd::SetRemName Port %x, Addr %lx\n"),addr.Port(),addr.Address());
+	return KErrNone;
+	}
+
+void CProxyProvd::Shutdown(TCloseType anOption)
+	{
+	if (iCompleteIoctl)
+		{
+		iSocket->IoctlComplete(NULL);
+		}
+	if (anOption==ENormal)
+		iSocket->CanClose();
+	}
+
+void CProxyProvd::Start()
+//
+//
+//
+	{
+	}
+
+void CProxyProvd::Shutdown(TCloseType /*anOption*/,const TDesC8 &/*aDisconnectData*/)
+	{
+	Panic(EBadCall);
+	}
+
+void CProxyProvd::AutoBind( void )
+	{
+//	test.Printf(_L("CTestIntSocketProvd::AutoBind\n"));
+	iIsBound=ETrue;
+	}
+	
+
+void CProxyProvd::Ioctl(TUint /*level*/,TUint name,TDes8* aOption)
+	{
+	/* Mallik...if you want to see connection creation, just ping www.google.com in command prompt,
+	 change ip & uncomment 
+	RInternalSocket intSock;
+	intSock.Open(KAfInet, KSockStream, KProtocolInetTcp);	
+	const TUint32 ip = INET_ADDR(209,85,153,104);
+	TInetAddr addr(80);
+	addr.SetAddress(ip);
+	
+	TRequestStatus status;
+	intSock.Connect(addr, status);
+	User::WaitForRequest(status);	
+	*/
+	
+	switch (name)
+		{
+		case KProxyProtocolTestRequest:
+			{
+			const TProxyProtocolRequest* request = reinterpret_cast<const TProxyProtocolRequest*>(aOption->Ptr());
+			TRAPD(r,CTcpClientTestBase::StartTestL(request->name,this));
+			if (r == KErrNone)
+				{
+				break;
+				}
+			}
+		default:
+			iSocket->Error(KErrNotSupported,MSocketNotify::EErrorIoctl);
+		}
+	}
+	
+void CProxyProvd::TestComplete(TProxyProtocolTestResult aResult)
+/**
+Called by the state machine (CInternalSocketTester) when a test completes (or fails early). Completes the ioctl to pass the result back to the client side test code.
+@param aResult	The result of the test (EPass or EFail)
+*/
+	{
+	TProxyProtocolRequest resultStruct;
+	resultStruct.result = aResult;
+	TPckg<TProxyProtocolRequest> resultPckg(resultStruct);
+	iSocket->IoctlComplete(&resultPckg);
+	}
+	
+void CProxyProvd::CancelIoctl(TUint /*aLevel*/,TUint /*aName*/)
+	{}
+	
+TInt CProxyProvd::Write(RMBufChain& /*aData*/, TUint /*options*/, TSockAddr* /*anAddr*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TUint CProxyProvd::Write(const TDesC8& /*aDesc*/, TUint /*options*/, TSockAddr* /*anAddr*/)
+	{
+	return (TUint)KErrNotSupported; //The return should really be a TInt possibly need to change the interface	
+	}
+	
+TInt CProxyProvd::GetData(RMBufChain& /*aData*/, TUint /*aLength*/, TUint /*options*/,TSockAddr* /*anAddr*/)
+	{
+	return KErrNotSupported;
+	}
+
+void CProxyProvd::GetData(TDes8& /*aDesc*/,TUint /*options*/,TSockAddr* /*anAddr*/)
+	{}
+
+void CProxyProvd::ActiveOpen(void)
+	{}
+	
+void CProxyProvd::ActiveOpen(const TDesC8 &/*aConnectionData*/)
+	{}
+
+TInt CProxyProvd::PassiveOpen(TUint /*aQue*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::PassiveOpen(TUint /*aQue*/,const TDesC8& /*aConnectionData*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::GetOption(TUint /*level*/,TUint /*name*/,TDes8& /*anOption*/ )const
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::SetOption(TUint /*level*/,TUint /*name*/,const TDesC8& /*anOption*/)
+	{
+	return KErrNotSupported;
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/ptcpclienttests.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,449 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include <httpstringconstants.h>
+
+#include "ptcpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpclientflow.h"
+#include "upnpflowfactory.h"
+
+#include "ctcpclienttestupnp1.h"
+#include "ctcpclienttestupnp2.h"
+#include "ctcpclienttestupnp3.h"
+#include "ctcpclienttestupnp4.h"
+#include "ctcpclienttestupnp5.h"
+#include "ctcpclienttestupnp6.h"
+#include "ctcpclienttestupnp7.h"
+#include "ctcpclienttestupnp8.h"
+#include "ctcpclienttestupnp9.h"
+#include "ctcpclienttestupnp10.h"
+#include "ctcpclienttestupnp11.h"
+#include "ctcpclienttestupnp12.h"
+#include "ctcpclienttestupnp13.h"
+#include "ctcpclienttestupnp14.h"
+
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//Add Blocks of 64
+static const TInt KBlockSize1 = 64;
+static const TInt KMinGrowth1 = 30;
+static const TInt KThresholdGrowth1 = 30;
+static const TInt KInitialAllocation1 = 128;
+
+static const TInt KHeapSize	= 1024 * 1024;	//1MB
+
+using namespace Messages;
+
+
+//-------------------------------------------------------------------------------------------------
+//	CTcpClientTestBase
+//-------------------------------------------------------------------------------------------------	
+
+#define BEGIN_TESTLIST
+
+#define ADD_TEST(name) \
+	if (aTestName == _L(#name))\
+		{\
+		return CTcpClient ## name::NewL(aProvd);\
+		}
+	
+#define END_TESTLIST \
+	User::Leave(KErrNotSupported);\
+	return NULL;	
+	
+CTcpClientTestBase* CTcpClientTestBase::CreateTestL(const TDesC& aTestName, CProxyProvd* aProvd)
+	{
+	BEGIN_TESTLIST
+		ADD_TEST(TestUPnP)
+		ADD_TEST(TestUPnP1)
+		ADD_TEST(TestUPnP2)
+		ADD_TEST(TestUPnP3)
+		ADD_TEST(TestUPnP4)
+		ADD_TEST(TestUPnP5)
+		ADD_TEST(TestUPnP6)
+		ADD_TEST(TestUPnP7)
+		ADD_TEST(TestUPnP8)
+		ADD_TEST(TestUPnP9)
+		ADD_TEST(TestUPnP10)
+		ADD_TEST(TestUPnP11)
+		ADD_TEST(TestUPnP12)
+		ADD_TEST(TestUPnP13)
+		ADD_TEST(TestUPnP14)
+		ADD_TEST(TestUPnP15)
+		ADD_TEST(TestUPnP16)
+		ADD_TEST(TestUPnP17)
+	END_TESTLIST
+	}
+
+
+void CTcpClientTestBase::StartTestL(const TDesC& aTestName, CProxyProvd* aProvd)
+	{
+	CTcpClientTestBase* test = CreateTestL(aTestName,aProvd);
+	CleanupStack::PushL(test);
+	test->CTcpClientTestBase::ConstructL();
+	CActiveScheduler::Add(test);
+	CleanupStack::Pop(test);
+	TRequestStatus* stat = &test->iStatus;
+	test->SetActive();
+	User::RequestComplete(stat,KErrNone);
+	}
+
+CTcpClientTestBase::CTcpClientTestBase(CProxyProvd* aProvd) :
+	CActive(EPriorityNormal), iState ( ECreateTestServer ),
+	iProvd(aProvd)
+	{}
+	
+void CTcpClientTestBase::ConstructL()
+	{
+	//Create the Chunk Manager
+	CChunkManager* chkmgr = CChunkManager::NewL ( KHeapSize );
+	if ( chkmgr )
+		{
+		chkmgr->AddPoolL ( KBlockSize1, KInitialAllocation1, KMinGrowth1, KThresholdGrowth1 );
+		}
+	
+	iChunkManager = chkmgr;
+	iAllocator.SetChunkManager(iChunkManager);
+
+	SetLoggerL();
+	}
+	
+CTcpClientTestBase::~CTcpClientTestBase()
+	{
+	Cancel();
+	iLogger.Close();
+	delete iChunkManager;
+	}
+
+/**	Override this function if you want cleanup to happen before the completion of
+	the test case. This function is called before the test is completed 
+ */
+void CTcpClientTestBase::Cleanup()
+	{}
+
+/** Sets the test case as active again and prevents the object from being destroyed
+	when the RunL completes.
+	
+	Note: The active object is not complete the request again automatically, if this behaviour is
+	desired the user must call User::RequestComplete
+ */
+void CTcpClientTestBase::Reschedule()
+	{
+	SetActive();
+	iReschedule = TRUE;
+	}
+	
+void CTcpClientTestBase::CompleteSelf ( TInt aError )
+	{
+	TRequestStatus* pStat = &iStatus;
+    User::RequestComplete ( pStat, aError );
+	}	
+
+/** Attaches the iLogger variable to the TestExecute Log Server. This enable this prt to write to
+	the testexecute logs as if it were running directly from TestExecute
+ */
+// 	SetLoggerL() is taken directly from CTestServer::StartLoggerL() in the TEF src TestServerBase.Cpp
+
+
+void CTcpClientTestBase::SetLoggerL()
+	{
+    	// Create a cinidata object for parsing the testexecute.ini
+	CTestExecuteIniData* parseTestExecuteIni = NULL;
+	TBuf<KMaxTestExecuteNameLength> resultFilePath;
+	TBuf<KMaxTestExecuteNameLength> xmlFilePath;
+	TInt logMode;
+	TInt logLevel;
+	
+	TRAPD(err,parseTestExecuteIni = CTestExecuteIniData::NewL());
+	if (err == KErrNone)
+		{
+		CleanupStack::PushL(parseTestExecuteIni);
+		parseTestExecuteIni->ExtractValuesFromIni();
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFHtmlKey, resultFilePath);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFXmlKey, xmlFilePath);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFLogMode, logMode);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFLogSeverityKey, logLevel);
+		}
+	else
+		{
+		resultFilePath.Copy(KTestExecuteLogPath);
+		xmlFilePath.Copy(KTestExecuteLogPath);
+		logMode = TLoggerOptions(ELogHTMLOnly);
+		logLevel = RFileFlogger::TLogSeverity(ESevrAll);
+		}
+	Logger().SetLoggerOptions(logMode);
+		
+	// Initialise a handle to the file logger
+	User::LeaveIfError(Logger().Connect());
+	RFs fS;
+	User::LeaveIfError(fS.Connect());
+	CleanupClosePushL(fS);
+	RFile file;
+	TBuf<KMaxTestExecuteNameLength> xmlLogFile(xmlFilePath);
+	TBuf<KMaxTestExecuteNameLength> logFile;
+	TBuf<KMaxTestExecuteNameLength> logFileNameFile(resultFilePath);
+	logFileNameFile.Append(KTestExecuteScheduleTestLogCompatibilityNameFile);
+	if(file.Open(fS,logFileNameFile,EFileRead | EFileShareAny) != KErrNone)
+		{
+		// For the old flogger we have to create an individual file
+		_LIT(KTxtLog,"TEIntSock.txt");
+		logFile.Copy(KTxtLog);
+		logMode = TLoggerOptions(0);
+		Logger().SetLoggerOptions(logMode);
+		}
+	else
+		{
+		CleanupClosePushL(file);
+		TBuf8<KMaxTestExecuteNameLength> logFile8;
+		TInt fileSize;
+		User::LeaveIfError(file.Size(fileSize));
+		User::LeaveIfError(file.Read(logFile8,fileSize));
+		logFile.Copy(logFile8);
+		xmlLogFile.Append(logFile);
+		_LIT(KXmlExtension,".xml");
+		xmlLogFile.Append(KXmlExtension);
+		_LIT(KHtmExtension,".htm");
+		logFile.Append(KHtmExtension);
+		CleanupStack::Pop(&file);
+		file.Close();
+		}
+	TBuf<KMaxTestExecuteLogFilePath> logFilePath(resultFilePath);
+	logFilePath.Append(logFile);
+	CleanupStack::Pop(&fS);
+	fS.Close();
+	
+	if (logMode == 0 || logMode == 2)
+		{
+		User::LeaveIfError(Logger().HtmlLogger().CreateLog(logFilePath,	RTestExecuteLogServ::ELogModeAppend));
+		}
+	if (logMode == 1 || logMode == 2)
+		{
+		User::LeaveIfError(Logger().XmlLogger().CreateLog(xmlLogFile,RFileFlogger::ELogModeAppend));
+		Logger().XmlLogger().SetLogLevel(RFileFlogger::TLogSeverity(logLevel));
+		}
+	if (parseTestExecuteIni != NULL)
+		{
+		CleanupStack::PopAndDestroy(parseTestExecuteIni);
+		}
+	}
+	
+
+	
+/** Called by the active scheduler in order to run the test 
+ */
+void CTcpClientTestBase::RunL()
+	{
+	iReschedule = EFalse;
+	TVerdict res = RunTestL();
+	if (!iReschedule)
+		{
+		Cleanup();
+		FinishTest(res);
+		delete this;
+		return;
+		}
+	}
+	
+void CTcpClientTestBase::FinishTest(TVerdict aResult)
+	{
+	iProvd->TestComplete(aResult);
+	}
+	
+void CTcpClientTestBase::DoCancel()
+	{
+	Cleanup();
+	}
+	
+//------------------------------------------------------------//	
+/////////////////// CTcpClientTestUPnP /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+const TUint KTransactionCount = 1;
+_LIT8 ( KTxtRawRequest, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 0\r\n\r\n" );
+_LIT8 ( KTxtRawResponse1, "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" );
+
+
+CTcpClientTestUPnP* CTcpClientTestUPnP::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpClientTestUPnP* ret = new ( ELeave ) CTcpClientTestUPnP ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpClientTestUPnP::CTcpClientTestUPnP ( CProxyProvd* aProvd ) :
+	CTcpClientTestBase(aProvd), iTestServer(NULL)
+	{
+	}
+
+CTcpClientTestUPnP::~CTcpClientTestUPnP ()
+	{
+	iTimer.Close ();
+	}
+
+void CTcpClientTestUPnP::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CTcpClientTestUPnP::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestTcpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpClientFlowQuery flowQuery ( TAppProtAddr ( KInetAddrLoop, KHttpDefaultPort ), Id (), EHttpClientFlow, THttpClientFlowQuery::ECreateNew, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk bodyBuf;
+			RMemChunk uriBuf;
+			uriBuf.CreateL ( _L8 ("http://127.0.0.1:9999"), iAllocator );
+			TUpnpMessage::TUPnPClientRequestInfo msg ( HTTP::EGET, uriBuf, bodyBuf, NULL );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:
+			{
+			delete iTestServer;
+			// cleanup tcp client flow
+			delete reinterpret_cast<CHttpClientFlow*> ( iClientId.Ptr () );
+			iTimer.After ( iStatus, 60000000 ); //10 secs
+			iState = EComplete;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EComplete:
+			{
+			return EPass;
+			}
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CTcpClientTestUPnP::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+
+MTcpClientTestCase* CTcpClientTestUPnP::GetTestCase ()
+	{
+	return this;
+	}
+
+CTestExecuteLogger& CTcpClientTestUPnP::GetLogger ( )
+	{
+	return iLogger;
+	}
+
+	
+void CTcpClientTestUPnP::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TResponse > () )
+		{		
+		CompleteSelf ( EPass );
+		}
+	}
+	
+const TDesC& CTcpClientTestUPnP::TestCaseName () const
+	{
+	_LIT ( KTxtTitle, "Defect Fix CINC077703More" );
+	return KTxtTitle ();
+	}
+	
+TInt CTcpClientTestUPnP::TotalTransactionCount () const
+	{
+	return KTransactionCount;
+	}
+
+const TDesC8& CTcpClientTestUPnP::GetRawRequest ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS ( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawRequest ();
+	}
+	
+const TDesC8& CTcpClientTestUPnP::GetRawResponse ( TInt aTransIndex )
+	{
+	__ASSERT_ALWAYS( aTransIndex < KTransactionCount, User::Invariant () );
+	return KTxtRawResponse1 ();
+	}
+TInt CTcpClientTestUPnP::TransactionCount () const
+	{ 
+	return KTransactionCount; 
+	}
+
+
+
+
+
+
+
+
+
+	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/src/testtcpserver.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+
+#include "testtcpserver.h"
+#include "ctestserversockethandler.h"
+#include "ptcpclienttests.h"
+#include "upnp_cf_msgs.h"
+
+const TUint KListenQSize = 5;
+const TUint KListenPort = 80;
+
+CTestTcpServer* CTestTcpServer::NewL ( MTestServerObserver& aObserver )
+	{
+	CTestTcpServer* self = new ( ELeave ) CTestTcpServer ( aObserver );
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop ();
+	return self;		
+	}
+
+CTestTcpServer::CTestTcpServer ( MTestServerObserver& aObserver ) 
+	: iObserver ( aObserver ), iSocketHandler ( *this )
+	{	
+	}
+	
+void CTestTcpServer::ConstructL ()
+	{
+	User::LeaveIfError ( OpenSocket () );	
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	}
+
+CTestTcpServer::~CTestTcpServer ()
+	{
+	iIncomingHandlers.ResetAndDestroy ();
+	iSocketHandler.CancelAll ();
+	iSocket.Close ();
+	delete iSocketOpener;
+		
+	TUpnpMessage::DeRegister ();
+	}
+	
+TInt CTestTcpServer::OpenSocket ()
+	{
+	TInt err = KErrNone;
+	if ( NULL == iSocketOpener )
+		{
+		TRAP ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );
+		}
+	
+	if ( err == KErrNone )
+		iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+	
+	return err;
+	}
+	
+void CTestTcpServer::DoAccept ()
+	{
+	iSocketHandler.Accept();		
+	}
+
+TInt CTestTcpServer::Startup ()
+	{
+	// Start listening and accepting for new connections
+	TInt err = iSocket.Listen ( KListenQSize ); 
+	if ( err == KErrNone )
+		DoAccept ();
+	return err;		
+	}
+
+void CTestTcpServer::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iSocket = aSocket;
+	iSocketHandler.Attach ( iSocket );
+	
+	TInetAddr addr ( KListenPort );
+	addr.SetAddress ( KInetAddrAny );
+	TInt err = iSocket.Bind ( addr );
+
+	if ( err == KErrNone )
+		{
+		err = Startup ();
+		}
+		
+	TRAP_IGNORE(iObserver.OnTestServerEventL ( err ));
+	}	
+	
+void CTestTcpServer::AcceptComplete ( RInternalSocket& aSocket )
+	{
+
+
+	//iTestCase = reinterpret_cast<MTcpClientTestCase*> ( &iObserver );
+	iTestCase = iObserver.GetTestCase();
+	CTestServerSocketHandler* newSrvSockHandler = NULL;
+	TRAP_IGNORE(newSrvSockHandler = CTestServerSocketHandler::NewL ( iTestCase, aSocket, iObserver.GetLogger()));
+    iIncomingHandlers.Append ( newSrvSockHandler );
+
+    DoAccept ();
+	}
+	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/bwins/tcpserveru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	InstallProxy @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/eabi/tcpserveru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	InstallProxy @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,33 @@
+/*
+* 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:
+*
+*/
+
+
+/**
+@file
+*/
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+../group/tcpserver.iby	/epoc32/rom/include/tcpserver.iby
+
+PRJ_TESTMMPFILES
+
+./tcpserver.mmp support
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/group/tcpserver.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+/*
+* 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 __TCPSERVER_IBY__
+#define __TCPSERVER_IBY__
+
+file=ABI_DIR\DEBUG_DIR\tcpserver.prt 			                  System\Libs\tcpserver.prt
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/group/tcpserver.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,77 @@
+/*
+* 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:
+*
+*/
+
+TARGET			tcpserver.prt
+TARGETTYPE		DLL
+UID      0x10003d38
+VENDORID 0x70000001
+
+DEFFILE		tcpserver.def
+
+
+SOURCEPATH		../src
+SOURCE			protocolfamily.cpp
+SOURCE			proxyprotocol.cpp
+SOURCE			ptcpservertests.cpp ctcpservertestupnp1.cpp ctcpservertestupnp2.cpp ctcpservertestupnp3.cpp ctcpservertestupnp4.cpp ctcpservertestupnp5.cpp ctcpservertestupnp6.cpp ctcpservertestupnp7.cpp ctcpservertestupnp8.cpp ctcpservertestupnp9.cpp ctcpservertestupnp10.cpp ctcpservertestupnp11.cpp ctcpservertestupnp12.cpp ctcpservertestupnp13.cpp ctcpservertestupnp14.cpp ctcpservertestupnp15.cpp ctcpservertestupnp16.cpp ctcpservertestupnp17.cpp ctcpservertestupnp18.cpp ctcpservertestupnp19.cpp ctcpservertestupnp20.cpp ctcpservertestupnp21.cpp ctcpservertestupnp22.cpp ctcpservertestcase.cpp ctcpservertestupnp23.cpp ctcpservertestupnp24.cpp ctcpservertestupnp25.cpp ctcpservertestupnp26.cpp ctcpservertestupnp27.cpp ctcpservertestupnp28.cpp ctcpservertestupnp29.cpp ctcpservertestupnp30.cpp ctcpservertestupnp31.cpp ctcpservertestupnp32.cpp ctcpservertestupnp33.cpp ctcpservertestupnp34.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE   	../../udpclient/inc
+USERINCLUDE		../../../server/flow/inc
+USERINCLUDE		../../../upnputils/inc
+USERINCLUDE		../../../upnpmessage/inc
+USERINCLUDE		../../../upnpplugin/inc
+
+SOURCEPATH		../../../server/flow/src
+SOURCE			cupnptimer.cpp
+
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/comms-infras
+SYSTEMINCLUDE   /epoc32/include/test
+
+LIBRARY		euser.lib     
+LIBRARY		esock.lib
+LIBRARY		esocksvr.lib
+LIBRARY		mbufmgr.lib
+LIBRARY		testexecutelogclient.lib
+LIBRARY		efsrv.lib
+LIBRARY		cinidata.lib
+LIBRARY     nifman.lib
+LIBRARY		commsfw.lib
+LIBRARY		testexecuteutils.lib
+LIBRARY		rfileloggerclient.lib
+LIBRARY     netmeta.lib		// for the ABIv2
+LIBRARY		insock.lib 
+LIBRARY		sockethandler.lib
+LIBRARY 	upnputils.lib
+LIBRARY		nodemessages.lib
+LIBRARY 	netinterfaces.lib
+LIBRARY 	factories.lib
+LIBRARY 	chunkmgr.lib
+
+START WINS
+BASEADDRESS		0x59000000
+END
+
+CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+UNPAGED
+
+SOURCEPATH ..\src
+SOURCE ctcpservertestupnp41.cpp
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/atestsocket.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,60 @@
+/*
+* 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 ATESTSOCKET_H_
+#define ATESTSOCKET_H_
+
+NONSHARABLE_CLASS(ATestSocket):public MSessionControlNotify, 
+								public MSessionDataNotify
+	{
+	protected:
+		//MSessionDataNotify
+		virtual void NewData(TUint /*aCount*/)
+		{};
+		virtual void CanSend()
+		{};
+		//MSessionControlNotify
+		virtual void ConnectComplete()
+		{};
+		virtual void ConnectComplete(const TDesC8& /*aConnectData*/)
+		{};
+		virtual void ConnectComplete(CSubConnectionFlowBase& /*aSSP*/)
+		{};
+		virtual void ConnectComplete(CSubConnectionFlowBase& /*aSSP*/,const TDesC8& /*aConnectData*/)
+		{};
+		virtual void CanClose(MSessionControlNotify::TDelete /*aDelete=MSessionControlNotify::EDelete*/)
+		{};
+		virtual void CanClose(const TDesC8& /*aDisconnectData*/,MSessionControlNotify::TDelete /*aDelete=MSessionControlNotify::EDelete*/)
+		{};
+		virtual TInt Error(TInt /*anError*/,TUint /*anOperationMask=MSessionControlNotify::EErrorAllOperations*/)
+		{return KErrNone;};
+		virtual void Disconnect(void)
+		{};
+		virtual void Disconnect(TDesC8& /*aDisconnectData*/)
+		{};
+		virtual void IoctlComplete(TDesC8* /*aBuf*/)
+		{};
+		virtual void DisconnectFromListener(CSubConnectionFlowBase& /*aSSP*/)
+		{};
+		 
+		
+	};
+
+
+
+#endif /*ATESTSOCKET_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestcase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,91 @@
+/*
+* 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 CTCPSERVERTESTCASE_H_
+#define CTCPSERVERTESTCASE_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestCase /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+const TUint16 KActivityNull = 0;
+
+NONSHARABLE_CLASS(CTcpServerTestCase) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	//static CTcpServerTestCase* NewL ( CProxyProvd* aProvd );
+	virtual ~CTcpServerTestCase ();
+	
+	virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	virtual void OpenComplete ( RInternalSocket& aSocket );
+	virtual void ConnectComplete ();
+	virtual void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	virtual void SendComplete ( TInt aLength );	
+	virtual void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	virtual void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	virtual void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	virtual void IoctlComplete ()
+	{	}
+	virtual void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+protected:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,		
+		EStartTimer,
+		ETimerStopped,
+		};
+		
+	CTcpServerTestCase ( CProxyProvd* aProvd );
+	void ConstructL (const TDesC8& aDes);
+	virtual TVerdict RunTestL ();
+	
+	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+
+#endif /*CTCPSERVERTESTCASE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp1.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,89 @@
+/*
+* 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 CTCPSERVERTESTUPNP1_H_
+#define CTCPSERVERTESTUPNP1_H_
+
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP1 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP1) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP1* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP1 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP1 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP1_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp10.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 CTCPSERVERTESTUPNP10_H_
+#define CTCPSERVERTESTUPNP10_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP10 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP10) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP10* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP10 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP10 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP10_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp11.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 CTCPSERVERTESTUPNP11_H_
+#define CTCPSERVERTESTUPNP11_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP11 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP11) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP11* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP11 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP11 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP11_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp12.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 CTCPSERVERTESTUPNP12_H_
+#define CTCPSERVERTESTUPNP12_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP12 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP12) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP12* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP12 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP12 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP12_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp13.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 CTCPSERVERTESTUPNP13_H_
+#define CTCPSERVERTESTUPNP13_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP13 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP13) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP13* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP13 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP13 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP13_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp14.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP14_H_
+#define CTCPSERVERTESTUPNP14_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP14 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP14) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP14* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP14 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP14 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP14_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp15.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP15_H_
+#define CTCPSERVERTESTUPNP15_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP15 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP15) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP15* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP15 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP15 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP15_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp16.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 CTCPSERVERTESTUPNP16_H_
+#define CTCPSERVERTESTUPNP16_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP16 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP16) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP16* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP16 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP16 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP16_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp17.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP17_H_
+#define CTCPSERVERTESTUPNP17_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP17 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP17) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP17* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP17 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP17 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP17_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp18.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,89 @@
+/*
+* 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 CTCPSERVERTESTUPNP18_H_
+#define CTCPSERVERTESTUPNP18_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP18 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP18) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP18* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP18 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP18 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+
+#endif /*CTCPSERVERTESTUPNP18_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp19.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP19_H_
+#define CTCPSERVERTESTUPNP19_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP19 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP19) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP19* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP19 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP19 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP19_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp2.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP2_H_
+#define CTCPSERVERTESTUPNP2_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP2 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP2) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP2* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP2 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP2 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+
+#endif /*CTCPSERVERTESTUPNP2_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp20.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP20_H_
+#define CTCPSERVERTESTUPNP20_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP20 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP20) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP20* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP20 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP20 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP20_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp21.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP21_H_
+#define CTCPSERVERTESTUPNP21_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP21 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP21) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP21* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP21 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP21 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP21_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp22.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,86 @@
+/*
+* 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 CTCPSERVERTESTUPNP22_H_
+#define CTCPSERVERTESTUPNP22_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP22 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP22) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP22* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP22 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP22 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+#endif /*CTCPSERVERTESTUPNP22_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp23.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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 CTCPSERVERTESTUPNP23_H_
+#define CTCPSERVERTESTUPNP23_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP23 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP23) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP23* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP23 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	void ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage );
+	CTcpServerTestUPnP23 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP23_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp24.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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 CTCPSERVERTESTUPNP24_H_
+#define CTCPSERVERTESTUPNP24_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP24 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP24) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP24* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP24 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	void ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage );
+	CTcpServerTestUPnP24 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP24_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp25.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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 CTCPSERVERTESTUPNP25_H_
+#define CTCPSERVERTESTUPNP25_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP25 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP25) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP25* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP25 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	void ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage );
+	CTcpServerTestUPnP25 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP25_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp26.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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 CTCPSERVERTESTUPNP26_H_
+#define CTCPSERVERTESTUPNP26_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP26 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP26) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP26* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP26 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	void ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage );
+	CTcpServerTestUPnP26 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP26_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp27.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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 CTCPSERVERTESTUPNP27_H_
+#define CTCPSERVERTESTUPNP27_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP27 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP27) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP27* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP27 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	CTcpServerTestUPnP27 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+
+#endif /*CTCPSERVERTESTUPNP27_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp28.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 CTCPSERVERTESTUPNP28_H_
+#define CTCPSERVERTESTUPNP28_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP28 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP28) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP28* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP28 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	CTcpServerTestUPnP28 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP28_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp29.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 CTCPSERVERTESTUPNP29_H_
+#define CTCPSERVERTESTUPNP29_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP29 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP29) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP29* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP29 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	CTcpServerTestUPnP29 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP29_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp3.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 CTCPSERVERTESTUPNP3_H_
+#define CTCPSERVERTESTUPNP3_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP3 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP3) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP3* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP3 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP3 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP3_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp30.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,101 @@
+/*
+* 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 CTCPSERVERTESTUPNP30_H_
+#define CTCPSERVERTESTUPNP30_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP30 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP30) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP30* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP30 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	CTcpServerTestUPnP30 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP38) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP38* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP38 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	void SendComplete ( TInt /*aLength*/ );
+	
+private:
+		
+	CTcpServerTestUPnP38 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+	TBool				iSentOnce;
+	
+	};
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP39) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP39* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP39 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	void ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage );
+private:
+		
+	CTcpServerTestUPnP39 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP40) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP40* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP40 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	void ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage );
+private:
+		
+	CTcpServerTestUPnP40 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+
+#endif /*CTCPSERVERTESTUPNP30_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp31.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 CTCPSERVERTESTUPNP31_H_
+#define CTCPSERVERTESTUPNP31_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP31 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP31) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP31* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP31 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	CTcpServerTestUPnP31 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP31_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp32.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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 CTCPSERVERTESTUPNP32_H_
+#define CTCPSERVERTESTUPNP32_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP32 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP32) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP32* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP32 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	CTcpServerTestUPnP32 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+
+#endif /*CTCPSERVERTESTUPNP32_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp33.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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 CTCPSERVERTESTUPNP33_H_
+#define CTCPSERVERTESTUPNP33_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP33 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP33) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP33* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP33 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	CTcpServerTestUPnP33 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+
+#endif /*CTCPSERVERTESTUPNP33_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp34.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,109 @@
+/*
+* 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 CTCPSERVERTESTUPNP34_H_
+#define CTCPSERVERTESTUPNP34_H_
+
+#include "cupnptimer.h"
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP34 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP34) : public CTcpServerTestCase
+																			
+	{
+public:
+	static CTcpServerTestUPnP34* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP34 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	
+private:
+		
+	CTcpServerTestUPnP34 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+// ServerHandler recv timer testcases
+NONSHARABLE_CLASS(CTcpServerTestUPnP35) : public CTcpServerTestCase																			
+	{
+public:
+	static CTcpServerTestUPnP35* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP35 ();
+
+	void SendComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& aData );
+	
+	
+private:
+		
+	CTcpServerTestUPnP35 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP36) : public CTcpServerTestCase																			
+	{
+public:
+	static CTcpServerTestUPnP36* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP36 ();
+
+	void RecvComplete ( RMBufChain& aData );	
+	
+private:		
+	CTcpServerTestUPnP36 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+
+	};
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP37) : public CTcpServerTestCase,
+											public MUPnPTimerObserver																		
+	{
+public:
+	static CTcpServerTestUPnP37* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP37 ();
+
+	void RecvComplete ( RMBufChain& aData );	
+	void SendResponseToServerFlow ();
+		
+private:		
+	CTcpServerTestUPnP37 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+	virtual void TimeOut ();
+	
+	void ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage );
+	
+	RBuf8 iResponseBuf;
+	CTransaction* iTransaction; // not owned, dont delete
+	CUPnPTimer* iUPnPTimer;
+	};
+
+
+
+
+
+#endif /*CTCPSERVERTESTUPNP34_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp4.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP4_H_
+#define CTCPSERVERTESTUPNP4_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP4 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP4) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP4* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP4 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP4 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP4_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp41.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,82 @@
+/*
+* 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 CTCPSERVERTESTUPNP41_H_
+#define CTCPSERVERTESTUPNP41_H_
+
+#include "atestsocket.h"
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP41) : public CTcpServerTestCase,
+										  public ATestSocket
+																			
+	{
+public:
+	static CTcpServerTestUPnP41* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP41 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	void NewData(TUint aCount);
+	void SendComplete ( TInt /*aLength*/ );
+	void ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage );
+private:
+		
+	CTcpServerTestUPnP41 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+	CSubConnectionFlowBase* 	iFlow;
+	MSessionData* 				iSSPData;
+	MFlowBinderControl* 		iFlowBinder;
+	MSessionControl* 			iSSP;
+	TBool						iSentHeaders;
+	TBool						iIsWriteDone;
+	TUint						iResponseLength;
+	};
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP42) : public CTcpServerTestCase,
+										  public ATestSocket
+																			
+	{
+public:
+	static CTcpServerTestUPnP42* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP42 ();
+
+	void RecvComplete ( RMBufChain& aData );
+	void NewData(TUint aCount);
+	void SendComplete ( TInt /*aLength*/ );
+	void ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage );
+private:
+		
+	CTcpServerTestUPnP42 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+	CSubConnectionFlowBase* 	iFlow;
+	MSessionData* 				iSSPData;
+	MFlowBinderControl* 		iFlowBinder;
+	MSessionControl* 			iSSP;
+	TBool						iSentHeaders;
+	TBool						iIsWriteDone;
+	TUint						iResponseLength;
+	};
+
+
+
+
+#endif /*CTCPSERVERTESTUPNP41_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp5.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 CTCPSERVERTESTUPNP5_H_
+#define CTCPSERVERTESTUPNP5_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP5 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP5) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP5* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP5 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP5 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP5_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp6.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP6_H_
+#define CTCPSERVERTESTUPNP6_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP6 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP6) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP6* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP6 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP6 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP6_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp7.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 CTCPSERVERTESTUPNP7_H_
+#define CTCPSERVERTESTUPNP7_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP7 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP7) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP7* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP7 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP7 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP7_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp8.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP8_H_
+#define CTCPSERVERTESTUPNP8_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP8 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP8) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP8* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP8 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP8 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP8_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ctcpservertestupnp9.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 CTCPSERVERTESTUPNP9_H_
+#define CTCPSERVERTESTUPNP9_H_
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP9 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP9) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP9* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP9 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP9 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+#endif /*CTCPSERVERTESTUPNP9_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/protocolfamily.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(__PROTOCOLFAMILY_H__)
+#define __PROTOCOLFAMILY_H__
+
+#include "es_ptest.h"
+#include <es_prot.h>
+#include <comms-infras/nifif.h>
+#include <dns_qry.h>
+
+//---------------------------------------------------------------------------------------------------------
+
+NONSHARABLE_CLASS(CTestIntSocketProtocolFamily): public CProtocolFamilyBase
+	{
+private:
+	CTestIntSocketProtocolFamily();	
+public:
+	static CTestIntSocketProtocolFamily * NewL();
+	void ConstructL();
+	TInt Install();
+	TInt Remove();
+	CProtocolBase * NewProtocolL(TUint aSockType,TUint aProtocol);
+	TUint ProtocolList(TServerProtocolDesc *& aProtocolList);
+private:
+	void Construct();
+private:
+	TServerProtocolDesc iProtocolDescs[1];
+	};
+
+#endif //__PROTOCOLFAMILY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/proxyprotocol.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(__PROXYPROTOCOL_H)
+#define __PROXYPROTOCOL_H
+
+#include "es_ptest.h"
+#include <es_prot.h>
+#include <comms-infras/nifif.h>
+#include <dns_qry.h>
+
+enum TDPanic
+	{
+	EBadProtocol = 1000,
+	EBadCall = 1001,
+	ENotBound = 1002,
+	ENotStarted = 1003,
+	EInterfaceNotDeleted = 1004,
+	EIdAndNoHolder = 1005,
+	EIfAndHolder = 1006,
+	ETestPanic = 1007
+	};
+	
+void Panic(TDPanic aPanic);
+
+
+NONSHARABLE_CLASS(CProxyProtocol): public CProtocolBase
+	{
+public:
+
+	~CProxyProtocol();
+	
+	static CProxyProtocol *NewL(TInt aProtocol, TServerProtocolDesc* aProtoDesc);
+	CServProviderBase *NewSAPL(TUint aProtocol);
+	TBool CanCreateSockets();
+	void InitL(TDesC& aTag);
+	void BindL(CProtocolBase *aProtocol, TUint anId);
+	virtual void BindToL(CProtocolBase *protocol);
+	void StartL(void);
+	TInt Send(RMBufChain &,CProtocolBase* aSourceProtocol);
+	void Process(RMBufChain &,CProtocolBase* aSourceProtocol);
+	TInt Send(TDes8 &, TSockAddr *to,TSockAddr *from,CProtocolBase* aSourceProtocol);
+	void Process(TDes8 & ,TSockAddr *from,TSockAddr *to,CProtocolBase* aSourceProtocol);
+	void Identify(TServerProtocolDesc *)const;
+	TInt GetOption(TUint level,TUint name,TDes8 &anOption,CProtocolBase* aSourceProtocol);
+	TInt SetOption(TUint level,TUint name,const TDesC8& option,CProtocolBase* aSourceProtocol);
+	void Error(TInt anError,CProtocolBase* aSourceProtocol);
+	TBool IsStarted(){return iStarted;}
+private:
+	CProxyProtocol(TServerProtocolDesc* aProtoDesc);
+	
+private:
+	TInt iType;
+	TServerProtocolDesc* iProtoDesc;
+	TBool iStarted;
+	CArrayFixFlat<CProtocolBase *> iProtocols;
+	};
+
+NONSHARABLE_CLASS(CProxyProvd) : public CServProviderBase
+	{
+public:
+	static CProxyProvd *NewL(CProxyProtocol &aProtocol);
+	virtual void Ioctl(TUint level,TUint name,TDes8 *anOption);
+	void TestComplete(TProxyProtocolTestResult result);
+	
+	void LocalName(TSockAddr &anAddr)const;
+	virtual TInt SetLocalName(TSockAddr &anAddr);
+	virtual void RemName(TSockAddr &anAddr)const;
+	virtual TInt SetRemName(TSockAddr &anAddr);
+	virtual TInt GetOption(TUint level,TUint name,TDes8 &anOption)const;
+	virtual TInt SetOption(TUint level,TUint name,const TDesC8 &anOption);
+	
+	virtual void CancelIoctl(TUint aLevel,TUint aName);
+	virtual TInt Write(RMBufChain& aData, TUint options, TSockAddr* anAddr=NULL);
+	virtual TUint Write(const TDesC8& aDesc, TUint options, TSockAddr* anAddr);
+	virtual TInt GetData(RMBufChain& aData, TUint aLength, TUint options,TSockAddr* anAddr=NULL);
+	virtual void GetData(TDes8& aDesc,TUint options,TSockAddr* anAddr=NULL);
+	virtual void ActiveOpen(void);
+	virtual void ActiveOpen(const TDesC8 &aConnectionData);
+	virtual TInt PassiveOpen(TUint aQue);
+	virtual TInt PassiveOpen(TUint aQue,const TDesC8 &aConnectionData);
+	virtual void AutoBind( void );
+	virtual void Shutdown(TCloseType option);
+	virtual void Shutdown(TCloseType option,const TDesC8 &aDisconnectData);
+	virtual void Start();
+
+private:
+	CProxyProvd(CProxyProtocol &aProtocol);
+	
+private:
+	TBool iIsBound;
+	CProxyProtocol *iProtocol;
+	TSockAddr iAddr;
+	TBool iInputStopped;
+	TInt iListenErrorCode;
+	TBool iCancelIoctl; // Set when an IOCTL has been cancelled.
+	
+	TBool iBlockOnClose; //Used by and test Ioctl to cause the socket to hang on close
+	TBool iCompleteIoctl;
+	};
+
+#endif //__PROXYPROTOCOL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/inc/ptcpservertests.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,136 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(PTCPSERVERTESTS_H)
+#define PTCPSERVERTESTS_H
+
+#include <e32base.h>
+#include <testexecutestepbase.h>
+#include "proxyprotocol.h"
+#include <comms-infras/eintsock.h>
+#include "es_mbuf.h"
+#include <elements/nm_node.h>
+
+#include <rsockethandler.h>
+#include <csocketopener.h>
+#include <cchunkmanager.h>
+#include <rmemchunk.h>
+
+NONSHARABLE_CLASS(CTcpServerTestBase) : public CActive
+	{
+public:
+	static void StartTestL(const TDesC& aTestName, CProxyProvd* aProvd);
+	virtual void RunL();
+
+protected:		
+	CTcpServerTestBase(CProxyProvd* aProvd);
+	virtual ~CTcpServerTestBase();
+	
+	//Utilities function to be use in RunTest()
+	void Reschedule();
+	CTestExecuteLogger iLogger;
+	void CompleteSelf ( TInt aError );
+	void FinishTest(TVerdict result);
+	
+	CChunkManager*  iChunkManager;						
+private:
+	//Implemented you own of these		
+	virtual TVerdict RunTestL() = 0;
+	virtual void Cleanup();
+	
+	void DoCancel();
+	void ConstructL();
+	void SetLoggerL();
+	CTestExecuteLogger& Logger();	
+	static CTcpServerTestBase* CreateTestL(const TDesC& aTestName, CProxyProvd* aProvd);
+		
+private:
+	CProxyProvd* iProvd;
+	TBool iReschedule; //Determines whether rescheduling is required
+	};
+	
+inline CTestExecuteLogger& CTcpServerTestBase::Logger()
+	{
+	return iLogger;
+	}
+
+//----------------------------------------------------------//
+/////////////////// CTcpServerTestUPnP /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+
+NONSHARABLE_CLASS(CTcpServerTestUPnP) : public CTcpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CTcpServerTestUPnP* NewL ( CProxyProvd* aProvd );
+	~CTcpServerTestUPnP ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket );
+	void ConnectComplete ();
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt aLength );	
+	void SendToComplete ( TInt /*aLength*/ )
+	{	}
+	void RecvComplete ( RMBufChain& aData );
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocketAndConnect,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,		
+		ECleanup,
+		};
+		
+	CTcpServerTestUPnP ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iTcpServer;
+	RBuf8				iServiceUri;
+	
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	
+	RMBufChain			iSendChain;
+	TInetAddr			iHostAddr;
+	TVerdict			iResponse;
+	
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+#endif //PTCPSERVERTESTS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestcase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,218 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestCase.h"
+
+using namespace Messages;
+
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestCase /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+/*
+CTcpServerTestCase* CTcpServerTestCase::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestCase* ret = new ( ELeave ) CTcpServerTestCase ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+*/
+
+CTcpServerTestCase::CTcpServerTestCase ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestCase::~CTcpServerTestCase ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestCase::ConstructL (const TDesC8& aDes)
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( aDes );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestCase::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			
+			iLogger.WriteFormat(_L("<i>Start Server..... </i>"));
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iLogger.WriteFormat(_L("<i>MakeSocket..... </i>"));
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+/*			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+*/
+			
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			iLogger.WriteFormat(_L("<i>ESendStopServer..... </i>"));
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			iLogger.WriteFormat(_L("<i>EServerStopped..... </i>"));
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			iLogger.WriteFormat(_L("<i>ECleanup..... </i>"));
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestCase::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestCase::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestCase::SendComplete ( TInt /*aLength*/ )
+	{
+	iLogger.WriteFormat(_L("<i> SendComplete..... </i>"));
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+	
+void CTcpServerTestCase::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	iLogger.WriteFormat(_L("<i>ReceivedL..... </i>"));
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp1.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "ctcpservertestupnp1.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP1 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KConnect, "CONNECT /testserviceuri1 HTTP/1.1\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+
+CTcpServerTestUPnP1* CTcpServerTestUPnP1::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP1* ret = new ( ELeave ) CTcpServerTestUPnP1 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP1::CTcpServerTestUPnP1 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP1::~CTcpServerTestUPnP1 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP1::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP1::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KConnect );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP1::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP1::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP1::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP1::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP1::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp10.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP10.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP10 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KConnect, "POST /testserviceuri1 HTTP/1.1\r\nContent-Type: text/xml\r\nHOST: 127.0.0.1:80\r\nContent-Length: 5\r\n\r\nABCDE");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 412 Precondition Failed");
+
+CTcpServerTestUPnP10* CTcpServerTestUPnP10::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP10* ret = new ( ELeave ) CTcpServerTestUPnP10 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP10::CTcpServerTestUPnP10 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP10::~CTcpServerTestUPnP10 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP10::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP10::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KConnect );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP10::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP10::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP10::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP10::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP10::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp11.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,232 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP11.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP11 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+//Defect - URI used in code need to check.
+//_LIT8 ( KConnect, "M-POST /testserviceuri1 HTTP/1.1\r\nContent-Type: text/xml\r\nHOST: 127.0.0.1:80\r\nContent-Length: 5\r\nMAN: \"http://schemas.xmlsoap.org/soap/envelope/\"\r\n\r\nABCDE");
+_LIT8 ( KConnect, "M-POST /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nMAN: http://schemas.xmlsoap.org/soap/envelope/\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 501 Not Implemented");
+
+CTcpServerTestUPnP11* CTcpServerTestUPnP11::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP11* ret = new ( ELeave ) CTcpServerTestUPnP11 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP11::CTcpServerTestUPnP11 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP11::~CTcpServerTestUPnP11 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP11::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP11::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KConnect );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP11::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP11::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP11::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP11::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP11::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp12.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP12.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP12 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "SUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Length: 5\r\n\r\nABCDE\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 412 Precondition Failed");
+
+CTcpServerTestUPnP12* CTcpServerTestUPnP12::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP12* ret = new ( ELeave ) CTcpServerTestUPnP12 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP12::CTcpServerTestUPnP12 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP12::~CTcpServerTestUPnP12 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP12::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP12::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP12::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP12::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP12::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP12::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP12::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp13.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,231 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP13.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP13 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+//_LIT8 ( KData, "UNSUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\n\r\n");
+_LIT8 ( KData, "SUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nCALLBACK: <http://10.192.204.79:80>\r\nNT: \r\n\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 412 Precondition Failed");
+
+CTcpServerTestUPnP13* CTcpServerTestUPnP13::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP13* ret = new ( ELeave ) CTcpServerTestUPnP13 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP13::CTcpServerTestUPnP13 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP13::~CTcpServerTestUPnP13 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP13::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP13::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP13::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP13::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP13::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP13::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP13::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp14.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP14.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP14 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "SUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nSID: testserviceuri1\r\nCALLBACK: <http://10.192.204.79:80>\r\nNT: test\r\n\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP14* CTcpServerTestUPnP14::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP14* ret = new ( ELeave ) CTcpServerTestUPnP14 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP14::CTcpServerTestUPnP14 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP14::~CTcpServerTestUPnP14 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP14::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP14::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP14::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP14::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP14::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP14::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP14::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp15.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,231 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP15.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP15 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+//_LIT8 ( KData, "NOTIFY * HTTP/1.1\r\nHOST: 127.0.0.1:80\r\n\r\n");
+_LIT8 ( KData, "SUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nSID: testserviceuri1\r\nCALLBACK: <http://10.192.204.79:80>\r\nNT: upnp:event\r\n\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP15* CTcpServerTestUPnP15::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP15* ret = new ( ELeave ) CTcpServerTestUPnP15 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP15::CTcpServerTestUPnP15 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP15::~CTcpServerTestUPnP15 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP15::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP15::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP15::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP15::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP15::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP15::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP15::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp16.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP16.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP16 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "UNSUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 412 Precondition Failed");
+
+CTcpServerTestUPnP16* CTcpServerTestUPnP16::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP16* ret = new ( ELeave ) CTcpServerTestUPnP16 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP16::CTcpServerTestUPnP16 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP16::~CTcpServerTestUPnP16 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP16::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP16::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP16::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP16::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP16::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP16::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP16::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp17.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP17.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP17 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "UNSUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nSID: testserviceuri1\r\nCALLBACK: <http://10.192.204.79:80>\r\nNT: upnp:event\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP17* CTcpServerTestUPnP17::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP17* ret = new ( ELeave ) CTcpServerTestUPnP17 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP17::CTcpServerTestUPnP17 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP17::~CTcpServerTestUPnP17 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP17::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP17::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP17::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP17::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP17::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP17::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP17::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp18.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP18.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP18 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "NOTIFY /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 412 Precondition Failed");
+
+CTcpServerTestUPnP18* CTcpServerTestUPnP18::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP18* ret = new ( ELeave ) CTcpServerTestUPnP18 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP18::CTcpServerTestUPnP18 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP18::~CTcpServerTestUPnP18 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP18::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP18::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP18::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP18::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP18::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP18::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP18::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp19.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP19.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP19 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "M-POST /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP19* CTcpServerTestUPnP19::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP19* ret = new ( ELeave ) CTcpServerTestUPnP19 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP19::CTcpServerTestUPnP19 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP19::~CTcpServerTestUPnP19 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP19::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP19::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP19::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP19::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP19::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP19::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP19::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp2.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "ctcpservertestupnp2.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP2 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KDelete, "DELETE /testserviceuri1 HTTP/1.1\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+
+CTcpServerTestUPnP2* CTcpServerTestUPnP2::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP2* ret = new ( ELeave ) CTcpServerTestUPnP2 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP2::CTcpServerTestUPnP2 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP2::~CTcpServerTestUPnP2 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP2::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP2::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KDelete );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP2::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP2::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP2::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP2::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP2::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp20.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP20.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP20 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "NOTIFY /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Type: text/xml\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP20* CTcpServerTestUPnP20::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP20* ret = new ( ELeave ) CTcpServerTestUPnP20 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP20::CTcpServerTestUPnP20 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP20::~CTcpServerTestUPnP20 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP20::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP20::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP20::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP20::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP20::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP20::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP20::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp21.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP21.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP21 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "NOTIFY /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Type: text/xml\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 412 Precondition Failed");
+
+CTcpServerTestUPnP21* CTcpServerTestUPnP21::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP21* ret = new ( ELeave ) CTcpServerTestUPnP21 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP21::CTcpServerTestUPnP21 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP21::~CTcpServerTestUPnP21 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP21::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP21::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP21::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP21::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP21::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP21::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP21::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp22.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP22.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP22 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "NOTIFY /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Type: text/xml\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\nSID: uuid:sub\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 412 Precondition Failed");
+
+CTcpServerTestUPnP22* CTcpServerTestUPnP22::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP22* ret = new ( ELeave ) CTcpServerTestUPnP22 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP22::CTcpServerTestUPnP22 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP22::~CTcpServerTestUPnP22 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP22::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP22::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP22::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP22::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP22::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP22::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP22::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp23.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,148 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP23.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP23 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "GET /testserviceuri1 HTTP/1.0\r\nHOST: 127.0.0.1:80\r\nConnection:12\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 200 OK");
+_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP23* CTcpServerTestUPnP23::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP23* ret = new ( ELeave ) CTcpServerTestUPnP23 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP23::CTcpServerTestUPnP23 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP23::~CTcpServerTestUPnP23 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP23::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP23::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{
+			iLogger.WriteFormat(_L("<i>Send Data..... </i>"));
+			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP23::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) != KErrNotFound )
+		{
+		iSocketHandler.Recv ();
+		responseBuf.Close ();
+		return;
+		}
+		
+	if ( responseBuf.FindF ( KResponseData ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+void CTcpServerTestUPnP23::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+		TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( aMessage );
+		CTransaction* trans = static_cast<CTransaction*> ( requestMsg.iPtr );
+		RMBufChain bufChain;
+		bufChain.CreateL ( KResponseData );	
+		trans->AddBodyPart ( bufChain );
+		
+		TUpnpMessage::TUPnPResponseInfo msg ( trans, HTTPStatus::EOk, NULL );
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), msg );
+		}
+	}
+	
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp24.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,147 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP24.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP24 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "GET /testserviceuri1 HTTP/1.0\r\nHOST: 127.0.0.1:80\r\nConnection:Keep-Alive\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 200 OK");
+_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP24* CTcpServerTestUPnP24::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP24* ret = new ( ELeave ) CTcpServerTestUPnP24 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP24::CTcpServerTestUPnP24 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP24::~CTcpServerTestUPnP24 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP24::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP24::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP24::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) != KErrNotFound )
+		{
+		iSocketHandler.Recv ();
+		responseBuf.Close ();
+		return;
+		}
+		
+	if ( responseBuf.FindF ( KResponseData ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+void CTcpServerTestUPnP24::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+		TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( aMessage );
+		CTransaction* trans = static_cast<CTransaction*> ( requestMsg.iPtr );
+		RMBufChain bufChain;
+		bufChain.CreateL ( KResponseData );	
+		trans->AddBodyPart ( bufChain );
+		
+		TUpnpMessage::TUPnPResponseInfo msg ( trans, HTTPStatus::EOk, NULL );
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), msg );
+		}
+	}
+	
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp25.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,148 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP25.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP25 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "GET /testserviceuri1 HTTP/1.0\r\nHOST: 127.0.0.1:80\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 200 OK");
+_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP25* CTcpServerTestUPnP25::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP25* ret = new ( ELeave ) CTcpServerTestUPnP25 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP25::CTcpServerTestUPnP25 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP25::~CTcpServerTestUPnP25 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP25::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP25::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP25::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) != KErrNotFound )
+		{
+		iSocketHandler.Recv ();
+		responseBuf.Close ();
+		return;
+		}
+		
+	if ( responseBuf.FindF ( KResponseData ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+void CTcpServerTestUPnP25::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+		TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( aMessage );
+		CTransaction* trans = static_cast<CTransaction*> ( requestMsg.iPtr );
+		RMBufChain bufChain;
+		bufChain.CreateL ( KResponseData );	
+		trans->AddBodyPart ( bufChain );
+		
+		TUpnpMessage::TUPnPResponseInfo msg ( trans, HTTPStatus::EOk, NULL );
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), msg );
+		}
+	}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp26.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,143 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP26.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP26 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "GET /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nConnection:Close\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 200 OK");
+_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP26* CTcpServerTestUPnP26::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP26* ret = new ( ELeave ) CTcpServerTestUPnP26 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP26::CTcpServerTestUPnP26 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP26::~CTcpServerTestUPnP26 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP26::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP26::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP26::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) != KErrNotFound )
+		{
+		iSocketHandler.Recv ();
+		responseBuf.Close ();
+		return;
+		}
+		
+	if ( responseBuf.FindF ( KResponseData ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+void CTcpServerTestUPnP26::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+		TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( aMessage );
+		CTransaction* trans = static_cast<CTransaction*> ( requestMsg.iPtr );
+		RMBufChain bufChain;
+		bufChain.CreateL ( KResponseData );	
+		trans->AddBodyPart ( bufChain );
+		
+		TUpnpMessage::TUPnPResponseInfo msg ( trans, HTTPStatus::EOk, NULL );
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), msg );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp27.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,118 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP27.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP27 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "GET /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+//_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP27* CTcpServerTestUPnP27::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP27* ret = new ( ELeave ) CTcpServerTestUPnP27 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP27::CTcpServerTestUPnP27 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP27::~CTcpServerTestUPnP27 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP27::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP27::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP27::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp28.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP28.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP28 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "GET /testserviceuri1 HTTP/1.1\r\nHOST: 128.0.0.1:\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+//_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP28* CTcpServerTestUPnP28::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP28* ret = new ( ELeave ) CTcpServerTestUPnP28 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP28::CTcpServerTestUPnP28 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP28::~CTcpServerTestUPnP28 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP28::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP28::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP28::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp29.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,113 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP29.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP29 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "GET /testserviceuri1 HTTP/1.1\r\nHOST: 222:128:0.0.1:\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+//_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP29* CTcpServerTestUPnP29::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP29* ret = new ( ELeave ) CTcpServerTestUPnP29 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP29::CTcpServerTestUPnP29 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP29::~CTcpServerTestUPnP29 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP29::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP29::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP29::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+
+	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp3.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "ctcpservertestupnp3.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP3 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KHead, "HEAD /testserviceuri1 HTTP/1.1\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+
+CTcpServerTestUPnP3* CTcpServerTestUPnP3::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP3* ret = new ( ELeave ) CTcpServerTestUPnP3 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP3::CTcpServerTestUPnP3 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP3::~CTcpServerTestUPnP3 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP3::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP3::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KHead );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP3::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP3::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP3::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP3::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP3::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp30.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,446 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP30.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP30 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "M-POST /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nMAN: http://xmlsoap.org/soap/envelope/\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP30* CTcpServerTestUPnP30::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP30* ret = new ( ELeave ) CTcpServerTestUPnP30 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP30::CTcpServerTestUPnP30 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP30::~CTcpServerTestUPnP30 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP30::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP30::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP30::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+_LIT8 ( KData1, "GET1 /testserviceuri1 HTTP/1.1\r\nHOST: 127.0");
+_LIT8 ( KData2,".0.1:80\r\n\r\n");
+_LIT8 ( KResponse, "HTTP/1.1 501 Not Implemented");
+
+CTcpServerTestUPnP38* CTcpServerTestUPnP38::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP38* ret = new ( ELeave ) CTcpServerTestUPnP38 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP38::CTcpServerTestUPnP38 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP38::~CTcpServerTestUPnP38 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP38::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP38::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData1 );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP38::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+void CTcpServerTestUPnP38::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	
+	if(!iSentOnce)
+		{
+		TRAP_IGNORE(iSendChain.CreateL ( KData2 ));
+		iSocketHandler.Send ( iSendChain );
+		iSentOnce = ETrue;
+		}
+	else
+		{
+		iSocketHandler.Recv ();
+		//iTimer.After ( iStatus, 1000000 ); //1secs
+		}
+	}
+
+
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP39 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KData3, "GET /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KData31, "CONNECT /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse3, "HTTP/1.1 200 OK");
+_LIT8 ( KExpectedResponse31, "HTTP/1.1 501 Not Implemented");
+_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP39* CTcpServerTestUPnP39::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP39* ret = new ( ELeave ) CTcpServerTestUPnP39 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP39::CTcpServerTestUPnP39 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP39::~CTcpServerTestUPnP39 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP39::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP39::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData3 );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP39::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse3 ) != KErrNotFound )
+		{
+		iSocketHandler.Recv ();
+		responseBuf.Close ();
+		return;
+		}
+	if ( responseBuf.FindF ( KResponseData ) != KErrNotFound )
+		{
+		TRAP_IGNORE(iSendChain.CreateL ( KData31 ));
+		iSocketHandler.Send ( iSendChain );
+		responseBuf.Close ();
+		return;
+		}
+	if ( responseBuf.FindF ( KExpectedResponse31 ) != KErrNotFound )
+		{
+		iResponse = EPass;	// test case Passed
+		}
+	else
+		{
+		iResponse = EFail;	// test case failed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+void CTcpServerTestUPnP39::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+		TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( aMessage );
+		CTransaction* trans = static_cast<CTransaction*> ( requestMsg.iPtr );
+		RMBufChain bufChain;
+		bufChain.CreateL ( KResponseData );	
+		trans->AddBodyPart ( bufChain );
+		
+		TUpnpMessage::TUPnPResponseInfo msg ( trans, HTTPStatus::EOk, NULL );
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), msg );
+		}
+	}
+
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP40 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KData32, "GET /testserviceuri1 HTTP/1.1\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse32, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP40* CTcpServerTestUPnP40::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP40* ret = new ( ELeave ) CTcpServerTestUPnP40 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP40::CTcpServerTestUPnP40 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP40::~CTcpServerTestUPnP40 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP40::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP40::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData3 );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP40::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse3 ) != KErrNotFound )
+		{
+		iSocketHandler.Recv ();
+		responseBuf.Close ();
+		return;
+		}
+	if ( responseBuf.FindF ( KResponseData ) != KErrNotFound )
+		{
+		TRAP_IGNORE(iSendChain.CreateL ( KData32 ));
+		iSocketHandler.Send ( iSendChain );
+		responseBuf.Close ();
+		return;
+		}
+	if ( responseBuf.FindF ( KExpectedResponse32 ) != KErrNotFound )
+		{
+		iResponse = EPass;	// test case Passed
+		}
+	else
+		{
+		iResponse = EFail;	// test case failed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+void CTcpServerTestUPnP40::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+		TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( aMessage );
+		CTransaction* trans = static_cast<CTransaction*> ( requestMsg.iPtr );
+		RMBufChain bufChain;
+		bufChain.CreateL ( KResponseData );	
+		trans->AddBodyPart ( bufChain );
+		
+		TUpnpMessage::TUPnPResponseInfo msg ( trans, HTTPStatus::EOk, NULL );
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), msg );
+		}
+	}
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp31.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,113 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP31.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP31 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "NOTIFY /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Type: text/xml\r\nNT: upnp:event\r\nNTS: upnp1:propchange\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 412 Precondition Failed");
+
+CTcpServerTestUPnP31* CTcpServerTestUPnP31::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP31* ret = new ( ELeave ) CTcpServerTestUPnP31 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP31::CTcpServerTestUPnP31 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP31::~CTcpServerTestUPnP31 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP31::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP31::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP31::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp32.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,111 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP32.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP32 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "SUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nSID: testserviceuri1\r\nCALLBACK: <http://10.192.204.79:80>\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP32* CTcpServerTestUPnP32::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP32* ret = new ( ELeave ) CTcpServerTestUPnP32 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP32::CTcpServerTestUPnP32 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP32::~CTcpServerTestUPnP32 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP32::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP32::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP32::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp33.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,111 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP33.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP33 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "SUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nSID: testserviceuri1\r\nNT: upnp:event\r\n\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP33* CTcpServerTestUPnP33::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP33* ret = new ( ELeave ) CTcpServerTestUPnP33 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP33::CTcpServerTestUPnP33 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP33::~CTcpServerTestUPnP33 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP33::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP33::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP33::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp34.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,371 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP34.h"
+
+using namespace Messages;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP34 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "UNSUBSCRIBE /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nSID: testserviceuri1\r\nNT: upnp:event\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad Request");
+
+CTcpServerTestUPnP34* CTcpServerTestUPnP34::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP34* ret = new ( ELeave ) CTcpServerTestUPnP34 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP34::CTcpServerTestUPnP34 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP34::~CTcpServerTestUPnP34 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP34::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP34::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP34::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+
+//------------------------------------------------------------------------------------
+_LIT8 ( KTestUPnPServiceUri1,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KPartialData, "POST /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Length: 10\r\n\r\n");
+
+CTcpServerTestUPnP35* CTcpServerTestUPnP35::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP35* ret = new ( ELeave ) CTcpServerTestUPnP35 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP35::CTcpServerTestUPnP35 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP35::~CTcpServerTestUPnP35 ()
+	{
+	}
+	
+void CTcpServerTestUPnP35::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri1);
+	}
+
+TVerdict CTcpServerTestUPnP35::RunTestL ()
+	{
+	switch ( iState )
+		{			
+		case ESendData:
+			{			
+			//iSendChain.CreateL ( KData1 );
+			iSendChain.CreateL ( KPartialData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = EStartTimer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		case EStartTimer:
+			{
+			const TUint KTimeOutVal = 31000000; // 31secs
+			iTimer.After ( iStatus, KTimeOutVal );
+			iState = ETimerStopped;
+			Reschedule ();
+			return EPass;
+			}
+		case ETimerStopped:
+			{
+			iClientSocket.Close ();			
+			iState = ESendStopServer;			
+			CTcpServerTestCase::RunTestL ();
+			return EPass;
+			}
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+
+void CTcpServerTestUPnP35::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP35::RecvComplete ( RMBufChain& /*aData*/ )
+	{
+	// will not reach here, since after sending partial data & socket is closed
+	}
+	
+//------------------------------------------------------------------------------------
+// KTestUPnPServiceUri1 -- same as above
+// KPartialData -- same as above
+_LIT8 ( KExpectedResponse1, "HTTP/1.1 408 Request Timeout");
+
+CTcpServerTestUPnP36* CTcpServerTestUPnP36::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP36* ret = new ( ELeave ) CTcpServerTestUPnP36 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP36::CTcpServerTestUPnP36 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP36::~CTcpServerTestUPnP36 ()
+	{
+	}
+	
+void CTcpServerTestUPnP36::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri1);
+	}
+
+TVerdict CTcpServerTestUPnP36::RunTestL ()
+	{
+	switch ( iState )
+		{			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KPartialData );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+
+void CTcpServerTestUPnP36::RecvComplete ( RMBufChain& aData )
+	{
+	// will reach here, after sending partial, and should 408 status code
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse1 ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+//------------------------------------------------------------------------------------
+// KTestUPnPServiceUri1 -- same as above
+_LIT8 ( KData1, "GET /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Length: 0\r\nConnection: close\r\n\r\n" );
+// KExpectedResponse1,-- same above
+_LIT8 ( KBodyData, "ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppvppppppppppppppppppppppppppppppppppppvppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppvppppppppppppppppppppppppppppppppppppvppppppppppppppppppppppppppppppppppppvvppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppvvppppppppppppppppppppppppppppppppppppvvppppppppppppppppppppppppppppppppppppvpppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp" );
+
+CTcpServerTestUPnP37* CTcpServerTestUPnP37::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP37* ret = new ( ELeave ) CTcpServerTestUPnP37 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP37::CTcpServerTestUPnP37 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd )
+	{
+	}
+	
+CTcpServerTestUPnP37::~CTcpServerTestUPnP37 ()
+	{
+	iResponseBuf.Close ();
+	}
+	
+void CTcpServerTestUPnP37::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri1);
+	iUPnPTimer = CUPnPTimer::NewL ( *this );
+	}
+
+TVerdict CTcpServerTestUPnP37::RunTestL ()
+	{
+	switch ( iState )
+		{			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KData1 );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+
+void CTcpServerTestUPnP37::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 partialBuf;
+	partialBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( partialBuf );
+	aData.Free ();
+	
+	_LIT8 ( KContentLength, "\r\n\r\n" );
+	if ( partialBuf.Find ( KContentLength ) != KErrNotFound )
+		{	
+		TRAP_IGNORE(iResponseBuf.CreateL ( KBodyData ().Length () ));		
+		}
+	else
+		{
+		iResponseBuf.Append ( partialBuf );
+		}
+	partialBuf.Close ();
+	
+	if ( iResponseBuf.Length () != KBodyData ().Length () )
+		{
+		iSocketHandler.Recv ();
+		}
+	else
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
+void CTcpServerTestUPnP37::ReceivedL ( const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> () )
+		{
+		TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( aMessage );
+		iTransaction = static_cast<CTransaction*> ( requestMsg.iPtr );
+		const TUint KTimeOutVal = 30000000; // 30secs
+		iUPnPTimer->StartTimer ( KTimeOutVal );
+		}
+	else
+		{
+		CTcpServerTestCase::ReceivedL ( aSender, aRecipient,aMessage );
+		}
+	}
+
+void CTcpServerTestUPnP37::TimeOut ()
+	{
+	SendResponseToServerFlow ();
+	}
+
+void CTcpServerTestUPnP37::SendResponseToServerFlow ()
+	{
+	RMBufChain dataChian;
+	TRAP_IGNORE(dataChian.CreateL( KBodyData ));
+	iTransaction->AddBodyPart( dataChian );
+	RClientInterface::OpenPostMessageClose ( NodeId (), iTcpServer,
+								TUpnpMessage::TUPnPResponseInfo ( iTransaction, HTTPStatus::EOk, NULL ).CRef () );
+	}
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp4.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "ctcpservertestupnp4.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP4 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KOptions, "OPTIONS /testserviceuri1 HTTP/1.1\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+
+CTcpServerTestUPnP4* CTcpServerTestUPnP4::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP4* ret = new ( ELeave ) CTcpServerTestUPnP4 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP4::CTcpServerTestUPnP4 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP4::~CTcpServerTestUPnP4 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP4::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP4::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KOptions );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP4::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP4::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP4::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP4::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP4::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp41.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,418 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "CTcpServerTestCase.h"
+
+
+#include <httperr.h>
+#include "CTcpServerTestUPnP41.h"
+#include "upnpserverconstants.h"
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KData, "POST /testserviceuri1 HTTP/1.1\r\nHost: 127.0.0.1\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nSoapAction: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n");
+_LIT8 ( KData1, "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:QueryStateVariableResponse xmlns:u=\"urn:shemas-upnp-org:control-1-0\"><return>Query return value</return></u:QueryStateVariableResponse></s:Body></s:Envelope>" );
+_LIT8 ( KExpectedResponse, "HTTP/1.1 200 OK");
+
+CTcpServerTestUPnP41* CTcpServerTestUPnP41::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP41* ret = new ( ELeave ) CTcpServerTestUPnP41 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP41::CTcpServerTestUPnP41 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd ),iSentHeaders(EFalse),iIsWriteDone(EFalse)
+	{
+	}
+	
+CTcpServerTestUPnP41::~CTcpServerTestUPnP41 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP41::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP41::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{
+			
+			if(!iIsWriteDone)
+				{
+				iSendChain.CreateL ( KData );
+				iSocketHandler.Send ( iSendChain );
+				iSentHeaders = ETrue;
+				}
+			else
+				{
+				
+				TCHMessageOption option ( 0, 330 );
+				TPckg < TCHMessageOption > optionBuf ( option );
+				
+				iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf);
+				
+				RBuf8 resData;
+				iSSP->GetOption(23, KCHMaxLength, resData);
+				//iSSP->GetOption(KCHOptionLevel, KCHMaxLength, resData);
+				
+				RMBufChain bodyBuf;
+								
+				iSSPData->Write(bodyBuf, 0, NULL);
+				
+				TCHMessageOption option1 ( 1, 330 );
+				TPckg < TCHMessageOption > optionBuf1 ( option1 );
+				
+				iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf1);
+			
+				//iSSP->SetOption(KCHOptionLevel, KCHLastMessage, optionBuf1);
+				bodyBuf.CreateL(KData1);
+				iSSPData->Write(bodyBuf, 1, NULL);
+				
+				iSSP->Shutdown(MSessionControl::EStopInput);
+				
+				iState = ESendStopServer;
+				
+				}
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP41::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+		
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) != KErrNotFound )
+		{
+		iResponse = EPass;	// test case Passed
+		iSocketHandler.Recv ();
+		}
+	else if ( responseBuf.FindF ( KData1 ) != KErrNotFound )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	
+	responseBuf.Close ();
+	
+	}
+
+void CTcpServerTestUPnP41::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	if(iSentHeaders)
+		{
+		TRAP_IGNORE(iSendChain.CreateL ( KData1 ));
+		iSocketHandler.Send ( iSendChain );
+		iSentHeaders = EFalse;
+		}
+	else
+		iSocketHandler.Recv ();
+	}
+	
+
+
+
+void CTcpServerTestUPnP41::NewData(TUint aCount)
+	{
+	
+	
+	iResponseLength = iResponseLength + aCount;
+	
+	if(!aCount && (iResponseLength == 334))
+		{
+		iIsWriteDone = ETrue;
+		CompleteSelf ( KErrNone );
+		}
+	else
+		{
+		RBuf8 responseBuf;
+		RBuf8 resData;
+		RMBufChain	dataReceived;
+		
+		iSSPData->GetData(dataReceived, aCount, 0, NULL);
+			
+		responseBuf.CreateMax ( dataReceived.Length () );
+		dataReceived.CopyOut ( responseBuf );
+		dataReceived.Free ();
+		responseBuf.Close ();
+		}
+	/*
+	iSSP->GetOption(KCHOptionLevel, KCHLastMessage, resData);
+	TBool isLastMsg = *(TUint*) resData.Ptr();
+
+	if(isLastMsg)
+		{
+		iIsWriteDone = ETrue;
+		CompleteSelf ( KErrNone );
+		}
+	*/
+	
+	}
+
+void CTcpServerTestUPnP41::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		
+		iFlow = mcfnode_cast<CSubConnectionFlowBase>(
+		reinterpret_cast<Messages::ANode*>(	iTcpServer.Ptr()));
+		
+		
+		// Perform the binding to the flow below
+		iFlowBinder = iFlow->GetBinderControlL();
+		iSSP = iFlowBinder->GetControlL(KSockStream, *this);
+		iSSPData = iFlowBinder->BindL(*this);
+		
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+
+		}
+	}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////
+
+_LIT8 ( KMPostData, "M-POST /testserviceuri1 HTTP/1.1\r\nHost: 127.0.0.1\r\nMAN: http://schemas.xmlsoap.org/soap/envelope/\r\nContent-Length: 330\r\nContent-Type: text/xml; charset=utf-8\r\nSoapAction: :urn:shemas-upnp-org:control-1-0#QueryStateVariableResponse:\r\n\r\n");
+
+
+CTcpServerTestUPnP42* CTcpServerTestUPnP42::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP42* ret = new ( ELeave ) CTcpServerTestUPnP42 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP42::CTcpServerTestUPnP42 ( CProxyProvd* aProvd ) :
+	CTcpServerTestCase ( aProvd ),iSentHeaders(EFalse),iIsWriteDone(EFalse)
+	{
+	}
+	
+CTcpServerTestUPnP42::~CTcpServerTestUPnP42 ()
+	{
+
+	}
+	
+void CTcpServerTestUPnP42::ConstructL ()
+	{
+	CTcpServerTestCase::ConstructL(KTestUPnPServiceUri);
+	}
+
+TVerdict CTcpServerTestUPnP42::RunTestL ()
+	{
+	switch ( iState )
+		{
+			
+		case ESendData:
+			{
+			
+			if(!iIsWriteDone)
+				{
+				iSendChain.CreateL ( KMPostData );
+				iSocketHandler.Send ( iSendChain );
+				iSentHeaders = ETrue;
+				}
+			else
+				{
+				
+				TCHMessageOption option ( 0, 330 );
+				TPckg < TCHMessageOption > optionBuf ( option );
+				
+				iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf);
+				
+				RBuf8 resData;
+				iSSP->GetOption(23, KCHMaxLength, resData);
+				//iSSP->GetOption(KCHOptionLevel, KCHMaxLength, resData);
+				
+				RMBufChain bodyBuf;
+								
+				iSSPData->Write(bodyBuf, 0, NULL);
+				
+				TCHMessageOption option1 ( 1, 330 );
+				TPckg < TCHMessageOption > optionBuf1 ( option1 );
+				
+				iSSP->SetOption(KCHOptionLevel, KCHMaxLength, optionBuf1);
+			
+				//iSSP->SetOption(KCHOptionLevel, KCHLastMessage, optionBuf1);
+				bodyBuf.CreateL(KData1);
+				iSSPData->Write(bodyBuf, 1, NULL);
+				
+				iSSP->Shutdown(MSessionControl::EStopInput);
+				
+				iState = ESendStopServer;
+				
+				}
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		default:
+			{
+			return CTcpServerTestCase::RunTestL();
+			}
+		}
+	}
+	
+	
+void CTcpServerTestUPnP42::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+		
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) != KErrNotFound )
+		{
+		iResponse = EPass;	// test case Passed
+		iSocketHandler.Recv ();
+		}
+	else if ( responseBuf.FindF ( KData1 ) != KErrNotFound )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	
+	responseBuf.Close ();
+	
+	}
+
+void CTcpServerTestUPnP42::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	if(iSentHeaders)
+		{
+		TRAP_IGNORE(iSendChain.CreateL ( KData1 ));
+		iSocketHandler.Send ( iSendChain );
+		iSentHeaders = EFalse;
+		}
+	else
+		iSocketHandler.Recv ();
+	}
+	
+
+
+
+void CTcpServerTestUPnP42::NewData(TUint aCount)
+	{
+	
+	
+	iResponseLength = iResponseLength + aCount;
+	
+	if(!aCount && (iResponseLength == 334))
+		{
+		iIsWriteDone = ETrue;
+		CompleteSelf ( KErrNone );
+		}
+	else
+		{
+		RBuf8 responseBuf;
+		RBuf8 resData;
+		RMBufChain	dataReceived;
+		
+		iSSPData->GetData(dataReceived, aCount, 0, NULL);
+			
+		responseBuf.CreateMax ( dataReceived.Length () );
+		dataReceived.CopyOut ( responseBuf );
+		dataReceived.Free ();
+		responseBuf.Close ();
+		}
+	/*
+	iSSP->GetOption(KCHOptionLevel, KCHLastMessage, resData);
+	TBool isLastMsg = *(TUint*) resData.Ptr();
+
+	if(isLastMsg)
+		{
+		iIsWriteDone = ETrue;
+		CompleteSelf ( KErrNone );
+		}
+	*/
+	
+	}
+
+void CTcpServerTestUPnP42::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		
+		iFlow = mcfnode_cast<CSubConnectionFlowBase>(
+		reinterpret_cast<Messages::ANode*>(	iTcpServer.Ptr()));
+		
+		
+		// Perform the binding to the flow below
+		iFlowBinder = iFlow->GetBinderControlL();
+		iSSP = iFlowBinder->GetControlL(KSockStream, *this);
+		iSSPData = iFlowBinder->BindL(*this);
+		
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+
+		}
+	}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp5.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "ctcpservertestupnp5.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP5 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KPut, "PUT /testserviceuri1 HTTP/1.1\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+
+CTcpServerTestUPnP5* CTcpServerTestUPnP5::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP5* ret = new ( ELeave ) CTcpServerTestUPnP5 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP5::CTcpServerTestUPnP5 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP5::~CTcpServerTestUPnP5 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP5::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP5::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KPut );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP5::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP5::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP5::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP5::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP5::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp6.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "ctcpservertestupnp6.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP6 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KTrace, "TRACE /testserviceuri1 HTTP/1.1\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+
+CTcpServerTestUPnP6* CTcpServerTestUPnP6::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP6* ret = new ( ELeave ) CTcpServerTestUPnP6 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP6::CTcpServerTestUPnP6 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP6::~CTcpServerTestUPnP6 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP6::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP6::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KTrace );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP6::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP6::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP6::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP6::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP6::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp7.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,242 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include <httperr.h>
+#include "ctcpservertestupnp7.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP7 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KRequestHeader, "GET / HTTP/1.0\r\nHost: 127.0.0.1:80\r\nConnection: Keep-Alive\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 404 Not Found");
+_LIT8 ( KResponseData, "Test Server");
+
+CTcpServerTestUPnP7* CTcpServerTestUPnP7::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP7* ret = new ( ELeave ) CTcpServerTestUPnP7 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP7::CTcpServerTestUPnP7 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP7::~CTcpServerTestUPnP7 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP7::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP7::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KRequestHeader );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP7::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP7::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP7::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP7::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP7::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPRequestInfo> ())
+		{
+		TUpnpMessage::TUPnPRequestInfo& requestMsg = message_cast< TUpnpMessage::TUPnPRequestInfo > ( aMessage );
+		CTransaction* trans = static_cast<CTransaction*> ( requestMsg.iPtr );
+		RMBufChain bufChain;
+		bufChain.CreateL ( KResponseData );	
+		trans->AddBodyPart ( bufChain );
+		
+		TUpnpMessage::TUPnPResponseInfo msg ( trans, HTTPStatus::EOk, NULL );
+		RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), msg );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp8.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,230 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP8.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP8 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KSubscribe, "GET1 /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 501 Not Implemented");
+
+CTcpServerTestUPnP8* CTcpServerTestUPnP8::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP8* ret = new ( ELeave ) CTcpServerTestUPnP8 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP8::CTcpServerTestUPnP8 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP8::~CTcpServerTestUPnP8 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP8::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP8::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KSubscribe );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP8::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP8::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP8::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP8::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP8::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ctcpservertestupnp9.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,231 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "CTcpServerTestUPnP9.h"
+
+using namespace Messages;
+const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP9 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+//ASSERT - Defect to be fixed.
+_LIT8 ( KConnect, "POST /testserviceuri1 HTTP/1.1\r\nHOST: 127.0.0.1:80\r\nContent-Length: 5\r\n\r\nABCDE");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 415 Unsupported Media Type");
+
+CTcpServerTestUPnP9* CTcpServerTestUPnP9::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP9* ret = new ( ELeave ) CTcpServerTestUPnP9 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP9::CTcpServerTestUPnP9 ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP9::~CTcpServerTestUPnP9 ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP9::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP9::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KConnect );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP9::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP9::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP9::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP9::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP9::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/protocolfamily.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,158 @@
+/*
+* 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:
+*
+*/
+
+
+#include <es_prot.h>
+#include <e32test.h>
+#include "es_ptest.h"
+#include <comms-infras/nifif.h>
+#include <es_mbuf.h>
+#include "ss_std.h"
+#include <ss_pman.h>
+#include <ss_glob.h>
+#include <es_mbman.h>
+#include <e32math.h>
+#include <dns_qry.h>
+#include <agenterrors.h>
+#include <e32property.h>
+
+#include "proxyprotocol.h"
+#include "protocolfamily.h"
+
+extern "C"
+	{
+	IMPORT_C CProtocolFamilyBase* InstallProxy(void);	// Force export 
+
+	EXPORT_C CProtocolFamilyBase * InstallProxy(void)
+	//
+	// Create a new protocol family
+	//
+		{
+		CTestIntSocketProtocolFamily* protocolFamily = NULL;
+		TRAP_IGNORE(protocolFamily = CTestIntSocketProtocolFamily::NewL());
+		return protocolFamily;
+		}
+	}
+
+CTestIntSocketProtocolFamily* CTestIntSocketProtocolFamily::NewL()
+//
+//
+//
+	{
+	CTestIntSocketProtocolFamily* pf=new(ELeave) CTestIntSocketProtocolFamily();
+	CleanupStack::PushL(pf);
+	pf->ConstructL();
+	CleanupStack::Pop();
+	return pf;
+	}
+
+void CTestIntSocketProtocolFamily::ConstructL()
+//
+//
+//
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+
+	}
+
+CTestIntSocketProtocolFamily::CTestIntSocketProtocolFamily() : CProtocolFamilyBase()
+	{
+	iProtocolDescs[0].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[0].iSockType=KSockDatagram; // not important whether datagram or stream for proxy
+	iProtocolDescs[0].iProtocol=KProxy;
+	iProtocolDescs[0].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[0].iByteOrder=EBigEndian;
+	iProtocolDescs[0].iServiceInfo=kDDatagramServiceInfo|KSIPeekData;
+	iProtocolDescs[0].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[0].iMessageSize=0x300;
+	iProtocolDescs[0].iName=KProxyName;
+	iProtocolDescs[0].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[0].iNamingServices=KNSNameResolution|KNSServiceResolution|KNSInfoDatabase;
+	iProtocolDescs[0].iNumSockets=100;
+/*
+	iProtocolDescs[1].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[1].iSockType=KSockDatagram;
+	iProtocolDescs[1].iProtocol=KTargetDatagram;
+	iProtocolDescs[1].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[1].iByteOrder=EBigEndian;
+	iProtocolDescs[1].iServiceInfo=kDDatagramServiceInfo|KSIPeekData;
+	iProtocolDescs[1].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[1].iMessageSize=0x300;
+	iProtocolDescs[1].iName=KTargetDatagramName;
+	iProtocolDescs[1].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[1].iNamingServices=KNSNameResolution|KNSServiceResolution|KNSInfoDatabase;
+	iProtocolDescs[1].iNumSockets=100;
+
+	iProtocolDescs[2].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[2].iSockType=KSockStream;
+	iProtocolDescs[2].iProtocol=KTargetStream;
+	iProtocolDescs[2].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[2].iByteOrder=EBigEndian;
+	iProtocolDescs[2].iServiceInfo=KDStreamServiceInfo;
+	iProtocolDescs[2].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[2].iMessageSize=KSocketMessageSizeIsStream;
+	iProtocolDescs[2].iName=KTargetStreamName;
+	iProtocolDescs[2].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[2].iNamingServices=0;
+	iProtocolDescs[2].iNumSockets=100;
+*/
+	__DECLARE_NAME(_S("CTestIntSocketProtocolFamily"));
+	}
+
+#pragma warning( disable : 4100 )
+
+TInt CTestIntSocketProtocolFamily::Install()
+	{
+	// Force a fail on Memory tests
+	char* ptr=new char;
+	if (!ptr)
+		return KErrNoMemory;
+	delete ptr;
+//	TAppProtIntfMessage::RegisterL ();
+	return KErrNone;
+	}
+
+TInt CTestIntSocketProtocolFamily::Remove()
+	{
+	//TAppProtIntfMessage::DeRegister	();
+	return KErrNone;
+	}
+
+TUint CTestIntSocketProtocolFamily::ProtocolList(TServerProtocolDesc *& aProtocolDescPointer)
+	{
+
+  	aProtocolDescPointer=new TServerProtocolDesc[KPTestIntSocketNumProtocols];
+  	if (!aProtocolDescPointer)
+  		return 0;
+
+	Mem::Copy(aProtocolDescPointer, iProtocolDescs, sizeof(TServerProtocolDesc)*KPTestIntSocketNumProtocols);
+
+	TRAP_IGNORE(Nif::CheckInstalledMBufManagerL();)
+
+	return KPTestIntSocketNumProtocols;
+	};
+
+CProtocolBase * CTestIntSocketProtocolFamily::NewProtocolL(TUint /* aSockType */,TUint aProtocol)
+	{
+
+	CProtocolBase* p=CProxyProtocol::NewL(aProtocol, &iProtocolDescs[aProtocol-1]);	
+	return p;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/proxyprotocol.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,311 @@
+/*
+* 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:
+*
+*/
+
+
+#include "es_ptest.h"
+#include "proxyprotocol.h"
+
+#include "ptcpservertests.h"
+
+//---------------------------------------------------------------------------------------------------------
+
+void Panic(TDPanic aPanic)
+//
+// Panic the Protocol
+//
+	{
+
+	User::Panic(_L("TestInternalSocket Prot"),aPanic);
+	}
+
+	
+CProxyProtocol::CProxyProtocol(TServerProtocolDesc* aProtoDesc)
+//
+//
+//
+	:CProtocolBase(),iProtoDesc(aProtoDesc),iProtocols(0x16)
+	{
+	__DECLARE_NAME(_S("CProxyProtocol"));
+	iStarted=EFalse;
+	}
+
+CServProviderBase * CProxyProtocol::NewSAPL(TUint /*aProtocol*/)
+	{
+	return CProxyProvd::NewL(*this);
+	}
+
+
+CProxyProtocol::~CProxyProtocol()
+	{
+	for (TInt i=0;i<iProtocols.Count();i++)
+		{
+		iProtocols[i]->Close();
+		}
+	}
+
+CProxyProtocol *CProxyProtocol::NewL(TInt aType, TServerProtocolDesc* aProtoDesc)
+	{
+
+	CProxyProtocol* prot=0;
+	switch (aType)
+		{
+	case KProxy:
+		prot=new (ELeave) CProxyProtocol(aProtoDesc);
+		break;
+
+	default:
+		prot=(CProxyProtocol*)0xABCD; // keep lint happy
+		Panic(EBadProtocol);
+		}
+	prot->iType=aType;
+	return prot;
+	}
+
+void CProxyProtocol::InitL(TDesC& /*aTag*/)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	}
+
+void CProxyProtocol::BindL(CProtocolBase* /*aProtocol*/, TUint /*anId*/)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	}
+
+void CProxyProtocol::BindToL(CProtocolBase* aProtocol)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	iProtocols.AppendL(aProtocol);
+	aProtocol->Open();
+	}
+
+
+void CProxyProtocol::StartL(void)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	iStarted=ETrue;
+	}
+
+TInt CProxyProtocol::Send(RMBufChain &,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return 1;
+	}
+
+TInt CProxyProtocol::Send(TDes8 &, TSockAddr* /*to*/,TSockAddr* /*from*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return 1;
+	}
+
+void CProxyProtocol::Process(RMBufChain &,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+
+void CProxyProtocol::Process(TDes8 & ,TSockAddr* /*from*/,TSockAddr* /*to*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+
+void CProxyProtocol::Identify(TServerProtocolDesc *aDesc) const
+	{
+	Mem::Copy(aDesc, iProtoDesc, sizeof(TServerProtocolDesc));
+	}
+
+TInt CProxyProtocol::GetOption(TUint level,TUint,TDes8&,CProtocolBase* /*aSourceProtocol*/)
+	{
+	
+	if(level==KNifOptLevel)
+		{
+		return KErrNotSupported;
+		}
+	return KErrNone;
+	}
+
+TInt CProxyProtocol::SetOption(TUint /*level*/,TUint /*name*/,const TDesC8& /*option*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return KErrNone;
+	}
+
+void CProxyProtocol::Error(TInt /*anerror*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+//----------------------------------------------------------------------------------------------
+CProxyProvd *CProxyProvd::NewL(CProxyProtocol &aProtocol)
+	{
+	CProxyProvd *sp=new(ELeave) CProxyProvd(aProtocol);
+//	CleanupStack::PushL(sp);
+//	sp->ConstructL();
+//	CleanupStack::Pop(sp);
+	return sp;
+	}
+
+CProxyProvd::CProxyProvd(CProxyProtocol &aProtocol)
+	{
+	__DECLARE_NAME(_S("CTestIntSocketProvd"));
+	iIsBound=EFalse;
+	iProtocol=&aProtocol;
+	iCompleteIoctl = FALSE;
+	}
+
+
+void CProxyProvd::LocalName(TSockAddr& anAddr) const
+	{
+	anAddr=iAddr;
+	}
+
+TInt CProxyProvd::SetLocalName(TSockAddr& anAddr)
+	{
+	iAddr=anAddr;
+	iIsBound=ETrue;
+	return KErrNone;
+	}
+
+void CProxyProvd::RemName(TSockAddr& /*anAddr*/)const
+	{
+	}
+
+TInt CProxyProvd::SetRemName(TSockAddr& /*anAddr*/)
+	{
+
+//	test.Printf(_L("CTestIntSocketProvd::SetRemName Port %x, Addr %lx\n"),addr.Port(),addr.Address());
+	return KErrNone;
+	}
+
+void CProxyProvd::Shutdown(TCloseType anOption)
+	{
+	if (iCompleteIoctl)
+		{
+		iSocket->IoctlComplete(NULL);
+		}
+	if (anOption==ENormal)
+		iSocket->CanClose();
+	}
+
+void CProxyProvd::Start()
+//
+//
+//
+	{
+	}
+
+void CProxyProvd::Shutdown(TCloseType /*anOption*/,const TDesC8 &/*aDisconnectData*/)
+	{
+	Panic(EBadCall);
+	}
+
+void CProxyProvd::AutoBind( void )
+	{
+//	test.Printf(_L("CTestIntSocketProvd::AutoBind\n"));
+	iIsBound=ETrue;
+	}
+	
+
+void CProxyProvd::Ioctl(TUint /*level*/,TUint name,TDes8* aOption)
+	{
+	/* Mallik...if you want to see connection creation, just ping www.google.com in command prompt,
+	change ip & uncomment 
+	RInternalSocket intSock;
+	intSock.Open(KAfInet, KSockStream, KProtocolInetTcp);	
+	const TUint32 ip = INET_ADDR(209,85,153,104);
+	TInetAddr addr(80);
+	addr.SetAddress(ip);
+	
+	TRequestStatus status;
+	intSock.Connect(addr, status);
+	User::WaitForRequest(status);	
+	*/
+	
+	switch (name)
+		{
+		case KProxyProtocolTestRequest:
+			{
+			const TProxyProtocolRequest* request = reinterpret_cast<const TProxyProtocolRequest*>(aOption->Ptr());
+			TRAPD(r,CTcpServerTestBase::StartTestL(request->name,this));
+			if (r == KErrNone)
+				{
+				break;
+				}
+			}
+		default:
+			iSocket->Error(KErrNotSupported,MSocketNotify::EErrorIoctl);
+		}
+	}
+	
+void CProxyProvd::TestComplete(TProxyProtocolTestResult aResult)
+/**
+Called by the state machine (CInternalSocketTester) when a test completes (or fails early). Completes the ioctl to pass the result back to the client side test code.
+@param aResult	The result of the test (EPass or EFail)
+*/
+	{
+	TProxyProtocolRequest resultStruct;
+	resultStruct.result = aResult;
+	TPckg<TProxyProtocolRequest> resultPckg(resultStruct);
+	iSocket->IoctlComplete(&resultPckg);
+	}
+	
+void CProxyProvd::CancelIoctl(TUint /*aLevel*/,TUint /*aName*/)
+	{}
+	
+TInt CProxyProvd::Write(RMBufChain& /*aData*/, TUint /*options*/, TSockAddr* /*anAddr*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TUint CProxyProvd::Write(const TDesC8& /*aDesc*/, TUint /*options*/, TSockAddr* /*anAddr*/)
+	{
+	return (TUint)KErrNotSupported; //The return should really be a TInt possibly need to change the interface	
+	}
+	
+TInt CProxyProvd::GetData(RMBufChain& /*aData*/, TUint /*aLength*/, TUint /*options*/,TSockAddr* /*anAddr*/)
+	{
+	return KErrNotSupported;
+	}
+
+void CProxyProvd::GetData(TDes8& /*aDesc*/,TUint /*options*/,TSockAddr* /*anAddr*/)
+	{}
+
+void CProxyProvd::ActiveOpen(void)
+	{}
+	
+void CProxyProvd::ActiveOpen(const TDesC8 &/*aConnectionData*/)
+	{}
+
+TInt CProxyProvd::PassiveOpen(TUint /*aQue*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::PassiveOpen(TUint /*aQue*/,const TDesC8& /*aConnectionData*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::GetOption(TUint /*level*/,TUint /*name*/,TDes8& /*anOption*/ )const
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::SetOption(TUint /*level*/,TUint /*name*/,const TDesC8& /*anOption*/)
+	{
+	return KErrNotSupported;
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpserver/src/ptcpservertests.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,523 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+#include "ptcpservertests.h"
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+
+#include "ctcpservertestupnp1.h"
+#include "ctcpservertestupnp2.h"
+#include "ctcpservertestupnp3.h"
+#include "ctcpservertestupnp4.h"
+#include "ctcpservertestupnp5.h"
+#include "ctcpservertestupnp6.h"
+#include "ctcpservertestupnp7.h"
+#include "ctcpservertestupnp8.h"
+#include "ctcpservertestupnp9.h"
+#include "ctcpservertestupnp10.h"
+#include "ctcpservertestupnp11.h"
+#include "CTcpServerTestUPnP12.h"
+#include "CTcpServerTestUPnP13.h"
+#include "CTcpServerTestUPnP14.h"
+#include "CTcpServerTestUPnP15.h"
+#include "CTcpServerTestUPnP16.h"
+#include "CTcpServerTestUPnP17.h"
+#include "CTcpServerTestUPnP18.h"
+#include "CTcpServerTestUPnP19.h"
+#include "CTcpServerTestUPnP20.h"
+#include "CTcpServerTestUPnP21.h"
+#include "CTcpServerTestUPnP22.h"
+
+#include "CTcpServerTestCase.h"
+#include "CTcpServerTestUPnP23.h"
+#include "CTcpServerTestUPnP24.h"
+#include "CTcpServerTestUPnP25.h"
+#include "CTcpServerTestUPnP26.h"
+#include "CTcpServerTestUPnP27.h"
+#include "CTcpServerTestUPnP28.h"
+#include "CTcpServerTestUPnP29.h"
+#include "CTcpServerTestUPnP30.h"
+#include "CTcpServerTestUPnP31.h"
+#include "CTcpServerTestUPnP32.h"
+#include "CTcpServerTestUPnP33.h"
+#include "CTcpServerTestUPnP34.h"
+#include "CTcpServerTestUPnP41.h"
+
+//const TUint16 KActivityNull = 0;
+const TUint KHttpDefaultPort = 80;
+//Add Blocks of 64
+static const TInt KBlockSize1 = 64;
+static const TInt KMinGrowth1 = 30;
+static const TInt KThresholdGrowth1 = 30;
+static const TInt KInitialAllocation1 = 128;
+
+static const TInt KHeapSize	= 1024 * 1024;	//1MB
+
+using namespace Messages;
+
+_LIT8 ( KTestUPnPServiceUri,"http://127.0.0.1:80/testserviceuri1" );
+_LIT8 ( KMissingHost, "GET /testserviceuri1 HTTP/1.1\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KExpectedResponse, "HTTP/1.1 400 Bad request");
+
+//-------------------------------------------------------------------------------------------------
+//	CTcpServerTestBase
+//-------------------------------------------------------------------------------------------------	
+
+#define BEGIN_TESTLIST
+
+#define ADD_TEST(name) \
+	if (aTestName == _L(#name))\
+		{\
+		return CTcpServer ## name::NewL(aProvd);\
+		}
+	
+#define END_TESTLIST \
+	User::Leave(KErrNotSupported);\
+	return NULL;	
+	
+CTcpServerTestBase* CTcpServerTestBase::CreateTestL(const TDesC& aTestName, CProxyProvd* aProvd)
+	{
+	BEGIN_TESTLIST
+	
+		ADD_TEST(TestUPnP)
+		ADD_TEST(TestUPnP1)
+		ADD_TEST(TestUPnP2)
+		ADD_TEST(TestUPnP3)
+		ADD_TEST(TestUPnP4)
+		ADD_TEST(TestUPnP5)
+		ADD_TEST(TestUPnP6)
+		ADD_TEST(TestUPnP7)
+		ADD_TEST(TestUPnP8)
+		ADD_TEST(TestUPnP9)
+		ADD_TEST(TestUPnP10)
+		ADD_TEST(TestUPnP11)
+		ADD_TEST(TestUPnP12)
+		ADD_TEST(TestUPnP13)
+		ADD_TEST(TestUPnP14)
+		ADD_TEST(TestUPnP15)
+		ADD_TEST(TestUPnP16)
+		ADD_TEST(TestUPnP17)
+		ADD_TEST(TestUPnP18)
+		ADD_TEST(TestUPnP19)
+		ADD_TEST(TestUPnP20)
+		ADD_TEST(TestUPnP21)
+		ADD_TEST(TestUPnP22)
+		ADD_TEST(TestUPnP23)
+		ADD_TEST(TestUPnP24)
+		ADD_TEST(TestUPnP25)
+		ADD_TEST(TestUPnP26)
+		ADD_TEST(TestUPnP27)
+		ADD_TEST(TestUPnP28)
+		ADD_TEST(TestUPnP29)
+		ADD_TEST(TestUPnP30)
+		ADD_TEST(TestUPnP31)
+		ADD_TEST(TestUPnP32)
+		ADD_TEST(TestUPnP33)
+		ADD_TEST(TestUPnP34)
+		ADD_TEST(TestUPnP35) //TcpServer Recv timeout
+		ADD_TEST(TestUPnP36) //TcpServer Recv timeout
+		ADD_TEST(TestUPnP37) //TcpServer Recv timeout
+		ADD_TEST(TestUPnP38) //Test Case failing
+		ADD_TEST(TestUPnP39)
+		ADD_TEST(TestUPnP40)
+		ADD_TEST(TestUPnP41)
+		ADD_TEST(TestUPnP42)
+		
+	END_TESTLIST
+	}
+
+
+void CTcpServerTestBase::StartTestL(const TDesC& aTestName, CProxyProvd* aProvd)
+	{
+	CTcpServerTestBase* test = CreateTestL(aTestName,aProvd);
+	CleanupStack::PushL(test);
+	test->ConstructL();
+	CActiveScheduler::Add(test);
+	CleanupStack::Pop(test);
+	TRequestStatus* stat = &test->iStatus;
+	test->SetActive();
+	User::RequestComplete(stat,KErrNone);
+	}
+
+CTcpServerTestBase::CTcpServerTestBase(CProxyProvd* aProvd) :
+	CActive(EPriorityNormal),
+	iProvd(aProvd)
+	{}
+	
+void CTcpServerTestBase::ConstructL()
+	{
+	//Create the Chunk Manager
+	CChunkManager* chkmgr = CChunkManager::NewL ( KHeapSize );
+	if ( chkmgr )
+		{
+		chkmgr->AddPoolL ( KBlockSize1, KInitialAllocation1, KMinGrowth1, KThresholdGrowth1 );
+		}
+	
+	iChunkManager = chkmgr;
+
+	SetLoggerL();
+	}
+	
+CTcpServerTestBase::~CTcpServerTestBase()
+	{
+	iLogger.Close();
+	delete iChunkManager;
+	}
+
+/**	Override this function if you want cleanup to happen before the completion of
+	the test case. This function is called before the test is completed 
+ */
+void CTcpServerTestBase::Cleanup()
+	{}
+
+/** Sets the test case as active again and prevents the object from being destroyed
+	when the RunL completes.
+	
+	Note: The active object is not complete the request again automatically, if this behaviour is
+	desired the user must call User::RequestComplete
+ */
+void CTcpServerTestBase::Reschedule()
+	{
+	SetActive();
+	iReschedule = TRUE;
+	}
+	
+void CTcpServerTestBase::CompleteSelf ( TInt aError )
+	{
+	TRequestStatus* pStat = &iStatus;
+    User::RequestComplete ( pStat, aError );
+	}	
+
+/** Attaches the iLogger variable to the TestExecute Log Server. This enable this prt to write to
+	the testexecute logs as if it were running directly from TestExecute
+ */
+// 	SetLoggerL() is taken directly from CTestServer::StartLoggerL() in the TEF src TestServerBase.Cpp
+
+
+void CTcpServerTestBase::SetLoggerL()
+	{
+    	// Create a cinidata object for parsing the testexecute.ini
+	CTestExecuteIniData* parseTestExecuteIni = NULL;
+	TBuf<KMaxTestExecuteNameLength> resultFilePath;
+	TBuf<KMaxTestExecuteNameLength> xmlFilePath;
+	TInt logMode;
+	TInt logLevel;
+	
+	TRAPD(err,parseTestExecuteIni = CTestExecuteIniData::NewL());
+	if (err == KErrNone)
+		{
+		CleanupStack::PushL(parseTestExecuteIni);
+		parseTestExecuteIni->ExtractValuesFromIni();
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFHtmlKey, resultFilePath);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFXmlKey, xmlFilePath);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFLogMode, logMode);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFLogSeverityKey, logLevel);
+		}
+	else
+		{
+		resultFilePath.Copy(KTestExecuteLogPath);
+		xmlFilePath.Copy(KTestExecuteLogPath);
+		logMode = TLoggerOptions(ELogHTMLOnly);
+		logLevel = RFileFlogger::TLogSeverity(ESevrAll);
+		}
+	Logger().SetLoggerOptions(logMode);
+		
+	// Initialise a handle to the file logger
+	User::LeaveIfError(Logger().Connect());
+	RFs fS;
+	User::LeaveIfError(fS.Connect());
+	CleanupClosePushL(fS);
+	RFile file;
+	TBuf<KMaxTestExecuteNameLength> xmlLogFile(xmlFilePath);
+	TBuf<KMaxTestExecuteNameLength> logFile;
+	TBuf<KMaxTestExecuteNameLength> logFileNameFile(resultFilePath);
+	logFileNameFile.Append(KTestExecuteScheduleTestLogCompatibilityNameFile);
+	if(file.Open(fS,logFileNameFile,EFileRead | EFileShareAny) != KErrNone)
+		{
+		// For the old flogger we have to create an individual file
+		_LIT(KTxtLog,"TEIntSock.txt");
+		logFile.Copy(KTxtLog);
+		logMode = TLoggerOptions(0);
+		Logger().SetLoggerOptions(logMode);
+		}
+	else
+		{
+		CleanupClosePushL(file);
+		TBuf8<KMaxTestExecuteNameLength> logFile8;
+		TInt fileSize;
+		User::LeaveIfError(file.Size(fileSize));
+		User::LeaveIfError(file.Read(logFile8,fileSize));
+		logFile.Copy(logFile8);
+		xmlLogFile.Append(logFile);
+		_LIT(KXmlExtension,".xml");
+		xmlLogFile.Append(KXmlExtension);
+		_LIT(KHtmExtension,".htm");
+		logFile.Append(KHtmExtension);
+		CleanupStack::Pop(&file);
+		file.Close();
+		}
+	TBuf<KMaxTestExecuteLogFilePath> logFilePath(resultFilePath);
+	logFilePath.Append(logFile);
+	CleanupStack::Pop(&fS);
+	fS.Close();
+	
+	if (logMode == 0 || logMode == 2)
+		{
+		User::LeaveIfError(Logger().HtmlLogger().CreateLog(logFilePath,	RTestExecuteLogServ::ELogModeAppend));
+		}
+	if (logMode == 1 || logMode == 2)
+		{
+		User::LeaveIfError(Logger().XmlLogger().CreateLog(xmlLogFile,RFileFlogger::ELogModeAppend));
+		Logger().XmlLogger().SetLogLevel(RFileFlogger::TLogSeverity(logLevel));
+		}
+	if (parseTestExecuteIni != NULL)
+		{
+		CleanupStack::PopAndDestroy(parseTestExecuteIni);
+		}
+	}
+	
+
+	
+/** Called by the active scheduler in order to run the test 
+ */
+void CTcpServerTestBase::RunL()
+	{
+	iReschedule = EFalse;
+	TVerdict res = RunTestL();
+	if (!iReschedule)
+		{
+		Cleanup();
+		FinishTest(res);
+		delete this;
+		return;
+		}
+	}
+	
+void CTcpServerTestBase::FinishTest(TVerdict aResult)
+	{
+	iProvd->TestComplete(aResult);
+	}
+	
+void CTcpServerTestBase::DoCancel()
+	{
+	Cleanup();
+	}
+	
+//------------------------------------------------------------//	
+/////////////////// CTcpServerTestUPnP /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+CTcpServerTestUPnP* CTcpServerTestUPnP::NewL ( CProxyProvd* aProvd )
+	{
+	CTcpServerTestUPnP* ret = new ( ELeave ) CTcpServerTestUPnP ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CTcpServerTestUPnP::CTcpServerTestUPnP ( CProxyProvd* aProvd ) :
+	CTcpServerTestBase ( aProvd ), iSocketHandler ( *this ), iHostAddr ( KInetAddrLoop, KHttpDefaultPort ), iState ( ECreateServer )
+	{
+	}
+	
+CTcpServerTestUPnP::~CTcpServerTestUPnP ()
+	{
+	iServiceUri.Close ();
+		
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	
+	iTimer.Close ();
+	
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CTcpServerTestUPnP::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	
+	iServiceUri.CreateL ( KTestUPnPServiceUri );
+	
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CTcpServerTestUPnP::RunTestL ()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{
+			const TUint8* uriPtr = NULL;
+			uriPtr = iServiceUri.Ptr ();
+			
+			const TUid reqUid = { CUPnPFlowFactory::iUid };		
+			THttpServerFlowQuery flowQuery ( uriPtr,
+										 iServiceUri.Size (),
+										 Id (),
+										 EHttpServerFlow, iChunkManager );
+			TCFPlayerRole playerRole ( TCFPlayerRole::EDataPlane );
+			
+			ESock::TCFFactory::TFindOrCreatePeer msg ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery );
+			TNodeId factoryContainer = SockManGlobals::Get()->GetPlaneFC( playerRole );
+			
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, reqUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocketAndConnect;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case EOpenClientSocketAndConnect:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockStream, KProtocolInetTcp );
+			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KMissingHost );
+			iSocketHandler.Send ( iSendChain );
+			
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{	
+			// cleanup tcp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iTcpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return iResponse; // Here the final test case is passed back to the RSocket::Ioctl
+			}
+					
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CTcpServerTestUPnP::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );	
+	
+	iSocketHandler.Connect ( iHostAddr );
+	}
+	
+void CTcpServerTestUPnP::ConnectComplete ()
+	{	
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP::SendComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	iSocketHandler.Recv ();
+	}
+	
+void CTcpServerTestUPnP::RecvComplete ( RMBufChain& aData )
+	{
+	RBuf8 responseBuf;
+	responseBuf.CreateMax ( aData.Length () );
+	aData.CopyOut ( responseBuf );
+	aData.Free ();
+	
+	if ( responseBuf.FindF ( KExpectedResponse ) == KErrNotFound )
+		{
+		iResponse = EFail; // test case failed
+		}
+	else
+		{
+		iResponse = EPass;	// test case passed
+		}
+	
+	responseBuf.Close ();
+	CompleteSelf ( KErrNone );
+	}
+	
+void CTcpServerTestUPnP::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iTcpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/data/ip.proxy.tcpclient.esk	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+[sockman]
+XprotocolsX= irda
+XprotocolsX= ncp1,ncp2,irda,udp
+protocols= proxy
+
+[proxy]
+filename= tcpclient.PRT
+index= 1
+
+[nifman]
+default= testagent
+maxmbufheap= 2048
+
+[agents]
+testagent= adummy.agt
+testdmy= adummy.agt
+
+[interfaces]
+testsglif= idummy.nif
+testmulif= idummy.nif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/data/ip.proxy.tcpserver.esk	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+[sockman]
+XprotocolsX= irda
+XprotocolsX= ncp1,ncp2,irda,udp
+protocols= proxy
+
+[proxy]
+filename= tcpserver.PRT
+index= 1
+
+[nifman]
+default= testagent
+maxmbufheap= 2048
+
+[agents]
+testagent= adummy.agt
+testdmy= adummy.agt
+
+[interfaces]
+testsglif= idummy.nif
+testmulif= idummy.nif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/data/ip.proxy.udpclient.esk	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+[sockman]
+XprotocolsX= irda
+XprotocolsX= ncp1,ncp2,irda,udp
+protocols= proxy
+
+[proxy]
+filename= udpclient.PRT
+index= 1
+
+[nifman]
+default= testagent
+maxmbufheap= 2048
+
+[agents]
+testagent= adummy.agt
+testdmy= adummy.agt
+
+[interfaces]
+testsglif= idummy.nif
+testmulif= idummy.nif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/data/ip.proxy.udpserver.esk	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+[sockman]
+XprotocolsX= irda
+XprotocolsX= ncp1,ncp2,irda,udp
+protocols= proxy
+
+[proxy]
+filename= udpserver.PRT
+index= 1
+
+[nifman]
+default= testagent
+maxmbufheap= 2048
+
+[agents]
+testagent= adummy.agt
+testdmy= adummy.agt
+
+[interfaces]
+testsglif= idummy.nif
+testmulif= idummy.nif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,59 @@
+/*
+* 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:
+*
+*/
+
+
+/**
+@file
+*/
+
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+../inc/es_dummy.h SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(es_dummy.h)
+../group/te_serverbase.iby	/epoc32/rom/include/te_serverbase.iby
+
+../scriptfiles/te_upnp_test_copy_config_files.script	z:/upnp/servertests/scripts/te_upnp_test_copy_config_files.script
+../scriptfiles/te_upnp_test_remove_config_files.script  z:/upnp/servertests/scripts/te_upnp_test_remove_config_files.script
+
+//Config for UPnP_One  Thread
+../data/ip.proxy.udpclient.esk      z:/upnp/servertests/configs/esock/ip.proxy.udpclient.esk
+../data/ip.proxy.udpserver.esk      z:/upnp/servertests/configs/esock/ip.proxy.udpserver.esk
+../data/ip.proxy.tcpserver.esk      z:/upnp/servertests/configs/esock/ip.proxy.tcpserver.esk
+../data/ip.proxy.tcpclient.esk      z:/upnp/servertests/configs/esock/ip.proxy.tcpclient.esk
+
+// unit tests scripts files are added here
+../scriptfiles/te_upnp_udpclient_test_with_config.script	z:/upnp/servertests/scripts/te_upnp_udpclient_test_with_config.script
+../scriptfiles/te_upnp_udpclient.script 					z:/upnp/servertests/scripts/te_upnp_udpclient.script
+
+../scriptfiles/te_upnp_udpserver_test_with_config.script	z:/upnp/servertests/scripts/te_upnp_udpserver_test_with_config.script
+../scriptfiles/te_upnp_udpserver.script 					z:/upnp/servertests/scripts/te_upnp_udpserver.script
+
+../scriptfiles/te_upnp_tcpserver_test_with_config.script	z:/upnp/servertests/scripts/te_upnp_tcpserver_test_with_config.script
+../scriptfiles/te_upnp_tcpserver.script 					z:/upnp/servertests/scripts/te_upnp_tcpserver.script
+
+../scriptfiles/te_upnp_tcpclient_test_with_config.script	z:/upnp/servertests/scripts/te_upnp_tcpclient_test_with_config.script
+../scriptfiles/te_upnp_tcpclient.script 					z:/upnp/servertests/scripts/te_upnp_tcpclient.script
+../scriptfiles/dummy.ini 									z:/upnp/servertests/scripts/dummy.ini
+
+
+PRJ_TESTMMPFILES
+
+./te_serverbase.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/group/te_serverbase.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* 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 __TE_SERVERBASE_IBY__
+#define __TE_SERVERBASE_IBY__
+
+#include <testexecute.iby>
+
+file=ABI_DIR\DEBUG_DIR\te_serverbase.exe							System\Libs\te_serverbase.exe
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_udpclient.script			Testdata\scripts\te_upnp_udpclient.script
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_udpserver.script			Testdata\scripts\te_upnp_udpserver.script
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_tcpserver.script			Testdata\scripts\te_upnp_tcpserver.script
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_tcpclient.script			Testdata\scripts\te_upnp_tcpclient.script
+
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_udpclient_test_with_config.script		Testdata\scripts\te_upnp_udpclient_test_with_config.script
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_udpserver_test_with_config.script		Testdata\scripts\te_upnp_udpserver_test_with_config.script
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_tcpserver_test_with_config.script		Testdata\scripts\te_upnp_tcpserver_test_with_config.script
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_tcpclient_test_with_config.script		Testdata\scripts\te_upnp_tcpclient_test_with_config.script
+
+data=EPOCROOT##epoc32\data\z\testdata\configs\esock\ip.proxy.udpclient.esk TestData\configs\ESock\ip.proxy.udpclient.esk
+data=EPOCROOT##epoc32\data\z\testdata\configs\esock\ip.proxy.udpserver.esk TestData\configs\ESock\ip.proxy.udpserver.esk
+data=EPOCROOT##epoc32\data\z\testdata\configs\esock\ip.proxy.tcpserver.esk TestData\configs\ESock\ip.proxy.tcpserver.esk
+data=EPOCROOT##epoc32\data\z\testdata\configs\esock\ip.proxy.tcpclient.esk TestData\configs\ESock\ip.proxy.tcpclient.esk
+
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_test_remove_config_files.script Testdata\scripts\te_upnp_test_remove_config_files.script
+data=EPOCROOT##epoc32\data\z\TestData\scripts\te_upnp_test_copy_config_files.script	Testdata\scripts\te_upnp_test_copy_config_files.script
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/group/te_serverbase.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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:
+*
+*/
+
+
+
+TARGET      te_serverbase.exe
+
+TARGETTYPE  exe
+
+CAPABILITY All -TCB
+UID             0x1000007B
+VENDORID 0x70000001
+
+
+SOURCEPATH    ../src
+SOURCE        te_serverbase.cpp
+SOURCE        te_serverbaseteststep.cpp
+
+USERINCLUDE   	../inc
+USERINCLUDE   	../../udpclient/inc
+
+SYSTEMINCLUDE 	/epoc32/include
+SYSTEMINCLUDE   /epoc32/include/test
+SYSTEMINCLUDE  	/epoc32/include/networking
+
+LIBRARY    	euser.lib esock.lib
+LIBRARY		testexecutelogclient.lib
+LIBRARY		testexecuteutils.lib
+LIBRARY		efsrv.lib
+
+SMPSAFE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/inc/es_dummy.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,115 @@
+/*
+* 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:
+*
+*/
+
+
+
+#if !defined (__ES_DUMMY_H__)
+#define __ES_DUMMY_H__
+
+#include <e32def.h>
+ #include <es_sock.h>
+
+const TUint KDummyIoctlCheckStarted=0x000000010;
+const TUint KDummyIoctlCheckBound=0x00000011;
+const TUint KDummyIoctlIgnore=0x00000111;
+const TUint KDummyIoctlCancelled=0x00001111;
+
+//RProperty Handles for Dummy Protocol
+ const TUid KDummyUid                        = {0x1020316E};
+ const TInt KDummyTerminationProperty        = 1; 
+//This property needs to be set to 0 for normal operation 
+ //and 1 to request termination
+ 
+ 
+ //Socket server test ioclts
+ const TUint KDummyIoctlPanicProtocolModule  = 0x00003001;
+ const TUint KDummyIocltNonCompleting        = 0x00003002;
+ const TUint KDummyIoctlPanicDealer          = 0x00003003;
+ const TUint KDummyIoctBlockHardOnClose      = 0x00003004;
+ const TUint KDummyIoctlSlowIoctlReturn      = 0x00003005;
+ const TUint KDummyIoctlHangIoctlReturn      = 0x00003006;
+ const TUint KDummyIocltJustComplete         = 0x00003007;
+const TUint KDummyIocltRemoteDisconnect     = 0x00003008;
+const TUint KDummyIoctlCompleteWithData     = 0x00003009;
+
+const TUint KIoctlDummyLevel=KSOLSocket+1;
+const TUint KDummyOptionSetConnectComplete  =   0x00001234;
+ const TUint KDummyOptionSetErrorNextListen  =   0x00000001;
+const TUint KDummyOptionSetBlockConnect     =   0x00000010;
+const TUint KDummyOptionSetIocltComplete    =   0x00000020;
+const TUint KDummyOptionSetErrorNextWrite   =   0x00000030;
+ const TUint KDummyOptionSetErrorNextShutdown=   0x00000040;
+const TUint KDummyOptionSetErrorNextConnect =   0x00000050;
+const TUint KDummyOptionSetFlowOffWrite     =   0x00000060;
+ const TUint KDummyOptionSetTimedFlowOffWrite =  0x00000070;
+const TUint KDummyOptionSetGobbleMBufs       =  0x00000380;
+const TUint KDummyOptionSetFreeMBufs         =  0x00000390;
+const TUint KDummyOptionSetFreeSomeMBufs     =  0x000003a0;
+const TUint KDummyOptionGetMBufFreeSpace     =  0x000003b0;
+const TUint KDummyOptionSetBlockConnectData  =  0x000003c0;
+
+ // set option used for testing CProtocolBase implemenations
+ const TUint KDummyOptionSetProtocolBaseBind                 =   0x00000110;
+ const TUint KDummyOptionSetProtocolBaseBindTo               =   0x00000120;
+const TUint KDummyOptionSetProtocolBaseError                =   0x00000130;
+const TUint KDummyOptionSetProtocolBaseGetOption            =   0x00000140;
+const TUint KDummyOptionSetProtocolBaseNewHostResolver      =   0x00000150;
+const TUint KDummyOptionSetProtocolBaseNewNetDatabase       =   0x00000160;
+const TUint KDummyOptionSetProtocolBaseNewSAP               =   0x00000170;
+const TUint KDummyOptionSetProtocolBaseNewServiceResolver   =   0x00000180;
+const TUint KDummyOptionProtocolBaseProcess                 =   0x00000190;
+const TUint KDummyOptionSetProtocolBaseSend                 =   0x000001a0;
+const TUint KDummyOptionSetProtocolBaseSetOption            =   0x000001b0;
+ 
+ const TUint KDummyOptionLeakMemory          =   0x00000080;
+ //Socket Protocols and families
+
+ const TUint KPDummyNumProtocols=5;
+ const TUint KDummyAddrFamily=0xFFFF;    // was 0x10000; SIP inadvertently took that
+ const TUint KDummyOne=1;
+ const TUint KDummyTwo=2;
+ const TUint KDummyThree=3;
+const TUint KDummyFour=4;
+ const TUint KDummyFive=5;
+ 
+ const TUint KDummyMajor=0;
+ const TUint KDummyMinor=1;
+const TUint KDummyBuild=0;
+
+const TInt KDummyWriteFlowOffTimeout = 1000;
+
+ const TUint KDStreamServiceInfo = KSIReliable | KSIInOrder | KSIStreamBased | KSIUrgentData | KSIGracefulClose;
+ const TUint kDDatagramServiceInfo = KSIConnectionLess | KSIMessageBased | KSIBroadcast| KSIGracefulClose;
+ // Ioctl data
+ _LIT8(KIoctlData, "Ioctl Data");
+
+ // Connect complete data
+ _LIT8(KConnectCompleteData, "Connect Complete Data");
+ 
+ // Dummy protocol descriptive names
+ _LIT(KDummyOneName, "Dummy Protocol 1");
+ _LIT(KDummyTwoName, "Dummy Protocol 2");
+ _LIT(KDummyThreeName, "Dummy Protocol 3");
+ _LIT(KDummyFourName, "Dummy Protocol 4");
+ _LIT(KDummyFiveName, "Dummy Protocol 5");
+
+ // Dummy interface names
+ _LIT(KDummySglIfName, "testsglif");
+ _LIT(KDummyMulIfName, "testmulif");
+
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/inc/te_serverbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+/*
+* 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:
+*
+*/
+
+
+#if (!defined __TESTSERVERBASE_H__)
+#define __TESTSERVERBASE_H__
+
+#include <es_sock.h>
+#include <testexecuteserverbase.h>
+
+_LIT(KServerName,"te_serverbase");
+
+class CTestServerBase : public CTestServer	//this is the main test server which instantiates the test step classes 
+	{
+	public:
+		static CTestServer* NewL ();
+		CTestServerBase ();
+		~CTestServerBase ();
+		
+		CTestStep* CreateTestStep ( const TDesC& aStepName );
+		
+	private:
+	};
+
+#endif /* __TESTSERVERBASE_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/inc/te_serverbaseteststep.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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:
+*
+*/
+
+
+#if (!defined __TE_SERVERBASETESTSTEP_H__)
+#define __TE_SERVERBASETESTSTEP_H__
+
+
+#include <testexecutestepbase.h>  
+
+class CTestServerTestStep : public CTestStep	//this is the base test step class
+	{
+	public:
+		CTestServerTestStep ();
+		~CTestServerTestStep ();
+		
+		enum TVerdict doTestStepPreambleL( void );
+		enum TVerdict doTestStepL( void );
+		enum TVerdict doTestStepPostambleL( void );
+		
+	protected:
+		enum TVerdict InternalDoTestStepL( void );
+		void doPanicStepTestPreambleL( void );
+		void doPanicStepTestPostambleL( TRequestStatus& aStat );
+		const TPtrC& EpocErrorToText(const TInt aErrCode);
+	private:
+		TPtrC iErrText;
+		TBuf<16> iErrBuff;		// size must at least satisfy the number of digits used to represent a TInt
+		RThread iESockProxyThread;
+		TRequestStatus iESockProxyThreadStatus;
+	};
+
+#endif /* __TE_SERVERBASETESTSTEP_H__*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_tcpclient.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,107 @@
+//
+// 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:
+//
+
+LOAD_SUITE te_serverbase
+
+START_TESTCASE			UPnP-TCP-CLIENT-0101
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0101
+RUN_TEST_STEP 500 te_serverbase TestUPnP z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0101
+
+START_TESTCASE			UPnP-TCP-CLIENT-0102
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0102
+RUN_TEST_STEP 500 te_serverbase TestUPnP1 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0102
+
+START_TESTCASE			UPnP-TCP-CLIENT-0103
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0103
+RUN_TEST_STEP 500 te_serverbase TestUPnP2 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0103
+
+START_TESTCASE			UPnP-TCP-CLIENT-0116
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0116
+RUN_TEST_STEP 500 te_serverbase TestUPnP15 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0116
+
+START_TESTCASE			UPnP-TCP-CLIENT-0117
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0117
+RUN_TEST_STEP 500 te_serverbase TestUPnP16 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0117
+
+START_TESTCASE			UPnP-TCP-CLIENT-0118
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0118
+RUN_TEST_STEP 500 te_serverbase TestUPnP17 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0118
+
+START_TESTCASE			UPnP-TCP-CLIENT-0104
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0104
+RUN_TEST_STEP 500 te_serverbase TestUPnP3 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0104
+
+START_TESTCASE			UPnP-TCP-CLIENT-0105
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0105
+RUN_TEST_STEP 500 te_serverbase TestUPnP4 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0105
+
+START_TESTCASE			UPnP-TCP-CLIENT-0108
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0108
+RUN_TEST_STEP 500 te_serverbase TestUPnP7 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0108
+
+START_TESTCASE			UPnP-TCP-CLIENT-0114
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0114
+RUN_TEST_STEP 500 te_serverbase TestUPnP13 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0114
+
+START_TESTCASE			UPnP-TCP-CLIENT-0115
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0115
+RUN_TEST_STEP 500 te_serverbase TestUPnP14 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0115
+
+START_TESTCASE			UPnP-TCP-CLIENT-0111
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0111
+RUN_TEST_STEP 500 te_serverbase TestUPnP10 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0111
+
+//START_TESTCASE			UPnP-TCP-CLIENT-0110
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0110
+//RUN_TEST_STEP 500 te_serverbase TestUPnP9 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+//END_TESTCASE			UPnP-TCP-CLIENT-0110
+
+START_TESTCASE			UPnP-TCP-CLIENT-0112
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0112
+RUN_TEST_STEP 500 te_serverbase TestUPnP11 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0112
+
+START_TESTCASE			UPnP-TCP-CLIENT-0113
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0113
+RUN_TEST_STEP 500 te_serverbase TestUPnP12 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0113
+
+START_TESTCASE			UPnP-TCP-CLIENT-0106
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0106
+RUN_TEST_STEP 500 te_serverbase TestUPnP5 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0106
+
+START_TESTCASE			UPnP-TCP-CLIENT-0107
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0107
+RUN_TEST_STEP 500 te_serverbase TestUPnP6 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0107
+
+START_TESTCASE			UPnP-TCP-CLIENT-0109
+//! @SYMTestCaseID		UPnP-TCP-CLIENT-0109
+RUN_TEST_STEP 500 te_serverbase TestUPnP8 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpclient
+END_TESTCASE			UPnP-TCP-CLIENT-0109
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_tcpclient_test_with_config.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_remove_config_files.script
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_copy_config_files.script
+RUN_UTILS CopyFile z:\upnp\servertests\configs\esock\ip.proxy.tcpclient.esk  c:\private\101f7989\ESock\ip.proxy.tcpclient.esk
+RUN_UTILS MakeReadWrite  c:\private\101f7989\ESock\ip.proxy.tcpclient.esk
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_tcpclient.script
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_remove_config_files.script
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_copy_config_files.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_tcpserver.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,233 @@
+//
+// 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:
+//
+
+LOAD_SUITE te_serverbase
+
+START_TESTCASE			UPnP-TCP-SERVER-0101
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0101
+RUN_TEST_STEP 500 te_serverbase TestUPnP z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0101
+
+START_TESTCASE			UPnP-TCP-SERVER-0102
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0102
+RUN_TEST_STEP 500 te_serverbase TestUPnP1 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0102
+
+START_TESTCASE			UPnP-TCP-SERVER-0103
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0103
+RUN_TEST_STEP 500 te_serverbase TestUPnP2 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0103
+
+START_TESTCASE			UPnP-TCP-SERVER-0104
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0104
+RUN_TEST_STEP 500 te_serverbase TestUPnP3 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0104
+
+START_TESTCASE			UPnP-TCP-SERVER-0105
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0105
+RUN_TEST_STEP 500 te_serverbase TestUPnP4 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0105
+
+START_TESTCASE			UPnP-TCP-SERVER-0106
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0106
+RUN_TEST_STEP 500 te_serverbase TestUPnP5 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0106
+
+START_TESTCASE			UPnP-TCP-SERVER-0107
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0107
+RUN_TEST_STEP 500 te_serverbase TestUPnP6 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0107
+
+START_TESTCASE			UPnP-TCP-SERVER-0108
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0108
+RUN_TEST_STEP 500 te_serverbase TestUPnP7 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0108
+
+START_TESTCASE			UPnP-TCP-SERVER-0109
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0109
+RUN_TEST_STEP 500 te_serverbase TestUPnP8 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0109
+
+START_TESTCASE			UPnP-TCP-SERVER-0110
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0110
+RUN_TEST_STEP 500 te_serverbase TestUPnP9 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0110
+
+START_TESTCASE			UPnP-TCP-SERVER-0111
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0111
+RUN_TEST_STEP 500 te_serverbase TestUPnP10 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0111
+
+START_TESTCASE			UPnP-TCP-SERVER-0112
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0112
+RUN_TEST_STEP 500 te_serverbase TestUPnP11 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0112
+
+START_TESTCASE			UPnP-TCP-SERVER-0113
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0113
+RUN_TEST_STEP 500 te_serverbase TestUPnP12 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0113
+
+START_TESTCASE			UPnP-TCP-SERVER-0114
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0114
+RUN_TEST_STEP 500 te_serverbase TestUPnP13 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0114
+
+START_TESTCASE			UPnP-TCP-SERVER-0115
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0115
+RUN_TEST_STEP 500 te_serverbase TestUPnP14 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0115
+
+START_TESTCASE			UPnP-TCP-SERVER-0116
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0116
+RUN_TEST_STEP 500 te_serverbase TestUPnP15 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0116
+
+START_TESTCASE			UPnP-TCP-SERVER-0117
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0117
+RUN_TEST_STEP 500 te_serverbase TestUPnP16 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0117
+
+START_TESTCASE			UPnP-TCP-SERVER-0118
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0118
+RUN_TEST_STEP 500 te_serverbase TestUPnP17 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0118
+
+START_TESTCASE			UPnP-TCP-SERVER-0119
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0119
+RUN_TEST_STEP 500 te_serverbase TestUPnP18 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0119
+
+START_TESTCASE			UPnP-TCP-SERVER-0120
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0120
+RUN_TEST_STEP 500 te_serverbase TestUPnP19 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0120
+
+START_TESTCASE			UPnP-TCP-SERVER-0121
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0121
+RUN_TEST_STEP 500 te_serverbase TestUPnP20 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0121
+
+START_TESTCASE			UPnP-TCP-SERVER-0122
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0122
+RUN_TEST_STEP 500 te_serverbase TestUPnP21 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0122
+
+START_TESTCASE			UPnP-TCP-SERVER-0123
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0123
+RUN_TEST_STEP 500 te_serverbase TestUPnP22 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0123
+
+START_TESTCASE			UPnP-TCP-SERVER-0124
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0124
+RUN_TEST_STEP 500 te_serverbase TestUPnP23 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0124
+
+START_TESTCASE			UPnP-TCP-SERVER-0125
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0125
+RUN_TEST_STEP 500 te_serverbase TestUPnP24 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0125
+
+START_TESTCASE			UPnP-TCP-SERVER-0126
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0126
+RUN_TEST_STEP 500 te_serverbase TestUPnP25 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0126
+
+START_TESTCASE			UPnP-TCP-SERVER-0127
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0127
+RUN_TEST_STEP 500 te_serverbase TestUPnP26 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0127
+
+START_TESTCASE			UPnP-TCP-SERVER-0128
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0128
+RUN_TEST_STEP 500 te_serverbase TestUPnP27 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0128
+
+START_TESTCASE			UPnP-TCP-SERVER-0129
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0129
+RUN_TEST_STEP 500 te_serverbase TestUPnP28 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0129
+
+START_TESTCASE			UPnP-TCP-SERVER-0130
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0130
+RUN_TEST_STEP 500 te_serverbase TestUPnP29 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0130
+
+START_TESTCASE			UPnP-TCP-SERVER-0131
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0131
+RUN_TEST_STEP 500 te_serverbase TestUPnP30 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0131
+
+START_TESTCASE			UPnP-TCP-SERVER-0132
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0132
+RUN_TEST_STEP 500 te_serverbase TestUPnP31 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0132
+
+START_TESTCASE			UPnP-TCP-SERVER-0133
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0133
+RUN_TEST_STEP 500 te_serverbase TestUPnP32 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0133
+
+START_TESTCASE			UPnP-TCP-SERVER-0134
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0134
+RUN_TEST_STEP 500 te_serverbase TestUPnP33 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0134
+
+START_TESTCASE			UPnP-TCP-SERVER-0135
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0135
+RUN_TEST_STEP 500 te_serverbase TestUPnP34 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0135
+
+START_TESTCASE			UPnP-TCP-SERVER-0136
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0136
+RUN_TEST_STEP 500 te_serverbase TestUPnP35 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0136
+
+START_TESTCASE			UPnP-TCP-SERVER-0137
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0137
+RUN_TEST_STEP 500 te_serverbase TestUPnP36 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0137
+
+START_TESTCASE			UPnP-TCP-SERVER-0138
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0138
+RUN_TEST_STEP 500 te_serverbase TestUPnP37 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0138
+
+START_TESTCASE			UPnP-TCP-SERVER-0139
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0139
+RUN_TEST_STEP 500 te_serverbase TestUPnP38 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0139
+
+START_TESTCASE			UPnP-TCP-SERVER-0140
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0140
+RUN_TEST_STEP 500 te_serverbase TestUPnP39 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0140
+
+START_TESTCASE			UPnP-TCP-SERVER-0141
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0141
+RUN_TEST_STEP 500 te_serverbase TestUPnP40 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0141
+
+START_TESTCASE			UPnP-TCP-SERVER-0142
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0142
+RUN_TEST_STEP 500 te_serverbase TestUPnP41 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0142
+
+START_TESTCASE			UPnP-TCP-SERVER-0143
+//! @SYMTestCaseID		UPnP-TCP-SERVER-0143
+RUN_TEST_STEP 500 te_serverbase TestUPnP42 z:\upnp\servertests\scripts\dummy.ini te_upnp_tcpserver
+END_TESTCASE			UPnP-TCP-SERVER-0143
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_tcpserver_test_with_config.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_remove_config_files.script
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_copy_config_files.script
+RUN_UTILS CopyFile z:\upnp\servertests\configs\esock\ip.proxy.tcpserver.esk  c:\private\101f7989\ESock\ip.proxy.tcpserver.esk
+RUN_UTILS MakeReadWrite  c:\private\101f7989\ESock\ip.proxy.tcpserver.esk
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_tcpserver.script
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_remove_config_files.script
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_copy_config_files.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_test_copy_config_files.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,25 @@
+//
+// 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:
+//
+//copies the config files for test case 5
+
+PRINT Loading config UPnP_OneThread
+
+RUN_UTILS MkDir c:\private\
+RUN_UTILS MkDir c:\private\101F7988\
+RUN_UTILS MkDir c:\private\101f7989\
+RUN_UTILS MkDir c:\private\101f7989\ESock\
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_test_remove_config_files.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+//
+// 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:
+//
+//te_upnp_test_remove_config_files.script
+//Deleted all test cmi and esk files that may have been added
+
+PRINT Deleting all temporary config files
+
+RUN_UTILS DeleteFile c:\private\101F7988\esock_dealer2.cmi
+RUN_UTILS DeleteFile c:\private\101F7988\ipc.cmi
+RUN_UTILS DeleteFile c:\private\101F7988\pdummy1.cmi
+RUN_UTILS DeleteFile c:\private\101F7988\pdummy2.cmi
+RUN_UTILS DeleteFile c:\private\101F7988\esock_codealer1.cmi
+RUN_UTILS DeleteFile c:\private\101F7988\esock_codealer2.cmi
+RUN_UTILS DeleteFile c:\private\101F7988\proxy.cmi
+RUN_UTILS DeleteFile c:\private\101F7988\dummy.cmi
+RUN_UTILS DeleteFile c:\private\101F7988\blocker.cmi
+
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\ipc.esock.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\pdummy1.esock.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\pdummy2.esock.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\pdummy3.esock.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\codealer1.esock.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\codealer2.esock1.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\codealer2.esock2.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\proxy.dummy.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\proxy.proxy.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\dummy.dummy.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\pdummy1.providers.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\ip.proxy.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\ip.proxy.udpclient.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\ip.proxy.udpserver.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\ip.proxy.tcpserver.esk
+RUN_UTILS DeleteFile c:\private\101f7989\ESock\ip.proxy.tcpclient.esk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_udpclient.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+
+LOAD_SUITE te_serverbase
+
+START_TESTCASE			UPnP-UDP-CLIENT-0101
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0101
+RUN_TEST_STEP 500 te_serverbase TestUPnP
+END_TESTCASE			UPnP-UDP-CLIENT-0101
+
+START_TESTCASE			UPnP-UDP-CLIENT-0102
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0102
+RUN_TEST_STEP 500 te_serverbase TestUPnP1
+END_TESTCASE			UPnP-UDP-CLIENT-0102
+
+START_TESTCASE			UPnP-UDP-CLIENT-0103
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0103
+RUN_TEST_STEP 500 te_serverbase TestUPnP2
+END_TESTCASE			UPnP-UDP-CLIENT-0103
+
+START_TESTCASE			UPnP-UDP-CLIENT-0104
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0104
+RUN_TEST_STEP 500 te_serverbase TestUPnP3
+END_TESTCASE			UPnP-UDP-CLIENT-0104
+
+START_TESTCASE			UPnP-UDP-CLIENT-0105
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0105
+RUN_TEST_STEP 500 te_serverbase TestUPnP4
+END_TESTCASE			UPnP-UDP-CLIENT-0105
+
+START_TESTCASE			UPnP-UDP-CLIENT-0106
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0106
+RUN_TEST_STEP 500 te_serverbase TestUPnP5
+END_TESTCASE			UPnP-UDP-CLIENT-0106
+
+START_TESTCASE			UPnP-UDP-CLIENT-0107
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0107
+RUN_TEST_STEP 500 te_serverbase TestUPnP6
+END_TESTCASE			UPnP-UDP-CLIENT-0107
+
+START_TESTCASE			UPnP-UDP-CLIENT-0108
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0108
+RUN_TEST_STEP 500 te_serverbase TestUPnP7
+END_TESTCASE			UPnP-UDP-CLIENT-0108
+
+START_TESTCASE			UPnP-UDP-CLIENT-0109
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0109
+RUN_TEST_STEP 500 te_serverbase TestUPnP8
+END_TESTCASE			UPnP-UDP-CLIENT-0109
+
+START_TESTCASE			UPnP-UDP-CLIENT-0110
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0110
+RUN_TEST_STEP 500 te_serverbase TestUPnP9
+END_TESTCASE			UPnP-UDP-CLIENT-0110
+
+START_TESTCASE			UPnP-UDP-CLIENT-0111
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0111
+RUN_TEST_STEP 500 te_serverbase TestUPnP10
+END_TESTCASE			UPnP-UDP-CLIENT-0111
+
+START_TESTCASE			UPnP-UDP-CLIENT-0112
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0112
+RUN_TEST_STEP 500 te_serverbase TestUPnP11
+END_TESTCASE			UPnP-UDP-CLIENT-0112
+
+START_TESTCASE			UPnP-UDP-CLIENT-0113
+//! @SYMTestCaseID		UPnP-UDP-CLIENT-0113
+RUN_TEST_STEP 500 te_serverbase TestUPnP12
+END_TESTCASE			UPnP-UDP-CLIENT-0113
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_udpclient_test_with_config.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_remove_config_files.script
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_copy_config_files.script
+RUN_UTILS CopyFile z:\upnp\servertests\configs\esock\ip.proxy.udpclient.esk  c:\private\101f7989\ESock\ip.proxy.udpclient.esk
+RUN_UTILS MakeReadWrite  c:\private\101f7989\ESock\ip.proxy.udpclient.esk
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_udpclient.script
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_remove_config_files.script
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_copy_config_files.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_udpserver.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,133 @@
+//
+// 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:
+//
+
+LOAD_SUITE te_serverbase
+
+
+START_TESTCASE			UPnP-UDP-SERVER-0122
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0122
+RUN_TEST_STEP 500 te_serverbase TestUPnP22
+END_TESTCASE			UPnP-UDP-SERVER-0122
+
+START_TESTCASE			UPnP-UDP-SERVER-0121
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0121
+RUN_TEST_STEP 500 te_serverbase TestUPnP21
+END_TESTCASE			UPnP-UDP-SERVER-0121
+
+START_TESTCASE			UPnP-UDP-SERVER-0115
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0115
+RUN_TEST_STEP 500 te_serverbase TestUPnP15
+END_TESTCASE			UPnP-UDP-SERVER-0115
+
+START_TESTCASE			UPnP-UDP-SERVER-0116
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0116
+RUN_TEST_STEP 500 te_serverbase TestUPnP16
+END_TESTCASE			UPnP-UDP-SERVER-0116
+
+START_TESTCASE			UPnP-UDP-SERVER-0117
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0117
+RUN_TEST_STEP 500 te_serverbase TestUPnP17
+END_TESTCASE			UPnP-UDP-SERVER-0117
+
+START_TESTCASE			UPnP-UDP-SERVER-0118
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0118
+RUN_TEST_STEP 500 te_serverbase TestUPnP18
+END_TESTCASE			UPnP-UDP-SERVER-0118
+
+START_TESTCASE			UPnP-UDP-SERVER-0119
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0119
+RUN_TEST_STEP 500 te_serverbase TestUPnP19
+END_TESTCASE			UPnP-UDP-SERVER-0119
+
+START_TESTCASE			UPnP-UDP-SERVER-0120
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0120
+RUN_TEST_STEP 500 te_serverbase TestUPnP20
+END_TESTCASE			UPnP-UDP-SERVER-0120
+
+START_TESTCASE			UPnP-UDP-SERVER-0114
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0114
+RUN_TEST_STEP 500 te_serverbase TestUPnP14
+END_TESTCASE			UPnP-UDP-SERVER-0114
+
+START_TESTCASE			UPnP-UDP-SERVER-0113
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0113
+RUN_TEST_STEP 500 te_serverbase TestUPnP12
+END_TESTCASE			UPnP-UDP-SERVER-0113
+
+START_TESTCASE			UPnP-UDP-SERVER-0113
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0113
+RUN_TEST_STEP 500 te_serverbase TestUPnP13
+END_TESTCASE			UPnP-UDP-SERVER-0113
+
+START_TESTCASE			UPnP-UDP-SERVER-0101
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0101
+RUN_TEST_STEP 500 te_serverbase TestUPnP
+END_TESTCASE			UPnP-UDP-SERVER-0101
+
+START_TESTCASE			UPnP-UDP-SERVER-0111
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0111
+RUN_TEST_STEP 500 te_serverbase TestUPnP10
+END_TESTCASE			UPnP-UDP-SERVER-0111
+
+START_TESTCASE			UPnP-UDP-SERVER-0112
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0112
+RUN_TEST_STEP 500 te_serverbase TestUPnP11
+END_TESTCASE			UPnP-UDP-SERVER-0112
+
+START_TESTCASE			UPnP-UDP-SERVER-0110
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0110
+RUN_TEST_STEP 500 te_serverbase TestUPnP9
+END_TESTCASE			UPnP-UDP-SERVER-0110
+
+START_TESTCASE			UPnP-UDP-SERVER-0109
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0109
+RUN_TEST_STEP 500 te_serverbase TestUPnP8
+END_TESTCASE			UPnP-UDP-SERVER-0109
+
+START_TESTCASE			UPnP-UDP-SERVER-0108
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0108
+RUN_TEST_STEP 500 te_serverbase TestUPnP7
+END_TESTCASE			UPnP-UDP-SERVER-0108
+
+START_TESTCASE			UPnP-UDP-SERVER-0107
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0107
+RUN_TEST_STEP 500 te_serverbase TestUPnP6
+END_TESTCASE			UPnP-UDP-SERVER-0107
+
+START_TESTCASE			UPnP-UDP-SERVER-0106
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0106
+RUN_TEST_STEP 500 te_serverbase TestUPnP5
+END_TESTCASE			UPnP-UDP-SERVER-0106
+
+START_TESTCASE			UPnP-UDP-SERVER-0105
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0105
+RUN_TEST_STEP 500 te_serverbase TestUPnP4
+END_TESTCASE			UPnP-UDP-SERVER-0105
+
+START_TESTCASE			UPnP-UDP-SERVER-0104
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0104
+RUN_TEST_STEP 500 te_serverbase TestUPnP3
+END_TESTCASE			UPnP-UDP-SERVER-0104
+
+START_TESTCASE			UPnP-UDP-SERVER-0103
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0103
+RUN_TEST_STEP 500 te_serverbase TestUPnP2
+END_TESTCASE			UPnP-UDP-SERVER-0103
+
+START_TESTCASE			UPnP-UDP-SERVER-0102
+//! @SYMTestCaseID		UPnP-UDP-SERVER-0102
+RUN_TEST_STEP 500 te_serverbase TestUPnP1
+END_TESTCASE			UPnP-UDP-SERVER-0102
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/scriptfiles/te_upnp_udpserver_test_with_config.script	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+//
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_remove_config_files.script
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_copy_config_files.script
+RUN_UTILS CopyFile z:\upnp\servertests\configs\esock\ip.proxy.udpserver.esk  c:\private\101f7989\ESock\ip.proxy.udpserver.esk
+RUN_UTILS MakeReadWrite  c:\private\101f7989\ESock\ip.proxy.udpserver.esk
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_udpserver.script
+
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_remove_config_files.script
+RUN_SCRIPT z:\upnp\servertests\scripts\te_upnp_test_copy_config_files.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/src/te_serverbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+/*
+* 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:
+*
+*/
+
+
+
+#include <e32base.h>
+
+// Test system includes
+#include "te_serverbase.h"
+#include "te_serverbaseteststep.h"
+
+
+LOCAL_C void MainL()
+/**
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+	{
+	// Leave the hooks in for platform security
+#if (defined __DATA_CAGING__)
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+	CActiveScheduler* sched=NULL;
+	sched=new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+
+	CTestServer* server = NULL;
+	// Create the CTestServer derived server
+
+	TRAPD(err,server = CTestServerBase::NewL());
+	if(!err)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+// Only a DLL on emulator for typhoon and earlier
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on exit
+ */
+	{
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD(err,MainL());
+	delete cleanup;
+	if(KErrNone != err)
+		{
+		return err;
+		}
+	return KErrNone;
+    }
+
+// Create a thread in the calling process
+// Emulator typhoon and earlier
+
+//---------------------------------------------------------------------------------------------------------------------------
+//this is the test server which instantiates the test steps
+
+CTestServer* CTestServerBase::NewL ()
+	{
+	CTestServerBase* server = new ( ELeave ) CTestServerBase;
+	CleanupStack::PushL(server);
+	server->ConstructL(KServerName);
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+CTestServerBase::~CTestServerBase ()
+	{
+	}
+
+CTestServerBase::CTestServerBase ()
+	{
+	}
+
+CTestStep* CTestServerBase::CreateTestStep(const TDesC& aStepName)
+	{
+	// removed ELeave as harness will test ptr. This is more efficient
+	// than using TRAP_IGNORE
+	CTestServerTestStep* ret = new CTestServerTestStep;			//creating the test step
+	//CTestServerTestStep derives from CTestStep
+	if(ret)
+	{
+		ret->SetTestStepName(aStepName);
+	}
+	return ret;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/te_serverbase/src/te_serverbaseteststep.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,309 @@
+/*
+* 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:
+*
+*/
+
+
+#include <e32base.h>
+#include <es_sock.h>
+#include <comms-infras/eintsock.h>
+#include <connpref.h>
+#include <f32file.h>
+
+#include "te_serverbaseteststep.h"
+#include "es_ptest.h"
+
+
+CTestServerTestStep::CTestServerTestStep()
+	{
+	}
+
+CTestServerTestStep::~CTestServerTestStep()
+	{
+	iESockProxyThread.Close();
+	}
+
+enum TVerdict CTestServerTestStep::doTestStepPreambleL( void )
+	{
+	return EPass;
+	}
+
+enum TVerdict CTestServerTestStep::doTestStepL()
+	{
+	
+	TRAPD(trapRet,enum TVerdict stepRet = InternalDoTestStepL();\
+		if (stepRet !=EPass)\
+			{\
+			SetTestStepResult(stepRet);\
+			}\
+			)
+			
+			if (trapRet != KErrNone)
+				{
+				SetTestStepResult(EFail);
+				return EFail;
+				}
+			return EPass;
+	};
+
+enum TVerdict CTestServerTestStep::doTestStepPostambleL( void )
+	{	
+	return EPass;
+	}
+	
+enum TVerdict CTestServerTestStep::InternalDoTestStepL()
+	{
+	RSocketServ ss1;
+	TInt ret;
+	ret = ss1.Connect();
+	if (ret != KErrNone)
+		{
+		Logger().WriteFormat(_L("Connect to socket server failed with %S"),&EpocErrorToText(ret));
+		}
+	CleanupClosePushL(ss1);
+	TESTL(ret == KErrNone);
+	
+	RConnection connection;
+	connection.Open(ss1);
+	TRequestStatus status;
+	
+	TPtrC ptr (ConfigSection());		
+	if ( ptr.Find ( _L("te_upnp_tcpclient") ) >= 0
+			|| ptr.Find ( _L("te_upnp_tcpserver") ) >= 0 )
+		{
+		TConnSnapPref prefs ( 3 ); // !Note! Link Layer Access Point from upnp cfg.
+		connection.Start( prefs, status );	
+		}	 
+	else
+		{
+		connection.Start(status);		
+		}
+	User::WaitForRequest(status);
+	RSocket sock1;
+	ret = sock1.Open(ss1,KProxyAddrFamily,KSockDatagram, KProxy);
+	if (ret != KErrNone)
+		{
+		Logger().WriteFormat(_L("Opening socket to the Test Internal Socket Protocol failed with %S"),&EpocErrorToText(ret));
+		}
+	TESTL(ret == KErrNone);
+	//Logger().Close();
+	TRequestStatus stat;
+		
+	TProxyProtocolRequest request;
+	request.name.Copy(TestStepName());
+	
+	TPckg<TProxyProtocolRequest> requestPckg(request);
+	
+	_LIT(PanicStep,"Test21");
+	if (TestStepName() == PanicStep)
+		{
+		doPanicStepTestPreambleL();
+		}
+
+	sock1.Ioctl(KProxyProtocolTestRequest,stat,&requestPckg);
+	User::WaitForRequest(stat);
+	CleanupStack::Pop(&ss1);
+	ss1.Close();
+
+	if (TestStepName() == PanicStep)
+		{
+		doPanicStepTestPostambleL(stat);
+		}
+	else
+		{
+		TESTL(stat == KErrNone);
+		SetTestStepResult(request.result);
+		}
+	return TestStepResult();
+	}
+
+void CTestServerTestStep::doPanicStepTestPreambleL()
+	{
+	// Search for *ESock_Proxy* thread
+	TFindThread findThread(_L("*ESock_Proxy*"));
+	TFullName threadName;
+	TESTL(findThread.Next(threadName) == KErrNone);
+		
+	TESTL(iESockProxyThread.Open(findThread) == KErrNone);
+
+	iESockProxyThread.Logon(iESockProxyThreadStatus);
+	}
+
+void CTestServerTestStep::doPanicStepTestPostambleL( TRequestStatus& aStat )
+	{
+	//ESock is expected to have a panic. The Kernel will therefore return KErrAbort
+	TESTL(aStat  == KErrAbort);
+
+	User::WaitForRequest(iESockProxyThreadStatus);
+
+	//Test that ESock_Proxy Paniced
+	TESTL(iESockProxyThread.ExitType() == EExitPanic);
+	
+	// Test that the Panic Category was "InternalSocket"
+	_LIT(KInternalSocketPanic, "InternalSocket");
+	TESTL(iESockProxyThread.ExitCategory() == KInternalSocketPanic);
+
+	// Test that the Panic Reason was EInternalSocketNotNullSocket (12)
+	TESTL(iESockProxyThread.ExitReason() == ENotNullSocket);
+
+	SetTestStepResult(EPass);	
+	}
+	
+// extra logging methods
+const TPtrC& CTestServerTestStep::EpocErrorToText(const TInt aErrCode)
+/**
+Convert a Error code to text.
+
+  @param aError error code to display as text.
+  @return Text describing the error.
+  */
+	{
+	//	TPtr errText;
+	switch (aErrCode)
+		{
+		case KErrNone:
+			iErrText.Set(_L("KErrNone"));
+			break;
+		case KErrNotFound:
+			iErrText.Set(_L("KErrNotFound"));
+			break;
+		case KErrGeneral:
+			iErrText.Set(_L("KErrGeneral"));
+			break;
+		case KErrCancel:
+			iErrText.Set(_L("KErrCancel"));
+			break;
+		case KErrNoMemory:
+			iErrText.Set(_L("KErrNoMemory"));
+			break;
+		case KErrNotSupported:
+			iErrText.Set(_L("KErrNotSupported"));
+			break;
+		case KErrArgument:
+			iErrText.Set(_L("KErrArgument"));
+			break;
+		case KErrTotalLossOfPrecision:
+			iErrText.Set(_L("KErrTotalLossOfPrecision"));
+			break;
+		case KErrBadHandle:
+			iErrText.Set(_L("KErrBadHandle"));
+			break;
+		case KErrOverflow:
+			iErrText.Set(_L("KErrOverflow"));
+			break;
+		case KErrUnderflow:
+			iErrText.Set(_L("KErrUnderflow"));
+			break;
+		case KErrAlreadyExists:
+			iErrText.Set(_L("KErrAlreadyExists"));
+			break;
+		case KErrPathNotFound:
+			iErrText.Set(_L("KErrPathNotFound"));
+			break;
+		case KErrDied:
+			iErrText.Set(_L("KErrDied"));
+			break;
+		case KErrInUse:
+			iErrText.Set(_L("KErrInUse"));
+			break;
+		case KErrServerTerminated:
+			iErrText.Set(_L("KErrServerTerminated"));
+			break;
+		case KErrServerBusy:
+			iErrText.Set(_L("KErrServerBusy"));
+			break;
+		case KErrCompletion:
+			iErrText.Set(_L("KErrCompletion"));
+			break;
+		case KErrNotReady:
+			iErrText.Set(_L("KErrNotReady"));
+			break;
+		case KErrUnknown:
+			iErrText.Set(_L("KErrUnknown"));
+			break;
+		case KErrCorrupt:
+			iErrText.Set(_L("KErrCorrupt"));
+			break;
+		case KErrAccessDenied:
+			iErrText.Set(_L("KErrAccessDenied"));
+			break;
+		case KErrLocked:
+			iErrText.Set(_L("KErrLocked"));
+			break;
+		case KErrWrite:
+			iErrText.Set(_L("KErrWrite"));
+			break;
+		case KErrDisMounted:
+			iErrText.Set(_L("KErrDisMounted"));
+			break;
+		case KErrEof:
+			iErrText.Set(_L("KErrEof"));
+			break;
+		case KErrDiskFull:
+			iErrText.Set(_L("KErrDiskFull"));
+			break;
+		case KErrBadDriver:
+			iErrText.Set(_L("KErrBadDriver"));
+			break;
+		case KErrBadName:
+			iErrText.Set(_L("KErrBadName"));
+			break;
+		case KErrCommsLineFail:
+			iErrText.Set(_L("KErrCommsLineFail"));
+			break;
+		case KErrCommsFrame:
+			iErrText.Set(_L("KErrCommsFrame"));
+			break;
+		case KErrCommsOverrun:
+			iErrText.Set(_L("KErrCommsOverrun"));
+			break;
+		case KErrCommsParity:
+			iErrText.Set(_L("KErrCommsParity"));
+			break;
+		case KErrTimedOut:
+			iErrText.Set(_L("KErrTimedOut"));
+			break;
+		case KErrCouldNotConnect:
+			iErrText.Set(_L("KErrCouldNotConnect"));
+			break;
+		case KErrCouldNotDisconnect:
+			iErrText.Set(_L("KErrCouldNotDisconnect"));
+			break;
+		case KErrDisconnected:
+			iErrText.Set(_L("KErrDisconnected"));
+			break;
+		case KErrBadLibraryEntryPoint:
+			iErrText.Set(_L("KErrBadLibraryEntryPoint"));
+			break;
+		case KErrBadDescriptor:
+			iErrText.Set(_L("KErrBadDescriptor"));
+			break;
+		case KErrAbort:
+			iErrText.Set(_L("KErrAbort"));
+			break;
+		case KErrTooBig:
+			iErrText.Set(_L("KErrTooBig"));
+			break;
+		case KRequestPending:
+			iErrText.Set(_L("KRequestPending"));
+			break;
+		default:
+			iErrBuff.Format(_L(" %d"),aErrCode);
+			iErrText.Set(iErrBuff.Ptr());
+			break;
+		}
+		return iErrText;
+	}	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/testclient/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTMMPFILES
+testupnpclientserver.mmp
+
+PRJ_TESTEXPORTS
+
+// Script file for testing the functionality.
+../script/testupnpclientsuite.script			z:/upnp/client/script/testupnpclientsuite.script
+
+// Ini file
+../ini/testupnpclientsuite.ini	            z:/upnp/client/ini/testupnpclientsuite.ini
+
+// iby file
+testupnpclientserver.iby								/epoc32/rom/include/testupnpclientserver.iby
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/testclient/group/testupnpclientserver.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* 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 __TESTUPNPCLIENTSERVER_IBY__
+#define __TESTUPNPCLIENTSERVER_IBY__
+
+#include <testexecute.iby>
+
+file=ABI_DIR\BUILD_DIR\testupnpclientserver.exe	 System\Programs\testupnpclientserver.exe
+
+// The ini files for the system
+data=EPOCROOT##epoc32\data\z\upnp\client\ini\testupnpclientsuite.ini	upnp\client\ini\testupnpclientsuite.ini
+
+//The script files for the system
+data=EPOCROOT##epoc32\data\z\upnp\client\script\testupnpclientsuite.script upnp\client\script\testupnpclientsuite.script
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/testclient/group/testupnpclientserver.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* 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:
+*
+*/
+
+TARGET		  testupnpclientserver.exe
+TARGETTYPE	  exe
+UID			 0 0xEBC6E6DE
+CAPABILITY       ReadDeviceData WriteDeviceData NetworkServices LocalServices ReadUserData WriteUserData
+
+USERINCLUDE	 	..\inc
+USERINCLUDE  	..\..\..\pnp\inc
+USERINCLUDE  	..\..\..\upnpplugin\inc
+USERINCLUDE 	..\..\..\upnputils\inc
+
+SYSTEMINCLUDE   \epoc32\include
+SYSTEMINCLUDE	\epoc32\include\upnp
+SYSTEMINCLUDE  	\epoc32\include\test
+
+
+SOURCEPATH	  ..\src
+SOURCE		  	testupnpclientserver.cpp 
+SOURCE			testclientstep.cpp
+
+SOURCE			..\..\..\upnpplugin\src\pnputils.cpp
+
+LIBRARY		euser.lib
+LIBRARY		pnp.lib
+LIBRARY		c32.lib 
+LIBRARY		estor.lib 
+LIBRARY		ecom.lib 
+LIBRARY		crypto.lib 
+LIBRARY		efsrv.lib 
+LIBRARY		testexecuteutils.lib 
+LIBRARY		testexecutelogclient.lib
+LIBRARY 	esock.lib 
+LIBRARY 	upnputils.lib
+LIBRARY 	netmeta.lib
+LIBRARY 	nodemessages.lib
+LIBRARY 	esocksvr.lib
+LIBRARY 	insock.lib
+LIBRARY 	inetprotutil.lib 
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/testclient/src/testclientstep.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,447 @@
+// 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:
+// testupnpdescriptionservicestep.cpp
+// Contains implementation of testupnpdescriptionservicestep class
+// @internalAll
+// 
+//
+
+// System Include
+// for StartC32()
+#include <c32comm.h>
+#include <e32base.h>
+#include "pnputils.h"
+
+// User Include
+#include "testclientstep.h"
+/**
+Constructor: Sets the test step name.
+@internalTechnology
+@test
+*/
+CTestClientServiceTestStep::CTestClientServiceTestStep()
+	{
+
+	SetTestStepName(KTestClientServiceStep);
+	}
+
+
+/**
+Destructor: Closes the iFileServ.
+@internalTechnology
+@test
+*/
+CTestClientServiceTestStep::~CTestClientServiceTestStep()
+	{
+	}
+
+
+/**
+Base class virtual doTestStepPreambleL():
+Create and install the active scheduler and connect to iFileServ (RFs).
+@internalTechnology
+@test
+@param		None
+@return		EPass or EFail.
+*/
+TVerdict CTestClientServiceTestStep::doTestStepPreambleL()
+	{
+    return TestStepResult();
+	}	// doTestPreambleL
+
+
+/**
+Base class pure virtual doTestStepL():
+@internalTechnology
+@test
+@param		None
+@return		EPass or EFail indicating the result of the test step.
+*/
+TVerdict CTestClientServiceTestStep::doTestStepL()
+	{
+	_LIT(KUriValidity, "uriValidity");
+	_LIT(KHostResolver, "hostResolver");
+
+	TInt result = 0;
+	TInt testUriValidity;
+	TInt testHostResolver;
+	
+	if (!GetIntFromConfig(ConfigSection(),KUriValidity,testUriValidity)||
+	!GetIntFromConfig(ConfigSection(),KHostResolver,testHostResolver))
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	while( testUriValidity )
+		{
+		switch ( testUriValidity )
+		{
+			
+		case 1 : 
+			{
+			_LIT8(KDes,"des");
+			result = CUPnPUtils::GenericUriValidity ( KDes ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 2;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;
+		case 2:
+			{
+			_LIT8(KUid,"uuidhelloworld");
+			result = CUPnPUtils::GenericUriValidity ( KUid ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 3;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			
+			break;
+		case 3 : 
+			{
+			_LIT8(KHello,"helloworld");
+			result = CUPnPUtils::GenericUriValidity ( KHello ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 4;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;		
+		case 4 : 
+			{
+			_LIT8(KUrn,"urn:");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 5;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 5 : 
+			{
+			_LIT8(KUrn,"urn:able");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 6;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 6 : 
+			{
+			_LIT8(KUrn,"urn:able:");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 7;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;		
+		case 7 : 
+			{
+			_LIT8(KUrn,"urn:able:");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 8;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 8 : 
+			{
+			_LIT8(KUrn,"urn:able:device");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 9;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 9 : 
+			{
+			_LIT8(KUrn,"urn:able:service:1");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 10;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 10 : 
+			{
+			_LIT8(KUrn,"urn:able:device:1");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EService);
+			if ( result == KErrCorrupt)
+				testUriValidity = 11;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 11 : 
+			{
+			_LIT8(KUrn,"urn:able:helllo:1");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EAny);
+			if ( result == KErrCorrupt)
+				testUriValidity = 12;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 12 : 
+			{
+			_LIT8(KUrn,"urn:able:helllo:1");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrCorrupt)
+				testUriValidity = 13;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 13 : 
+			{
+			_LIT8(KUrn,"urn:able:service:");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EService);
+			if ( result == KErrCorrupt)
+				testUriValidity = 14;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 14 : 
+			{
+			_LIT8(KUrn,"urn:able:service:serviceType");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EService);
+			if ( result == KErrCorrupt)
+				testUriValidity = 15;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 15 : 
+			{
+			_LIT8(KUrn,"urn:able:service:serviceType");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EService);
+			if ( result == KErrCorrupt)
+				testUriValidity = 16;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;	
+		case 16 : 
+			{
+			_LIT8(KUrn,"urn:able:service:abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij:1");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EService);
+			if ( result == KErrCorrupt)
+				testUriValidity = 17;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;		
+		case 17 : 
+			{
+			_LIT8(KUrn,"urn:able:service:serviceType:+");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EService);
+			if ( result == KErrCorrupt)
+				testUriValidity = 18;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;
+			
+		case 18 : 
+			{
+			_LIT8(KUrn,"urn:able:service:serviceType:a");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EService);
+			if ( result == KErrCorrupt)
+				testUriValidity = 19;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;
+		case 19 :
+			{
+			_LIT8(KUrn,"uuid:1348481083930030030");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrNone)
+				testUriValidity = 20;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;
+		case 20 :
+			{
+			_LIT8(KUrn,"upnp:rootdevice");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrNone)
+				testUriValidity = 21;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;
+		case 21 :
+			{
+			_LIT8(KUrn,"urn:schemas-upnp-org:service:ContentDirectory:1");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EService);
+			if ( result == KErrNone)
+				testUriValidity = 22;
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}
+			break;
+		case 22 :
+			{
+			_LIT8(KUrn,"urn:schemas-upnp-org:device:ContentDirectory:1");
+			result = CUPnPUtils::GenericUriValidity ( KUrn ,CUPnPUtils::EDevice);
+			if ( result == KErrNone)
+				{
+				testUriValidity = 0;
+				SetTestStepResult(EPass);
+				return TestStepResult();
+				}
+			else
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+			}			
+			
+		
+		default:
+			{
+			SetTestStepResult(EFail);
+			return TestStepResult();		
+			}			
+		}
+		}
+	while ( testHostResolver )
+		{
+		RSocketServ ss;
+		TInt err = ss.Connect();
+		RHostResolver resolver;
+		err = resolver.Open( ss , KAfInet , KProtocolInetTcp);// , iConnection);
+		TInetAddr address;
+		switch ( testHostResolver )
+			{
+			case 1:
+				{
+				_LIT8(KUri,"http://10.192.197.2:2869/");
+				TRAP(err, CUPnPUtils::ResolveHostAddressL ( resolver,KUri, address ));
+				if ( err == KErrNone )
+					testHostResolver = 2;
+				else
+					{
+					SetTestStepResult(EFail);
+					return TestStepResult();
+					}	
+				}	
+			case 2:
+				{
+				_LIT8(KUri,"junk://notneeded.com/");
+				TRAP(err, CUPnPUtils::ResolveHostAddressL ( resolver,KUri, address ));
+				if ( err == KErrCorrupt )
+					testHostResolver = 3;
+				else
+					{
+					SetTestStepResult(EFail);
+					return TestStepResult();
+					}	
+				}	
+			case 3:
+				{
+				_LIT8(KUri,"http://www.google.com/");
+				TRAP(err, CUPnPUtils::ResolveHostAddressL ( resolver,KUri, address ));
+				if ( err == KErrNone )
+					{
+					SetTestStepResult(EPass);
+					return TestStepResult();
+					}
+				else
+					{
+					SetTestStepResult(EFail);
+					return TestStepResult();
+					}
+				}
+				
+			}
+		}
+	
+	SetTestStepResult(EPass);
+	return TestStepResult();
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/bwins/udpclientu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	InstallProxy @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/eabi/udpclientu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,7 @@
+EXPORTS
+	InstallProxy @ 1 NONAME
+	_ZTI15CTestMUdpServer @ 2 NONAME
+	_ZTIN4Meta18RMetaDataContainerINS_13SMetaDataEComEEE @ 3 NONAME
+	_ZTV15CTestMUdpServer @ 4 NONAME
+	_ZTVN4Meta18RMetaDataContainerINS_13SMetaDataEComEEE @ 5 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,36 @@
+/*
+* 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:
+*
+*/
+
+
+/**
+@file
+*/
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+../group/udpclient.iby	/epoc32/rom/include/udpclient.iby
+
+../inc/es_ptest.h SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(test/es_ptest.h)
+
+
+PRJ_TESTMMPFILES
+
+./udpclient.mmp support
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/group/udpclient.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+/*
+* 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 __UDPCLIENT_IBY__
+#define __UDPCLIENT_IBY__
+
+file=ABI_DIR\DEBUG_DIR\udpclient.prt 			                  System\Libs\udpclient.prt
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/group/udpclient.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,73 @@
+/*
+* 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:
+*
+*/
+
+TARGET			udpclient.prt
+TARGETTYPE		DLL
+UID      0x10003d38
+VENDORID 0x70000001
+
+DEFFILE		udpclient.def
+
+
+SOURCEPATH		../src
+SOURCE			protocolfamily.cpp
+SOURCE			proxyprotocol.cpp
+SOURCE			testmudpserver.cpp
+SOURCE			pudpclienttests.cpp
+
+
+USERINCLUDE		../inc
+USERINCLUDE		../../../../server/flow/inc
+USERINCLUDE		../../../../server/controlpoint/inc
+USERINCLUDE		../../../../server/servicepoint/inc
+USERINCLUDE		../../../../upnputils/inc
+USERINCLUDE		../../../../upnpmessage/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/upnp
+SYSTEMINCLUDE	/epoc32/include/comms-infras
+SYSTEMINCLUDE   /epoc32/include/test
+
+LIBRARY		euser.lib     
+LIBRARY		esock.lib
+LIBRARY		esocksvr.lib
+LIBRARY		mbufmgr.lib
+LIBRARY		testexecutelogclient.lib
+LIBRARY		efsrv.lib
+LIBRARY		cinidata.lib
+LIBRARY     nifman.lib
+LIBRARY		commsfw.lib
+LIBRARY		testexecuteutils.lib
+LIBRARY		rfileloggerclient.lib
+LIBRARY     netmeta.lib		// for the ABIv2
+LIBRARY		insock.lib 
+LIBRARY		sockethandler.lib
+LIBRARY 	upnputils.lib
+LIBRARY		nodemessages.lib
+LIBRARY 	netinterfaces.lib
+LIBRARY		factories.lib
+LIBRARY 	chunkmgr.lib
+
+START WINS
+BASEADDRESS		0x59000000
+END
+
+CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+UNPAGED
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/es_ptest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined (__ES_PTEST_H__)
+#define __ES_PTEST_H__
+
+#include <e32def.h>
+#include <es_sock.h>
+#include <testexecutestepbase.h>
+#include <testexecuteclient.h>
+//#include <es_dummy.h>
+
+
+//This property needs to be set to 0 for normal operation 
+//and 1 to request termination
+
+//Socket server test ioclts
+const TInt KProxyProtocolTestRequest 	= 0x00003001; // reuse ioctl value from pdummy
+
+typedef TVerdict TProxyProtocolTestResult;
+
+// Structure used to pass back result of ioctl (result of test)
+struct TProxyProtocolRequest
+	{
+	TBuf<KMaxTestExecuteNameLength> name;
+	TVerdict result;
+	};
+
+//Socket Protocols and families
+const TInt KPTestIntSocketNumProtocols=1;	// is this the right number?
+const TUint KProxyAddrFamily=0x20000;
+const TUint KProxy=1;
+const TUint KTargetDatagram=2;
+const TUint KTargetStream=3;
+
+// version numbers - dll wide?
+const TUint KPTestIntSocketMajor=0;
+const TUint KPTestIntSocketMinor=1;
+const TUint KPTestIntSocketBuild=0;
+
+//const TUint KDStreamServiceInfo = KSIReliable | KSIInOrder | KSIStreamBased | KSIUrgentData | KSIGracefulClose;
+const TUint kDDatagramServiceInfo = KSIConnectionLess | KSIMessageBased | KSIBroadcast| KSIGracefulClose;
+  
+// Dummy protocol descriptive names
+_LIT(KProxyName, "Proxy Protocol");
+_LIT(KTargetDatagramName, "Target Datagram Protocol");
+_LIT(KTargetStreamName, "Target Stream Protocol");
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/protocolfamily.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(__PROTOCOLFAMILY_H__)
+#define __PROTOCOLFAMILY_H__
+
+#include "es_ptest.h"
+#include <es_prot.h>
+#include <comms-infras/nifif.h>
+#include <dns_qry.h>
+
+//---------------------------------------------------------------------------------------------------------
+
+NONSHARABLE_CLASS(CTestIntSocketProtocolFamily): public CProtocolFamilyBase
+	{
+private:
+	CTestIntSocketProtocolFamily();	
+public:
+	static CTestIntSocketProtocolFamily * NewL();
+	void ConstructL();
+	TInt Install();
+	TInt Remove();
+	CProtocolBase * NewProtocolL(TUint aSockType,TUint aProtocol);
+	TUint ProtocolList(TServerProtocolDesc *& aProtocolList);
+private:
+	void Construct();
+private:
+	TServerProtocolDesc iProtocolDescs[1];
+	};
+
+#endif //__PROTOCOLFAMILY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/proxyprotocol.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(__PROXYPROTOCOL_H)
+#define __PROXYPROTOCOL_H
+
+#include "es_ptest.h"
+#include <es_prot.h>
+#include <comms-infras/nifif.h>
+#include <dns_qry.h>
+
+enum TDPanic
+	{
+	EBadProtocol = 1000,
+	EBadCall = 1001,
+	ENotBound = 1002,
+	ENotStarted = 1003,
+	EInterfaceNotDeleted = 1004,
+	EIdAndNoHolder = 1005,
+	EIfAndHolder = 1006,
+	ETestPanic = 1007
+	};
+	
+void Panic(TDPanic aPanic);
+
+
+NONSHARABLE_CLASS(CProxyProtocol): public CProtocolBase
+	{
+public:
+
+	~CProxyProtocol();
+	
+	static CProxyProtocol *NewL(TInt aProtocol, TServerProtocolDesc* aProtoDesc);
+	CServProviderBase *NewSAPL(TUint aProtocol);
+	TBool CanCreateSockets();
+	void InitL(TDesC& aTag);
+	void BindL(CProtocolBase *aProtocol, TUint anId);
+	virtual void BindToL(CProtocolBase *protocol);
+	void StartL(void);
+	TInt Send(RMBufChain &,CProtocolBase* aSourceProtocol);
+	void Process(RMBufChain &,CProtocolBase* aSourceProtocol);
+	TInt Send(TDes8 &, TSockAddr *to,TSockAddr *from,CProtocolBase* aSourceProtocol);
+	void Process(TDes8 & ,TSockAddr *from,TSockAddr *to,CProtocolBase* aSourceProtocol);
+	void Identify(TServerProtocolDesc *)const;
+	TInt GetOption(TUint level,TUint name,TDes8 &anOption,CProtocolBase* aSourceProtocol);
+	TInt SetOption(TUint level,TUint name,const TDesC8& option,CProtocolBase* aSourceProtocol);
+	void Error(TInt anError,CProtocolBase* aSourceProtocol);
+	TBool IsStarted(){return iStarted;}
+private:
+	CProxyProtocol(TServerProtocolDesc* aProtoDesc);
+	
+private:
+	TInt iType;
+	TServerProtocolDesc* iProtoDesc;
+	TBool iStarted;
+	CArrayFixFlat<CProtocolBase *> iProtocols;
+	};
+
+NONSHARABLE_CLASS(CProxyProvd) : public CServProviderBase
+	{
+public:
+	static CProxyProvd *NewL(CProxyProtocol &aProtocol);
+	virtual void Ioctl(TUint level,TUint name,TDes8 *anOption);
+	void TestComplete(TProxyProtocolTestResult result);
+	
+	void LocalName(TSockAddr &anAddr)const;
+	virtual TInt SetLocalName(TSockAddr &anAddr);
+	virtual void RemName(TSockAddr &anAddr)const;
+	virtual TInt SetRemName(TSockAddr &anAddr);
+	virtual TInt GetOption(TUint level,TUint name,TDes8 &anOption)const;
+	virtual TInt SetOption(TUint level,TUint name,const TDesC8 &anOption);
+	
+	virtual void CancelIoctl(TUint aLevel,TUint aName);
+	virtual TInt Write(RMBufChain& aData, TUint options, TSockAddr* anAddr=NULL);
+	virtual TUint Write(const TDesC8& aDesc, TUint options, TSockAddr* anAddr);
+	virtual TInt GetData(RMBufChain& aData, TUint aLength, TUint options,TSockAddr* anAddr=NULL);
+	virtual void GetData(TDes8& aDesc,TUint options,TSockAddr* anAddr=NULL);
+	virtual void ActiveOpen(void);
+	virtual void ActiveOpen(const TDesC8 &aConnectionData);
+	virtual TInt PassiveOpen(TUint aQue);
+	virtual TInt PassiveOpen(TUint aQue,const TDesC8 &aConnectionData);
+	virtual void AutoBind( void );
+	virtual void Shutdown(TCloseType option);
+	virtual void Shutdown(TCloseType option,const TDesC8 &aDisconnectData);
+	virtual void Start();
+
+private:
+	CProxyProvd(CProxyProtocol &aProtocol);
+	
+private:
+	TBool iIsBound;
+	CProxyProtocol *iProtocol;
+	TSockAddr iAddr;
+	TBool iInputStopped;
+	TInt iListenErrorCode;
+	TBool iCancelIoctl; // Set when an IOCTL has been cancelled.
+	
+	TBool iBlockOnClose; //Used by and test Ioctl to cause the socket to hang on close
+	TBool iCompleteIoctl;
+	};
+
+#endif //__PROXYPROTOCOL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/pudpclienttests.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,732 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(PUDPCLIENTTESTS_H)
+#define PUDPCLIENTTESTS_H
+
+#include <e32base.h>
+#include <testexecutestepbase.h>
+#include "proxyprotocol.h"
+#include <comms-infras/eintsock.h>
+#include "es_mbuf.h"
+#include "testmudpserver.h"
+#include <elements/nm_node.h>
+
+#include <cchunkmanager.h>
+#include <rmemchunk.h>
+
+_LIT8 ( KTestCase1, "testcase1" );
+_LIT8 ( KMissingContentLength, "HTTP/1.1 200 OK\r\nST: testcase1\r\nEXT: \r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\nCACHE-CONTROL: max-age=900\r\nLOCATION: http://10.192.196.204:54042/\r\n\r\n");
+_LIT8 ( KMissingST, "HTTP/1.1 200 OK\r\nEXT: \r\nSERVER: Apache 9.x, UPnP/1.0\r\nDATE: 27\11\08\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\nCACHE-CONTROL: max-age=900\r\nLOCATION: http://10.192.196.204:54042/\r\nContent-Length: 0\r\n\r\n");
+_LIT8 ( KTestCase2, "testcase2" );
+_LIT8 ( KTestCase3, "testcase3" );
+
+NONSHARABLE_CLASS(CUdpClientTestBase) : protected CActive
+	{
+public:
+	static void StartTestL(const TDesC& aTestName, CProxyProvd* aProvd);
+	virtual void RunL();
+
+protected:		
+	CUdpClientTestBase(CProxyProvd* aProvd);
+	virtual ~CUdpClientTestBase();
+	
+	//Utilities function to be use in RunTest()
+	void Reschedule();
+	CTestExecuteLogger iLogger;
+	void CompleteSelf ( TInt aError );
+	void FinishTest(TVerdict result);
+	RMemoryAllocator 			iAllocator;
+	CChunkManager*  iChunkManager;			
+private:
+	//Implemented you own of these		
+	virtual TVerdict RunTestL() = 0;
+	virtual void Cleanup();
+	
+	void DoCancel();
+	void ConstructL();
+	void SetLoggerL();
+	CTestExecuteLogger& Logger();	
+	static CUdpClientTestBase* CreateTestL(const TDesC& aTestName, CProxyProvd* aProvd);
+		
+private:
+	CProxyProvd* iProvd;
+	TBool iReschedule; //Determines whether rescheduling is required
+	
+	};
+	
+inline CTestExecuteLogger& CUdpClientTestBase::Logger()
+	{
+	return iLogger;
+	}
+
+
+/*struct TObserverBundle 
+	{
+	enum TObserverState {EState1,EState2,EState3};
+	TObserverState iObserverState;
+	};
+*/
+class MTestServerObserver
+	{
+public:
+	/**
+	Callback method which returns the responses.
+	@param aObserverInfo bundle containg the response.
+	*/
+	virtual void OnTestServerEventL ( TInt aError ) = 0;
+	//virtual void OnTestServerEventL ( TBool aFlag) = 0;
+	/**
+	Callback method which handles the errors of OnPnPEventL.
+	@param aError error code.
+	*/
+	//virtual void OnTestServerError (TInt aError) = 0;
+	};
+
+/*class MTestClientObserver
+	{
+public:
+	/**
+	Callback method which returns the responses.
+	@param aObserverInfo bundle containg the response.
+	*
+	virtual void OnTestClientEventL ( TObserverBundle& aObserverInfo) = 0;
+	/**
+	Callback method which handles the errors of OnPnPEventL.
+	@param aError error code.
+	*
+	virtual void OnTestClientError (TInt aError) = 0;
+	};
+*/
+//----------------------------------------------------------//
+/////////////////// CUdpClientTestUPnP /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+//---------------------------------------------------------------------------------------------------------------------------------------
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP1) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP1* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP1 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP1();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+	
+
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+_LIT8 ( KMissingRespLocn, "HTTP/1.1 200 OK\r\nEXT: \r\nST: testcase3\r\nSERVER: Apache 9.x, UPnP/1.0\r\nDATE: 27\11\08\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\nCACHE-CONTROL: max-age=900\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP2) : public CUdpClientTestBase,public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP2* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient,Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP2 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP2();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+	
+	
+	
+_LIT8 ( KTestCase4, "testcase4" );
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+_LIT8 ( KMissingRespUSN, "HTTP/1.1 200 OK\r\nEXT: \r\nST: testcase4\r\nSERVER: Apache 9.x, UPnP/1.0\r\nDATE: 27\11\08\r\nCACHE-CONTROL: max-age=900\r\nLOCATION: http://10.192.196.204:54042/\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP3) : public CUdpClientTestBase,public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP3* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP3 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP3();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+_LIT8 ( KTestCase5, "testcase5" );
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+_LIT8 ( KInvalidCacheControl, "HTTP/1.1 200 OK\r\nST: testcase5\r\nEXT: \r\nSERVER: Apache 9.x, UPnP/1.0\r\nDATE: 27\11\08\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\nCACHE-CONTROL: \r\nLOCATION: http://10.192.196.204:54042/\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP4) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP4* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP4 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP4();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+
+
+_LIT8 ( KTestCase6, "testcase6" );
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+_LIT8 ( KInvalidCL, "HTTP/1.1 200 OK\r\nST: testcase1\r\nEXT: \r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\nCACHE-CONTROL: max-age=900\r\nLOCATION: http://10.192.196.204:54042/\r\nContent-Length: 100\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP5) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP5* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient,Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP5 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP5();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+
+_LIT8 ( KTestCase7, "testcase7" );
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+_LIT8 ( KMissingExtn, "HTTP/1.1 200 OK\r\nST: testcase1\r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\nCACHE-CONTROL: max-age=900\r\nLOCATION:http://10.192.196.204:54042/\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP6) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP6* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP6 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP6();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+	
+
+
+_LIT8 ( KTestCase8, "testcase8" );
+_LIT8 ( KTestCase9, "testcase9" );
+_LIT8 ( KTestCase10, "testcase10" );
+_LIT8 ( KTestCase11, "testcase11" );
+_LIT8 ( KTestCase12, "testcase12" );
+
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+_LIT8 ( KInvalidRes8, "HTTP/1.0 200 OK\r\nCACHE-CONTROL: max-age=900\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP7) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP7* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP7 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP7();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+_LIT8 ( KInvalidRes9, "HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=900\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP8) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP8* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP8 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP8();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+_LIT8 ( KInvalidRes10, "HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=900\r\nEXT: \r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP9) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP9* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP9 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP9();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+//----------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+_LIT8 ( KInvalidRes11, "HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=900\r\nEXT: \r\nLOCATION:http://10.192.196.204:54042/\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP10) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP10* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP10 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP10();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+_LIT8 ( KInvalidRes12, "HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=900\r\nEXT: \r\nLOCATION:http://10.192.196.204:54042/\r\nST: testcase1\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP11) : public CUdpClientTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP11* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP11 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP11();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	};
+
+
+//----------------------------------------------------------------------------------------------------------------------------------
+_LIT8 ( KInvalidRes13, "HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=900\r\nEXT: \r\nLOCATION:http://10.192.196.204:54042/\r\nST: testcase1\r\nContent-Length: 0\r\n\r\n");
+
+
+NONSHARABLE_CLASS(CUdpClientTestUPnP12) : public CUdpClientTestBase,
+										public MSocketHandlerObserver,
+										public Messages::ASimpleNodeIdBase,
+										public MTestServerObserver
+	{
+public:
+	static CUdpClientTestUPnP12* NewL ( CProxyProvd* aProvd );
+
+	//MTestServerObserver
+	void OnTestServerEventL ( TInt aError );
+
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	virtual void OpenComplete ( RInternalSocket& aSocket );
+	inline virtual void ConnectComplete ();
+	inline virtual void AcceptComplete ( RInternalSocket&  );
+	inline virtual void SendComplete ( TInt  );
+	inline virtual void SendToComplete ( TInt  );
+	inline virtual void RecvComplete ( RMBufChain&  );
+	inline virtual void RecvFromComplete ( RMBufChain& , const TSockAddr&  );
+	inline virtual void Error ( TOperation , TInt   );
+
+private:
+	enum TState
+		{
+		ECreateTestServer = 0,
+		ECreateTestClient,
+		EOpenTestSocket,
+		ESendRequestData,
+		EFailed,
+		ECleanup,
+		};
+		
+	CUdpClientTestUPnP12 ( CProxyProvd* aProvd );
+	~CUdpClientTestUPnP12();
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	//void Cleanup();
+
+private:	
+	CTestMUdpServer*	iTestServer;	
+	Messages::TNodeId 	iClientId;
+	RTimer				iTimer;
+	TState				iState;
+	
+	RPointerArray <RInternalSocket>			iSocketArray;
+	RSocketHandler			iSocketHandler;
+	CSocketOpener* 			iSocketOpener;
+	TUint 					iPort;
+	};
+
+void CUdpClientTestUPnP12::ConnectComplete ()
+	{
+	
+	}
+void CUdpClientTestUPnP12::AcceptComplete ( RInternalSocket&  )
+	{
+	
+	}
+void CUdpClientTestUPnP12::SendComplete ( TInt  )
+	{
+	
+	}
+void CUdpClientTestUPnP12::SendToComplete ( TInt  )
+	{
+	
+	}
+void CUdpClientTestUPnP12::RecvComplete ( RMBufChain&  )
+	{
+	
+	}
+void CUdpClientTestUPnP12::RecvFromComplete ( RMBufChain& , const TSockAddr&  )
+	{
+	
+	}
+void CUdpClientTestUPnP12::Error ( TOperation , TInt   )
+	{
+	
+	}
+
+
+#endif //PUDPCLIENTTESTS_H
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/inc/testmudpserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,79 @@
+/*
+* 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 __TESTMUDPSERVER_H_
+#define __TESTMUDPSERVER_H_
+
+// System Includes
+#include <comms-infras/eintsock.h>
+#include <es_mbuf.h>
+#include <comms-infras/mbufchain.h>
+
+#include <rsockethandler.h>
+#include <csocketopener.h>
+class MTestServerObserver;
+
+//----------------------------------------------------------//
+/////////////////// CTestMUdpServer /////////////////////////
+//----------------------------------------------------------//
+
+class CTestMUdpServer : public CBase,
+						public MSocketHandlerObserver
+	{
+public:	
+	static CTestMUdpServer* NewL ( MTestServerObserver& aObserver );
+	~CTestMUdpServer ();
+	
+private:
+	TInt OpenSocket ();
+	void Startup ();
+	void Shutdown ();
+	void CTestMUdpServer::DoSendL ( RMBufChain& aData, TBool& aRecvAgain );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& aData, const TSockAddr& aAddr );	
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	CTestMUdpServer ( MTestServerObserver& aObserver );
+	void ConstructL ();		
+
+private:
+	MTestServerObserver& iObserver;
+	RSocketHandler		iSocketHandler;
+	RInternalSocket 	iSocket;
+	CSocketOpener*		iSocketOpener;
+	RMBufChain 			iSendChain;
+	TSockAddr			iSendToAddr;
+	};
+
+#endif /*__TESTMUDPSERVER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/src/protocolfamily.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,158 @@
+/*
+* 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:
+*
+*/
+
+
+#include <es_prot.h>
+#include <e32test.h>
+#include "es_ptest.h"
+#include <comms-infras/nifif.h>
+#include <es_mbuf.h>
+#include "ss_std.h"
+#include <ss_pman.h>
+#include <ss_glob.h>
+#include <es_mbman.h>
+#include <e32math.h>
+#include <dns_qry.h>
+#include <agenterrors.h>
+#include <e32property.h>
+
+#include "proxyprotocol.h"
+#include "protocolfamily.h"
+
+extern "C"
+	{
+	IMPORT_C CProtocolFamilyBase* InstallProxy(void);	// Force export 
+
+	EXPORT_C CProtocolFamilyBase * InstallProxy(void)
+	//
+	// Create a new protocol family
+	//
+		{
+		CTestIntSocketProtocolFamily* protocolFamily = NULL;
+		TRAP_IGNORE(protocolFamily = CTestIntSocketProtocolFamily::NewL());
+		return protocolFamily;
+		}
+	}
+
+CTestIntSocketProtocolFamily* CTestIntSocketProtocolFamily::NewL()
+//
+//
+//
+	{
+	CTestIntSocketProtocolFamily* pf=new(ELeave) CTestIntSocketProtocolFamily();
+	CleanupStack::PushL(pf);
+	pf->ConstructL();
+	CleanupStack::Pop();
+	return pf;
+	}
+
+void CTestIntSocketProtocolFamily::ConstructL()
+//
+//
+//
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+
+	}
+
+CTestIntSocketProtocolFamily::CTestIntSocketProtocolFamily() : CProtocolFamilyBase()
+	{
+	iProtocolDescs[0].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[0].iSockType=KSockDatagram; // not important whether datagram or stream for proxy
+	iProtocolDescs[0].iProtocol=KProxy;
+	iProtocolDescs[0].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[0].iByteOrder=EBigEndian;
+	iProtocolDescs[0].iServiceInfo=kDDatagramServiceInfo|KSIPeekData;
+	iProtocolDescs[0].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[0].iMessageSize=0x300;
+	iProtocolDescs[0].iName=KProxyName;
+	iProtocolDescs[0].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[0].iNamingServices=KNSNameResolution|KNSServiceResolution|KNSInfoDatabase;
+	iProtocolDescs[0].iNumSockets=100;
+/*
+	iProtocolDescs[1].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[1].iSockType=KSockDatagram;
+	iProtocolDescs[1].iProtocol=KTargetDatagram;
+	iProtocolDescs[1].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[1].iByteOrder=EBigEndian;
+	iProtocolDescs[1].iServiceInfo=kDDatagramServiceInfo|KSIPeekData;
+	iProtocolDescs[1].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[1].iMessageSize=0x300;
+	iProtocolDescs[1].iName=KTargetDatagramName;
+	iProtocolDescs[1].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[1].iNamingServices=KNSNameResolution|KNSServiceResolution|KNSInfoDatabase;
+	iProtocolDescs[1].iNumSockets=100;
+
+	iProtocolDescs[2].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[2].iSockType=KSockStream;
+	iProtocolDescs[2].iProtocol=KTargetStream;
+	iProtocolDescs[2].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[2].iByteOrder=EBigEndian;
+	iProtocolDescs[2].iServiceInfo=KDStreamServiceInfo;
+	iProtocolDescs[2].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[2].iMessageSize=KSocketMessageSizeIsStream;
+	iProtocolDescs[2].iName=KTargetStreamName;
+	iProtocolDescs[2].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[2].iNamingServices=0;
+	iProtocolDescs[2].iNumSockets=100;
+*/
+	__DECLARE_NAME(_S("CTestIntSocketProtocolFamily"));
+	}
+
+#pragma warning( disable : 4100 )
+
+TInt CTestIntSocketProtocolFamily::Install()
+	{
+	// Force a fail on Memory tests
+	char* ptr=new char;
+	if (!ptr)
+		return KErrNoMemory;
+	delete ptr;
+//	TAppProtIntfMessage::RegisterL ();
+	return KErrNone;
+	}
+
+TInt CTestIntSocketProtocolFamily::Remove()
+	{
+	//TAppProtIntfMessage::DeRegister	();
+	return KErrNone;
+	}
+
+TUint CTestIntSocketProtocolFamily::ProtocolList(TServerProtocolDesc *& aProtocolDescPointer)
+	{
+
+  	aProtocolDescPointer=new TServerProtocolDesc[KPTestIntSocketNumProtocols];
+  	if (!aProtocolDescPointer)
+  		return 0;
+
+	Mem::Copy(aProtocolDescPointer, iProtocolDescs, sizeof(TServerProtocolDesc)*KPTestIntSocketNumProtocols);
+
+	TRAP_IGNORE(Nif::CheckInstalledMBufManagerL();)
+
+	return KPTestIntSocketNumProtocols;
+	};
+
+CProtocolBase * CTestIntSocketProtocolFamily::NewProtocolL(TUint /* aSockType */,TUint aProtocol)
+	{
+
+	CProtocolBase* p=CProxyProtocol::NewL(aProtocol, &iProtocolDescs[aProtocol-1]);	
+	return p;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/src/proxyprotocol.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,311 @@
+/*
+* 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:
+*
+*/
+
+
+#include "es_ptest.h"
+#include "proxyprotocol.h"
+
+#include "pudpclienttests.h"
+
+//---------------------------------------------------------------------------------------------------------
+
+void Panic(TDPanic aPanic)
+//
+// Panic the Protocol
+//
+	{
+
+	User::Panic(_L("TestInternalSocket Prot"),aPanic);
+	}
+
+	
+CProxyProtocol::CProxyProtocol(TServerProtocolDesc* aProtoDesc)
+//
+//
+//
+	:CProtocolBase(),iProtoDesc(aProtoDesc),iProtocols(0x16)
+	{
+	__DECLARE_NAME(_S("CProxyProtocol"));
+	iStarted=EFalse;
+	}
+
+CServProviderBase * CProxyProtocol::NewSAPL(TUint /*aProtocol*/)
+	{
+	return CProxyProvd::NewL(*this);
+	}
+
+
+CProxyProtocol::~CProxyProtocol()
+	{
+	for (TInt i=0;i<iProtocols.Count();i++)
+		{
+		iProtocols[i]->Close();
+		}
+	}
+
+CProxyProtocol *CProxyProtocol::NewL(TInt aType, TServerProtocolDesc* aProtoDesc)
+	{
+
+	CProxyProtocol* prot=0;
+	switch (aType)
+		{
+	case KProxy:
+		prot=new (ELeave) CProxyProtocol(aProtoDesc);
+		break;
+
+	default:
+		prot=(CProxyProtocol*)0xABCD; // keep lint happy
+		Panic(EBadProtocol);
+		}
+	prot->iType=aType;
+	return prot;
+	}
+
+void CProxyProtocol::InitL(TDesC& /*aTag*/)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	}
+
+void CProxyProtocol::BindL(CProtocolBase* /*aProtocol*/, TUint /*anId*/)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	}
+
+void CProxyProtocol::BindToL(CProtocolBase* aProtocol)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	iProtocols.AppendL(aProtocol);
+	aProtocol->Open();
+	}
+
+
+void CProxyProtocol::StartL(void)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	iStarted=ETrue;
+	}
+
+TInt CProxyProtocol::Send(RMBufChain &,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return 1;
+	}
+
+TInt CProxyProtocol::Send(TDes8 &, TSockAddr* /*to*/,TSockAddr* /*from*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return 1;
+	}
+
+void CProxyProtocol::Process(RMBufChain &,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+
+void CProxyProtocol::Process(TDes8 & ,TSockAddr* /*from*/,TSockAddr* /*to*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+
+void CProxyProtocol::Identify(TServerProtocolDesc *aDesc) const
+	{
+	Mem::Copy(aDesc, iProtoDesc, sizeof(TServerProtocolDesc));
+	}
+
+TInt CProxyProtocol::GetOption(TUint level,TUint,TDes8&,CProtocolBase* /*aSourceProtocol*/)
+	{
+	
+	if(level==KNifOptLevel)
+		{
+		return KErrNotSupported;
+		}
+	return KErrNone;
+	}
+
+TInt CProxyProtocol::SetOption(TUint /*level*/,TUint /*name*/,const TDesC8& /*option*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return KErrNone;
+	}
+
+void CProxyProtocol::Error(TInt /*anerror*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+//----------------------------------------------------------------------------------------------
+CProxyProvd *CProxyProvd::NewL(CProxyProtocol &aProtocol)
+	{
+	CProxyProvd *sp=new(ELeave) CProxyProvd(aProtocol);
+//	CleanupStack::PushL(sp);
+//	sp->ConstructL();
+//	CleanupStack::Pop(sp);
+	return sp;
+	}
+
+CProxyProvd::CProxyProvd(CProxyProtocol &aProtocol)
+	{
+	__DECLARE_NAME(_S("CTestIntSocketProvd"));
+	iIsBound=EFalse;
+	iProtocol=&aProtocol;
+	iCompleteIoctl = FALSE;
+	}
+
+
+void CProxyProvd::LocalName(TSockAddr& anAddr) const
+	{
+	anAddr=iAddr;
+	}
+
+TInt CProxyProvd::SetLocalName(TSockAddr& anAddr)
+	{
+	iAddr=anAddr;
+	iIsBound=ETrue;
+	return KErrNone;
+	}
+
+void CProxyProvd::RemName(TSockAddr& /*anAddr*/)const
+	{
+	}
+
+TInt CProxyProvd::SetRemName(TSockAddr& /*anAddr*/)
+	{
+
+//	test.Printf(_L("CTestIntSocketProvd::SetRemName Port %x, Addr %lx\n"),addr.Port(),addr.Address());
+	return KErrNone;
+	}
+
+void CProxyProvd::Shutdown(TCloseType anOption)
+	{
+	if (iCompleteIoctl)
+		{
+		iSocket->IoctlComplete(NULL);
+		}
+	if (anOption==ENormal)
+		iSocket->CanClose();
+	}
+
+void CProxyProvd::Start()
+//
+//
+//
+	{
+	}
+
+void CProxyProvd::Shutdown(TCloseType /*anOption*/,const TDesC8 &/*aDisconnectData*/)
+	{
+	Panic(EBadCall);
+	}
+
+void CProxyProvd::AutoBind( void )
+	{
+//	test.Printf(_L("CTestIntSocketProvd::AutoBind\n"));
+	iIsBound=ETrue;
+	}
+	
+
+void CProxyProvd::Ioctl(TUint /*level*/,TUint name,TDes8* aOption)
+	{
+	/* Mallik...if you want to see connection creation, just ping www.google.com in command prompt,
+	change ip & uncomment 
+	RInternalSocket intSock;
+	intSock.Open(KAfInet, KSockStream, KProtocolInetTcp);	
+	const TUint32 ip = INET_ADDR(209,85,153,104);
+	TInetAddr addr(80);
+	addr.SetAddress(ip);
+	
+	TRequestStatus status;
+	intSock.Connect(addr, status);
+	User::WaitForRequest(status);	
+	*/
+	
+	switch (name)
+		{
+		case KProxyProtocolTestRequest:
+			{
+			const TProxyProtocolRequest* request = reinterpret_cast<const TProxyProtocolRequest*>(aOption->Ptr());
+			TRAPD(r,CUdpClientTestBase::StartTestL(request->name,this));
+			if (r == KErrNone)
+				{
+				break;
+				}
+			}
+		default:
+			iSocket->Error(KErrNotSupported,MSocketNotify::EErrorIoctl);
+		}
+	}
+	
+void CProxyProvd::TestComplete(TProxyProtocolTestResult aResult)
+/**
+Called by the state machine (CInternalSocketTester) when a test completes (or fails early). Completes the ioctl to pass the result back to the client side test code.
+@param aResult	The result of the test (EPass or EFail)
+*/
+	{
+	TProxyProtocolRequest resultStruct;
+	resultStruct.result = aResult;
+	TPckg<TProxyProtocolRequest> resultPckg(resultStruct);
+	iSocket->IoctlComplete(&resultPckg);
+	}
+	
+void CProxyProvd::CancelIoctl(TUint /*aLevel*/,TUint /*aName*/)
+	{}
+	
+TInt CProxyProvd::Write(RMBufChain& /*aData*/, TUint /*options*/, TSockAddr* /*anAddr*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TUint CProxyProvd::Write(const TDesC8& /*aDesc*/, TUint /*options*/, TSockAddr* /*anAddr*/)
+	{
+	return (TUint)KErrNotSupported; //The return should really be a TInt possibly need to change the interface	
+	}
+	
+TInt CProxyProvd::GetData(RMBufChain& /*aData*/, TUint /*aLength*/, TUint /*options*/,TSockAddr* /*anAddr*/)
+	{
+	return KErrNotSupported;
+	}
+
+void CProxyProvd::GetData(TDes8& /*aDesc*/,TUint /*options*/,TSockAddr* /*anAddr*/)
+	{}
+
+void CProxyProvd::ActiveOpen(void)
+	{}
+	
+void CProxyProvd::ActiveOpen(const TDesC8 &/*aConnectionData*/)
+	{}
+
+TInt CProxyProvd::PassiveOpen(TUint /*aQue*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::PassiveOpen(TUint /*aQue*/,const TDesC8& /*aConnectionData*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::GetOption(TUint /*level*/,TUint /*name*/,TDes8& /*anOption*/ )const
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::SetOption(TUint /*level*/,TUint /*name*/,const TDesC8& /*anOption*/)
+	{
+	return KErrNotSupported;
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/src/pudpclienttests.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,2030 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+//#include <elements/nm_messages_child.h>
+
+#include "pudpclienttests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "httpudpflow.h"
+
+//const TUint16 KActivityNull = 0;
+
+//Add Blocks of 64
+static const TInt KBlockSize1 = 64;
+static const TInt KMinGrowth1 = 30;
+static const TInt KThresholdGrowth1 = 30;
+static const TInt KInitialAllocation1 = 128;
+
+static const TInt KHeapSize	= 1024 * 1024;	//1MB
+
+using namespace Messages;
+
+
+//-------------------------------------------------------------------------------------------------
+//	CUdpClientTestBase
+//-------------------------------------------------------------------------------------------------	
+ 
+#define BEGIN_TESTLIST
+
+#define ADD_TEST(name) \
+	if (aTestName == _L(#name))\
+		{\
+		return CUdpClient ## name::NewL(aProvd);\
+		}
+	
+#define END_TESTLIST \
+	User::Leave(KErrNotSupported);\
+	return NULL;	
+	
+CUdpClientTestBase* CUdpClientTestBase::CreateTestL(const TDesC& aTestName, CProxyProvd* aProvd)
+	{
+	BEGIN_TESTLIST
+		ADD_TEST(TestUPnP)		
+		ADD_TEST(TestUPnP1)
+		ADD_TEST(TestUPnP2)
+		ADD_TEST(TestUPnP3)
+		ADD_TEST(TestUPnP4)
+		ADD_TEST(TestUPnP5)
+		ADD_TEST(TestUPnP6)
+		ADD_TEST(TestUPnP7)
+		ADD_TEST(TestUPnP8)
+		ADD_TEST(TestUPnP9)
+		ADD_TEST(TestUPnP10)
+		ADD_TEST(TestUPnP11)
+		ADD_TEST(TestUPnP12)
+		
+	END_TESTLIST
+	}
+
+
+void CUdpClientTestBase::StartTestL(const TDesC& aTestName, CProxyProvd* aProvd)
+	{
+	CUdpClientTestBase* test = CreateTestL(aTestName,aProvd);
+	CleanupStack::PushL(test);
+	test->CUdpClientTestBase::ConstructL();
+	CActiveScheduler::Add(test);
+	CleanupStack::Pop(test);
+	TRequestStatus* stat = &test->iStatus;
+	test->SetActive();
+	User::RequestComplete(stat,KErrNone);
+	}
+
+CUdpClientTestBase::CUdpClientTestBase(CProxyProvd* aProvd) :
+	CActive(EPriorityNormal),
+	iProvd(aProvd)
+	{}
+	
+void CUdpClientTestBase::ConstructL()
+	{
+	//Create the Chunk Manager
+	CChunkManager* chkmgr = CChunkManager::NewL ( KHeapSize );
+	if ( chkmgr )
+		{
+		chkmgr->AddPoolL ( KBlockSize1, KInitialAllocation1, KMinGrowth1, KThresholdGrowth1 );
+		}
+	
+	iChunkManager = chkmgr;
+	iAllocator.SetChunkManager(iChunkManager);
+	SetLoggerL();
+	}
+	
+CUdpClientTestBase::~CUdpClientTestBase()
+	{
+	iLogger.Close();
+	delete iChunkManager;
+	}
+
+/**	Override this function if you want cleanup to happen before the completion of
+	the test case. This function is called before the test is completed 
+ */
+void CUdpClientTestBase::Cleanup()
+	{}
+
+/** Sets the test case as active again and prevents the object from being destroyed
+	when the RunL completes.
+	
+	Note: The active object is not complete the request again automatically, if this behaviour is
+	desired the user must call User::RequestComplete
+ */
+void CUdpClientTestBase::Reschedule()
+	{
+	SetActive();
+	iReschedule = TRUE;
+	}
+	
+void CUdpClientTestBase::CompleteSelf ( TInt aError )
+	{
+	TRequestStatus* pStat = &iStatus;
+    User::RequestComplete ( pStat, aError );
+	}	
+
+/** Attaches the iLogger variable to the TestExecute Log Server. This enable this prt to write to
+	the testexecute logs as if it were running directly from TestExecute
+ */
+// 	SetLoggerL() is taken directly from CTestServer::StartLoggerL() in the TEF src TestServerBase.Cpp
+
+
+void CUdpClientTestBase::SetLoggerL()
+	{
+    	// Create a cinidata object for parsing the testexecute.ini
+	CTestExecuteIniData* parseTestExecuteIni = NULL;
+	TBuf<KMaxTestExecuteNameLength> resultFilePath;
+	TBuf<KMaxTestExecuteNameLength> xmlFilePath;
+	TInt logMode;
+	TInt logLevel;
+	
+	TRAPD(err,parseTestExecuteIni = CTestExecuteIniData::NewL());
+	if (err == KErrNone)
+		{
+		CleanupStack::PushL(parseTestExecuteIni);
+		parseTestExecuteIni->ExtractValuesFromIni();
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFHtmlKey, resultFilePath);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFXmlKey, xmlFilePath);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFLogMode, logMode);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFLogSeverityKey, logLevel);
+		}
+	else
+		{
+		resultFilePath.Copy(KTestExecuteLogPath);
+		xmlFilePath.Copy(KTestExecuteLogPath);
+		logMode = TLoggerOptions(ELogHTMLOnly);
+		logLevel = RFileFlogger::TLogSeverity(ESevrAll);
+		}
+	Logger().SetLoggerOptions(logMode);
+		
+	// Initialise a handle to the file logger
+	User::LeaveIfError(Logger().Connect());
+	RFs fS;
+	User::LeaveIfError(fS.Connect());
+	CleanupClosePushL(fS);
+	RFile file;
+	TBuf<KMaxTestExecuteNameLength> xmlLogFile(xmlFilePath);
+	TBuf<KMaxTestExecuteNameLength> logFile;
+	TBuf<KMaxTestExecuteNameLength> logFileNameFile(resultFilePath);
+	logFileNameFile.Append(KTestExecuteScheduleTestLogCompatibilityNameFile);
+	if(file.Open(fS,logFileNameFile,EFileRead | EFileShareAny) != KErrNone)
+		{
+		// For the old flogger we have to create an individual file
+		_LIT(KTxtLog,"TEIntSock.txt");
+		logFile.Copy(KTxtLog);
+		logMode = TLoggerOptions(0);
+		Logger().SetLoggerOptions(logMode);
+		}
+	else
+		{
+		CleanupClosePushL(file);
+		TBuf8<KMaxTestExecuteNameLength> logFile8;
+		TInt fileSize;
+		User::LeaveIfError(file.Size(fileSize));
+		User::LeaveIfError(file.Read(logFile8,fileSize));
+		logFile.Copy(logFile8);
+		xmlLogFile.Append(logFile);
+		_LIT(KXmlExtension,".xml");
+		xmlLogFile.Append(KXmlExtension);
+		_LIT(KHtmExtension,".htm");
+		logFile.Append(KHtmExtension);
+		CleanupStack::Pop(&file);
+		file.Close();
+		}
+	TBuf<KMaxTestExecuteLogFilePath> logFilePath(resultFilePath);
+	logFilePath.Append(logFile);
+	CleanupStack::Pop(&fS);
+	fS.Close();
+	
+	if (logMode == 0 || logMode == 2)
+		{
+		User::LeaveIfError(Logger().HtmlLogger().CreateLog(logFilePath,	RTestExecuteLogServ::ELogModeAppend));
+		}
+	if (logMode == 1 || logMode == 2)
+		{
+		User::LeaveIfError(Logger().XmlLogger().CreateLog(xmlLogFile,RFileFlogger::ELogModeAppend));
+		Logger().XmlLogger().SetLogLevel(RFileFlogger::TLogSeverity(logLevel));
+		}
+	if (parseTestExecuteIni != NULL)
+		{
+		CleanupStack::PopAndDestroy(parseTestExecuteIni);
+		}
+	}
+	
+
+	
+/** Called by the active scheduler in order to run the test 
+ */
+void CUdpClientTestBase::RunL()
+	{
+	iReschedule = EFalse;
+	TVerdict res = RunTestL();
+	if (!iReschedule)
+		{
+		Cleanup();
+		FinishTest(res);
+		delete this;
+		return;
+		}
+	}
+	
+void CUdpClientTestBase::FinishTest(TVerdict aResult)
+	{
+	iProvd->TestComplete(aResult);
+	}
+	
+void CUdpClientTestBase::DoCancel()
+	{
+	Cleanup();
+	}
+	
+//------------------------------------------------------------//	
+/////////////////// CUdpClientTestUPnP /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+CUdpClientTestUPnP* CUdpClientTestUPnP::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP* ret = new ( ELeave ) CUdpClientTestUPnP ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP::CUdpClientTestUPnP ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP::~CUdpClientTestUPnP ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP::RunTestL()
+	{//This part of the class creates a dummy server and client
+	//The client sends a m-search request to the server
+	//and the server responds with a Discovery Responses...this is the point where the test cases come into play
+	//every test case send an invalid request to the client using udpflow
+	//the client validates these responses
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));		
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase1, iAllocator );	//KTestCase1 = "testcase1"
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+	
+	
+CUdpClientTestUPnP1* CUdpClientTestUPnP1::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP1* ret = new ( ELeave ) CUdpClientTestUPnP1 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP1::CUdpClientTestUPnP1 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP1::~CUdpClientTestUPnP1 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP1::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP1::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase2, iAllocator );	//KTestCase2 = "testcase2"
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP1::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP1::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}	
+
+
+
+//---------------------------------------------------------------------------------------------------------------------------------
+
+
+
+CUdpClientTestUPnP2* CUdpClientTestUPnP2::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP2* ret = new ( ELeave ) CUdpClientTestUPnP2 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP2::CUdpClientTestUPnP2 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP2::~CUdpClientTestUPnP2 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP2::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP2::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase3, iAllocator );	//KTestCase2 = "testcase2"
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP2::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP2::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+//---------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+CUdpClientTestUPnP3* CUdpClientTestUPnP3::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP3* ret = new ( ELeave ) CUdpClientTestUPnP3 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP3::CUdpClientTestUPnP3 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP3::~CUdpClientTestUPnP3 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP3::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP3::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase4, iAllocator );	//KTestCase2 = "testcase2"
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP3::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP3::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+//----------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+
+CUdpClientTestUPnP4* CUdpClientTestUPnP4::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP4* ret = new ( ELeave ) CUdpClientTestUPnP4 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP4::CUdpClientTestUPnP4 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP4::~CUdpClientTestUPnP4 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP4::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP4::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase5, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP4::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP4::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+	
+	
+	//----------------------------------------------------------------------------------------------------------------------------
+	
+	
+
+
+CUdpClientTestUPnP5* CUdpClientTestUPnP5::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP5* ret = new ( ELeave ) CUdpClientTestUPnP5 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP5::CUdpClientTestUPnP5 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP5::~CUdpClientTestUPnP5 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP5::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP5::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase6, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP5::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP5::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	/*
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	*/
+	}
+
+
+//-------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+CUdpClientTestUPnP6* CUdpClientTestUPnP6::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP6* ret = new ( ELeave ) CUdpClientTestUPnP6 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP6::CUdpClientTestUPnP6 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP6::~CUdpClientTestUPnP6 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP6::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP6::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase7, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+			
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP6::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP6::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+
+//-------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+CUdpClientTestUPnP7* CUdpClientTestUPnP7::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP7* ret = new ( ELeave ) CUdpClientTestUPnP7 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP7::CUdpClientTestUPnP7 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP7::~CUdpClientTestUPnP7 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP7::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP7::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase8, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP7::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP7::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+
+//-------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+CUdpClientTestUPnP8* CUdpClientTestUPnP8::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP8* ret = new ( ELeave ) CUdpClientTestUPnP8 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP8::CUdpClientTestUPnP8 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP8::~CUdpClientTestUPnP8 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP8::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP8::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase9, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP8::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP8::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+
+//-------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+CUdpClientTestUPnP9* CUdpClientTestUPnP9::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP9* ret = new ( ELeave ) CUdpClientTestUPnP9 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP9::CUdpClientTestUPnP9 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP9::~CUdpClientTestUPnP9 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP9::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP9::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase10, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP9::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP9::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+//-------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+CUdpClientTestUPnP10* CUdpClientTestUPnP10::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP10* ret = new ( ELeave ) CUdpClientTestUPnP10 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP10::CUdpClientTestUPnP10 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP10::~CUdpClientTestUPnP10 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP10::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP10::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase11, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP10::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP10::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+//-------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+CUdpClientTestUPnP11* CUdpClientTestUPnP11::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP11* ret = new ( ELeave ) CUdpClientTestUPnP11 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP11::CUdpClientTestUPnP11 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL), iState ( ECreateTestServer )
+	{
+	}
+
+CUdpClientTestUPnP11::~CUdpClientTestUPnP11 ()
+	{
+	iTimer.Close ();
+	}
+
+void CUdpClientTestUPnP11::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpClientTestUPnP11::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase12, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP11::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP11::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+//-------------------------------------------------------------------------------------------------------------------------------
+
+
+
+
+CUdpClientTestUPnP12* CUdpClientTestUPnP12::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpClientTestUPnP12* ret = new ( ELeave ) CUdpClientTestUPnP12 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpClientTestUPnP12::CUdpClientTestUPnP12 ( CProxyProvd* aProvd ) :
+	CUdpClientTestBase(aProvd), iTestServer(NULL),iState ( ECreateTestServer ), iSocketHandler ( *this ), iPort(1025)
+	{
+	}
+
+CUdpClientTestUPnP12::~CUdpClientTestUPnP12 ()
+	{
+	iTimer.Close ();
+	
+	delete iSocketOpener;
+	iSocketHandler.CancelAll ();
+	
+	iSocketArray.Close();
+	}
+
+void CUdpClientTestUPnP12::ConstructL()
+	{
+	iTimer.CreateLocal ();
+	
+	}
+
+TVerdict CUdpClientTestUPnP12::RunTestL()
+	{
+	const TUint16 KActivityNull = 0;
+	switch ( iState )
+		{
+		case ECreateTestServer:
+			{
+			iLogger.WriteFormat(_L("<i>Creating TestServer..... </i>"));
+			
+			iTestServer = CTestMUdpServer::NewL ( *this );
+			
+			iState  = EOpenTestSocket;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		case EOpenTestSocket:
+			{
+			iSocketOpener = CSocketOpener::NewL ( *this );
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+
+			iState  = ECreateTestClient;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;
+			}
+		case ECreateTestClient:
+			{
+			iLogger.WriteFormat(_L("<i>TestServer is created..... </i>"));			
+			iLogger.WriteFormat(_L("<i>Creating TestClient..... </i>"));
+
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpUdpFlow, iChunkManager);
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };	
+			
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+						
+			RClientInterface::OpenPostMessageClose ( NodeId (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			iState  = ESendRequestData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		
+		case ESendRequestData:
+			{
+			iLogger.WriteFormat(_L("<i>Client is Created</i>"));
+			iLogger.WriteFormat(_L("<i>Send data..... </i>"));
+			
+			RMemChunk st;
+			st.CreateL ( KTestCase12, iAllocator );	
+			TSsdpInfo searchInfo ( 5, st ); // MX , ST
+			TUpnpMessage::TUPnPSearchRequest msg ( searchInfo );
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg );
+
+			iTimer.After ( iStatus, 5000000 ); // 5secs
+			
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+
+		case ECleanup:		
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			return EPass;
+			}
+			
+		case EFailed:	
+			{
+			delete iTestServer;
+			// cleanup udp client flow
+			TEChild::TDestroy msg;
+			iClientId.Node ().ReceivedL ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iClientId ), msg);
+
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+		}
+	}
+	
+void CUdpClientTestUPnP12::OnTestServerEventL ( TInt aError )
+	{
+	CompleteSelf ( aError );
+	}
+	
+void CUdpClientTestUPnP12::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iClientId = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchResponse > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+void CUdpClientTestUPnP12::OpenComplete ( RInternalSocket& aSocket )
+	{
+	
+	TInetAddr addr ( iPort );
+	addr.SetAddress ( KInetAddrAny );
+
+	aSocket.Bind( addr );
+	iSocketHandler.Attach ( aSocket );
+	iSocketArray.Append(&aSocket);
+	iPort++;
+	
+	CompleteSelf ( KErrNone );
+	}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpclient/src/testmudpserver.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,215 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include "testmudpserver.h"
+#include "pudpclienttests.h"
+#include "upnp_cf_msgs.h"
+
+
+const TUint32 KMulticastAddrIp = INET_ADDR ( 239, 255, 255, 250 );
+const TUint KMulticastAddrPort = 1900;
+
+CTestMUdpServer* CTestMUdpServer::NewL ( MTestServerObserver& aObserver )
+	{
+	CTestMUdpServer* self = new ( ELeave ) CTestMUdpServer ( aObserver );
+	CleanupStack::PushL ( self );
+	self->ConstructL ();
+	CleanupStack::Pop ();
+	return self;		
+	}
+
+CTestMUdpServer::CTestMUdpServer ( MTestServerObserver& aObserver ) 
+	: iObserver ( aObserver ), iSocketHandler ( *this )
+	{	
+	}
+	
+void CTestMUdpServer::ConstructL ()
+	{
+	User::LeaveIfError ( OpenSocket () );	
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	}
+
+CTestMUdpServer::~CTestMUdpServer ()
+	{
+	Shutdown ();
+	iSocketHandler.CancelAll ();
+	iSocket.Close ();
+	delete iSocketOpener;
+	TUpnpMessage::DeRegister ();
+	}
+	
+TInt CTestMUdpServer::OpenSocket ()
+	{
+	TInt err = KErrNone;
+	if ( NULL == iSocketOpener )
+		{
+		TRAP ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );
+		}
+
+	if ( err == KErrNone )
+		iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+
+	return err;
+	}
+	
+void CTestMUdpServer::Startup ()
+	{//start listening to the mutlicast addresss
+	//TInt ret = KErrNone;	
+	TInetAddr addr;
+  	addr.SetAddress ( KMulticastAddrIp );
+  	addr.SetPort ( KMulticastAddrPort );
+
+	if ( addr.Family() != KAfInet6 )
+		{
+		addr.ConvertToV4Mapped();				
+		}
+	TPckgBuf<TIp6Mreq> mReqBuf;
+	mReqBuf().iAddr = addr.Ip6Address();
+	mReqBuf().iInterface = 0;
+		
+	iSocket.SetOpt( KSoIp6JoinGroup, KSolInetIp, mReqBuf ); // Join the multicast group
+	
+	iSocketHandler.RecvFrom (); // Start the receive
+	}
+	
+void CTestMUdpServer::Shutdown ()
+	{
+	TInetAddr addr;
+  	addr.SetAddress ( KMulticastAddrIp );
+  	addr.SetPort ( KMulticastAddrPort );
+
+	if ( addr.Family() != KAfInet6 )
+		{
+		addr.ConvertToV4Mapped();				
+		}
+	TPckgBuf<TIp6Mreq> mReqBuf;
+	mReqBuf().iAddr = addr.Ip6Address();
+	mReqBuf().iInterface = 0;
+		
+	iSocket.SetOpt( KSoIp6LeaveGroup, KSolInetIp, mReqBuf ); // leave the multicast group		
+	}
+	
+void CTestMUdpServer::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	TInetAddr addr ( KMulticastAddrPort );
+
+	addr.SetAddress ( KInetAddrAny );
+	TInt err = aSocket.Bind ( addr );
+
+	if ( err == KErrNone )
+		Startup ();
+	TRAP_IGNORE(iObserver.OnTestServerEventL ( err ));
+	}	
+	
+void CTestMUdpServer::RecvFromComplete ( RMBufChain& aData, const TSockAddr& aAddr )
+	{//data/request completely recd
+	iSendToAddr = aAddr;
+	TBool recvAgain = EFalse;
+	TRAP_IGNORE ( DoSendL ( aData, recvAgain ) );	
+	aData.Free ();
+	
+	if ( recvAgain )
+		{
+		iSocketHandler.RecvFrom (); // Start the receive from the  multicast address
+		}
+	}
+	
+void CTestMUdpServer::DoSendL ( RMBufChain& aData, TBool& aRecvAgain )
+	{//send the packet to the multicast address
+	RBuf8 dataRcvd;
+	dataRcvd.CreateMaxL ( aData.Length () );	//aData is the m-search request received..its a dummy request
+	aData.CopyOut ( dataRcvd );
+	
+	if ( dataRcvd.FindF ( KTestCase1 ) != KErrNotFound )	//receives the requests
+		{//if request is "TestCase1" then execute test case1 and send a response with missing content length
+		//this response is captured by the client CTestUpnpClient# object & validated
+		iSendChain.CreateL ( KInvalidCL );		//send responses
+		iSocketHandler.SendTo ( iSendChain, iSendToAddr );			//send to the client
+	    }
+	else if ( dataRcvd.FindF ( KTestCase2 ) != KErrNotFound )
+		{
+		iSendChain.CreateL ( KMissingST );					//send invalid response
+		iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+    else if ( dataRcvd.FindF ( KTestCase3 ) != KErrNotFound )
+		{
+		iSendChain.CreateL ( KMissingRespLocn );					//send invalid response
+		iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+    else if ( dataRcvd.FindF ( KTestCase4 ) != KErrNotFound )
+		{
+		iSendChain.CreateL ( KMissingContentLength );					//send invalid response
+		iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+    else if ( dataRcvd.FindF ( KTestCase5 ) != KErrNotFound )
+		{
+		iSendChain.CreateL ( KMissingRespUSN );					//send invalid response
+		iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+     else if ( dataRcvd.FindF ( KTestCase6 ) != KErrNotFound )
+		{
+		iSendChain.CreateL ( KInvalidCacheControl );					//send invalid response
+		iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }        
+      else if ( dataRcvd.FindF ( KTestCase7 ) != KErrNotFound )
+		{
+		iSendChain.CreateL ( KMissingExtn );					//send invalid response
+		iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+      else if ( dataRcvd.FindF ( KTestCase8 ) != KErrNotFound )
+      	{
+      	iSendChain.CreateL ( KInvalidRes8 );					//send invalid response
+      	iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+      else if ( dataRcvd.FindF ( KTestCase9 ) != KErrNotFound )
+      	{
+      	iSendChain.CreateL ( KInvalidRes9 );					//send invalid response
+      	iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+      else if ( dataRcvd.FindF ( KTestCase10 ) != KErrNotFound )
+      	{
+      	iSendChain.CreateL ( KInvalidRes10 );					//send invalid response
+      	iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+      else if ( dataRcvd.FindF ( KTestCase11 ) != KErrNotFound )
+      	{
+      	iSendChain.CreateL ( KInvalidRes11 );					//send invalid response
+      	iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+      else if ( dataRcvd.FindF ( KTestCase12 ) != KErrNotFound )
+      	{
+      	iSendChain.CreateL ( KInvalidRes12 );					//send invalid response
+      	iSocketHandler.SendTo ( iSendChain, iSendToAddr );        
+        }
+    else
+    	{
+    	aRecvAgain = ETrue;
+    	}
+	
+	dataRcvd.Close ();	
+	}
+	
+void CTestMUdpServer::SendToComplete ( TInt /*aLength*/ )
+	{	
+	iSendChain.Init ();
+	iSocketHandler.RecvFrom (); // Start the receive
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/bwins/udpserveru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	InstallProxy @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/eabi/udpserveru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,5 @@
+EXPORTS
+	InstallProxy @ 1 NONAME
+	_ZTIN4Meta18RMetaDataContainerINS_13SMetaDataEComEEE @ 2 NONAME
+	_ZTVN4Meta18RMetaDataContainerINS_13SMetaDataEComEEE @ 3 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,33 @@
+/*
+* 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:
+*
+*/
+
+
+/**
+@file
+*/
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+../group/udpserver.iby	/epoc32/rom/include/udpserver.iby
+
+PRJ_TESTMMPFILES
+
+./udpserver.mmp support
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/group/udpserver.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+/*
+* 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 __UDPSERVER_IBY__
+#define __UDPSERVER_IBY__
+
+file=ABI_DIR\DEBUG_DIR\udpserver.prt 			                  System\Libs\udpserver.prt
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/group/udpserver.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,77 @@
+/*
+* 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:
+*
+*/
+
+TARGET			udpserver.prt
+TARGETTYPE		DLL
+UID      0x10003d38
+VENDORID 0x70000001
+
+DEFFILE		udpserver.def
+
+
+SOURCEPATH		../src
+SOURCE			protocolfamily.cpp
+SOURCE			proxyprotocol.cpp
+SOURCE			pudpservertests.cpp
+
+
+USERINCLUDE		../inc
+USERINCLUDE   	../../udpclient/inc
+USERINCLUDE		../../../../server/flow/inc
+USERINCLUDE		../../../../server/controlpoint/inc
+USERINCLUDE		../../../../server/servicepoint/inc
+USERINCLUDE		../../../../upnputils/inc
+USERINCLUDE		../../../../upnpdescription/inc
+USERINCLUDE		../../../../upnpmessage/inc
+USERINCLUDE		../../../../client/upnpplugin/inc
+USERINCLUDE		../../../../Server/AppProtIntf/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/upnp
+SYSTEMINCLUDE	/epoc32/include/comms-infras
+SYSTEMINCLUDE   /epoc32/include/test
+
+LIBRARY		euser.lib     
+LIBRARY		esock.lib
+LIBRARY		esocksvr.lib
+LIBRARY		mbufmgr.lib
+LIBRARY		testexecutelogclient.lib
+LIBRARY		efsrv.lib
+LIBRARY		cinidata.lib
+LIBRARY     nifman.lib
+LIBRARY		commsfw.lib
+LIBRARY		testexecuteutils.lib
+LIBRARY		rfileloggerclient.lib
+LIBRARY     netmeta.lib		// for the ABIv2
+LIBRARY		insock.lib 
+LIBRARY		sockethandler.lib
+LIBRARY 	upnputils.lib
+LIBRARY		nodemessages.lib
+LIBRARY 	netinterfaces.lib
+LIBRARY 	factories.lib
+LIBRARY 	appprotinfmsgs.lib
+LIBRARY 	chunkmgr.lib
+
+START WINS
+BASEADDRESS		0x59000000
+END
+
+CAPABILITY CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+UNPAGED
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/inc/protocolfamily.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(__PROTOCOLFAMILY_H__)
+#define __PROTOCOLFAMILY_H__
+
+#include "es_ptest.h"
+#include <es_prot.h>
+#include <comms-infras/nifif.h>
+#include <dns_qry.h>
+
+//---------------------------------------------------------------------------------------------------------
+
+NONSHARABLE_CLASS(CTestIntSocketProtocolFamily): public CProtocolFamilyBase
+	{
+private:
+	CTestIntSocketProtocolFamily();	
+public:
+	static CTestIntSocketProtocolFamily * NewL();
+	void ConstructL();
+	TInt Install();
+	TInt Remove();
+	CProtocolBase * NewProtocolL(TUint aSockType,TUint aProtocol);
+	TUint ProtocolList(TServerProtocolDesc *& aProtocolList);
+private:
+	void Construct();
+private:
+	TServerProtocolDesc iProtocolDescs[1];
+	};
+
+#endif //__PROTOCOLFAMILY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/inc/proxyprotocol.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(__PROXYPROTOCOL_H)
+#define __PROXYPROTOCOL_H
+
+#include "es_ptest.h"
+#include <es_prot.h>
+#include <comms-infras/nifif.h>
+#include <dns_qry.h>
+
+enum TDPanic
+	{
+	EBadProtocol = 1000,
+	EBadCall = 1001,
+	ENotBound = 1002,
+	ENotStarted = 1003,
+	EInterfaceNotDeleted = 1004,
+	EIdAndNoHolder = 1005,
+	EIfAndHolder = 1006,
+	ETestPanic = 1007
+	};
+	
+void Panic(TDPanic aPanic);
+
+
+NONSHARABLE_CLASS(CProxyProtocol): public CProtocolBase
+	{
+public:
+
+	~CProxyProtocol();
+	
+	static CProxyProtocol *NewL(TInt aProtocol, TServerProtocolDesc* aProtoDesc);
+	CServProviderBase *NewSAPL(TUint aProtocol);
+	TBool CanCreateSockets();
+	void InitL(TDesC& aTag);
+	void BindL(CProtocolBase *aProtocol, TUint anId);
+	virtual void BindToL(CProtocolBase *protocol);
+	void StartL(void);
+	TInt Send(RMBufChain &,CProtocolBase* aSourceProtocol);
+	void Process(RMBufChain &,CProtocolBase* aSourceProtocol);
+	TInt Send(TDes8 &, TSockAddr *to,TSockAddr *from,CProtocolBase* aSourceProtocol);
+	void Process(TDes8 & ,TSockAddr *from,TSockAddr *to,CProtocolBase* aSourceProtocol);
+	void Identify(TServerProtocolDesc *)const;
+	TInt GetOption(TUint level,TUint name,TDes8 &anOption,CProtocolBase* aSourceProtocol);
+	TInt SetOption(TUint level,TUint name,const TDesC8& option,CProtocolBase* aSourceProtocol);
+	void Error(TInt anError,CProtocolBase* aSourceProtocol);
+	TBool IsStarted(){return iStarted;}
+private:
+	CProxyProtocol(TServerProtocolDesc* aProtoDesc);
+	
+private:
+	TInt iType;
+	TServerProtocolDesc* iProtoDesc;
+	TBool iStarted;
+	CArrayFixFlat<CProtocolBase *> iProtocols;
+	};
+
+NONSHARABLE_CLASS(CProxyProvd) : public CServProviderBase
+	{
+public:
+	static CProxyProvd *NewL(CProxyProtocol &aProtocol);
+	virtual void Ioctl(TUint level,TUint name,TDes8 *anOption);
+	void TestComplete(TProxyProtocolTestResult result);
+	
+	void LocalName(TSockAddr &anAddr)const;
+	virtual TInt SetLocalName(TSockAddr &anAddr);
+	virtual void RemName(TSockAddr &anAddr)const;
+	virtual TInt SetRemName(TSockAddr &anAddr);
+	virtual TInt GetOption(TUint level,TUint name,TDes8 &anOption)const;
+	virtual TInt SetOption(TUint level,TUint name,const TDesC8 &anOption);
+	
+	virtual void CancelIoctl(TUint aLevel,TUint aName);
+	virtual TInt Write(RMBufChain& aData, TUint options, TSockAddr* anAddr=NULL);
+	virtual TUint Write(const TDesC8& aDesc, TUint options, TSockAddr* anAddr);
+	virtual TInt GetData(RMBufChain& aData, TUint aLength, TUint options,TSockAddr* anAddr=NULL);
+	virtual void GetData(TDes8& aDesc,TUint options,TSockAddr* anAddr=NULL);
+	virtual void ActiveOpen(void);
+	virtual void ActiveOpen(const TDesC8 &aConnectionData);
+	virtual TInt PassiveOpen(TUint aQue);
+	virtual TInt PassiveOpen(TUint aQue,const TDesC8 &aConnectionData);
+	virtual void AutoBind( void );
+	virtual void Shutdown(TCloseType option);
+	virtual void Shutdown(TCloseType option,const TDesC8 &aDisconnectData);
+	virtual void Start();
+
+private:
+	CProxyProvd(CProxyProtocol &aProtocol);
+	
+private:
+	TBool iIsBound;
+	CProxyProtocol *iProtocol;
+	TSockAddr iAddr;
+	TBool iInputStopped;
+	TInt iListenErrorCode;
+	TBool iCancelIoctl; // Set when an IOCTL has been cancelled.
+	
+	TBool iBlockOnClose; //Used by and test Ioctl to cause the socket to hang on close
+	TBool iCompleteIoctl;
+	};
+
+#endif //__PROXYPROTOCOL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/inc/pudpservertests.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1432 @@
+/*
+* 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:
+*
+*/
+
+
+#if !defined(PUDPSERVERTESTS_H)
+#define PUDPSERVERTESTS_H
+
+#include <e32base.h>
+#include <testexecutestepbase.h>
+#include "proxyprotocol.h"
+#include <comms-infras/eintsock.h>
+#include <cchunkmanager.h>
+#include <rmemchunk.h>
+
+#include "es_mbuf.h"
+#include <elements/nm_node.h>
+#include <rsockethandler.h>
+#include <csocketopener.h>
+
+NONSHARABLE_CLASS(CUdpServerTestBase) : protected CActive
+	{
+public:
+	static void StartTestL(const TDesC& aTestName, CProxyProvd* aProvd);
+	virtual void RunL();
+
+protected:		
+	CUdpServerTestBase(CProxyProvd* aProvd);
+	virtual ~CUdpServerTestBase();
+	
+	//Utilities function to be use in RunTest()
+	void Reschedule();
+	CTestExecuteLogger iLogger;
+	void CompleteSelf ( TInt aError );
+	void FinishTest(TVerdict result);
+
+	CChunkManager*  iChunkManager;
+private:
+	//Implemented you own of these		
+	virtual TVerdict RunTestL() = 0;
+	virtual void Cleanup();
+	
+	void DoCancel();
+	void ConstructL();
+	void SetLoggerL();
+	CTestExecuteLogger& Logger();	
+	static CUdpServerTestBase* CreateTestL(const TDesC& aTestName, CProxyProvd* aProvd);
+		
+private:
+	CProxyProvd* iProvd;
+	TBool iReschedule; //Determines whether rescheduling is required
+	};
+	
+inline CTestExecuteLogger& CUdpServerTestBase::Logger()
+	{
+	return iLogger;
+	}
+
+//----------------------------------------------------------//
+/////////////////// CUdpServerTestUPnP /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+_LIT8 ( KMissingMX, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.255.250:1900\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+		
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;		
+	};
+
+
+_LIT8 ( KMSearch, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.255.250:1900\r\nMX: 120\r\nST: ssdp:all\r\n\r\n");
+NONSHARABLE_CLASS(CUdpServerTestUPnP1) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP1* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP1 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP1 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+
+//----------------------------------------------------------//
+/////////////////// CUdpServerTestUPnP2 /////////////////////////
+//////Testcase: Send the test data from the test client/////////
+//----------------------------------------------------------//
+
+_LIT8 ( KInvalidMX, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.255.250:1900\r\nMX: 200\r\nST: ssdp:all\r\n\r\n");
+NONSHARABLE_CLASS(CUdpServerTestUPnP2) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP2* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP2 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP2 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+	
+	
+	
+//---------------------------------------------------------------------------------------------------------
+//----------------------------------- CUdpServerTestUPnP3--------------------------------------------------
+//------------------------test case for M-search packet with invalid MAN header----------------------------
+//---------------------------------------------------------------------------------------------------------
+
+_LIT8 ( KInvalidMAN, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:hello\"\r\nHOST: 239.255.255.250:1900\r\nMX: 200\r\nST: ssdp:all\r\n\r\n");
+NONSHARABLE_CLASS(CUdpServerTestUPnP3) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP3* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP3 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP3 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+//-------------------------------------------------------------------------------------------------------------
+_LIT8 ( KInvalidMethod, "GET / HTTP/1.1 \r\r\r\r\r\r\r\r\r\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP4) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP4* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP4 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP4 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+
+//-------------------------------------------------------------------------------------------------------------
+_LIT8 ( KValidNotify, "NOTIFY * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nCACHE-CONTROL: max-age=1800\r\nLOCATION: http://10.192.196.204:54042/\r\nNT:upnp:rootdevice\r\nNTS:ssdp:alive\r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP5) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP5* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP5 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP5 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+//--------------------------------------------------------------------------------------------------------------------------------
+//--------------------------------------------- CUdpServerTestUPnP6 --------------------------------------------------------------
+//-------------------------------------Missing NTS header in notify packet-------------------------------------------------------
+
+_LIT8 ( KMissingNTS, "NOTIFY * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nCACHE-CONTROL: max-age=1800\r\nLOCATION: http://10.192.196.204:54042/\r\nNT:upnp:rootdevice\r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP6) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP6* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP6 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP6 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+//------------------------------------------------------------------------------------------------------------------------------
+
+_LIT8 ( KInvalidNotifyByeBye, "NOTIFY * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nNTS:ssdp:alive\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\n\r\n");
+NONSHARABLE_CLASS(CUdpServerTestUPnP7) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP7* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP7 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP7 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+
+//--------------------------------------------------------------------------------------------------------------------
+_LIT8 ( KMissingNotifyLocn, "NOTIFY * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nCACHE-CONTROL: max-age=1800\r\nNT:upnp:rootdevice\r\nNTS:ssdp:alive\r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\n\r\n");
+NONSHARABLE_CLASS(CUdpServerTestUPnP8) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP8* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP8 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP8 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+//-------------------------------------------------------------------------------------------------------------------------	
+	
+_LIT8 ( KMissingST, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.255.250:1900\r\nMX: 120\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP9) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP9* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP9 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP9 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+	
+	
+	
+//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
+_LIT8 ( KInvalidHdr, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nMCADDR: 239.255.255.250:1900\r\nMX: 120\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP10) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP10* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP10 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP10 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+_LIT8 ( KInvalidMaxAge, "NOTIFY * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nCACHE-CONTROL: \r\nLOCATION: http://10.192.196.204:54042/\r\nNT:upnp:rootdevice\r\nNTS:ssdp:alive\r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP11) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP11* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP11 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP11 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+_LIT8 ( KMissingNT, "NOTIFY * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nCACHE-CONTROL: max-age=1800\r\nLOCATION: http://10.192.196.204:54042/\r\nNTS:ssdp:alive\r\nSERVER: Apache 9.x, UPnP/1.0\r\nUSN: uuid:ae30fdec-16e3-4d75-ac72-b61c5d6d30d5::urn:schemas-upnp-org:device:BinaryLight:1\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP12) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP12* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP12 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP12 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+	
+//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+_LIT8 ( KMan, "MAN:\"ssdp:discover\"\r\n");
+NONSHARABLE_CLASS(CUdpServerTestUPnP13) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver				
+
+						
+	{
+public:
+	static CUdpServerTestUPnP13* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP13 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ ){	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP13 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+	
+//--------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP14) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase							
+					
+	{
+public:
+	static CUdpServerTestUPnP14* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP14 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,	
+		ESendErrorMsg,
+		ESendMsg,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP14 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	TState				iState;
+	RTimer				iTimer;
+	};
+/////////////////////////////////////////////////////////////////////////////////////////////
+_LIT8 ( KInvalidSsdpPort, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.255.250:1700\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP15) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP15* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP15 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP15 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+		
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;		
+	};
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+_LIT8 ( KMissingHost, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP16) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP16* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP16 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP16 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+		
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;		
+	};
+/////////////////////////////////////////////////////////////////////////////////////////////
+_LIT8 ( KMissingSsdpPort, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.255.250:\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP17) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP17* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP17 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP17 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+		
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;		
+	};
+/////////////////////////////////////////////////////////////////////////////////////////////
+_LIT8 ( KMissingSsdpPort1, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.255.250\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP18) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP18* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP18 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP18 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+		
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;		
+	};
+/////////////////////////////////////////////////////////////////////////////////////////////
+_LIT8 ( KInvalidSsdpHost, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.250.250:1900\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP19) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP19* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP19 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP19 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+		
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;		
+	};
+/////////////////////////////////////////////////////////////////////////////////////////////
+_LIT8 ( KInvalidHostMissingSsdpPort, "M-SEARCH * HTTP/1.1\r\nMAN: \"ssdp:discover\"\r\nHOST: 239.255.250.250\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP20) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP20* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP20 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP20 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+		
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;		
+	};
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+_LIT8 ( KMissingMan, "M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: ssdp:all\r\n\r\n");
+
+NONSHARABLE_CLASS(CUdpServerTestUPnP21) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP21* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP21 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP21 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+		
+private:	
+	Messages::TNodeId 	iMudpServer;
+	RInternalSocket		iClientSocket;
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;		
+	};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+NONSHARABLE_CLASS(CUdpServerTestUPnP22) : public CUdpServerTestBase,
+										public Messages::ASimpleNodeIdBase,
+										public MSocketHandlerObserver										
+	{
+public:
+	static CUdpServerTestUPnP22* NewL ( CProxyProvd* aProvd );
+	~CUdpServerTestUPnP22 ();
+	
+	void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage );
+	
+	// From MSocketHandlerObserver
+	void OpenComplete ( RInternalSocket& aSocket ) ;
+	void ConnectComplete () 
+	{	}
+	void AcceptComplete ( RInternalSocket& /*aSocket*/ ) 
+	{	}
+	void SendComplete ( TInt /*aLength*/ )
+	{	}
+	void SendToComplete ( TInt aLength );
+	void RecvComplete ( RMBufChain& /*aData*/ )
+	{	}
+	void RecvFromComplete ( RMBufChain& /*aData*/, const TSockAddr& /*aAddr*/ )
+	{	}
+	void IoctlComplete ()
+	{	}
+	void Error ( TOperation /*aOperation*/, TInt /*aError*/ )
+	{	}
+	
+private:
+	enum TState
+		{
+		ECreateServer = 0,
+		EStartServer,
+		EOpenClientSocket,
+		ESendData,
+		ESendStopServer,
+		EServerStopped,
+		EFailed,
+		ECleanup
+		};
+		
+	CUdpServerTestUPnP22 ( CProxyProvd* aProvd );
+	void ConstructL ();
+	virtual TVerdict RunTestL ();
+	
+private:	
+	Messages::TNodeId 	iMudpServer;//produciton server module
+	
+	RInternalSocket		iClientSocket;//client socket
+	RSocketHandler		iSocketHandler;
+	CSocketOpener*		iSocketOpener;
+	RTimer				iTimer;
+	TState				iState;
+	RMBufChain			iSendChain;
+	TInetAddr			iSendToAddr;	
+	};
+
+
+
+#endif //PUDPSERVERTESTS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/src/protocolfamily.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,158 @@
+/*
+* 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:
+*
+*/
+
+
+#include <es_prot.h>
+#include <e32test.h>
+#include "es_ptest.h"
+#include <comms-infras/nifif.h>
+#include <es_mbuf.h>
+#include "ss_std.h"
+#include <ss_pman.h>
+#include <ss_glob.h>
+#include <es_mbman.h>
+#include <e32math.h>
+#include <dns_qry.h>
+#include <agenterrors.h>
+#include <e32property.h>
+
+#include "proxyprotocol.h"
+#include "protocolfamily.h"
+
+extern "C"
+	{
+	IMPORT_C CProtocolFamilyBase* InstallProxy(void);	// Force export 
+
+	EXPORT_C CProtocolFamilyBase * InstallProxy(void)
+	//
+	// Create a new protocol family
+	//
+		{
+		CTestIntSocketProtocolFamily* protocolFamily = NULL;
+		TRAP_IGNORE(protocolFamily = CTestIntSocketProtocolFamily::NewL());
+		return protocolFamily;
+		}
+	}
+
+CTestIntSocketProtocolFamily* CTestIntSocketProtocolFamily::NewL()
+//
+//
+//
+	{
+	CTestIntSocketProtocolFamily* pf=new(ELeave) CTestIntSocketProtocolFamily();
+	CleanupStack::PushL(pf);
+	pf->ConstructL();
+	CleanupStack::Pop();
+	return pf;
+	}
+
+void CTestIntSocketProtocolFamily::ConstructL()
+//
+//
+//
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+
+	}
+
+CTestIntSocketProtocolFamily::CTestIntSocketProtocolFamily() : CProtocolFamilyBase()
+	{
+	iProtocolDescs[0].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[0].iSockType=KSockDatagram; // not important whether datagram or stream for proxy
+	iProtocolDescs[0].iProtocol=KProxy;
+	iProtocolDescs[0].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[0].iByteOrder=EBigEndian;
+	iProtocolDescs[0].iServiceInfo=kDDatagramServiceInfo|KSIPeekData;
+	iProtocolDescs[0].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[0].iMessageSize=0x300;
+	iProtocolDescs[0].iName=KProxyName;
+	iProtocolDescs[0].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[0].iNamingServices=KNSNameResolution|KNSServiceResolution|KNSInfoDatabase;
+	iProtocolDescs[0].iNumSockets=100;
+/*
+	iProtocolDescs[1].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[1].iSockType=KSockDatagram;
+	iProtocolDescs[1].iProtocol=KTargetDatagram;
+	iProtocolDescs[1].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[1].iByteOrder=EBigEndian;
+	iProtocolDescs[1].iServiceInfo=kDDatagramServiceInfo|KSIPeekData;
+	iProtocolDescs[1].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[1].iMessageSize=0x300;
+	iProtocolDescs[1].iName=KTargetDatagramName;
+	iProtocolDescs[1].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[1].iNamingServices=KNSNameResolution|KNSServiceResolution|KNSInfoDatabase;
+	iProtocolDescs[1].iNumSockets=100;
+
+	iProtocolDescs[2].iAddrFamily=KProxyAddrFamily;
+	iProtocolDescs[2].iSockType=KSockStream;
+	iProtocolDescs[2].iProtocol=KTargetStream;
+	iProtocolDescs[2].iVersion=TVersion(KPTestIntSocketMajor,KPTestIntSocketMinor,KPTestIntSocketBuild);
+	iProtocolDescs[2].iByteOrder=EBigEndian;
+	iProtocolDescs[2].iServiceInfo=KDStreamServiceInfo;
+	iProtocolDescs[2].iSecurity=KSocketNoSecurity;
+	iProtocolDescs[2].iMessageSize=KSocketMessageSizeIsStream;
+	iProtocolDescs[2].iName=KTargetStreamName;
+	iProtocolDescs[2].iServiceTypeInfo=ESocketSupport|ECantProcessMBufChains;
+	iProtocolDescs[2].iNamingServices=0;
+	iProtocolDescs[2].iNumSockets=100;
+*/
+	__DECLARE_NAME(_S("CTestIntSocketProtocolFamily"));
+	}
+
+#pragma warning( disable : 4100 )
+
+TInt CTestIntSocketProtocolFamily::Install()
+	{
+	// Force a fail on Memory tests
+	char* ptr=new char;
+	if (!ptr)
+		return KErrNoMemory;
+	delete ptr;
+//	TAppProtIntfMessage::RegisterL ();
+	return KErrNone;
+	}
+
+TInt CTestIntSocketProtocolFamily::Remove()
+	{
+	//TAppProtIntfMessage::DeRegister	();
+	return KErrNone;
+	}
+
+TUint CTestIntSocketProtocolFamily::ProtocolList(TServerProtocolDesc *& aProtocolDescPointer)
+	{
+
+  	aProtocolDescPointer=new TServerProtocolDesc[KPTestIntSocketNumProtocols];
+  	if (!aProtocolDescPointer)
+  		return 0;
+
+	Mem::Copy(aProtocolDescPointer, iProtocolDescs, sizeof(TServerProtocolDesc)*KPTestIntSocketNumProtocols);
+
+	TRAP_IGNORE(Nif::CheckInstalledMBufManagerL();)
+
+	return KPTestIntSocketNumProtocols;
+	};
+
+CProtocolBase * CTestIntSocketProtocolFamily::NewProtocolL(TUint /* aSockType */,TUint aProtocol)
+	{
+
+	CProtocolBase* p=CProxyProtocol::NewL(aProtocol, &iProtocolDescs[aProtocol-1]);	
+	return p;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/src/proxyprotocol.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,311 @@
+/*
+* 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:
+*
+*/
+
+
+#include "es_ptest.h"
+#include "proxyprotocol.h"
+
+#include "pudpservertests.h"
+
+//---------------------------------------------------------------------------------------------------------
+
+void Panic(TDPanic aPanic)
+//
+// Panic the Protocol
+//
+	{
+
+	User::Panic(_L("TestInternalSocket Prot"),aPanic);
+	}
+
+	
+CProxyProtocol::CProxyProtocol(TServerProtocolDesc* aProtoDesc)
+//
+//
+//
+	:CProtocolBase(),iProtoDesc(aProtoDesc),iProtocols(0x16)
+	{
+	__DECLARE_NAME(_S("CProxyProtocol"));
+	iStarted=EFalse;
+	}
+
+CServProviderBase * CProxyProtocol::NewSAPL(TUint /*aProtocol*/)
+	{
+	return CProxyProvd::NewL(*this);
+	}
+
+
+CProxyProtocol::~CProxyProtocol()
+	{
+	for (TInt i=0;i<iProtocols.Count();i++)
+		{
+		iProtocols[i]->Close();
+		}
+	}
+
+CProxyProtocol *CProxyProtocol::NewL(TInt aType, TServerProtocolDesc* aProtoDesc)
+	{
+
+	CProxyProtocol* prot=0;
+	switch (aType)
+		{
+	case KProxy:
+		prot=new (ELeave) CProxyProtocol(aProtoDesc);
+		break;
+
+	default:
+		prot=(CProxyProtocol*)0xABCD; // keep lint happy
+		Panic(EBadProtocol);
+		}
+	prot->iType=aType;
+	return prot;
+	}
+
+void CProxyProtocol::InitL(TDesC& /*aTag*/)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	}
+
+void CProxyProtocol::BindL(CProtocolBase* /*aProtocol*/, TUint /*anId*/)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	}
+
+void CProxyProtocol::BindToL(CProtocolBase* aProtocol)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	iProtocols.AppendL(aProtocol);
+	aProtocol->Open();
+	}
+
+
+void CProxyProtocol::StartL(void)
+	{
+	// Force a fail on Memory tests
+	char* ptr=new(ELeave) char;
+	delete ptr;
+	iStarted=ETrue;
+	}
+
+TInt CProxyProtocol::Send(RMBufChain &,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return 1;
+	}
+
+TInt CProxyProtocol::Send(TDes8 &, TSockAddr* /*to*/,TSockAddr* /*from*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return 1;
+	}
+
+void CProxyProtocol::Process(RMBufChain &,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+
+void CProxyProtocol::Process(TDes8 & ,TSockAddr* /*from*/,TSockAddr* /*to*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+
+void CProxyProtocol::Identify(TServerProtocolDesc *aDesc) const
+	{
+	Mem::Copy(aDesc, iProtoDesc, sizeof(TServerProtocolDesc));
+	}
+
+TInt CProxyProtocol::GetOption(TUint level,TUint,TDes8&,CProtocolBase* /*aSourceProtocol*/)
+	{
+	
+	if(level==KNifOptLevel)
+		{
+		return KErrNotSupported;
+		}
+	return KErrNone;
+	}
+
+TInt CProxyProtocol::SetOption(TUint /*level*/,TUint /*name*/,const TDesC8& /*option*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	return KErrNone;
+	}
+
+void CProxyProtocol::Error(TInt /*anerror*/,CProtocolBase* /*aSourceProtocol*/)
+	{
+	}
+//----------------------------------------------------------------------------------------------
+CProxyProvd *CProxyProvd::NewL(CProxyProtocol &aProtocol)
+	{
+	CProxyProvd *sp=new(ELeave) CProxyProvd(aProtocol);
+//	CleanupStack::PushL(sp);
+//	sp->ConstructL();
+//	CleanupStack::Pop(sp);
+	return sp;
+	}
+
+CProxyProvd::CProxyProvd(CProxyProtocol &aProtocol)
+	{
+	__DECLARE_NAME(_S("CTestIntSocketProvd"));
+	iIsBound=EFalse;
+	iProtocol=&aProtocol;
+	iCompleteIoctl = FALSE;
+	}
+
+
+void CProxyProvd::LocalName(TSockAddr& anAddr) const
+	{
+	anAddr=iAddr;
+	}
+
+TInt CProxyProvd::SetLocalName(TSockAddr& anAddr)
+	{
+	iAddr=anAddr;
+	iIsBound=ETrue;
+	return KErrNone;
+	}
+
+void CProxyProvd::RemName(TSockAddr& /*anAddr*/)const
+	{
+	}
+
+TInt CProxyProvd::SetRemName(TSockAddr& /*anAddr*/)
+	{
+
+//	test.Printf(_L("CTestIntSocketProvd::SetRemName Port %x, Addr %lx\n"),addr.Port(),addr.Address());
+	return KErrNone;
+	}
+
+void CProxyProvd::Shutdown(TCloseType anOption)
+	{
+	if (iCompleteIoctl)
+		{
+		iSocket->IoctlComplete(NULL);
+		}
+	if (anOption==ENormal)
+		iSocket->CanClose();
+	}
+
+void CProxyProvd::Start()
+//
+//
+//
+	{
+	}
+
+void CProxyProvd::Shutdown(TCloseType /*anOption*/,const TDesC8 &/*aDisconnectData*/)
+	{
+	Panic(EBadCall);
+	}
+
+void CProxyProvd::AutoBind( void )
+	{
+//	test.Printf(_L("CTestIntSocketProvd::AutoBind\n"));
+	iIsBound=ETrue;
+	}
+	
+
+void CProxyProvd::Ioctl(TUint /*level*/,TUint name,TDes8* aOption)
+	{
+	/* Mallik...if you want to see connection creation, just ping www.google.com in command prompt,
+	change ip & uncomment 
+	RInternalSocket intSock;
+	intSock.Open(KAfInet, KSockStream, KProtocolInetTcp);	
+	const TUint32 ip = INET_ADDR(209,85,153,104);
+	TInetAddr addr(80);
+	addr.SetAddress(ip);
+	
+	TRequestStatus status;
+	intSock.Connect(addr, status);
+	User::WaitForRequest(status);	
+	*/
+	
+	switch (name)
+		{
+		case KProxyProtocolTestRequest:
+			{
+			const TProxyProtocolRequest* request = reinterpret_cast<const TProxyProtocolRequest*>(aOption->Ptr());
+			TRAPD(r,CUdpServerTestBase::StartTestL(request->name,this));
+			if (r == KErrNone)
+				{
+				break;
+				}
+			}
+		default:
+			iSocket->Error(KErrNotSupported,MSocketNotify::EErrorIoctl);
+		}
+	}
+	
+void CProxyProvd::TestComplete(TProxyProtocolTestResult aResult)
+/**
+Called by the state machine (CInternalSocketTester) when a test completes (or fails early). Completes the ioctl to pass the result back to the client side test code.
+@param aResult	The result of the test (EPass or EFail)
+*/
+	{
+	TProxyProtocolRequest resultStruct;
+	resultStruct.result = aResult;
+	TPckg<TProxyProtocolRequest> resultPckg(resultStruct);
+	iSocket->IoctlComplete(&resultPckg);
+	}
+	
+void CProxyProvd::CancelIoctl(TUint /*aLevel*/,TUint /*aName*/)
+	{}
+	
+TInt CProxyProvd::Write(RMBufChain& /*aData*/, TUint /*options*/, TSockAddr* /*anAddr*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TUint CProxyProvd::Write(const TDesC8& /*aDesc*/, TUint /*options*/, TSockAddr* /*anAddr*/)
+	{
+	return (TUint)KErrNotSupported; //The return should really be a TInt possibly need to change the interface	
+	}
+	
+TInt CProxyProvd::GetData(RMBufChain& /*aData*/, TUint /*aLength*/, TUint /*options*/,TSockAddr* /*anAddr*/)
+	{
+	return KErrNotSupported;
+	}
+
+void CProxyProvd::GetData(TDes8& /*aDesc*/,TUint /*options*/,TSockAddr* /*anAddr*/)
+	{}
+
+void CProxyProvd::ActiveOpen(void)
+	{}
+	
+void CProxyProvd::ActiveOpen(const TDesC8 &/*aConnectionData*/)
+	{}
+
+TInt CProxyProvd::PassiveOpen(TUint /*aQue*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::PassiveOpen(TUint /*aQue*/,const TDesC8& /*aConnectionData*/)
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::GetOption(TUint /*level*/,TUint /*name*/,TDes8& /*anOption*/ )const
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CProxyProvd::SetOption(TUint /*level*/,TUint /*name*/,const TDesC8& /*anOption*/)
+	{
+	return KErrNotSupported;
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/udpserver/src/pudpservertests.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,4141 @@
+/*
+* 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:
+*
+*/
+
+#include <ss_glob.h>
+#include <comms-infras/ss_thread.h>
+#include <comms-infras/ss_nodemessages_factory.h>
+#include <comms-infras/ss_nodemessages_dataclient.h>
+
+#include "pudpservertests.h"	
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "upnpflowfactory.h"
+#include "httpmudpflow.h"
+#include "upnp_cf_msgs.h"
+
+const TUint32 KMulticastAddrIp = INET_ADDR ( 239, 255, 255, 250 );
+const TUint KMulticastAddrPort = 1900;
+
+//Add Blocks of 64
+static const TInt KBlockSize1 = 64;
+static const TInt KMinGrowth1 = 30;
+static const TInt KThresholdGrowth1 = 30;
+static const TInt KInitialAllocation1 = 128;
+
+static const TInt KHeapSize	= 1024 * 1024;	//1MB
+
+using namespace Messages;
+
+
+//-------------------------------------------------------------------------------------------------
+//	CUdpServerTestBase
+//-------------------------------------------------------------------------------------------------	
+	
+/**	This is a static method that is called to get a given test running
+	@param aTestName The name of the test to be run
+	@param aProvd The name of the provider starting the test
+ */
+ 
+#define BEGIN_TESTLIST
+
+#define ADD_TEST(name) \
+	if (aTestName == _L(#name))\
+		{\
+		return CUdpServer ## name::NewL(aProvd);\
+		}
+	
+#define END_TESTLIST \
+	User::Leave(KErrNotSupported);\
+	return NULL;	
+	
+CUdpServerTestBase* CUdpServerTestBase::CreateTestL(const TDesC& aTestName, CProxyProvd* aProvd)
+	{
+	BEGIN_TESTLIST
+		ADD_TEST(TestUPnP15)
+		ADD_TEST(TestUPnP16)
+		ADD_TEST(TestUPnP17)
+		ADD_TEST(TestUPnP18)
+		ADD_TEST(TestUPnP19)
+		ADD_TEST(TestUPnP20)
+		ADD_TEST(TestUPnP21)
+		ADD_TEST(TestUPnP22)
+		ADD_TEST(TestUPnP13)
+		ADD_TEST(TestUPnP)
+		ADD_TEST(TestUPnP10)
+		ADD_TEST(TestUPnP11)
+		ADD_TEST(TestUPnP9)
+		ADD_TEST(TestUPnP1)	
+		ADD_TEST(TestUPnP2)	
+		ADD_TEST(TestUPnP3)	
+		ADD_TEST(TestUPnP4)
+		ADD_TEST(TestUPnP5)	
+		ADD_TEST(TestUPnP6)
+		ADD_TEST(TestUPnP7)
+		ADD_TEST(TestUPnP8)
+		ADD_TEST(TestUPnP14)
+		ADD_TEST(TestUPnP12)
+	END_TESTLIST
+	}
+
+
+void CUdpServerTestBase::StartTestL(const TDesC& aTestName, CProxyProvd* aProvd)
+	{
+	CUdpServerTestBase* test = CreateTestL(aTestName,aProvd);
+	CleanupStack::PushL(test);
+	test->ConstructL();
+	CActiveScheduler::Add(test);
+	CleanupStack::Pop(test);
+	TRequestStatus* stat = &test->iStatus;
+	test->SetActive();
+	User::RequestComplete(stat,KErrNone);
+	}
+
+CUdpServerTestBase::CUdpServerTestBase(CProxyProvd* aProvd) :
+	CActive(EPriorityNormal),
+	iProvd(aProvd)
+	{}
+	
+void CUdpServerTestBase::ConstructL()
+	{
+	//Create the Chunk Manager
+	CChunkManager* chkmgr = CChunkManager::NewL ( KHeapSize );
+	if ( chkmgr )
+		{
+		chkmgr->AddPoolL ( KBlockSize1, KInitialAllocation1, KMinGrowth1, KThresholdGrowth1 );
+		}
+	
+	iChunkManager = chkmgr;
+
+	SetLoggerL();
+	}
+	
+CUdpServerTestBase::~CUdpServerTestBase()
+	{
+	iLogger.Close();
+	delete iChunkManager;
+	}
+
+/**	Override this function if you want cleanup to happen before the completion of
+	the test case. This function is called before the test is completed 
+ */
+void CUdpServerTestBase::Cleanup()
+	{}
+
+/** Sets the test case as active again and prevents the object from being destroyed
+	when the RunL completes.
+	
+	Note: The active object is not complete the request again automatically, if this behaviour is
+	desired the user must call User::RequestComplete
+ */
+void CUdpServerTestBase::Reschedule()
+	{
+	SetActive();
+	iReschedule = TRUE;
+	}
+	
+void CUdpServerTestBase::CompleteSelf ( TInt aError )
+	{
+	TRequestStatus* pStat = &iStatus;
+    User::RequestComplete ( pStat, aError );
+	}	
+
+/** Attaches the iLogger variable to the TestExecute Log Server. This enable this prt to write to
+	the testexecute logs as if it were running directly from TestExecute
+ */
+// 	SetLoggerL() is taken directly from CTestServer::StartLoggerL() in the TEF src TestServerBase.Cpp
+
+
+void CUdpServerTestBase::SetLoggerL()
+	{
+    	// Create a cinidata object for parsing the testexecute.ini
+	CTestExecuteIniData* parseTestExecuteIni = NULL;
+	TBuf<KMaxTestExecuteNameLength> resultFilePath;
+	TBuf<KMaxTestExecuteNameLength> xmlFilePath;
+	TInt logMode;
+	TInt logLevel;
+	
+	TRAPD(err,parseTestExecuteIni = CTestExecuteIniData::NewL());
+	if (err == KErrNone)
+		{
+		CleanupStack::PushL(parseTestExecuteIni);
+		parseTestExecuteIni->ExtractValuesFromIni();
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFHtmlKey, resultFilePath);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFXmlKey, xmlFilePath);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFLogMode, logMode);
+		parseTestExecuteIni->GetKeyValueFromIni(KTEFLogSeverityKey, logLevel);
+		}
+	else
+		{
+		resultFilePath.Copy(KTestExecuteLogPath);
+		xmlFilePath.Copy(KTestExecuteLogPath);
+		logMode = TLoggerOptions(ELogHTMLOnly);
+		logLevel = RFileFlogger::TLogSeverity(ESevrAll);
+		}
+	Logger().SetLoggerOptions(logMode);
+		
+	// Initialise a handle to the file logger
+	User::LeaveIfError(Logger().Connect());
+	RFs fS;
+	User::LeaveIfError(fS.Connect());
+	CleanupClosePushL(fS);
+	RFile file;
+	TBuf<KMaxTestExecuteNameLength> xmlLogFile(xmlFilePath);
+	TBuf<KMaxTestExecuteNameLength> logFile;
+	TBuf<KMaxTestExecuteNameLength> logFileNameFile(resultFilePath);
+	logFileNameFile.Append(KTestExecuteScheduleTestLogCompatibilityNameFile);
+	if(file.Open(fS,logFileNameFile,EFileRead | EFileShareAny) != KErrNone)
+		{
+		// For the old flogger we have to create an individual file
+		_LIT(KTxtLog,"TEIntSock.txt");
+		logFile.Copy(KTxtLog);
+		logMode = TLoggerOptions(0);
+		Logger().SetLoggerOptions(logMode);
+		}
+	else
+		{
+		CleanupClosePushL(file);
+		TBuf8<KMaxTestExecuteNameLength> logFile8;
+		TInt fileSize;
+		User::LeaveIfError(file.Size(fileSize));
+		User::LeaveIfError(file.Read(logFile8,fileSize));
+		logFile.Copy(logFile8);
+		xmlLogFile.Append(logFile);
+		_LIT(KXmlExtension,".xml");
+		xmlLogFile.Append(KXmlExtension);
+		_LIT(KHtmExtension,".htm");
+		logFile.Append(KHtmExtension);
+		CleanupStack::Pop(&file);
+		file.Close();
+		}
+	TBuf<KMaxTestExecuteLogFilePath> logFilePath(resultFilePath);
+	logFilePath.Append(logFile);
+	CleanupStack::Pop(&fS);
+	fS.Close();
+	
+	if (logMode == 0 || logMode == 2)
+		{
+		User::LeaveIfError(Logger().HtmlLogger().CreateLog(logFilePath,	RTestExecuteLogServ::ELogModeAppend));
+		}
+	if (logMode == 1 || logMode == 2)
+		{
+		User::LeaveIfError(Logger().XmlLogger().CreateLog(xmlLogFile,RFileFlogger::ELogModeAppend));
+		Logger().XmlLogger().SetLogLevel(RFileFlogger::TLogSeverity(logLevel));
+		}
+	if (parseTestExecuteIni != NULL)
+		{
+		CleanupStack::PopAndDestroy(parseTestExecuteIni);
+		}
+	}
+	
+
+	
+/** Called by the active scheduler in order to run the test 
+ */
+void CUdpServerTestBase::RunL()
+	{
+	iReschedule = EFalse;
+	TVerdict res = RunTestL();
+	if (!iReschedule)
+		{
+		Cleanup();
+		FinishTest(res);
+		delete this;
+		return;
+		}
+	}
+	
+void CUdpServerTestBase::FinishTest(TVerdict aResult)
+	{
+	iProvd->TestComplete(aResult);
+	}
+	
+void CUdpServerTestBase::DoCancel()
+	{
+	Cleanup();
+	}
+	
+//------------------------------------------------------------//	
+/////////////////// CUdpServerTestUPnP /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+CUdpServerTestUPnP* CUdpServerTestUPnP::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP* ret = new ( ELeave ) CUdpServerTestUPnP ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP::CUdpServerTestUPnP ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP::~CUdpServerTestUPnP ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+	
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KMissingMX );
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = ESendStopServer;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}	
+	
+//------------------------------------------------------------//	
+/////////////////// CUdpServerTestUPnP1 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+CUdpServerTestUPnP1* CUdpServerTestUPnP1::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP1* ret = new ( ELeave ) CUdpServerTestUPnP1 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP1::CUdpServerTestUPnP1 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP1::~CUdpServerTestUPnP1 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP1::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP1::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+	
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );	//created the client socket
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//sends valid m-search packet
+			iSendChain.CreateL ( KMSearch );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );	
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );	//sending m-search packet to the multicast addr
+			
+			iTimer.After ( iStatus, 3000000 ); //300secs or 5minutes
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP1::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP1::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP1::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//Id of node found or created
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}	
+	
+	
+	
+//------------------------------------------------------------//	
+/////////////////// CUdpServerTestUPnP2 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+//all test classes are listeners...hence
+//events like client socket opening, data sending thro socket etc ....the completion notification for all these
+///events are sent to the respective test classes
+CUdpServerTestUPnP2* CUdpServerTestUPnP2::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP2* ret = new ( ELeave ) CUdpServerTestUPnP2 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP2::CUdpServerTestUPnP2 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP2::~CUdpServerTestUPnP2 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP2::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP2::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+	
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );	//created the client socket
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//sends m-search with MX > 120 
+			iSendChain.CreateL ( KInvalidMX );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );	
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );	//sending m-search packet to the multicast addr
+			
+			iTimer.After ( iStatus, 3000000 ); //3 sec
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP2::OpenComplete ( RInternalSocket& aSocket )
+	{//indicates that client socket has been opened
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP2::SendToComplete ( TInt /*aLength*/ )
+	{//indicates that data has been sent thro socket
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP2::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//Id of node found or created
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+	
+	
+	
+//------------------------------------------------------------//	
+/////////////////// CUdpServerTestUPnP3 /////////////////////////
+////// Testcase: Send the test data from the test client/////////
+//------------------------------------------------------------//
+
+CUdpServerTestUPnP3* CUdpServerTestUPnP3::NewL ( CProxyProvd* aProvd )
+
+	{
+	CUdpServerTestUPnP3* ret = new ( ELeave ) CUdpServerTestUPnP3 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP3::CUdpServerTestUPnP3 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP3::~CUdpServerTestUPnP3 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP3::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP3::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+	
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			//void OpenPostMessageClose(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TSignalBase& aMessage);
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData://so here the sender is client and receiver (servicepoint) will be the server
+			{			//send m-search request with invalid MAN
+			iSendChain.CreateL ( KInvalidMAN );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP3::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP3::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP3::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//iMudpServer is of type TNodeId which is a subclass of TRuntimeCtxId
+		/*TRuntimeCtxId is the baseclass intended for addressing message
+		(TSignalBase) destinations, i.e.: As implied by the respective API,
+		the sender of a TSignalBase must supply a TRuntimeCtxId object.*/
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+//-----------------------------------------------------------------------------------------------------------------
+
+CUdpServerTestUPnP4* CUdpServerTestUPnP4::NewL ( CProxyProvd* aProvd )
+
+	{
+	CUdpServerTestUPnP4* ret = new ( ELeave ) CUdpServerTestUPnP4 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP4::CUdpServerTestUPnP4 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP4::~CUdpServerTestUPnP4 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP4::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP4::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+	
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			//void OpenPostMessageClose(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TSignalBase& aMessage);
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//send invalid request method
+			iSendChain.CreateL ( KInvalidMethod );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP4::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP4::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP4::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//iMudpServer is of type TNodeId which is a subclass of TRuntimeCtxId
+		/*TRuntimeCtxId is the baseclass intended for addressing message
+		(TSignalBase) destinations, i.e.: As implied by the respective API,
+		the sender of a TSignalBase must supply a TRuntimeCtxId object.*/
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+//------------------------------------------------------------------------
+
+CUdpServerTestUPnP5* CUdpServerTestUPnP5::NewL ( CProxyProvd* aProvd )
+
+	{
+	CUdpServerTestUPnP5* ret = new ( ELeave ) CUdpServerTestUPnP5 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP5::CUdpServerTestUPnP5 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP5::~CUdpServerTestUPnP5 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP5::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP5::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+	
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			//void OpenPostMessageClose(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TSignalBase& aMessage);
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//send valid notify method
+			iSendChain.CreateL ( KValidNotify );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP5::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;	//client socket open
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP5::SendToComplete ( TInt /*aLength*/ )//data sent to udp socket
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP5::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//iMudpServer is of type TNodeId which is a subclass of TRuntimeCtxId
+		/*TRuntimeCtxId is the baseclass intended for addressing message
+		(TSignalBase) destinations, i.e.: As implied by the respective API,
+		the sender of a TSignalBase must supply a TRuntimeCtxId object.*/
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+
+//------------------------------------------------------------------------
+
+CUdpServerTestUPnP6* CUdpServerTestUPnP6::NewL ( CProxyProvd* aProvd )
+
+	{
+	CUdpServerTestUPnP6* ret = new ( ELeave ) CUdpServerTestUPnP6 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP6::CUdpServerTestUPnP6 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP6::~CUdpServerTestUPnP6 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP6::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP6::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			//void OpenPostMessageClose(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TSignalBase& aMessage);
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//send valid notify method
+			iSendChain.CreateL ( KMissingNTS );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP6::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;	//client socket open
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP6::SendToComplete ( TInt /*aLength*/ )//data sent to udp socket
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP6::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//iMudpServer is of type TNodeId which is a subclass of TRuntimeCtxId
+		/*TRuntimeCtxId is the baseclass intended for addressing message
+		(TSignalBase) destinations, i.e.: As implied by the respective API,
+		the sender of a TSignalBase must supply a TRuntimeCtxId object.*/
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+//------------------------------------------------------------------------
+//------ Sends a notify packet with missing NT header --------------------
+//------------------------------------------------------------------------
+
+CUdpServerTestUPnP7* CUdpServerTestUPnP7::NewL ( CProxyProvd* aProvd )
+
+	{
+	CUdpServerTestUPnP7* ret = new ( ELeave ) CUdpServerTestUPnP7 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP7::CUdpServerTestUPnP7 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP7::~CUdpServerTestUPnP7 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP7::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP7::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			//void OpenPostMessageClose(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TSignalBase& aMessage);
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//send valid notify method
+			iSendChain.CreateL ( KInvalidNotifyByeBye );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP7::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;	//client socket open
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP7::SendToComplete ( TInt /*aLength*/ )//data sent to udp socket
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP7::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//iMudpServer is of type TNodeId which is a subclass of TRuntimeCtxId
+		/*TRuntimeCtxId is the baseclass intended for addressing message
+		(TSignalBase) destinations, i.e.: As implied by the respective API,
+		the sender of a TSignalBase must supply a TRuntimeCtxId object.*/
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+//--------------------------------------------------------------------------------------------------------------------
+//--------------------------------Sends notify packet with missing location header -----------------------------------
+//--------------------------------------------------------------------------------------------------------------------
+
+CUdpServerTestUPnP8* CUdpServerTestUPnP8::NewL ( CProxyProvd* aProvd )
+
+	{
+	CUdpServerTestUPnP8* ret = new ( ELeave ) CUdpServerTestUPnP8 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP8::CUdpServerTestUPnP8 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP8::~CUdpServerTestUPnP8 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP8::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP8::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			//void OpenPostMessageClose(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TSignalBase& aMessage);
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//send valid notify method
+			iSendChain.CreateL ( KMissingNotifyLocn );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP8::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;	//client socket open
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP8::SendToComplete ( TInt /*aLength*/ )//data sent to udp socket
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP8::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//iMudpServer is of type TNodeId which is a subclass of TRuntimeCtxId
+		/*TRuntimeCtxId is the baseclass intended for addressing message
+		(TSignalBase) destinations, i.e.: As implied by the respective API,
+		the sender of a TSignalBase must supply a TRuntimeCtxId object.*/
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+//------------------------------------------------------------------------------------------------------------------
+
+CUdpServerTestUPnP9* CUdpServerTestUPnP9::NewL ( CProxyProvd* aProvd )
+
+	{
+	CUdpServerTestUPnP9* ret = new ( ELeave ) CUdpServerTestUPnP9 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP9::CUdpServerTestUPnP9 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP9::~CUdpServerTestUPnP9 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP9::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP9::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			//void OpenPostMessageClose(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TSignalBase& aMessage);
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//send valid notify method
+			iSendChain.CreateL ( KMissingST );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP9::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;	//client socket open
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP9::SendToComplete ( TInt /*aLength*/ )//data sent to udp socket
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP9::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//iMudpServer is of type TNodeId which is a subclass of TRuntimeCtxId
+		/*TRuntimeCtxId is the baseclass intended for addressing message
+		(TSignalBase) destinations, i.e.: As implied by the respective API,
+		the sender of a TSignalBase must supply a TRuntimeCtxId object.*/
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+	
+	
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
+//			Sends a m-search packet with invalid header
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
+
+CUdpServerTestUPnP10* CUdpServerTestUPnP10::NewL ( CProxyProvd* aProvd )
+
+	{
+	CUdpServerTestUPnP10* ret = new ( ELeave ) CUdpServerTestUPnP10 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP10::CUdpServerTestUPnP10 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP10::~CUdpServerTestUPnP10 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP10::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP10::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			//void OpenPostMessageClose(const TRuntimeCtxId& aPostFrom, const TRuntimeCtxId& aPostTo, const TSignalBase& aMessage);
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			//send valid notify method
+			iSendChain.CreateL ( KInvalidHdr );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP10::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;	//client socket open
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP10::SendToComplete ( TInt /*aLength*/ )//data sent to udp socket
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP10::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;	//iMudpServer is of type TNodeId which is a subclass of TRuntimeCtxId
+		/*TRuntimeCtxId is the baseclass intended for addressing message
+		(TSignalBase) destinations, i.e.: As implied by the respective API,
+		the sender of a TSignalBase must supply a TRuntimeCtxId object.*/
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//			Sends notify packet with invalid max-age directive
+//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
+CUdpServerTestUPnP11* CUdpServerTestUPnP11::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP11* ret = new ( ELeave ) CUdpServerTestUPnP11 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP11::CUdpServerTestUPnP11 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP11::~CUdpServerTestUPnP11 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP11::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP11::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KInvalidMaxAge );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP11::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP11::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP11::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
+//			Sends notify packet  with missing nt header
+//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
+
+
+
+
+CUdpServerTestUPnP12* CUdpServerTestUPnP12::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP12* ret = new ( ELeave ) CUdpServerTestUPnP12 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP12::CUdpServerTestUPnP12 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP12::~CUdpServerTestUPnP12 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP12::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP12::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KMissingNT );			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP12::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP12::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP12::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+	
+	
+//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//					sends an invalid upnp packet
+//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
+CUdpServerTestUPnP13* CUdpServerTestUPnP13::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP13* ret = new ( ELeave ) CUdpServerTestUPnP13 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP13::CUdpServerTestUPnP13 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP13::~CUdpServerTestUPnP13 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP13::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	}
+
+TVerdict CUdpServerTestUPnP13::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			//this  calls httpmudpflow::ReceivedL() else case  (aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated>)
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{//this  calls httpmudpflow::ReceivedL() switch case  TAppProtIntfMessage::TJoinComplete::EId:			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );			
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KMan);			
+			iSendToAddr.SetAddress ( KMulticastAddrIp );
+  			iSendToAddr.SetPort ( KMulticastAddrPort );
+			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );//this invokes httpmudpflow::receivedL switch case TAppProtIntfMessage::TDataReceived::EId:
+			
+			iTimer.After ( iStatus, 3000000 ); //3secs
+			iState = ESendStopServer;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ),TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+	
+void CUdpServerTestUPnP13::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP13::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();	
+	}
+	
+void CUdpServerTestUPnP13::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+	
+//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+CUdpServerTestUPnP14* CUdpServerTestUPnP14::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP14* ret = new ( ELeave ) CUdpServerTestUPnP14 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP14::CUdpServerTestUPnP14 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP14::~CUdpServerTestUPnP14 ()
+	{	
+	TUpnpMessage::DeRegister ();
+	// delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () ); No need to do this, already it is cleaned-up
+	}
+	
+void CUdpServerTestUPnP14::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());	
+	iTimer.CreateLocal ();
+	}
+
+TVerdict CUdpServerTestUPnP14::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+			//this  calls httpmudpflow::ReceivedL() else case  (aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated>)
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case EStartServer:
+			{//this  calls httpmudpflow::ReceivedL() switch case  TAppProtIntfMessage::TJoinComplete::EId:			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = ESendErrorMsg;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}	
+		
+		case ESendErrorMsg:
+			{
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ),TAppProtIntfMessage::TError(0).CRef() );
+			
+			iTimer.After ( iStatus, 1000000 ); //1sec and this takes the iStatus value and sets it to KRequestPending
+			//on completion it will call CompleteSelf() and sets iStatus to KNone
+			iState = ESendStopServer;
+			//iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}	
+			
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ),TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+		//	iTimer.After ( iStatus, 500000 );	//no need because it does not need to wait for any response for the stop message sent
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 );		//waits for a response after sending the destro message
+			iState = ECleanup;
+		//	iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+	
+void CUdpServerTestUPnP14::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+	
+////////////////////////////////////////////////////////////////////////////////////////
+CUdpServerTestUPnP15* CUdpServerTestUPnP15::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP15* ret = new ( ELeave ) CUdpServerTestUPnP15 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP15::CUdpServerTestUPnP15 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP15::~CUdpServerTestUPnP15 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP15::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP15::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TAppProtIntfMessage::TJoin().CRef () );
+			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TUpnpMessage::TRequestLocalHost ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KInvalidSsdpPort );			
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = ESendStopServer;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP15::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP15::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP15::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+////////////////////////////////////////////////////////////////////////////////////////
+CUdpServerTestUPnP16* CUdpServerTestUPnP16::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP16* ret = new ( ELeave ) CUdpServerTestUPnP16 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP16::CUdpServerTestUPnP16 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP16::~CUdpServerTestUPnP16 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP16::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP16::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KMissingHost );
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = ESendStopServer;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP16::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP16::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP16::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+////////////////////////////////////////////////////////////////////////////////////////
+CUdpServerTestUPnP17* CUdpServerTestUPnP17::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP17* ret = new ( ELeave ) CUdpServerTestUPnP17 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP17::CUdpServerTestUPnP17 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP17::~CUdpServerTestUPnP17 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP17::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP17::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KMissingSsdpPort );
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = ESendStopServer;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP17::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP17::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP17::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		RunTestL ();
+		}
+	}
+////////////////////////////////////////////////////////////////////////////////////////
+CUdpServerTestUPnP18* CUdpServerTestUPnP18::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP18* ret = new ( ELeave ) CUdpServerTestUPnP18 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP18::CUdpServerTestUPnP18 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP18::~CUdpServerTestUPnP18 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP18::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP18::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KMissingSsdpPort1 );
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = ESendStopServer;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP18::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP18::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP18::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		RunTestL ();
+		}
+	}
+////////////////////////////////////////////////////////////////////////////////////////
+CUdpServerTestUPnP19* CUdpServerTestUPnP19::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP19* ret = new ( ELeave ) CUdpServerTestUPnP19 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP19::CUdpServerTestUPnP19 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP19::~CUdpServerTestUPnP19 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP19::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP19::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KInvalidSsdpHost );
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = ESendStopServer;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP19::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP19::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP19::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+////////////////////////////////////////////////////////////////////////////////////////
+CUdpServerTestUPnP20* CUdpServerTestUPnP20::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP20* ret = new ( ELeave ) CUdpServerTestUPnP20 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP20::CUdpServerTestUPnP20 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP20::~CUdpServerTestUPnP20 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP20::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP20::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );
+			
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{			
+			iSendChain.CreateL ( KInvalidHostMissingSsdpPort );
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );
+		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = ESendStopServer;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP20::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP20::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP20::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+////////////////////////////////////////////////////////////////////////////////////////
+CUdpServerTestUPnP21* CUdpServerTestUPnP21::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP21* ret = new ( ELeave ) CUdpServerTestUPnP21 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP21::CUdpServerTestUPnP21 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP21::~CUdpServerTestUPnP21 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP21::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP21::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );						
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendData;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+			
+		case ESendData:
+			{						
+			iSendChain.CreateL ( KMissingMan );
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = ESendStopServer;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		// just to make sure production objects are cleaned-up properly.
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = EServerStopped;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP21::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP21::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP21::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
+
+////////////////////////////////////////////////////////////////////////////////////////
+CUdpServerTestUPnP22* CUdpServerTestUPnP22::NewL ( CProxyProvd* aProvd )
+	{
+	CUdpServerTestUPnP22* ret = new ( ELeave ) CUdpServerTestUPnP22 ( aProvd );
+	CleanupStack::PushL ( ret );
+	ret->ConstructL ();
+	CleanupStack::Pop ( ret );
+	return ret;
+	}
+
+CUdpServerTestUPnP22::CUdpServerTestUPnP22 ( CProxyProvd* aProvd ) :
+	CUdpServerTestBase ( aProvd ), iSocketHandler ( *this ), iState ( ECreateServer )
+	{
+	}
+	
+CUdpServerTestUPnP22::~CUdpServerTestUPnP22 ()
+	{
+	iSocketHandler.CancelAll ();
+	iClientSocket.Close ();
+	delete iSocketOpener;
+	iTimer.Close ();
+	TUpnpMessage::DeRegister ();
+	}
+	
+void CUdpServerTestUPnP22::ConstructL ()
+	{
+	TUpnpMessage::RegisterL ( SockManGlobals::Get ()->SelfWorker ());
+	iTimer.CreateLocal ();
+	TRAPD ( err, iSocketOpener = CSocketOpener::NewL ( *this ) );			
+	User::LeaveIfError ( err );		
+	
+	iSendToAddr.SetAddress ( KMulticastAddrIp );
+  	iSendToAddr.SetPort ( KMulticastAddrPort );	
+	}
+
+TVerdict CUdpServerTestUPnP22::RunTestL()
+	{
+	switch ( iState )
+		{
+		case ECreateServer:
+			{			
+			THttpUdpFlowQuery flowQuery ( Id (), EHttpMUdpFlow, iChunkManager );
+			const TUid requestedUid = { CUPnPFlowFactory::iUid };
+			TNodeId factoryContainer = SockManGlobals::Get( )->GetPlaneFC( TCFPlayerRole ( TCFPlayerRole::EDataPlane ) );
+				
+			RClientInterface::OpenPostMessageClose ( Id (), TNodeCtxId ( KActivityNull, factoryContainer ), TCFFactory::TFindOrCreatePeer ( TCFPlayerRole::EDataPlane, requestedUid, &flowQuery ).CRef () );
+			
+			iState  = EStartServer;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;
+			}
+		case EStartServer:
+			{			
+			RClientInterface::OpenPostMessageClose (TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStart ().CRef () );						
+			iState  = EOpenClientSocket;
+			iStatus = KRequestPending;
+			Reschedule();
+			return EPass;			
+			}
+				
+		case EOpenClientSocket:
+			{
+			iSocketOpener->MakeSocket ( KAfInet, KSockDatagram, KProtocolInetUdp );
+			iState  = ESendStopServer;
+			iStatus = KRequestPending;			
+			Reschedule();
+			return EPass;		
+			}
+			
+		case ESendStopServer:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TCFDataClient::TStop ( KErrNone ).CRef () );
+			
+			iState = ESendData;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+					
+		case ESendData:
+			{						
+			iSendChain.CreateL ( KMSearch );
+			iSocketHandler.SendTo ( iSendChain, iSendToAddr );		
+			
+			iTimer.After ( iStatus, 2000000 );
+			iState = EServerStopped;
+			
+			Reschedule ();
+			return EPass;
+			}
+		
+		
+		case EServerStopped:
+			{
+			// cleanup udp server flow
+			RClientInterface::OpenPostMessageClose ( TNodeCtxId ( KActivityNull, Id () ), TNodeCtxId ( KActivityNull, iMudpServer ), TEChild::TDestroy ().CRef () );
+			
+			iTimer.After ( iStatus, 1000000 ); //1secs
+			iState = ECleanup;
+			iStatus = KRequestPending;
+			Reschedule ();
+			return EPass;
+			}
+		
+		case ECleanup:
+			{
+			return EPass;
+			}
+			
+		case EFailed:
+			{
+			// cleanup udp server flow
+			delete reinterpret_cast<CHttpMUdpFlow*> ( iMudpServer.Ptr () );
+			FinishTest ( EFail );
+			delete this;
+			return EFail;
+			}
+			
+		default:
+			{
+			iLogger.WriteFormat(_L("<i> Failed: TestCase:..... </i>"));
+			ASSERT(0);
+			return EFail;
+			}
+		}
+	}
+
+void CUdpServerTestUPnP22::OpenComplete ( RInternalSocket& aSocket )
+	{
+	iClientSocket = aSocket;
+	iSocketHandler.Attach ( aSocket );
+	CompleteSelf ( KErrNone );
+	}	
+	
+void CUdpServerTestUPnP22::SendToComplete ( TInt /*aLength*/ )
+	{
+	iSendChain.Init ();
+	}
+	
+void CUdpServerTestUPnP22::ReceivedL ( const TRuntimeCtxId& /*aSender*/, const TNodeId& /*aRecipient*/, TSignatureBase& aMessage )
+	{
+	if ( aMessage.IsMessage<TCFFactory::TPeerFoundOrCreated> () )
+		{
+		const TCFFactory::TPeerFoundOrCreated& msg = message_cast < const TCFFactory::TPeerFoundOrCreated > ( aMessage );
+		iMudpServer = msg.iNodeId;
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TCFDataClient::TStarted> () 
+				|| aMessage.IsMessage<TCFDataClient::TStopped> () )
+		{
+		CompleteSelf ( KErrNone );
+		}
+	else if ( aMessage.IsMessage<TUpnpMessage::TUPnPSearchRequest > () )
+		{
+		TUpnpMessage::TUPnPSearchRequest& msg = message_cast < TUpnpMessage::TUPnPSearchRequest > ( aMessage );
+		msg.iSsdpInfo.iLocation.Free ();
+		msg.iSsdpInfo.iSearchTarget.Free ();
+		msg.iSsdpInfo.iUsn.Free ();
+		
+		iTimer.Cancel ();
+		iState = EFailed;
+		RunTestL ();
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/StringDictionary/testvendordeviceschema.st	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,19 @@
+#
+# 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 the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+upnpdescriptionXMLTagsstringtable UPNPVENDORDEVICETAGS
+EVendor vendor
+EVendorTag vendorTag
+EVendorService vendorService
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/StringDictionary/testvendorserviceschema.st	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,20 @@
+#
+# 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 the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+upnpdescriptionXMLTagsstringtable UPNPVENDORSERVICETAGS
+EVendorAction vendorAction
+EVendorArg vendorArg
+EVendorState vendorState
+EVendorDec vendorDec
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,99 @@
+// 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:
+//
+
+PRJ_TESTMMPFILES
+
+testupnpdescriptionserver.mmp
+
+PRJ_TESTEXPORTS
+
+// Script file for testing the functionality.
+../script/testupnpdescriptionsuite.script			z:/upnp/description/scripts/testupnpdescriptionsuite.script
+
+// Ini file
+../ini/testupnpdescriptionsuite.ini	            z:/upnp/description/ini/testupnpdescriptionsuite.ini
+
+// Xml input files
+../xml_input_files/devicedesc_input1.xml			z:/upnp/description/xml/devicedesc_input1.xml
+../xml_input_files/devicedesc_input2.xml			z:/upnp/description/xml/devicedesc_input2.xml
+../xml_input_files/devicedesc_input3.xml			z:/upnp/description/xml/devicedesc_input3.xml
+../xml_input_files/devicedesc_input4.xml			z:/upnp/description/xml/devicedesc_input4.xml
+../xml_input_files/devicedesc_input5.xml			z:/upnp/description/xml/devicedesc_input5.xml
+../xml_input_files/devicedesc_input6.xml			z:/upnp/description/xml/devicedesc_input6.xml
+
+
+../xml_input_files/devicedesc_inputneg1.xml			z:/upnp/description/xml/devicedesc_inputneg1.xml
+../xml_input_files/devicedesc_inputneg2.xml			z:/upnp/description/xml/devicedesc_inputneg2.xml
+../xml_input_files/devicedesc_inputneg3.xml			z:/upnp/description/xml/devicedesc_inputneg3.xml
+../xml_input_files/devicedesc_inputneg4.xml			z:/upnp/description/xml/devicedesc_inputneg4.xml
+../xml_input_files/devicedesc_inputneg5.xml			z:/upnp/description/xml/devicedesc_inputneg5.xml
+../xml_input_files/devicedesc_inputneg6.xml			z:/upnp/description/xml/devicedesc_inputneg6.xml
+../xml_input_files/devicedesc_inputneg7.xml			z:/upnp/description/xml/devicedesc_inputneg7.xml
+../xml_input_files/devicedesc_inputneg8.xml			z:/upnp/description/xml/devicedesc_inputneg8.xml
+../xml_input_files/devicedesc_inputneg9.xml			z:/upnp/description/xml/devicedesc_inputneg9.xml
+../xml_input_files/devicedesc_inputneg10.xml			z:/upnp/description/xml/devicedesc_inputneg10.xml
+../xml_input_files/devicedesc_inputneg11.xml			z:/upnp/description/xml/devicedesc_inputneg11.xml
+../xml_input_files/devicedesc_inputneg12.xml			z:/upnp/description/xml/devicedesc_inputneg12.xml
+../xml_input_files/devicedesc_inputneg13.xml			z:/upnp/description/xml/devicedesc_inputneg13.xml
+../xml_input_files/devicedesc_inputneg14.xml			z:/upnp/description/xml/devicedesc_inputneg14.xml
+../xml_input_files/devicedesc_inputneg15.xml			z:/upnp/description/xml/devicedesc_inputneg15.xml
+../xml_input_files/devicedesc_inputneg16.xml			z:/upnp/description/xml/devicedesc_inputneg16.xml
+../xml_input_files/devicedesc_inputneg17.xml			z:/upnp/description/xml/devicedesc_inputneg17.xml
+../xml_input_files/devicedesc_inputneg18.xml			z:/upnp/description/xml/devicedesc_inputneg18.xml
+../xml_input_files/devicedesc_inputneg19.xml			z:/upnp/description/xml/devicedesc_inputneg19.xml
+../xml_input_files/devicedesc_inputneg20.xml			z:/upnp/description/xml/devicedesc_inputneg20.xml
+../xml_input_files/devicedesc_inputneg21.xml			z:/upnp/description/xml/devicedesc_inputneg21.xml
+../xml_input_files/devicedesc_inputneg22.xml			z:/upnp/description/xml/devicedesc_inputneg22.xml
+../xml_input_files/devicedesc_inputneg23.xml			z:/upnp/description/xml/devicedesc_inputneg23.xml
+../xml_input_files/devicedesc_inputneg24.xml			z:/upnp/description/xml/devicedesc_inputneg24.xml
+
+
+../xml_input_files/servicedesc_input1.xml			z:/upnp/description/xml/servicedesc_input1.xml
+../xml_input_files/servicedesc_input2.xml			z:/upnp/description/xml/servicedesc_input2.xml
+../xml_input_files/servicedesc_input3.xml			z:/upnp/description/xml/servicedesc_input3.xml
+../xml_input_files/servicedesc_input4.xml			z:/upnp/description/xml/servicedesc_input4.xml
+../xml_input_files/servicedesc_input5.xml			z:/upnp/description/xml/servicedesc_input5.xml
+
+../xml_input_files/servicedesc_inputneg1.xml			z:/upnp/description/xml/servicedesc_inputneg1.xml
+../xml_input_files/servicedesc_inputneg2.xml			z:/upnp/description/xml/servicedesc_inputneg2.xml
+../xml_input_files/servicedesc_inputneg3.xml			z:/upnp/description/xml/servicedesc_inputneg3.xml
+../xml_input_files/servicedesc_inputneg4.xml			z:/upnp/description/xml/servicedesc_inputneg4.xml
+../xml_input_files/servicedesc_inputneg5.xml			z:/upnp/description/xml/servicedesc_inputneg5.xml
+../xml_input_files/servicedesc_inputneg6.xml			z:/upnp/description/xml/servicedesc_inputneg6.xml
+../xml_input_files/servicedesc_inputneg7.xml			z:/upnp/description/xml/servicedesc_inputneg7.xml
+../xml_input_files/servicedesc_inputneg8.xml			z:/upnp/description/xml/servicedesc_inputneg8.xml
+../xml_input_files/servicedesc_inputneg9.xml			z:/upnp/description/xml/servicedesc_inputneg9.xml
+../xml_input_files/servicedesc_inputneg10.xml			z:/upnp/description/xml/servicedesc_inputneg10.xml
+../xml_input_files/servicedesc_inputneg11.xml			z:/upnp/description/xml/servicedesc_inputneg11.xml
+../xml_input_files/servicedesc_inputneg12.xml			z:/upnp/description/xml/servicedesc_inputneg12.xml
+../xml_input_files/servicedesc_inputneg13.xml			z:/upnp/description/xml/servicedesc_inputneg13.xml
+../xml_input_files/servicedesc_inputneg14.xml			z:/upnp/description/xml/servicedesc_inputneg14.xml
+../xml_input_files/servicedesc_inputneg15.xml			z:/upnp/description/xml/servicedesc_inputneg15.xml
+../xml_input_files/servicedesc_inputneg16.xml			z:/upnp/description/xml/servicedesc_inputneg16.xml
+../xml_input_files/servicedesc_inputneg17.xml			z:/upnp/description/xml/servicedesc_inputneg17.xml
+../xml_input_files/servicedesc_inputneg18.xml			z:/upnp/description/xml/servicedesc_inputneg18.xml
+../xml_input_files/servicedesc_inputneg19.xml			z:/upnp/description/xml/servicedesc_inputneg19.xml
+../xml_input_files/servicedesc_inputneg20.xml			z:/upnp/description/xml/servicedesc_inputneg20.xml
+../xml_input_files/servicedesc_inputneg21.xml			z:/upnp/description/xml/servicedesc_inputneg21.xml
+../xml_input_files/servicedesc_inputneg22.xml			z:/upnp/description/xml/servicedesc_inputneg22.xml
+../xml_input_files/servicedesc_inputneg23.xml			z:/upnp/description/xml/servicedesc_inputneg23.xml
+../xml_input_files/servicedesc_inputneg24.xml			z:/upnp/description/xml/servicedesc_inputneg24.xml
+../xml_input_files/servicedesc_inputneg25.xml			z:/upnp/description/xml/servicedesc_inputneg25.xml
+../xml_input_files/servicedesc_inputneg26.xml			z:/upnp/description/xml/servicedesc_inputneg26.xml
+../xml_input_files/servicedesc_inputneg27.xml			z:/upnp/description/xml/servicedesc_inputneg27.xml
+
+upnpdescriptiontest.iby								/epoc32/rom/include/upnpdescriptiontest.iby
+..\xml_input_files\devicedesc_DEF126707.xml z:\upnp\description\xml\devicedesc_DEF126707.xml
+..\xml_input_files\servicedesc_DEF126707.xml z:\upnp\description\xml\servicedesc_DEF126707.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/group/testupnpdescriptionserver.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+// 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:
+//
+
+//OPTION CW   -w off
+TARGET          testupnpdescriptionserver.exe 
+TARGETTYPE      EXE
+//CAPABILITY ALL -TCB
+CAPABILITY       ReadDeviceData WriteDeviceData NetworkServices LocalServices ReadUserData WriteUserData
+
+UID		0x1000007A 0xA000930C
+
+START STRINGTABLE ../StringDictionary/testvendordeviceschema.st
+EXPORTPATH	/epoc32/include/upnp 
+END 
+
+START STRINGTABLE ../StringDictionary/testvendorserviceschema.st
+EXPORTPATH	/epoc32/include/upnp 
+END 
+
+SYSTEMINCLUDE	/epoc32/include/upnp
+SYSTEMINCLUDE 	/epoc32/include /epoc32/include/test  /epoc32/include/ecom 
+
+
+USERINCLUDE		../inc
+USERINCLUDE	 ../../../../upnpdescription/inc
+
+SOURCEPATH		../src
+
+SOURCE		testupnpdescriptionserver.cpp testupnpdescriptionservicestep.cpp
+
+
+LIBRARY		c32.lib 
+LIBRARY		euser.lib 
+LIBRARY		estor.lib 
+LIBRARY		bafl.lib 
+LIBRARY		ecom.lib 
+LIBRARY		crypto.lib 
+LIBRARY		efsrv.lib 
+
+// xml library
+LIBRARY		upnpdescription.lib
+
+
+//For TEF
+LIBRARY		testexecuteutils.lib 
+LIBRARY		testexecutelogclient.lib
+
+
+
+
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/group/upnpdescriptiontest.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,97 @@
+/*
+* 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 __UPNPDESCRIPTIONTEST_IBY__
+#define __UPNPDESCRIPTIONTEST_IBY__
+
+#include <testexecute.iby>
+
+file=ABI_DIR\BUILD_DIR\testupnpdescriptionserver.exe	 System\Programs\testupnpdescriptionserver.exe
+
+// The ini files for the system
+data=EPOCROOT##epoc32\data\z\upnp\description\ini\testupnpdescriptionsuite.ini	upnp\description\ini\testupnpdescriptionsuite.ini
+
+//The script files for the system
+data=EPOCROOT##epoc32\data\z\upnp\description\scripts\testupnpdescriptionsuite.script upnp\description\scripts\testupnpdescriptionsuite.script
+
+//XML files
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_input1.xml		upnp\description\xml\devicedesc_input1.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_input2.xml		upnp\description\xml\devicedesc_input2.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_input3.xml		upnp\description\xml\devicedesc_input3.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_input4.xml		upnp\description\xml\devicedesc_input4.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_input5.xml		upnp\description\xml\devicedesc_input5.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_input6.xml		upnp\description\xml\devicedesc_input6.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_input1.xml		upnp\description\xml\servicedesc_input1.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_input2.xml		upnp\description\xml\servicedesc_input2.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_input3.xml		upnp\description\xml\servicedesc_input3.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_input4.xml		upnp\description\xml\servicedesc_input4.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_input5.xml		upnp\description\xml\servicedesc_input5.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg1.xml	upnp\description\xml\servicedesc_inputneg1.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg2.xml	upnp\description\xml\servicedesc_inputneg2.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg3.xml	upnp\description\xml\servicedesc_inputneg3.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg4.xml	upnp\description\xml\servicedesc_inputneg4.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg5.xml	upnp\description\xml\servicedesc_inputneg5.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg6.xml	upnp\description\xml\servicedesc_inputneg6.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg7.xml	upnp\description\xml\servicedesc_inputneg7.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg8.xml	upnp\description\xml\servicedesc_inputneg8.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg9.xml	upnp\description\xml\servicedesc_inputneg9.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg10.xml	upnp\description\xml\servicedesc_inputneg10.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg11.xml	upnp\description\xml\servicedesc_inputneg11.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg12.xml	upnp\description\xml\servicedesc_inputneg12.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg13.xml	upnp\description\xml\servicedesc_inputneg13.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg14.xml	upnp\description\xml\servicedesc_inputneg14.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg15.xml	upnp\description\xml\servicedesc_inputneg15.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg16.xml	upnp\description\xml\servicedesc_inputneg16.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg17.xml	upnp\description\xml\servicedesc_inputneg17.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg18.xml	upnp\description\xml\servicedesc_inputneg18.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg19.xml	upnp\description\xml\servicedesc_inputneg19.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg20.xml	upnp\description\xml\servicedesc_inputneg20.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg21.xml	upnp\description\xml\servicedesc_inputneg21.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg22.xml	upnp\description\xml\servicedesc_inputneg22.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg23.xml	upnp\description\xml\servicedesc_inputneg23.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg24.xml	upnp\description\xml\servicedesc_inputneg24.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg25.xml	upnp\description\xml\servicedesc_inputneg25.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg26.xml	upnp\description\xml\servicedesc_inputneg26.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_inputneg27.xml	upnp\description\xml\servicedesc_inputneg27.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg1.xml	upnp\description\xml\devicedesc_inputneg1.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg2.xml	upnp\description\xml\devicedesc_inputneg2.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg3.xml	upnp\description\xml\devicedesc_inputneg3.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg4.xml	upnp\description\xml\devicedesc_inputneg4.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg5.xml	upnp\description\xml\devicedesc_inputneg5.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg6.xml	upnp\description\xml\devicedesc_inputneg6.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg7.xml	upnp\description\xml\devicedesc_inputneg7.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg8.xml	upnp\description\xml\devicedesc_inputneg8.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg9.xml	upnp\description\xml\devicedesc_inputneg9.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg10.xml	upnp\description\xml\devicedesc_inputneg10.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg11.xml	upnp\description\xml\devicedesc_inputneg11.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg12.xml	upnp\description\xml\devicedesc_inputneg12.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg13.xml	upnp\description\xml\devicedesc_inputneg13.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg14.xml	upnp\description\xml\devicedesc_inputneg14.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg15.xml	upnp\description\xml\devicedesc_inputneg15.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg16.xml	upnp\description\xml\devicedesc_inputneg16.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg17.xml	upnp\description\xml\devicedesc_inputneg17.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg18.xml	upnp\description\xml\devicedesc_inputneg18.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg19.xml	upnp\description\xml\devicedesc_inputneg19.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg20.xml	upnp\description\xml\devicedesc_inputneg20.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg21.xml	upnp\description\xml\devicedesc_inputneg21.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg22.xml	upnp\description\xml\devicedesc_inputneg22.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg23.xml	upnp\description\xml\devicedesc_inputneg23.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_inputneg24.xml	upnp\description\xml\devicedesc_inputneg24.xml
+
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\devicedesc_DEF126707.xml	upnp\description\xml\devicedesc_DEF126707.xml
+data=EPOCROOT##epoc32\data\z\upnp\description\xml\servicedesc_DEF126707.xml	upnp\description\xml\servicedesc_DEF126707.xml
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/inc/testupnpdescriptionserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,56 @@
+// 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:
+// Contains declaration of CTestXmlServer class
+// @internalAll
+// 
+//
+
+#ifndef __TEST__HTTP_SERVER_H__
+#define __TEST__HTTP_SERVER_H__
+
+// System Include
+// For accessing TEF classes
+#include <testexecuteserverbase.h>
+
+
+
+/*@{*/
+// Literal constants for INI file field-names
+_LIT(KIniInputPath, 		   "XmlInputPath");
+_LIT(KIniOutputPath, 	   "XmlOutputPath");
+_LIT(KIniIsTestCasePositive,        "IsTestCasePositive");
+_LIT(KIniIsInputFileService,   "IsInputFileService");
+/*@}*/
+_LIT(KTxt, "ERROR");
+
+/**
+This is the test server to test the white/black-list uri service API.
+@internalTechnology
+*/
+class CTestXmlServer : public CTestServer
+	{
+public:
+	// Construction
+	static	CTestXmlServer* 	NewL();
+	// Base class pure virtual
+	virtual CTestStep* 	CreateTestStep(const TDesC& aStepName);
+
+protected:
+	CTestStep* 	 CreateTestStepL(const TDesC& aStepName);
+	const TPtrC  ServerName();
+	};
+
+#endif		// __TEST__HTTPEBO_SERVER_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/inc/testupnpdescriptionservicestep.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,50 @@
+// 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:
+// Contains declaration of CTestXmlServiceTestStep class
+// @internalAll
+// 
+//
+
+#ifndef __TEST_HTTP_BUFFER_SIZE_STEP_H__
+#define __TEST_HTTP_BUFFER_SIZE_STEP_H__
+
+// User Include
+#include "testupnpdescriptionserver.h"
+
+// Literal constant defined for identifying step name
+_LIT(KTestXmlServiceStep, "TestXmlServiceStep");
+
+/**
+This is the base test step from which all other test steps are derived
+to test the HTTP Library.
+@internalTechnology
+@test
+*/
+class CTestXmlServiceTestStep : public CTestStep
+	{
+public:
+    CTestXmlServiceTestStep();
+	virtual ~CTestXmlServiceTestStep();
+
+private:
+
+public:
+	// TEF virtuals
+	virtual TVerdict doTestStepPreambleL();
+	// TEF pure virtual
+	virtual TVerdict doTestStepL();
+
+	};
+
+#endif		// __TEST_HTTP_BUFFER_SIZE_STEP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/ini/testupnpdescriptionsuite.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,390 @@
+// Ini file for running XML Integration Tests.
+
+////////////////////////////////////////////////////////////////////////////////
+///////                 Testing XML service parser	     ///////////////////
+////////////////////////////////////////////////////////////////////////////////
+[Xml_1]
+XmlInputPath		= z:\upnp\description\xml\ServiceDesc_Input1.xml
+XmlOutputPath		= c:\upnp\description\xml\ServiceDesc_Output1.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_2]
+XmlInputPath		= z:\upnp\description\xml\DeviceDesc_Input1.xml
+XmlOutputPath		= c:\upnp\description\xml\DeviceDesc_Output1.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_3]
+XmlInputPath		= z:\upnp\description\xml\DeviceDesc_Input2.xml
+XmlOutputPath		= c:\upnp\description\xml\DeviceDesc_Output2.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_4]
+XmlInputPath		= z:\upnp\description\xml\DeviceDesc_Input3.xml
+XmlOutputPath		= c:\upnp\description\xml\DeviceDesc_Output3.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_5]
+XmlInputPath		= z:\upnp\description\xml\DeviceDesc_Input4.xml
+XmlOutputPath		= c:\upnp\description\xml\DeviceDesc_Output4.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_6]
+XmlInputPath		= z:\upnp\description\xml\DeviceDesc_Input5.xml
+XmlOutputPath		= c:\upnp\description\xml\DeviceDesc_Output5.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_7]
+XmlInputPath		= z:\upnp\description\xml\ServiceDesc_Input2.xml
+XmlOutputPath		= c:\upnp\description\xml\ServiceDesc_Output2.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_8]
+XmlInputPath		= z:\upnp\description\xml\ServiceDesc_Input3.xml
+XmlOutputPath		= c:\upnp\description\xml\ServiceDesc_Output3.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_9]
+XmlInputPath		= z:\upnp\description\xml\ServiceDesc_Input4.xml
+XmlOutputPath		= c:\upnp\description\xml\ServiceDesc_Output4.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_10]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg1.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg1.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_11]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg2.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg2.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_12]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg3.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg3.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_13]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg4.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg4.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_14]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg5.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg5.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_15]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg6.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg6.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_16]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg7.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg7.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_17]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg8.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg8.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_18]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg9.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg9.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_19]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg10.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg10.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_20]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg11.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg11.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_21]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg12.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg12.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_22]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg13.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg13.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_23]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg14.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg14.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_24]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg15.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg15.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_25]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg16.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg16.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_26]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg17.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg17.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_27]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg18.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg18.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_28]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg19.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg19.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_29]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg20.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg20.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_30]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg21.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg21.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_31]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg22.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg22.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_32]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg23.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg23.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_33]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg24.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg24.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_34]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg25.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg25.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_35]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg1.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg1.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_36]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg2.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg2.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_37]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg3.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg3.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_38]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg4.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg4.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_39]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg5.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg5.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_40]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg6.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg6.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_41]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg7.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg7.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_42]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg8.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg8.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_43]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg9.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg9.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_44]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg10.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg10.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_45]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg11.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg11.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_46]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg12.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg12.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_47]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg13.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg13.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_48]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg14.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg14.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_49]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg15.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg15.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_50]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg16.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg16.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_51]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg17.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg17.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_52]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg18.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg18.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_53]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg19.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg19.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_54]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg20.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg20.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_55]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg21.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg21.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_56]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg22.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg22.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_57]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg23.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg23.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_58]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_inputneg24.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_inputneg24.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_59]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg26.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg26.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_60]
+XmlInputPath		= z:\upnp\description\xml\serviceDesc_inputneg27.xml
+XmlOutputPath		= c:\upnp\description\xml\serviceDesc_outputneg27.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_61]
+XmlInputPath		= z:\upnp\description\xml\DeviceDesc_Input6.xml
+XmlOutputPath		= c:\upnp\description\xml\DeviceDesc_Output6.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_62]
+XmlInputPath		= z:\upnp\description\xml\ServiceDesc_Input5.xml
+XmlOutputPath		= c:\upnp\description\xml\ServiceDesc_Output5.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+[Xml_63]
+XmlInputPath		= z:\upnp\description\xml\devicedesc_DEF126707.xml
+XmlOutputPath		= c:\upnp\description\xml\devicedesc_DEF126707_1.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= EFalse
+
+[Xml_64]
+XmlInputPath		= z:\upnp\description\xml\servicedesc_DEF126707.xml
+XmlOutputPath		= c:\upnp\description\xml\servicedesc_DEF126707_1.xml
+IsTestCasePositive	= ETrue
+IsInputFileService	= ETrue
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/script/testupnpdescriptionsuite.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1019 @@
+// 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:
+// Script file for upnpdescription Test.
+// @internalAll
+// 
+//
+
+
+PRINT Running_Xml_Test
+
+// Load the test
+LOAD_SUITE testupnpdescriptionserver
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-001
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical service description file
+//! @SYMTestType 		                UT
+			
+START_TESTCASE	Xml_1
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_1
+END_TESTCASE 	Xml_1
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-002
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical device description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_2
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_2
+END_TESTCASE 	Xml_2
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-003
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical device description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_3
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_3
+END_TESTCASE 	Xml_3
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-001
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ						 	10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. Unknown tag in <device>
+//!
+//! @SYMTestExpectedResults     	
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_4
+//RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_4
+//END_TESTCASE 	Xml_4
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-004
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical device description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_5
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_5
+END_TESTCASE 	Xml_5
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-005
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical device description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_6
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_6
+END_TESTCASE 	Xml_6
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-006
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical service description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_7
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_7
+END_TESTCASE 	Xml_7
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-007
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical service description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_8
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_8
+END_TESTCASE 	Xml_8
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-008
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical service description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_9
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_9
+END_TESTCASE 	Xml_9
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-002
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description. No service state table present
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_10
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_10
+END_TESTCASE 	Xml_10
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-003
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description. SendEvents attribute in StateTable empty
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_11
+//RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_11
+//END_TESTCASE 	Xml_11
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-004
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description. <name> tag in <action> empty
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_12
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_12
+END_TESTCASE 	Xml_12
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-005
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description. <name> tag in <action><argument> empty
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_13
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_13
+END_TESTCASE 	Xml_13
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-006
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description. <direction> tag in <action><argument> empty
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_14
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_14
+END_TESTCASE 	Xml_14
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-007
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.<relatedStateVariable> tag in <action><argument> empty
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_15
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_15
+END_TESTCASE 	Xml_15
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-008
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description. sendEvents attribute in stateTable missing
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_16
+//RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_16
+//END_TESTCASE 	Xml_16
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-009
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.duplicate allowedValueList entry
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_17
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_17
+END_TESTCASE 	Xml_17
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-010
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.<serviceStateTable><stateVariable> attribute is 1
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_18
+//RUN_TEST_STEP  100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_18
+//END_TESTCASE 	Xml_18
+
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-011
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_19
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_19
+END_TESTCASE 	Xml_19
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-012
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_20
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_20
+END_TESTCASE 	Xml_20
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-013
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_21
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_21
+END_TESTCASE 	Xml_21
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-014
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_22
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_22
+END_TESTCASE 	Xml_22
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-015
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_23
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_23
+END_TESTCASE 	Xml_23
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-016
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_24
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_24
+END_TESTCASE 	Xml_24
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-017
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_25
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_25
+END_TESTCASE 	Xml_25
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-018
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_26
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_26
+END_TESTCASE 	Xml_26
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-019
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_27
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_27
+END_TESTCASE 	Xml_27
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-020
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_28
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_28
+END_TESTCASE 	Xml_28
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-021
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_29
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_29
+END_TESTCASE 	Xml_29
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-022
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_30
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_30
+END_TESTCASE 	Xml_30
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-023
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_31
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_31
+END_TESTCASE 	Xml_31
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-024
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_32
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_32
+END_TESTCASE 	Xml_32
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-025
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//! START_TESTCASE	Xml_33
+//! RUN_TEST_STEP 	!error=-130 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_33
+//! END_TESTCASE 	Xml_33
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Neg-026
+//! @SYMTestCaseDesc 	            Parsing service description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse service description.Unknown tag in <serviceStateTable><stateVariable><valueRange>
+//!				                    
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_34
+RUN_TEST_STEP 	!error=-993 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_34
+END_TESTCASE 	Xml_34
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0027
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_35
+RUN_TEST_STEP 	!error=-993 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_35
+END_TESTCASE 	Xml_35
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0028
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_36
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_36
+END_TESTCASE 	Xml_36
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0028
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_37
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_37
+END_TESTCASE 	Xml_37
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0030
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_38
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_38
+END_TESTCASE 	Xml_38
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0031
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_39
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_39
+END_TESTCASE 	Xml_39
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0032
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_40
+//RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_40
+//END_TESTCASE 	Xml_40
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0033
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_41
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_41
+END_TESTCASE 	Xml_41
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0034
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_42
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_42
+END_TESTCASE 	Xml_42
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0035
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_43
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_43
+END_TESTCASE 	Xml_43
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0036
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_44
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_44
+END_TESTCASE 	Xml_44
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0037
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_45
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_45
+END_TESTCASE 	Xml_45
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0038
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_46
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_46
+END_TESTCASE 	Xml_46
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0039
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_47
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_47
+END_TESTCASE 	Xml_47
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-040
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_48
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_48
+END_TESTCASE 	Xml_48
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0041
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_49
+//RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_49
+//END_TESTCASE 	Xml_49
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0042
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_50
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_50
+END_TESTCASE 	Xml_50
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0043
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_51
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_51
+END_TESTCASE 	Xml_51
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0044
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_52
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_52
+END_TESTCASE 	Xml_52
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0044
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_53
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_53
+END_TESTCASE 	Xml_53
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0044
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. Missing service list
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_54
+//RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_54
+//END_TESTCASE 	Xml_54
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0044
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_55
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_55
+END_TESTCASE 	Xml_55
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0044
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_56
+//RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_56
+//END_TESTCASE 	Xml_56
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0044
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. Invalid embedded device
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_57
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_57
+END_TESTCASE 	Xml_57
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0044
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_58
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_58
+END_TESTCASE 	Xml_58
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0027
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_59
+RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_59
+END_TESTCASE 	Xml_59
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0027
+//! @SYMTestCaseDesc 	            Parsing device description.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description. 
+//!
+//! @SYMTestExpectedResults     	The parser leaves with error code 20
+//! @SYMTestType 		                UT
+
+//START_TESTCASE	Xml_60
+//RUN_TEST_STEP 	!error=-20 100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_60
+//END_TESTCASE 	Xml_60
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0029
+//! @SYMTestCaseDesc 	            Parsing device description file with vendor tags.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Device description with vendor tags. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical device description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_61
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_61
+END_TESTCASE 	Xml_61
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0030
+//! @SYMTestCaseDesc 	            Parsing service description file with vendor tags.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Service description with vendor tags. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical service description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_62
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_62
+END_TESTCASE 	Xml_62
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0030
+//! @SYMTestCaseDesc 	            Parsing service description file with vendor tags.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Service description with vendor tags. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical service description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_63
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_63
+END_TESTCASE 	Xml_63
+
+//! @file			                
+//! @SYMTestCaseID		            UPnPDescription-Pos-0030
+//! @SYMTestCaseDesc 	            Parsing service description file with vendor tags.
+//! @SYMREQ							10846
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority	            Critical
+//! @SYMTestActions 				Parse Service description with vendor tags. 
+//!
+//! @SYMTestExpectedResults     	The parser successfully parses and composes an identical service description file
+//! @SYMTestType 		                UT
+
+START_TESTCASE	Xml_64
+RUN_TEST_STEP 	100 	testupnpdescriptionserver TestXmlServiceStep	z:\upnp\description\ini\testupnpdescriptionsuite.ini  Xml_64
+END_TESTCASE 	Xml_64
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/src/testupnpdescriptionserver.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,261 @@
+// 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:
+// Contains implementation of testupnpdescriptionserver class
+// @internalAll
+// 
+//
+
+// User Includes
+// Test Server
+#include "testupnpdescriptionserver.h"
+#include "testupnpdescriptionservicestep.h"
+
+// Test steps
+
+
+#if (!defined EKA2)
+// The system-wide unique name for the test-server
+_LIT(KServerName, "testupnpdescriptionserver");
+#endif
+
+/**
+Static factory constructor. Creates and returns instance of the test server
+@internalTechnology
+@test
+@return		A pointer to the newly created CTestXmlServer object
+*/
+CTestXmlServer*  CTestXmlServer::NewL()
+	{
+	// Construct the server
+	CTestXmlServer* server = new(ELeave) CTestXmlServer();
+	CleanupStack::PushL(server);
+
+	// CServer base class call
+	// Name the server using the system-wide unique string
+	// Clients use this to create server sessions.
+	server->StartL(server->ServerName());
+
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+
+#if (!defined EKA2)
+/**
+Creates the Active Scheduler, then creates the test-server, synchronises the
+thread with the client and then enters the active scheduler.
+
+This is EKA1 version of MainL(). Uses sempahore to sync with client
+as Rendezvous calls are not available
+*/
+LOCAL_C void MainL()
+	{
+	// Create and install the active scheduler.
+	CActiveScheduler* sched = new(ELeave) CActiveScheduler;
+	CleanupStack::PushL(sched);
+	CActiveScheduler::Install(sched);
+
+	// Create the server inside trap harness
+	CTestXmlServer *server = NULL;
+	TRAPD(err, server = CTestXmlServer::NewL());
+	if (!err)
+		{
+		CleanupStack::PushL(server);
+		RSemaphore sem;
+
+		// The client API of TestExecute will already have created the
+		// semaphore and will be waiting on it.
+		User::LeaveIfError(sem.OpenGlobal(KServerName));
+
+		CleanupStack::Pop(server);
+
+		// Signal the client
+		sem.Signal();
+		sem.Close();
+
+		// Enter the active scheduler
+		sched->Start();
+		}
+	CleanupStack::PopAndDestroy(); // sched
+	delete server;
+
+	}
+#else
+/**
+EKA2 version of MainL()
+Uses the new Rendezvous call isntead of the older semaphore.
+*/
+LOCAL_C void MainL()
+	{
+	// For platform security
+#if (defined __DATA_CAGING__)
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+	CActiveScheduler* sched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CTestXmlServer* server = NULL;
+
+	// Create the test-server
+	TRAPD(err, server = CTestXmlServer::NewL());
+
+	if(!err)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+#endif		// #if (!defined EKA2)
+
+
+#if (defined __WINS__ && !defined EKA2)
+/**
+DLL entry-point for EKA1 emulator builds.
+*/
+GLDEF_C TInt E32Dll(enum TDllReason /*aDllReason*/)
+	{
+	return KErrNone;
+	}
+#else
+/**
+Exe entry point code, for EKA1 hardware and EKA2 builds.
+*/
+GLDEF_C TInt E32Main()
+	{
+	__UHEAP_MARK;
+	CTrapCleanup *cleanup = CTrapCleanup::New();
+	if (cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+
+	TRAPD(err, MainL());
+	__ASSERT_ALWAYS(!err,User::Panic(KTxt,err));
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return KErrNone;
+	}
+#endif		// #if (defined __WINS__ && !defined EKA2)
+
+#if (defined __WINS__ && !defined EKA2)
+/**
+For EKA1 emulator builds. This function is called when the thread is first
+resumed. Has the standard thread entry siganture.
+@internalTechnology
+@test
+@return		KErrNone if everything is fine or system-wide error if any
+*/
+TInt ThreadFunc (TAny* /*aParam*/)
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if (cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TRAPD(err, MainL());
+	__ASSERT_ALWAYS(!err,User::Panic(KTxt,err));
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return KErrNone;
+	}
+
+/**
+For EKA1 emulator builds. Creates and starts a thread for the server to run.
+@internalTechnology
+@test
+@param		None
+@return		Integer value indicating the error code.
+*/
+EXPORT_C TInt NewServer()
+	{
+	_LIT(KThread, "Thread");
+	RThread thread;
+
+	// Name the thread as "<Server-Name>Thread" making it hopefully unique
+	TBuf<KMaxTestExecuteNameLength> threadName(KServerName);
+	threadName.Append(KThread);
+
+	const TInt KMaxHeapSize = 0x1000000;
+
+	// Create the thread
+	TInt err = thread.Create(threadName, ThreadFunc, KDefaultStackSize,
+							 KMinHeapSize, KMaxHeapSize, NULL, EOwnerProcess
+							);
+	if (err != KErrNone)
+		{
+		return err;
+		}
+
+	// Start the thread -> effectively calls ThreadFunc
+	thread.Resume();
+
+	thread.Close();
+	return KErrNone;
+	}
+#endif 		// #if (defined __WINS__ && !defined EKA2)
+
+
+/**
+Base class pure virtual
+@internalTechnology
+@test
+@return 	Instance of the test step
+@param		Descriptor containing the test-step name
+*/
+CTestStep* CTestXmlServer::CreateTestStep(const TDesC& aStepName)
+	{
+	CTestStep *testStep = NULL;
+	TRAPD(err,testStep=CreateTestStepL(aStepName));
+	if(err == KErrNone)
+		return testStep;
+	else
+		return NULL;
+	}
+
+
+CTestStep* CTestXmlServer::CreateTestStepL(const TDesC& aStepName)
+	{
+	CTestStep *testStep = NULL;
+
+	if (aStepName == KTestXmlServiceStep)
+		{
+		testStep = new CTestXmlServiceTestStep();
+		}
+
+	return testStep;
+	}
+
+/**
+Returns server name based on the EKA version
+@internalTechnology
+@test
+@return		Descriptor containing the servername
+*/
+const TPtrC CTestXmlServer::ServerName()
+	{
+#if (!defined EKA2)
+	return KServerName();
+#else
+	// The exe name can be either TestWListBListUriServer or
+	// TestWListBListUriServer_Cap based on whether the normal
+	// or the security tests are being run. So decide the server
+	// name during runtime
+	TParsePtrC serverName(RProcess().FileName());
+	return serverName.Name();
+#endif
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/src/testupnpdescriptionservicestep.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,250 @@
+// 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:
+// Contains implementation of testupnpdescriptionservicestep class
+// @internalAll
+// 
+//
+
+// System Include
+// for StartC32()
+#include <c32comm.h>
+#include <e32base.h>
+
+// User Include
+#include "testupnpdescriptionservicestep.h"
+// library include
+#include <cupnpdescriptionparser.h>
+#include <cupnpdescriptioncomposer.h>
+#include "cpnpdeviceparam.h"
+#include <cstringpoolmanager.h>
+#include <testvendordeviceschema.h>
+#include <testvendorserviceschema.h>
+
+_LIT(KDirName, "c:\\upnp\\description\\xml\\");
+
+/**
+Constructor: Sets the test step name.
+@internalTechnology
+@test
+*/
+CTestXmlServiceTestStep::CTestXmlServiceTestStep()
+	{
+
+	SetTestStepName(KTestXmlServiceStep);
+	}
+
+
+/**
+Destructor: Closes the iFileServ.
+@internalTechnology
+@test
+*/
+CTestXmlServiceTestStep::~CTestXmlServiceTestStep()
+	{
+	}
+
+
+/**
+Base class virtual doTestStepPreambleL():
+Create and install the active scheduler and connect to iFileServ (RFs).
+@internalTechnology
+@test
+@param		None
+@return		EPass or EFail.
+*/
+TVerdict CTestXmlServiceTestStep::doTestStepPreambleL()
+	{
+    return TestStepResult();
+	}	// doTestPreambleL
+
+
+/**
+Base class pure virtual doTestStepL():
+Tests the ebo support in http.
+@internalTechnology
+@test
+@param		None
+@return		EPass or EFail indicating the result of the test step.
+*/
+TVerdict CTestXmlServiceTestStep::doTestStepL()
+	{
+	TPtrC	aInputPath;
+	TPtrC	aOutputPath;
+	TBool	aIsService;
+	TBool	aIsPositive;
+    TInt	err=KErrNone;
+    RFs		fs;
+    RFile	handle;
+    _LIT(KVendorDevice,"Xml_61");
+    _LIT(KVendorService,"Xml_62");
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+
+    // create the output folder
+    
+    err = fs.MkDirAll(KDirName);
+    if ((err != KErrNone) && (err!=KErrAlreadyExists))
+    	{
+    		User::LeaveIfError(err);
+    	}
+
+	if(
+	!GetStringFromConfig(ConfigSection(),KIniInputPath,aInputPath)||
+	!GetStringFromConfig(ConfigSection(),KIniOutputPath,aOutputPath)||
+	!GetBoolFromConfig(ConfigSection(),KIniIsTestCasePositive,aIsPositive)||
+	!GetBoolFromConfig(ConfigSection(),KIniIsInputFileService,aIsService))
+		{
+		ERR_PRINTF5(_L("Problem in reading values from ini.			\
+				\nExpected fields are: \n%S\n \n%S\n \n%S\n \n%S\n" 
+			  ),&KIniInputPath,&KIniOutputPath,&KIniIsTestCasePositive,&KIniIsInputFileService);
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+
+	//-----------------------
+	RFile 			handle1;
+	
+	TRAP(err,handle1.Open(fs, aInputPath, EFileShareReadersOnly));
+	// For Hardware system path is c:, so descriptionPath value present in '.ini' is referring 'c:'
+	if ( err == KErrPathNotFound )
+		{				
+		RBuf fileName;
+		TDriveName aSystemDrive;
+		TDriveUnit driveunit(RFs::GetSystemDrive());
+		aSystemDrive.Zero();
+		aSystemDrive=driveunit.Name();				
+		fileName.CreateL ( aInputPath.Length () );
+		fileName.Zero();
+		fileName.Append(aSystemDrive);
+		fileName.Append ( aInputPath.Mid ( aSystemDrive.Length () ) );		
+		
+		err = handle1.Open(fs, fileName, EFileShareReadersOnly);
+		}
+	if (err != KErrNone)
+	    {
+	    User::LeaveIfError(err);
+	    }
+	CleanupClosePushL(handle1);
+	TInt aFileSize = 0;
+	handle1.Size(aFileSize);
+	
+	HBufC8 * Buf1 = HBufC8::NewL(aFileSize);
+	TPtr8 Pointer = Buf1->Des();
+	
+	TInt err1 = handle1.Read(Pointer,aFileSize);
+	
+	CleanupStack::PopAndDestroy(&handle1);
+
+	//-----------------------
+
+    err = handle.Open(fs,aOutputPath,EFileWrite);
+    if (err == KErrNotFound)
+        {
+        err=handle.Create(fs,aOutputPath,EFileWrite);
+        if(err != KErrNone )
+        	SetTestStepResult(EFail);
+        }
+    CleanupClosePushL(handle);
+
+    RBuf8 aComposedXml;
+    CleanupClosePushL(aComposedXml);
+    CStringPoolManager* poolManager = CStringPoolManager::NewL();
+    CleanupStack::PushL( poolManager );
+    if ( ConfigSection() == KVendorDevice )
+    	poolManager->SetStringTableL( UPNPVENDORDEVICETAGS::Table);
+    else if ( ConfigSection() == KVendorService )
+    	poolManager->SetStringTableL( UPNPVENDORSERVICETAGS::Table);
+    if(aIsService)
+    	{
+        CUPnPServiceDescription *aServDescObj = NULL;
+               	
+        CUPnPDescriptionParser* app = CUPnPDescriptionParser::NewL( poolManager->StringPool() ,CUPnPDescriptionParser::EService);
+	    CleanupStack::PushL(app);
+	    CUPnPDescriptionComposer *comp  = CUPnPDescriptionComposer::NewL( poolManager->StringPool());
+	    CleanupStack::PushL(comp);
+
+	    TRAPD(error1,aServDescObj = static_cast<CUPnPServiceDescription*> (app->ParseDescriptionBufL(Pointer)));
+	    if(error1!=KErrNone)
+	    	{
+	    	SetTestStepResult(EFail);
+	    	SetTestStepError(error1);
+	    	}
+	    else
+	    	{
+	    	//TRAPD(error2,comp->ComposeServiceXmlL(app->GetServiceDescObj(),aComposedXml));
+	    	TRAPD(error2,comp->ComposeDescriptionXmlL(aServDescObj,CUPnPDescriptionComposer::EService , aComposedXml));
+		    if(error2!=KErrNone)
+		    	{
+		    	SetTestStepResult(EFail);
+		    	SetTestStepError(error2);
+		    	}
+		    else
+		    	{
+		    	SetTestStepResult(EPass);
+		    	}
+	    	}
+	    delete aServDescObj;
+
+	    CleanupStack::PopAndDestroy(comp);
+	    CleanupStack::PopAndDestroy(app);
+    	}
+    else
+    	{
+    	CUPnPDeviceDescription *aDeviceDescObj = NULL;
+    	CUPnPDescriptionParser* app = CUPnPDescriptionParser::NewL(poolManager->StringPool(), CUPnPDescriptionParser::EDevice);
+        CleanupStack::PushL(app);
+        CUPnPDescriptionComposer *comp  = CUPnPDescriptionComposer::NewL( poolManager->StringPool() );
+        CleanupStack::PushL(comp);
+            
+        TRAPD(error1,aDeviceDescObj = static_cast<CUPnPDeviceDescription*> (app->ParseDescriptionBufL(Pointer)));
+        if(error1!=KErrNone)
+        	{
+	    	SetTestStepResult(EFail);
+	    	SetTestStepError(error1);        	
+	    	}
+        else
+        	{
+        	//TRAPD(error2,comp->ComposeDeviceXmlL(app->GetDeviceDescObj(),aComposedXml));
+        	TRAPD(error2,comp->ComposeDescriptionXmlL(aDeviceDescObj, CUPnPDescriptionComposer::EDevice,aComposedXml));
+    	    if(error2!=KErrNone)
+    	    	{
+    	    	SetTestStepResult(EFail);
+    	    	SetTestStepError(error2);
+    	    	}
+    	    else
+    	    	{
+    	    	SetTestStepResult(EPass);
+    	    	}
+    	    	
+        	}
+        delete aDeviceDescObj;
+
+        CleanupStack::PopAndDestroy(comp);
+        CleanupStack::PopAndDestroy(app);
+    	}
+
+    
+    delete Buf1;
+    handle.Write(aComposedXml);
+    handle.Close();
+    CleanupStack::PopAndDestroy(poolManager);
+    CleanupStack::PopAndDestroy();
+    CleanupStack::PopAndDestroy(&handle);
+    CleanupStack::PopAndDestroy(&fs);
+
+	
+	return TestStepResult();
+
+	}	// doTestStepL
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_DEF126707.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <deviceType>Redundant Data</deviceType>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+			<mimetype>Redundant:image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+			<serviceType>Redundant:urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+			<SCPDURL>Redundant_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+      <deviceList>
+         <device>
+            <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
+            <friendlyName>Intel's Media Server (BAN-KIRANP01)</friendlyName>
+            <manufacturer>Intel Corporation</manufacturer>
+            <manufacturerURL>http://www.intel.com</manufacturerURL>
+            <modelDescription>Provides content through UPnP ContentDirectory service</modelDescription>
+            <modelName>XPC Media Server</modelName>
+            <modelNumber>0.765</modelNumber>
+            <modelURL>http://www.intel.com/upnp/MediaServerDevice</modelURL>
+            <UDN>uuid:e2310f07-7dcf-4047-b236-ab1141ae5252</UDN>
+            <serviceList>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ConnectionManager</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ConnectionManager_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ConnectionManager_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ConnectionManager_event</eventSubURL>
+               </service>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ContentDirectory</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ContentDirectory_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ContentDirectory_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ContentDirectory_event</eventSubURL>
+               </service>
+            </serviceList>
+            <deviceList>
+               <device>
+	          <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	          <presentationURL>/</presentationURL>
+	          <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+			  <friendlyName>Redundant:Light (BAN-KIRANP01)</friendlyName>
+	          <manufacturer>Intel Corporation</manufacturer>
+	          <manufacturerURL>http://www.intel.com</manufacturerURL>
+	          <modelDescription>Software Emulated Light Bulb</modelDescription>
+	          <modelName>Intel CLR Emulated Light Bulb</modelName>
+	          <modelNumber>XPC-L1</modelNumber>
+	          <modelURL>http://www.intel.com/xpc</modelURL>
+	          <UDN>uuid:9e1febef-4605-4959-9362-d1125d73998a</UDN>
+	          <iconList>
+	             <icon>
+	                <mimetype>image/png</mimetype>
+	                <width>32</width>
+	                <height>32</height>
+	                <depth>32</depth>
+	                <url>/icon.png</url>
+	             </icon>
+	          </iconList>
+	          <serviceList>
+	             <service>
+	                <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+	                <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+	                <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+	                <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+	                <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+	             </service>
+	             <service>
+	                <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+	                <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+	                <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+	                <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+	                <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+					<eventSubURL>Redundant_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+	             </service>
+	          </serviceList>
+	       </device>
+            </deviceList>
+         </device>
+      </deviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>		
+   		helloworld
+   </URLBase>
+   <device>
+      <deviceType>		urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+	  <dlna:X_DLNACAP xmlns:dlna="urn:schemas-dlna-org:device-1-0">av-upload,image-upload,audio-upload</dlna:X_DLNACAP>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input2.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+	<specVersion>
+		<major>1</major>
+		<minor>0</minor>
+	</specVersion>
+	<device>
+		<UDN>uuid:9b4b83fa-24d5-4027-a087-f72284eeaf02</UDN>
+		<friendlyName>BAN-OEXP02: vinodkumarpoolothval</friendlyName>
+		<deviceType>urn:schemas-microsoft-com:device:MSMediaServer:1</deviceType>
+		<manufacturer>Microsoft</manufacturer>
+		<manufacturerURL>http://www.microsoft.com/</manufacturerURL>
+		<modelName>Zune Network Sharing Service</modelName>
+		<modelNumber>1.0</modelNumber>
+		<modelURL>http://www.microsoft.com/</modelURL>
+		<iconList>
+			<icon>
+				<mimetype>image/jpeg</mimetype>
+				<width>120</width>
+				<height>120</height>
+				<depth>24</depth>
+				<url>/upnphost/udhisapi.dll?content=uuid:29098ed8-0354-4e7e-b44d-4e36514542e4</url>
+			</icon>
+			<icon>
+				<mimetype>image/jpeg</mimetype>
+				<width>48</width>
+				<height>48</height>
+				<depth>24</depth>
+				<url>/upnphost/udhisapi.dll?content=uuid:8c16cbb3-bc4e-4f7f-acde-7c1fb32d1b92</url>
+			</icon>
+			<icon>
+				<mimetype>image/png</mimetype>
+				<width>48</width>
+				<height>48</height>
+				<depth>24</depth>
+				<url>/upnphost/udhisapi.dll?content=uuid:c9e48d79-3f3c-4d23-8ca3-b5df3a45e130</url>
+			</icon>
+		</iconList>
+		<serviceList>
+			<service>
+				<serviceType>urn:schemas-microsoft-com:service:MSContentDirectory:1</serviceType>
+				<serviceId>urn:microsoft-com:serviceId:MSContentDirectory</serviceId>
+				<controlURL>/upnphost/udhisapi.dll?control=uuid:9b4b83fa-24d5-4027-a087-f72284eeaf02+urn:microsoft-com:serviceId:MSContentDirectory</controlURL>
+				<eventSubURL>/upnphost/udhisapi.dll?event=uuid:9b4b83fa-24d5-4027-a087-f72284eeaf02+urn:microsoft-com:serviceId:MSContentDirectory</eventSubURL>
+				<SCPDURL>/upnphost/udhisapi.dll?content=uuid:bc1d4793-df9e-4551-9c65-02591f2cd91a</SCPDURL>
+			</service>
+			<service>
+				<serviceType>urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1</serviceType>
+				<serviceId>urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar</serviceId>
+				<controlURL>/upnphost/udhisapi.dll?control=uuid:9b4b83fa-24d5-4027-a087-f72284eeaf02+urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar</controlURL>
+				<eventSubURL>/upnphost/udhisapi.dll?event=uuid:9b4b83fa-24d5-4027-a087-f72284eeaf02+urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar</eventSubURL>
+				<SCPDURL>/upnphost/udhisapi.dll?content=uuid:fc1c8786-5308-45d8-b494-742711bf18d4</SCPDURL>
+			</service>
+			<service>
+				<serviceType>urn:schemas-microsoft-com:service:Handshake:1</serviceType>
+				<serviceId>urn:microsoft-com:serviceId:Handshake</serviceId>
+				<controlURL>/upnphost/udhisapi.dll?control=uuid:9b4b83fa-24d5-4027-a087-f72284eeaf02+urn:microsoft-com:serviceId:Handshake</controlURL>
+				<eventSubURL></eventSubURL>
+				<SCPDURL>/upnphost/udhisapi.dll?content=uuid:e07e118c-56e4-4034-bf7e-1ffa56ca1263</SCPDURL>
+			</service>
+		</serviceList>
+	</device>
+</root>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input3.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <kiran>Something goes here</kiran>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+      <deviceList>
+         <device>
+            <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
+            <friendlyName>Intel's Media Server (BAN-KIRANP01)</friendlyName>
+            <manufacturer>Intel Corporation</manufacturer>
+            <manufacturerURL>http://www.intel.com</manufacturerURL>
+            <modelDescription>Provides content through UPnP ContentDirectory service</modelDescription>
+            <modelName>XPC Media Server</modelName>
+            <modelNumber>0.765</modelNumber>
+            <modelURL>http://www.intel.com/upnp/MediaServerDevice</modelURL>
+            <UDN>uuid:e2310f07-7dcf-4047-b236-ab1141ae5252</UDN>
+            <serviceList>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ConnectionManager</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ConnectionManager_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ConnectionManager_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ConnectionManager_event</eventSubURL>
+               </service>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ContentDirectory</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ContentDirectory_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ContentDirectory_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ContentDirectory_event</eventSubURL>
+               </service>
+            </serviceList>
+         </device>
+      </deviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input4.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+      <deviceList>
+         <device>
+            <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
+            <friendlyName>Intel's Media Server (BAN-KIRANP01)</friendlyName>
+            <manufacturer>Intel Corporation</manufacturer>
+            <manufacturerURL>http://www.intel.com</manufacturerURL>
+            <modelDescription>Provides content through UPnP ContentDirectory service</modelDescription>
+            <modelName>XPC Media Server</modelName>
+            <modelNumber>0.765</modelNumber>
+            <modelURL>http://www.intel.com/upnp/MediaServerDevice</modelURL>
+            <UDN>uuid:e2310f07-7dcf-4047-b236-ab1141ae5252</UDN>
+            <serviceList>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ConnectionManager</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ConnectionManager_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ConnectionManager_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ConnectionManager_event</eventSubURL>
+               </service>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ContentDirectory</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ContentDirectory_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ContentDirectory_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ContentDirectory_event</eventSubURL>
+               </service>
+            </serviceList>
+            <deviceList>
+               <device>
+	          <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	          <presentationURL>/</presentationURL>
+	          <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+	          <manufacturer>Intel Corporation</manufacturer>
+	          <manufacturerURL>http://www.intel.com</manufacturerURL>
+	          <modelDescription>Software Emulated Light Bulb</modelDescription>
+	          <modelName>Intel CLR Emulated Light Bulb</modelName>
+	          <modelNumber>XPC-L1</modelNumber>
+	          <modelURL>http://www.intel.com/xpc</modelURL>
+	          <UDN>uuid:9e1febef-4605-4959-9362-d1125d73998a</UDN>
+	          <iconList>
+	             <icon>
+	                <mimetype>image/png</mimetype>
+	                <width>32</width>
+	                <height>32</height>
+	                <depth>32</depth>
+	                <url>/icon.png</url>
+	             </icon>
+	          </iconList>
+	          <serviceList>
+	             <service>
+	                <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+	                <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+	                <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+	                <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+	                <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+	             </service>
+	             <service>
+	                <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+	                <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+	                <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+	                <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+	                <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+	             </service>
+	          </serviceList>
+	       </device>
+            </deviceList>
+         </device>
+      </deviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input5.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+      <deviceList>
+         <device>
+            <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
+            <friendlyName>Intel's Media Server (BAN-KIRANP01)</friendlyName>
+            <manufacturer>Intel Corporation</manufacturer>
+            <manufacturerURL>http://www.intel.com</manufacturerURL>
+            <modelDescription>Provides content through UPnP ContentDirectory service</modelDescription>
+            <modelName>XPC Media Server</modelName>
+            <modelNumber>0.765</modelNumber>
+            <modelURL>http://www.intel.com/upnp/MediaServerDevice</modelURL>
+            <UDN>uuid:e2310f07-7dcf-4047-b236-ab1141ae5252</UDN>
+            <serviceList>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ConnectionManager</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ConnectionManager_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ConnectionManager_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ConnectionManager_event</eventSubURL>
+               </service>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ContentDirectory</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ContentDirectory_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ContentDirectory_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ContentDirectory_event</eventSubURL>
+               </service>
+            </serviceList>
+         </device>
+         <device>
+            <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
+            <friendlyName>Intel's Media Server (BAN-KIRANP01)</friendlyName>
+            <manufacturer>Intel Corporation</manufacturer>
+            <manufacturerURL>http://www.intel.com</manufacturerURL>
+            <modelDescription>Provides content through UPnP ContentDirectory service</modelDescription>
+            <modelName>XPC Media Server</modelName>
+            <modelNumber>0.765</modelNumber>
+            <modelURL>http://www.intel.com/upnp/MediaServerDevice</modelURL>
+            <UDN>uuid:e2310f07-7dcf-4047-b236-ab1141ae5252</UDN>
+            <serviceList>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ConnectionManager</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ConnectionManager_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ConnectionManager_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ConnectionManager_event</eventSubURL>
+               </service>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ContentDirectory</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ContentDirectory_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ContentDirectory_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ContentDirectory_event</eventSubURL>
+               </service>
+            </serviceList>
+            <deviceList>
+               <device>
+	          <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	          <presentationURL>/</presentationURL>
+	          <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+	          <manufacturer>Intel Corporation</manufacturer>
+	          <manufacturerURL>http://www.intel.com</manufacturerURL>
+	          <modelDescription>Software Emulated Light Bulb</modelDescription>
+	          <modelName>Intel CLR Emulated Light Bulb</modelName>
+	          <modelNumber>XPC-L1</modelNumber>
+	          <modelURL>http://www.intel.com/xpc</modelURL>
+	          <UDN>uuid:9e1febef-4605-4959-9362-d1125d73998a</UDN>
+	          <iconList>
+	             <icon>
+	                <mimetype>image/png</mimetype>
+	                <width>32</width>
+	                <height>32</height>
+	                <depth>32</depth>
+	                <url>/icon.png</url>
+	             </icon>
+	          </iconList>
+	          <serviceList>
+	             <service>
+	                <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+	                <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+	                <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+	                <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+	                <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+	             </service>
+	             <service>
+	                <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+	                <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+	                <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+	                <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+	                <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+	             </service>
+	          </serviceList>
+	       </device>
+            </deviceList>
+         </device>
+      </deviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_input6.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+	  <vendor>cidero</vendor>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+			<vendorTag>cidero/junior</vendorTag>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+			<vendorService>url-vendor-org:service</vendorService>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </deviceNegativeTest>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg10.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg11.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg12.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg13.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg14.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg15.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg16.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg17.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg18.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg19.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg2.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg20.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+	  <manufacturerURL>http://www.intel.com</manufacturerURL>
+	  <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+     </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg21.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg22.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:invalid xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:invalid>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg23.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <kiran>Something goes here</kiran>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+      <deviceList>
+         <device>
+            <friendlyName>Intel's Media Server (BAN-KIRANP01)</friendlyName>
+            <manufacturer>Intel Corporation</manufacturer>
+            <manufacturerURL>http://www.intel.com</manufacturerURL>
+            <modelDescription>Provides content through UPnP ContentDirectory service</modelDescription>
+            <modelName>XPC Media Server</modelName>
+            <modelNumber>0.765</modelNumber>
+            <modelURL>http://www.intel.com/upnp/MediaServerDevice</modelURL>
+            <UDN>uuid:e2310f07-7dcf-4047-b236-ab1141ae5252</UDN>
+            <serviceList>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ConnectionManager</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ConnectionManager_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ConnectionManager_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ConnectionManager_event</eventSubURL>
+               </service>
+               <service>
+                  <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
+                  <serviceId>urn:schemas-upnp-org:service:ContentDirectory</serviceId>
+                  <SCPDURL>_urn:schemas-upnp-org:service:ContentDirectory_scpd.xml</SCPDURL>
+                  <controlURL>_urn:schemas-upnp-org:service:ContentDirectory_control</controlURL>
+                  <eventSubURL>_urn:schemas-upnp-org:service:ContentDirectory_event</eventSubURL>
+               </service>
+            </serviceList>
+         </device>
+      </deviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg24.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+	  <unknownTag>This should leave</unknownTag>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg3.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg4.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg5.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg6.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <invalid:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</invalid:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+			<eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg7.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <width>32</width>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg8.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <height>32</height>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/devicedesc_inputneg9.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <URLBase>helloworld</URLBase>
+   <device>
+      <deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
+	  <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
+      <presentationURL>/</presentationURL>
+      <friendlyName>Light (BAN-KIRANP01)</friendlyName>
+      <manufacturer>Intel Corporation</manufacturer>
+      <manufacturerURL>http://www.intel.com</manufacturerURL>
+      <modelDescription>Software Emulated Light Bulb</modelDescription>
+      <modelName>Intel CLR Emulated Light Bulb</modelName>
+      <modelNumber>XPC-L1</modelNumber>
+      <modelURL>http://www.intel.com/xpc</modelURL>
+      <UDN>uuid:6a87ea9b-5821-4cef-9447-a1b67074b157</UDN>
+	  <UPC>uuid:6a87ea9b-5821-4cef-9447-a1b67074a348</UPC>
+	  <serialNumber>13248383</serialNumber>
+      <iconList>
+         <icon>
+            <mimetype>image/png</mimetype>
+            <width>32</width>
+            <depth>32</depth>
+            <url>/icon.png</url>
+         </icon>
+      </iconList>
+      <serviceList>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:DimmingService:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:DimmingService.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:DimmingService.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:DimmingService.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:DimmingService.0001_event</eventSubURL>
+         </service>
+         <service>
+            <serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
+            <serviceId>urn:upnp-org:serviceId:SwitchPower.0001</serviceId>
+            <SCPDURL>_urn:upnp-org:serviceId:SwitchPower.0001_scpd.xml</SCPDURL>
+            <controlURL>_urn:upnp-org:serviceId:SwitchPower.0001_control</controlURL>
+            <eventSubURL>_urn:upnp-org:serviceId:SwitchPower.0001_event</eventSubURL>
+         </service>
+      </serviceList>
+   </device>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_DEF126707.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,412 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	This is service description of media renederer
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+		 <name>Redundant:Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+			   <name>Redundant:BrowseFlag</name>
+               <direction>in</direction>
+			   <retval />
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+			   <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+		 <name>Redundant:ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+			   <name>Redundant:SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+		 <name>Redundant:A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+		 <defaultValue>adi</defaultValue>
+		 <defaultValue>Redundant:adi</defaultValue>
+         <allowedValueRange>
+            <minimum>4</minimum>
+			<maximum>10</maximum>
+			<step>2</step>
+         </allowedValueRange>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>		Browse</name>
+         <argumentList>
+            <argument>
+               <name>		ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input2.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,405 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	This is service description of media renederer
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+			   <retval />
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+		 <defaultValue>adi</defaultValue>
+         <allowedValueRange>
+            <minimum>4</minimum>
+			<maximum>10</maximum>
+			<step>2</step>
+         </allowedValueRange>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input3.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input4.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	With no actions, only state variables.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_input5.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	This is service description of media renederer
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+		 <vendorAction>just_do_it</vendorAction>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+			   <vendorArg>type</vendorArg>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+			   <retval />
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+		 <vendorState>no_send</vendorState>
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+		 <defaultValue>adi</defaultValue>
+         <allowedValueRange>
+            <minimum>4</minimum>
+			<maximum>10</maximum>
+			<step>2</step>
+			<vendorDec>3</vendorDec>
+         </allowedValueRange>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg1.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+			</argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+ </scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg10.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,406 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	This is service description of media renederer
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <major>1</major>
+      <minor>0</minor>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+			   <retval />
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+		 <defaultValue>adi</defaultValue>
+         <allowedValueRange>
+            <minimum>4</minimum>
+			<maximum>10</maximum>
+			<unknownTag>This should leave</unknownTag>
+			<step>2</step>
+         </allowedValueRange>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg11.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg12.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg13.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg14.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg15.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg16.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg17.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,382 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg18.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg19.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg2.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+			</argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg20.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg21.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg22.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg23.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg24.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable >
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg25.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg26.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,405 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+	  <unknown>leave</unknown>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg27.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable>
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg3.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name></name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+			</argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg4.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name></name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+			</argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg5.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction></direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+			</argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg6.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable></relatedStateVariable>
+			</argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg7.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+	<stateVariable dontSendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg8.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,407 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+	  </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+		 <allowedValueList>
+			<allowedValue>This should leave</allowedValue>
+		 </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpdescriptiontest/xml_input_files/servicedesc_inputneg9.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+	spec version order changed.
+-->
+<scpd xmlns="urn:schemas-upnp-org:service-1-0">
+   <specVersion>
+      <minor>0</minor>
+      <major>1</major>
+   </specVersion>
+   <actionList>
+      <action>
+         <name>Browse</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>BrowseFlag</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateObject</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Elements</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>CreateReference</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DeleteResource</name>
+         <argumentList>
+            <argument>
+               <name>ResourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>DestroyObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ExportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSearchCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SearchCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SearchCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSortCapabilities</name>
+         <argumentList>
+            <argument>
+               <name>SortCaps</name>
+               <direction>out</direction>
+               <relatedStateVariable>SortCapabilities</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetSystemUpdateID</name>
+         <argumentList>
+            <argument>
+               <name>Id</name>
+               <direction>out</direction>
+               <relatedStateVariable>SystemUpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>GetTransferProgress</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferStatus</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferStatus</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferLength</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferLength</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferTotal</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferTotal</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>ImportResource</name>
+         <argumentList>
+            <argument>
+               <name>SourceURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>DestinationURI</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_URI</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TransferID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>Search</name>
+         <argumentList>
+            <argument>
+               <name>ContainerID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SearchCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Filter</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>StartingIndex</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>RequestedCount</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>SortCriteria</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>Result</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NumberReturned</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>TotalMatches</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>UpdateID</name>
+               <direction>out</direction>
+               <relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>StopTransferResource</name>
+         <argumentList>
+            <argument>
+               <name>TransferID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TransferID</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+      <action>
+         <name>UpdateObject</name>
+         <argumentList>
+            <argument>
+               <name>ObjectID</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>CurrentTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+            <argument>
+               <name>NewTagValue</name>
+               <direction>in</direction>
+               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>
+            </argument>
+         </argumentList>
+      </action>
+   </actionList>
+   <serviceStateTable>
+      <stateVariable sendEvents="yes">
+         <name>A_ARG_TYPE_SortCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferLength</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>TransferIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_UpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_SearchCriteria</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Filter</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>ContainerUpdateIDs</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Result</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Index</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TagValueList</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_URI</name>
+         <dataType>uri</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_ObjectID</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SortCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>SearchCapabilities</name>
+         <dataType>string</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_Count</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_BrowseFlag</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>BrowseMetadata</allowedValue>
+            <allowedValue>BrowseDirectChildren</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="yes">
+         <name>SystemUpdateID</name>
+         <dataType>ui4</dataType>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferStatus</name>
+         <dataType>string</dataType>
+         <allowedValueList>
+            <allowedValue>COMPLETED</allowedValue>
+            <allowedValue>ERROR</allowedValue>
+            <allowedValue>IN_PROGRESS</allowedValue>
+            <allowedValue>STOPPED</allowedValue>
+         </allowedValueList>
+      </stateVariable>
+      <stateVariable sendEvents="no">
+         <name>A_ARG_TYPE_TransferTotal</name>
+         <dataType>string</dataType>
+      </stateVariable>
+   </serviceStateTable>
+</scpd>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest.ini	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1087 @@
+///////////////////////////////////////////////////////////////////////////////
+//////////////// ***** Response Parser Test ***** ////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// No excess data in the response /////
+///// Only One data chunk in the response /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_1]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Length: 6\r\nServer: Local-Test\r\nDate: Thu, 20 Dec 2007 03:08:55 GMT\r\nContent-Type: text/html; charset=ISO-8859-1\r\n\r\nHELLO!
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 responses /////
+///// 2nd response present as excess data of the 1st response /////
+///// Only One data chunk in the response /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_2]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Length: 6\r\nServer: Local-Test\r\nDate: Thu, 20 Dec 2007 03:08:55 GMT\r\n\r\nHELLO!HTTP/1.1 200 Ok\r\nContent-Type: text/html\r\nContent-Length: 4\r\n\r\nBODY
+ParseExcessData		= ETrue
+ExpectedResponses		= 2
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// Response has chunked body /////
+///// No excess data in the response /////
+///// Only One data chunk in the response /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_3]
+DataChunk1			= HTTP/1.1 200 Ok\r\nTransfer-Encoding: chunked\r\n\r\n10\r\n1234567890abcdef\r\n0\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 responses /////
+///// 2nd response is present as excess data of the 1st response /////
+///// Only One data chunk in the response /////
+///// Both responses have chunked body /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_4]
+DataChunk1			= HTTP/1.1 200 Ok\r\nTransfer-Encoding: chunked\r\n\r\n10\r\n1234567890abcdef\r\n0\r\n\r\nHTTP/1.1 200 Ok\r\nContent-Type: text/html\r\nTransfer-Encoding: chunked\r\n\r\n4\r\ntest\r\n5\r\nchunk\r\n0\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedResponses		= 2
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 responses /////
+///// 2nd response is present as excess data of the 1st response /////
+///// Only One data chunk in the response /////
+///// One response has content length the other has chunked body /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_5]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Type: text/html\r\nContent-Length: 4\r\n\r\nBODYHTTP/1.1 200 Ok\r\nContent-Type: text/html\r\nTransfer-Encoding: chunked\r\n\r\n4\r\ntest\r\n5\r\nchunk\r\n0\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedResponses		= 2
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 responses /////
+///// 2nd response is present as excess data of the 1st response /////
+///// Only One data chunk in the response /////
+///// One response has content length the other has chunked body /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_6]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Type: text/html\r\nTransfer-Encoding: chunked\r\n\r\n4\r\ntest\r\n5\r\nchunk\r\n0\r\n\r\nHTTP/1.1 200 Ok\r\nContent-Type: text/html\r\nContent-Length: 4\r\n\r\nBODY
+ParseExcessData		= ETrue
+ExpectedResponses		= 2
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// No excess data in the response /////
+///// Response is split into 4 data chunks /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_7]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Length: 6\r\n
+DataChunk2			= Server: Local-Test\r\n
+DataChunk3			= Date: Thu, 20 Dec 2007 03:08:55 GMT\r\n\r\n
+DataChunk4			= HELLO!
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 4
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// Response has chunked body /////
+///// No excess data in the response /////
+///// Response is split into 4 data chunks /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_8]
+DataChunk1			= HTTP/1.1 200 Ok\r\n
+DataChunk2			= Transfer-Encoding: chunked\r\n\r\n
+DataChunk3			= 10\r\n
+DataChunk4			= 1234567890abcdef\r\n0\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 4
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// No excess data in the response /////
+///// Response body is split into 7 data chunks /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_9]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Length: 48\r\nServer: Local-Test\r\nDate: Thu, 20 Dec 2007 03:08:55 GMT\r\n\r\n
+DataChunk2			= BIG BODY
+DataChunk3			= THAT HAS
+DataChunk4			= BEEN SPLIT
+DataChunk5			= INTO
+DataChunk6			= MANY
+DataChunk7			= SMALLER CHUNKS
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 7
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// Response has chunked body /////
+///// No excess data in the response /////
+///// chunked response body is split into 8 data chunks /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_10]
+DataChunk1			= HTTP/1.1 200 Ok\r\n
+DataChunk2			= Transfer-Encoding: chunked\r\n\r\n
+DataChunk3			= 11\r\n
+DataChunk4			= BIG BODY THAT HAS\r\n
+DataChunk5			= 4\r\nBEEN\r\n
+DataChunk6			= 5\r\nSPLIT\r\n
+DataChunk7			= 9\r\nINTO MANY
+DataChunk8			= \r\ne\r\nSMALLER CHUNKS\r\n0\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 8
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 responses /////
+///// 2nd response present as excess data of the 1st response /////
+///// 1st response is split into 4 data chunks /////
+///// 2nd response is split into 3 data chunks /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_11]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Length: 
+DataChunk2			= 6\r\nServer: Local-Test\r\nDate: Thu, 20 Dec 20
+DataChunk3			= 07 03:08:55 GMT\r\n\r\nHE
+DataChunk4			= LLO!HTTP/1.1 200 Ok\r\nContent-Type: 
+DataChunk5			= text/html\r\nContent-Length: 4\r\n\r\n
+DataChunk6			= BODY
+ParseExcessData		= ETrue
+ExpectedResponses		= 2
+DataChunkCount		= 6
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 responses /////
+///// Response has chunked body /////
+///// 2nd response present as excess data of the 1st response /////
+///// 1st response is split into 4 data chunks /////
+///// 2nd response is split into 4 data chunks /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_12]
+DataChunk1			= HTTP/1.1 200 Ok\r\nTransfer-Encoding: 
+DataChunk2			= chunked\r\n\r\n10\r\n
+DataChunk3			= 1234567890abc
+DataChunk4			= def\r\n0\r\n\r\nHTTP/1.1 200 Ok\r\nTran
+DataChunk5			= sfer-Encoding: chunked\r\n\r\n
+DataChunk6			= 10\r\n1234567890abcdef\r\n
+DataChunk7			= 0\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedResponses		= 2
+DataChunkCount		= 7
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 responses /////
+///// 2nd response is present as excess data of the 1st response /////
+///// 1st response is split into 3 data chunks /////
+///// 2nd response is split into 4 data chunks /////
+///// One response has content length the other has chunked body /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_13]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Type: 
+DataChunk2			= text/html\r\nContent-
+DataChunk3			= Length: 4\r\n\r\nBODYHTTP/1.1 200 Ok\r\n
+DataChunk4			= Content-Type: text/html\r\nTransfer-Encoding: chun
+DataChunk5			= ked\r\n\r\n4\r\ntest\r\n
+DataChunk6			= 5\r\nchunk\r\n0\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedResponses		= 2
+DataChunkCount		= 6
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a 100-Continue responses /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_14]
+DataChunk1			= HTTP/1.1 100 Continue\r\nContent-Length: 0\r\n\r\nHTTP/1.1 200 Ok\r\nContent-Length: 0\r\n\r\nHTTP/1.1 204 No Content\r\n\r\nHTTP/1.1 304 Not Modified\r\nContent-length: 0\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedResponses		= 3
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_15]
+DataChunk1			= HTTP/1.1 200 Ok\r\nContent-Length: 0\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedResponses		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// HTTP version 1.0 /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_16]
+DataChunk1			= HTTP/1.0 200 Ok\r\nContent-Length: 0\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// HTTP version 0.1 /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_17]
+DataChunk1			= HTTP/0.1 200 Ok\r\nContent-Length: 0\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// No excess data in the response /////
+///// Only One data chunk in the response /////
+///// Response has a non-HTTP protocol /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_18]
+DataChunk1			= WSP/1.1 200 Ok\r\nContent-Length: 6\r\nServer: Local-Test\r\nDate: Thu, 20 Dec 2007 03:08:55 GMT\r\nContent-Type: text/html; charset=ISO-8859-1\r\n\r\nHELLO!
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// No excess data in the response /////
+///// Only One data chunk in the response /////
+///// Response has a non-HTTP protocol /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_19]
+DataChunk1			= HTTP2/1.1 200 Ok\r\nContent-Length: 6\r\nServer: Local-Test\r\nDate: Thu, 20 Dec 2007 03:08:55 GMT\r\nContent-Type: text/html; charset=ISO-8859-1\r\n\r\nHELLO!
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple response /////
+///// No excess data in the response /////
+///// Only One data chunk in the response /////
+///// Response has a non-HTTP protocol /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[RESPONSE_PARSER_TEST_20]
+DataChunk1			= WSPP/1.1 200 Ok\r\nContent-Length: 6\r\nServer: Local-Test\r\nDate: Thu, 20 Dec 2007 03:08:55 GMT\r\nContent-Type: text/html; charset=ISO-8859-1\r\n\r\nHELLO!
+ParseExcessData		= EFalse
+ExpectedResponses		= 1
+DataChunkCount		= 1
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+//////////////// ***** Request Composer Test ***** ////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple GET request /////
+///// Only 2 headers and no multiple values /////
+///// No parameters for the headers /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_1]
+RequestMethod		= GET
+URI					= /index.html
+NoOfHdrValPairs		= 2
+HeaderValuePair1		= Accept: text/xml
+HeaderValuePair2		= User-Agent: UpnpMessageTest
+NoOfHdrParamValPairs	= 0
+RequestBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple GET request /////
+///// 7 headers and no multiple values /////
+///// No parameters for the headers /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_2]
+RequestMethod		= GET
+URI					= /index.html
+NoOfHdrValPairs		= 7
+HeaderValuePair1		= Accept: text/xml
+HeaderValuePair2		= User-Agent: UpnpMessageTest
+HeaderValuePair3		= Accept-Language: en-us
+HeaderValuePair4		= Accept-Encoding: gzip
+HeaderValuePair5		= Accept-Charset: ISO-8859-1
+HeaderValuePair6		= Keep-Alive: 300
+HeaderValuePair7		= Connection: keep-alive
+NoOfHdrParamValPairs	= 0
+RequestBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple GET request /////
+///// 7 headers and with multiple values /////
+///// No parameters for the headers /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_3]
+RequestMethod		= GET
+URI					= /index.html
+NoOfHdrValPairs		= 11
+HeaderValuePair1		= Accept: text/xml
+HeaderValuePair2		= User-Agent: UpnpMessageTest
+HeaderValuePair3		= Accept-Language: en-us
+HeaderValuePair4		= Accept-Encoding: gzip
+HeaderValuePair5		= Accept-Charset: ISO-8859-1
+HeaderValuePair6		= Keep-Alive: 300
+HeaderValuePair7		= Connection: keep-alive
+HeaderValuePair8		= Accept: application/xml
+HeaderValuePair9		= Accept: application/xhtml+xml
+HeaderValuePair10		= Accept-Language: en
+HeaderValuePair11		= Accept-Charset: utf-8
+NoOfHdrParamValPairs	= 0
+RequestBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple GET request /////
+///// 7 headers and with multiple values /////
+///// Some headers have parameters /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_4]
+RequestMethod		= GET
+URI					= /index.html
+NoOfHdrValPairs		= 11
+HeaderValuePair1		= Accept: text/xml
+HeaderValuePair2		= User-Agent: UpnpMessageTest
+HeaderValuePair3		= Accept-Language: en-us
+HeaderValuePair4		= Accept-Encoding: gzip
+HeaderValuePair5		= Accept-Charset: ISO-8859-1
+HeaderValuePair6		= Keep-Alive: 300
+HeaderValuePair7		= Connection: keep-alive
+HeaderValuePair8		= Accept: application/xml
+HeaderValuePair9		= Accept: application/xhtml+xml
+HeaderValuePair10		= Accept-Language: en
+HeaderValuePair11		= Accept-Charset: utf-8
+NoOfHdrParamValPairs	= 4
+HeaderParamValPair1	= Accept: q=0.9 @1
+HeaderParamValPair2	= Accept: q=0.8 @2
+HeaderParamValPair3	= Accept-Language: q=0.5 @0
+HeaderParamValPair4	= Accept-Charset: q=0.6 @1
+RequestBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple POST request /////
+///// 7 headers and with multiple values /////
+///// Some headers have parameters /////
+///// Request has a body /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_5]
+RequestMethod		= POST
+URI					= /index.html
+NoOfHdrValPairs		= 11
+HeaderValuePair1		= Accept: text/xml
+HeaderValuePair2		= User-Agent: UpnpMessageTest
+HeaderValuePair3		= Accept-Language: en-us
+HeaderValuePair4		= Accept-Encoding: gzip
+HeaderValuePair5		= Accept-Charset: ISO-8859-1
+HeaderValuePair6		= Keep-Alive: 300
+HeaderValuePair7		= Connection: keep-alive
+HeaderValuePair8		= Accept: application/xml
+HeaderValuePair9		= Accept: application/xhtml+xml
+HeaderValuePair10		= Accept-Language: en
+HeaderValuePair11		= Accept-Charset: utf-8
+NoOfHdrParamValPairs	= 4
+HeaderParamValPair1	= Accept: q=0.9 @1
+HeaderParamValPair2	= Accept: q=0.8 @2
+HeaderParamValPair3	= Accept-Language: q=0.5 @0
+HeaderParamValPair4	= Accept-Charset: q=0.6 @1
+RequestBodyPresence	= ETrue
+Body					= <?xml version="1.0" encoding="utf-8"?><!-- 	spec version order changed.--><scpd xmlns="urn:schemas-upnp-org:service-1-0">   <specVersion>      <minor>0</minor>      <major>1</major>   </specVersion>   <actionList>      <action>         <name>UpdateObject</name>         <argumentList>            <argument>               <name>ObjectID</name>               <direction>in</direction>               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>            </argument>            <argument>               <name>CurrentTagValue</name>               <direction>in</direction>               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>            </argument>            <argument>               <name>NewTagValue</name>               <direction>in</direction>               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>            </argument>         </argumentList>      </action>   </actionList>   <serviceStateTable>      <stateVariable sendEvents="no">         <name>A_ARG_TYPE_TransferStatus</name>         <dataType>string</dataType>         <allowedValueList>            <allowedValue>COMPLETED</allowedValue>            <allowedValue>ERROR</allowedValue>            <allowedValue>IN_PROGRESS</allowedValue>            <allowedValue>STOPPED</allowedValue>         </allowedValueList>      </stateVariable>      <stateVariable sendEvents="no">         <name>A_ARG_TYPE_TransferTotal</name>         <dataType>string</dataType>      </stateVariable>   </serviceStateTable></scpd>
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple M-Search request /////
+///// Request has no body /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_6]
+RequestMethod		= M-SEARCH
+URI					= *
+NoOfHdrValPairs		= 5
+HeaderValuePair1		= Host:239.255.255.250:1900
+HeaderValuePair2		= ST:urn:schemas-upnp-org:device:InternetGatewayDevice:1
+HeaderValuePair3		= Man: ssdp:discover
+HeaderValuePair4		= MX:3
+HeaderValuePair5        = EXT:
+NoOfHdrParamValPairs	= 0
+RequestBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple NOTIFY request /////
+///// Request has no body /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_7]
+RequestMethod		= NOTIFY
+URI					= *
+NoOfHdrValPairs		= 7
+HeaderValuePair1		= Host:239.255.255.250:1900
+HeaderValuePair2		= NT: upnp:rootdevice
+HeaderValuePair3		= USN: uuid:d77e6e04-f466-439a-b99a-88946979ef62::upnp:rootdevice
+HeaderValuePair4		= NTS: ssdp:alive
+HeaderValuePair5        = SERVER: Windows NT/5.0, UPnP/1.0
+HeaderValuePair6        = LOCATION: http://10.192.204.79:54771/
+HeaderValuePair7        = Content-Length: 0
+NoOfHdrParamValPairs	= 0
+RequestBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple SUBSCRIBE request /////
+///// Request has no body /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_8]
+RequestMethod		= SUBSCRIBE
+URI					= /_urn:upnp-org:serviceId:DimmingService.0001_event
+NoOfHdrValPairs		= 5
+HeaderValuePair1		= NT:  upnp:event
+HeaderValuePair2		= TIMEOUT:  300
+HeaderValuePair3		= HOST:  10.192.204.79:61447
+HeaderValuePair4		= CALLBACK:  http://10.192.204.79:8217/2ab3bfa7-31a5-4a9b-b229-171d3f89e103/urn:upnp-org:serviceId:DimmingService.0001
+HeaderValuePair5        = Content-Length: 0
+NoOfHdrParamValPairs	= 0
+RequestBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple UNSUBSCRIBE request /////
+///// Request has no body /////
+///////////////////////////////////////////////////////////////////////////////
+[REQUEST_COMPOSER_TEST_9]
+RequestMethod		= UNSUBSCRIBE
+URI					= /_urn:upnp-org:serviceId:DimmingService.0001_event
+NoOfHdrValPairs		= 3
+HeaderValuePair1		= SID:  uuid:2ab3bfa7-31a5-4a9b-b229-171d3f89e103-urn:upnp-org:serviceId:DimmingService.0001-1
+HeaderValuePair2		= HOST:  10.192.204.79:61447
+HeaderValuePair3		= Content-Length: 0
+NoOfHdrParamValPairs	= 0
+RequestBodyPresence	= EFalse
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+//////////////// ***** Request Parser Test ***** ////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple request /////
+///// No excess data in the request /////
+///// Request is present as a single chunk /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_1]
+DataChunk1			= GET /index.html HTTP/1.0\r\nHost: www.cricinfo.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple request /////
+///// Excess data in the request which is not parsed/////
+///// Request is split into 5 chunks /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_2]
+DataChunk1			= GET /index.html HTTP/0.1\r\nHost: www.crici
+DataChunk2			= nfo.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,applicati
+DataChunk3			= on/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,
+DataChunk4			= en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1
+DataChunk5			= ,utf-8;q=0.7,*;q=0.7\r\n\r\nsome_junk_excess_data_that_isn't_parsed
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 5
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 simple request /////
+///// 2nd request is present as the excess data of the first /////
+///// 1st request is split into 5 chunks /////
+///// 2nd request is split into 3 chunks /////
+///// 2nd request has a body /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_3]
+DataChunk1			= GET /index.html HTTP/1.1\r\nHost: www.crici
+DataChunk2			= nfo.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,applicati
+DataChunk3			= on/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,
+DataChunk4			= en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1
+DataChunk5			= ,utf-8;q=0.7,*;q=0.7\r\n\r\nPOST /ho
+DataChunk6			= me.html HTTP/1.1\r\nHost: www.
+DataChunk7			= google.com\r\nUser-Agent: UpnpM
+DataChunk8			= essageTest\r\nContent-Length: 6\r\n\r\nHELLO!
+ParseExcessData		= ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 8
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple request that has a body /////
+///// Excess data in the request which is not parsed /////
+///// Request is split into 8 chunks /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_4]
+DataChunk1			= POST /index.html HTTP/1.1\r\nHost: www.goo
+DataChunk2			= gle.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,applicati
+DataChunk3			= on/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,
+DataChunk4			= en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1
+DataChunk5			= ,utf-8;q=0.7,*;q=0.7\r\nTransfer-Encoding: chunked\r\n\r\n10\r\n1234567
+DataChunk6			= 890abcdef\r\n1a;\r\nabcdefghijklmnop
+DataChunk7			= qrstuvwxyz\r\n0\r\n\r\nsome_junk_excess_data_that_isn't_parsed
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 7
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple request that has a body /////
+///// Excess data in the request which is not parsed /////
+///// Request is split into 7 chunks /////
+///// This is a GET request that has a body /////
+///// Transfer-Encoding: chunked is used /////
+///// The presence of the body has to be reported with KErrCorrupt ////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_5]
+DataChunk1			= GET /index.html HTTP/1.1\r\nHost: www.goo
+DataChunk2			= gle.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,applicati
+DataChunk3			= on/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,
+DataChunk4			= en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1
+DataChunk5			= ,utf-8;q=0.7,*;q=0.7\r\nTransfer-Encoding: chunked\r\n\r\n10\r\n1234567
+DataChunk6			= 890abcdef\r\n1a;\r\nabcdefghijklmnop
+DataChunk7			= qrstuvwxyz\r\n0\r\n\r\nsome_junk_excess_data_that_isn't_parsed
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 7
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple request that has a body /////
+///// Excess data in the request which is not parsed /////
+///// Request is split into 6 chunks /////
+///// This is a GET request that has a body /////
+///// Content-Length is used /////
+///// The presence of the body has to be reported with KErrCorrupt ////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_6]
+DataChunk1			= GET /index.html HTTP/1.1\r\nHost: www.goo
+DataChunk2			= gle.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,applicati
+DataChunk3			= on/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,
+DataChunk4			= en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1
+DataChunk5			= ,utf-8;q=0.7,*;q=0.7\r\nContent-Length: 10\r\n\r\n012345
+DataChunk6			= 6789
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 6
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 requests one of which has a body /////
+///// Excess data in the request which is parsed /////
+///// Request is split into 7 chunks /////
+///// This is a GET request that has a body /////
+///// Content-Length is used /////
+///// The presence of the body has to be reported with KErrCorrupt ////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_7]
+DataChunk1			= GET /index.html HTTP/1.1\r\nHost: www.goo
+DataChunk2			= gle.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,applicati
+DataChunk3			= on/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,
+DataChunk4			= en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1
+DataChunk5			= ,utf-8;q=0.7,*;q=0.7\r\nContent-Length: 10\r\n\r\n012345
+DataChunk6			= 6789GET /index.html HTTP/1.1\r\nH
+DataChunk7			= ost: www.google.com\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 7
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 requests one of which has a body /////
+///// Excess data in the request which is parsed /////
+///// Request is split into 8 chunks /////
+///// This is a GET request that has a body /////
+///// Transfer-Encoding: chunked is used /////
+///// The presence of the body has to be reported with KErrCorrupt ////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_8]
+DataChunk1			= GET /index.html HTTP/1.1\r\nHost: www.goo
+DataChunk2			= gle.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,applicati
+DataChunk3			= on/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,
+DataChunk4			= en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1
+DataChunk5			= ,utf-8;q=0.7,*;q=0.7\r\nTransfer-Encoding: chunked\r\n\r\n10\r\n1234567
+DataChunk6			= 890abcdef\r\n1a;\r\nabcdefghijklmnop
+DataChunk7			= qrstuvwxyz\r\n0\r\n\r\nGET /index.html HTTP/1.1\r\nH
+DataChunk8			= ost: www.google.com\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 8
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 requests that have a body /////
+///// Excess data in the request which is parsed /////
+///// Request is split into 7 chunks /////
+///// This is a GET request that has a body /////
+///// Transfer-Encoding: chunked is used /////
+///// The presence of the body has to be reported with KErrCorrupt ////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_9]
+DataChunk1			= GET /index.html HTTP/1.1\r\nHost: www.goo
+DataChunk2			= gle.com\r\nUser-Agent: UpnpMessageTest\r\nTransfer-En
+DataChunk3			= coding: chunked\r\n\r\n10\r\n1234567
+DataChunk4			= 890abcdef\r\n1a;\r\nab
+DataChunk5			= cdefghijklmnop
+DataChunk6			= qrstuvwxyz\r\n0\r\n\r\nGET /index.html HTTP/1.1\r\nHost: www.google.com
+DataChunk7			= \r\nContent-Length: 6\r\n\r\nHELLO!
+ParseExcessData		= ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 7
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 requests that have a body /////
+///// Excess data in the request which is parsed /////
+///// Request is split into 6 chunks /////
+///// This is a GET request that has a body /////
+///// Content-Length is used /////
+///// The presence of the body has to be reported with KErrCorrupt ////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_10]
+DataChunk1			= GET /index.html HTTP/1.1\r\nHost: www.goo
+DataChunk2			= gle.com\r\nUser-Agent: UpnpMessageTest\r\nContent-Length: 10\r\n\r\n012345
+DataChunk3			= 6789GET /index.html HTTP/1.1\r\nHost: www.goo
+DataChunk4			= gle.com\r\nUser-Agent: UpnpMessageTest\r\nTransfer-En
+DataChunk5			= coding: chunked\r\n\r\n10\r\n1234567
+DataChunk6			= 890abcdef\r\n1a;\r\nabcdefghijklmnopqrstuvwxyz\r\n0\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 6
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 1 M-Search request /////
+///// No excess data /////
+///// Request arrives as a single chunk /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_11]
+DataChunk1			= M-SEARCH * HTTP/1.1\r\nHost:239.255.255.250:1900\r\nST:urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nMan:"ssdp:discover"\r\nMX:3\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 M-Search request /////
+///// Second request present as excess data of the first /////
+///// Request arrives in multiple chunks /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_12]
+DataChunk1			= M-SEARCH * HTTP/
+DataChunk2             = 1.1\r\nHost:239.255.255.250:1900\r\nST:urn:schema
+DataChunk3             = s-upnp-org:device:InternetGatewayDevice:1\r\nMan:"ss
+DataChunk4             = dp:discover"\r\nMX:3\r\n\r\nM-SEARCH * HTTP/1.1\r\nHost:
+DataChunk5             = 239.255.255.250:1900\r\nST:urn:schemas-upnp-org:device:In
+DataChunk6             = ternetGatewayDevice:1\r\nMan:"ssdp:discover"\r\nMX:3\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 6
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 1 M-Search request /////
+///// Presece of excess data which is not parsed /////
+///// Request arrives in multiple chunks /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_13]
+DataChunk1			= M-SEARCH * HTTP/
+DataChunk2             = 1.1\r\nHost:239.255.255.250:1900\r\nST:urn:schema
+DataChunk3             = s-upnp-org:device:InternetGatewayDevice:1\r\nMan:"ss
+DataChunk4             = dp:discover"\r\nMX:3\r\n\r\nBODYM-SEARCH * HTTP/1.1\r\nHost:239.255.255.250:1900\r\nST:urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nMan:"ssdp:discover"\r\nMX:3\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 4
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 1 M-Search request /////
+///// No excess data /////
+///// Request arrives as a single chunk /////
+///// Presense of entity body must be reported with KErrCorrupt /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_14]
+DataChunk1			= M-SEARCH * HTTP/1.1\r\nHost:239.255.255.250:1900\r\nST:urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nMan:"ssdp:discover"\r\nMX:3\r\nContent-length: 4\r\n\r\nBODY
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 1 Notify request /////
+///// No excess data /////
+///// Request arrives as a single chunk /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_15]
+DataChunk1			= NOTIFY * HTTP/1.1\r\nNT: upnp:rootdevice\r\nUSN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc::upnp:rootdevice\r\nNTS: ssdp:alive\r\nHOST: 239.255.255.250:1900\r\nContent-Length: 0\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 1 Notify request /////
+///// Presence of excess data which is not parsed /////
+///// Request arrives as multiple chunks /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_16]
+DataChunk1			= NOTIFY * HTTP/1.1\r\nNT: upnp:rootdevice\r\nUSN: uuid:0ad5fcb2-5
+DataChunk2             = 546-42c1-bf8e-e7583a9247bc::upnp:rootdevice\r\nNTS: ssdp
+DataChunk3             = :alive\r\nHOST: 239.255.255.250:1900\r\nConte
+DataChunk4             = nt-Length: 0\r\n\r\nNOTIFY * HTTP
+DataChunk5             = /1.1\r\nNT: upnp:rootdevice\r\nUSN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc::upnp:rootdevice\r\nNTS: ssdp:alive
+DataChunk6             = \r\nHOST: 239.255.255.250:1900\r\nContent-Length: 0\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 6
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 Notify request /////
+///// Presence of excess data which is parsed /////
+///// Request arrives as multiple chunks /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_17]
+DataChunk1			= NOTIFY * HTTP/1.1\r\nNT: upnp:rootdevice\r\nUSN: uuid:0ad5fcb2-5
+DataChunk2             = 546-42c1-bf8e-e7583a9247bc::upnp:rootdevice\r\nNTS: ssdp
+DataChunk3             = :alive\r\nHOST: 239.255.255.250:1900\r\nConte
+DataChunk4             = nt-Length: 0\r\n\r\nNOTIFY * HTTP
+DataChunk5             = /1.1\r\nNT: upnp:rootdevice\r\nUSN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc::upnp:rootdevice\r\nNTS: ssdp:alive
+DataChunk6             = \r\nHOST: 239.255.255.250:1900\r\nContent-Length: 0\r\n\r\n
+ParseExcessData		= ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 6
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a simple SUBSCRIBE request /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_18]
+DataChunk1              = SUBSCRIBE /_urn:upnp-org:serviceId:DimmingService.0001_event HTTP/1.1\r\nNT:  upn
+DataChunk2              = p:event\r\nTIMEOUT:  Sec
+DataChunk3              = ond-300\r\nHOST:  10.192.204.79:61447\r\nCallback:  <http://10.192.204.79:8
+DataChunk4              = 217/2ab3bfa7-31a5-4a9b-b229-171d3f89e103/urn:upnp-org:serviceId:DimmingService.0001>\r\nContent-Length: 0\r\n\r\n
+ParseExcessData     = EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 4
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 simple SUBSCRIBE requests /////
+///// Presence of excess data which is parsed /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_19]
+DataChunk1              = SUBSCRIBE /_urn:upnp-org:serviceId:DimmingService.0001_event HTTP/1.1\r\n
+DataChunk2              = NT:  upnp:event\r\nTIMEOUT:  Sec
+DataChunk3              = ond-300\r\nHOST:  10.192.204.79:61447\r\nCALLBACK:  <http://10.192.204.79:8
+DataChunk4              = 217/2ab3bfa7-31a5-4a9b-b229-171d3f89e103/urn:upnp-org:serviceId:DimmingService.0001>\r\nContent-Length: 0\r\n\r\nSUBSCRIBE /_urn:upnp-org:serviceId:DimmingService.0001_event HTTP/1.1\r\n
+DataChunk5              = NT:  upnp:event\r\nTIMEOUT:  Sec
+DataChunk6              = ond-300\r\nHOST:  10.192.204.79:61447\r\nCALLBACK:  <http://10.192.204.79:8
+DataChunk7              = 217/2ab3bfa7-31a5-4a9b-b229-171d3f89e103/urn:upnp-org:serviceId:DimmingService.0001>\r\nContent-Length: 0\r\n\r\n
+ParseExcessData     = ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 7
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a simple UNSUBSCRIBE request /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_20]
+DataChunk1              = UNSUBSCRIBE /_urn:upnp-org:serviceId:DimmingService.0001_event HTTP/1.1\r\nSID:  uu
+DataChunk2              = id:2ab3bfa7-31a5-4a9b-b229-171d3f89e103-urn:upnp-org:serviceId:DimmingServ
+DataChunk3              = ice.0001-1\r\nHOST:  10.192.204.79:61447\r\nContent-Length: 0\r\n\r\n
+ParseExcessData      = EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 3
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing 2 simple UNSUBSCRIBE requests /////
+///// Presence of excess data which is parsed /////
+///// No entity body in the request /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_21]
+DataChunk1              = UNSUBSCRIBE /_urn:upnp-org:serviceId:DimmingService.0001_event HTTP/1.1\r\nSID:  uu
+DataChunk2              = id:2ab3bfa7-31a5-4a9b-b229-171d3f89e103-urn:upnp-org:serviceId:DimmingServ
+DataChunk3              = ice.0001-1\r\nHOST:  10.192.204.79:61447\r\nContent-Length: 0\r\n\r\nUNSUBSCRIBE /_urn:upnp-org:serviceId:DimmingService.0001_event HTTP/1.1\r\nSID:  uu
+DataChunk4              = id:2ab3bfa7-31a5-4a9b-b229-171d3f89e103-urn:upnp-org:serviceId:DimmingServ
+DataChunk5              = ice.0001-1\r\nHOST:  10.192.204.79:61447\r\nContent-Length: 0\r\n\r\n
+ParseExcessData     = ETrue
+ExpectedRequests		= 2
+DataChunkCount		= 5
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple request /////
+///// Missing version /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_22]
+DataChunk1			= GET /index.html \r\nHost: www.cricinfo.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 1
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+///// Parsing a single simple request /////
+///// Missing / in version /////
+//////////////////////////////////////////////////////////////////////////////////////////
+[REQUEST_PARSER_TEST_23]
+DataChunk1			= GET /index.html HTTP1.1\r\nHost: www.cricinfo.com\r\nUser-Agent: UpnpMessageTest\r\nAccept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n\r\n
+ParseExcessData		= EFalse
+ExpectedRequests		= 1
+DataChunkCount		= 1
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+//////////////// ***** Response Composer Test ***** ////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple response /////
+///// Only 2 headers and no multiple values /////
+///// No parameters for the headers /////
+///////////////////////////////////////////////////////////////////////////////
+[RESPONSE_COMPOSER_TEST_1]
+ResponseStatusCode	= 200
+ResponseStatusText	= Ok
+NoOfHdrValPairs		= 3
+HeaderValuePair1		= Accept: text/xml
+HeaderValuePair2		= User-Agent: UpnpMessageTest
+HeaderValuePair3		= Content-Length: 0
+NoOfHdrParamValPairs	= 0
+ResponseBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple response /////
+///// 6 headers and no multiple values /////
+///// No parameters for the headers /////
+///////////////////////////////////////////////////////////////////////////////
+[RESPONSE_COMPOSER_TEST_2]
+ResponseStatusCode	= 200
+ResponseStatusText	= Ok
+NoOfHdrValPairs		= 6
+HeaderValuePair1		= Server: Apache/2.2.3
+HeaderValuePair2		= Accept-Ranges: bytes
+HeaderValuePair3		= Connection: close
+HeaderValuePair4		= Content-Type: text/html
+HeaderValuePair5		= Content-Encoding: gzip
+HeaderValuePair6		= Content-Length: 0
+NoOfHdrParamValPairs	= 0
+ResponseBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple response /////
+///// 5 headers and with multiple values /////
+///// Some headers have parameters /////
+///////////////////////////////////////////////////////////////////////////////
+[RESPONSE_COMPOSER_TEST_3]
+ResponseStatusCode	= 200
+ResponseStatusText	= Ok
+NoOfHdrValPairs		= 5
+HeaderValuePair1		= Server: Apache/2.2.3
+HeaderValuePair2		= Accept-Ranges: bytes
+HeaderValuePair3		= Connection: close
+HeaderValuePair4		= Content-Type: text/html
+HeaderValuePair5		= Content-Length: 0
+NoOfHdrParamValPairs	= 1
+HeaderParamValPair1	= Content-Type: charset=ISO-8859-1 @0
+ResponseBodyPresence	= EFalse
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Compose a simple response /////
+///// 5 headers and with multiple values /////
+///// Some headers have parameters /////
+///// Response has content-Length > 0 & a body/////
+///////////////////////////////////////////////////////////////////////////////
+[RESPONSE_COMPOSER_TEST_4]
+ResponseStatusCode	= 200
+ResponseStatusText	= Ok
+NoOfHdrValPairs		= 5
+HeaderValuePair1		= Server: Apache/2.2.3
+HeaderValuePair2		= Accept-Ranges: bytes
+HeaderValuePair3		= Connection: close
+HeaderValuePair4		= Content-Type: text/html
+HeaderValuePair5		= Content-Length: 1545
+NoOfHdrParamValPairs	= 1
+HeaderParamValPair1	= Content-Type: charset=ISO-8859-1 @0
+ResponseBodyPresence	= ETrue
+Body					= <?xml version="1.0" encoding="utf-8"?><!-- 	spec version order changed.--><scpd xmlns="urn:schemas-upnp-org:service-1-0">   <specVersion>      <minor>0</minor>      <major>1</major>   </specVersion>   <actionList>      <action>         <name>UpdateObject</name>         <argumentList>            <argument>               <name>ObjectID</name>               <direction>in</direction>               <relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable>            </argument>            <argument>               <name>CurrentTagValue</name>               <direction>in</direction>               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>            </argument>            <argument>               <name>NewTagValue</name>               <direction>in</direction>               <relatedStateVariable>A_ARG_TYPE_TagValueList</relatedStateVariable>            </argument>         </argumentList>      </action>   </actionList>   <serviceStateTable>      <stateVariable sendEvents="no">         <name>A_ARG_TYPE_TransferStatus</name>         <dataType>string</dataType>         <allowedValueList>            <allowedValue>COMPLETED</allowedValue>            <allowedValue>ERROR</allowedValue>            <allowedValue>IN_PROGRESS</allowedValue>            <allowedValue>STOPPED</allowedValue>         </allowedValueList>      </stateVariable>      <stateVariable sendEvents="no">         <name>A_ARG_TYPE_TransferTotal</name>         <dataType>string</dataType>      </stateVariable>   </serviceStateTable></scpd>
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+//////////////// ***** Codec Tests ***** ////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+///// Testing functionality with request headers /////
+///////////////////////////////////////////////////////////////////////////////
+[CODEC_TEST_1]
+RequestHeader		= ETrue
+NoOfHdrValPairs		= 10
+HeaderValuePair1		= NTS: ssdp:alive
+HeaderValuePair2		= NT: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair3		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair4		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
+HeaderValuePair5		= Timeout: Second-1800
+HeaderValuePair6		= MX: 300
+HeaderValuePair7		= SEQ: 4294
+HeaderValuePair8		= MAN: "ssdp:discover";ns=01;ns=;ns
+HeaderValuePair9		= SOAPACTION: "some:value:soap:09"
+HeaderValuePair10		= Callback: <123.234.345.456:7890><098.876.765.543.4321><102.394.587.601:2938>
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Testing functionality with response headers /////
+///////////////////////////////////////////////////////////////////////////////
+[CODEC_TEST_2]
+RequestHeader		= EFalse
+NoOfHdrValPairs		= 5
+HeaderValuePair1		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
+HeaderValuePair2		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair3		= Timeout: Second-1800
+HeaderValuePair4		= EXT:
+HeaderValuePair5		= SID: uuid:2ab3bfa7-31a5-4a9b-b229-171d3f89e103-urn:upnp-org:serviceId:DimmingService.0001-1
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Testing functionality with request headers /////
+///// These headers connot have more than one value /////
+///// Only the 1st occurance of header/value is considered /////
+///////////////////////////////////////////////////////////////////////////////
+[CODEC_TEST_3]
+RequestHeader		= ETrue
+NoOfHdrValPairs		= 18
+HeaderValuePair1		= NTS: ssdp:alive
+HeaderValuePair2		= NT: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair3		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair4		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
+HeaderValuePair5		= Timeout: infinite
+HeaderValuePair6		= MX: 300
+HeaderValuePair7		= SEQ: 4294
+HeaderValuePair8		= MAN: "ssdp:discover"
+HeaderValuePair9		= SOAPACTION: "some:value:soap:09"
+HeaderValuePair10		= NTS: ssdp:alive
+HeaderValuePair11		= NT: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc2
+HeaderValuePair12		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc2
+HeaderValuePair13		= Timeout: Second-1800
+HeaderValuePair14		= MX: 3002
+HeaderValuePair15		= SEQ: 42942
+HeaderValuePair16		= MAN: "ssdp:discover"
+HeaderValuePair17		= SOAPACTION: "some2:value2:soap2:092"
+HeaderValuePair18		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:2
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Testing functionality with response headers /////
+///// These headers connot have more than one value /////
+///// Only the 1st occurance of header/value is considered /////
+///////////////////////////////////////////////////////////////////////////////
+[CODEC_TEST_4]
+RequestHeader		= EFalse
+NoOfHdrValPairs		= 12
+HeaderValuePair1		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
+HeaderValuePair2		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair3		= Timeout: infinite
+HeaderValuePair4		= SID: uuid:2ab3bfa7-31a5-4a9b-b229-171d3f89e103-urn:upnp-org:serviceId:DimmingService.0001-2
+HeaderValuePair5		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:2
+HeaderValuePair6		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc2
+HeaderValuePair7		= Timeout: Second-1800
+HeaderValuePair8		= SID: uuid:2ab3bfa7-31a5-4a9b-b229-171d3f89e103-urn:upnp-org:serviceId:DimmingService.0001-1
+HeaderValuePair9		= Callback: 
+HeaderValuePair10		= MX: .5
+HeaderValuePair11		= SEQ: 
+HeaderValuePair12		= MAN: ;
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Testing functionality with request headers /////
+///////////////////////////////////////////////////////////////////////////////
+[CODEC_TEST_5]
+RequestHeader		= ETrue
+NoOfHdrValPairs		= 12
+HeaderValuePair1		= NTS: ssdp:alive
+HeaderValuePair2		= NT: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair3		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair4		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
+HeaderValuePair5		= Timeout: 1800
+HeaderValuePair6		= MX: 300
+HeaderValuePair7		= SEQ: 4294
+HeaderValuePair8		= Callback: 123.234.345.456:7890
+HeaderValuePair9		= SOAPACTION: some:value:soap:09
+HeaderValuePair10		= MAN: ssdp:discover
+HeaderValuePair11		= SID: uuid:2ab3bfa7-31a5-4a9b-b229-171d3f89e103-urn:upnp-org:serviceId:DimmingService.0001-2
+HeaderValuePair12		= EXT:
+
+
+///////////////////////////////////////////////////////////////////////////////
+///// Testing functionality with request headers /////
+///// These headers connot have more than one value /////
+///// Only 1st occurance of some header/value is considered /////
+///////////////////////////////////////////////////////////////////////////////
+[CODEC_TEST_6]
+RequestHeader		= ETrue
+NoOfHdrValPairs		= 20
+HeaderValuePair1		= NTS: ssdp:alive
+HeaderValuePair2		= NT: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair3		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc
+HeaderValuePair4		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
+HeaderValuePair5		= Timeout: -2147483647
+HeaderValuePair6		= MX: 300
+HeaderValuePair7		= SEQ: 4294
+HeaderValuePair8		= Callback: 123.234.345.456:7890
+HeaderValuePair9		= SOAPACTION: some:value:soap:09
+HeaderValuePair10		= NTS: ssdp:alive
+HeaderValuePair11		= NT: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc2
+HeaderValuePair12		= USN: uuid:0ad5fcb2-5546-42c1-bf8e-e7583a9247bc2
+HeaderValuePair13		= Timeout: 1800
+HeaderValuePair14		= MX: 3002
+HeaderValuePair15		= SEQ: 42942
+HeaderValuePair16		= Callback: 098.876.765.543.4321
+HeaderValuePair17		= SOAPACTION: some2:value2:soap2:092
+HeaderValuePair18		= ST: urn:schemas-upnp-org:device:InternetGatewayDevice:2
+HeaderValuePair19      = MAN: ssdp:discover
+HeaderValuePair20      = MAN: ssdp:discover2
+
+
+[TEST_COVERAGE]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_codec_tests.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,151 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	CODEC_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-001
+//! @SYMTestCaseDesc 	            Encode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the encode functionality for the following request headers:
+//!				                                    NTS, NT, USN, ST, Timeout, MX, SEQ, Callback, SoapAction, MAN
+//!				                                
+//! @SYMTestExpectedResults     It should be possible to set the values for these headers in the defined format.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!PanicCode=0 100 	upnpmessagetest CodecDecodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_1
+END_TESTCASE 	CODEC_TEST_1
+
+
+
+START_TESTCASE	CODEC_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-002
+//! @SYMTestCaseDesc 	            Encode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                
+//!				                                •	Test the encode functionality for the following request headers:
+//!				                                    NTS, NT, USN, ST, Timeout, MX, SEQ, Callback, SoapAction
+//!                                                •	Provide multiple values for the above headers.
+//!
+//! @SYMTestExpectedResults     It should not be possible to set multiple values for the mentioned headers.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest CodecDecodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_2
+END_TESTCASE 	CODEC_TEST_2
+
+
+
+START_TESTCASE	CODEC_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-003
+//! @SYMTestCaseDesc 	            Decode the response headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the decode functionality for the following response headers:
+//!				                                    USN, ST, Timeout, EXT, SID
+//!				                                
+//! @SYMTestExpectedResults     It should be possible to get the values for these headers.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest CodecDecodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_3
+END_TESTCASE 	CODEC_TEST_3
+
+
+
+START_TESTCASE	CODEC_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-004
+//! @SYMTestCaseDesc 	            Decode the response headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the decode functionality for the following response headers:
+//!				                                    USN, ST, Timeout, SID
+//!				                                •	The above headers have multiple values.
+//!    
+//! @SYMTestExpectedResults     Only the first value of the each of the above headers should be retrieved.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest CodecDecodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_4
+END_TESTCASE 	CODEC_TEST_4
+
+
+
+START_TESTCASE	CODEC_TEST_5
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-007
+//! @SYMTestCaseDesc 	            Decode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the decode functionality for the following request headers:
+//!				                                    NTS, NT, USN, ST, Timeout, MX, SEQ, Callback, SoapAction, MAN
+//!				                                
+//! @SYMTestExpectedResults     It should be possible to get the values for these headers.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest CodecEncodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_5
+END_TESTCASE 	CODEC_TEST_5
+
+
+
+START_TESTCASE	CODEC_TEST_6
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-008
+//! @SYMTestCaseDesc 	            Decode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the decode functionality for the following request headers:
+//!				                                    NTS, NT, USN, ST, Timeout, MX, SEQ, Callback, SoapAction
+//!				                                •	The above headers have multiple values.
+//!
+//! @SYMTestExpectedResults     Only the first value of the each of the above headers should be retrieved.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest CodecEncodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_6
+END_TESTCASE 	CODEC_TEST_6
+
+
+
+START_TESTCASE	TEST_COVERAGE
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-009
+//! @SYMTestCaseDesc 	            Encode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the encode functionality for the following request headers:
+//!				                                    MAN, ST, Timeout, MX, Callback, SoapAction
+//!
+//! @SYMTestExpectedResults     It should be possible to encode all of the above headers.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest CodecEncodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  TEST_COVERAGE
+END_TESTCASE 	TEST_COVERAGE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_codec_tests_oom.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,151 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	CODEC_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-001
+//! @SYMTestCaseDesc 	            Encode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the encode functionality for the following request headers:
+//!				                                    NTS, NT, USN, ST, Timeout, MX, SEQ, Callback, SoapAction, MAN
+//!				                                
+//! @SYMTestExpectedResults     It should be possible to set the values for these headers in the defined format.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM !PanicCode=0 100 	upnpmessagetest CodecDecodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_1
+END_TESTCASE 	CODEC_TEST_1
+
+
+
+START_TESTCASE	CODEC_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-002
+//! @SYMTestCaseDesc 	            Encode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                
+//!				                                •	Test the encode functionality for the following request headers:
+//!				                                    NTS, NT, USN, ST, Timeout, MX, SEQ, Callback, SoapAction
+//!                                                •	Provide multiple values for the above headers.
+//!
+//! @SYMTestExpectedResults     It should not be possible to set multiple values for the mentioned headers.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest CodecDecodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_2
+END_TESTCASE 	CODEC_TEST_2
+
+
+
+START_TESTCASE	CODEC_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-003
+//! @SYMTestCaseDesc 	            Decode the response headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the decode functionality for the following response headers:
+//!				                                    USN, ST, Timeout, EXT, SID
+//!				                                
+//! @SYMTestExpectedResults     It should be possible to get the values for these headers.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest CodecDecodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_3
+END_TESTCASE 	CODEC_TEST_3
+
+
+
+START_TESTCASE	CODEC_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-004
+//! @SYMTestCaseDesc 	            Decode the response headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the decode functionality for the following response headers:
+//!				                                    USN, ST, Timeout, SID
+//!				                                •	The above headers have multiple values.
+//!    
+//! @SYMTestExpectedResults     Only the first value of the each of the above headers should be retrieved.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest CodecDecodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_4
+END_TESTCASE 	CODEC_TEST_4
+
+
+
+START_TESTCASE	CODEC_TEST_5
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-007
+//! @SYMTestCaseDesc 	            Decode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the decode functionality for the following request headers:
+//!				                                    NTS, NT, USN, ST, Timeout, MX, SEQ, Callback, SoapAction, MAN
+//!				                                
+//! @SYMTestExpectedResults     It should be possible to get the values for these headers.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest CodecEncodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_5
+END_TESTCASE 	CODEC_TEST_5
+
+
+
+START_TESTCASE	CODEC_TEST_6
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-008
+//! @SYMTestCaseDesc 	            Decode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the decode functionality for the following request headers:
+//!				                                    NTS, NT, USN, ST, Timeout, MX, SEQ, Callback, SoapAction
+//!				                                •	The above headers have multiple values.
+//!
+//! @SYMTestExpectedResults     Only the first value of the each of the above headers should be retrieved.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest CodecEncodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  CODEC_TEST_6
+END_TESTCASE 	CODEC_TEST_6
+
+
+
+START_TESTCASE	TEST_COVERAGE
+//! @file			                            
+//! @SYMTestCaseID		            HTTP-POS-009
+//! @SYMTestCaseDesc 	            Encode the request headers.
+//! @SYMREQ						REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Test the encode functionality for the following request headers:
+//!				                                    MAN, ST, Timeout, MX, Callback, SoapAction
+//!
+//! @SYMTestExpectedResults     It should be possible to encode all of the above headers.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest CodecEncodeTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  TEST_COVERAGE
+END_TESTCASE 	TEST_COVERAGE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_composer_tests.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,208 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-14
+//! @SYMTestCaseDesc 	            Compose a simple GET request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple GET request.
+//!				                                •	Request has only 2 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No request entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_1
+END_TESTCASE 	REQUEST_COMPOSER_TEST_1
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-15
+//! @SYMTestCaseDesc 	            Composer a simple GET request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple GET request.
+//!				                                •	Request has 7 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No request entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_2
+END_TESTCASE 	REQUEST_COMPOSER_TEST_2
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-16
+//! @SYMTestCaseDesc 	            Composer a simple GET request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple GET request.
+//!				                                •	Request has 7 headers.
+//!				                                •	Some headers have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No request entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//!
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_3
+END_TESTCASE 	REQUEST_COMPOSER_TEST_3
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-17
+//! @SYMTestCaseDesc 	            Composer a simple GET request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple GET request.
+//!				                                •	Request has 7 headers.
+//!				                                •	Some headers have multiple values.
+//!                                                •	Some headers have parameters.
+//!                                                •	No request entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_4
+END_TESTCASE 	REQUEST_COMPOSER_TEST_4
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_5
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-18
+//! @SYMTestCaseDesc 	            Composer a simple POST request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		    
+//!			                                    •	Compose a simple POST request.	
+//!				                                •	Request has 7 headers.
+//!				                                •	Some headers have multiple values.
+//!                                                •	Some headers have parameters.
+//!                                                •	Request has an entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_5
+END_TESTCASE 	REQUEST_COMPOSER_TEST_5
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_6
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-19
+//! @SYMTestCaseDesc 	            Composer a simple M-SEARCH request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple M-SEARCH request.
+//!				                                •	No request entity body.
+//!				
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_6
+END_TESTCASE 	REQUEST_COMPOSER_TEST_6
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_7
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-20
+//! @SYMTestCaseDesc 	            Composer a simple NOTIFY request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple NOTIFY request.
+//!				                                •	No request entity body.
+//!				        
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_7
+END_TESTCASE 	REQUEST_COMPOSER_TEST_7
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_8
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-21
+//! @SYMTestCaseDesc 	            Composer a simple SUBSCRIBE request
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple SUBSCRIBE request.
+//!				                                •	No request entity body.
+//!				
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_8
+END_TESTCASE 	REQUEST_COMPOSER_TEST_8
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_9
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-22
+//! @SYMTestCaseDesc 	            Composer a simple UNSUBSCRIBE request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple UNSUBSCRIBE request.
+//!				                                •	No request entity body.
+//!				
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_9
+END_TESTCASE 	REQUEST_COMPOSER_TEST_9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_composer_tests_oom.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,208 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-14
+//! @SYMTestCaseDesc 	            Compose a simple GET request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple GET request.
+//!				                                •	Request has only 2 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No request entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_1
+END_TESTCASE 	REQUEST_COMPOSER_TEST_1
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-15
+//! @SYMTestCaseDesc 	            Composer a simple GET request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple GET request.
+//!				                                •	Request has 7 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No request entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_2
+END_TESTCASE 	REQUEST_COMPOSER_TEST_2
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-16
+//! @SYMTestCaseDesc 	            Composer a simple GET request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple GET request.
+//!				                                •	Request has 7 headers.
+//!				                                •	Some headers have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No request entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//!
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_3
+END_TESTCASE 	REQUEST_COMPOSER_TEST_3
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-17
+//! @SYMTestCaseDesc 	            Composer a simple GET request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple GET request.
+//!				                                •	Request has 7 headers.
+//!				                                •	Some headers have multiple values.
+//!                                                •	Some headers have parameters.
+//!                                                •	No request entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_4
+END_TESTCASE 	REQUEST_COMPOSER_TEST_4
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_5
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-18
+//! @SYMTestCaseDesc 	            Composer a simple POST request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		    
+//!			                                    •	Compose a simple POST request.	
+//!				                                •	Request has 7 headers.
+//!				                                •	Some headers have multiple values.
+//!                                                •	Some headers have parameters.
+//!                                                •	Request has an entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_5
+END_TESTCASE 	REQUEST_COMPOSER_TEST_5
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_6
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-19
+//! @SYMTestCaseDesc 	            Composer a simple M-SEARCH request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple M-SEARCH request.
+//!				                                •	No request entity body.
+//!				
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_6
+END_TESTCASE 	REQUEST_COMPOSER_TEST_6
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_7
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-20
+//! @SYMTestCaseDesc 	            Composer a simple NOTIFY request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple NOTIFY request.
+//!				                                •	No request entity body.
+//!				        
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_7
+END_TESTCASE 	REQUEST_COMPOSER_TEST_7
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_8
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-21
+//! @SYMTestCaseDesc 	            Composer a simple SUBSCRIBE request
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple SUBSCRIBE request.
+//!				                                •	No request entity body.
+//!				
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_8
+END_TESTCASE 	REQUEST_COMPOSER_TEST_8
+
+
+
+START_TESTCASE	REQUEST_COMPOSER_TEST_9
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-22
+//! @SYMTestCaseDesc 	            Composer a simple UNSUBSCRIBE request.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple UNSUBSCRIBE request.
+//!				                                •	No request entity body.
+//!				
+//! @SYMTestExpectedResults     The composer successfully composes the request using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedrequests.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_COMPOSER_TEST_9
+END_TESTCASE 	REQUEST_COMPOSER_TEST_9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_1.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,247 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-23
+//! @SYMTestCaseDesc 	            Parsing a simple GET request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple GET request.
+//!				                                •	Request has no excess data.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_1
+END_TESTCASE 	REQUEST_PARSER_TEST_1
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-24
+//! @SYMTestCaseDesc 	            Parsing a simple GET request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple GET request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request and returns the excess data.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_2
+END_TESTCASE 	REQUEST_PARSER_TEST_2
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-25
+//! @SYMTestCaseDesc 	            Parsing 2 requests.
+//! @SYMREQ			   			REQ10743, REQ10744 
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 requests, the 1st being GET and 2nd being POST.
+//!				                                •	2nd request appears as excess data of the 1st request.
+//!				                                •	2nd request has a body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_3
+END_TESTCASE 	REQUEST_PARSER_TEST_3
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-26
+//! @SYMTestCaseDesc 	            Parsing a POST request that has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a POST request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	Request has a body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request and returns the excess data.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_4
+END_TESTCASE 	REQUEST_PARSER_TEST_4
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_5
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-27
+//! @SYMTestCaseDesc 	            Parsing a GET request that has a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a GET request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	Request has a chunked body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt.   
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_5
+END_TESTCASE 	REQUEST_PARSER_TEST_5
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_6
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-28
+//! @SYMTestCaseDesc 	            Parsing a GET request that has a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a GET request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	Request has a Content-Length header.
+//!                                                •	Request has a body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_6
+END_TESTCASE 	REQUEST_PARSER_TEST_6
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_7
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-29
+//! @SYMTestCaseDesc 	            Parsing 2 GET requests one of which has a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 GET requests.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	1st request has a body.
+//!                                                •	1st request has a Content-Length header.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt while parsing the 1st request 
+//!                                                but completes successfully for the 2nd valid request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_7
+END_TESTCASE 	REQUEST_PARSER_TEST_7
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_8
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-30
+//! @SYMTestCaseDesc 	            Parsing 2 GET requests one of which has a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 GET requests.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	1st request has a chunked body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt 
+//!                                                while parsing the 1st request but completes successfully for the 2nd valid request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_8
+END_TESTCASE 	REQUEST_PARSER_TEST_8
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_9
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-31
+//! @SYMTestCaseDesc 	            Parsing 2 GET requests both of which have a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 GET requests.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	1st request has a chunked body.
+//!                                                •	2nd request has the Content-Length header.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt while parsing both the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_9
+END_TESTCASE 	REQUEST_PARSER_TEST_9
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_10
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-32
+//! @SYMTestCaseDesc 	            Parsing 2 GET requests both of which have a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 GET requests. 
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	1st request has the Content-Length header.
+//!                                                •	2nd request has a chunked body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt while parsing both the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_10
+END_TESTCASE 	REQUEST_PARSER_TEST_10
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_11
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-33
+//! @SYMTestCaseDesc 	            Parsing a simple M-SEARCH request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple M-SEARCH request.
+//!				                                •	Request has no excess data.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_11
+END_TESTCASE 	REQUEST_PARSER_TEST_11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_1_oom.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,267 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-23
+//! @SYMTestCaseDesc 	            Parsing a simple GET request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple GET request.
+//!				                                •	Request has no excess data.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_1
+END_TESTCASE 	REQUEST_PARSER_TEST_1
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-24
+//! @SYMTestCaseDesc 	            Parsing a simple GET request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple GET request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request and returns the excess data.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_2
+END_TESTCASE 	REQUEST_PARSER_TEST_2
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-25
+//! @SYMTestCaseDesc 	            Parsing 2 requests.
+//! @SYMREQ			   			REQ10743, REQ10744 
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 requests, the 1st being GET and 2nd being POST.
+//!				                                •	2nd request appears as excess data of the 1st request.
+//!				                                •	2nd request has a body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_3
+END_TESTCASE 	REQUEST_PARSER_TEST_3
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-26
+//! @SYMTestCaseDesc 	            Parsing a POST request that has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a POST request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	Request has a body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request and returns the excess data.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_4
+END_TESTCASE 	REQUEST_PARSER_TEST_4
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_5
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-27
+//! @SYMTestCaseDesc 	            Parsing a GET request that has a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a GET request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	Request has a chunked body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt.   
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_5
+END_TESTCASE 	REQUEST_PARSER_TEST_5
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_6
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-28
+//! @SYMTestCaseDesc 	            Parsing a GET request that has a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a GET request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	Request has a Content-Length header.
+//!                                                •	Request has a body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_6
+END_TESTCASE 	REQUEST_PARSER_TEST_6
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_7
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-29
+//! @SYMTestCaseDesc 	            Parsing 2 GET requests one of which has a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 GET requests.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	1st request has a body.
+//!                                                •	1st request has a Content-Length header.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt while parsing the 1st request 
+//!                                                but completes successfully for the 2nd valid request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_7
+END_TESTCASE 	REQUEST_PARSER_TEST_7
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_8
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-30
+//! @SYMTestCaseDesc 	            Parsing 2 GET requests one of which has a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 GET requests.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	1st request has a chunked body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt 
+//!                                                while parsing the 1st request but completes successfully for the 2nd valid request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_8
+END_TESTCASE 	REQUEST_PARSER_TEST_8
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_9
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-31
+//! @SYMTestCaseDesc 	            Parsing 2 GET requests both of which have a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 GET requests.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	1st request has a chunked body.
+//!                                                •	2nd request has the Content-Length header.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt while parsing both the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_9
+END_TESTCASE 	REQUEST_PARSER_TEST_9
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_10
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-32
+//! @SYMTestCaseDesc 	            Parsing 2 GET requests both of which have a body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 GET requests. 
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	1st request has the Content-Length header.
+//!                                                •	2nd request has a chunked body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     Since its invalid for a GET request to have a body, the parser returns with KErrCorrupt while parsing both the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_10
+END_TESTCASE 	REQUEST_PARSER_TEST_10
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_11
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-33
+//! @SYMTestCaseDesc 	            Parsing a simple M-SEARCH request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple M-SEARCH request.
+//!				                                •	Request has no excess data.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_11
+END_TESTCASE 	REQUEST_PARSER_TEST_11
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_12
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-34
+//! @SYMTestCaseDesc 	            Parsing 2 simple M-SEARCH requests.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple M-SEARCH request.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_12
+END_TESTCASE 	REQUEST_PARSER_TEST_12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_2.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,121 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_12
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-34
+//! @SYMTestCaseDesc 	            Parsing 2 simple M-SEARCH requests.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple M-SEARCH request.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_12
+END_TESTCASE 	REQUEST_PARSER_TEST_12
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_13
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-35
+//! @SYMTestCaseDesc 	            Parsing a simple M-SEARCH request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple M-SEARCH request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_13
+END_TESTCASE 	REQUEST_PARSER_TEST_13
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_14
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-36
+//! @SYMTestCaseDesc 	            Parsing a M-SEARCH request that has a body
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple M-SEARCH request.
+//!				                                •	Request has no excess data.
+//!				                                •	Request has a body.
+//!                                                 •	Request data appears in a single chunk. 
+//!   
+//! @SYMTestExpectedResults     Since it is invalid for M-SEARCH request to have a body, the parser returns with KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_14
+END_TESTCASE 	REQUEST_PARSER_TEST_14
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_15
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-37
+//! @SYMTestCaseDesc 	            Parsing a NOTIFY request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple NOTIFY request.
+//!				                                •	Request has no excess data.
+//!				                                •	Request has no body.
+//!                                                •	Request data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_15
+END_TESTCASE 	REQUEST_PARSER_TEST_15
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_16
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-38
+//! @SYMTestCaseDesc 	            Parsing a NOTIFY request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple NOTIFY request.
+//!				                                •	Request has no excess data.
+//!				                                •	Request has no body.
+//!                                                •	Request data appears in a multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_16
+END_TESTCASE 	REQUEST_PARSER_TEST_16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_2_oom.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,121 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_13
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-35
+//! @SYMTestCaseDesc 	            Parsing a simple M-SEARCH request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple M-SEARCH request.
+//!				                                •	Request has excess data which is not parsed.
+//!				                                •	No request entity body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_13
+END_TESTCASE 	REQUEST_PARSER_TEST_13
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_14
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-36
+//! @SYMTestCaseDesc 	            Parsing a M-SEARCH request that has a body
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple M-SEARCH request.
+//!				                                •	Request has no excess data.
+//!				                                •	Request has a body.
+//!                                                 •	Request data appears in a single chunk. 
+//!   
+//! @SYMTestExpectedResults     Since it is invalid for M-SEARCH request to have a body, the parser returns with KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_14
+END_TESTCASE 	REQUEST_PARSER_TEST_14
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_15
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-37
+//! @SYMTestCaseDesc 	            Parsing a NOTIFY request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple NOTIFY request.
+//!				                                •	Request has no excess data.
+//!				                                •	Request has no body.
+//!                                                •	Request data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_15
+END_TESTCASE 	REQUEST_PARSER_TEST_15
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_16
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-38
+//! @SYMTestCaseDesc 	            Parsing a NOTIFY request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple NOTIFY request.
+//!				                                •	Request has no excess data.
+//!				                                •	Request has no body.
+//!                                                •	Request data appears in a multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_16
+END_TESTCASE 	REQUEST_PARSER_TEST_16
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_17
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-39
+//! @SYMTestCaseDesc 	            Parsing 2 NOTIFY request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		            
+//!				                                •	Parsing 2 simple NOTIFY request.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	Requests have no body.
+//!                                                •	Request data appears in a multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_17
+END_TESTCASE 	REQUEST_PARSER_TEST_17
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_3.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,122 @@
+/ UPNPMESSAGETEST_REQUEST_PARSER_TESTS_3.SCRIPT
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_17
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-39
+//! @SYMTestCaseDesc 	            Parsing 2 NOTIFY request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		            
+//!				                                •	Parsing 2 simple NOTIFY request.
+//!				                                •	2nd request appears as excess data of the 1st.
+//!				                                •	Requests have no body.
+//!                                                •	Request data appears in a multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_17
+END_TESTCASE 	REQUEST_PARSER_TEST_17
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_18
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-40
+//! @SYMTestCaseDesc 	            Parsing a SUBSCRIBE request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple SUBSCRIBE request.
+//!				                                •	Request has no excess data.
+//!				                                •	Request has no body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_18
+END_TESTCASE 	REQUEST_PARSER_TEST_18
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_19
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-41
+//! @SYMTestCaseDesc 	            Parsing 2 SUBSCRIBE requests.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple SUBSCRIBE request.
+//!				                                •	2nd request appears as the excess data of the 1st.
+//!				                                •	Requests have no body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_19
+END_TESTCASE 	REQUEST_PARSER_TEST_19
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_20
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-42
+//! @SYMTestCaseDesc 	            Parsing a UNSUBSCRIBE request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple UNSUBSCRIBE request.       
+//!				                                •	Request has no excess data.
+//!				                                •	Request has no body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_20
+END_TESTCASE 	REQUEST_PARSER_TEST_20
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_21
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-43
+//! @SYMTestCaseDesc 	            Parsing 2 UNSUBSCRIBE requests.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		    
+//!				                                •	Parsing a simple UNSUBSCRIBE request. 
+//!				                                •	2nd request appears as the excess data of the 1st.
+//!				                                •	Requests have no body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_21
+END_TESTCASE 	REQUEST_PARSER_TEST_21
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_request_parser_tests_3_oom.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,137 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_18
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-40
+//! @SYMTestCaseDesc 	            Parsing a SUBSCRIBE request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple SUBSCRIBE request.
+//!				                                •	Request has no excess data.
+//!				                                •	Request has no body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_18
+END_TESTCASE 	REQUEST_PARSER_TEST_18
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_19
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-41
+//! @SYMTestCaseDesc 	            Parsing 2 SUBSCRIBE requests.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple SUBSCRIBE request.
+//!				                                •	2nd request appears as the excess data of the 1st.
+//!				                                •	Requests have no body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_19
+END_TESTCASE 	REQUEST_PARSER_TEST_19
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_20
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-42
+//! @SYMTestCaseDesc 	            Parsing a UNSUBSCRIBE request.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple UNSUBSCRIBE request.       
+//!				                                •	Request has no excess data.
+//!				                                •	Request has no body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the request.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_20
+END_TESTCASE 	REQUEST_PARSER_TEST_20
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_21
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-43
+//! @SYMTestCaseDesc 	            Parsing 2 UNSUBSCRIBE requests.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		    
+//!				                                •	Parsing a simple UNSUBSCRIBE request. 
+//!				                                •	2nd request appears as the excess data of the 1st.
+//!				                                •	Requests have no body.
+//!                                                •	Request data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the requests.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_21
+END_TESTCASE 	REQUEST_PARSER_TEST_21
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_22
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-48
+//! @SYMTestCaseDesc 	            Parsing GET request that has no version
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		    
+//!				                                •	Parsing a simple GET request. 
+//!				                                •	Request does not have a version.
+//!
+//! @SYMTestExpectedResults     The parser leaves with KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_22
+END_TESTCASE 	REQUEST_PARSER_TEST_22
+
+
+
+START_TESTCASE	REQUEST_PARSER_TEST_23
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-49
+//! @SYMTestCaseDesc 	            Parsing GET request that has no '/' in version
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		    
+//!				                                •	Parsing a simple GET request. 
+//!				                                •	Request does not have a '/' in version.
+//!
+//! @SYMTestExpectedResults     The parser leaves with KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest RequestParserTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  REQUEST_PARSER_TEST_23
+END_TESTCASE 	REQUEST_PARSER_TEST_23
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_response_composer_tests.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,109 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	RESPONSE_COMPOSER_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-44
+//! @SYMTestCaseDesc 	            Composer a simple response.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple response.
+//!				                                •	Response has only 2 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No response entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the response using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedresponses.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_COMPOSER_TEST_1
+END_TESTCASE 	RESPONSE_COMPOSER_TEST_1
+
+
+
+START_TESTCASE	RESPONSE_COMPOSER_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-45
+//! @SYMTestCaseDesc 	            Composer a simple response.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		    
+//!				                                •	Compose a simple response.
+//!				                                •	Response has 6 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No response entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the response using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedresponses.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_COMPOSER_TEST_2
+END_TESTCASE 	RESPONSE_COMPOSER_TEST_2
+
+
+
+START_TESTCASE	RESPONSE_COMPOSER_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-46
+//! @SYMTestCaseDesc 	            Composer a simple response.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple response.
+//!				                                •	Response has 5 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Some have parameters.
+//!                                                •	No response entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the response using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedresponses.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_COMPOSER_TEST_3
+END_TESTCASE 	RESPONSE_COMPOSER_TEST_3
+
+
+
+START_TESTCASE	RESPONSE_COMPOSER_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-47
+//! @SYMTestCaseDesc 	            Composer a simple response.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple response.
+//!				                                •	Response has 5 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Some have parameters.
+//!                                                •	Response has a body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the response using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedresponses.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_COMPOSER_TEST_4
+END_TESTCASE 	RESPONSE_COMPOSER_TEST_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_response_composer_tests_oom.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,109 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	RESPONSE_COMPOSER_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-44
+//! @SYMTestCaseDesc 	            Composer a simple response.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple response.
+//!				                                •	Response has only 2 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No response entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the response using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedresponses.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_COMPOSER_TEST_1
+END_TESTCASE 	RESPONSE_COMPOSER_TEST_1
+
+
+
+START_TESTCASE	RESPONSE_COMPOSER_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-45
+//! @SYMTestCaseDesc 	            Composer a simple response.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		    
+//!				                                •	Compose a simple response.
+//!				                                •	Response has 6 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Headers do not have parameters.
+//!                                                •	No response entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the response using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedresponses.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_COMPOSER_TEST_2
+END_TESTCASE 	RESPONSE_COMPOSER_TEST_2
+
+
+
+START_TESTCASE	RESPONSE_COMPOSER_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-46
+//! @SYMTestCaseDesc 	            Composer a simple response.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple response.
+//!				                                •	Response has 5 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Some have parameters.
+//!                                                •	No response entity body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the response using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedresponses.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_COMPOSER_TEST_3
+END_TESTCASE 	RESPONSE_COMPOSER_TEST_3
+
+
+
+START_TESTCASE	RESPONSE_COMPOSER_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-47
+//! @SYMTestCaseDesc 	            Composer a simple response.
+//! @SYMREQ						REQ10742, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Compose a simple response.
+//!				                                •	Response has 5 headers.
+//!				                                •	Headers do not have multiple values.
+//!                                                •	Some have parameters.
+//!                                                •	Response has a body.
+//!
+//! @SYMTestExpectedResults     The composer successfully composes the response using the provided data.
+//!                                                The test F/W writes the composed request to epoc32/winscw/c/logs/UpnpMessageTestLogs\composedresponses.dump
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseComposerTest z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_COMPOSER_TEST_4
+END_TESTCASE 	RESPONSE_COMPOSER_TEST_4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_response_parser_tests.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,333 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-001
+//! @SYMTestCaseDesc                Parsing a simple response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	Response has no excess data.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_1
+END_TESTCASE 	RESPONSE_PARSER_TEST_1
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-002
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	2nd response is present as excess data of the 1st response. 
+//!				                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_2
+END_TESTCASE 	RESPONSE_PARSER_TEST_2
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-003
+//! @SYMTestCaseDesc 	            Parsing a simple response that has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has a chunked body.
+//!				                                •	No excess data in the response.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_3
+END_TESTCASE 	RESPONSE_PARSER_TEST_3
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-004
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses that have a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	Both responses have chunked body.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!                                                •	Response data appears in a single chunk.
+//!         
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_4
+END_TESTCASE 	RESPONSE_PARSER_TEST_4
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_5
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-005
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses one of which has the Content-Length header and the other has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	1st response has Content-Length and the 2nd has a chunked body.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_5
+END_TESTCASE 	RESPONSE_PARSER_TEST_5
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_6
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-006
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses one of which has the Content-Length header and the other has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	1st response has a chunked body and the 2nd has Content-Length.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_6
+END_TESTCASE 	RESPONSE_PARSER_TEST_6
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_7
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-007
+//! @SYMTestCaseDesc 	            Parsing a simple response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has no excess data.
+//!				                                •	Response data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_7
+END_TESTCASE 	RESPONSE_PARSER_TEST_7
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_8
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-008
+//! @SYMTestCaseDesc 	            Parsing a simple response that has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has no excess data.
+//!				                                •	Response has a chunked body.
+//!                                                •	Response data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_8
+END_TESTCASE 	RESPONSE_PARSER_TEST_8
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_9
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-009
+//! @SYMTestCaseDesc 	            Parsing a simple response where the entity body appears in multiple chunks.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has no excess data.
+//!				                                •	Entity body appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_9
+END_TESTCASE 	RESPONSE_PARSER_TEST_9
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_10
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-10
+//! @SYMTestCaseDesc 	            Parsing a simple response where the entity body appears in multiple chunks. The response has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has no excess data.
+//!				                                •	Response has a chunked body.
+//!                                                •	Entity body appears in multiple chunks.    
+//! 
+//! @SYMTestExpectedResults     
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_10
+END_TESTCASE 	RESPONSE_PARSER_TEST_10
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_11
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-11
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!				                                •	Response data appears in a multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_11
+END_TESTCASE 	RESPONSE_PARSER_TEST_11
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_12
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-12
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses that have a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!				                                •	Response data appears in a multiple chunks.
+//!                                                •	Both responses have chunked body.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_12
+END_TESTCASE 	RESPONSE_PARSER_TEST_12
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_13
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-13
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses one of which has the Content-Length header and the other has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	1st response has Content-Length and the 2nd has a chunked body.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!                                                •	Response data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_13
+END_TESTCASE 	RESPONSE_PARSER_TEST_13
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_14
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-001
+//! @SYMTestCaseDesc                Parsing a simple response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	Response has no excess data.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser returns KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_18
+END_TESTCASE 	RESPONSE_PARSER_TEST_14
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_15
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-001
+//! @SYMTestCaseDesc                Parsing a simple response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	Response has no excess data.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser returns KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_19
+END_TESTCASE 	RESPONSE_PARSER_TEST_15
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_16
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-001
+//! @SYMTestCaseDesc                Parsing a simple response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	Response has no excess data.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser returns KErrCorrupt.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_20
+END_TESTCASE 	RESPONSE_PARSER_TEST_16
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/data/upnpmessagetest_response_parser_tests_oom.script	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,348 @@
+// 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:
+// Script file for HTTP Integration Test.
+// @internalAll
+// 
+//
+
+PRINT UPNP_MESSAGE_TESTS
+
+// Load the test
+LOAD_SUITE upnpmessagetest
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_1
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-001
+//! @SYMTestCaseDesc                Parsing a simple response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	Response has no excess data.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_1
+END_TESTCASE 	RESPONSE_PARSER_TEST_1
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_2
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-002
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	2nd response is present as excess data of the 1st response. 
+//!				                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_2
+END_TESTCASE 	RESPONSE_PARSER_TEST_2
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_3
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-003
+//! @SYMTestCaseDesc 	            Parsing a simple response that has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has a chunked body.
+//!				                                •	No excess data in the response.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_3
+END_TESTCASE 	RESPONSE_PARSER_TEST_3
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_4
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-004
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses that have a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	Both responses have chunked body.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!                                                •	Response data appears in a single chunk.
+//!         
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_4
+END_TESTCASE 	RESPONSE_PARSER_TEST_4
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_5
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-005
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses one of which has the Content-Length header and the other has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	1st response has Content-Length and the 2nd has a chunked body.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_5
+END_TESTCASE 	RESPONSE_PARSER_TEST_5
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_6
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-006
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses one of which has the Content-Length header and the other has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	1st response has a chunked body and the 2nd has Content-Length.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!                                                •	Response data appears in a single chunk.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_6
+END_TESTCASE 	RESPONSE_PARSER_TEST_6
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_7
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-007
+//! @SYMTestCaseDesc 	            Parsing a simple response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has no excess data.
+//!				                                •	Response data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_7
+END_TESTCASE 	RESPONSE_PARSER_TEST_7
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_8
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-008
+//! @SYMTestCaseDesc 	            Parsing a simple response that has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has no excess data.
+//!				                                •	Response has a chunked body.
+//!                                                •	Response data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_8
+END_TESTCASE 	RESPONSE_PARSER_TEST_8
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_9
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-009
+//! @SYMTestCaseDesc 	            Parsing a simple response where the entity body appears in multiple chunks.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has no excess data.
+//!				                                •	Entity body appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_9
+END_TESTCASE 	RESPONSE_PARSER_TEST_9
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_10
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-10
+//! @SYMTestCaseDesc 	            Parsing a simple response where the entity body appears in multiple chunks. The response has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!				                                •	Response has no excess data.
+//!				                                •	Response has a chunked body.
+//!                                                •	Entity body appears in multiple chunks.    
+//! 
+//! @SYMTestExpectedResults     
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_10
+END_TESTCASE 	RESPONSE_PARSER_TEST_10
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_11
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-11
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!				                                •	Response data appears in a multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_11
+END_TESTCASE 	RESPONSE_PARSER_TEST_11
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_12
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-12
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses that have a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!				                                •	Response data appears in a multiple chunks.
+//!                                                •	Both responses have chunked body.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_12
+END_TESTCASE 	RESPONSE_PARSER_TEST_12
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_13
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-13
+//! @SYMTestCaseDesc 	            Parsing 2 simple responses one of which has the Content-Length header and the other has a chunked body.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing 2 simple responses.
+//!				                                •	1st response has Content-Length and the 2nd has a chunked body.
+//!				                                •	2nd response is present as excess data of the 1st response.
+//!                                                •	Response data appears in multiple chunks.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_13
+END_TESTCASE 	RESPONSE_PARSER_TEST_13
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_14
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-050
+//! @SYMTestCaseDesc                Parsing 100-Continue response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	Response has status code 100.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the start line, headers and body.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_14
+END_TESTCASE 	RESPONSE_PARSER_TEST_14
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_15
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-NEG-051
+//! @SYMTestCaseDesc                Parsing 100-Continue response.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	CResponse object will not be provided to the parser.
+//!
+//! @SYMTestExpectedResults     The parser panics with TUPnPMessagePanic::EMissingResponse.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM !PanicCode=3 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_15
+END_TESTCASE 	RESPONSE_PARSER_TEST_15
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_16
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-52
+//! @SYMTestCaseDesc                Parsing response with HTTP/1.0.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	HTTP version 1.0.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the response.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_16
+END_TESTCASE 	RESPONSE_PARSER_TEST_16
+
+
+
+START_TESTCASE	RESPONSE_PARSER_TEST_17
+//! @file			                            
+//! @SYMTestCaseID		            UPnPMessage-POS-53
+//! @SYMTestCaseDesc                Parsing response with HTTP/0.1.
+//! @SYMREQ						REQ10743, REQ10744
+//! @SYMTestStatus 		            Implemented
+//! @SYMTestPriority 		            Critical
+//! @SYMTestActions 		
+//!				                                •	Parsing a simple response.
+//!                                                •	HTTP version 0.1.
+//!
+//! @SYMTestExpectedResults     The parser successfully parses the response.
+//! @SYMTestType 		                UT
+RUN_TEST_STEP 	!OOM 100 	upnpmessagetest ResponseParserTest	z:\upnp\upnpmessagetest\ini\upnpmessagetest.ini  RESPONSE_PARSER_TEST_17
+END_TESTCASE 	RESPONSE_PARSER_TEST_17
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+// 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:
+//
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+PRJ_TESTEXPORTS
+../data/upnpmessagetest_codec_tests.script						z:/upnp/upnpmessagetest/scripts/upnpmessagetest_codec_tests.script
+../data/upnpmessagetest_request_composer_tests.script			z:/upnp/upnpmessagetest/scripts/upnpmessagetest_request_composer_tests.script
+../data/upnpmessagetest_request_parser_tests_1.script			z:/upnp/upnpmessagetest/scripts/upnpmessagetest_request_parser_tests_1.script
+../data/upnpmessagetest_request_parser_tests_2.script			z:/upnp/upnpmessagetest/scripts/upnpmessagetest_request_parser_tests_2.script
+../data/upnpmessagetest_request_parser_tests_3.script			z:/upnp/upnpmessagetest/scripts/upnpmessagetest_request_parser_tests_3.script
+../data/upnpmessagetest_response_composer_tests.script			z:/upnp/upnpmessagetest/scripts/upnpmessagetest_response_composer_tests.script
+../data/upnpmessagetest_response_parser_tests.script			z:/upnp/upnpmessagetest/scripts/upnpmessagetest_response_parser_tests.script
+
+../data/upnpmessagetest_codec_tests_oom.script					z:/upnp/upnpmessagetest/scripts/upnpmessagetest_codec_tests_oom.script
+../data/upnpmessagetest_request_composer_tests_oom.script		z:/upnp/upnpmessagetest/scripts/upnpmessagetest_request_composer_tests_oom.script
+../data/upnpmessagetest_request_parser_tests_1_oom.script		z:/upnp/upnpmessagetest/scripts/upnpmessagetest_request_parser_tests_1_oom.script
+../data/upnpmessagetest_request_parser_tests_2_oom.script		z:/upnp/upnpmessagetest/scripts/uupnpmessagetest_request_parser_tests_2_oom.script
+../data/upnpmessagetest_request_parser_tests_3_oom.script		z:/upnp/upnpmessagetest/scripts/uupnpmessagetest_request_parser_tests_3_oom.script
+../data/upnpmessagetest_response_composer_tests_oom.script		z:/upnp/upnpmessagetest/scripts/upnpmessagetest_response_composer_tests_oom.script
+../data/upnpmessagetest_response_parser_tests_oom.script		z:/upnp/upnpmessagetest/scripts/upnpmessagetest_response_parser_tests_oom.script
+
+../data/upnpmessagetest.ini				z:/upnp/upnpmessagetest/ini/upnpmessagetest.ini
+
+upnpmessagetest.iby						/epoc32/rom/include/upnpmessagetest.iby
+
+PRJ_TESTMMPFILES
+upnpmessagetest.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/group/upnpmessagetest.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -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:
+*
+*/
+
+#ifndef __UPNPMESSAGETEST_IBY__
+#define __UPNPMESSAGETEST_IBY__
+
+#include <testexecute.iby>
+
+file=ABI_DIR\BUILD_DIR\upnpmessagetest.exe	 System\Programs\upnpmessagetest.exe
+
+// The ini files for the system
+data=\epoc32\data\z\upnp\upnpmessagetest\ini\upnpmessagetest.ini	upnp\upnpmessagetest\ini\upnpmessagetest.ini
+
+//The script files for the system
+data=\epoc32\data\z\upnp\upnpmessagetest\scripts\upnpmessagetest_codec_tests.script upnp\upnpmessagetest\scripts\upnpmessagetest_codec_tests.script
+data=\epoc32\data\z\upnp\upnpmessagetest\scripts\upnpmessagetest_request_composer_tests.script upnp\upnpmessagetest\scripts\upnpmessagetest_request_composer_tests.script
+data=\epoc32\data\z\upnp\upnpmessagetest\scripts\upnpmessagetest_request_parser_tests_1.script upnp\upnpmessagetest\scripts\upnpmessagetest_request_parser_tests_1.script
+data=\epoc32\data\z\upnp\upnpmessagetest\scripts\upnpmessagetest_request_parser_tests_2.script upnp\upnpmessagetest\scripts\upnpmessagetest_request_parser_tests_2.script
+data=\epoc32\data\z\upnp\upnpmessagetest\scripts\upnpmessagetest_request_parser_tests_3.script upnp\upnpmessagetest\scripts\upnpmessagetest_request_parser_tests_3.script
+data=\epoc32\data\z\upnp\upnpmessagetest\scripts\upnpmessagetest_response_composer_tests.script upnp\upnpmessagetest\scripts\upnpmessagetest_response_composer_tests.script
+data=\epoc32\data\z\upnp\upnpmessagetest\scripts\upnpmessagetest_response_parser_tests.script upnp\upnpmessagetest\scripts\upnpmessagetest_response_parser_tests.script
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/group/upnpmessagetest.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+// 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 <cflog.mmh>
+
+TARGET		  upnpmessagetest.exe
+TARGETTYPE	  exe
+UID			 0 0xA000930D
+
+USERINCLUDE	 	../../../../upnpmessage/inc
+USERINCLUDE	 	../inc
+SYSTEMINCLUDE		/epoc32/include
+SYSTEMINCLUDE		/epoc32/include/test
+
+SOURCEPATH	  	../src
+SOURCE		  	cupnpmessagetest.cpp
+SOURCE			cupnpresponseparsertest.cpp 
+SOURCE			cupnprequestparsertest.cpp 
+SOURCE			cupnpresponsecomposertest.cpp 
+SOURCE			cupnprequestcomposertest.cpp 
+SOURCE			ccodecdecodetest.cpp
+SOURCE			ccodecencodetest.cpp
+
+LIBRARY		 	euser.lib 
+LIBRARY			upnpmessage.lib 
+LIBRARY			inetprotutil.lib 
+LIBRARY			efsrv.lib 
+LIBRARY			charconv.lib 
+LIBRARY			bafl.lib 
+LIBRARY			http.lib
+//LIBRARY			mbufmgr.lib
+LIBRARY 	 	chunkmgr.lib
+LIBRARY			ecom.lib
+LIBRARY			upnputils.lib
+
+//For TEF
+LIBRARY			testexecuteutils.lib 
+LIBRARY			testexecutelogclient.lib
+
+
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/ccodecdecodetest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+// 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 CCODECDECODETEST_H_
+#define CCODECDECODETEST_H_
+
+#include <e32base.h>
+#include <stringpool.h>
+#include <inetprottextutils.h>
+#include <utf.h>
+#include <httpstringconstants.h>
+#include <http/thttptable.h>
+#include <http/framework/cheadercodec.h>
+
+#include "cupnpmessagetest.h"
+#include "mparserobserver.h"
+#include "cupnpresponseparser.h"
+#include "cupnprequestparser.h"
+#include "rhttpheaders.h"
+#include "CResponse.h"
+#include "CRequest.h"
+
+
+_LIT(KCodecDecodeTest, "CodecDecodeTest");
+
+class CCodecDecodeTest: public CTestStep,
+						public MParserObserver
+	{
+public:
+	static CCodecDecodeTest* NewL();
+	CCodecDecodeTest();
+	~CCodecDecodeTest();
+
+public:
+	TVerdict doTestStepPreambleL();
+	TVerdict doTestStepL();
+	TVerdict doTestStepPostambleL();
+
+private:
+	void ConstructHeadersL(const TInt aNoOfHdrValPairs);
+	void SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue);
+	void GetFieldL();
+
+private:	// methods from MParserObserver
+	virtual void GotBodyData();
+	virtual void DataParsed();
+	virtual void GotHeaders();
+	virtual void ParsingComplete(RMemChunk& aExcessData);
+	virtual void ParserError(TInt aError);
+
+private:
+	CUpnpResponseParser*			iRespParser;
+	CUpnpRequestParser*				iReqParser;
+	CActiveScheduler*				iSched;
+	RStringPool						iPool;
+	RHTTPHeaders					iRHeaders;
+	CRequest*						iRequest;
+	CResponse*						iResponse;
+	CHeaderCodec*					iCodec;
+	};
+
+#endif /*CCODECDECODETEST_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/ccodecencodetest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,72 @@
+// 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 CCODECENCODETEST_H_
+#define CCODECENCODETEST_H_
+
+#include <e32base.h>
+#include <stringpool.h>
+#include <inetprottextutils.h>
+#include <utf.h>
+#include <httpstringconstants.h>
+#include <http/thttptable.h>
+#include <http/framework/cheadercodec.h>
+
+#include "cupnpmessagetest.h"
+#include "mparserobserver.h"
+#include "cupnpresponsecomposer.h"
+#include "cupnprequestcomposer.h"
+#include "rhttpheaders.h"
+#include "CResponse.h"
+#include "CRequest.h"
+
+
+_LIT(KCodecEncodeTest, "CodecEncodeTest");
+
+class CCodecEncodeTest: public CTestStep,
+						public MComposerObserver
+	{
+public:
+	static CCodecEncodeTest* NewL();
+	CCodecEncodeTest();
+	~CCodecEncodeTest();
+
+public:
+	TVerdict doTestStepPreambleL();
+	TVerdict doTestStepL();
+	TVerdict doTestStepPostambleL();
+
+private:
+	void ConstructHeadersL(const TInt aNoOfHdrValPairs);
+	void SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue);
+	void GetFieldL();
+
+private:	// methods from MParserObserver
+	virtual void MessageDataReadyL(RBuf8& aData);
+	virtual void ComposingConcluded();
+	virtual void ComposerError(TInt aError);
+
+private:
+	CUpnpResponseComposer*			iRespComposer;
+	CUpnpRequestComposer*			iReqComposer;
+	CActiveScheduler*				iSched;
+	RStringPool						iPool;
+	RHTTPHeaders					iRHeaders;
+	CRequest*						iRequest;
+	CResponse*						iResponse;
+	CHeaderCodec*					iCodec;
+	};
+
+#endif /*CCODECENCODETEST_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnpmessagetest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,95 @@
+// 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 __CUPNPMESSGETEST_H__
+#define __CUPNPMESSGETEST_H__
+
+
+//  Include Files
+#include <e32base.h>
+#include <test/testexecuteserverbase.h>
+
+
+// 	Literal Constants. INI field names for parser tests
+_LIT(KDataChunk1,  "DataChunk1");
+_LIT(KParseExcessData, "ParseExcessData");
+_LIT(KExpectedResponses, "ExpectedResponses");
+_LIT(KExpectedRequests,	"ExpectedRequests");
+_LIT(KDataChunkCount, "DataChunkCount");
+_LIT(KDateFormat,"%D%M%Y%/0%1%/1%2%/2%3%/3 %:0%H%:1%T%:2%S.%C%:3");
+_LIT(KCRLF, "\r\n");
+_LIT(KDataChunk, "DataChunk%d");
+
+//	Literal Constants. INI field names for composer tests
+_LIT(KRequestMethod,		"RequestMethod");
+_LIT(KUri,					"URI");
+_LIT(KRequestBodyPresence, 	"RequestBodyPresence");
+_LIT(KBody,					"Body");
+_LIT(KNoOfHdrValPairs,		"NoOfHdrValPairs");
+_LIT(KNoOfHdrParamValPairs, "NoOfHdrParamValPairs");
+_LIT(KResponseStatusCode,	"ResponseStatusCode");
+_LIT(KResponseStatusText,	"ResponseStatusText");
+_LIT(KResponseBodyPresence, "ResponseBodyPresence");
+_LIT(KHeaderValuePair, "HeaderValuePair%d");
+_LIT(KHeaderParamValPair, "HeaderParamValPair%d");
+_LIT(KDirName, "C:\\logs\\UpnpMessageTestLogs\\");
+
+//	Literal constants. INI field names for codec decode tests
+_LIT(KRequestHeader, "RequestHeader");
+
+// For RMBufChain
+static const TInt KMBuf_MBufSize = 128;
+static const TInt KMBuf_MinGrowth = 64;
+static const TInt KMBuf_GrowthThreshold = 40;
+static const TInt KMBuf_InitialAllocation = 128;
+
+
+const TInt KMaxHeaderNameLen = 128;
+const TInt KMaxHeaderValueLen = 128;
+const TChar backSlash = '\\';
+
+const TInt KMaxBodyLen = 1024;
+const TInt KMaxMsgLen = 6144;
+
+const TChar colon = ':';
+const TChar equal = '=';
+const TChar partIdx = '@';
+
+const TInt KCMaxMsgLen = 6144;
+const TInt KMaxLen = 6144;
+
+
+class CUpnpMessageTest:public CTestServer
+	{
+public:
+	static CUpnpMessageTest* NewL();
+	CUpnpMessageTest();
+	~CUpnpMessageTest();
+
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+
+private:
+	const TPtrC  ServerName();
+
+private:
+	CTestStep *iTestStep;
+	};
+//  Function Prototypes
+GLDEF_C TInt E32Main();
+
+
+#endif  // __CUPNPMESSGETEST_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnprequestcomposertest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,83 @@
+// 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 CUPNPREQUESTCOMPOSERTEST_H_
+#define CUPNPREQUESTCOMPOSERTEST_H_
+
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/framework/cheadercodec.h>
+#include <es_mbuf.h>
+#include <comms-infras/rworkerlock.h>
+#include <comms-infras/mbufmanager.h>
+#include <cflog.h>
+
+#include "cupnpmessagetest.h"
+#include "mcomposerobserver.h"
+#include "cupnprequestcomposer.h"
+#include "CRequest.h"
+
+_LIT(KRequestComposerTest, "RequestComposerTest");
+
+class CUpnpRequestComposerTest: public CTestStep,
+							public MComposerObserver,
+							public MHTTPDataSupplier
+	{
+public:	// factory methods
+	static CUpnpRequestComposerTest* NewL();
+	CUpnpRequestComposerTest();
+	~CUpnpRequestComposerTest();
+
+private:	// methods from MComposerObserver
+	void ComposingConcluded();
+	void MessageDataReadyL(RBuf8& aData);
+	void ComposerError(TInt aError);
+
+public:	// methods from CTestStep
+	TVerdict doTestStepPreambleL();
+	TVerdict doTestStepL();
+	TVerdict doTestStepPostambleL();
+
+public:	// methods from MHTTPDataSupplier
+	TBool GetNextDataPart(TPtrC8& aDataPart);
+	void ReleaseData();
+	TInt OverallDataSize();
+	TInt Reset();
+
+private:
+	void ConstructRequestMethodL(const TDesC& aRequestMethod);
+	void ConstructRequestUriL(const TDesC& aRequestUri);
+	void ConstructRequestHeadersL(const TInt aNoOfHdrValPairs, const TInt aNoOfHdrParamValPairs);
+	void ConstructRequestBodyL(const TBool aRequestBodyPresence);
+	void SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue);
+	void SetParamL(const TDesC8& aHeader, const TDesC8& aParam, const TDesC8& aValue, const TInt aPartIndex);
+
+private:
+	CUpnpRequestComposer*			iRequestComposer;
+	HBufC8*							iRequestBody;
+	CActiveScheduler* 				iSched;
+	RBuf8							iRequestBuffer;
+	CRequest*						iRequest;
+	CHeaderCodec*					iCodec;
+	RStringPool						iStringPool;
+	CChunkManager* 					iMBufMgr;
+	//MMBufSizeAllocator* 			iMBufSzAllctr;
+
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_DECLARATION_MEMBER;
+#endif
+	};
+
+#endif /*CUPNPREQUESTCOMPOSERTEST_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnprequestparsertest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,86 @@
+// 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 CUPNPREQUESTPARSERTEST_H_
+#define CUPNPREQUESTPARSERTEST_H_
+
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/framework/cheadercodec.h>
+//#include <es_mbuf.h>
+#include <comms-infras/rworkerlock.h>
+//#include <comms-infras/mbufmanager.h>
+#include <cflog.h>
+#include <rmemchunk.h>
+#include <cchunkmanager.h>
+
+#include "cupnpmessagetest.h"
+#include "mparserobserver.h"
+#include "cupnprequestparser.h"
+#include "CResponse.h"
+
+_LIT(KRequestParserTest, "RequestParserTest");
+
+class CUpnpRequestParserTest: public CTestStep,
+						public MParserObserver
+	{
+public:	// factory methods
+	static CUpnpRequestParserTest* NewL();
+	CUpnpRequestParserTest();
+	~CUpnpRequestParserTest();
+
+private:	// methods from MParserObserver
+	virtual void GotBodyData();
+	virtual void DataParsed();
+	virtual void GotHeaders();
+	virtual void ParsingComplete(RMemChunk& aExcessData);
+	virtual void ParserError(TInt aError);
+
+public:	// methods from CTestStep
+	TVerdict doTestStepPreambleL();
+	TVerdict doTestStepL();
+	TVerdict doTestStepPostambleL();
+
+
+private:
+	void NegateEscapeEncodeL(const TDesC& aDes);
+
+private:
+	CUpnpRequestParser*					iRequestParser;
+	MHTTPDataSupplier*					iDataSupplier;
+	HBufC8*								iDataChunk;
+	TBool								iNeedToParseExcessData;
+	TPtrC8								iDataChunkPtr;
+	CActiveScheduler* 					iSched;
+	TInt								iExpectedRequests;
+	TInt								iDataChunkCount;
+	RPointerArray<HBufC8>				iDataChunkArray;
+	CRequest*							iRequest;
+	CHeaderCodec*						iCodec;
+	RStringPool							iStringPool;
+	CChunkManager* 						iMBufMgr;
+	//MMBufSizeAllocator* 				iMBufSzAllctr;
+	//RMBufChain							iDataChunkChain;
+	RMemChunk							iDataChunkChain;
+	TBuf8<KMaxMsgLen>					iExcessData8;
+	TBool								iIsStarted;
+	TInt								iError;
+	
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_DECLARATION_MEMBER;
+#endif
+	};
+
+#endif /*CUPNPREQUESTPARSERTEST_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnpresponsecomposertest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,83 @@
+// 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 CUPNPRESPONSECOMPOSERTEST_H_
+#define CUPNPRESPONSECOMPOSERTEST_H_
+
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/framework/cheadercodec.h>
+#include <es_mbuf.h>
+#include <comms-infras/rworkerlock.h>
+#include <comms-infras/mbufmanager.h>
+#include <cflog.h>
+
+#include "cupnpmessagetest.h"
+#include "mcomposerobserver.h"
+#include "cupnpresponsecomposer.h"
+#include "CResponse.h"
+
+_LIT(KResponseComposerTest, "ResponseComposerTest");
+
+class CUpnpResponseComposerTest: public CTestStep,
+							public MComposerObserver,
+							public MHTTPDataSupplier
+	{
+public:	// factory methods
+	static CUpnpResponseComposerTest* NewL();
+	CUpnpResponseComposerTest();
+	~CUpnpResponseComposerTest();
+
+private:	// methods from MComposerObserver
+	void ComposingConcluded();
+	void MessageDataReadyL(RBuf8& aData);
+	void ComposerError(TInt aError);
+
+public:	// methods from CTestStep
+	TVerdict doTestStepPreambleL();
+	TVerdict doTestStepL();
+	TVerdict doTestStepPostambleL();
+
+public:	// methods from MHTTPDataSupplier
+	TBool GetNextDataPart(TPtrC8& aDataPart);
+	void ReleaseData();
+	TInt OverallDataSize();
+	TInt Reset();
+
+private:
+	void ConstructResponseStatusLineL(const TInt aStatusCode, const TDesC& aStatusText);
+	void ConstructResponseHeadersL(const TInt aNoOfHdrValPairs, const TInt aNoOfHdrParamValPairs);
+	void ConstructResponseBodyL(const TBool aResponseBodyPresence);
+	void SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue);
+	void SetParamL(const TDesC8& aHeader, const TDesC8& aParam, const TDesC8& aValue, const TInt aPartIndex);
+
+private:
+	CUpnpResponseComposer*			iResponseComposer;
+	HBufC8*							iResponseBody;
+	CActiveScheduler* 				iSched;
+	RBuf8							iResponseBuffer;
+	CResponse*						iResponse;
+	CHeaderCodec*					iCodec;
+	RStringPool						iStringPool;
+	CChunkManager* 					iMBufMgr;
+	//MMBufSizeAllocator* 			iMBufSzAllctr;
+	
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_DECLARATION_MEMBER;
+#endif
+	
+	};
+
+#endif /*CUPNPRESPONSECOMPOSERTEST_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/cupnpresponseparsertest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,84 @@
+// 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 CUPNPRESPONSEPARSERTEST_H_
+#define CUPNPRESPONSEPARSERTEST_H_
+
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/framework/cheadercodec.h>
+//#include <es_mbuf.h>
+#include <comms-infras/rworkerlock.h>
+//#include <comms-infras/mbufmanager.h>
+#include <cflog.h>
+#include <rmemchunk.h>
+
+#include "cupnpmessagetest.h"
+#include "mparserobserver.h"
+#include "cupnpresponseparser.h"
+#include "CResponse.h"
+
+_LIT(KResponseParserTest, "ResponseParserTest");
+
+class CUpnpResponseParserTest: public CTestStep,
+						public MParserObserver
+	{
+public:	// factory methods
+	static CUpnpResponseParserTest* NewL();
+	CUpnpResponseParserTest();
+	~CUpnpResponseParserTest();
+
+private:	// methods from MParserObserver
+	void GotBodyData();
+	void DataParsed();
+	void GotHeaders();
+	void ParsingComplete(RMemChunk& aExcessData);
+	void ParserError(TInt aError);
+
+public:	// methods from CTestStep
+	TVerdict doTestStepPreambleL();
+	TVerdict doTestStepL();
+	TVerdict doTestStepPostambleL();
+
+private:
+	void NegateEscapeEncodeL(const TDesC& aDes);
+
+private:
+	CUpnpResponseParser*				iResponseParser;
+	MHTTPDataSupplier*					iDataSupplier;
+	HBufC8*								iDataChunk;
+	TBool								iNeedToParseExcessData;
+	TPtrC8								iDataChunkPtr;
+	CActiveScheduler* 					iSched;
+	TInt								iExpectedResponses;
+	TInt								iDataChunkCount;
+	RPointerArray<HBufC8>				iDataChunkArray;
+	CResponse*							iResponse;
+	CHeaderCodec*						iCodec;
+	RStringPool							iStringPool;
+	CChunkManager* 						iMBufMgr;
+	//MMBufSizeAllocator* 				iMBufSzAllctr;
+	RMemChunk							iDataChunkChain;
+	TBuf8<KMaxMsgLen>					iExcessData8;
+	TBool								iIsStarted;
+	TInt								iError;
+	
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_DECLARATION_MEMBER;
+#endif
+
+	};
+
+#endif /*CUPNPRESPONSEPARSERTEST_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/ccodecdecodetest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,412 @@
+// 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 <http/framework/cheadercodecplugin.h>
+#include <ecom/ecom.h>
+#include <http/thttptable.h>
+#include <upnp/tupnptable.h>
+
+#include "ccodecdecodetest.h"
+
+_LIT8(KHeaderSeparator,	"\n");
+
+_LIT8(KUpnpCodecName, "HTTP/UPnP");
+_LIT(KTestName, "CODEC_TEST_1");
+
+
+CCodecDecodeTest* CCodecDecodeTest::NewL()
+	{
+	return (new(ELeave)CCodecDecodeTest());
+	}
+
+
+CCodecDecodeTest::CCodecDecodeTest()
+	{
+	SetTestStepName(KCodecDecodeTest);
+	}
+
+
+CCodecDecodeTest::~CCodecDecodeTest()
+	{
+	}
+
+
+TVerdict CCodecDecodeTest::doTestStepPreambleL()
+	{
+	iSched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iSched);
+
+	iPool.OpenL(TUPnPTable::Table());
+	iPool.OpenL(THTTPTable::Table());
+	
+	iCodec = NULL;
+	iRequest = NULL;
+	iResponse = NULL;
+	iReqParser = NULL;
+	iRespParser = NULL;
+
+	return TestStepResult();
+	}
+
+
+TVerdict CCodecDecodeTest::doTestStepL()
+	{
+	TInt noOfHdrValPairs;
+	TBool requestHeader;
+	
+	if(!GetIntFromConfig(ConfigSection(), KNoOfHdrValPairs, noOfHdrValPairs) ||
+		!GetBoolFromConfig(ConfigSection(), KRequestHeader, requestHeader)
+		)
+		{
+		ERR_PRINTF3(_L("===> Problem in reading values from ini.			\
+				\nExpected fields are: \n%S\n%S <==="
+			  ), &KNoOfHdrValPairs, &KRequestHeader);
+		
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+
+  	if(requestHeader)
+  		{
+  		// has to load the server codec
+  		iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iPool);
+  		iRequest = CRequest::NewL(*iCodec, iPool);
+  		iRHeaders = iRequest->Handle().GetHeaderCollection();
+  		iReqParser = CUpnpRequestParser::NewL(*this);
+  		}
+  	else
+  		{
+  		// has to load the client codec
+  		iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iPool);
+  		iResponse = CResponse::NewL(*iCodec, iPool);
+  		iRHeaders = iResponse->Handle().GetHeaderCollection();
+  		iRespParser = CUpnpResponseParser::NewL(*this);
+  		}
+
+	TRAPD(err, ConstructHeadersL(noOfHdrValPairs));
+	if(err != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+
+	TRAP(err, GetFieldL());
+	if(err != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+		
+	// The follwoing section of code has been written for code coverage.
+	if(ConfigSection().Compare(KTestName())== 0)
+		{
+		RStringF s = iPool.StringF(HTTP::EAccept, THTTPTable::Table());
+		_LIT8(KSomeVal, "some");
+		iRHeaders.SetRawFieldL(s, KSomeVal, KHeaderSeparator);
+		THTTPHdrVal aV;
+		iRHeaders.GetField(s,0,aV);
+		iRHeaders.RemoveField(s);
+		
+		RStringF m = iPool.StringF(UPnP::EMAN, TUPnPTable::Table());
+		iRHeaders.RemoveField(m);
+		_LIT8(KSomeMan, "ns=01");
+		iRHeaders.SetRawFieldL(m, KSomeMan(), KHeaderSeparator);
+		THTTPHdrVal mV;
+		iRHeaders.GetField(m, 0, mV);
+		iRHeaders.RemoveField(m);
+		
+		_LIT8(KSomeMan2, "some;ns=01;=;;");
+		iRHeaders.SetRawFieldL(m, KSomeMan2(), KHeaderSeparator);
+		iRHeaders.GetField(m, 0, mV);
+		iRHeaders.RemoveField(m);
+		
+		if(requestHeader)
+			{
+			RStringF accept = iPool.StringF(HTTP::EAccept, THTTPTable::Table());
+			RStringF textHtml = iPool.StringF(HTTP::ETextHtml, THTTPTable::Table());
+			RStringF textPlain = iPool.StringF(HTTP::ETextPlain, THTTPTable::Table());
+			RStringF eQ = iPool.StringF(HTTP::EQ, THTTPTable::Table());
+			THTTPHdrVal q(THTTPHdrVal::TQConv(0.8));
+			
+			RStringF expect = iPool.StringF(HTTP::EExpect, THTTPTable::Table());
+			RStringF so = iPool.OpenFStringL(_L8("some"));
+			CleanupClosePushL(so);
+			iRHeaders.FieldPartsL(expect);
+			THTTPHdrVal x;
+			iRHeaders.GetParam(so, textHtml, x, 0);
+			CleanupStack::PopAndDestroy(&so);
+			TPtrC8 pt;
+			iRHeaders.GetRawField(expect, pt);
+			iRHeaders.RemoveField(expect);
+			iRHeaders.RemoveField(expect);
+			iRHeaders.RemoveFieldPart(expect, 0);
+			
+			iRHeaders.SetFieldL(accept, THTTPHdrVal(textHtml));
+			iRHeaders.SetFieldL(accept, THTTPHdrVal(textPlain));
+			iRHeaders.RemoveFieldPart(accept, 0);
+			iRHeaders.RemoveFieldPart(accept, 0);
+			iRHeaders.RemoveField(accept);
+			
+			TRAP(err, iRHeaders.SetFieldL(accept, textHtml, eQ, q));
+			if(err != KErrNone)
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+				
+			TRAP(err, iRHeaders.SetFieldL(accept, textPlain));	
+			if(err != KErrNone)
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+				
+			THTTPHdrFieldIter iter = iRHeaders.Fields();
+			while(!iter.AtEnd())
+				{
+				iter();
+				++iter;	
+				}
+				
+			++iter;
+			iter();	
+				
+			THTTPHdrVal q2;
+			iRHeaders.GetParam(accept, eQ, q2, 0);
+			if((q == q2))
+				{
+				if(q != q2)
+					{
+					// do nothing.	
+					}
+				iRHeaders.RemoveFieldPart(accept, 0);	
+				}
+				
+			TRAP(err, iRHeaders.SetFieldL(accept, textHtml, eQ, q));
+			if(err != KErrNone)
+				{
+				SetTestStepResult(EFail);
+				return TestStepResult();
+				}
+				iRHeaders.GetParam(accept, eQ, q2, 1);
+	
+			RString someString = iPool.OpenStringL(_L8("some"));
+			CleanupClosePushL(someString);
+			THTTPHdrVal v(someString);
+			v.SetStr(someString);
+			THTTPHdrVal t;
+			t = v.Copy();
+			someString = v.Str();
+		
+			THTTPHdrVal s(someString);
+			CleanupStack::PopAndDestroy(&someString);
+			if(s == v)
+				{
+				// do nothing.	
+				}
+				
+			TDateTime date(2008, EJune, 24, 9, 0, 0, 0);
+			TDateTime date2(2007, EJune, 23, 9, 0, 0, 0);
+			THTTPHdrVal dVal(date);
+			THTTPHdrVal dVal3(date2);
+			dVal.SetDateTime(date);
+			date = dVal.DateTime();
+			THTTPHdrVal dVal2;
+			dVal2 = dVal.Copy();
+			if(dVal == dVal2)
+				{
+				// do nothing.	
+				}
+			if(dVal == dVal3)
+				{
+				// do nothing.
+				}
+			
+			THTTPHdrVal strFVal, strFVal1;
+			strFVal.SetStrF(eQ);
+			strFVal1 = strFVal.Copy();
+			if(strFVal == strFVal1)
+				{
+				// do nothing.				
+				}
+				
+			THTTPHdrVal sVal;
+			THTTPHdrVal sVal2;
+			if(sVal == dVal)
+				{
+				// do nothing.			
+				}
+			if(dVal == sVal)
+				{
+				// do nothing.	
+				}
+			
+			if(ConfigSection().Compare(KTestName()) == 0)
+				{
+				if(sVal == sVal2)
+					{
+					// do nothing.
+					}
+				}
+			}
+		}
+	SetTestStepResult(EPass);	
+	return TestStepResult();
+	}
+
+
+TVerdict CCodecDecodeTest::doTestStepPostambleL()
+	{
+	if(iRequest)
+		delete iRequest;
+	
+	if(iResponse)
+		delete iResponse;
+	
+	iPool.Close();
+	
+	if(iRespParser)
+		delete iRespParser;
+	
+	if(iReqParser)
+		delete iReqParser;
+
+	delete iCodec;
+	delete iSched;
+
+	REComSession::FinalClose();
+	
+	return TestStepResult();
+	}
+
+
+void CCodecDecodeTest::ConstructHeadersL(const TInt aNoOfHdrValPairs)
+	{
+	// Create the "Header: Value" pair array.
+	TInt headersCounter = 1;
+	while(headersCounter <= aNoOfHdrValPairs)
+		{
+		TPtrC headerValuePair;
+		TBuf<20> buf(KNullDesC);
+		
+		// The below line is to create formats such as
+		// HeaderValuePair1, HeaderValuePair2...
+		buf.Format(KHeaderValuePair, headersCounter);
+		
+		GetStringFromConfig(ConfigSection(), buf, headerValuePair);
+		HBufC8* headerValPairBuf;
+		headerValPairBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L(headerValuePair);
+		CleanupStack::PushL(headerValPairBuf);
+		
+		TPtrC8 headerValPairPtr(headerValPairBuf->Des());
+		TInt consumed = headerValPairPtr.Locate(colon);
+		User::LeaveIfError(consumed);
+		
+		// Get the header. i.e, the string before the ':'
+		TPtrC8 header = headerValPairPtr.Left(consumed);
+		
+		headerValPairPtr.Set(headerValPairPtr.Mid(consumed+1));
+		InetProtTextUtils::RemoveWhiteSpace(headerValPairPtr, InetProtTextUtils::ERemoveBoth);
+		
+		// The left over data is the value for the header.
+		SetHeaderL(header, headerValPairPtr);
+		CleanupStack::PopAndDestroy(headerValPairBuf);
+		
+		headersCounter++;
+		}
+	}
+
+
+void CCodecDecodeTest::SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue)
+	{
+	RStringF name = iPool.OpenFStringL(aHeader);
+	CleanupClosePushL(name);
+	iRHeaders.SetRawFieldL(name, aValue, KHeaderSeparator);
+	CleanupStack::PopAndDestroy(&name);
+	}
+
+
+void CCodecDecodeTest::GetFieldL()
+	{
+	TBuf<KMaxHeaderNameLen>  fieldName16;
+	TBuf<KMaxHeaderValueLen> fieldVal16;
+	THTTPHdrFieldIter iter = iRHeaders.Fields();
+
+	while(iter.AtEnd() == EFalse)
+		{
+		RStringTokenF fldName = iter();
+		RStringF headerSF = iPool.StringF(fldName);
+		THTTPHdrVal hdrVal;
+		
+		TInt partsIter = 0;
+		
+		FOREVER
+			{
+			if(iRHeaders.GetField(headerSF, partsIter, hdrVal) == KErrNone)
+				{
+				const TDesC8& fieldNameDesC = headerSF.DesC();
+				fieldName16.Copy(fieldNameDesC.Left(KMaxHeaderNameLen));
+				
+				switch(hdrVal.Type())
+					{
+					case THTTPHdrVal::KTIntVal:
+						INFO_PRINTF3(_L("\n===> %S: %u <==="), &fieldName16, hdrVal.Int());
+						break;
+					case THTTPHdrVal::KStrFVal:
+						const TDesC8& fieldValDesC = hdrVal.StrF().DesC();
+						fieldVal16.Copy(fieldValDesC.Left(KMaxHeaderValueLen));
+						INFO_PRINTF3(_L("\n===> %S: %S <==="), &fieldName16, &fieldVal16);
+						break;
+					}
+				}
+			else
+				{
+				break;	
+				}
+			++partsIter;		
+			}
+		++iter;	
+		}
+	}
+
+
+void CCodecDecodeTest::GotBodyData()
+	{
+	User::Invariant();
+	}
+
+
+void CCodecDecodeTest::DataParsed()
+	{
+	User::Invariant();	
+	}
+
+
+void CCodecDecodeTest::GotHeaders()
+	{
+	User::Invariant();	
+	}
+
+
+void CCodecDecodeTest::ParsingComplete(RMemChunk& /*aExcessData*/)
+	{
+	User::Invariant();	
+	}
+
+
+void CCodecDecodeTest::ParserError(TInt /*aError*/)
+	{
+	User::Invariant();	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/ccodecencodetest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,333 @@
+// 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 <http/framework/cheadercodecplugin.h>
+#include <upnp/tupnptable.h>
+
+#include "ccodecencodetest.h"
+#include "CHeaderField.h"
+
+_LIT8(KUpnpCodecName, "HTTP/UPnP");
+_LIT8(KHeaderSeparator,	"\n");
+_LIT(KCoverageTests, "TEST_COVERAGE");
+
+
+CCodecEncodeTest* CCodecEncodeTest::NewL()
+	{
+	return (new (ELeave) CCodecEncodeTest());
+	}
+
+
+CCodecEncodeTest::CCodecEncodeTest()
+	{
+	SetTestStepName(KCodecEncodeTest);
+	}
+
+
+CCodecEncodeTest::~CCodecEncodeTest()
+	{
+	}
+
+
+TVerdict CCodecEncodeTest::doTestStepPreambleL()
+	{
+	iSched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iSched);
+	
+	iPool.OpenL(TUPnPTable::Table());
+	iPool.OpenL(THTTPTable::Table());
+
+	iCodec = NULL;
+	iResponse = NULL;
+	iRequest = NULL;
+	iRespComposer = NULL;
+	iReqComposer = NULL;
+	
+	return TestStepResult();
+	}
+
+
+TVerdict CCodecEncodeTest::doTestStepL()
+	{
+	TInt noOfHdrValPairs;
+	TBool requestHeader;
+	
+	if(ConfigSection().Compare(KCoverageTests()) != 0)
+		{
+		if( !GetIntFromConfig(ConfigSection(), KNoOfHdrValPairs, noOfHdrValPairs) ||
+		!GetBoolFromConfig(ConfigSection(), KRequestHeader, requestHeader)
+		)
+			{
+			ERR_PRINTF3(_L("===> Problem in reading values from ini.			\
+					\nExpected fields are: \n%S\n%S <==="
+				  ), &KNoOfHdrValPairs, &KRequestHeader);
+			
+			SetTestStepResult(EFail);
+			return TestStepResult();
+			}
+
+		if(!requestHeader)
+			{
+			iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iPool);
+			iResponse = CResponse::NewL(*iCodec, iPool);
+			iRHeaders = iResponse->Handle().GetHeaderCollection();
+			iRespComposer = CUpnpResponseComposer::NewL(*this);
+			}
+		else
+			{
+			iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iPool);
+			iRequest = CRequest::NewL(*iCodec, iPool);
+			iRHeaders = iRequest->Handle().GetHeaderCollection();		
+			iReqComposer = CUpnpRequestComposer::NewL(*this);
+			}
+		
+		RStringF s = iPool.StringF(HTTP::EAccept, THTTPTable::Table());
+		_LIT8(KSomeVal, "some");
+		iRHeaders.SetRawFieldL(s, KSomeVal, KHeaderSeparator);
+		THTTPHdrVal aV;
+		iRHeaders.GetField(s,0,aV);
+
+		TRAPD(err, ConstructHeadersL(noOfHdrValPairs));
+		if(err != KErrNone)
+			{
+			SetTestStepResult(EFail);
+			return TestStepResult();
+			}
+
+		TRAP(err, GetFieldL());
+		if(err != KErrNone)
+			{
+			SetTestStepResult(EFail);
+			return TestStepResult();
+			}
+		}
+	
+	// The follwoing section of code has been written for code coverage.
+	if(ConfigSection().Compare(KCoverageTests())== 0)
+		{
+		iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iPool);
+		iResponse = CResponse::NewL(*iCodec, iPool);
+		iRHeaders = iResponse->Handle().GetHeaderCollection();
+		iRespComposer = CUpnpResponseComposer::NewL(*this);
+
+		THTTPHdrVal va;
+		CHeaderFieldPart* hdrFldPart = CHeaderFieldPart::NewL(va);
+		hdrFldPart->NumParameters();
+		THeaderFieldParamIter t = hdrFldPart->Parameters();
+		delete hdrFldPart; 
+		
+		RStringF man = iPool.StringF(UPnP::EMAN, TUPnPTable::Table());
+		RStringF soapaction = iPool.StringF(UPnP::ESoapAction, TUPnPTable::Table());
+		RStringF mx = iPool.StringF(UPnP::EMX, TUPnPTable::Table());
+		RStringF st = iPool.StringF(UPnP::EST, TUPnPTable::Table());
+		RStringF timeout = iPool.StringF(UPnP::ETimeout, TUPnPTable::Table());
+		RStringF callback = iPool.StringF(UPnP::ECallback, TUPnPTable::Table());
+		RStringF ns = iPool.StringF(UPnP::ENS, TUPnPTable::Table());
+		
+		RStringF someParam = iPool.OpenFStringL(_L8("someParam"));
+		CleanupClosePushL(someParam);
+		RStringF someValue = iPool.OpenFStringL(_L8("some"));
+		CleanupClosePushL(someValue);
+		THTTPHdrVal nullVal;
+		TPtrC8 retVal;
+		THTTPHdrVal someVal(someValue);
+		
+		TRAP_IGNORE(iRHeaders.SetFieldL(man, nullVal));
+		iRHeaders.GetRawField(man, retVal);
+		iRHeaders.RemoveField(man);
+
+		TRAP_IGNORE(iRHeaders.SetFieldL(man, nullVal));
+		iRHeaders.GetRawField(man, retVal);
+		iRHeaders.RemoveField(man);
+
+		TRAP_IGNORE(iRHeaders.SetFieldL(soapaction, nullVal));
+		iRHeaders.GetRawField(soapaction, retVal);
+		iRHeaders.RemoveField(soapaction);
+
+		TRAP_IGNORE(iRHeaders.SetFieldL(mx, nullVal));
+		iRHeaders.GetRawField(mx, retVal);
+		iRHeaders.RemoveField(mx);
+
+		TRAP_IGNORE(iRHeaders.SetFieldL(st, nullVal));
+		iRHeaders.GetRawField(st, retVal);
+		iRHeaders.RemoveField(st);
+
+		TRAP_IGNORE(iRHeaders.SetFieldL(timeout, nullVal));
+		iRHeaders.GetRawField(timeout, retVal);
+		iRHeaders.RemoveField(timeout);
+
+		TRAP_IGNORE(iRHeaders.SetFieldL(callback, nullVal));
+		iRHeaders.GetRawField(callback, retVal);
+		iRHeaders.RemoveField(callback);
+
+		TRAP_IGNORE(iRHeaders.SetFieldL(man, someVal, ns, nullVal));
+		iRHeaders.GetRawField(man, retVal);
+		iRHeaders.RemoveField(man);
+
+		TRAP_IGNORE(iRHeaders.SetFieldL(man, someVal, someParam, nullVal));
+		iRHeaders.GetRawField(man, retVal);
+		iRHeaders.RemoveField(man);
+		
+		TRAP_IGNORE(iRHeaders.SetFieldL(man, someVal, someParam, someVal));
+		iRHeaders.GetRawField(man, retVal);
+		iRHeaders.RemoveField(man);
+
+		CleanupStack::PopAndDestroy(&someValue);
+		CleanupStack::PopAndDestroy(&someParam);
+		}
+	
+	SetTestStepResult(EPass);	
+	return TestStepResult();
+	}
+
+
+TVerdict CCodecEncodeTest::doTestStepPostambleL()
+	{
+	if(iRequest)
+		delete iRequest;
+	
+	if(iResponse)
+		delete iResponse;
+	
+	iPool.Close();
+	
+	if(iRespComposer)
+		delete iRespComposer;
+	
+	if(iReqComposer)
+		delete iReqComposer;
+
+	delete iCodec;
+	delete iSched;
+
+	REComSession::FinalClose();
+	return TestStepResult();
+	}
+
+
+void CCodecEncodeTest::ConstructHeadersL(const TInt aNoOfHdrValPairs)
+	{
+	// Create the "Header: Value" pair array.
+	TInt headersCounter = 1;
+	while(headersCounter <= aNoOfHdrValPairs)
+		{
+		TPtrC headerValuePair;
+		TBuf<20> buf(KNullDesC);
+		
+		// The below line is to create formats such as
+		// HeaderValuePair1, HeaderValuePair2...
+		buf.Format(KHeaderValuePair, headersCounter);
+		
+		GetStringFromConfig(ConfigSection(), buf, headerValuePair);
+		HBufC8* headerValPairBuf;
+		headerValPairBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L(headerValuePair);
+		CleanupStack::PushL(headerValPairBuf);
+		
+		TPtrC8 headerValPairPtr(headerValPairBuf->Des());
+		TInt consumed = headerValPairPtr.Locate(colon);
+		User::LeaveIfError(consumed);
+		
+		// Get the header. i.e, the string before the ':'
+		TPtrC8 header = headerValPairPtr.Left(consumed);
+		
+		headerValPairPtr.Set(headerValPairPtr.Mid(consumed+1));
+		InetProtTextUtils::RemoveWhiteSpace(headerValPairPtr, InetProtTextUtils::ERemoveBoth);
+		
+		// The left over data is the value for the header.
+		SetHeaderL(header, headerValPairPtr);
+		CleanupStack::PopAndDestroy(headerValPairBuf);
+						
+		headersCounter++;
+		}
+	}
+
+
+void CCodecEncodeTest::SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue)
+	{
+	RStringF name = iPool.OpenFStringL(aHeader);
+	CleanupClosePushL(name);
+	THTTPHdrVal val;
+	
+	if((name == iPool.StringF(UPnP::EMX, TUPnPTable::Table())) || (name == iPool.StringF(UPnP::ESEQ, TUPnPTable::Table())) || (name == iPool.StringF(UPnP::ETimeout, TUPnPTable::Table())))
+		{
+		TInt value;
+		InetProtTextUtils::ConvertDescriptorToInt(aValue, value);
+		val.SetInt(value);	
+		iRHeaders.SetFieldL(name, val);
+		}
+		
+	else
+		{
+		RStringF value = iPool.OpenFStringL(aValue);
+		CleanupClosePushL(value);
+		
+		val.SetStrF(value);
+		iRHeaders.SetFieldL(name, value);
+
+		CleanupStack::PopAndDestroy(&value);
+		}
+		
+	if(name == iPool.StringF(UPnP::EMAN, TUPnPTable::Table()))
+		{
+		RStringF ns = iPool.StringF(UPnP::ENS, TUPnPTable::Table());
+		TInt value = 01;
+		THTTPHdrVal val(value);
+		iRHeaders.SetParamL(name, ns, val, 0);
+		}
+	
+	CleanupStack::PopAndDestroy(&name);
+	}
+
+
+void CCodecEncodeTest::GetFieldL()
+	{
+	TBuf<KMaxHeaderNameLen>  fieldName16;
+	TBuf<KMaxHeaderValueLen> fieldVal16;
+	THTTPHdrFieldIter iter = iRHeaders.Fields();
+		
+	while(iter.AtEnd() == EFalse)
+		{
+		RStringTokenF fldName = iter();
+		RStringF headerSF = iPool.StringF(fldName);
+		TPtrC8 rawData8;
+		
+		User::LeaveIfError(iRHeaders.GetRawField(headerSF, rawData8));
+
+		const TDesC8& fieldNameDesC = headerSF.DesC();
+		fieldName16.Copy(fieldNameDesC.Left(KMaxHeaderNameLen));
+		fieldVal16.Copy(rawData8);
+		
+		INFO_PRINTF3(_L("\n===> %S: %S <==="), &fieldName16, &fieldVal16);
+		++iter;	
+		}
+	}
+
+
+void CCodecEncodeTest::MessageDataReadyL(RBuf8& /*aData*/)
+	{
+	User::Invariant();
+	}
+
+
+void CCodecEncodeTest::ComposingConcluded()
+	{
+	User::Invariant();
+	}
+
+
+void CCodecEncodeTest::ComposerError(TInt /*aError*/)
+	{
+	User::Invariant();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnpmessagetest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,141 @@
+// 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 "cupnpmessagetest.h"
+#include "cupnpresponseparsertest.h"
+#include "cupnprequestcomposertest.h"
+#include "cupnprequestparsertest.h"
+#include "cupnpresponsecomposertest.h"
+#include "ccodecdecodetest.h"
+#include "ccodecencodetest.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <f32file.h>
+
+
+#if (!defined EKA2)
+// The system-wide unique name for the test-server
+_LIT(KServerName, "upnpmessagetest");
+#endif
+
+
+CUpnpMessageTest*  CUpnpMessageTest::NewL()
+	{
+	CUpnpMessageTest* server = new(ELeave) CUpnpMessageTest();
+	CleanupStack::PushL(server);
+
+	server->StartL(server->ServerName());
+
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+CUpnpMessageTest::CUpnpMessageTest()
+	{
+	}
+
+CUpnpMessageTest::~CUpnpMessageTest()
+	{
+	delete iTestStep;
+	}
+
+const TPtrC CUpnpMessageTest::ServerName()
+	{
+#if (!defined EKA2)
+	return KServerName();
+#else
+	TParsePtrC serverName(RProcess().FileName());
+	return serverName.Name();
+#endif
+	}
+
+CTestStep* CUpnpMessageTest::CreateTestStep(const TDesC& aStepName)
+	{
+	if (aStepName == KResponseParserTest)
+		{
+		iTestStep = new CUpnpResponseParserTest();
+		}
+
+	else if(aStepName == KRequestComposerTest)
+		{
+		iTestStep = new CUpnpRequestComposerTest();
+		}
+
+	else if(aStepName == KRequestParserTest)
+		{
+		iTestStep = new CUpnpRequestParserTest();
+		}
+
+	else if(aStepName == KResponseComposerTest)
+		{
+		iTestStep = new CUpnpResponseComposerTest();
+		}
+
+	else if(aStepName == KCodecDecodeTest)
+		{
+		iTestStep = new CCodecDecodeTest();
+		}
+
+	else if(aStepName == KCodecEncodeTest)
+		{
+		iTestStep = new CCodecEncodeTest();
+		}
+
+	return iTestStep;
+	}
+
+
+LOCAL_C void MainL()
+	{
+	// For platform security
+#if (defined __DATA_CAGING__)
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+	CActiveScheduler* sched = NULL;
+	sched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CUpnpMessageTest* server = NULL;
+
+	// Create the test-server
+	TRAPD(err, server = CUpnpMessageTest::NewL());
+
+	if(!err)
+		{
+		// Sync with the client and enter the active scheduler
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+GLDEF_C TInt E32Main()
+	{
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if (cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+	TInt err = KErrNone;
+	TRAP(err, MainL());
+	delete cleanup;
+	__UHEAP_MARKEND;
+	return KErrNone;
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnprequestcomposertest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,534 @@
+// 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 <httpstringconstants.h>
+#include <http/thttptable.h>
+#include <stringpool.h>
+#include <utf.h>
+#include <inetprottextutils.h>
+#include <http/thttphdrval.h>
+#include <uri8.h>
+#include <http/framework/cheadercodecplugin.h>
+#include <upnp/tupnptable.h>
+
+#include "cupnprequestcomposertest.h"
+#include "rhttpheaders.h"
+
+_LIT(KFileName, "C:\\logs\\UpnpMessageTestLogs\\composedrequests.dump");
+_LIT(KRCTest, "REQUEST_COMPOSER_TEST_1");
+
+_LIT8(KUpnpCodecName, "HTTP/UPnP");
+
+
+CUpnpRequestComposerTest* CUpnpRequestComposerTest::NewL()
+	{
+	return (new(ELeave)CUpnpRequestComposerTest());
+	}
+
+
+CUpnpRequestComposerTest::CUpnpRequestComposerTest()
+	{
+	SetTestStepName(KRequestComposerTest);
+	}
+
+CUpnpRequestComposerTest::~CUpnpRequestComposerTest()
+	{
+	}
+
+TVerdict CUpnpRequestComposerTest::doTestStepPreambleL()
+	{
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_CREATEL;
+	__CFLOG_OPEN;
+#endif
+	
+	iSched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iSched);
+
+	//iMBufMgr = CMBufManager::NewL(256 * 1024, iMBufSzAllctr);
+	//iMBufSzAllctr->AddL(KMBuf_MBufSize, (256 * 1024/(KMBuf_MBufSize+sizeof(RMBuf)))-1, KMBuf_MinGrowth, KMBuf_GrowthThreshold);
+	iMBufMgr = CChunkManager::NewL ( 256 * 1024 );
+	iMBufMgr->AddPoolL(KMBuf_MBufSize, (256 * 1024/(KMBuf_MBufSize+sizeof(RMBuf)))-1, KMBuf_MinGrowth, KMBuf_GrowthThreshold);
+
+	iRequestBuffer.Create(KCMaxMsgLen);
+
+	iStringPool.OpenL(TUPnPTable::Table());
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iStringPool);
+	iRequest = CRequest::NewL(*iCodec, iStringPool);
+	iRequestComposer = CUpnpRequestComposer::NewL(*this);
+	
+	iRequestBody = NULL;
+
+	return TestStepResult();
+	}
+
+TVerdict CUpnpRequestComposerTest::doTestStepL()
+	{
+	TBool requestBodyPresence;
+	TPtrC requestMethod;
+	TPtrC uri;
+	TInt noOfHdrValPairs;
+	TInt noOfHdrParamValPairs;
+	RMemoryAllocator allocator ( iMBufMgr );
+	
+	if( !GetStringFromConfig(ConfigSection(), KRequestMethod, requestMethod) ||
+		!GetStringFromConfig(ConfigSection(), KUri, uri) ||
+		!GetBoolFromConfig(ConfigSection(), KRequestBodyPresence, requestBodyPresence) ||
+		!GetIntFromConfig(ConfigSection(), KNoOfHdrValPairs, noOfHdrValPairs) ||
+		!GetIntFromConfig(ConfigSection(), KNoOfHdrParamValPairs, noOfHdrParamValPairs)
+			)
+		{
+		ERR_PRINTF6(_L("===> Problem in reading values from ini.			\
+				\nExpected fields are: \n%S\n%S\n%S\n%S\n%S <==="
+			  ), &KRequestMethod, &KUri, &KRequestBodyPresence,
+			  &KNoOfHdrValPairs, &KNoOfHdrParamValPairs);
+		
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	SetTestStepResult(EPass);
+	
+	// Construct and set the request method
+	TRAPD(err, ConstructRequestMethodL(requestMethod));
+	if(err != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	// Construct and set the request uri
+	TRAP(err, ConstructRequestUriL(uri));
+	if(err != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();	
+		}
+	
+	// Construct and set the request headers
+	TRAP(err, ConstructRequestHeadersL(noOfHdrValPairs, noOfHdrParamValPairs));
+	if( err != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	// Construct the request body reqd from the ini file
+	TRAP(err, ConstructRequestBodyL(requestBodyPresence));
+	if(err != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	if(requestBodyPresence)
+		{
+		RMemChunk tmpRequestBody;
+		tmpRequestBody.CreateL(*iRequestBody, allocator);
+		iRequest->AddBody(this);
+		}
+	
+	TRAPD(error, iRequestComposer->ComposeRequest(iRequest));
+	if(error != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	CRequest& request = iRequestComposer->Request();
+	CActiveScheduler::Start();
+	return TestStepResult();
+	}
+
+
+TVerdict CUpnpRequestComposerTest::doTestStepPostambleL()
+	{
+	if(iRequest)
+		delete iRequest;
+	
+	iStringPool.Close();
+	
+	if(iRequestComposer)
+		delete iRequestComposer;
+	
+	if(iMBufMgr)
+		delete iMBufMgr;
+	
+	delete iCodec;
+	delete iSched;
+	
+	if(iRequestBody)
+		delete iRequestBody;
+	
+	iRequestBuffer.Close();
+	
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_CLOSE;
+	__CFLOG_DELETE;
+#endif
+	
+	REComSession::FinalClose();
+	return TestStepResult();
+	}
+
+
+void CUpnpRequestComposerTest::ConstructRequestMethodL(const TDesC& aRequestMethod)
+	{
+	RRequest request = iRequest->Handle();
+		
+	// set the request method
+	HBufC8* requestMethod8 = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aRequestMethod);
+	CleanupStack::PushL(requestMethod8);
+	RStringF method = iStringPool.OpenFStringL(requestMethod8->Des());
+	request.SetMethod(method);
+	method.Close();
+	CleanupStack::PopAndDestroy(requestMethod8);
+	}
+
+
+void CUpnpRequestComposerTest::ConstructRequestUriL(const TDesC& aRequestUri)
+	{
+	RRequest request = iRequest->Handle();
+
+	// set the request Uri
+	HBufC8* uri8 = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aRequestUri);
+	CleanupStack::PushL(uri8);
+	TUriParser8 uri;
+	uri.Parse(uri8->Des());
+	request.SetURIL(uri);
+	CleanupStack::PopAndDestroy(uri8);
+	}
+
+
+void CUpnpRequestComposerTest::ConstructRequestHeadersL(const TInt aNoOfHdrValPairs, const TInt aNoOfHdrParamValPairs)
+	{
+	// Create the "Header: Value" pair array.
+	TInt headersCounter = 1;
+	while(headersCounter <= aNoOfHdrValPairs)
+		{
+		TPtrC headerValuePair;
+		TBuf<20> buf(KNullDesC);
+		
+		// The below line is to create formats such as
+		// HeaderValuePair1, HeaderValuePair2...
+		buf.Format(KHeaderValuePair, headersCounter);
+		
+		GetStringFromConfig(ConfigSection(), buf, headerValuePair);
+		HBufC8* headerValuePairBuf;
+		headerValuePairBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L(headerValuePair);
+		CleanupStack::PushL(headerValuePairBuf);
+		TPtrC8 headerValPairPtr(headerValuePairBuf->Des());
+		TInt consumed = headerValPairPtr.Locate(colon);
+		User::LeaveIfError(consumed);
+		
+		// Get the header. i.e, the string before the ':'
+		TPtrC8 header = headerValPairPtr.Left(consumed);
+		
+		if(header.Compare(_L8("EXT")) == 0)
+			{
+			SetHeaderL(header, KNullDesC8);	
+			}
+		else
+			{
+			headerValPairPtr.Set(headerValPairPtr.Mid(consumed+1));
+			User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(headerValPairPtr, InetProtTextUtils::ERemoveBoth));
+		
+			// The left over data is the value for the header.
+			SetHeaderL(header, headerValPairPtr);
+			}
+		CleanupStack::PopAndDestroy(headerValuePairBuf);
+		headersCounter++;		
+		}
+	
+	// Create the "Header: param=value" array.
+	TInt headerParamsCounter = 1;
+	while(headerParamsCounter <= aNoOfHdrParamValPairs)
+		{
+		TPtrC headerParamValPair;
+		TBuf<30> buf(KNullDesC);
+		
+		// The below line is to create formats such as
+		// HeaderParamValPair1, HeaderParamValPair2...
+		buf.Format(KHeaderParamValPair, headerParamsCounter);
+		
+		GetStringFromConfig(ConfigSection(), buf, headerParamValPair);
+		HBufC8* hdrParamValPairBuf;
+		hdrParamValPairBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L(headerParamValPair);
+		CleanupStack::PushL(hdrParamValPairBuf);
+		
+		TPtrC8 hdrParamValPairPtr(hdrParamValPairBuf->Des());
+		TInt consumed = hdrParamValPairPtr.Locate(colon);
+		User::LeaveIfError(consumed);
+		
+		// Get the header. i.e, the string before the ':'
+		TPtrC8 header = hdrParamValPairPtr.Left(consumed);
+		
+		hdrParamValPairPtr.Set(hdrParamValPairPtr.Mid(consumed+1));
+		User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(hdrParamValPairPtr, InetProtTextUtils::ERemoveBoth));
+		
+		// The left over data has the "param=value" pair
+		consumed = hdrParamValPairPtr.Locate(equal);
+		User::LeaveIfError(consumed);
+		
+		// Get the param name. i.e, the string before the '='
+		TPtrC8 param = hdrParamValPairPtr.Left(consumed);
+		
+		hdrParamValPairPtr.Set(hdrParamValPairPtr.Mid(consumed+1));
+		User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(hdrParamValPairPtr, InetProtTextUtils::ERemoveBoth));
+		
+		consumed = hdrParamValPairPtr.Locate(partIdx);
+		
+		TPtrC8 paramVal = hdrParamValPairPtr.Left(consumed-1);
+		
+		hdrParamValPairPtr.Set(hdrParamValPairPtr.Mid(consumed+1));
+		
+		// hdrParamValPairPtr now has the part index. Convert it to Integer
+		TInt partIndex;
+		InetProtTextUtils::ConvertDescriptorToInt(hdrParamValPairPtr, partIndex);
+		
+		if( partIndex > (aNoOfHdrValPairs-1) )
+			{
+			ERR_PRINTF1(_L("===> Illegal index value for the parameter value <===="));
+			User::Leave(KErrGeneral);
+			}
+			
+		SetParamL(header, param, paramVal, partIndex);
+		
+		CleanupStack::PopAndDestroy(hdrParamValPairBuf);
+		headerParamsCounter++;
+		}
+	}
+
+void CUpnpRequestComposerTest::SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue)
+	{
+	RRequest request = iRequest->Handle();
+	RHTTPHeaders headers = request.GetHeaderCollection();
+	THTTPHdrVal val;
+
+	RStringF headerSF = iStringPool.OpenFStringL(aHeader);
+	CleanupClosePushL(headerSF);
+	
+	if( (headerSF == iStringPool.StringF(UPnP::EMX, TUPnPTable::Table())) || (headerSF == iStringPool.StringF(HTTP::EContentLength, THTTPTable::Table())) || (headerSF == iStringPool.StringF(UPnP::ETimeout, TUPnPTable::Table())))
+		{
+		TInt intVal;
+		InetProtTextUtils::ConvertDescriptorToInt(aValue, intVal);
+		val.SetInt(intVal);	
+		headers.SetFieldL(headerSF, val);
+		}
+		
+	else
+		{
+		RStringF ValSF = iStringPool.OpenFStringL(aValue);
+		CleanupClosePushL(ValSF);
+
+		val.SetStrF(ValSF);
+		headers.SetFieldL(headerSF, val);
+
+		CleanupStack::PopAndDestroy(&ValSF);
+		}	
+	
+	CleanupStack::PopAndDestroy(&headerSF);
+	}
+
+
+void CUpnpRequestComposerTest::SetParamL(const TDesC8& aHeader, const TDesC8& aParam, const TDesC8& aValue, const TInt aPartIndex)
+	{
+	RRequest request = iRequest->Handle();
+	RHTTPHeaders headers = request.GetHeaderCollection();
+
+	RStringF headerSF = iStringPool.OpenFStringL(aHeader);
+	CleanupClosePushL(headerSF);
+	RStringF paramSF = iStringPool.OpenFStringL(aParam);
+	CleanupClosePushL(paramSF);
+	
+	THTTPHdrVal val;
+	
+	if((aParam.Compare(iStringPool.StringF(HTTP::EQ, THTTPTable::Table()).DesC()) == 0))
+		{
+		if((aValue.Compare(_L8("0.1"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.5));
+			}
+		else if((aValue.Compare(_L8("0.2"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.2));
+			}
+		else if((aValue.Compare(_L8("0.3"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.3));
+			}
+		else if((aValue.Compare(_L8("0.4"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.4));
+			}
+		else if((aValue.Compare(_L8("0.5"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.5));
+			}
+		else if((aValue.Compare(_L8("0.6"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.6));
+			}
+		else if((aValue.Compare(_L8("0.7"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.7));
+			}
+		else if((aValue.Compare(_L8("0.8"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.8));
+			}
+		else if((aValue.Compare(_L8("0.9"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.9));
+			}
+		
+		headers.SetParamL(headerSF, paramSF, val, aPartIndex);
+		CleanupStack::PopAndDestroy(&paramSF);
+		CleanupStack::PopAndDestroy(&headerSF);
+		}
+
+	else
+		{
+		RStringF valueSF = iStringPool.OpenFStringL(aValue);
+		CleanupClosePushL(valueSF);
+		val.SetStrF(valueSF);	
+		
+		headers.SetParamL(headerSF, paramSF, val, aPartIndex);
+	
+		CleanupStack::PopAndDestroy(&valueSF);
+		CleanupStack::PopAndDestroy(&paramSF);
+		CleanupStack::PopAndDestroy(&headerSF);
+		}	
+	}
+
+
+void CUpnpRequestComposerTest::ConstructRequestBodyL(const TBool aRequestBodyPresence)
+	{
+	TPtrC body;
+	if(iRequestBody)
+		{
+		delete iRequestBody;
+		iRequestBody = NULL;
+		}
+
+	if(aRequestBodyPresence)
+		{
+		if(!GetStringFromConfig(ConfigSection(), KBody, body))
+			{
+			ERR_PRINTF1(_L("===> Problem in reading request body from ini file <===="));
+			SetTestStepResult(EFail);
+			}
+		iRequestBody = CnvUtfConverter::ConvertFromUnicodeToUtf8L(body);
+		}
+	else
+		{
+		iRequestBody = CnvUtfConverter::ConvertFromUnicodeToUtf8L(KNullDesC);
+		}
+	}
+
+
+void CUpnpRequestComposerTest::ComposingConcluded()
+	{
+	INFO_PRINTF1(_L("\n********** REQUEST COMPOSING CONCLUDED **********"));
+	INFO_PRINTF1(_L("\n===> Entire Request: C:\\logs\\UpnpMessageTestLogs\\composedrequests.dump <==="));
+	CActiveScheduler::Stop();
+	
+	RFs fs;
+	TInt error = fs.Connect();
+	if(error == KErrNone)
+		{
+		error = fs.MkDir(KDirName);
+		if(error == KErrNone)
+			{
+			RFile file;
+			TInt err = file.Create(fs, KFileName, EFileWrite);
+			if(err == KErrAlreadyExists )
+				{
+				if(ConfigSection().Compare(KRCTest) == 0)
+					{
+					file.Replace(fs, KFileName, EFileWrite);	
+					}
+				else
+					{
+					file.Open(fs, KFileName, EFileWrite);	
+					}	
+				}
+			TInt pos = 0;
+			file.Seek(ESeekEnd, pos);
+			file.Write(pos, _L8("\n"));
+			file.Write(iRequestBuffer);
+			file.Close();
+			}
+		fs.Close();
+		}
+	iRequestComposer->ResetComposer();
+	}
+
+
+void CUpnpRequestComposerTest::MessageDataReadyL(RBuf8& aData)
+	{
+	INFO_PRINTF1(_L("\n********** MESSAGE DATA READY **********"));
+	
+	/*
+	TBuf8<KMaxMsgLen> buf;
+	buf.SetLength(aData.Length());
+	buf.FillZ(aData.Length());
+	aData.CopyOut(buf);
+	*/
+	
+	TInt responseBufferLen = iRequestBuffer.Length();
+	if( (responseBufferLen + aData.Length()) > KCMaxMsgLen )
+		{
+		iRequestBuffer.ReAlloc(responseBufferLen + aData.Length());	
+		}
+	
+	iRequestBuffer.Append(aData);
+	iRequestComposer->RequestDataSent();
+	}
+
+
+void CUpnpRequestComposerTest::ComposerError(TInt aError)
+	{
+	INFO_PRINTF1(_L("\n********** REQUEST COMPOSER ERROR **********"));
+	INFO_PRINTF2(_L("\n===> Error: %d <==="), aError);
+	SetTestStepResult(EFail);
+	CActiveScheduler::Stop();
+	}
+
+
+TBool CUpnpRequestComposerTest::GetNextDataPart(TPtrC8& aDataPart)
+	{
+	aDataPart.Set(iRequestBody->Des());
+	return ETrue;
+	}
+
+
+void CUpnpRequestComposerTest::ReleaseData()
+	{
+	// do nothing
+	}
+
+
+TInt CUpnpRequestComposerTest::OverallDataSize()
+	{
+	return iRequestBody->Length();
+	}
+
+
+TInt CUpnpRequestComposerTest::Reset()
+	{
+	return KErrNotSupported;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnprequestparsertest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,389 @@
+// 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 <http/thttphdrfielditer.h>
+#include <httpstringconstants.h>
+#include <http/thttptable.h>
+#include <stringpool.h>
+#include <utf.h>
+#include <http/framework/cheadercodecplugin.h>
+#include <upnp/tupnptable.h>
+
+
+#include "cupnprequestparsertest.h"
+#include "rhttpheaders.h"
+
+_LIT8(KUpnpCodecName, "HTTP/UPnP");
+
+CUpnpRequestParserTest* CUpnpRequestParserTest::NewL()
+	{
+	return (new(ELeave) CUpnpRequestParserTest());	
+	}
+
+
+CUpnpRequestParserTest::CUpnpRequestParserTest()
+	{
+	SetTestStepName(KRequestParserTest);
+	}
+
+
+CUpnpRequestParserTest::~CUpnpRequestParserTest()
+	{
+	}
+
+
+TVerdict CUpnpRequestParserTest::doTestStepPreambleL()
+	{
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_CREATEL;
+	__CFLOG_OPEN;
+#endif
+	
+	iIsStarted = EFalse;
+	iError = KErrNone;
+	iSched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iSched);
+
+	//iMBufMgr = CMBufManager::NewL(256 * 1024, iMBufSzAllctr);
+	//iMBufSzAllctr->AddL(KMBuf_MBufSize, (256 * 1024/(KMBuf_MBufSize+sizeof(RMBuf)))-1, KMBuf_MinGrowth, KMBuf_GrowthThreshold);
+	iMBufMgr = CChunkManager::NewL ( 256 * 1024 );
+	iMBufMgr->AddPoolL(KMBuf_MBufSize, (256 * 1024/(KMBuf_MBufSize+sizeof(RMBuf)))-1, KMBuf_MinGrowth, KMBuf_GrowthThreshold);
+	
+	iStringPool.OpenL(TUPnPTable::Table());
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iStringPool);
+	iRequest = CRequest::NewL(*iCodec, iStringPool);	
+	iRequestParser = CUpnpRequestParser::NewL(*this);
+
+	iDataChunk = NULL;
+	if(!iDataChunkChain.IsEmpty())
+		iDataChunkChain.Free();
+	
+	GetIntFromConfig( ConfigSection(), KDataChunkCount, iDataChunkCount );
+	
+	TInt dataChunkCountIter = 1;
+	
+	while( dataChunkCountIter <= iDataChunkCount )
+		{
+		TPtrC dataChunk;
+		TBuf<10> buf(KNullDesC);
+		
+		// The below line is to create formats such as
+		// DataChunk1, DataChunk2, DataChunk3...
+		buf.Format(KDataChunk, dataChunkCountIter);
+		
+		GetStringFromConfig(ConfigSection(), buf, dataChunk);
+		RBuf tt;
+		tt.CreateL(dataChunk);
+		CleanupClosePushL(tt);
+		TRAPD(error, NegateEscapeEncodeL(tt));
+		if(error != KErrNone)
+			{
+			SetTestStepResult(EFail);
+			return TestStepResult();
+			}
+		dataChunkCountIter++;
+		CleanupStack::PopAndDestroy(&tt);
+		}
+	
+	TPtrC8 dataChunk8(iDataChunkArray[0]->Des());
+	RMemoryAllocator allocator ( iMBufMgr );	
+	TRAPD(error, iDataChunkChain.CreateL(dataChunk8, allocator));
+	if(error != KErrNone)	
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	return TestStepResult();
+	}
+
+
+TVerdict CUpnpRequestParserTest::doTestStepL()
+	{
+	TPtrC dataChunk;
+		
+    if (
+    	!GetStringFromConfig(ConfigSection(), KDataChunk1, dataChunk)	||
+    	!GetBoolFromConfig(ConfigSection(), KParseExcessData, iNeedToParseExcessData)	||
+    	!GetIntFromConfig(ConfigSection(), KExpectedRequests, iExpectedRequests)	||
+    	!GetIntFromConfig( ConfigSection(), KDataChunkCount, iDataChunkCount )
+    	)
+		{
+		ERR_PRINTF5(_L("===> Problem in reading values from ini.			\
+						\nExpected fields are: \n%S\n%S\n%S\n%S <==="
+					  ), &KDataChunk1, &KParseExcessData, &KExpectedRequests, 
+					  &KDataChunkCount );
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	SetTestStepResult(EPass);	
+
+	iRequestParser->ParseRequest(iDataChunkChain, iRequest);
+	if(iError == KErrNone)
+		{
+		iIsStarted = ETrue;
+		CActiveScheduler::Start();
+		}
+	else
+		{
+		SetTestStepResult(EFail);	
+		}	
+
+	return TestStepResult();
+	}
+
+
+TVerdict CUpnpRequestParserTest::doTestStepPostambleL()
+	{
+	if(iRequestParser)
+		delete iRequestParser;
+
+	if(iRequest)
+		delete iRequest;
+	
+	iStringPool.Close();
+	
+	if(!iDataChunkChain.IsEmpty())
+		{
+		iDataChunkChain.Free();
+		}
+	
+	if(iMBufMgr)
+		delete iMBufMgr;
+		
+	delete iCodec;
+	delete iSched;
+	
+	iDataChunkArray.ResetAndDestroy();
+	iDataChunkArray.Close();
+
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_CLOSE;
+	__CFLOG_DELETE;
+#endif
+	
+	REComSession::FinalClose();
+	return TestStepResult();
+	}
+
+
+void CUpnpRequestParserTest::GotBodyData()
+	{
+	INFO_PRINTF1(_L("\n********** GOT REQUEST BODY **********"));
+	
+	iDataSupplier = iRequest->Body();
+		
+	INFO_PRINTF2(_L("\n===> BODY CHUNK LENGTH: %d <==="), iDataSupplier->OverallDataSize());
+	
+	TPtrC8 ptr;
+	iDataSupplier->GetNextDataPart(ptr);
+	
+	TBuf8<1024> buf8(ptr);
+	TBuf<1024> buf;
+	buf.Copy(buf8);
+	
+	INFO_PRINTF2(_L("\n===> BODY: %S <==="), &buf);
+	
+	iDataSupplier->ReleaseData();
+	iDataSupplier->Reset();
+	iDataSupplier->ReleaseData();
+	}
+
+
+void CUpnpRequestParserTest::DataParsed()
+	{
+	INFO_PRINTF1(_L("\n********** REQUEST DATA PARSED **********"));
+	
+	RMemoryAllocator allocator( iMBufMgr );
+	
+	if( (iDataChunkArray.Count() > 0) && (iDataChunkCount > 1) && (iDataChunkPtr.Length() == 0) )
+		{
+		HBufC8* firstChunk = iDataChunkArray[0];
+		iDataChunkArray.Remove(0);
+		delete firstChunk;
+		}
+	
+	if( (iDataChunkArray.Count() > 0) && (iDataChunkCount > 1) && (iDataChunkPtr.Length() == 0) )
+		{
+		TPtrC8 dataChunk8(iDataChunkArray[0]->Des());
+		if(!iDataChunkChain.IsEmpty())
+			{
+			iDataChunkChain.Free();
+			}
+		
+		TRAPD(error, iDataChunkChain.CreateL(dataChunk8, allocator));
+		if(error != KErrNone)
+			{
+			ParserError(error);
+			return;
+			}
+
+		iRequestParser->ParseRequest(iDataChunkChain, iRequest);
+		}
+
+	if ( (iNeedToParseExcessData) && (iDataChunkPtr.Length() > 0))
+		{
+		if(iRequestParser)
+			{
+			iRequestParser->ResetParser();
+			iRequest->Reset();
+			}
+
+		if(!iDataChunkChain.IsEmpty())
+			{
+			iDataChunkChain.Free();
+			}
+		
+		TRAPD(error, iDataChunkChain.CreateL(iDataChunkPtr, allocator));
+		if(error != KErrNone)
+			{
+			ParserError(error);
+			return;
+			}
+		
+		if(iRequestParser)
+			{
+			iRequestParser->ParseRequest(iDataChunkChain, iRequest);
+			}
+		iDataChunkPtr.Set(KNullDesC8);
+		}
+	}
+
+
+void CUpnpRequestParserTest::GotHeaders()
+	{
+	INFO_PRINTF1(_L("\n********** GOT REQUEST HEADERS **********"));
+	
+	TInt version = iRequest->Handle().IsHTTP10();
+			
+	const TDesC8& requestMethod8 = iRequest->Handle().Method().DesC();
+	TBuf<KMaxHeaderNameLen> requestMethod;
+	requestMethod.Copy(requestMethod8);
+	
+	const TDesC8& requestUri8 = iRequest->Handle().URI().UriDes();
+	TBuf<KMaxHeaderNameLen> requestUri;
+	requestUri.Copy(requestUri8);
+	
+	TVersion ver = iRequest->Version();
+	
+	INFO_PRINTF5(_L("\n===> REQUEST START LINE: %S %S HTTP/%d.%d<==="), &requestMethod, &requestUri, ver.iMajor, ver.iMinor);
+
+	RHTTPHeaders hdr = iRequest->Handle().GetHeaderCollection();
+	THTTPHdrFieldIter it = hdr.Fields();
+		
+	TBuf<KMaxHeaderNameLen>  fieldName16;
+	TBuf<KMaxHeaderValueLen> fieldVal16;
+
+	while (it.AtEnd() == EFalse)
+		{
+		RStringTokenF fieldName = it();
+		RStringF fieldNameStr = iStringPool.StringF(fieldName);
+		TRAP_IGNORE(iRequest->Handle().GetHeaderCollection().FieldPartsL(fieldNameStr));
+		
+		TPtrC8 rawData8;
+		hdr.GetRawField(fieldNameStr, rawData8);
+
+		const TDesC8& fieldNameDesC = fieldNameStr.DesC();
+		fieldName16.Copy(fieldNameDesC.Left(KMaxHeaderNameLen));
+		fieldVal16.Copy(rawData8);
+		INFO_PRINTF3(_L("\n===> %S: %S <==="), &fieldName16, &fieldVal16);
+
+		++it;
+		}
+	}
+
+
+void CUpnpRequestParserTest::ParsingComplete(RMemChunk& aExcessData)
+	{
+	INFO_PRINTF1(_L("\n********** REQUEST PARSING COMPLETED **********"));
+	
+	if(--iExpectedRequests == 0)
+		{
+		CActiveScheduler::Stop();
+		iIsStarted = EFalse;	
+		}
+
+	TInt len = aExcessData.Length();
+	if(len > 0)
+		{
+		iExcessData8.SetLength(len);
+		iExcessData8.FillZ(len);
+		aExcessData.CopyOut(iExcessData8);
+
+#ifdef __WINSCW__
+		TBuf<KMaxMsgLen> excessData16;
+		excessData16.Copy(iExcessData8);
+		INFO_PRINTF2(_L("\n===> EXCESS DATA: %S <==="), &excessData16);
+#endif	
+
+		if(iNeedToParseExcessData)
+			{
+			iRequest->Reset();
+			iDataChunkPtr.Set(iExcessData8);
+			}
+		}
+	}
+
+	
+void CUpnpRequestParserTest::ParserError(TInt aError)
+	{
+	INFO_PRINTF1(_L("\n********** REQUEST PARSER ERROR **********"));
+	INFO_PRINTF2(_L("\n===> Error: %d <==="), aError);
+	SetTestStepResult(EFail);
+	if(iIsStarted)
+		{
+		CActiveScheduler::Stop();
+		}
+	else
+		{
+		iError = aError;
+		}	
+	}
+
+	
+void CUpnpRequestParserTest::NegateEscapeEncodeL(const TDesC& aDes)
+	{
+	HBufC* buf = HBufC::NewL(KMaxMsgLen);
+	CleanupStack::PushL(buf);
+	TPtr tmpBuf(buf->Des());
+	TPtrC ptr(aDes);
+	
+	while(ptr.Length() > 0)
+		{
+		TInt pos = ptr.Locate(backSlash);
+		if(pos == KErrNotFound)
+			{
+			tmpBuf.Append(ptr);
+			break;
+			}
+		else
+			{
+			tmpBuf.Append(ptr.Left(pos));
+			tmpBuf.Append(KCRLF);
+			ptr.Set(ptr.Mid(pos+4));
+			}
+		}
+	iDataChunk = CnvUtfConverter::ConvertFromUnicodeToUtf8L(*buf);
+	TRAPD(err, iDataChunkArray.AppendL(iDataChunk));
+	if(err != KErrNone)
+		{
+		delete iDataChunk;
+		iDataChunk = NULL;
+		User::Leave(err);
+		}
+	CleanupStack::PopAndDestroy(buf);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnpresponsecomposertest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,511 @@
+// 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 <httpstringconstants.h>
+#include <http/thttptable.h>
+#include <stringpool.h>
+#include <utf.h>
+#include <inetprottextutils.h>
+#include <http/thttphdrval.h>
+#include <uri8.h>
+#include <http/framework/cheadercodecplugin.h>
+#include <upnp/tupnptable.h>
+
+#include "cupnpresponsecomposertest.h"
+#include "rhttpheaders.h"
+
+_LIT(KFileName, "C:\\logs\\UpnpMessageTestLogs\\composedresponses.dump");
+_LIT(KRCTest, "RESPONSE_COMPOSER_TEST_1");
+
+_LIT8(KUpnpCodecName, "HTTP/UPnP");
+
+
+const TInt KMaxStatusTextLen = 50;
+
+
+CUpnpResponseComposerTest* CUpnpResponseComposerTest::NewL()
+	{
+	return (new(ELeave) CUpnpResponseComposerTest());
+	}
+
+
+CUpnpResponseComposerTest::CUpnpResponseComposerTest()
+	{
+	SetTestStepName(KResponseComposerTest);
+	}
+
+
+CUpnpResponseComposerTest::~CUpnpResponseComposerTest()
+	{
+	}
+
+
+TVerdict CUpnpResponseComposerTest::doTestStepPreambleL()
+	{
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_CREATEL;
+	__CFLOG_OPEN;
+#endif
+	
+	iSched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iSched);
+
+	//iMBufMgr = CMBufManager::NewL(256 * 1024, iMBufSzAllctr);
+	//iMBufSzAllctr->AddL(KMBuf_MBufSize, (256 * 1024/(KMBuf_MBufSize+sizeof(RMBuf)))-1, KMBuf_MinGrowth, KMBuf_GrowthThreshold);
+	iMBufMgr = CChunkManager::NewL ( 256 * 1024 );
+	iMBufMgr->AddPoolL(KMBuf_MBufSize, (256 * 1024/(KMBuf_MBufSize+sizeof(RMBuf)))-1, KMBuf_MinGrowth, KMBuf_GrowthThreshold);
+
+	iResponseBuffer.Create(KCMaxMsgLen);
+	iStringPool.OpenL(TUPnPTable::Table());
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iStringPool);
+	iResponse = CResponse::NewL(*iCodec, iStringPool);	
+	iResponseComposer = CUpnpResponseComposer::NewL(*this);
+	
+	iResponseBody = NULL;
+	
+	return TestStepResult();
+	}
+
+TVerdict CUpnpResponseComposerTest::doTestStepL()
+	{
+	TBool responseBodyPresence;
+	TInt responseStatusCode;
+	TPtrC responseStatusText;
+	TInt noOfHdrValPairs;
+	TInt noOfHdrParamValPairs;
+	RMemoryAllocator allocator ( iMBufMgr );
+	
+	if( !GetIntFromConfig(ConfigSection(), KResponseStatusCode, responseStatusCode) ||
+		!GetStringFromConfig(ConfigSection(), KResponseStatusText, responseStatusText) ||
+		!GetBoolFromConfig(ConfigSection(), KResponseBodyPresence, responseBodyPresence) ||
+		!GetIntFromConfig(ConfigSection(), KNoOfHdrValPairs, noOfHdrValPairs) ||
+		!GetIntFromConfig(ConfigSection(), KNoOfHdrParamValPairs, noOfHdrParamValPairs)
+			)
+		{
+		ERR_PRINTF6(_L("===> Problem in reading values from ini.			\
+				\nExpected fields are: \n%S\n%S\n%S\n%S\n%S <==="
+			  ), &KResponseStatusCode, &KResponseStatusText, &KResponseBodyPresence,
+			  &KNoOfHdrValPairs, &KNoOfHdrParamValPairs);
+		
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	SetTestStepResult(EPass);
+	
+	// Construct the status line
+	TRAPD(err, ConstructResponseStatusLineL(responseStatusCode, responseStatusText));
+	if( err != KErrNone )
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	// Construct and set the request headers
+	TRAP(err, ConstructResponseHeadersL(noOfHdrValPairs, noOfHdrParamValPairs));
+	if( err != KErrNone )
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+
+	// Construct the request body reqd from the ini file
+	TRAP(err, ConstructResponseBodyL(responseBodyPresence));
+	if(err != KErrNone)
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+		
+	if(responseBodyPresence)
+		{
+		RMemChunk tmpResponseBody;
+		tmpResponseBody.CreateL(*iResponseBody, allocator);
+		iResponse->AddBody(this);
+		}
+
+	iResponseComposer->ComposeResponse(iResponse);
+	CActiveScheduler::Start();
+	
+	return TestStepResult();
+	}
+
+
+TVerdict CUpnpResponseComposerTest::doTestStepPostambleL()
+	{	
+	if(iResponse)
+		delete iResponse;
+	
+	iStringPool.Close();
+		
+	if(iResponseComposer)
+		delete iResponseComposer;
+	
+	if(iMBufMgr)
+		delete iMBufMgr;
+	
+	delete iCodec;
+	delete iSched;
+	
+	if(iResponseBody)
+		delete iResponseBody;
+	
+	iResponseBuffer.Close();
+	
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_CLOSE;
+	__CFLOG_DELETE;
+#endif
+	
+	REComSession::FinalClose();
+	return TestStepResult();
+	}
+
+
+void CUpnpResponseComposerTest::ConstructResponseStatusLineL(const TInt aStatusCode, const TDesC& aStatusText)
+	{
+	RResponse response = iResponse->Handle();
+	
+	response.SetStatusCode(aStatusCode);
+	
+	TBuf8<KMaxStatusTextLen> statusBuf8;
+	statusBuf8.Copy(aStatusText);
+	RStringF statusTextSF = iStringPool.OpenFStringL(statusBuf8);
+	
+	response.SetStatusText(statusTextSF);
+	
+	statusTextSF.Close();
+	}
+
+	
+void CUpnpResponseComposerTest::ConstructResponseHeadersL(const TInt aNoOfHdrValPairs, const TInt aNoOfHdrParamValPairs)
+	{
+	// Create the "Header: Value" pair array.
+	TInt headersCounter = 1;
+	while(headersCounter <= aNoOfHdrValPairs)
+		{
+		TPtrC headerValuePair;
+		TBuf<20> buf(KNullDesC);
+		
+		// The below line is to create formats such as
+		// HeaderValuePair1, HeaderValuePair2...
+		buf.Format(KHeaderValuePair, headersCounter);
+		
+		GetStringFromConfig(ConfigSection(), buf, headerValuePair);
+		HBufC8* headerValPairBuf;
+		headerValPairBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L(headerValuePair);
+		CleanupStack::PushL(headerValPairBuf);
+		
+		TPtrC8 headerValPairPtr(headerValPairBuf->Des());
+		TInt consumed = headerValPairPtr.Locate(colon);
+		User::LeaveIfError(consumed);
+		
+		// Get the header. i.e, the string before the ':'
+		TPtrC8 header = headerValPairPtr.Left(consumed);
+		
+		headerValPairPtr.Set(headerValPairPtr.Mid(consumed+1));
+		User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(headerValPairPtr, InetProtTextUtils::ERemoveBoth));
+		
+		// The left over data is the value for the header.
+		SetHeaderL(header, headerValPairPtr);
+ 		
+ 		CleanupStack::PopAndDestroy(headerValPairBuf);
+		headersCounter++;
+		}
+	
+	// Create the "Header: param=value" array.
+	TInt headerParamsCounter = 1;
+	while(headerParamsCounter <= aNoOfHdrParamValPairs)
+		{
+		TPtrC headerParamValPair;
+		TBuf<30> buf(KNullDesC);
+		
+		// The below line is to create formats such as
+		// HeaderParamValPair1, HeaderParamValPair2...
+		buf.Format(KHeaderParamValPair, headerParamsCounter);
+		
+		GetStringFromConfig(ConfigSection(), buf, headerParamValPair);
+		HBufC8* hdrParamValPairBuf;
+		hdrParamValPairBuf = CnvUtfConverter::ConvertFromUnicodeToUtf8L(headerParamValPair);
+		CleanupStack::PushL(hdrParamValPairBuf);
+		
+		TPtrC8 hdrParamValPairPtr(hdrParamValPairBuf->Des());
+		TInt consumed = hdrParamValPairPtr.Locate(colon);
+		User::LeaveIfError(consumed);
+		
+		// Get the header. i.e, the string before the ':'
+		TPtrC8 header = hdrParamValPairPtr.Left(consumed);
+		
+		hdrParamValPairPtr.Set(hdrParamValPairPtr.Mid(consumed+1));
+		User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(hdrParamValPairPtr, InetProtTextUtils::ERemoveBoth));
+		
+		// The left over data has the "param=value" pair
+		consumed = hdrParamValPairPtr.Locate(equal);
+		User::LeaveIfError(consumed);
+		
+		// Get the param name. i.e, the string before the '='
+		TPtrC8 param = hdrParamValPairPtr.Left(consumed);
+		
+		hdrParamValPairPtr.Set(hdrParamValPairPtr.Mid(consumed+1));
+		User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(hdrParamValPairPtr, InetProtTextUtils::ERemoveBoth));
+		
+		consumed = hdrParamValPairPtr.Locate(partIdx);
+		
+		TPtrC8 paramVal = hdrParamValPairPtr.Left(consumed-1);
+		
+		hdrParamValPairPtr.Set(hdrParamValPairPtr.Mid(consumed+1));
+		
+		// hdrParamValPairPtr now has the part index. Convert it to Integer
+		TInt partIndex;
+		InetProtTextUtils::ConvertDescriptorToInt(hdrParamValPairPtr, partIndex);
+		
+		if( partIndex > (aNoOfHdrValPairs-1) )
+			{
+			ERR_PRINTF1(_L("===> Illegal index value for the parameter value <===="));
+			User::Leave(KErrGeneral);
+			}
+			
+		SetParamL(header, param, paramVal, partIndex);
+		
+		CleanupStack::PopAndDestroy(hdrParamValPairBuf);		
+		headerParamsCounter++;
+		}
+	}
+
+
+void CUpnpResponseComposerTest::SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue)
+	{
+	RResponse response = iResponse->Handle();
+	RHTTPHeaders headers = response.GetHeaderCollection();
+	THTTPHdrVal val;
+	
+	RStringF headerSF = iStringPool.OpenFStringL(aHeader);
+	CleanupClosePushL(headerSF);
+	
+	if( (headerSF == iStringPool.StringF(HTTP::EContentLength, THTTPTable::Table())) || (headerSF == iStringPool.StringF(HTTP::EMaxAge, THTTPTable::Table())) )
+		{
+		TInt value;
+		InetProtTextUtils::ConvertDescriptorToInt(aValue, value);
+		val.SetInt(value);
+		headers.SetFieldL(headerSF, val);
+		}
+	
+	else
+		{
+		RStringF ValSF = iStringPool.OpenFStringL(aValue);
+		CleanupClosePushL(ValSF);
+		val.SetStrF(ValSF);
+		headers.SetFieldL(headerSF, val);
+		CleanupStack::PopAndDestroy(&ValSF);
+		}
+
+	CleanupStack::PopAndDestroy(&headerSF);
+	}
+
+
+void CUpnpResponseComposerTest::SetParamL(const TDesC8& aHeader, const TDesC8& aParam, const TDesC8& aValue, const TInt aPartIndex)
+	{
+	RResponse response = iResponse->Handle();
+	RHTTPHeaders headers = response.GetHeaderCollection();
+
+	RStringF headerSF = iStringPool.OpenFStringL(aHeader);
+	CleanupClosePushL(headerSF);
+	RStringF paramSF = iStringPool.OpenFStringL(aParam);
+	CleanupClosePushL(paramSF);
+	
+	THTTPHdrVal val;
+	
+	if((aParam.Compare(iStringPool.StringF(HTTP::EQ, THTTPTable::Table()).DesC()) == 0))
+		{
+		if((aValue.Compare(_L8("0.1"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.5));
+			}
+		else if((aValue.Compare(_L8("0.2"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.2));
+			}
+		else if((aValue.Compare(_L8("0.3"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.3));
+			}
+		else if((aValue.Compare(_L8("0.4"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.4));
+			}
+		else if((aValue.Compare(_L8("0.5"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.5));
+			}
+		else if((aValue.Compare(_L8("0.6"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.6));
+			}
+		else if((aValue.Compare(_L8("0.7"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.7));
+			}
+		else if((aValue.Compare(_L8("0.8"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.8));
+			}
+		else if((aValue.Compare(_L8("0.9"))) == 0)
+			{
+			val.SetInt(THTTPHdrVal::TQConv(0.9));
+			}
+		
+		headers.SetParamL(headerSF, paramSF, val, aPartIndex);
+		CleanupStack::PopAndDestroy(&paramSF);
+		CleanupStack::PopAndDestroy(&headerSF);
+		}
+
+	else
+		{
+		RStringF valueSF = iStringPool.OpenFStringL(aValue);
+		CleanupClosePushL(valueSF);
+		val.SetStrF(valueSF);	
+		
+		headers.SetParamL(headerSF, paramSF, val, aPartIndex);
+	
+		CleanupStack::PopAndDestroy(&valueSF);
+		CleanupStack::PopAndDestroy(&paramSF);
+		CleanupStack::PopAndDestroy(&headerSF);
+		}	
+	}
+
+
+void CUpnpResponseComposerTest::ConstructResponseBodyL(const TBool aResponseBodyPresence)
+	{
+	TPtrC body;
+	
+	if(iResponseBody)
+		{
+		delete iResponseBody;
+		iResponseBody = NULL;
+		}
+
+	if(aResponseBodyPresence)
+		{
+		if(!GetStringFromConfig(ConfigSection(), KBody, body))
+			{
+			ERR_PRINTF1(_L("===> Problem in reading response body from ini file <===="));
+			SetTestStepResult(EFail);
+			}
+		iResponseBody = CnvUtfConverter::ConvertFromUnicodeToUtf8L(body);
+		}
+	else
+		{
+		iResponseBody = CnvUtfConverter::ConvertFromUnicodeToUtf8L(KNullDesC);
+		}
+	}
+
+
+void CUpnpResponseComposerTest::ComposingConcluded()
+	{
+	INFO_PRINTF1(_L("\n********** RESPONSE COMPOSING CONCLUDED **********"));
+	CActiveScheduler::Stop();
+	
+	INFO_PRINTF1(_L("\n===> Entire Response: C:\\logs\\UpnpMessageTestLogs\\composedresponses.dump <==="));
+	
+	RFs fs;
+	
+	TInt error = fs.Connect();
+	if(error == KErrNone)
+		{
+		error = fs.MkDir(KDirName);
+		if(error == KErrNone)
+			{
+			RFile file;
+			TInt err = file.Create(fs, KFileName, EFileWrite);
+			if(err == KErrAlreadyExists )
+				{
+				if(ConfigSection().Compare(KRCTest) == 0)
+					{
+					file.Replace(fs, KFileName, EFileWrite);	
+					}
+				else
+					{
+					file.Open(fs, KFileName, EFileWrite);	
+					}	
+				}
+			TInt pos = 0;
+			file.Seek(ESeekEnd, pos);
+			file.Write(pos, _L8("\n"));
+			file.Write(pos, iResponseBuffer);
+			file.Close();
+			}
+		fs.Close();
+		}
+	iResponseComposer->ResetComposer();
+	}
+
+
+void CUpnpResponseComposerTest::MessageDataReadyL(RBuf8& aData)
+	{
+	INFO_PRINTF1(_L("\n********** MESSAGE DATA READY **********"));
+	
+	/*
+	TBuf8<KMaxMsgLen> buf;
+	buf.SetLength(aData.Length());
+	buf.FillZ(aData.Length());
+	aData.CopyOut(buf);
+	*/
+	
+	TInt responseBufferLen = iResponseBuffer.Length();
+	//if( (responseBufferLen + buf.Length()) > KCMaxMsgLen )
+	if( (responseBufferLen + aData.Length()) > KCMaxMsgLen )
+		{
+		iResponseBuffer.ReAlloc(responseBufferLen + aData.Length());	
+		}
+	//iResponseBuffer.Append(buf);
+	iResponseBuffer.Append(aData);
+	iResponseComposer->ResponseDataSent();
+	}
+
+
+void CUpnpResponseComposerTest::ComposerError(TInt aError)
+	{
+	INFO_PRINTF1(_L("\n********** RESPONSE COMPOSER ERROR **********"));
+	INFO_PRINTF2(_L("\n===> Error: %d <==="), aError);
+	SetTestStepResult(EFail);
+	CActiveScheduler::Stop();
+	}
+
+
+TBool CUpnpResponseComposerTest::GetNextDataPart(TPtrC8& aDataPart)
+	{
+	aDataPart.Set(iResponseBody->Des());
+	return ETrue;
+	}
+
+
+void CUpnpResponseComposerTest::ReleaseData()
+	{
+	// do nothing
+	}
+
+
+TInt CUpnpResponseComposerTest::OverallDataSize()
+	{
+	return iResponseBody->Length();
+	}
+
+
+TInt CUpnpResponseComposerTest::Reset()
+	{
+	return KErrNotSupported;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/src/cupnpresponseparsertest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,402 @@
+// 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 <http/thttphdrfielditer.h>
+#include <httpstringconstants.h>
+#include <http/thttptable.h>
+#include <stringpool.h>
+#include <utf.h>
+#include <http/framework/cheadercodecplugin.h>
+#include <e32debug.h>
+#include <upnp/tupnptable.h>
+
+#include "cupnpresponseparsertest.h"
+#include "rhttpheaders.h"
+
+_LIT8(KUpnpCodecName, "HTTP/UPnP");
+_LIT(KTest14, "RESPONSE_PARSER_TEST_18");
+_LIT(KTest15, "RESPONSE_PARSER_TEST_19");
+_LIT(KTest16, "RESPONSE_PARSER_TEST_20");
+
+
+CUpnpResponseParserTest* CUpnpResponseParserTest::NewL()
+	{
+	return (new(ELeave) CUpnpResponseParserTest());
+	}
+
+
+CUpnpResponseParserTest::CUpnpResponseParserTest()
+	{
+	SetTestStepName(KResponseParserTest);
+	}
+
+
+CUpnpResponseParserTest::~CUpnpResponseParserTest()
+	{
+	}
+
+
+TVerdict CUpnpResponseParserTest::doTestStepPreambleL()
+	{
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_CREATEL;
+	__CFLOG_OPEN;
+#endif
+	
+	iIsStarted = EFalse;
+	iError = KErrNone;
+	
+	iSched = new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(iSched);
+
+	//iMBufMgr = CMBufManager::NewL(256 * 1024, iMBufSzAllctr);
+	//iMBufSzAllctr->AddL(KMBuf_MBufSize, (256 * 1024/(KMBuf_MBufSize+sizeof(RMBuf)))-1, KMBuf_MinGrowth, KMBuf_GrowthThreshold);
+	iMBufMgr = CChunkManager::NewL ( 256 * 1024 );
+	iMBufMgr->AddPoolL(KMBuf_MBufSize, (256 * 1024/(KMBuf_MBufSize+sizeof(RMBuf)))-1, KMBuf_MinGrowth, KMBuf_GrowthThreshold);
+	RMemoryAllocator allocator( iMBufMgr );
+	
+	iStringPool.OpenL(TUPnPTable::Table());
+	iStringPool.OpenL(THTTPTable::Table());
+	iCodec = CHeaderCodecPlugin::NewL(KUpnpCodecName, iStringPool);
+	iResponse = CResponse::NewL(*iCodec, iStringPool);	
+	iResponseParser = CUpnpResponseParser::NewL(*this);
+
+	iDataChunk = NULL;
+	if(!iDataChunkChain.IsEmpty())
+		iDataChunkChain.Free();
+	
+	GetIntFromConfig( ConfigSection(), KDataChunkCount, iDataChunkCount );
+	
+	TInt dataChunkCountIter = 1;
+	
+	while( dataChunkCountIter <= iDataChunkCount )
+		{
+		TPtrC dataChunk;
+		TBuf<10> buf(KNullDesC);
+		
+		// The below line is to create formats such as
+		// DataChunk1, DataChunk2, DataChunk3...
+		buf.Format(KDataChunk, dataChunkCountIter);
+		
+		GetStringFromConfig(ConfigSection(), buf, dataChunk);
+		RBuf tt;
+		tt.CreateL(dataChunk);
+		CleanupClosePushL(tt);
+		TRAPD(error, NegateEscapeEncodeL(tt));
+		if(error != KErrNone)
+			{
+			SetTestStepResult(EFail);
+			return TestStepResult();
+			}
+		dataChunkCountIter++;
+		CleanupStack::PopAndDestroy(&tt);
+		}
+	
+	TPtrC8 dataChunk8(iDataChunkArray[0]->Des());
+	TRAPD(error, iDataChunkChain.CreateL(dataChunk8, allocator));
+	if(error != KErrNone)	
+		{
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	return TestStepResult();
+	}
+
+
+TVerdict CUpnpResponseParserTest::doTestStepL()
+	{
+	TPtrC dataChunk;
+		
+    if (
+    	!GetStringFromConfig(ConfigSection(), KDataChunk1, dataChunk)	||
+    	!GetBoolFromConfig(ConfigSection(), KParseExcessData, iNeedToParseExcessData)	||
+    	!GetIntFromConfig(ConfigSection(), KExpectedResponses, iExpectedResponses)	||
+    	!GetIntFromConfig( ConfigSection(), KDataChunkCount, iDataChunkCount )
+    	)
+		{
+		ERR_PRINTF5(_L("===> Problem in reading values from ini.			\
+						\nExpected fields are: \n%S\n%S\n%S\n%S <==="
+					  ), &KDataChunk1, &KParseExcessData, &KExpectedResponses,
+					   &KDataChunkCount );
+		SetTestStepResult(EFail);
+		return TestStepResult();
+		}
+	
+	SetTestStepResult(EPass);	
+	
+	if(ConfigSection().Compare(_L("RESPONSE_PARSER_TEST_15")) == 0)
+		{
+		delete iResponse;
+		iResponse = NULL;	
+		}
+
+	iResponseParser->ParseResponse(iDataChunkChain, iResponse);
+	if(iError == KErrNone)
+		{
+		CResponse& response = iResponseParser->Response();
+		iIsStarted = ETrue;
+		CActiveScheduler::Start();
+		}
+	else
+		{
+		SetTestStepResult(EFail);	
+		}	
+	
+	return TestStepResult();
+	}
+
+
+TVerdict CUpnpResponseParserTest::doTestStepPostambleL()
+	{
+	if(iResponseParser)
+		delete iResponseParser;
+
+	if(iResponse)
+		delete iResponse;
+	
+	iStringPool.Close();
+	
+	if(!iDataChunkChain.IsEmpty())
+		{
+		iDataChunkChain.Free();
+		}
+	
+	if(iMBufMgr)
+		delete iMBufMgr;
+		
+	delete iCodec;
+	delete iSched;
+	
+	iDataChunkArray.ResetAndDestroy();
+	iDataChunkArray.Close();
+
+#ifdef __CFLOG_ACTIVE
+	__CFLOG_CLOSE;
+	__CFLOG_DELETE;
+#endif
+
+	REComSession::FinalClose();
+	return TestStepResult();
+	}
+
+
+void CUpnpResponseParserTest::GotBodyData()
+	{
+
+	INFO_PRINTF1(_L("\n********** GOT RESPONSE BODY **********"));
+	
+	iDataSupplier = iResponse->Body();
+	
+	INFO_PRINTF2(_L("\n===> BODY CHUNK LENGTH: %d <==="), iDataSupplier->OverallDataSize());
+	
+	TPtrC8 ptr;
+	iDataSupplier->GetNextDataPart(ptr);
+	
+	TBuf8<1024> buf8(ptr);
+	TBuf<1024> buf;
+	buf.Copy(buf8);
+	
+	INFO_PRINTF2(_L("\n===> BODY: %S <==="), &buf);
+	
+	iDataSupplier->ReleaseData();
+	iDataSupplier->Reset();
+	iDataSupplier->ReleaseData();
+	}
+
+
+void CUpnpResponseParserTest::DataParsed()
+	{
+	INFO_PRINTF1(_L("\n********** RESPONSE DATA PARSED **********"));
+	RMemoryAllocator allocator( iMBufMgr );
+	
+	if( (iDataChunkArray.Count() > 0) && (iDataChunkCount > 1) && (iDataChunkPtr.Length() == 0) )
+		{
+		HBufC8* firstChunk = iDataChunkArray[0];
+		iDataChunkArray.Remove(0);
+		delete firstChunk;
+		}
+	
+	if( (iDataChunkArray.Count() > 0) && (iDataChunkCount > 1) && (iDataChunkPtr.Length() == 0) )
+		{
+		TPtrC8 dataChunk8(iDataChunkArray[0]->Des());
+		if(!iDataChunkChain.IsEmpty())
+			{
+			iDataChunkChain.Free();
+			}
+		
+		TRAPD(error, iDataChunkChain.CreateL(dataChunk8, allocator));
+		if(error != KErrNone)
+			{
+			ParserError(error);
+			return;
+			}
+
+		iResponseParser->ParseResponse(iDataChunkChain, iResponse);
+		}
+
+	if ((iNeedToParseExcessData) && (iDataChunkPtr.Length() > 0))
+		{
+		if(iResponseParser)
+			{
+			iResponseParser->ResetParser();
+			iResponse->Reset();
+			}
+		
+		if(!iDataChunkChain.IsEmpty())
+			{
+			iDataChunkChain.Free();
+			}
+		TRAPD(error, iDataChunkChain.CreateL(iDataChunkPtr, allocator));
+		if(error != KErrNone)
+			{
+			ParserError(error);
+			return;
+			}
+		
+		if(iResponseParser)
+			{
+			iResponseParser->ParseResponse(iDataChunkChain, iResponse);
+			}
+		iDataChunkPtr.Set(KNullDesC8);
+		}
+	}
+
+
+void CUpnpResponseParserTest::GotHeaders()
+	{
+	INFO_PRINTF1(_L("\n********** GOT RESPONSE HEADERS **********"));
+	
+	TInt ver = iResponse->Handle().IsHTTP10();
+	
+	const TDesC8& statusText8 = iResponse->Handle().StatusText().DesC();
+	TBuf<KMaxHeaderNameLen> statusText;
+	statusText.Copy(statusText8);
+	
+	INFO_PRINTF3(_L("\n===> RESPONSE STATUS: %d %S <==="), iResponse->Handle().StatusCode(), &statusText);
+	
+	RHTTPHeaders hdr = iResponse->Handle().GetHeaderCollection();
+	THTTPHdrFieldIter it = hdr.Fields();
+	
+	TBuf<KMaxHeaderNameLen>  fieldName16;
+	TBuf<KMaxHeaderValueLen> fieldVal16;
+
+	while (it.AtEnd() == EFalse)
+		{
+		RStringTokenF fieldName = it();
+		RStringF fieldNameStr = iStringPool.StringF(fieldName);
+		
+		TPtrC8 rawData8;
+		hdr.GetRawField(fieldNameStr, rawData8);
+
+		const TDesC8& fieldNameDesC = fieldNameStr.DesC();
+		fieldName16.Copy(fieldNameDesC.Left(KMaxHeaderNameLen));
+
+		fieldVal16.Copy(rawData8);
+		INFO_PRINTF3(_L("\n===> %S: %S <==="), &fieldName16, &fieldVal16);
+		
+		++it;
+		}
+		
+	TInt hasBody = iResponse->Handle().HasBody();	
+	}
+
+
+void CUpnpResponseParserTest::ParsingComplete(RMemChunk& aExcessData)
+	{
+	INFO_PRINTF1(_L("\n********** RESPONSE PARSING COMPLETED **********"));
+
+	if(--iExpectedResponses == 0)
+		{
+		iResponse->Handle().RemoveBody();
+		CActiveScheduler::Stop();
+		iIsStarted = EFalse;	
+		}
+
+	TInt len = aExcessData.Length();
+	if(len > 0)
+		{
+		iExcessData8.SetLength(len);
+		iExcessData8.FillZ(len);
+		aExcessData.CopyOut(iExcessData8);
+
+#ifdef __WINSCW__
+		TBuf<KMaxMsgLen> excessData16;
+		excessData16.Copy(iExcessData8);
+		INFO_PRINTF2(_L("\n===> EXCESS DATA: %S <==="), &excessData16);
+#endif	
+
+		if(iNeedToParseExcessData)
+			{
+			iResponse->Reset();
+			iDataChunkPtr.Set(iExcessData8);
+			}
+		}
+	}
+
+	
+void CUpnpResponseParserTest::ParserError(TInt aError)
+	{
+	INFO_PRINTF1(_L("\n********** RESPONSE PARSER ERROR **********"));
+	INFO_PRINTF2(_L("\n===> Error: %d <==="), aError);
+
+	if((ConfigSection().Compare(KTest14()) != 0)&&
+	   (ConfigSection().Compare(KTest15()) != 0)&&
+	   (ConfigSection().Compare(KTest16()) != 0))
+		{
+		SetTestStepResult(EFail);
+		}			
+	if(iIsStarted)
+		{
+		CActiveScheduler::Stop();
+		}
+	else
+		{
+		iError = aError;
+		}	
+	}
+
+	
+void CUpnpResponseParserTest::NegateEscapeEncodeL(const TDesC& aDes)
+	{
+	HBufC* buf = HBufC::NewL(KMaxMsgLen);
+	CleanupStack::PushL(buf);
+	TPtr tmpBuf(buf->Des());
+	TPtrC ptr(aDes);
+	
+	while(ptr.Length() > 0)
+		{
+		TInt pos = ptr.Locate(backSlash);
+		if(pos == KErrNotFound)
+			{
+			tmpBuf.Append(ptr);
+			break;
+			}
+		else
+			{
+			tmpBuf.Append(ptr.Left(pos));
+			tmpBuf.Append(KCRLF);
+			ptr.Set(ptr.Mid(pos+4));
+			}
+		}
+	iDataChunk = CnvUtfConverter::ConvertFromUnicodeToUtf8L(*buf);
+	TRAPD(err, iDataChunkArray.AppendL(iDataChunk));
+	if(err != KErrNone)
+		{
+		delete iDataChunk;
+		iDataChunk = NULL;
+		User::Leave(err);
+		}
+	CleanupStack::PopAndDestroy(buf);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/StringDictionary/upnpdescriptionschema.st	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,71 @@
+#
+# 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 the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+upnpdescriptionXMLTagsstringtable UPNPDESCRIPTIONXMLTAGS
+EScpd scpd
+ESpecVersion specVersion
+EMajorNumber major
+EMinorNumber minor
+EActionList actionList
+EAction action
+EName name
+EArgumentList argumentList
+EArgument argument
+EArgumentDirection direction
+ERelatedStateVar relatedStateVariable
+ERetValue retval
+EServiceStateTable serviceStateTable
+EStateVariable stateVariable
+EStateVariableDataType dataType
+EStateVariableDefaultValue defaultValue
+EAllowedValueList allowedValueList
+EAllowedValue allowedValue
+EAllowedValueRange allowedValueRange
+EMinimumValue minimum
+EMaximumValue maximum
+EStepValue step
+ESendEvents sendEvents
+ERoot root
+EUrlBase URLBase
+EDevice device
+EDeviceType deviceType
+EFriendlyName friendlyName
+EManufacturer manufacturer
+EManufacturerUrl manufacturerURL
+EModelDescription modelDescription
+EModelName modelName
+EModelNumber modelNumber
+EModel modelURL
+ESerialNumber serialNumber
+EUdn UDN
+EUpc UPC
+EIconList iconList
+EIcon icon
+EMimeType mimetype
+EWidth width
+EHeight height
+EDepth depth
+EUrl url
+EServiceList serviceList
+EService service
+EServiceType serviceType
+EServiceId serviceId
+EScpdUrl SCPDURL
+EContorlUrl controlURL
+EEventSubUrl eventSubURL
+EDeviceList deviceList
+EPresentationUrl presentationURL
+EDlnaDoc X_DLNADOC
+EDlnaCap X_DLNACAP
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/bwins/upnpdescriptionu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+EXPORTS
+	??1CUPnPDescriptionComposer@@UAE@XZ @ 1 NONAME ; CUPnPDescriptionComposer::~CUPnPDescriptionComposer(void)
+	??1CUPnPDescriptionParser@@UAE@XZ @ 2 NONAME ; CUPnPDescriptionParser::~CUPnPDescriptionParser(void)
+	??1CUPnPDevice@@UAE@XZ @ 3 NONAME ; CUPnPDevice::~CUPnPDevice(void)
+	??1CUPnPDeviceDescription@@UAE@XZ @ 4 NONAME ; CUPnPDeviceDescription::~CUPnPDeviceDescription(void)
+	??1CUPnPIconInfo@@UAE@XZ @ 5 NONAME ; CUPnPIconInfo::~CUPnPIconInfo(void)
+	??1CUPnPServiceDescription@@UAE@XZ @ 6 NONAME ; CUPnPServiceDescription::~CUPnPServiceDescription(void)
+	??1CUPnPServiceInfo@@UAE@XZ @ 7 NONAME ; CUPnPServiceInfo::~CUPnPServiceInfo(void)
+	?ComposeDescriptionXmlL@CUPnPDescriptionComposer@@QAEXPAXW4TUPnPDescriptionType@1@AAVRBuf8@@@Z @ 8 NONAME ; void CUPnPDescriptionComposer::ComposeDescriptionXmlL(void *, enum CUPnPDescriptionComposer::TUPnPDescriptionType, class RBuf8 &)
+	?CreateOrFindL@CStringPoolManager@@SAPAV1@ABUTStringTable@@@Z @ 9 NONAME ABSENT ; class CStringPoolManager * CStringPoolManager::CreateOrFindL(struct TStringTable const &)
+	?CreateOrFindL@CStringPoolManager@@SAPAV1@XZ @ 10 NONAME ABSENT ; class CStringPoolManager * CStringPoolManager::CreateOrFindL(void)
+	?GetTable@CStringPoolManager@@QAEABUTStringTable@@XZ @ 11 NONAME ABSENT ; struct TStringTable const & CStringPoolManager::GetTable(void)
+	?NewL@CUPnPDescriptionComposer@@SAPAV1@XZ @ 12 NONAME ABSENT ; class CUPnPDescriptionComposer * CUPnPDescriptionComposer::NewL(void)
+	?NewL@CUPnPDescriptionParser@@SAPAV1@W4TUPnPDescriptionType@1@@Z @ 13 NONAME ABSENT ; class CUPnPDescriptionParser * CUPnPDescriptionParser::NewL(enum CUPnPDescriptionParser::TUPnPDescriptionType)
+	?NewL@CUPnPDevice@@SAPAV1@XZ @ 14 NONAME ; class CUPnPDevice * CUPnPDevice::NewL(void)
+	?NewL@CUPnPDeviceDescription@@SAPAV1@XZ @ 15 NONAME ; class CUPnPDeviceDescription * CUPnPDeviceDescription::NewL(void)
+	?NewL@CUPnPIconInfo@@SAPAV1@XZ @ 16 NONAME ; class CUPnPIconInfo * CUPnPIconInfo::NewL(void)
+	?NewL@CUPnPServiceDescription@@SAPAV1@XZ @ 17 NONAME ; class CUPnPServiceDescription * CUPnPServiceDescription::NewL(void)
+	?NewL@CUPnPServiceInfo@@SAPAV1@XZ @ 18 NONAME ; class CUPnPServiceInfo * CUPnPServiceInfo::NewL(void)
+	?NewL@CUPnPValueRange@@SAPAV1@XZ @ 19 NONAME ; class CUPnPValueRange * CUPnPValueRange::NewL(void)
+	?ParseDescriptionBufL@CUPnPDescriptionParser@@QAEPAXABVTDesC8@@@Z @ 20 NONAME ; void * CUPnPDescriptionParser::ParseDescriptionBufL(class TDesC8 const &)
+	?Release@CStringPoolManager@@QAEXXZ @ 21 NONAME ; void CStringPoolManager::Release(void)
+	?StringPool@CStringPoolManager@@QAEAAVRStringPool@@XZ @ 22 NONAME ; class RStringPool & CStringPoolManager::StringPool(void)
+	?StringPool@CStringPoolManager@@QBEABVRStringPool@@XZ @ 23 NONAME ABSENT ; class RStringPool const & CStringPoolManager::StringPool(void) const
+	?SetStringTable@CUPnPDescriptionParser@@QAEXABUTStringTable@@@Z @ 24 NONAME ABSENT ; void CUPnPDescriptionParser::SetStringTable(struct TStringTable const &)
+	??1CUPnPProperty@@UAE@XZ @ 25 NONAME ; CUPnPProperty::~CUPnPProperty(void)
+	?Property@CUPnPProperty@@QBEABVTDesC8@@VRString@@@Z @ 26 NONAME ; class TDesC8 const & CUPnPProperty::Property(class RString) const
+	?SetPropertyL@CUPnPProperty@@QAEXVRString@@ABVTDesC8@@@Z @ 27 NONAME ; void CUPnPProperty::SetPropertyL(class RString, class TDesC8 const &)
+	?NewL@CStringPoolManager@@SAPAV1@ABUTStringTable@@@Z @ 28 NONAME ; class CStringPoolManager * CStringPoolManager::NewL(struct TStringTable const &)
+	?SetStringTableL@CStringPoolManager@@QAEXABUTStringTable@@@Z @ 29 NONAME ; void CStringPoolManager::SetStringTableL(struct TStringTable const &)
+	?NewL@CStringPoolManager@@SAPAV1@XZ @ 30 NONAME ; class CStringPoolManager * CStringPoolManager::NewL(void)
+	?NewL@CUPnPDescriptionComposer@@SAPAV1@ABVRStringPool@@@Z @ 31 NONAME ; class CUPnPDescriptionComposer * CUPnPDescriptionComposer::NewL(class RStringPool const &)
+	?NewL@CUPnPDescriptionParser@@SAPAV1@ABVRStringPool@@W4TUPnPDescriptionType@1@@Z @ 32 NONAME ; class CUPnPDescriptionParser * CUPnPDescriptionParser::NewL(class RStringPool const &, enum CUPnPDescriptionParser::TUPnPDescriptionType)
+	?GetUPnPTable@CStringPoolManager@@QAEABUTStringTable@@XZ @ 33 NONAME ; struct TStringTable const & CStringPoolManager::GetUPnPTable(void)
+	?SetPropertyL@CUPnPProperty@@QAEXVRString@@H@Z @ 34 NONAME ; void CUPnPProperty::SetPropertyL(class RString, int)
+	??1CUPnPValueRange@@UAE@XZ @ 35 NONAME ; CUPnPValueRange::~CUPnPValueRange(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/eabi/upnpdescriptionu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,104 @@
+EXPORTS
+	_ZN11CUPnPDevice4NewLEv @ 1 NONAME
+	_ZN11CUPnPDeviceD0Ev @ 2 NONAME
+	_ZN11CUPnPDeviceD1Ev @ 3 NONAME
+	_ZN11CUPnPDeviceD2Ev @ 4 NONAME
+	_ZN13CUPnPIconInfo4NewLEv @ 5 NONAME
+	_ZN13CUPnPIconInfoD0Ev @ 6 NONAME
+	_ZN13CUPnPIconInfoD1Ev @ 7 NONAME
+	_ZN13CUPnPIconInfoD2Ev @ 8 NONAME
+	_ZN13CUPnPProperty12SetPropertyLE7RStringRK6TDesC8 @ 9 NONAME
+	_ZN13CUPnPPropertyD0Ev @ 10 NONAME
+	_ZN13CUPnPPropertyD1Ev @ 11 NONAME
+	_ZN13CUPnPPropertyD2Ev @ 12 NONAME
+	_ZN15CUPnPValueRange4NewLEv @ 13 NONAME
+	_ZN16CUPnPServiceInfo4NewLEv @ 14 NONAME
+	_ZN16CUPnPServiceInfoD0Ev @ 15 NONAME
+	_ZN16CUPnPServiceInfoD1Ev @ 16 NONAME
+	_ZN16CUPnPServiceInfoD2Ev @ 17 NONAME
+	_ZN18CStringPoolManager10StringPoolEv @ 18 NONAME
+	_ZN18CStringPoolManager12GetUPnPTableEv @ 19 NONAME
+	_ZN18CStringPoolManager15SetStringTableLERK12TStringTable @ 20 NONAME
+	_ZN18CStringPoolManager4NewLERK12TStringTable @ 21 NONAME
+	_ZN18CStringPoolManager4NewLEv @ 22 NONAME
+	_ZN18CStringPoolManager7ReleaseEv @ 23 NONAME
+	_ZN22CUPnPDescriptionParser20ParseDescriptionBufLERK6TDesC8 @ 24 NONAME
+	_ZN22CUPnPDescriptionParser4NewLERK11RStringPoolNS_20TUPnPDescriptionTypeE @ 25 NONAME
+	_ZN22CUPnPDescriptionParserD0Ev @ 26 NONAME
+	_ZN22CUPnPDescriptionParserD1Ev @ 27 NONAME
+	_ZN22CUPnPDescriptionParserD2Ev @ 28 NONAME
+	_ZN22CUPnPDeviceDescription4NewLEv @ 29 NONAME
+	_ZN22CUPnPDeviceDescriptionD0Ev @ 30 NONAME
+	_ZN22CUPnPDeviceDescriptionD1Ev @ 31 NONAME
+	_ZN22CUPnPDeviceDescriptionD2Ev @ 32 NONAME
+	_ZN23CUPnPServiceDescription4NewLEv @ 33 NONAME
+	_ZN23CUPnPServiceDescriptionD0Ev @ 34 NONAME
+	_ZN23CUPnPServiceDescriptionD1Ev @ 35 NONAME
+	_ZN23CUPnPServiceDescriptionD2Ev @ 36 NONAME
+	_ZN24CUPnPDescriptionComposer22ComposeDescriptionXmlLEPvNS_20TUPnPDescriptionTypeER5RBuf8 @ 37 NONAME
+	_ZN24CUPnPDescriptionComposer4NewLERK11RStringPool @ 38 NONAME
+	_ZN24CUPnPDescriptionComposerD0Ev @ 39 NONAME
+	_ZN24CUPnPDescriptionComposerD1Ev @ 40 NONAME
+	_ZN24CUPnPDescriptionComposerD2Ev @ 41 NONAME
+	_ZNK13CUPnPProperty8PropertyE7RString @ 42 NONAME
+	_ZTI10CAttribute @ 43 NONAME
+	_ZTI11CUPnPAction @ 44 NONAME
+	_ZTI13CActionParser @ 45 NONAME
+	_ZTI13CUPnPArgument @ 46 NONAME
+	_ZTI13CUPnPIconInfo @ 47 NONAME
+	_ZTI13CUPnPProperty @ 48 NONAME
+	_ZTI15CArgumentParser @ 49 NONAME
+	_ZTI15CUPnPValueRange @ 50 NONAME
+	_ZTI16CUPnPServiceInfo @ 51 NONAME
+	_ZTI17CDeviceIconParser @ 52 NONAME
+	_ZTI17CDeviceInfoParser @ 53 NONAME
+	_ZTI17CParseHandlerBase @ 54 NONAME
+	_ZTI17CRootDeviceParser @ 55 NONAME
+	_ZTI17CStateTableParser @ 56 NONAME
+	_ZTI17CUPnPArgValueList @ 57 NONAME
+	_ZTI17CValueRangeParser @ 58 NONAME
+	_ZTI18CRootServiceParser @ 59 NONAME
+	_ZTI18CServiceInfoParser @ 60 NONAME
+	_ZTI18CSpecVersionParser @ 61 NONAME
+	_ZTI18CStringPoolManager @ 62 NONAME
+	_ZTI18CUPnPStateVariable @ 63 NONAME
+	_ZTI22CUPnPDescriptionParser @ 64 NONAME
+	_ZTI22CUPnPDeviceDescription @ 65 NONAME
+	_ZTI22CUPnPDeviceXmlComposer @ 66 NONAME
+	_ZTI23CUPnPServiceDescription @ 67 NONAME
+	_ZTI23CUPnPServiceXmlComposer @ 68 NONAME
+	_ZTI24CUPnPDescriptionComposer @ 69 NONAME
+	_ZTV10CAttribute @ 70 NONAME
+	_ZTV11CUPnPAction @ 71 NONAME
+	_ZTV13CActionParser @ 72 NONAME
+	_ZTV13CUPnPArgument @ 73 NONAME
+	_ZTV13CUPnPIconInfo @ 74 NONAME
+	_ZTV13CUPnPProperty @ 75 NONAME
+	_ZTV15CArgumentParser @ 76 NONAME
+	_ZTV15CUPnPValueRange @ 77 NONAME
+	_ZTV16CUPnPServiceInfo @ 78 NONAME
+	_ZTV17CDeviceIconParser @ 79 NONAME
+	_ZTV17CDeviceInfoParser @ 80 NONAME
+	_ZTV17CParseHandlerBase @ 81 NONAME
+	_ZTV17CRootDeviceParser @ 82 NONAME
+	_ZTV17CStateTableParser @ 83 NONAME
+	_ZTV17CUPnPArgValueList @ 84 NONAME
+	_ZTV17CValueRangeParser @ 85 NONAME
+	_ZTV18CRootServiceParser @ 86 NONAME
+	_ZTV18CServiceInfoParser @ 87 NONAME
+	_ZTV18CSpecVersionParser @ 88 NONAME
+	_ZTV18CStringPoolManager @ 89 NONAME
+	_ZTV18CUPnPStateVariable @ 90 NONAME
+	_ZTV22CUPnPDescriptionParser @ 91 NONAME
+	_ZTV22CUPnPDeviceDescription @ 92 NONAME
+	_ZTV22CUPnPDeviceXmlComposer @ 93 NONAME
+	_ZTV23CUPnPServiceDescription @ 94 NONAME
+	_ZTV23CUPnPServiceXmlComposer @ 95 NONAME
+	_ZTV24CUPnPDescriptionComposer @ 96 NONAME
+	_ZTI11CUPnPDevice @ 97 NONAME
+	_ZTV11CUPnPDevice @ 98 NONAME
+	_ZN13CUPnPProperty12SetPropertyLE7RStringi @ 99 NONAME
+	_ZN15CUPnPValueRangeD0Ev @ 100 NONAME
+	_ZN15CUPnPValueRangeD1Ev @ 101 NONAME
+	_ZN15CUPnPValueRangeD2Ev @ 102 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,32 @@
+// 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:
+//
+
+
+
+PRJ_TESTEXPORTS
+../inc/cpnpdeviceparam.h 		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cpnpdeviceparam.h)
+../inc/cpnpdeviceparam.inl 		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cpnpdeviceparam.inl)
+../inc/cpnpserviceparam.h 		SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cpnpserviceparam.h)
+../inc/cpnpserviceparam.inl 	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cpnpserviceparam.inl)
+
+../inc/cupnpdescriptioncomposer.h 	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cupnpdescriptioncomposer.h)
+../inc/cupnpdescriptionparser.h 	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cupnpdescriptionparser.h)
+
+../inc/cstringpoolmanager.h 	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cstringpoolmanager.h)
+../inc/cupnpproperty.h 			SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/cupnpproperty.h)
+
+PRJ_TESTMMPFILES
+upnpdescription.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/group/upnpdescription.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,70 @@
+// 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:
+//
+
+
+TARGET		  upnpdescription.dll
+TARGETTYPE	  dll
+UID			 0x00000000 0x2000D058
+
+START STRINGTABLE ../StringDictionary/upnpdescriptionschema.st
+EXPORTPATH	/epoc32/include/upnp 
+END
+
+CAPABILITY       All -TCB
+
+USERINCLUDE	 ../inc
+
+SYSTEMINCLUDE   /epoc32/include
+SYSTEMINCLUDE   /epoc32/include/upnp
+
+
+sourcepath ../src
+
+SOURCE		cpnpserviceparam.cpp 
+SOURCE		cpnpdeviceparam.cpp 
+SOURCE 		cattribute.cpp
+SOURCE 		cupnpproperty.cpp 
+SOURCE 		tattributeiter.cpp
+SOURCE		cstringpoolmanager.cpp
+SOURCE		parsehandlerbase.cpp
+SOURCE		deviceiconparser.cpp
+SOURCE		deviceinfoparser.cpp
+SOURCE		specversionparser.cpp
+SOURCE		serviceinfoparser.cpp 
+SOURCE 		cactionparser.cpp 
+SOURCE 		cargumentparser.cpp 
+SOURCE 		cstatetableparser.cpp 
+SOURCE 		rootserviceparser.cpp
+SOURCE 		rootdeviceparser.cpp 
+SOURCE 		cupnpservicecomposer.cpp
+SOURCE 		cupnpdevicecomposer.cpp
+SOURCE		cupnpdescriptionparser.cpp 
+SOURCE 		cupnpdescriptioncomposer.cpp 
+
+LIBRARY		euser.lib 
+LIBRARY		efsrv.lib 
+LIBRARY		bafl.lib 
+LIBRARY		inetprotutil.lib 
+LIBRARY		xmlframework.lib
+LIBRARY		upnputils.lib
+
+
+
+
+
+
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cactionparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,48 @@
+// 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 __CACTIONPARSER_H_
+#define __CACTIONPARSER_H_
+
+#include <xml/parser.h>
+#include "cpnpserviceparam.h"
+#include "parsehandlerbase.h"
+
+// Parses the Action element of Service description
+class CActionParser : public CParseHandlerBase
+	{
+public:
+	static CActionParser* NewL(CUPnPAction *aAction, const RStringPool &aStringPool);
+	virtual ~CActionParser();
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+
+private:
+	CActionParser(CUPnPAction *aAction, const RStringPool &aStringPool);
+	enum
+		{
+		EAction = 0x01,
+		EName = 0x02,
+		EArgumentList = 0x04,
+		EAllChild = 0x0E
+		};
+private:
+	CUPnPAction* iAction;
+	const RStringPool& iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+#endif /*CACTIONPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cargumentparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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 __CARGUMENTPARSER_H_
+#define __CARGUMENTPARSER_H_
+
+#include <xml/parser.h>
+#include "cpnpserviceparam.h"
+#include "parsehandlerbase.h"
+
+/* Parses the argument element of UPnP Service description
+ */ 
+class CArgumentParser : public CParseHandlerBase
+	{
+public:
+	static CArgumentParser* NewL(CUPnPArgument *aArgument, const RStringPool &aStringPool);
+	virtual ~CArgumentParser();
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+
+private:
+	CArgumentParser(CUPnPArgument *aArgument , const RStringPool &aStringPool);
+	enum
+		{
+		EArgument = 0x01,
+		EName = 0x02,
+		EArgumentDirection = 0x04,
+		ERetValue = 0x08,
+		ERelatedStateVar = 0x10,
+		EAllChild = 0x1E
+		};
+private:
+	CUPnPArgument* iArgument;
+	const RStringPool& iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+#endif /*CARGUMENTPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cattribute.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+// 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 __CATTRIBUTE_H_
+#define __CATTRIBUTE_H_
+
+#include <e32base.h>
+#include <stringpool.h>
+
+class CAttribute: public CBase
+	{
+public:
+	static CAttribute* NewL(const RString aAttributeName, const TDesC8& aAttributeVal);
+	~CAttribute();
+	
+	const RString& AttributeName() const;
+	const TDesC8& AttributeValue() const;
+	void SetValueL(const TDesC8& aAttributeVal);
+	void SetStatus(TBool aStatus);
+	
+private:
+	CAttribute(RString aAttributeName, const TDesC8& aAttributeVal);
+
+private:
+	RString 	iAttributeName;
+	RBuf8		iAttributeValue;
+	TBool		iParsedStatus;
+	};
+
+#endif /*CATTRIBUTE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpdeviceparam.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,148 @@
+// 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 __CPNPDEVICEPARAM_H_
+#define __CPNPDEVICEPARAM_H_
+
+#include <e32cmn.h>
+#include <e32base.h>
+#include "cupnpproperty.h"
+
+class CUPnPServiceInfo;
+class CUPnPIconInfo;
+class CUPnPDevice;
+
+/** 
+Container for device object. 
+
+@publishedPartner
+@prototype */
+
+class CUPnPDeviceDescription: public CUPnPProperty
+	{
+public:
+
+	IMPORT_C static CUPnPDeviceDescription* NewL();
+	IMPORT_C ~CUPnPDeviceDescription();
+
+    inline void SetDeviceObjectL( CUPnPDevice *aValue);
+    inline  CUPnPDevice* DeviceObject() const;
+
+    inline void SetMinorNumberL(const TInt aValue);
+    inline const TInt MinorNumber () const;
+
+    inline void SetMajorNumberL(const TInt aValue);
+    inline const TInt MajorNumber () const;
+	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const;
+
+private :
+
+	CUPnPDeviceDescription();
+	void ConstructL();
+
+private :
+	TVersion 		iVersion;
+	CUPnPDevice	*iDeviceObj;
+
+	};
+
+
+/** 
+Describes a device object.
+Can contain embedded device, service and icon info
+
+@publishedPartner
+@prototype */
+
+class CUPnPDevice: public CUPnPProperty
+	{
+
+public:
+	IMPORT_C static CUPnPDevice* NewL();
+	IMPORT_C ~CUPnPDevice();
+
+    inline void AppendToEmbeddedDeviceInfoTableL(const CUPnPDevice* aValue);
+    inline TInt CountOfEmbeddedDeviceInfoTable () const;
+    inline CUPnPDevice* AtEmbeddedDeviceInfoTable(const TInt aIndex) const;
+    inline void DeleteEmbeddedDeviceInfoAtIndexL(const TInt aIndex);
+
+    inline void AppendToServiceInfoTableL(const CUPnPServiceInfo* aValue);
+    inline TInt CountOfServiceInfoTable () const;
+    inline CUPnPServiceInfo* AtServiceInfoTable(const TInt aIndex) const;
+    inline void DeleteServiceInfoAtIndexL(const TInt aIndex);
+
+    inline void AppendToIconInfoTableL(const CUPnPIconInfo* aValue);
+    inline TInt CountOfIconInfoTable () const;
+    inline CUPnPIconInfo* AtIconInfoTable(const TInt aIndex) const;
+    inline void SetDlna( TBool aValue);
+    inline TBool Dlna() const ;
+	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable );
+private :
+
+	CUPnPDevice();
+	void ConstructL();
+
+private :
+	TBool iHasDlnaTag;
+	RPointerArray<CUPnPDevice>			iEmbeddedDeviceInfo;
+	RPointerArray<CUPnPServiceInfo> 		iServiceInfo;
+	RPointerArray<CUPnPIconInfo> 			iIconInfo;
+	};
+
+
+/** 
+Following structure store service information.
+
+@publishedPartner
+@prototype */
+class CUPnPServiceInfo: public CUPnPProperty
+	{
+
+public:
+	IMPORT_C static CUPnPServiceInfo* NewL();
+	IMPORT_C ~CUPnPServiceInfo();
+	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) ;
+
+private :
+
+	CUPnPServiceInfo();
+	void ConstructL();
+
+private:
+	};
+
+/** 
+
+CUPnPIconInfo stores icon information.
+
+@publishedPartner
+@prototype */	
+	
+class CUPnPIconInfo: public CUPnPProperty
+	{
+
+public:
+	IMPORT_C static CUPnPIconInfo* NewL();
+	IMPORT_C ~CUPnPIconInfo();
+
+	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) ;
+private :
+
+	CUPnPIconInfo();
+	void ConstructL();
+	};
+
+#include "cpnpdeviceparam.inl"
+#endif /*CPNPDEVICEPARAM_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpdeviceparam.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,131 @@
+// 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:
+//
+
+void CUPnPDevice::AppendToServiceInfoTableL(const CUPnPServiceInfo* aValue)
+	{
+	iServiceInfo.AppendL(aValue);
+	}
+
+TInt CUPnPDevice::CountOfServiceInfoTable () const
+	{
+	return iServiceInfo.Count();
+	}
+
+CUPnPServiceInfo* CUPnPDevice::AtServiceInfoTable ( TInt aIndex) const
+	{
+	return iServiceInfo[aIndex];
+	}
+
+void CUPnPDevice::DeleteServiceInfoAtIndexL(const TInt aIndex)
+	{
+	if( aIndex>=0 && aIndex<iServiceInfo.Count() )
+		{
+		// first delete the object and then remove it from the array
+		delete iServiceInfo[aIndex];
+		iServiceInfo.Remove(aIndex);
+		}
+	else
+		{
+		User::Leave(KErrNotFound);
+		}
+	}
+void CUPnPDevice::AppendToEmbeddedDeviceInfoTableL(const CUPnPDevice* aValue)
+	{
+	iEmbeddedDeviceInfo.AppendL(aValue);
+	}
+
+TInt CUPnPDevice::CountOfEmbeddedDeviceInfoTable () const
+	{
+	return iEmbeddedDeviceInfo.Count();
+	}
+
+CUPnPDevice* CUPnPDevice::AtEmbeddedDeviceInfoTable(const TInt aIndex) const
+	{
+	return iEmbeddedDeviceInfo[aIndex];
+	}
+void CUPnPDevice::DeleteEmbeddedDeviceInfoAtIndexL(const TInt aIndex)
+	{
+	if( aIndex>=0 && aIndex<iEmbeddedDeviceInfo.Count() )
+		{
+		// first delete the object and then remove it from the array
+		delete iEmbeddedDeviceInfo[aIndex];
+		iEmbeddedDeviceInfo.Remove(aIndex);
+		}
+	else
+		{
+		User::Leave(KErrNotFound);
+		}
+
+	}
+void CUPnPDevice::AppendToIconInfoTableL(const CUPnPIconInfo* aValue)
+	{
+	TRAPD(err, iIconInfo.Append(aValue));
+	TInt xx=0;
+	}
+
+TInt CUPnPDevice::CountOfIconInfoTable() const
+	{
+	return iIconInfo.Count();
+	}
+
+CUPnPIconInfo* CUPnPDevice::AtIconInfoTable( TInt aIndex) const
+	{
+	return iIconInfo[aIndex];
+	}
+void CUPnPDevice::SetDlna( TBool aValue)
+	{
+	iHasDlnaTag = aValue;
+	}
+
+TBool CUPnPDevice::Dlna() const
+	{
+	return iHasDlnaTag;
+	}
+
+//-------------------------------------------------------------------
+
+
+void CUPnPDeviceDescription::SetDeviceObjectL( CUPnPDevice *aValue)
+	{
+	iDeviceObj = aValue;
+	}
+
+CUPnPDevice* CUPnPDeviceDescription::DeviceObject() const
+	{
+	return iDeviceObj;
+	}
+
+
+void CUPnPDeviceDescription::SetMinorNumberL(const TInt aValue)
+	{
+	iVersion.iMinor = aValue;
+	}
+
+const TInt CUPnPDeviceDescription::MinorNumber () const
+	{
+	return iVersion.iMinor;
+	}
+
+void CUPnPDeviceDescription::SetMajorNumberL(const TInt aValue)
+	{
+	iVersion.iMajor = aValue;
+	}
+
+const TInt CUPnPDeviceDescription::MajorNumber () const
+	{
+	return iVersion.iMajor;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpserviceparam.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,189 @@
+// 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 __CPNPSERVICEPARAM_H_
+#define __CPNPSERVICEPARAM_H_
+
+#include <e32cmn.h>
+#include "cupnpproperty.h"
+
+class CUPnPAction;
+class CUPnPStateVariable;
+class CUPnPArgument;
+class CUPnPAllowedValue;
+
+/** 
+Container for action and service state objects
+
+@publishedPartner
+@prototype */
+
+class CUPnPServiceDescription: public CUPnPProperty
+	{
+
+public:
+	IMPORT_C static CUPnPServiceDescription* NewL();
+	IMPORT_C ~CUPnPServiceDescription();
+
+   
+    inline void SetMinorNumberL(const TInt aValue);
+    inline const TInt MinorNumber () const;
+
+    inline void SetMajorNumberL(const TInt aValue);
+    inline const TInt MajorNumber () const;
+    
+    inline void AppendToActionList(const CUPnPAction* aValue);
+    inline TInt CountOfActionList () const;
+    inline const CUPnPAction* AtActionList( TInt aIndex) const ;
+
+    inline void AppendToServiceStateTable(const CUPnPStateVariable* aValue);
+    inline TInt CountOfServiceStateTable () const;
+    inline const CUPnPStateVariable* AtServiceStateTable(const TInt aIndex) const;
+
+    TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const;
+private :
+
+	CUPnPServiceDescription();
+	void ConstructL();
+
+private :
+	TVersion 							iVersion;
+	RPointerArray<CUPnPAction> 			iActionList;
+	RPointerArray<CUPnPStateVariable>	iServiceStateTable;
+	};
+
+
+/*
+Following class store the service action information.
+*/
+class CUPnPAction: public CUPnPProperty
+	{
+
+public:
+	static CUPnPAction* NewL();
+	~CUPnPAction();
+
+
+    inline void AppendL(const CUPnPArgument* aValue);
+    inline TInt Count () const;
+    inline CUPnPArgument* At(TInt aIndex) const;
+
+	
+	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const;
+
+private :
+
+	CUPnPAction();
+	void ConstructL();
+    
+private :
+	RPointerArray<CUPnPArgument> 		iArgumentList;		
+	};
+/* 
+Following class store argument object information.
+ */
+
+class CUPnPArgument: public CUPnPProperty
+	{
+
+public:
+	static CUPnPArgument* NewL();
+	~CUPnPArgument();
+	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const;
+	void SetRetVal( TBool aValue );
+	TBool RetVal();
+private :
+
+	CUPnPArgument();
+	void ConstructL();
+	TBool iRetVal;
+private:
+	};
+/* 
+ Following structure store state varibale information. 
+*/
+class CUPnPStateVariable: public CUPnPProperty
+	{
+
+public:
+	static CUPnPStateVariable* NewL();
+	~CUPnPStateVariable();
+
+    inline void SetAllowedValuesL( CUPnPAllowedValue *aValue);
+    inline const CUPnPAllowedValue* AllowedValues () const;
+    inline void SetAllowedValueType ( TBool aStatus );
+    inline TBool AllowedValueType ( ) const ;
+    TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const;
+	
+private :
+	CUPnPStateVariable();
+	void ConstructL();    
+    TBool isValue;
+	CUPnPAllowedValue*	iAllowedValue;
+	};
+/* 
+ Following structure is the base class for allowed list or range objects. 
+*/
+
+class CUPnPAllowedValue: public CUPnPProperty
+	{
+public:
+	enum TAllowedValueType
+				{
+				EArgValueList,
+				EArgValueRange,
+				};
+		TAllowedValueType iType;
+
+	};
+/* 
+ Following structure stores information about argument value list. 
+*/
+class CUPnPArgValueList: public CUPnPAllowedValue
+	{
+
+public:
+	static CUPnPArgValueList* NewL();
+	~CUPnPArgValueList();
+
+    inline void AppendL(const TDesC8& aValue);
+    inline  TInt Count () const;
+    inline const TDesC8& At(const TInt aIndex) const;
+private :
+
+	CUPnPArgValueList();
+	void ConstructL();
+private :
+	RArray<RBuf8>	iAllowedValueList;
+	};
+
+/* 
+ CUPnPValueRange stores the upnp argument value range. 
+*/
+class CUPnPValueRange: public CUPnPAllowedValue
+	{
+public:
+	IMPORT_C static CUPnPValueRange* NewL();
+	IMPORT_C ~CUPnPValueRange();
+  
+private :
+
+	CUPnPValueRange();
+	void ConstructL();
+
+	};
+
+#include "cpnpserviceparam.inl"	
+#endif /*CPNPSERVICEPARAM_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpserviceparam.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,127 @@
+// 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:
+//
+
+void CUPnPArgValueList::AppendL(const TDesC8& aValue)
+	{
+	RBuf8 tmp;
+	tmp.CreateL(aValue.Length());
+	tmp.Copy(aValue);
+
+	iAllowedValueList.AppendL(tmp);
+	}
+
+TInt CUPnPArgValueList::Count () const
+	{
+	return iAllowedValueList.Count();
+	}
+
+const TDesC8& CUPnPArgValueList::At(const TInt aIndex) const
+	{
+	return iAllowedValueList[aIndex];
+	}
+
+//------------------------------------------------------------------------
+
+void CUPnPStateVariable::SetAllowedValuesL( CUPnPAllowedValue *aValue)
+	{
+	iAllowedValue = aValue;
+	}
+
+const CUPnPAllowedValue* CUPnPStateVariable::AllowedValues () const
+	{
+	return iAllowedValue;
+	}
+
+void CUPnPStateVariable::SetAllowedValueType ( TBool aStatus ) 
+	{
+	isValue = aStatus;
+	}
+
+TBool CUPnPStateVariable::AllowedValueType () const
+	{
+	return isValue;
+	}
+//----------------------------------------------------------
+
+void CUPnPAction::AppendL(const CUPnPArgument* aValue)
+	{
+	iArgumentList.AppendL(aValue);
+	}
+
+TInt CUPnPAction::Count () const
+	{
+	return iArgumentList.Count();
+	}
+
+CUPnPArgument* CUPnPAction::At( TInt aIndex) const
+	{
+	return iArgumentList[aIndex];
+	}
+
+//-------------------------------------------------------------
+
+
+
+void CUPnPServiceDescription::AppendToActionList(const CUPnPAction* aValue)
+	{
+	iActionList.AppendL(aValue);
+	}
+
+TInt CUPnPServiceDescription::CountOfActionList () const
+	{
+	return iActionList.Count();
+	}
+
+const CUPnPAction* CUPnPServiceDescription::AtActionList( TInt aIndex) const
+	{
+	return iActionList[aIndex];
+	}
+
+void CUPnPServiceDescription::AppendToServiceStateTable(const CUPnPStateVariable* aValue)
+	{
+	iServiceStateTable.AppendL(aValue);
+	}
+
+TInt CUPnPServiceDescription::CountOfServiceStateTable () const
+	{
+	return iServiceStateTable.Count();
+	}
+
+const CUPnPStateVariable* CUPnPServiceDescription::AtServiceStateTable(const TInt aIndex) const 
+	{
+	return iServiceStateTable[aIndex];
+	}
+
+void CUPnPServiceDescription::SetMinorNumberL(const TInt aValue)
+	{
+	iVersion.iMinor = aValue;
+	}
+
+const TInt CUPnPServiceDescription::MinorNumber () const
+	{
+	return iVersion.iMinor;
+	}
+
+void CUPnPServiceDescription::SetMajorNumberL(const TInt aValue)
+	{
+	iVersion.iMajor = aValue;
+	}
+
+const TInt CUPnPServiceDescription::MajorNumber () const
+	{
+	return iVersion.iMajor;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cstatetableparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,75 @@
+// 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 __CSTATETABLEPARSER_H_
+#define __CSTATETABLEPARSER_H_
+
+#include <xml/parser.h>
+#include "parsehandlerbase.h"
+#include "cpnpserviceparam.h"
+
+// Parser for the state table
+class CStateTableParser : public CParseHandlerBase
+	{
+public:
+	static CStateTableParser* NewL(CUPnPStateVariable *aStateTable, const RStringPool &aStringPool);
+	virtual ~CStateTableParser();
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+
+private:
+	CStateTableParser(CUPnPStateVariable *aStateTable, const RStringPool &aStringPool);
+	enum
+		{
+		EAllowedValue = 0x01,
+		};
+private:
+	CUPnPStateVariable* 	iStateTable;
+	CUPnPArgValueList* 		iArgValueList;
+	const RStringPool& 		iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+
+//--------------------------------------------------------------------------
+// Parser for the value range object
+class CValueRangeParser : public CParseHandlerBase
+	{
+public:
+	static CValueRangeParser* NewL(CUPnPValueRange *aValueRange, const RStringPool &aStringPool);
+	virtual ~CValueRangeParser();
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+
+private:
+	CValueRangeParser(CUPnPValueRange *aValueRange, const RStringPool &aStringPool);
+	enum
+		{
+		EAllowedValueRange = 0x01,
+		EMinimumValue = 0x02,
+		EMaximumValue = 0x04,
+		EStepValue = 0x08,
+		EAllChild = 0x0E
+		};
+private:
+	CUPnPValueRange* iValueRange;
+	const RStringPool& iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+
+#endif /*CSTATETABLEPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cstringpoolmanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+// 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 __CSTRINGPOOLMANAGER_H__
+#define __CSTRINGPOOLMANAGER_H__
+
+#include <e32base.h>
+#include <stringpool.h>
+
+/** CStringPoolManager manages all the upnp device and service description tags in a single
+ string pool.
+ @publishedPartner
+ @prototype
+ */ 
+class CStringPoolManager : public CBase
+	{
+public:
+	IMPORT_C static CStringPoolManager* NewL( const TStringTable& aStringTable);
+	IMPORT_C static CStringPoolManager* NewL();
+	IMPORT_C void Release();
+	IMPORT_C RStringPool& StringPool();
+	IMPORT_C const TStringTable& GetUPnPTable();
+	IMPORT_C void SetStringTableL( const TStringTable& aStringTable );
+private:
+	CStringPoolManager();
+	void ConstructL(const TStringTable& stringTable);
+	~CStringPoolManager();
+	
+private:
+	RStringPool iPool;
+	RArray<TStringTable> iStringTableArray;
+};
+
+#endif // __CSTRINGPOOLMANAGER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpdescriptioncomposer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+// 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 __CUPNPDESCRIPTIONCOMPOSER_H_
+#define __CUPNPDESCRIPTIONCOMPOSER_H_
+#include <e32base.h>
+#include <stringpool.h>
+class CUPnPServiceXmlComposer;
+class CUPnPDeviceXmlComposer;
+class CUPnPDescriptionComposer : public CBase
+	{
+public:
+	enum TUPnPDescriptionType
+		{
+		EService,
+		EDevice
+		};
+public:
+	IMPORT_C static CUPnPDescriptionComposer* NewL( const RStringPool& aStringPool);
+	IMPORT_C void ComposeDescriptionXmlL( TAny* aDescriptionObj , TUPnPDescriptionType aType , RBuf8 &aXmlData );
+	IMPORT_C ~CUPnPDescriptionComposer();
+
+private:
+	CUPnPDescriptionComposer( const RStringPool& aStringPool );
+	const RStringPool& iStringPool;
+	CUPnPServiceXmlComposer* iServiceComposer;
+	CUPnPDeviceXmlComposer* iDeviceComposer;
+	};
+#endif /*CUPNPDESCRIPTIONCOMPOSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpdescriptionparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,45 @@
+// 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 __CUPNPDESCRIPTIONPARSER_H_
+#define __CUPNPDESCRIPTIONPARSER_H_
+
+#include <cstringpoolmanager.h>
+#include "cpnpserviceparam.h"
+#include "cpnpdeviceparam.h"
+
+class CUPnPDescriptionParser : public CBase
+	{
+
+public:
+	enum TUPnPDescriptionType
+		{
+		EService,
+		EDevice
+		};
+public:
+	IMPORT_C static CUPnPDescriptionParser* NewL(const RStringPool& aStringPool , TUPnPDescriptionType aType );
+	IMPORT_C ~CUPnPDescriptionParser();
+    IMPORT_C TAny* ParseDescriptionBufL(const TDesC8 &aDocument );
+      
+private:
+	CUPnPDescriptionParser( const RStringPool& aStringPool ,  TUPnPDescriptionType aType);
+	
+	const RStringPool&			iStringPool;
+	TUPnPDescriptionType		iDescriptionType;
+	CUPnPServiceDescription*	iServiceDescObj;
+	CUPnPDeviceDescription*		iDeviceDescObj;
+	};
+#endif /*CUPNPDESCRIPTIONPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpdevicecomposer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+// 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 __CUPNPDEVICECOMPOSER_H_
+#define __CUPNPDEVICECOMPOSER_H_
+
+#include <e32cons.h>
+#include <e32debug.h>
+#include "cpnpdeviceparam.h"
+#include "cstringpoolmanager.h"
+/**
+CUPnPDeviceXmlComposer is used to compose the parsed xml device description file back into a compatible format
+@publishedPartner
+@prototype
+*/
+
+class CUPnPDeviceXmlComposer: public CBase
+    {
+public:
+	static CUPnPDeviceXmlComposer* NewL( const RStringPool& aStringPool );
+	~CUPnPDeviceXmlComposer();
+	void ComposeDeviceXmlL(const CUPnPDeviceDescription *aDeviceDescObj, RBuf8 &aXmlData);
+
+
+private:
+	CUPnPDeviceXmlComposer(  const RStringPool& aStringPool );
+		
+	// Helper functions to construct the XML
+	void AppendDeviceXmlL(const CUPnPDevice* aDevObj, RBuf8 &aXmlData, TInt &aCount);
+	void AppendDeviceAttributesL(const CUPnPDevice*	aDeviceAttribute, RBuf8 &aXmlData, TInt &aCount);
+	void AppendDeviceIconL(const CUPnPIconInfo* aIconInfo, RBuf8 &aXmlData, TInt &aCount);
+	void AppendServiceL(const CUPnPServiceInfo* aServInfo, RBuf8 &aXmlData, TInt &aCount);
+	void AppendLiteralL(TInt aTag, RBuf8& aBuf, TInt& aCount, TBool aIsStart = EFalse);
+	void AppendLiteralL(const TDesC8& aLiteral, RBuf8& aBuf, TInt& aCount);
+	void AppendLiteralL(const RString& aString, RBuf8& aBuf, TInt& count, TBool aIsStart );
+	const TStringTable& GetTable();
+	
+    TInt 					iError;
+    const RStringPool&		iStringPool;
+  
+    };
+
+#endif /*CUPNPDEVICECOMPOSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpproperty.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,52 @@
+// 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 __CUPNPPROPERTY_H_
+#define __CUPNPPROPERTY_H_
+#include <e32base.h>
+#include <stringpool.h>
+
+/** Provides a mapping for the tags of an xml element and the corresponding content
+ @publishedPartner
+ @prototype
+ */ 
+class CAttribute;
+class CUPnPProperty: public CBase
+{
+protected:
+	inline CUPnPProperty();
+	inline void ConstructL();
+
+public:
+	IMPORT_C void SetPropertyL(const RString aAttributeName, const TDesC8& aAttributeVal);
+	IMPORT_C void SetPropertyL(const RString aAttributeName, TInt aAttributeVal);
+	void SetPropertyStatus(const RString aAttributeName, TBool aStatus);
+	IMPORT_C const TDesC8& Property(const RString aAttributeName) const;
+	IMPORT_C virtual ~CUPnPProperty();
+private:
+	RPointerArray<CAttribute> iAttributeArray;
+	friend class TAttributeIter;
+};
+
+
+void CUPnPProperty::ConstructL()
+	{
+	}
+
+CUPnPProperty::CUPnPProperty()
+	{
+	}
+
+#endif /*CUPNPPROPERTY_H_*/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpproperty.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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:
+//
+
+
+void CUPnPProperty::SetPropertyL(const RString aAttributeName, const TDesC8& aAttributeVal)
+	{
+	iPropertySet.SetPropertyL(aAttributeName,aAttributeVal);
+	}
+const TDesC8& CUPnPProperty::Property(const RString aAttributeName) const
+	{
+	return iPropertySet.Property(aAttributeName);
+	}
+
+void CUPnPProperty::ConstructL()
+	{
+	iPropertySet.OpenL();
+	}
+
+CUPnPProperty::CUPnPProperty()
+	{
+	}
+CUPnPProperty::~CUPnPProperty()
+	{
+	iPropertySet.Close();
+	}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cupnpservicecomposer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,50 @@
+// 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 __CUPNPSERVICECOMPOSER_H_
+#define __CUPNPSERVICECOMPOSER_H_
+
+#include "cpnpserviceparam.h"
+#include "cstringpoolmanager.h"
+
+/**
+CUPnPServiceXmlComposer is used to compose the parsed xml device description file back into a compatible format
+@publishedPartner
+@prototype
+*/
+// Composes the parsed xml file
+class CUPnPServiceXmlComposer: public CBase
+    {
+public:
+	static CUPnPServiceXmlComposer* NewL( const RStringPool& aStringPool);
+	~CUPnPServiceXmlComposer();
+	void ComposeServiceXmlL(const CUPnPServiceDescription *aServDescObj, RBuf8 &aXmlData);
+
+private:
+	// Helper functions
+	CUPnPServiceXmlComposer( const RStringPool& aStringPool );
+	const TStringTable& GetTable();
+    void AppendLiteralL(TInt aTag, RBuf8& aBuf, TInt& aCount, TBool aIsStart );
+    void AppendLiteralL(const TDesC8& aLiteral, RBuf8& aBuf, TInt& aCount);
+    void AppendLiteralL(const RString& aString, RBuf8& aBuf, TInt& count, TBool aIsStart );
+    void AppendActionL(const CUPnPAction* aUPnPAction, RBuf8 &aXmlData, TInt &aCount);	
+    void AppendStateVariableL(const CUPnPStateVariable* aUPnPStateVariable, RBuf8 &aXmlData, TInt &aCount);
+   
+private:
+    const RStringPool&			iStringPool;
+    TInt 				iError;
+
+    };
+#endif /*CUPNPSERVICECOMPOSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/deviceiconparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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 __DEVICEICONPARSER_H__
+#define __DEVICEICONPARSER_H__
+
+#include <xml/parser.h>
+#include "parsehandlerbase.h"
+#include "cpnpdeviceparam.h"
+/* CDeviceIconParser is used to parse each icon element in device description which contains the following fields
+ 1. icon
+ 2. mimetype
+ 3. width
+ 4. height
+ 5. depth
+ 6. url
+ Please consult UPnPDeviceArchitecture 1.0
+ */
+class CDeviceIconParser : public CParseHandlerBase
+	{
+public:
+	static CDeviceIconParser* NewL(CUPnPIconInfo *aDeviceIcon, const RStringPool &aStringPool);
+	virtual ~CDeviceIconParser();
+
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+
+private:
+	CDeviceIconParser(CUPnPIconInfo *aDeviceIcon, const RStringPool &aStringPool);
+	
+private:
+	CUPnPIconInfo *iDeviceIcon;
+	const RStringPool &iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+
+#endif//__DEVICEICONPARSER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/deviceinfoparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,56 @@
+// 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 __DEVICEINFOPARSER_H__
+#define __DEVICEINFOPARSER_H__
+
+#include <xml/parser.h>
+#include "parsehandlerbase.h"
+#include "cpnpdeviceparam.h"
+
+/* CDeviceInfoParser parses the device description file.
+   Whatever fields are present in the xml device description tree after <device> tag are parsed here
+   It calls suitable classes to parse child elements like icon,service etc.
+   
+   Also see CUPnPDeviceIconParser and CUPnPServiceInfoParser
+   Please consult UPnPDeviceArchitecture 1.0
+ */
+class CDeviceInfoParser : public CParseHandlerBase
+		{
+	public:
+		static CDeviceInfoParser* NewL(CUPnPDevice *aDeviceInfo, const RStringPool& aStringPool);
+		virtual ~CDeviceInfoParser();
+
+		virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+		virtual void ParseEndElementL(const RTagInfo& aElement);
+		virtual void ParseContentL(const TDesC8& aBytes);
+		virtual void ParsePrefixL(const RString& aPrefix, const RString& aUri);
+	private:
+		CDeviceInfoParser(CUPnPDevice *aDeviceInfo, const RStringPool& aStringPool);
+		enum
+			{
+			EDevice  = 			0x001,
+			EDeviceType =		0x002,
+			EDeviceList = 		0x004,
+			EEmbeddedDevice = 	0x005, //Embedded device (EDeviceList | EDevice)
+			};
+	private:
+		CUPnPDevice *iDeviceInfo;
+		const RStringPool& iStringPool;
+		CParser* iXmlParser;
+		TUint iFlags;
+		};
+		
+#endif//__DEVICEINFOPARSER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/parsehandlerbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,73 @@
+// 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 __PARSEHANDLERBASE_H__
+#define __PARSEHANDLERBASE_H__
+
+#include <xml/contenthandler.h>
+#include <xml/contentsource.h>
+#include <xml/parserfeature.h>
+#include <e32base.h>
+
+using namespace Xml;
+	
+/** Provides an MContentHandler inteface that has a virtual destructor and implements
+default behavior for parsers which can be overriden by derived parsers as required
+*/
+class CParseHandlerBase : public CBase, public MContentHandler
+	{
+public:
+	virtual ~CParseHandlerBase();
+	
+	// Overridden as required by derived classes
+	inline virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	inline virtual void ParseEndElementL(const RTagInfo& aElement);
+	inline virtual void ParseContentL(const TDesC8& aBytes);
+	inline virtual void ParsePrefixL(const RString& aPrefix, const RString& aUri);
+
+	// From MContentHandler
+	inline virtual void OnStartDocumentL(const RDocumentParameters& aDocParam, TInt aErrorCode);
+    inline virtual void OnEndDocumentL(TInt aErrorCode);
+	virtual void OnStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes, TInt aErrorCode);
+	virtual void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
+	virtual void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
+	virtual void OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, TInt aErrorCode);
+	inline virtual void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
+	inline virtual void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
+	inline virtual void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
+	inline virtual void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, TInt aErrorCode);
+	inline virtual void OnError(TInt aErrorCode);
+	inline virtual TAny* GetExtendedInterface(const TInt32 aUid);
+	TBool IsBlankSpace(const TDesC8& aBytes);
+protected:
+	void StartChildParserL(CParseHandlerBase* aChildParser, const RTagInfo& aElement, const RAttributeArray& aAttributes);
+		
+private:
+	inline TInt SiblingCount();
+		
+private:
+	CParseHandlerBase* iChildParser; // delete when depth = 0
+protected:	
+		TInt iSiblingsCount;
+		RString iString;
+		};
+
+TInt CParseHandlerBase::SiblingCount()
+	{
+	return iSiblingsCount;
+	}
+
+#include "parsehandlerbase.inl"
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/parsehandlerbase.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,82 @@
+// 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:
+//
+
+void CParseHandlerBase::ParseStartElementL(const RTagInfo& /*aElement*/, const RAttributeArray& /*aAttributes*/)
+	{
+	// not expecting a start tag
+	User::Leave(KErrCorrupt);
+	}
+	
+void CParseHandlerBase::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	// not expecting an end tag
+	User::Leave(KErrCorrupt);
+	}
+	
+void CParseHandlerBase::ParseContentL(const TDesC8& /*aBytes*/)
+	{
+	// ignore content, probably just tabs and white space	
+	}
+void CParseHandlerBase::ParsePrefixL(const RString& /*aPrefix*/, const RString& /*aUri*/)
+	{
+	// not expecting anything here
+	}
+
+void CParseHandlerBase::OnStartDocumentL(const RDocumentParameters& /*aDocParam*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CParseHandlerBase::OnEndDocumentL(TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CParseHandlerBase::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	
+	// Do nothing
+	
+	}
+
+void CParseHandlerBase::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	// Don't care about ignorable white space
+	}
+
+void CParseHandlerBase::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CParseHandlerBase::OnProcessingInstructionL(const TDesC8& /*aTarget*/, const TDesC8& /*aData*/, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	}
+
+void CParseHandlerBase::OnError(TInt aErrorCode)
+	{
+	User::LeaveIfError( aErrorCode );
+	}
+
+TAny* CParseHandlerBase::GetExtendedInterface(const TInt32 /*aUid*/)
+	{
+	// we don't support any extended interfaces
+	return NULL;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/rootdeviceparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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:
+// rootinfoparser.h
+// 
+//
+
+#ifndef __ROOTINFOPARSER_H__
+#define __ROOTINFOPARSER_H__
+
+#include <xml/parser.h>
+#include "parsehandlerbase.h"
+#include "cpnpdeviceparam.h"
+/* CRootDeviceParser parses the root device information. It calls suitable parsers where necessary
+ to parse child elements
+ */
+class CRootDeviceParser : public CParseHandlerBase
+	{
+public:
+	static CRootDeviceParser* NewL(CUPnPDeviceDescription *aDeviceParser, const RStringPool& aStringPool);
+	virtual ~CRootDeviceParser();
+
+	void StartParseL(const TDesC8& aFragment);
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+	
+private:
+	void ConstructL();
+	CRootDeviceParser(CUPnPDeviceDescription *aDeviceParser, const RStringPool& aStringPool);
+	enum
+		{
+		ERoot = 	0x0001,
+		EUrlBase=	0x0002
+		};
+
+private:
+	CUPnPDeviceDescription *iDeviceDescpn;
+	const RStringPool &iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+
+#endif//__ROOTINFOPARSER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/rootserviceparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+// 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 __ROOTSERVICEPARSER_H_
+#define __ROOTSERVICEPARSER_H_
+#include <xml/parser.h>
+#include "parsehandlerbase.h"
+#include "cpnpserviceparam.h"
+
+/* CRootServiceParser parses the root device information. It calls suitable parsers where necessary
+ to parse child elements
+ */
+class CRootServiceParser : public CParseHandlerBase
+	{
+public:
+	static CRootServiceParser* NewL(CUPnPServiceDescription *aServiceParser, const RStringPool& aStringPool);
+	virtual ~CRootServiceParser();
+
+	void StartParseL(const TDesC8& aFragment);
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+	
+private:
+	void ConstructL();
+	CRootServiceParser(CUPnPServiceDescription* aServiceParser, const RStringPool& aStringPool);
+	enum
+		{
+		EScpd = 0x01,
+		EActionList = 0x02,
+		EServiceStateTable = 0x04,
+		EAllChild = 0x08
+		};
+
+private:
+	CUPnPServiceDescription* iServiceDesc;
+	const RStringPool& iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+
+#endif /*ROOTSERVICEPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/serviceinfoparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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 __SERVICEINFOPARSER_H__
+#define __SERVICEINFOPARSER_H__
+
+#include <xml/parser.h>
+#include "parsehandlerbase.h"
+#include "cpnpdeviceparam.h"
+
+/* CServiceInfoParser is used to parse the service element of device description
+ It extracts information about the following elements
+ 1. ServiceType
+ 2. ServiceId
+ 3. ScpdUrl
+ 4. ContorlUrl
+ 5. EventSubUrl
+ Please consult UPnPDeviceArchitecture 1.0
+ */ 
+class CServiceInfoParser : public CParseHandlerBase
+	{
+public:
+	static CServiceInfoParser* NewL(CUPnPServiceInfo *aServiceInfo, const RStringPool &aStringPool);
+	virtual ~CServiceInfoParser();
+
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+
+private:
+	CServiceInfoParser(CUPnPServiceInfo *aServiceInfo, const RStringPool &aStringPool);
+	
+private:
+	CUPnPServiceInfo *iServiceInfo;
+	const RStringPool &iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+
+#endif//__SERVICEINFOPARSER_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/specversionparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+// 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 __SPECVERSIONPARSER_H__
+#define __SPECVERSIONPARSER_H__
+
+#include <xml/parser.h>
+#include "parsehandlerbase.h"
+#include "cpnpdeviceparam.h"
+#include "cpnpserviceparam.h"
+/* CSpecVersionParser is used to parse the specification element in service and device
+   description files
+ */
+class CSpecVersionParser : public CParseHandlerBase
+	{
+public:
+	
+	static CSpecVersionParser* NewL(CUPnPDeviceDescription *aDeviceDesc, const RStringPool& aStringPool);
+	static CSpecVersionParser* NewL(CUPnPServiceDescription *aServiceDesc, const RStringPool& aStringPool);
+		
+	virtual ~CSpecVersionParser();
+
+	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
+	virtual void ParseEndElementL(const RTagInfo& aElement);
+	virtual void ParseContentL(const TDesC8& aBytes);
+
+private:
+	enum
+		{
+		ESpec			   = 	0x01,
+		EMajorVersion 	   = 	0x02,
+		EMinorVersion      = 	0x04,
+		};
+	enum TDescriptionType
+		{
+		EDeviceType  = 0xFE,
+		EServiceType = 0xFF,
+		};
+	TDescriptionType iType;
+	
+	CSpecVersionParser(CUPnPDeviceDescription* aDeviceDesc, const RStringPool& aStringPool);
+	CSpecVersionParser(CUPnPServiceDescription* aServiceDesc, const RStringPool& aStringPool);
+private:
+	CUPnPDeviceDescription* 	iDeviceDesc;
+	CUPnPServiceDescription* 	iServiceDesc;
+	
+	const RStringPool& iStringPool;
+	CParser* iXmlParser;
+	TUint iFlags;
+	};
+
+#endif//__SPECVERSIONPARSER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/tattributeiter.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,40 @@
+// 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 __TATTRIBUTEITER_H_
+#define __TATTRIBUTEITER_H_
+
+#include "cupnpproperty.h"
+
+class TAttributeIter
+	{
+public:
+	TAttributeIter(const CUPnPProperty* aParamPart);
+	~TAttributeIter();
+
+	void First();
+	TBool AtEnd();
+	void operator++();
+	const CAttribute* operator()();
+
+private:
+	void CheckInvalidation();
+	
+private:
+	const CUPnPProperty* iParamPart;
+	TInt iPosIdx;
+	};
+
+#endif /*TATTRIBUTEITER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cactionparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,69 @@
+// 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 "cactionparser.h"
+#include <upnpdescriptionschema.h>
+#include "cargumentparser.h"
+
+CActionParser* CActionParser::NewL(CUPnPAction* aAction, const RStringPool& aStringPool)
+	{
+	CActionParser* self = new (ELeave) CActionParser(aAction, aStringPool);
+	return self;
+	}
+
+CActionParser::CActionParser(CUPnPAction* aAction, const RStringPool& aStringPool) : iAction(aAction), iStringPool(aStringPool)
+	{
+	}
+
+CActionParser::~CActionParser()
+	{
+	}
+
+void CActionParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	TInt tblIndex = iString.Index ( UPNPDESCRIPTIONXMLTAGS::Table );
+		
+	if (tblIndex >= 0)
+		{
+		if ( tblIndex ==UPNPDESCRIPTIONXMLTAGS::EArgument)
+			{
+			iSiblingsCount--;
+			CUPnPArgument* argument = CUPnPArgument::NewL();
+			CleanupStack::PushL(argument);
+			iAction->AppendL( argument );
+			CleanupStack::Pop( argument );
+			CArgumentParser* argumentParser = CArgumentParser::NewL(argument, iStringPool);
+			CleanupStack::PushL(argumentParser);
+			StartChildParserL( argumentParser, aElement, aAttributes );
+			CleanupStack::Pop( argumentParser);
+			}
+		}
+	}
+	
+
+void CActionParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iAction->SetPropertyStatus(iString,ETrue);
+	iString.Close();
+	}
+
+void CActionParser::ParseContentL(const TDesC8& aBytes)
+	{
+	if ( !IsBlankSpace( aBytes ) )
+		iAction->SetPropertyL(iString, aBytes);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cargumentparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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 <upnpdescriptionschema.h>
+#include "cargumentparser.h"
+
+CArgumentParser* CArgumentParser::NewL(CUPnPArgument* aArgument, const RStringPool& aStringPool)
+	{
+	CArgumentParser* self = new (ELeave) CArgumentParser(aArgument, aStringPool);
+	return self;
+	}
+
+CArgumentParser::CArgumentParser(CUPnPArgument* aArgument, const RStringPool& aStringPool) : iArgument(aArgument), iStringPool(aStringPool)
+	{
+	}
+
+CArgumentParser::~CArgumentParser()
+	{
+	}
+
+void CArgumentParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& /* aAttributes */)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	TInt tblIndex = iString.Index ( UPNPDESCRIPTIONXMLTAGS::Table );
+	if ( tblIndex == UPNPDESCRIPTIONXMLTAGS::ERetValue)
+		iArgument->SetRetVal( ETrue );
+	
+	}
+
+void CArgumentParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iArgument->SetPropertyStatus(iString,ETrue);
+	iString.Close();
+	}
+
+void CArgumentParser::ParseContentL(const TDesC8& aBytes)
+	{
+	if ( !IsBlankSpace( aBytes ) )
+		iArgument->SetPropertyL( iString , aBytes );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cattribute.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,67 @@
+// 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 "cattribute.h"
+
+CAttribute* CAttribute::NewL(const RString aAttributeName, const TDesC8& aAttributeVal)
+	{
+	return new(ELeave)CAttribute(aAttributeName, aAttributeVal);
+	}
+
+CAttribute::~CAttribute()
+	{
+	iAttributeName.Close();
+	iAttributeValue.Close();
+	}
+
+const RString& CAttribute::AttributeName() const
+	{
+	return iAttributeName;
+	}
+
+const TDesC8& CAttribute::AttributeValue() const
+	{
+	return iAttributeValue;
+	}
+
+void CAttribute::SetValueL(const TDesC8& aAttributeVal)
+	{
+	if(iParsedStatus)
+		{
+		iAttributeValue.Close();
+		iAttributeValue.Create(aAttributeVal.Length());
+		iAttributeValue.Copy(aAttributeVal);
+		iParsedStatus = EFalse;
+		}
+	else
+		{
+		TInt len = iAttributeValue.Length();
+		iAttributeValue.ReAllocL( len + aAttributeVal.Length() );
+		iAttributeValue.Append ( aAttributeVal );
+		}
+	}
+
+void CAttribute::SetStatus(TBool aStatus)
+	{
+	iParsedStatus = aStatus;
+	}
+
+CAttribute::CAttribute(RString aAttributeName, const TDesC8& aAttributeVal)
+	{
+	iAttributeName = aAttributeName.Copy();
+	iAttributeValue.Create(aAttributeVal.Length());
+	iAttributeValue.Copy(aAttributeVal);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cpnpdeviceparam.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,225 @@
+// 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 <e32cons.h>
+
+#include "cpnpdeviceparam.h"
+#include <upnpdescriptionschema.h>
+#include "inetprottextutils.h"
+
+
+EXPORT_C CUPnPIconInfo* CUPnPIconInfo::NewL()
+    {
+    CUPnPIconInfo* self = new (ELeave) CUPnPIconInfo();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+CUPnPIconInfo::CUPnPIconInfo()
+    {
+
+    }
+
+void CUPnPIconInfo::ConstructL()
+    {
+    CUPnPProperty::ConstructL();
+    }
+
+EXPORT_C CUPnPIconInfo::~CUPnPIconInfo()
+    {
+    }
+
+// Validation for icon
+TBool CUPnPIconInfo::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) 
+	{
+	TBool result=EFalse;
+
+	if(	(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EWidth, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EMimeType, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EHeight, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDepth, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EUrl, aStringTable)).Length()!=0) )
+		{
+		result = ETrue;
+		}
+		
+	return result;
+	}
+
+//-------------------------------------------------------------------------
+
+EXPORT_C CUPnPServiceInfo* CUPnPServiceInfo::NewL()
+	{
+	CUPnPServiceInfo* self = new (ELeave) CUPnPServiceInfo();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CUPnPServiceInfo::CUPnPServiceInfo()
+	{
+	
+	}
+
+void CUPnPServiceInfo::ConstructL()
+	{
+	CUPnPProperty::ConstructL();
+	}
+
+
+EXPORT_C CUPnPServiceInfo::~CUPnPServiceInfo()
+	{
+	}
+
+// Validation for service
+
+TBool CUPnPServiceInfo::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) 
+	{
+	TBool result=EFalse;
+	if(	(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EServiceType, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EServiceId, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EScpdUrl, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EContorlUrl, aStringTable)).Length()!=0) )
+		{
+		result = ETrue;
+		}
+		
+	return result;
+
+	}
+
+// ------------------------------------------------------------------
+EXPORT_C CUPnPDevice* CUPnPDevice::NewL()
+	{
+	CUPnPDevice* self = new (ELeave) CUPnPDevice();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CUPnPDevice::CUPnPDevice()
+	{
+	}
+
+void CUPnPDevice::ConstructL()
+	{
+	CUPnPProperty::ConstructL();
+	}
+
+EXPORT_C CUPnPDevice::~CUPnPDevice()
+	{
+	iEmbeddedDeviceInfo.ResetAndDestroy();
+	iIconInfo.ResetAndDestroy();
+	iServiceInfo.ResetAndDestroy();
+	}
+
+// Validation for CUPnPDevice
+TBool CUPnPDevice::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) 
+	{
+	TBool result=ETrue;
+	TInt i;
+
+	if(	(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDeviceType, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EFriendlyName, aStringTable)).Length()!=0) &&
+		(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EUdn, aStringTable)).Length()!=0)  )
+		{
+		result = ETrue;
+		}
+	else
+		result = EFalse;
+	
+	// Validate manufacturer attribute
+	if (result & (Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EManufacturer, aStringTable)).Length()!=0) )
+		result = ETrue;
+	else
+		result = EFalse;
+	
+	// Validate the model attribute
+	if (result & (Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EModelName, aStringTable)).Length()!=0) )
+		result = ETrue;
+	else
+		result = EFalse;
+	
+	if(result)
+		{
+		for(i=0;i<CountOfEmbeddedDeviceInfoTable();i++)
+			{
+			result = iEmbeddedDeviceInfo[i]->Validate(aStringPool,aStringTable);
+			if(EFalse==result)
+				break;
+			}
+		}
+
+	if(result)
+		{
+		for(i=0;i<CountOfServiceInfoTable();i++)
+			{
+			result = iServiceInfo[i]->Validate(aStringPool,aStringTable);
+			if(EFalse==result)
+				break;
+			}
+		
+		}
+	if(result)
+		{
+		for(i=0;i<CountOfIconInfoTable();i++)
+			{
+			result = iIconInfo[i]->Validate(aStringPool,aStringTable);
+			if(EFalse==result)
+				break;
+			}
+		}
+	return result;
+	}
+
+//-------------------------------------------------------------------
+EXPORT_C CUPnPDeviceDescription* CUPnPDeviceDescription::NewL()
+	{
+	CUPnPDeviceDescription* self = new (ELeave) CUPnPDeviceDescription();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CUPnPDeviceDescription::CUPnPDeviceDescription()
+	{
+	}
+
+void CUPnPDeviceDescription::ConstructL()
+	{
+	CUPnPProperty::ConstructL();
+	}
+
+EXPORT_C CUPnPDeviceDescription::~CUPnPDeviceDescription()
+	{
+	if(iDeviceObj!=NULL)
+		delete iDeviceObj;
+	}
+
+// Validation for device description. It delegates the validation to the root device
+TBool CUPnPDeviceDescription::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const
+	{
+	
+	if(iDeviceObj!=NULL)
+		return iDeviceObj->Validate(aStringPool,aStringTable);
+	else
+		return EFalse;	
+	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cpnpserviceparam.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,277 @@
+// 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 <upnp/cpnpserviceparam.h>
+#include "inetprottextutils.h"
+#include <upnpdescriptionschema.h>
+#include <e32cons.h>
+
+
+CUPnPArgument* CUPnPArgument::NewL()
+    {
+    CUPnPArgument* self = new (ELeave) CUPnPArgument();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+CUPnPArgument::CUPnPArgument()
+    {
+    }
+
+void CUPnPArgument::ConstructL()
+    {
+	CUPnPProperty::ConstructL();
+    }
+//Destructor
+CUPnPArgument::~CUPnPArgument()
+    {
+    }
+
+ 
+//Perform validation
+
+TBool CUPnPArgument::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const
+	{
+	TBool result=EFalse;
+	if(	(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EName, aStringTable)).Length()!=0) &&
+			(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EArgumentDirection, aStringTable)).Length()!=0) &&	
+			(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::ERelatedStateVar, aStringTable)).Length()!=0))
+				result = ETrue;
+	
+	return result;
+	
+	}
+
+void CUPnPArgument::SetRetVal( TBool aValue)
+	{
+	iRetVal = aValue;
+	}
+
+TBool CUPnPArgument::RetVal()
+	{
+	return iRetVal;
+	}
+//--------------------------------------------------------------------
+
+EXPORT_C CUPnPValueRange* CUPnPValueRange::NewL()
+	{
+	CUPnPValueRange* self = new (ELeave) CUPnPValueRange();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CUPnPValueRange::CUPnPValueRange()
+	{
+	}
+
+void CUPnPValueRange::ConstructL()
+	{
+	CUPnPProperty::ConstructL();
+	}
+ 
+//Destructor
+
+EXPORT_C CUPnPValueRange::~CUPnPValueRange()
+	{
+	}
+
+
+//--------------------------------------------------------------------
+
+CUPnPArgValueList* CUPnPArgValueList::NewL()
+	{
+	CUPnPArgValueList* self = new (ELeave) CUPnPArgValueList();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CUPnPArgValueList::CUPnPArgValueList()
+{
+}
+
+void CUPnPArgValueList::ConstructL()
+	{
+	CUPnPProperty::ConstructL();
+	}
+
+ 
+//Destructor
+
+CUPnPArgValueList::~CUPnPArgValueList()
+{
+	for(TInt i =0;i< iAllowedValueList.Count();i++ )
+    	{
+    	iAllowedValueList[i].Close();
+    	}
+	iAllowedValueList.Reset();
+}
+
+//------------------------------------------------------------------------
+
+CUPnPStateVariable* CUPnPStateVariable::NewL()
+	{
+	CUPnPStateVariable* self = new (ELeave) CUPnPStateVariable();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CUPnPStateVariable::CUPnPStateVariable()
+	{
+	}
+
+void CUPnPStateVariable::ConstructL()
+	{
+	CUPnPProperty::ConstructL();
+	}
+
+
+/** 
+Destructor
+*/
+CUPnPStateVariable::~CUPnPStateVariable()
+	{
+	delete iAllowedValue;
+	}
+
+/** 
+validation
+*/
+TBool CUPnPStateVariable::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const
+	{
+	TBool result=ETrue;
+	// name cannot be of zero chars
+	
+	if(	(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EName, aStringTable)).Length()!=0) &&
+			(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EStateVariableDataType, aStringTable)).Length()!=0) &&
+			(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::ESendEvents, aStringTable)).Length()!=0)	)
+				result = ETrue;
+
+	
+	return result;
+
+	}
+
+//----------------------------------------------------------
+
+CUPnPAction* CUPnPAction::NewL()
+	{
+	CUPnPAction* self = new (ELeave) CUPnPAction();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CUPnPAction::CUPnPAction()
+	{
+	}
+
+void CUPnPAction::ConstructL()
+	{
+	CUPnPProperty::ConstructL();
+	}
+
+/** 
+Destructor
+*/
+CUPnPAction::~CUPnPAction()
+	{
+	iArgumentList.ResetAndDestroy();
+	}
+
+/** 
+validation
+*/
+TBool CUPnPAction::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const
+	{
+	TBool result=ETrue;
+	// name cannot be of zero chars
+	if(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EName, aStringTable)).Length()==0)
+		result = EFalse;
+	
+	return result;
+
+	}
+
+//-------------------------------------------------------------
+
+EXPORT_C CUPnPServiceDescription* CUPnPServiceDescription::NewL()
+	{
+	CUPnPServiceDescription* self = new (ELeave) CUPnPServiceDescription();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CUPnPServiceDescription::CUPnPServiceDescription()
+	{
+	}
+
+void CUPnPServiceDescription::ConstructL()
+	{
+	CUPnPProperty::ConstructL();
+	}
+	
+
+/** 
+Destructor
+*/
+EXPORT_C CUPnPServiceDescription::~CUPnPServiceDescription()
+	{
+	iActionList.ResetAndDestroy();
+	iServiceStateTable.ResetAndDestroy();
+	
+	}
+
+/** 
+validation
+*/
+TBool CUPnPServiceDescription::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const
+	{
+	
+	TBool result=ETrue;
+	if(iServiceStateTable.Count()<=0)
+		result = EFalse;
+	if(result)
+		{
+		for(TInt i =0;i< CountOfActionList();i++ )
+			{
+			result = iActionList[i]->Validate(aStringPool,aStringTable );
+			if(result==EFalse)
+				break;
+			}
+		}
+
+	if(result)
+		{
+		for(TInt i =0;i< CountOfServiceStateTable();i++ )
+			{
+			result = iServiceStateTable[i]->Validate(aStringPool, aStringTable );
+			if(result==EFalse) 
+				break;
+			}
+		}
+	return result;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cstatetableparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,156 @@
+// 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 "cstatetableparser.h"
+#include <upnpdescriptionschema.h>
+
+CStateTableParser* CStateTableParser::NewL(CUPnPStateVariable *aStateTable, const RStringPool& aStringPool)
+	{
+	CStateTableParser* self = new (ELeave) CStateTableParser(aStateTable, aStringPool);
+	return self;
+	}
+
+CStateTableParser::CStateTableParser(CUPnPStateVariable *aStateTable, const RStringPool& aStringPool) : iStateTable(aStateTable), iStringPool(aStringPool)
+	{
+	}
+
+CStateTableParser::~CStateTableParser()
+	{
+	}
+
+void CStateTableParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	TInt tblIndex = iString.Index ( UPNPDESCRIPTIONXMLTAGS::Table );
+	const TDesC8& str = iString.DesC();
+	switch(tblIndex)
+		{
+	case UPNPDESCRIPTIONXMLTAGS::EStateVariable:
+		{
+		_LIT8(KSendEvents,"sendEvents");
+		_LIT8(KYes,"yes");
+		_LIT8(KNo,"no");
+		
+		const RAttribute& attribute = aAttributes[0];
+		const RTagInfo& nameInfo = attribute.Attribute();
+
+		const TDesC8& localName = nameInfo.LocalName().DesC();
+		if ( localName.CompareF( KSendEvents ) )
+			User::Leave(KErrCorrupt);
+		const TDesC8& value = attribute.Value().DesC();
+		if ( !value.CompareF(KYes) )
+			iStateTable->SetPropertyL(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::ESendEvents, UPNPDESCRIPTIONXMLTAGS::Table),KYes);
+			
+		else if ( !value.CompareF(KNo) )
+			iStateTable->SetPropertyL(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::ESendEvents, UPNPDESCRIPTIONXMLTAGS::Table),KNo);
+		else
+			User::Leave(KErrCorrupt);
+		
+		}
+		
+	break;
+	
+	case UPNPDESCRIPTIONXMLTAGS::EAllowedValueList:
+		{
+		if ( !iArgValueList )
+			{
+			iArgValueList = CUPnPArgValueList::NewL();
+			iArgValueList->iType = CUPnPArgValueList::EArgValueList;
+			}
+		else
+			User::Leave(KErrCorrupt);
+		
+		iStateTable->SetAllowedValueType(ETrue);
+		iStateTable->SetAllowedValuesL(iArgValueList);
+		iFlags = iFlags | EAllowedValue;
+		}
+	break;
+		
+	case UPNPDESCRIPTIONXMLTAGS::EAllowedValueRange:
+		{
+		iSiblingsCount--;
+		CUPnPValueRange* valueRange = CUPnPValueRange::NewL();
+		valueRange->iType = CUPnPValueRange::EArgValueRange ;
+		CleanupStack::PushL(valueRange);
+		iStateTable->SetAllowedValuesL(valueRange);
+		iStateTable->SetAllowedValueType(EFalse);
+		CleanupStack::Pop();
+		CValueRangeParser* valueParser = CValueRangeParser::NewL(valueRange, iStringPool);
+		CleanupStack::PushL(valueParser);
+		StartChildParserL(valueParser, aElement, aAttributes);
+		CleanupStack::Pop(valueParser);
+		}
+	break;
+		//default : Don't do anything
+		}
+
+	}
+
+void CStateTableParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iStateTable->SetPropertyStatus(iString,ETrue);
+	iString.Close();
+	}
+	
+void CStateTableParser::ParseContentL(const TDesC8& aBytes)
+	{
+	if ( !IsBlankSpace( aBytes ) )
+		{
+		if ( iFlags == EAllowedValue )
+			iArgValueList->AppendL( aBytes );
+		else 
+			iStateTable->SetPropertyL(iString,aBytes);
+		}
+	}
+
+//------------------------------------------------------------------------------
+CValueRangeParser* CValueRangeParser::NewL(CUPnPValueRange* aValueRange, const RStringPool& aStringPool)
+	{
+	CValueRangeParser* self = new (ELeave) CValueRangeParser(aValueRange, aStringPool);
+	return self;
+	}
+
+CValueRangeParser::CValueRangeParser(CUPnPValueRange* aValueRange, const RStringPool& aStringPool) : iValueRange(aValueRange), iStringPool(aStringPool)
+	{
+	}
+
+CValueRangeParser::~CValueRangeParser()
+	{
+	}
+
+void CValueRangeParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	}
+
+void CValueRangeParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iValueRange->SetPropertyStatus(iString,ETrue);
+	iString.Close();
+	}
+
+void CValueRangeParser::ParseContentL(const TDesC8& aBytes)
+	{
+	if ( !IsBlankSpace( aBytes ) )
+		iValueRange->SetPropertyL( iString, aBytes );
+	
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cstringpoolmanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,72 @@
+// 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 <e32base.h>
+#include "cstringpoolmanager.h"
+#include <upnpdescriptionschema.h>
+
+CStringPoolManager::CStringPoolManager()
+	{
+	}
+
+EXPORT_C CStringPoolManager* CStringPoolManager::NewL(const TStringTable& aStringTable)
+	{
+	CStringPoolManager* mgr = new (ELeave) CStringPoolManager();
+	CleanupStack::PushL(mgr);
+	mgr->ConstructL(aStringTable);
+	CleanupStack::Pop(mgr);
+	return mgr;
+	}
+EXPORT_C CStringPoolManager* CStringPoolManager::NewL()
+	{
+	CStringPoolManager* mgr = new (ELeave) CStringPoolManager();
+	CleanupStack::PushL(mgr);
+	mgr->ConstructL(UPNPDESCRIPTIONXMLTAGS::Table );
+	CleanupStack::Pop(mgr);
+	return mgr;
+	}
+EXPORT_C void CStringPoolManager::Release()
+	{
+	delete this;
+	}
+
+EXPORT_C RStringPool& CStringPoolManager::StringPool()
+	{
+	return iPool;
+	}
+
+EXPORT_C void CStringPoolManager::SetStringTableL( const TStringTable& aStringTable )
+	{
+	iStringTableArray.AppendL( aStringTable );
+	iPool.OpenL( aStringTable );
+	}
+EXPORT_C const TStringTable& CStringPoolManager::GetUPnPTable()
+	{
+	return UPNPDESCRIPTIONXMLTAGS::Table;
+	}
+CStringPoolManager::~CStringPoolManager()
+	{
+	iPool.Close();
+	iStringTableArray.Close();
+	}
+
+void CStringPoolManager::ConstructL(const TStringTable& aStringTable)
+	{
+	iStringTableArray.AppendL( aStringTable );
+	iPool.OpenL( aStringTable );
+	}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpdescriptioncomposer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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 <cupnpdescriptioncomposer.h>
+#include "cupnpservicecomposer.h"
+#include "cupnpdevicecomposer.h"
+
+EXPORT_C CUPnPDescriptionComposer* CUPnPDescriptionComposer::NewL(  const RStringPool& aStringPool )
+	{
+	return new ( ELeave ) CUPnPDescriptionComposer( aStringPool );
+	}
+EXPORT_C void CUPnPDescriptionComposer::ComposeDescriptionXmlL( TAny* aDescriptionObj , TUPnPDescriptionType aType , RBuf8 &aXmlData )
+	{
+	if( aType == CUPnPDescriptionComposer::EService )
+		{
+		
+		iServiceComposer = CUPnPServiceXmlComposer::NewL( iStringPool );
+		CUPnPServiceDescription* serviceDescObj = static_cast<CUPnPServiceDescription*> ( aDescriptionObj );
+		iServiceComposer->ComposeServiceXmlL(serviceDescObj, aXmlData);
+		}
+	else 
+		{
+		iDeviceComposer = CUPnPDeviceXmlComposer::NewL(  iStringPool );
+		CUPnPDeviceDescription* deviceDescObj = static_cast<CUPnPDeviceDescription*> ( aDescriptionObj );
+		iDeviceComposer->ComposeDeviceXmlL(deviceDescObj, aXmlData);
+		}
+	}
+
+EXPORT_C CUPnPDescriptionComposer::~CUPnPDescriptionComposer()
+	{
+	delete iServiceComposer;
+	delete iDeviceComposer;
+	}
+
+CUPnPDescriptionComposer::CUPnPDescriptionComposer(	const RStringPool& aStringPool): iStringPool (aStringPool)
+	{
+	
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpdescriptionparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,77 @@
+// 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:
+// cupnpserviceparser.cpp
+// 
+//
+
+#include <upnpdescriptionschema.h>
+#include "cupnpdescriptionparser.h"
+#include "inetprottextutils.h"
+#include "rootserviceparser.h"
+#include "rootdeviceparser.h"
+#include "parsehandlerbase.h"
+
+using namespace Xml;
+
+/**
+Allocates and constructs a CUPnPDescriptionParser object.
+Initialises all member data to their default values.
+*/
+EXPORT_C CUPnPDescriptionParser* CUPnPDescriptionParser::NewL(const RStringPool& aStringPool ,  TUPnPDescriptionType aType)
+	{
+    CUPnPDescriptionParser* self = new (ELeave) CUPnPDescriptionParser(aStringPool ,aType);
+    return self;
+    }
+
+CUPnPDescriptionParser::CUPnPDescriptionParser( const RStringPool& aStringPool ,  TUPnPDescriptionType aType)
+	:iStringPool ( aStringPool )
+    {
+    iDescriptionType = aType;
+	}
+
+/**
+Passes an XML to the framework for parsing from buffer
+*/
+EXPORT_C TAny* CUPnPDescriptionParser::ParseDescriptionBufL(const TDesC8 &aDocument)
+	{
+	if( iDescriptionType == CUPnPDescriptionParser::EService )
+		{
+		iServiceDescObj = CUPnPServiceDescription::NewL();
+		CRootServiceParser* parser = CRootServiceParser::NewL(iServiceDescObj, iStringPool);
+		CleanupStack::PushL(parser);
+		parser->StartParseL(aDocument);
+		CleanupStack::PopAndDestroy(parser);
+		return iServiceDescObj;
+		}
+	else
+		{
+		iDeviceDescObj = CUPnPDeviceDescription::NewL();
+		CRootDeviceParser* parser = CRootDeviceParser::NewL(iDeviceDescObj, iStringPool);
+		CleanupStack::PushL(parser);
+		parser->StartParseL(aDocument);
+		CleanupStack::PopAndDestroy(parser);
+		return iDeviceDescObj;
+		}
+	
+	}
+
+/**
+Destructor
+*/
+EXPORT_C CUPnPDescriptionParser::~CUPnPDescriptionParser()
+    {
+    }
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpdevicecomposer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,338 @@
+// 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 "cupnpdevicecomposer.h"
+#include <upnpdescriptionschema.h>
+#include "inetprottextutils.h"
+#include "tattributeiter.h"
+#include "cattribute.h"
+
+#define COMPOSE_BUFLENGTH 1024
+
+_LIT8(KStringXmlStart,"<?xml version=\"1.0\" encoding=\"utf-8\"?>");
+// Below hard coding should be removed
+_LIT8(KStringRootStart,"\n<root xmlns=\"urn:schemas-upnp-org:device-1-0\">");
+_LIT8(KDlnaNameSpace," xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">");
+_LIT8(KDlna,"dlna:");
+
+_LIT8(KBeginOpen,"\n<");
+_LIT8(KBeginClose,"</"); 
+_LIT8(KEnd,">");
+
+
+const TStringTable& CUPnPDeviceXmlComposer::GetTable()
+	{
+	return UPNPDESCRIPTIONXMLTAGS::Table;
+	}
+
+void CUPnPDeviceXmlComposer::AppendLiteralL(TInt aTag, RBuf8& aBuf, TInt& count, TBool aIsStart )
+	{
+	
+    RString  str = iStringPool.String(aTag,UPNPDESCRIPTIONXMLTAGS::Table );
+    TInt litSize = str.DesC().Size();
+    
+    if(aIsStart)
+    	{
+    	litSize+= KBeginOpen.iTypeLength + KEnd.iTypeLength;
+    	}
+    else
+    	{
+    	litSize+= KBeginClose.iTypeLength + KEnd.iTypeLength;
+    	}
+	
+	if((count+litSize)>= aBuf.MaxSize()) 
+		{ 
+		aBuf.ReAllocL(((aBuf.MaxSize()+COMPOSE_BUFLENGTH)<(aBuf.MaxSize()+litSize))?(aBuf.MaxSize()+litSize):(aBuf.MaxSize()+COMPOSE_BUFLENGTH));
+		}
+
+		if(aIsStart)
+			{
+			aBuf.Append(KBeginOpen);
+			}
+		else
+			{
+			aBuf.Append(KBeginClose);
+			}
+		aBuf.Append(str.DesC()); 
+		aBuf.Append(KEnd);
+		count+=litSize;
+	}
+void CUPnPDeviceXmlComposer::AppendLiteralL(const RString& aString, RBuf8& aBuf, TInt& count, TBool aIsStart )
+	{
+	TInt litSize = aString.DesC().Size();
+    if(aIsStart)
+    	{
+    	litSize+= KBeginOpen.iTypeLength + KEnd.iTypeLength;
+    	}
+    else
+    	{
+    	litSize+= KBeginClose.iTypeLength + KEnd.iTypeLength;
+    	}
+	
+	if((count+litSize)>= aBuf.MaxSize()) 
+		{ 
+		aBuf.ReAllocL(((aBuf.MaxSize()+COMPOSE_BUFLENGTH)<(aBuf.MaxSize()+litSize))?(aBuf.MaxSize()+litSize):(aBuf.MaxSize()+COMPOSE_BUFLENGTH));
+		}
+
+		if(aIsStart)
+			{
+			aBuf.Append(KBeginOpen);
+			}
+		else
+			{
+			aBuf.Append(KBeginClose);
+			}
+		aBuf.Append(aString.DesC()); 
+		aBuf.Append(KEnd);
+		count+=litSize;
+	}
+
+void CUPnPDeviceXmlComposer::AppendLiteralL(const TDesC8& aLiteral, RBuf8& aBuf, TInt& count)
+	{
+    TInt litSize = aLiteral.Length();
+    
+	if((count+litSize)>= aBuf.MaxSize()) 
+		{ 
+		aBuf.ReAllocL(((aBuf.MaxSize()+COMPOSE_BUFLENGTH)<(aBuf.MaxSize()+litSize))?(aBuf.MaxSize()+litSize):(aBuf.MaxSize()+COMPOSE_BUFLENGTH));
+		}
+
+		aBuf.Append(aLiteral); 
+		count+=litSize;
+	}
+
+/**
+Allocates and constructs a CUPnPDeviceXmlComposer object.
+Initialises all member data to their default values.
+*/
+CUPnPDeviceXmlComposer* CUPnPDeviceXmlComposer::NewL( const RStringPool& aStringPool)
+    {
+    CUPnPDeviceXmlComposer* self = new (ELeave) CUPnPDeviceXmlComposer( aStringPool );
+    return self;
+    }
+
+CUPnPDeviceXmlComposer::CUPnPDeviceXmlComposer( const RStringPool& aStringPool): iStringPool (aStringPool)
+    {
+    iError = KErrNone;
+    }
+/**
+Destructor
+*/
+CUPnPDeviceXmlComposer::~CUPnPDeviceXmlComposer()
+    {
+    }
+
+void CUPnPDeviceXmlComposer::AppendDeviceAttributesL(const CUPnPDevice*	aDeviceAttribute, RBuf8 &aXmlData, TInt &count)
+	{
+	TAttributeIter it(aDeviceAttribute);
+	const CAttribute* nextParam = NULL;
+	if ( aDeviceAttribute->Dlna())
+		{
+		if (aDeviceAttribute->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDlnaDoc, GetTable()))!= KNullDesC8 )
+			{
+			RBuf8 dlnaValue;
+			dlnaValue.CreateL( 100 );
+			dlnaValue.Append(KBeginOpen);
+			dlnaValue.Append(KDlna);
+			dlnaValue.Append(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDlnaDoc, GetTable()).DesC());
+			dlnaValue.Append( KDlnaNameSpace );
+			AppendLiteralL(dlnaValue, aXmlData,count );
+			dlnaValue.Close();
+			AppendLiteralL(aDeviceAttribute->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDlnaDoc, GetTable())),aXmlData,count);
+			dlnaValue.CreateL(50);
+			dlnaValue.Append(KBeginClose);
+			dlnaValue.Append(KDlna);
+			dlnaValue.Append(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDlnaDoc, GetTable()).DesC());
+			dlnaValue.Append( KEnd );	
+			AppendLiteralL(dlnaValue, aXmlData,count );
+			dlnaValue.Close();
+			}
+		if (aDeviceAttribute->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDlnaCap, GetTable()))!= KNullDesC8 )
+			{
+			RBuf8 dlnaValue;
+			dlnaValue.CreateL( 100 );
+			dlnaValue.Append(KBeginOpen);
+			dlnaValue.Append(KDlna);
+			dlnaValue.Append(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDlnaCap, GetTable()).DesC());
+			dlnaValue.Append( KDlnaNameSpace );
+			dlnaValue.Append( KEnd );
+			AppendLiteralL(dlnaValue, aXmlData,count );
+			dlnaValue.Close();
+			AppendLiteralL(aDeviceAttribute->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDlnaCap, GetTable())),aXmlData,count);
+			dlnaValue.CreateL(50);
+			dlnaValue.Append(KBeginClose);
+			dlnaValue.Append(KDlna);
+			dlnaValue.Append(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EDlnaCap, GetTable()).DesC());
+			dlnaValue.Append( KEnd );	
+			AppendLiteralL(dlnaValue, aXmlData,count );
+			dlnaValue.Close();
+			}
+		
+		}
+	while (!it.AtEnd())
+		{
+		nextParam = it();
+		TInt index = nextParam->AttributeName().Index(GetTable());
+		if (index != UPNPDESCRIPTIONXMLTAGS::EDlnaDoc && index != UPNPDESCRIPTIONXMLTAGS::EDlnaCap )
+			{
+			AppendLiteralL(nextParam->AttributeName(),aXmlData,count,ETrue);
+			AppendLiteralL(nextParam->AttributeValue(),aXmlData,count);
+			AppendLiteralL(nextParam->AttributeName(),aXmlData,count,EFalse);
+			++it;
+			}
+		else
+			++it;
+		}
+	}
+
+void CUPnPDeviceXmlComposer::AppendDeviceIconL(const CUPnPIconInfo* aIconInfo, RBuf8 &aXmlData, TInt &count)
+	{
+	TAttributeIter it(aIconInfo);
+	const CAttribute* nextParam = NULL;
+	while (!it.AtEnd())
+		{
+		nextParam = it();
+		AppendLiteralL(nextParam->AttributeName(),aXmlData,count,ETrue);
+		AppendLiteralL(nextParam->AttributeValue(),aXmlData,count);
+		AppendLiteralL(nextParam->AttributeName(),aXmlData,count,EFalse);
+		++it;
+		}
+	}
+	
+void CUPnPDeviceXmlComposer::AppendServiceL(const CUPnPServiceInfo* aServInfo, RBuf8 &aXmlData, TInt &count)
+	{
+	TAttributeIter it(aServInfo);
+	const CAttribute* nextParam = NULL;
+	while (!it.AtEnd())
+		{
+		nextParam = it();
+		AppendLiteralL(nextParam->AttributeName(),aXmlData,count,ETrue);
+		AppendLiteralL(nextParam->AttributeValue(),aXmlData,count);
+		AppendLiteralL(nextParam->AttributeName(),aXmlData,count,EFalse);
+		++it;
+		}
+	}
+
+void CUPnPDeviceXmlComposer::AppendDeviceXmlL(const CUPnPDevice* devObj, RBuf8 &aXmlData, TInt &count)
+	{
+
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EDevice,aXmlData,count,ETrue);
+
+	if(devObj->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EPresentationUrl, GetTable())).Length()!=0)
+		{
+        AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EPresentationUrl,aXmlData,count,ETrue);
+	    AppendLiteralL(devObj->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EPresentationUrl, GetTable())),aXmlData,count);
+        AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EPresentationUrl,aXmlData,count,EFalse);
+		}
+
+    AppendDeviceAttributesL(devObj,aXmlData,count);
+    if(devObj->CountOfIconInfoTable()!=0)
+    	{
+    	const CUPnPIconInfo* aIconInfo = NULL;
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EIconList,aXmlData,count,ETrue);
+        for(TInt k=0;k<devObj->CountOfIconInfoTable();k++)
+        	{
+            AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EIcon,aXmlData,count,ETrue);
+            aIconInfo = devObj->AtIconInfoTable(k);
+            AppendDeviceIconL(aIconInfo, aXmlData, count);
+            AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EIcon,aXmlData,count,EFalse);
+        	}
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EIconList,aXmlData,count,EFalse);
+    	}
+    
+    // service info goes here
+    
+    if(devObj->CountOfServiceInfoTable()!=0)
+    	{
+    	const CUPnPServiceInfo* aServInfo = NULL;
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EServiceList,aXmlData,count,ETrue);
+    	
+    	for(TInt m=0;m<devObj->CountOfServiceInfoTable();m++)
+    		{
+    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EService,aXmlData,count,ETrue);
+    		aServInfo = devObj->AtServiceInfoTable(m);
+    		AppendServiceL(aServInfo,aXmlData, count);
+    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EService,aXmlData,count,EFalse);
+    		}
+    	
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EServiceList,aXmlData,count,EFalse);
+    	}
+
+    
+    if(devObj->CountOfEmbeddedDeviceInfoTable()!= 0 )
+    	{
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EDeviceList,aXmlData,count,ETrue);
+    	
+    	for(TInt n = 0; n < devObj->CountOfEmbeddedDeviceInfoTable(); n++)
+    		AppendDeviceXmlL(devObj->AtEmbeddedDeviceInfoTable(n),aXmlData,count);
+    	
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EDeviceList,aXmlData,count,EFalse);
+    	}
+
+    
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EDevice,aXmlData,count,EFalse);
+
+	}
+
+void CUPnPDeviceXmlComposer::ComposeDeviceXmlL(const CUPnPDeviceDescription *aDeviceDescObj, RBuf8 &aXmlData)
+	{
+	RBuf	unicode;
+    TInt	count = 0;
+ 
+
+    if(!(aDeviceDescObj->Validate(iStringPool,GetTable())))
+    	User::Leave(KErrCorrupt);
+ 
+    User::LeaveIfError(aXmlData.Create(COMPOSE_BUFLENGTH));
+        
+    AppendLiteralL(KStringXmlStart,aXmlData,count);
+    AppendLiteralL(KStringRootStart,aXmlData,count);
+
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::ESpecVersion,aXmlData,count,ETrue);
+
+    HBufC8* versionMajor = NULL;
+    HBufC8* versionMinor = NULL;
+    InetProtTextUtils::ConvertIntToDescriptorL(aDeviceDescObj->MajorNumber(), versionMajor);
+    InetProtTextUtils::ConvertIntToDescriptorL(aDeviceDescObj->MinorNumber(), versionMinor);
+    CleanupStack::PushL(versionMajor);
+    CleanupStack::PushL(versionMinor);
+    
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EMajorNumber,aXmlData,count,ETrue);
+    AppendLiteralL(versionMajor->Des(),aXmlData,count);
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EMajorNumber,aXmlData,count,EFalse);
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EMinorNumber,aXmlData,count,ETrue);
+    AppendLiteralL(versionMinor->Des(),aXmlData,count);
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EMinorNumber,aXmlData,count,EFalse);
+    
+    CleanupStack::PopAndDestroy(versionMinor);
+    CleanupStack::PopAndDestroy(versionMajor);
+
+    
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::ESpecVersion,aXmlData,count,EFalse);
+    
+    CUPnPDevice* devObj =  aDeviceDescObj->DeviceObject();
+    if(aDeviceDescObj->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EUrlBase, GetTable())).Length()!=0)
+    	{
+        AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EUrlBase,aXmlData,count,ETrue);
+        AppendLiteralL(aDeviceDescObj->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EUrlBase, GetTable())),aXmlData,count);
+        AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EUrlBase,aXmlData,count,EFalse);
+    	}
+    
+    // Add device specific info to the xml buffer.
+    AppendDeviceXmlL(devObj,aXmlData,count);
+
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::ERoot,aXmlData,count,EFalse);
+	
+ 	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpproperty.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,70 @@
+// 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 <cupnpproperty.h>
+#include "cattribute.h"
+
+EXPORT_C void CUPnPProperty::SetPropertyL(const RString aAttributeName, const TDesC8& aAttributeVal)
+	{
+	for ( TInt i =0;i<iAttributeArray.Count();i++)
+		{
+		if ( aAttributeName == iAttributeArray[i]->AttributeName())
+			{
+			iAttributeArray[i]->SetValueL( aAttributeVal );
+			return;
+			}
+		}
+	CAttribute* attrib = CAttribute::NewL( aAttributeName , aAttributeVal );
+	iAttributeArray.AppendL( attrib );
+	}
+
+EXPORT_C void CUPnPProperty::SetPropertyL(const RString aAttributeName, TInt aAttributeVal)
+	{
+	RBuf8 buffer;
+	buffer.CreateL ( sizeof ( TInt ) );
+	CleanupClosePushL ( buffer );
+	buffer.AppendNum ( aAttributeVal, EDecimal );
+	SetPropertyL ( aAttributeName, buffer );
+	CleanupStack::PopAndDestroy ( &buffer );
+	}
+
+
+void CUPnPProperty::SetPropertyStatus(const RString aAttributeName, TBool aStatus)
+	{
+	for ( TInt i =0;i<iAttributeArray.Count();i++)
+		{
+		if ( aAttributeName == iAttributeArray[i]->AttributeName())
+			{
+			iAttributeArray[i]->SetStatus( aStatus );
+			return;
+			}
+		}
+	}
+
+EXPORT_C const TDesC8& CUPnPProperty::Property(const RString aAttributeName) const
+	{
+	for ( TInt i =0;i<iAttributeArray.Count();i++)
+		{
+		if ( aAttributeName == iAttributeArray[i]->AttributeName())
+			{
+			return (iAttributeArray[i]->AttributeValue());
+			}
+		}
+	return KNullDesC8;
+	}
+EXPORT_C CUPnPProperty::~CUPnPProperty()
+	{
+	iAttributeArray.ResetAndDestroy();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/cupnpservicecomposer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,301 @@
+// 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 "cupnpservicecomposer.h"
+#include "upnpdescriptionschema.h"
+#include "inetprottextutils.h"
+#include "tattributeiter.h"
+#include "cattribute.h"
+
+_LIT8(KBeginOpen,"\n<");
+_LIT8(KBeginClose,"</");
+_LIT8(KEnd,">");
+
+_LIT8(KStringXmlStart,"<?xml version=\"1.0\" encoding=\"utf-8\"?>");
+
+_LIT8(KStringScpdStart,"\n<scpd xmlns=\"urn:schemas-upnp-org:service-1-0\">");
+
+_LIT8(KStringStVarStart,"\n\t\t<stateVariable sendEvents=\"");
+_LIT8(KStringStVarStart1,"\">");
+#define COMPOSE_BUFLENGTH 1024
+
+void CUPnPServiceXmlComposer::AppendLiteralL(TInt aTag, RBuf8& aBuf, TInt& count, TBool aIsStart )
+	{
+	
+    RString  str = iStringPool.String(aTag,UPNPDESCRIPTIONXMLTAGS::Table );
+    TInt litSize = str.DesC().Size();
+    
+    if(aIsStart)
+    	{
+    	litSize+= KBeginOpen.iTypeLength + KEnd.iTypeLength;
+    	}
+    else
+    	{
+    	litSize+= KBeginClose.iTypeLength + KEnd.iTypeLength;
+    	}
+	
+	if((count+litSize)>= aBuf.MaxSize()) 
+		{ 
+		aBuf.ReAllocL(((aBuf.MaxSize()+COMPOSE_BUFLENGTH)<(aBuf.MaxSize()+litSize))?(aBuf.MaxSize()+litSize):(aBuf.MaxSize()+COMPOSE_BUFLENGTH));
+		}
+
+		if(aIsStart)
+			{
+			aBuf.Append(KBeginOpen);
+			}
+		else
+			{
+			aBuf.Append(KBeginClose);
+			}
+		aBuf.Append(str.DesC()); 
+		aBuf.Append(KEnd);
+		count+=litSize;
+	}
+
+void CUPnPServiceXmlComposer::AppendLiteralL(const RString& aString, RBuf8& aBuf, TInt& count, TBool aIsStart )
+	{
+	TInt litSize = aString.DesC().Size();
+    if(aIsStart)
+    	{
+    	litSize+= KBeginOpen.iTypeLength + KEnd.iTypeLength;
+    	}
+    else
+    	{
+    	litSize+= KBeginClose.iTypeLength + KEnd.iTypeLength;
+    	}
+	
+	if((count+litSize)>= aBuf.MaxSize()) 
+		{ 
+		aBuf.ReAllocL(((aBuf.MaxSize()+COMPOSE_BUFLENGTH)<(aBuf.MaxSize()+litSize))?(aBuf.MaxSize()+litSize):(aBuf.MaxSize()+COMPOSE_BUFLENGTH));
+		}
+
+		if(aIsStart)
+			{
+			aBuf.Append(KBeginOpen);
+			}
+		else
+			{
+			aBuf.Append(KBeginClose);
+			}
+		aBuf.Append(aString.DesC()); 
+		aBuf.Append(KEnd);
+		count+=litSize;
+	}
+void CUPnPServiceXmlComposer::AppendLiteralL(const TDesC8& aLiteral, RBuf8& aBuf, TInt& count)
+	{
+    TInt litSize = aLiteral.Length();
+    
+	if((count+litSize)>= aBuf.MaxSize()) 
+		{ 
+		aBuf.ReAllocL(((aBuf.MaxSize()+COMPOSE_BUFLENGTH)<(aBuf.MaxSize()+litSize))?(aBuf.MaxSize()+litSize):(aBuf.MaxSize()+COMPOSE_BUFLENGTH));
+		}
+
+		aBuf.Append(aLiteral); 
+		count+=litSize;
+	}
+/**
+Allocates and constructs a CUPnPServiceXmlComposer object.
+Initialises all member data to their default values.
+*/
+CUPnPServiceXmlComposer* CUPnPServiceXmlComposer::NewL(  const RStringPool& aStringPool )
+    {
+    CUPnPServiceXmlComposer* self = new (ELeave) CUPnPServiceXmlComposer( aStringPool );
+     return self;
+    }
+
+CUPnPServiceXmlComposer::CUPnPServiceXmlComposer(  const RStringPool& aStringPool ):iStringPool ( aStringPool )
+    {
+	iError = KErrNone;
+    }
+/**
+Destructor
+*/
+CUPnPServiceXmlComposer::~CUPnPServiceXmlComposer()
+    {
+    }
+
+
+const TStringTable& CUPnPServiceXmlComposer::GetTable()
+	{
+	return UPNPDESCRIPTIONXMLTAGS::Table;
+	}
+
+void CUPnPServiceXmlComposer::AppendActionL(const CUPnPAction* aUPnPAction, RBuf8 &aXmlData, TInt &count)
+	{
+	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EAction,aXmlData,count,ETrue);
+	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EName,aXmlData,count,ETrue);
+	AppendLiteralL(aUPnPAction->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::EName, GetTable())),aXmlData,count);
+	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EName,aXmlData,count,EFalse);
+	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EArgumentList,aXmlData,count,ETrue);
+
+	for(TInt j =0;j< aUPnPAction->Count();j++ )
+		{
+		CUPnPArgument *uPnPArgument = aUPnPAction->At(j);
+		if (!uPnPArgument->Validate(iStringPool, GetTable()))
+			User::Leave(KErrCorrupt);
+		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EArgument,aXmlData,count,ETrue);
+		TAttributeIter it(uPnPArgument);
+		const CAttribute* nextParam = NULL;
+		while (!it.AtEnd())
+			{
+			nextParam = it();
+			AppendLiteralL(nextParam->AttributeName(),aXmlData,count,ETrue);
+			AppendLiteralL(nextParam->AttributeValue(),aXmlData,count);
+			AppendLiteralL(nextParam->AttributeName(),aXmlData,count,EFalse);
+			++it;
+			}
+    	if ( uPnPArgument->RetVal() )
+    		{
+    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::ERetValue,aXmlData,count,ETrue);
+    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::ERetValue,aXmlData,count,EFalse);
+    		}
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EArgument,aXmlData,count,EFalse);
+		}
+	
+	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EArgumentList,aXmlData,count,EFalse);
+	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EAction,aXmlData,count,EFalse);
+	}
+
+void CUPnPServiceXmlComposer::AppendStateVariableL(const CUPnPStateVariable* aUPnPStateVariable, RBuf8 &aXmlData, TInt &count)
+	{
+   	
+	AppendLiteralL(KStringStVarStart,aXmlData,count);
+	AppendLiteralL(aUPnPStateVariable->Property(iStringPool.String(UPNPDESCRIPTIONXMLTAGS::ESendEvents, GetTable())),aXmlData,count);
+	AppendLiteralL(KStringStVarStart1,aXmlData,count);
+	
+	TAttributeIter it(aUPnPStateVariable);
+	const CAttribute* nextParam = NULL;
+	while (!it.AtEnd())
+		{
+		nextParam = it();
+		if ( nextParam->AttributeName() == iStringPool.String(UPNPDESCRIPTIONXMLTAGS::ESendEvents, GetTable()))
+			{
+			++it;
+			continue;
+			}
+		else
+			{
+			AppendLiteralL(nextParam->AttributeName(),aXmlData,count,ETrue);
+			AppendLiteralL(nextParam->AttributeValue(),aXmlData,count);
+			AppendLiteralL(nextParam->AttributeName(),aXmlData,count,EFalse);
+			++it;
+			}
+		}
+	
+	if(aUPnPStateVariable->AllowedValues())
+		{
+		if(aUPnPStateVariable->AllowedValueType())
+    		{
+    		const CUPnPArgValueList* aTempArgValueList = static_cast<const CUPnPArgValueList*>(aUPnPStateVariable->AllowedValues());
+    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EAllowedValueList,aXmlData,count,ETrue);
+    		for(TInt k = 0; k< aTempArgValueList->Count();k++)
+    			{
+	    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EAllowedValue,aXmlData,count,ETrue);
+	    		AppendLiteralL(aTempArgValueList->At(k),aXmlData,count);
+	    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EAllowedValue,aXmlData,count,EFalse);
+    			}
+    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EAllowedValueList,aXmlData,count,EFalse);
+    		}
+    	else 
+    		{
+    		const CUPnPValueRange* aTempValueRange = static_cast<const CUPnPValueRange*>(aUPnPStateVariable->AllowedValues());	
+    		AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EAllowedValueRange,aXmlData,count,ETrue);
+    		TAttributeIter it(aTempValueRange);
+    		const CAttribute* nextParam = NULL;
+    		while (!it.AtEnd())
+				{
+				nextParam = it();
+				AppendLiteralL(nextParam->AttributeName(),aXmlData,count,ETrue);
+				AppendLiteralL(nextParam->AttributeValue(),aXmlData,count);
+				AppendLiteralL(nextParam->AttributeName(),aXmlData,count,EFalse);
+				++it;
+				}
+    		
+	    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EAllowedValueRange,aXmlData,count,EFalse);
+    		}
+    	}
+	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EStateVariable,aXmlData,count,EFalse);
+	}
+
+
+void CUPnPServiceXmlComposer::ComposeServiceXmlL(const CUPnPServiceDescription *aServDescObj, RBuf8 &aXmlData)
+	{
+	RBuf	unicode;
+    TInt	count = 0;
+
+
+   if(!(aServDescObj->Validate(iStringPool, GetTable())))
+    	User::Leave(KErrCorrupt);
+  
+    User::LeaveIfError(aXmlData.Create(COMPOSE_BUFLENGTH));
+    
+    
+    AppendLiteralL(KStringXmlStart,aXmlData,count);
+    AppendLiteralL(KStringScpdStart,aXmlData,count);
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::ESpecVersion,aXmlData,count,ETrue);
+    
+    HBufC8* versionMajor = NULL;
+    HBufC8* versionMinor = NULL;
+    InetProtTextUtils::ConvertIntToDescriptorL(aServDescObj->MajorNumber(), versionMajor);
+    InetProtTextUtils::ConvertIntToDescriptorL(aServDescObj->MinorNumber(), versionMinor);
+    CleanupStack::PushL(versionMajor);
+    CleanupStack::PushL(versionMinor);
+    
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EMajorNumber,aXmlData,count,ETrue);
+    AppendLiteralL(versionMajor->Des(),aXmlData,count);
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EMajorNumber,aXmlData,count,EFalse);
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EMinorNumber,aXmlData,count,ETrue);
+    AppendLiteralL(versionMinor->Des(),aXmlData,count);
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EMinorNumber,aXmlData,count,EFalse);
+    
+    CleanupStack::PopAndDestroy(versionMinor);
+    CleanupStack::PopAndDestroy(versionMajor);
+    
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::ESpecVersion,aXmlData,count,EFalse);
+
+    
+    if(aServDescObj->CountOfActionList()!= 0)
+    	{
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EActionList,aXmlData,count,ETrue);
+    	}
+   
+    for(TInt i =0;i< aServDescObj->CountOfActionList();i++ )
+    	{
+    	const CUPnPAction	*uPnPAction = aServDescObj->AtActionList(i);
+    	AppendActionL(uPnPAction,aXmlData,count);
+    	}
+    if(aServDescObj->CountOfActionList()!= 0)
+    	{
+    	AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EActionList,aXmlData,count,EFalse);
+    	}
+	
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EServiceStateTable,aXmlData,count,ETrue);
+    
+    for(TInt i =0;i< aServDescObj->CountOfServiceStateTable();i++ )
+    	{
+    	const CUPnPStateVariable *uPnPStateVariable = aServDescObj->AtServiceStateTable(i);
+    	AppendStateVariableL(uPnPStateVariable,aXmlData, count);
+    	}
+    
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EServiceStateTable,aXmlData,count,EFalse);
+    
+    AppendLiteralL(UPNPDESCRIPTIONXMLTAGS::EScpd,aXmlData,count,EFalse);
+
+	
+    
+    unicode.CreateL(aXmlData.Length()); 
+    unicode.Copy(aXmlData);
+    unicode.Close();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/deviceiconparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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 "deviceiconparser.h"
+#include "upnpdescriptionschema.h"
+
+
+CDeviceIconParser* CDeviceIconParser::NewL(CUPnPIconInfo *aDeviceIcon, const RStringPool &aStringPool)
+	{
+	CDeviceIconParser* self = new (ELeave) CDeviceIconParser(aDeviceIcon,aStringPool);
+	return self;
+	}
+
+		
+CDeviceIconParser::CDeviceIconParser(CUPnPIconInfo *aDeviceIcon, const RStringPool &aStringPool) : iDeviceIcon(aDeviceIcon), iStringPool(aStringPool)
+	{
+	}
+
+CDeviceIconParser::~CDeviceIconParser()
+	{
+	}
+
+void CDeviceIconParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	}
+		
+
+void CDeviceIconParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iDeviceIcon->SetPropertyStatus(iString,ETrue);
+	iString.Close();
+	}
+
+void CDeviceIconParser::ParseContentL(const TDesC8& aBytes)
+	{
+	if ( !IsBlankSpace( aBytes ) )
+		iDeviceIcon->SetPropertyL(iString,aBytes);
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/deviceinfoparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,124 @@
+// 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 "deviceinfoparser.h"
+#include "upnpdescriptionschema.h"
+#include "deviceiconparser.h"
+#include "serviceinfoparser.h"
+_LIT8(KDlnaNameSpace,"urn:schemas-dlna-org:device-1-0");
+
+CDeviceInfoParser* CDeviceInfoParser::NewL(CUPnPDevice *aDeviceInfo, const RStringPool& aStringPool)
+	{
+	CDeviceInfoParser* self = new (ELeave) CDeviceInfoParser(aDeviceInfo, aStringPool);
+	return self;
+	}
+
+CDeviceInfoParser::CDeviceInfoParser(CUPnPDevice *aDeviceInfo, const RStringPool& aStringPool) : iDeviceInfo(aDeviceInfo), iStringPool(aStringPool)
+	{
+	}
+
+CDeviceInfoParser::~CDeviceInfoParser()
+	{
+	}
+
+void CDeviceInfoParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	const TDesC8& info = iString.DesC();
+	TInt tblIndex = iString.Index ( UPNPDESCRIPTIONXMLTAGS::Table );
+	switch(tblIndex)
+		{
+	case UPNPDESCRIPTIONXMLTAGS::EDevice:
+		{
+		if(!(iFlags & EDevice))
+			{		
+			iFlags = iFlags | EDevice;
+			}
+		else if(iFlags & EEmbeddedDevice)
+			{
+			iSiblingsCount--;
+			CUPnPDevice* deviceInfo = CUPnPDevice::NewL();
+			CleanupStack::PushL( deviceInfo );
+			iDeviceInfo->AppendToEmbeddedDeviceInfoTableL(deviceInfo);
+			CleanupStack::Pop( deviceInfo );
+			CDeviceInfoParser* deviceParser = CDeviceInfoParser::NewL(deviceInfo, iStringPool);
+			CleanupStack::PushL(deviceParser);
+			StartChildParserL(deviceParser, aElement, aAttributes);
+			CleanupStack::Pop( deviceParser );
+			}
+		}
+		break;
+	case UPNPDESCRIPTIONXMLTAGS::EIcon:
+		{
+		iSiblingsCount--;
+		CUPnPIconInfo *iconInfo = CUPnPIconInfo::NewL();
+		CleanupStack::PushL( iconInfo );
+		iDeviceInfo->AppendToIconInfoTableL(iconInfo);
+		CleanupStack::Pop();
+		CDeviceIconParser* deviceIconParser = CDeviceIconParser::NewL(iconInfo, iStringPool);
+		CleanupStack::PushL( deviceIconParser );
+		StartChildParserL(deviceIconParser, aElement, aAttributes);
+		CleanupStack::Pop(deviceIconParser);
+		}
+		break;
+	case UPNPDESCRIPTIONXMLTAGS::EService:
+		{
+		iSiblingsCount--;
+		CUPnPServiceInfo *serviceInfo = CUPnPServiceInfo::NewL();
+		CleanupStack::PushL(serviceInfo);
+		iDeviceInfo->AppendToServiceInfoTableL(serviceInfo);
+		CleanupStack::Pop( serviceInfo );
+		CServiceInfoParser* serviceInfoParser = CServiceInfoParser::NewL(serviceInfo, iStringPool);
+		CleanupStack::PushL(serviceInfoParser);
+		StartChildParserL(serviceInfoParser, aElement, aAttributes);
+		CleanupStack::Pop(serviceInfoParser);
+		}
+		break;
+	
+		// Default: Don't do anything
+	}
+	
+	}
+		
+
+void CDeviceInfoParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iDeviceInfo->SetPropertyStatus(iString,ETrue);
+	iString.Close();
+	}
+
+void CDeviceInfoParser::ParseContentL(const TDesC8& aBytes)
+	{
+	if ( !IsBlankSpace( aBytes ) )
+		iDeviceInfo->SetPropertyL(iString,aBytes);
+	}
+	
+void CDeviceInfoParser::ParsePrefixL(const RString& aPrefix, const RString& aUri)
+	{
+	_LIT8(KDlna,"dlna");
+	const TDesC8& prefix = aPrefix.DesC();
+	if ( prefix == KDlna )
+		{
+		const TDesC8& uri = aUri.DesC();
+		if ( uri == KDlnaNameSpace)
+			{
+			iDeviceInfo->SetDlna( ETrue );
+			}
+		else
+			User::Leave(KErrCorrupt);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/parsehandlerbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+// 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 "parsehandlerbase.h"
+CParseHandlerBase::~CParseHandlerBase()
+	{
+	delete iChildParser;
+	iString.Close();
+	}
+	
+void CParseHandlerBase::StartChildParserL(CParseHandlerBase* aChildParser, const RTagInfo& aElement, const RAttributeArray& aAttributes)
+	{
+	if(iChildParser)
+		{
+		User::Leave(KErrCorrupt);
+		}
+	else
+		{
+		delete iChildParser;
+		iChildParser = aChildParser;
+		iChildParser->ParseStartElementL(aElement, aAttributes);		
+		}
+	}
+
+void CParseHandlerBase::OnContentL(const TDesC8& aBytes, TInt aErrorCode)
+	{
+	if(iChildParser)
+		{
+		iChildParser->OnContentL(aBytes, aErrorCode);
+		}
+	else
+		{
+		User::LeaveIfError(aErrorCode);
+		ParseContentL(aBytes);
+		}
+	}
+	
+	
+void CParseHandlerBase::OnStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes, TInt aErrorCode)
+	{
+	if(iChildParser)
+		{
+		// If the child handler is present get it to parse the tags
+		iChildParser->OnStartElementL(aElement, aAttributes, aErrorCode);
+		}
+	else
+		{
+		User::LeaveIfError(aErrorCode);
+		ParseStartElementL(aElement, aAttributes);	
+		}
+	}
+	
+void CParseHandlerBase::OnEndElementL(const RTagInfo& aElement, TInt aErrorCode)
+	{
+	if(iChildParser)
+		{
+		iChildParser->OnEndElementL(aElement, aErrorCode);
+		if(!iChildParser->SiblingCount())
+			{
+			// finished with child parser handler
+			delete iChildParser;
+			iChildParser = NULL;
+			}
+		}	
+	else
+		{
+		// Overriden by derived classes to implement specific behavior for an end tag
+		User::LeaveIfError(aErrorCode);
+		ParseEndElementL(aElement);
+		}
+	}
+
+void CParseHandlerBase::OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, TInt aErrorCode)
+	{
+	User::LeaveIfError(aErrorCode);
+	if(iChildParser)
+		{
+		iChildParser->OnStartPrefixMappingL( aPrefix , aUri, aErrorCode );
+		}
+	else
+		ParsePrefixL( aPrefix , aUri );
+	}
+
+TBool CParseHandlerBase::IsBlankSpace(const TDesC8& aBytes)
+	{
+	RBuf8 trimBuf;
+	TBool retValue = EFalse;
+	trimBuf.Create(aBytes);
+	trimBuf.Trim();
+	
+	if(!trimBuf.Length())
+		retValue = ETrue;
+	trimBuf.Close();
+	
+	return retValue;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/rootdeviceparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,97 @@
+// 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:
+// rootinfoparser.cpp
+// 
+//
+
+#include "rootdeviceparser.h"
+#include <upnpdescriptionschema.h>
+#include "specversionparser.h"
+#include "deviceinfoparser.h"
+#include <xml/parserfeature.h>
+
+_LIT8(KXmlMimeType1, "text/xml");
+
+CRootDeviceParser* CRootDeviceParser::NewL(CUPnPDeviceDescription *aDeviceParser, const RStringPool& aStringPool)
+	{
+	CRootDeviceParser* self = new (ELeave) CRootDeviceParser(aDeviceParser, aStringPool);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CRootDeviceParser::CRootDeviceParser(CUPnPDeviceDescription *aDeviceDescpn, const RStringPool& aStringPool) 
+	: iDeviceDescpn(aDeviceDescpn), iStringPool(aStringPool)
+	{
+	}
+
+void CRootDeviceParser::ConstructL()	
+	{
+	iXmlParser = CParser::NewL(KXmlMimeType1(), *this);
+	iXmlParser->EnableFeature(EReportNamespaceMapping );
+	iXmlParser->EnableFeature(ESendFullContentInOneChunk);
+	}
+
+CRootDeviceParser::~CRootDeviceParser()
+	{
+	delete iXmlParser;
+	}
+
+void CRootDeviceParser::StartParseL(const TDesC8& aFragment)
+	{
+	ParseL(*iXmlParser, aFragment); 
+	}
+
+void CRootDeviceParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	
+	TInt tblIndex = iString.Index ( UPNPDESCRIPTIONXMLTAGS::Table );
+	// If string lies in the main string table
+	if (tblIndex == UPNPDESCRIPTIONXMLTAGS::ESpecVersion)
+		{
+		iSiblingsCount--;
+		CSpecVersionParser* specParser = CSpecVersionParser::NewL(iDeviceDescpn, iStringPool);
+		CleanupStack::PushL(specParser);
+		StartChildParserL(specParser, aElement, aAttributes);
+		CleanupStack::Pop(specParser);
+		}
+	if ( tblIndex == UPNPDESCRIPTIONXMLTAGS::EDevice)
+		{
+		iSiblingsCount--;
+		CUPnPDevice *deviceInfo = CUPnPDevice::NewL();
+		CleanupStack::PushL( deviceInfo );
+		iDeviceDescpn->SetDeviceObjectL(deviceInfo);
+		CleanupStack::Pop(deviceInfo);
+		CDeviceInfoParser* deviceParser = CDeviceInfoParser::NewL(deviceInfo, iStringPool);
+		CleanupStack::PushL(deviceParser);
+		StartChildParserL(deviceParser, aElement, aAttributes);
+		CleanupStack::Pop(deviceParser);
+		}
+	
+	}
+		
+void CRootDeviceParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iString.Close();
+	}
+
+void CRootDeviceParser::ParseContentL(const TDesC8& aBytes)
+	{
+	if ( !IsBlankSpace( aBytes ) )
+		iDeviceDescpn->SetPropertyL(iString,aBytes);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/rootserviceparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,116 @@
+// 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:
+// rootinfoparser.cpp
+// 
+//
+
+#include "rootserviceparser.h"
+#include <upnpdescriptionschema.h>
+#include "specversionparser.h"
+#include "cactionparser.h"
+#include "cstatetableparser.h"
+
+_LIT8(KXmlMimeType1, "text/xml");
+
+CRootServiceParser* CRootServiceParser::NewL(CUPnPServiceDescription *aServiceParser, const RStringPool& aStringPool)
+	{
+	CRootServiceParser* self = new (ELeave) CRootServiceParser(aServiceParser, aStringPool);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CRootServiceParser::CRootServiceParser(CUPnPServiceDescription *aServiceDesc, const RStringPool& aStringPool) : iServiceDesc(aServiceDesc), iStringPool(aStringPool)
+	{
+	}
+
+void CRootServiceParser::ConstructL()	
+	{
+	iXmlParser = CParser::NewL(KXmlMimeType1(), *this);
+	iXmlParser->EnableFeature(EReportNamespaceMapping );
+	iXmlParser->EnableFeature(ESendFullContentInOneChunk);
+	}
+
+CRootServiceParser::~CRootServiceParser()
+	{
+	delete iXmlParser;
+	}
+
+void CRootServiceParser::StartParseL(const TDesC8& aFragment)
+	{
+	ParseL(*iXmlParser, aFragment); 
+	}
+
+void CRootServiceParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	TInt tblIndex = iString.Index ( UPNPDESCRIPTIONXMLTAGS::Table );
+	
+	switch(tblIndex)
+		{
+	case UPNPDESCRIPTIONXMLTAGS::ESpecVersion:
+		{
+		CSpecVersionParser* specParser = CSpecVersionParser::NewL(iServiceDesc, iStringPool);
+		CleanupStack::PushL( specParser );
+		StartChildParserL(specParser, aElement, aAttributes);
+		CleanupStack::Pop( specParser );
+		iSiblingsCount--;
+		}
+		break;
+	
+	case UPNPDESCRIPTIONXMLTAGS::EAction:
+		{
+		CUPnPAction* action = CUPnPAction::NewL();
+		iServiceDesc->AppendToActionList( action );
+		CActionParser* actionParser = CActionParser::NewL(action, iStringPool);
+		CleanupStack::PushL(actionParser);
+		StartChildParserL(actionParser, aElement, aAttributes);
+		CleanupStack::Pop( actionParser );
+		iSiblingsCount--;
+		}
+		break;
+	
+	case UPNPDESCRIPTIONXMLTAGS::EStateVariable:
+		{
+		CUPnPStateVariable* stateVariable = CUPnPStateVariable::NewL();
+		CleanupStack::PushL( stateVariable );
+		iServiceDesc->AppendToServiceStateTable( stateVariable );
+		CleanupStack::Pop( stateVariable );
+		CStateTableParser* stateTableParser = CStateTableParser::NewL(stateVariable, iStringPool);
+		CleanupStack::PushL( stateTableParser );
+		StartChildParserL(stateTableParser , aElement, aAttributes);
+		CleanupStack::Pop( stateTableParser );
+		iSiblingsCount--;
+		}
+		break;
+		
+	//default: Don't do anything
+		
+		}
+	
+	}
+		
+void CRootServiceParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iString.Close();
+	}
+
+void CRootServiceParser::ParseContentL(const TDesC8& /*aBytes*/)
+	{
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/serviceinfoparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+// 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 "serviceinfoparser.h"
+#include "upnpdescriptionschema.h"
+
+CServiceInfoParser* CServiceInfoParser::NewL(CUPnPServiceInfo *aServiceInfo, const RStringPool &aStringPool)
+	{
+	CServiceInfoParser* self = new (ELeave) CServiceInfoParser(aServiceInfo, aStringPool);
+	return self;
+	}
+
+		
+CServiceInfoParser::CServiceInfoParser(CUPnPServiceInfo *aServiceInfo, const RStringPool &aStringPool) : iServiceInfo(aServiceInfo), iStringPool(aStringPool)
+	{
+	}
+
+CServiceInfoParser::~CServiceInfoParser()
+	{
+	}
+
+void CServiceInfoParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	
+	}
+
+void CServiceInfoParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iServiceInfo->SetPropertyStatus(iString,ETrue);
+	iString.Close();
+	}
+
+void CServiceInfoParser::ParseContentL(const TDesC8& aBytes)
+	{
+	if ( !IsBlankSpace( aBytes ) )
+		{
+		iServiceInfo->SetPropertyL(iString , aBytes);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/specversionparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,109 @@
+// 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 "specversionparser.h"
+#include "upnpdescriptionschema.h"
+#include <upnpdescriptionschema.h>
+
+CSpecVersionParser* CSpecVersionParser::NewL(CUPnPDeviceDescription* aDeviceDesc, const RStringPool& aStringPool)
+	{
+	CSpecVersionParser* self = new (ELeave) CSpecVersionParser(aDeviceDesc, aStringPool);
+	return self;
+	}
+
+CSpecVersionParser* CSpecVersionParser::NewL(CUPnPServiceDescription* aServiceDesc, const RStringPool& aStringPool)
+	{
+	CSpecVersionParser* self = new (ELeave) CSpecVersionParser(aServiceDesc, aStringPool);
+	return self;
+	}
+		
+CSpecVersionParser::CSpecVersionParser(CUPnPDeviceDescription* aDeviceDesc, const RStringPool& aStringPool) : iDeviceDesc(aDeviceDesc), iStringPool(aStringPool)
+	{
+	iType = CSpecVersionParser::EDeviceType; 
+	}
+
+CSpecVersionParser::CSpecVersionParser(CUPnPServiceDescription* aServiceDesc, const RStringPool& aStringPool) : iServiceDesc(aServiceDesc), iStringPool(aStringPool)
+	{
+	iType = CSpecVersionParser::EServiceType; 
+	}
+
+CSpecVersionParser::~CSpecVersionParser()
+	{
+	}
+
+void CSpecVersionParser::ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+	{
+	iSiblingsCount++;
+	iString = iStringPool.OpenStringL(aElement.LocalName().DesC());
+	TInt tblIndex = iString.Index ( UPNPDESCRIPTIONXMLTAGS::Table );
+	switch( tblIndex )
+		{
+		case UPNPDESCRIPTIONXMLTAGS::ESpecVersion:
+			iFlags = ESpec;
+			break;
+		case UPNPDESCRIPTIONXMLTAGS::EMajorNumber:
+			iFlags = EMajorVersion;
+			break;
+		case UPNPDESCRIPTIONXMLTAGS::EMinorNumber:
+			iFlags = EMinorVersion;
+			break;
+		default:
+			User::Leave(KErrCorrupt);
+		}
+	
+	}
+		
+
+void CSpecVersionParser::ParseEndElementL(const RTagInfo& /*aElement*/)
+	{
+	iSiblingsCount--;
+	iString.Close();
+	}
+
+void CSpecVersionParser::ParseContentL(const TDesC8& aBytes)
+	{
+	switch(iFlags)
+		{
+		case EMajorVersion:
+		{
+		TInt majorNumber;
+		TLex8 data(aBytes);
+		data.Val(majorNumber);
+		if (iType == CSpecVersionParser::EServiceType)
+			iServiceDesc->SetMajorNumberL(majorNumber);
+		else
+			iDeviceDesc->SetMajorNumberL(majorNumber);
+		iFlags = 0;
+		break;
+		}
+	
+		case EMinorVersion:
+		{
+		TInt minorNumber;
+		TLex8 data(aBytes);
+		data.Val(minorNumber);
+		if (iType == CSpecVersionParser::EServiceType)
+			iServiceDesc->SetMinorNumberL(minorNumber);
+		else
+			iDeviceDesc->SetMinorNumberL(minorNumber);
+		iFlags = 0;			
+		break;
+		}
+		
+		default:
+		break;
+		}
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/src/tattributeiter.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,60 @@
+// 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 "tattributeiter.h"
+
+TAttributeIter::TAttributeIter(const CUPnPProperty* aParamPart)
+	: iParamPart(aParamPart)
+	{
+	First();
+	}
+
+TAttributeIter::~TAttributeIter()
+	{
+	}
+
+void TAttributeIter::First()
+	{
+	iPosIdx = 0;
+	CheckInvalidation();
+	}
+
+TBool TAttributeIter::AtEnd()
+	{
+	return (iPosIdx == KErrNotFound);
+	}
+
+void TAttributeIter::operator++()
+	{
+	__ASSERT_DEBUG ( iPosIdx != KErrNotFound, User::Invariant() );
+
+	++iPosIdx;
+	CheckInvalidation();
+	}
+
+const CAttribute* TAttributeIter::operator()()
+	{
+	CheckInvalidation();
+	__ASSERT_DEBUG ( iPosIdx != KErrNotFound, User::Invariant() );
+	
+	return iParamPart->iAttributeArray.operator[](iPosIdx);
+	}
+
+void TAttributeIter::CheckInvalidation()
+	{
+	if (iPosIdx >= iParamPart->iAttributeArray.Count())
+		iPosIdx = KErrNotFound; // Hit the end
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/bwins/upnpmessageu.DEF	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,96 @@
+EXPORTS
+	?SetBody@RUPnPMessage@@QAEXAAVMHTTPDataSupplier@@@Z @ 1 NONAME ; void RUPnPMessage::SetBody(class MHTTPDataSupplier &)
+	?SetVersion@RRequest@@QAEXVTVersion@@@Z @ 2 NONAME ; void RRequest::SetVersion(class TVersion)
+	?Fields@RHTTPHeaders@@QBE?AVTHTTPHdrFieldIter@@XZ @ 3 NONAME ; class THTTPHdrFieldIter RHTTPHeaders::Fields(void) const
+	?First@THeaderFieldPartIter@@QAEXXZ @ 4 NONAME ; void THeaderFieldPartIter::First(void)
+	??1THTTPHdrFieldIter@@QAE@XZ @ 5 NONAME ; THTTPHdrFieldIter::~THTTPHdrFieldIter(void)
+	?SetInt@THTTPHdrVal@@QAEXH@Z @ 6 NONAME ; void THTTPHdrVal::SetInt(int)
+	?Parameters@CHeaderFieldPart@@QBE?AVTHeaderFieldParamIter@@XZ @ 7 NONAME ; class THeaderFieldParamIter CHeaderFieldPart::Parameters(void) const
+	?AtEnd@THTTPHdrFieldIter@@QBEHXZ @ 8 NONAME ; int THTTPHdrFieldIter::AtEnd(void) const
+	?Body@RUPnPMessage@@QBEPAVMHTTPDataSupplier@@XZ @ 9 NONAME ; class MHTTPDataSupplier * RUPnPMessage::Body(void) const
+	??1CResponse@@UAE@XZ @ 10 NONAME ; CResponse::~CResponse(void)
+	??ETHeaderFieldParamIter@@QAEXXZ @ 11 NONAME ; void THeaderFieldParamIter::operator++(void)
+	?GetRawField@RHTTPHeaders@@QBEHVRStringF@@AAVTPtrC8@@@Z @ 12 NONAME ; int RHTTPHeaders::GetRawField(class RStringF, class TPtrC8 &) const
+	?SetStrF@THTTPHdrVal@@QAEXVRStringF@@@Z @ 13 NONAME ; void THTTPHdrVal::SetStrF(class RStringF)
+	?NumParameters@CHeaderFieldPart@@QBEHXZ @ 14 NONAME ; int CHeaderFieldPart::NumParameters(void) const
+	??1CUpnpRequestParser@@UAE@XZ @ 15 NONAME ; CUpnpRequestParser::~CUpnpRequestParser(void)
+	?Method@RRequest@@QBE?AVRStringF@@XZ @ 16 NONAME ; class RStringF RRequest::Method(void) const
+	?GetHeaderCollection@RUPnPMessage@@QAE?AVRHTTPHeaders@@XZ @ 17 NONAME ; class RHTTPHeaders RUPnPMessage::GetHeaderCollection(void)
+	?Type@THTTPHdrVal@@QBE?AW4THTTPValType@1@XZ @ 18 NONAME ; enum THTTPHdrVal::THTTPValType THTTPHdrVal::Type(void) const
+	?ResetParser@CUpnpRequestParser@@QAEXXZ @ 19 NONAME ; void CUpnpRequestParser::ResetParser(void)
+	?First@THTTPHdrFieldIter@@QAEXXZ @ 20 NONAME ; void THTTPHdrFieldIter::First(void)
+	?ParseResponse@CUpnpResponseParser@@QAEXAAVRMBufChain@@PAVCResponse@@@Z @ 21 NONAME ABSENT ; void CUpnpResponseParser::ParseResponse(class RMBufChain &, class CResponse *)
+	?IsHTTP10@RResponse@@QBEHXZ @ 22 NONAME ; int RResponse::IsHTTP10(void) const
+	?AtEnd@THeaderFieldParamIter@@QAEHXZ @ 23 NONAME ; int THeaderFieldParamIter::AtEnd(void)
+	??0THTTPHdrVal@@QAE@VTDateTime@@@Z @ 24 NONAME ; THTTPHdrVal::THTTPHdrVal(class TDateTime)
+	??9THTTPHdrVal@@QBEHV0@@Z @ 25 NONAME ; int THTTPHdrVal::operator!=(class THTTPHdrVal) const
+	?SetURIL@RRequest@@QAEXABVTUriC8@@@Z @ 26 NONAME ; void RRequest::SetURIL(class TUriC8 const &)
+	?GetField@RHTTPHeaders@@QBEHVRStringF@@HAAVTHTTPHdrVal@@@Z @ 27 NONAME ; int RHTTPHeaders::GetField(class RStringF, int, class THTTPHdrVal &) const
+	?URI@RRequest@@QBEABVTUriC8@@XZ @ 28 NONAME ; class TUriC8 const & RRequest::URI(void) const
+	?RemoveField@RHTTPHeaders@@QAEHVRStringF@@@Z @ 29 NONAME ; int RHTTPHeaders::RemoveField(class RStringF)
+	??0THTTPHdrVal@@QAE@H@Z @ 30 NONAME ; THTTPHdrVal::THTTPHdrVal(int)
+	?SetStatusText@RResponse@@QAEXVRStringF@@@Z @ 31 NONAME ; void RResponse::SetStatusText(class RStringF)
+	?FieldPartsL@RHTTPHeaders@@QBEHVRStringF@@@Z @ 32 NONAME ; int RHTTPHeaders::FieldPartsL(class RStringF) const
+	??RTHTTPHdrFieldIter@@QAE?AVRStringTokenF@@XZ @ 33 NONAME ; class RStringTokenF THTTPHdrFieldIter::operator()(void)
+	?ComposeRequest@CUpnpRequestComposer@@QAEXPAVCRequest@@@Z @ 34 NONAME ; void CUpnpRequestComposer::ComposeRequest(class CRequest *)
+	?Copy@THTTPHdrVal@@QBE?AV1@XZ @ 35 NONAME ; class THTTPHdrVal THTTPHdrVal::Copy(void) const
+	?RequestDataSent@CUpnpRequestComposer@@QAEXXZ @ 36 NONAME ; void CUpnpRequestComposer::RequestDataSent(void)
+	?NewL@CUpnpResponseParser@@SAPAV1@AAVMParserObserver@@@Z @ 37 NONAME ; class CUpnpResponseParser * CUpnpResponseParser::NewL(class MParserObserver &)
+	?SetVersion@RResponse@@QAEXVTVersion@@@Z @ 38 NONAME ; void RResponse::SetVersion(class TVersion)
+	?RawDataL@CHeaderField@@QAEXAAVTPtrC8@@@Z @ 39 NONAME ; void CHeaderField::RawDataL(class TPtrC8 &)
+	?AtEnd@THeaderFieldPartIter@@QAEHXZ @ 40 NONAME ; int THeaderFieldPartIter::AtEnd(void)
+	?ComposeResponse@CUpnpResponseComposer@@QAEXPAVCResponse@@@Z @ 41 NONAME ; void CUpnpResponseComposer::ComposeResponse(class CResponse *)
+	?ResetParser@CUpnpResponseParser@@QAEXXZ @ 42 NONAME ; void CUpnpResponseParser::ResetParser(void)
+	?NewL@CUpnpResponseComposer@@SAPAV1@AAVMComposerObserver@@@Z @ 43 NONAME ; class CUpnpResponseComposer * CUpnpResponseComposer::NewL(class MComposerObserver &)
+	?SetStatusCode@RResponse@@QAEXH@Z @ 44 NONAME ; void RResponse::SetStatusCode(int)
+	?Value@CHeaderFieldPart@@QBE?AVTHTTPHdrVal@@XZ @ 45 NONAME ; class THTTPHdrVal CHeaderFieldPart::Value(void) const
+	??1CUpnpRequestComposer@@UAE@XZ @ 46 NONAME ; CUpnpRequestComposer::~CUpnpRequestComposer(void)
+	?StatusCode@RResponse@@QBEHXZ @ 47 NONAME ; int RResponse::StatusCode(void) const
+	?RemoveBody@RUPnPMessage@@QAEXXZ @ 48 NONAME ; void RUPnPMessage::RemoveBody(void)
+	?NewL@CHeaderFieldPart@@SAPAV1@VTHTTPHdrVal@@@Z @ 49 NONAME ; class CHeaderFieldPart * CHeaderFieldPart::NewL(class THTTPHdrVal)
+	?ParseRequest@CUpnpRequestParser@@QAEXAAVRMBufChain@@PAVCRequest@@@Z @ 50 NONAME ABSENT ; void CUpnpRequestParser::ParseRequest(class RMBufChain &, class CRequest *)
+	?Str@THTTPHdrVal@@QBE?AVRString@@XZ @ 51 NONAME ; class RString THTTPHdrVal::Str(void) const
+	?SetRawFieldL@RHTTPHeaders@@QAEXVRStringF@@ABVTDesC8@@1@Z @ 52 NONAME ; void RHTTPHeaders::SetRawFieldL(class RStringF, class TDesC8 const &, class TDesC8 const &)
+	?Name@CHeaderFieldParam@@QBE?AVRStringF@@XZ @ 53 NONAME ; class RStringF CHeaderFieldParam::Name(void) const
+	?StatusText@RResponse@@QBE?AVRStringF@@XZ @ 54 NONAME ; class RStringF RResponse::StatusText(void) const
+	?ResponseDataSent@CUpnpResponseComposer@@QAEXXZ @ 55 NONAME ; void CUpnpResponseComposer::ResponseDataSent(void)
+	?RemoveAllFields@RHTTPHeaders@@QAEXXZ @ 56 NONAME ; void RHTTPHeaders::RemoveAllFields(void)
+	??RTHeaderFieldParamIter@@QAEPBVCHeaderFieldParam@@XZ @ 57 NONAME ; class CHeaderFieldParam const * THeaderFieldParamIter::operator()(void)
+	??RTHeaderFieldPartIter@@QAEPBVCHeaderFieldPart@@XZ @ 58 NONAME ; class CHeaderFieldPart const * THeaderFieldPartIter::operator()(void)
+	?SetFieldL@RHTTPHeaders@@QAEXVRStringF@@VTHTTPHdrVal@@@Z @ 59 NONAME ; void RHTTPHeaders::SetFieldL(class RStringF, class THTTPHdrVal)
+	?NewL@CUpnpRequestComposer@@SAPAV1@AAVMComposerObserver@@@Z @ 60 NONAME ; class CUpnpRequestComposer * CUpnpRequestComposer::NewL(class MComposerObserver &)
+	?NewL@CHeaderFieldParam@@SAPAV1@VRStringF@@VTHTTPHdrVal@@@Z @ 61 NONAME ; class CHeaderFieldParam * CHeaderFieldParam::NewL(class RStringF, class THTTPHdrVal)
+	??1CRequest@@UAE@XZ @ 62 NONAME ; CRequest::~CRequest(void)
+	?NotifyNewBodyData@CUPnPMessageComposer@@QAEXXZ @ 63 NONAME ; void CUPnPMessageComposer::NotifyNewBodyData(void)
+	??ETHeaderFieldPartIter@@QAEXXZ @ 64 NONAME ; void THeaderFieldPartIter::operator++(void)
+	?SetFieldL@RHTTPHeaders@@QAEXVRStringF@@VTHTTPHdrVal@@01@Z @ 65 NONAME ; void RHTTPHeaders::SetFieldL(class RStringF, class THTTPHdrVal, class RStringF, class THTTPHdrVal)
+	?ResetComposer@CUpnpResponseComposer@@QAEXXZ @ 66 NONAME ; void CUpnpResponseComposer::ResetComposer(void)
+	??ETHTTPHdrFieldIter@@QAEXXZ @ 67 NONAME ; void THTTPHdrFieldIter::operator++(void)
+	??0THTTPHdrVal@@QAE@VRStringF@@@Z @ 68 NONAME ; THTTPHdrVal::THTTPHdrVal(class RStringF)
+	?NewL@CUpnpRequestParser@@SAPAV1@AAVMParserObserver@@@Z @ 69 NONAME ; class CUpnpRequestParser * CUpnpRequestParser::NewL(class MParserObserver &)
+	?AddParamL@CHeaderFieldPart@@QAEXPAVCHeaderFieldParam@@@Z @ 70 NONAME ; void CHeaderFieldPart::AddParamL(class CHeaderFieldParam *)
+	?Value@CHeaderFieldParam@@QBE?AVTHTTPHdrVal@@XZ @ 71 NONAME ; class THTTPHdrVal CHeaderFieldParam::Value(void) const
+	?HasBody@RUPnPMessage@@QBEHXZ @ 72 NONAME ; int RUPnPMessage::HasBody(void) const
+	?IsHTTP10@RRequest@@QBEHXZ @ 73 NONAME ; int RRequest::IsHTTP10(void) const
+	?SetStr@THTTPHdrVal@@QAEXVRString@@@Z @ 74 NONAME ; void THTTPHdrVal::SetStr(class RString)
+	?First@THeaderFieldParamIter@@QAEXXZ @ 75 NONAME ; void THeaderFieldParamIter::First(void)
+	?Int@THTTPHdrVal@@QBEHXZ @ 76 NONAME ; int THTTPHdrVal::Int(void) const
+	?RemoveFieldPart@RHTTPHeaders@@QAEHVRStringF@@H@Z @ 77 NONAME ; int RHTTPHeaders::RemoveFieldPart(class RStringF, int)
+	??0THTTPHdrVal@@QAE@XZ @ 78 NONAME ; THTTPHdrVal::THTTPHdrVal(void)
+	?SetMethod@RRequest@@QAEXVRStringF@@@Z @ 79 NONAME ; void RRequest::SetMethod(class RStringF)
+	??8THTTPHdrVal@@QBEHV0@@Z @ 80 NONAME ; int THTTPHdrVal::operator==(class THTTPHdrVal) const
+	?ResetComposer@CUpnpRequestComposer@@QAEXXZ @ 81 NONAME ; void CUpnpRequestComposer::ResetComposer(void)
+	?DateTime@THTTPHdrVal@@QBE?AVTDateTime@@XZ @ 82 NONAME ; class TDateTime THTTPHdrVal::DateTime(void) const
+	?StrF@THTTPHdrVal@@QBE?AVRStringF@@XZ @ 83 NONAME ; class RStringF THTTPHdrVal::StrF(void) const
+	??1CUpnpResponseComposer@@UAE@XZ @ 84 NONAME ; CUpnpResponseComposer::~CUpnpResponseComposer(void)
+	??1THeaderFieldParamIter@@QAE@XZ @ 85 NONAME ; THeaderFieldParamIter::~THeaderFieldParamIter(void)
+	?NewL@CResponse@@SAPAV1@AAVCHeaderCodec@@AAVRStringPool@@@Z @ 86 NONAME ; class CResponse * CResponse::NewL(class CHeaderCodec &, class RStringPool &)
+	?SetDateTime@THTTPHdrVal@@QAEXVTDateTime@@@Z @ 87 NONAME ; void THTTPHdrVal::SetDateTime(class TDateTime)
+	?SetParamL@RHTTPHeaders@@QAEXVRStringF@@0VTHTTPHdrVal@@H@Z @ 88 NONAME ; void RHTTPHeaders::SetParamL(class RStringF, class RStringF, class THTTPHdrVal, int)
+	?NewL@CRequest@@SAPAV1@AAVCHeaderCodec@@AAVRStringPool@@@Z @ 89 NONAME ; class CRequest * CRequest::NewL(class CHeaderCodec &, class RStringPool &)
+	??1CUpnpResponseParser@@UAE@XZ @ 90 NONAME ; CUpnpResponseParser::~CUpnpResponseParser(void)
+	??0THTTPHdrVal@@QAE@VRString@@@Z @ 91 NONAME ; THTTPHdrVal::THTTPHdrVal(class RString)
+	?GetParam@RHTTPHeaders@@QBEHVRStringF@@0AAVTHTTPHdrVal@@H@Z @ 92 NONAME ; int RHTTPHeaders::GetParam(class RStringF, class RStringF, class THTTPHdrVal &, int) const
+	?ParseResponse@CUpnpResponseParser@@QAEXAAVRMemChunk@@PAVCResponse@@@Z @ 93 NONAME ; void CUpnpResponseParser::ParseResponse(class RMemChunk &, class CResponse *)
+	?ParseRequest@CUpnpRequestParser@@QAEXAAVRMemChunk@@PAVCRequest@@@Z @ 94 NONAME ; void CUpnpRequestParser::ParseRequest(class RMemChunk &, class CRequest *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/eabi/upnpmessageu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,135 @@
+EXPORTS
+	_ZN11THTTPHdrVal11SetDateTimeE9TDateTime @ 1 NONAME
+	_ZN11THTTPHdrVal6SetIntEi @ 2 NONAME
+	_ZN11THTTPHdrVal6SetStrE7RString @ 3 NONAME
+	_ZN11THTTPHdrVal7SetStrFE8RStringF @ 4 NONAME
+	_ZN11THTTPHdrValC1E7RString @ 5 NONAME
+	_ZN11THTTPHdrValC1E8RStringF @ 6 NONAME
+	_ZN11THTTPHdrValC1E9TDateTime @ 7 NONAME
+	_ZN11THTTPHdrValC1Ei @ 8 NONAME
+	_ZN11THTTPHdrValC1Ev @ 9 NONAME
+	_ZN11THTTPHdrValC2E7RString @ 10 NONAME
+	_ZN11THTTPHdrValC2E8RStringF @ 11 NONAME
+	_ZN11THTTPHdrValC2E9TDateTime @ 12 NONAME
+	_ZN11THTTPHdrValC2Ei @ 13 NONAME
+	_ZN11THTTPHdrValC2Ev @ 14 NONAME
+	_ZN12CHeaderField8RawDataLER6TPtrC8 @ 15 NONAME
+	_ZN12RHTTPHeaders11RemoveFieldE8RStringF @ 16 NONAME
+	_ZN12RHTTPHeaders12SetRawFieldLE8RStringFRK6TDesC8S3_ @ 17 NONAME
+	_ZN12RHTTPHeaders15RemoveAllFieldsEv @ 18 NONAME
+	_ZN12RHTTPHeaders15RemoveFieldPartE8RStringFi @ 19 NONAME
+	_ZN12RHTTPHeaders9SetFieldLE8RStringF11THTTPHdrVal @ 20 NONAME
+	_ZN12RHTTPHeaders9SetFieldLE8RStringF11THTTPHdrValS0_S1_ @ 21 NONAME
+	_ZN12RHTTPHeaders9SetParamLE8RStringFS0_11THTTPHdrVali @ 22 NONAME
+	_ZN12RUPnPMessage10RemoveBodyEv @ 23 NONAME
+	_ZN12RUPnPMessage19GetHeaderCollectionEv @ 24 NONAME
+	_ZN12RUPnPMessage7SetBodyER17MHTTPDataSupplier @ 25 NONAME
+	_ZN16CHeaderFieldPart4NewLE11THTTPHdrVal @ 26 NONAME
+	_ZN16CHeaderFieldPart9AddParamLEP17CHeaderFieldParam @ 27 NONAME
+	_ZN17CHeaderFieldParam4NewLE8RStringF11THTTPHdrVal @ 28 NONAME
+	_ZN17THTTPHdrFieldIter5FirstEv @ 29 NONAME
+	_ZN17THTTPHdrFieldIterD1Ev @ 30 NONAME
+	_ZN17THTTPHdrFieldIterD2Ev @ 31 NONAME
+	_ZN17THTTPHdrFieldIterclEv @ 32 NONAME
+	_ZN17THTTPHdrFieldIterppEv @ 33 NONAME
+	_ZN18CUpnpRequestParser11ResetParserEv @ 34 NONAME
+	_ZN18CUpnpRequestParser12ParseRequestER9RMemChunkP8CRequest @ 35 NONAME
+	_ZN18CUpnpRequestParser4NewLER15MParserObserver @ 36 NONAME
+	_ZN18CUpnpRequestParserD0Ev @ 37 NONAME
+	_ZN18CUpnpRequestParserD1Ev @ 38 NONAME
+	_ZN18CUpnpRequestParserD2Ev @ 39 NONAME
+	_ZN19CUpnpResponseParser11ResetParserEv @ 40 NONAME
+	_ZN19CUpnpResponseParser13ParseResponseER9RMemChunkP9CResponse @ 41 NONAME
+	_ZN19CUpnpResponseParser4NewLER15MParserObserver @ 42 NONAME
+	_ZN19CUpnpResponseParserD0Ev @ 43 NONAME
+	_ZN19CUpnpResponseParserD1Ev @ 44 NONAME
+	_ZN19CUpnpResponseParserD2Ev @ 45 NONAME
+	_ZN20CUPnPMessageComposer17NotifyNewBodyDataEv @ 46 NONAME
+	_ZN20CUpnpRequestComposer13ResetComposerEv @ 47 NONAME
+	_ZN20CUpnpRequestComposer14ComposeRequestEP8CRequest @ 48 NONAME
+	_ZN20CUpnpRequestComposer15RequestDataSentEv @ 49 NONAME
+	_ZN20CUpnpRequestComposer4NewLER17MComposerObserver @ 50 NONAME
+	_ZN20CUpnpRequestComposerD0Ev @ 51 NONAME
+	_ZN20CUpnpRequestComposerD1Ev @ 52 NONAME
+	_ZN20CUpnpRequestComposerD2Ev @ 53 NONAME
+	_ZN20THeaderFieldPartIter5AtEndEv @ 54 NONAME
+	_ZN20THeaderFieldPartIter5FirstEv @ 55 NONAME
+	_ZN20THeaderFieldPartIterclEv @ 56 NONAME
+	_ZN20THeaderFieldPartIterppEv @ 57 NONAME
+	_ZN21CUpnpResponseComposer13ResetComposerEv @ 58 NONAME
+	_ZN21CUpnpResponseComposer15ComposeResponseEP9CResponse @ 59 NONAME
+	_ZN21CUpnpResponseComposer16ResponseDataSentEv @ 60 NONAME
+	_ZN21CUpnpResponseComposer4NewLER17MComposerObserver @ 61 NONAME
+	_ZN21CUpnpResponseComposerD0Ev @ 62 NONAME
+	_ZN21CUpnpResponseComposerD1Ev @ 63 NONAME
+	_ZN21CUpnpResponseComposerD2Ev @ 64 NONAME
+	_ZN21THeaderFieldParamIter5AtEndEv @ 65 NONAME
+	_ZN21THeaderFieldParamIter5FirstEv @ 66 NONAME
+	_ZN21THeaderFieldParamIterD1Ev @ 67 NONAME
+	_ZN21THeaderFieldParamIterD2Ev @ 68 NONAME
+	_ZN21THeaderFieldParamIterclEv @ 69 NONAME
+	_ZN21THeaderFieldParamIterppEv @ 70 NONAME
+	_ZN8CRequest4NewLER12CHeaderCodecR11RStringPool @ 71 NONAME
+	_ZN8CRequestD0Ev @ 72 NONAME
+	_ZN8CRequestD1Ev @ 73 NONAME
+	_ZN8CRequestD2Ev @ 74 NONAME
+	_ZN8RRequest10SetVersionE8TVersion @ 75 NONAME
+	_ZN8RRequest7SetURILERK6TUriC8 @ 76 NONAME
+	_ZN8RRequest9SetMethodE8RStringF @ 77 NONAME
+	_ZN9CResponse4NewLER12CHeaderCodecR11RStringPool @ 78 NONAME
+	_ZN9CResponseD0Ev @ 79 NONAME
+	_ZN9CResponseD1Ev @ 80 NONAME
+	_ZN9CResponseD2Ev @ 81 NONAME
+	_ZN9RResponse10SetVersionE8TVersion @ 82 NONAME
+	_ZN9RResponse13SetStatusCodeEi @ 83 NONAME
+	_ZN9RResponse13SetStatusTextE8RStringF @ 84 NONAME
+	_ZNK11THTTPHdrVal3IntEv @ 85 NONAME
+	_ZNK11THTTPHdrVal3StrEv @ 86 NONAME
+	_ZNK11THTTPHdrVal4CopyEv @ 87 NONAME
+	_ZNK11THTTPHdrVal4StrFEv @ 88 NONAME
+	_ZNK11THTTPHdrVal4TypeEv @ 89 NONAME
+	_ZNK11THTTPHdrVal8DateTimeEv @ 90 NONAME
+	_ZNK11THTTPHdrValeqES_ @ 91 NONAME
+	_ZNK11THTTPHdrValneES_ @ 92 NONAME
+	_ZNK12RHTTPHeaders11FieldPartsLE8RStringF @ 93 NONAME
+	_ZNK12RHTTPHeaders11GetRawFieldE8RStringFR6TPtrC8 @ 94 NONAME
+	_ZNK12RHTTPHeaders6FieldsEv @ 95 NONAME
+	_ZNK12RHTTPHeaders8GetFieldE8RStringFiR11THTTPHdrVal @ 96 NONAME
+	_ZNK12RHTTPHeaders8GetParamE8RStringFS0_R11THTTPHdrVali @ 97 NONAME
+	_ZNK12RUPnPMessage4BodyEv @ 98 NONAME
+	_ZNK12RUPnPMessage7HasBodyEv @ 99 NONAME
+	_ZNK16CHeaderFieldPart10ParametersEv @ 100 NONAME
+	_ZNK16CHeaderFieldPart13NumParametersEv @ 101 NONAME
+	_ZNK16CHeaderFieldPart5ValueEv @ 102 NONAME
+	_ZNK17CHeaderFieldParam4NameEv @ 103 NONAME
+	_ZNK17CHeaderFieldParam5ValueEv @ 104 NONAME
+	_ZNK17THTTPHdrFieldIter5AtEndEv @ 105 NONAME
+	_ZNK8RRequest3URIEv @ 106 NONAME
+	_ZNK8RRequest6MethodEv @ 107 NONAME
+	_ZNK8RRequest8IsHTTP10Ev @ 108 NONAME
+	_ZNK9RResponse10StatusCodeEv @ 109 NONAME
+	_ZNK9RResponse10StatusTextEv @ 110 NONAME
+	_ZNK9RResponse8IsHTTP10Ev @ 111 NONAME
+	_ZTI12CHeaderField @ 112 NONAME
+	_ZTI16CHeaderFieldPart @ 113 NONAME
+	_ZTI17CHeaderFieldParam @ 114 NONAME
+	_ZTI18CUpnpRequestParser @ 115 NONAME
+	_ZTI19CUpnpResponseParser @ 116 NONAME
+	_ZTI20CUPnPMessageComposer @ 117 NONAME
+	_ZTI20CUpnpRequestComposer @ 118 NONAME
+	_ZTI21CUpnpResponseComposer @ 119 NONAME
+	_ZTI8CHeaders @ 120 NONAME
+	_ZTI8CRequest @ 121 NONAME
+	_ZTI9CResponse @ 122 NONAME
+	_ZTV12CHeaderField @ 123 NONAME
+	_ZTV16CHeaderFieldPart @ 124 NONAME
+	_ZTV17CHeaderFieldParam @ 125 NONAME
+	_ZTV18CUpnpRequestParser @ 126 NONAME
+	_ZTV19CUpnpResponseParser @ 127 NONAME
+	_ZTV20CUPnPMessageComposer @ 128 NONAME
+	_ZTV20CUpnpRequestComposer @ 129 NONAME
+	_ZTV21CUpnpResponseComposer @ 130 NONAME
+	_ZTV8CHeaders @ 131 NONAME
+	_ZTV8CRequest @ 132 NONAME
+	_ZTV9CResponse @ 133 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,21 @@
+// 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:
+//
+
+PRJ_TESTMMPFILES
+upnpmessage.mmp
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/group/upnpmessage.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,61 @@
+// 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:
+//
+
+TARGET		  upnpmessage.dll
+TARGETTYPE	  dll
+UID			 0x00000000 0x2000D05A
+CAPABILITY	 CommDD PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ NetworkControl NetworkServices LocalServices ReadUserData WriteUserData
+
+USERINCLUDE	 ../inc
+SYSTEMINCLUDE	 /epoc32/include
+
+SOURCEPATH	  ../src
+
+SOURCE		  rrequest.cpp 
+SOURCE		  CRequest.cpp
+SOURCE		  RResponse.cpp
+SOURCE		  CResponse.cpp
+SOURCE		  rhttpheaders.cpp 
+SOURCE		  CHeaders.cpp
+SOURCE		  CMessage.cpp
+SOURCE		  CHeaderField.cpp
+SOURCE		  cupnprequestcomposer.cpp
+SOURCE		  cupnpresponseparser.cpp 
+SOURCE		  cupnpresponsecomposer.cpp 
+SOURCE		  cupnprequestparser.cpp 
+SOURCE		  tupnpmessagepanic.cpp rupnpmessage.cpp
+SOURCE		  cupnpmessagecomposer.cpp
+
+LIBRARY		 euser.lib 
+LIBRARY		 bafl.lib 
+LIBRARY		 http.lib 
+LIBRARY		 inetprotutil.lib 
+LIBRARY		 httpmessage.lib
+//LIBRARY		 mbufmgr.lib
+LIBRARY 	 chunkmgr.lib
+LIBRARY		 comsdbgutil.lib
+LIBRARY		 upnputils.lib
+
+#ifdef WINSCW
+DEFFILE			upnpmessage.DEF
+#endif
+
+#ifdef ARMV5
+DEFFILE			upnpmessage.def
+#endif
+
+
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CHeaderField.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,608 @@
+// 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:
+// Declaration of CHeaderField, CHeaderFieldPart, THeaderFieldPartIter, CHeaderFieldParam,
+// and THeaderFieldParamIter classes.
+// 
+//
+
+#ifndef __CHEADERFIELD_H__
+#define __CHEADERFIELD_H__
+
+#include <e32base.h>
+#include <http/thttphdrval.h>
+#include "rhttpheaders.h"
+
+
+
+// The default chunk size for Raw data should be set to the average length of a header field when encoded in
+// plaintext
+const TInt KHttpDefaultRawChunkSize= 32;
+
+
+class CHeaders;
+class CHeaderFieldPart;
+class THeaderFieldPartIter;
+class CHeaderFieldParam;
+class THeaderFieldParamIter;
+class CHeaderCodec;
+
+
+/** Generalised internal representation of a single HTTP header field.  The field's
+	value may be contained as raw data as received by HTTP, or
+	in a object-oriented parsed form, which is accessible to the client via
+	the class API.
+
+	Each field has a type and a (potentially complex) value.  The type must
+	be chosen at construction time, and remains the same during the
+	header's lifetime.
+
+	Simple headers are represented using a single 'part'.  Several factory
+	methods are provided for each type the part can take; e.g.
+	
+	@verbatim
+	Max-Forwards: 3							-- a single integer value
+	Location: http://ayg.com/				-- a single string token value
+	Expires: Mon, 15 Jan 2001 10:30:25 GMT	-- a single date/time value
+	@endverbatim
+	
+	More complex headers are possible (see the RFC2116 for many more examples)
+	which are built up from several parts; e.g.
+	
+	@verbatim
+	Accept: text/wml, application/vnd.wap.wmlc	-- a header with two string token parts
+	Allow: GET, POST, HEAD						-- a header with three string token parts
+	@endverbatim
+	
+	Multiple parts are supported by the CHeaderFieldPart class.
+
+	Furthermore, some headers allow parameters to be supplied in the form of attribute-value
+	pairs.   These may be present on any part of the header, according to the syntax defined
+	in the RFC; e.g.
+	
+	@verbatim
+	Accept-Charset: utf-8; q=0.8, us-ascii; q=0.2
+	Cache-Control: maxage=6000
+	@endverbatim
+	
+	Parameters are supported by the CHeaderFieldParam class.	
+
+    The classes CHeaderField, CHeaderFieldPart and CHeaderFieldParam are internal header representations
+	and will only be manipulated by protocol handlers and filters.  Only the RHTTPHeaders and THTTPHdrVal
+	classes are intended for use by the Client.
+	@see RHTTPHeaders
+	@see THTTPHdrVal
+	@see CHeaderFieldPart
+	@see CHeaderFieldParam
+	*/
+
+class CHeaderField : public CBase
+	{
+friend class THeaderFieldPartIter;
+friend class RHeaderField;
+public:
+	//
+	// Getters
+	//
+
+	/** Obtain the name of the header field, e.g. Accept
+		@return The header field name as a string token
+	*/
+	RStringF Name() const;
+
+	/** Access the header value parts via an iterator
+		@return An iterator constructed to point at the first part
+		@leave KErrNoMemory - insufficient free memory for object creation when decoding parts
+		@leave KErrNotSupported - if decoding when counting parts fails
+	*/
+	THeaderFieldPartIter PartsL();
+
+	/** Get the Raw header representation.  This will flip the internal state of the header,
+		if it's not already in Raw form. Requires a Codec to be set.
+		@param The 8-bit data buffer representing the header in Raw form
+		@leave KErrNoMemory - insufficient free memory for object creation when decoding parts
+		@leave KErrNotSupported - if decoding when counting parts fails
+	*/
+	IMPORT_C
+	void RawDataL(TPtrC8& aRawData);
+
+	//
+	// Setters
+	//
+
+	/** Set a part in the header. It replaces any existing parts at the specified index.
+		Note this is for use only by the header codec, when converting Raw data into parsed header parts from parsed Raw data.
+		This function may leave with any of the system wide error codes, if the attempt to append this part to the internal list
+		fails.
+		@param aPart The part to be added.  The header takes ownership of the new part.
+		@param aIndex The index of the part you are replacing
+	*/
+	//void SetPartL(CHeaderFieldPart* aPart, TInt aIndex);
+
+	/** Start setting Raw data in the header.  Leaves if initial Raw buffer allocation fails. The
+		optional parameter specifies the size to be used for Raw data chunk allocation.
+		Note this is for use only by the header codec. 
+		@leave KErrNoMemory - insufficient free memory buffer allocation
+	*/
+	void BeginRawDataL(TInt aChunkSize = KHttpDefaultRawChunkSize);
+
+	/** Add more Raw data, supplied as a descriptor.  The buffer is extended as necessary.
+		Leaves if buffer allocation fails.
+		Note this is for use only by the header codec. 
+		@leave KErrNoMemory - insufficient free memory buffer allocation
+	*/
+	void WriteRawDataL(const TDesC8& aData);
+
+	/** Add more Raw data, supplied as a single character.  The buffer is extended as necessary.
+		Leaves if buffer allocation fails.
+		Note this is for use only by the header codec. 
+		@leave KErrNoMemory - insufficient free memory buffer allocation
+	*/
+	//void WriteRawDataL(TChar aData);
+
+	/** Commit the Raw data.  The parsed header parts and parameters are removed.
+		Note this is for use only by the header codec.
+	*/
+	void CommitRawData();
+
+
+
+	/** Obtain the number of parts in this header
+		@return The number, as an integer
+		@leave KErrNoMemory - insufficient free memory for object creation when decoding parts
+		@leave KErrNotSupported - if decoding when counting parts fails
+	*/
+	TInt NumPartsL();
+
+
+	/** Create a new header field that has no value yet.
+		@param aHeaderFieldName The header field type.
+		@param aOwner The header fields collection that this field belongs to
+		@leave KErrNoMemory - insufficient free memory to create an instance of the class.
+	*/
+	static CHeaderField* NewL(RStringF aHeaderFieldName, CHeaders& aOwner);
+
+	/** Create a new header field with a single part, whose HTTP value is specified.
+		@param aHeaderFieldName The header field type.
+		@param aOwner The header fields collection that this field belongs to
+		@param aVal The header field value. A copy is taken when storing.
+		@leave KErrNoMemory - insufficient free memory to create an instance of the class, or any classes needed to create subclasses for parsing
+		@leave KErrNotSupported - if decoding for this header field can't be made
+	*/
+	static CHeaderField* NewL(RStringF aHeaderFieldName, CHeaders& aOwner, THTTPHdrVal aVal);
+
+	/** Create a new header field from the supplied Raw data using the specified transaction codec.
+		@param aHeaderFieldName The header field type.
+		@param aOwner The header fields collection that this field belongs to
+		@param aRawData The raw data buffer, as a descriptor
+		@leave KErrNoMemory - insufficient free memory to create an instance of the class, or any classes needed to create subclasses for parsing
+		@leave KErrNotSupported - if decoding for this header field can't be made
+	*/
+	static CHeaderField* NewL(RStringF aHeaderFieldName, CHeaders& aOwner, const TDesC8& aRawData);
+
+	// Class destructor
+	virtual ~CHeaderField();
+	/** Access the header value parts by index
+		@param aIndex The index of the desired part. 0 references the first one.
+		@return The indexed part, or NULL if the index was invalid.
+		@leave KErrNoMemory - insufficient free memory for object creation when decoding parts
+		@leave KErrNotSupported - if decoding when counting parts fails
+	*/
+	CHeaderFieldPart* PartL(TInt aIndex);
+
+
+	/** Add a part to the header. It is appended after any existing parts. Simple headers
+		have just one part;  they could be constructed using the 'single part' NewL() methods.
+		@param aPart The part to be added.  The header takes ownership of the new part.
+		@leave KErrNoMemory - insufficient free memory to create an instance of the class, or any classes needed to create subclasses for parsing
+		@leave KErrNotSupported - if decoding for this header field can't be made
+	*/
+	void AddPartL(CHeaderFieldPart* aPart);
+
+	/** Insert a part into the header. It is inserted at the specified index - i.e. to insert
+		a new part at the start of the header, aIndex should be set to 0.
+		@param aPart The part to be inserted.  The header takes ownership of the new part.
+		@param aIndex The index at which the part is to be inserted.
+		@leave KErrNoMemory - insufficient free memory to create an instance of the class, or any classes needed to create subclasses for parsing
+		@leave KErrNotSupported - if decoding for this header field can't be made
+	*/
+	//void InsertPartL(CHeaderFieldPart* aPart, TInt aIndex);
+
+	
+	/** Remove the specified part from the header.
+		@param aPart The part to be removed.  The header deletes the removed part.
+		@return An error code; KErrNone if the removal succeeds or KErrNotFound if it didn't.
+		@leave KErrNoMemory - insufficient free memory to create an instance of the class, or any classes needed to create subclasses for parsing
+		@leave KErrNotSupported - if decoding for this header field can't be made
+	*/
+	//TInt RemovePartL(CHeaderFieldPart* aPart);
+
+
+	/** Remove the indexed part from the header
+		@param aIndex An index to the part to be removed.  The header deletes the removed part.
+		@return An error code; KErrNone if the removal succeeds or KErrNotFound if it didn't.
+		@leave KErrNoMemory - insufficient free memory to create an instance of the class, or any classes needed to create subclasses for parsing
+		@leave KErrNotSupported - if decoding for this header field can't be made
+	*/
+	TInt RemovePartL(TInt aIndex);
+private: // methods
+
+	//
+	// Internal format conversion
+	//
+
+	/** Create an Raw encoding of the header's field name and value. This is done
+		using the Codec, which must be supplied prior to this call.	The part data is removed
+		after conversion to the Raw format.
+		@leave KErrNotSupported if a codec that supports encoding this header cannot be found
+	*/
+	void ConvertToRawFormatL();
+
+	/** Create the part objects that represent the header field's value, by parsing the 
+		Raw data received by HTTP.  The Raw data is removed after conversion completes
+		successfully.
+		@leave KErrNotSupported if a codec that supports encoding this header cannot be found
+	*/
+	void ConvertToParsedFormatL();	
+
+	/** Standard constructor.  Used when client constructs headers.
+		@param aHeaderFieldName A string table reference to the header field's name.
+		@param aOwner The header fields collection that this field belongs to
+		@return The constructed instance of CHeaderField
+	*/
+	CHeaderField(RStringF aHeaderFieldName, CHeaders& aOwner);
+
+	/** Phase Two construction. This variant copies-to-keep the supplied Raw data buffer.
+		@param aRawData An 8-bit buffer containing raw header data received by HTTP.
+	*/
+	void ConstructL(const TDesC8& aRawData);
+
+	// Empty and destroy contents of the 'parts' array.
+	void ClearParsedData();
+
+	// Empty and destroy any Raw data held
+	void ClearRawData();
+
+private: // types and enums
+
+	/** Enumeration of the states in which this header's value data can exist.
+	*/
+	enum TDataState
+		{
+		ENoDataSupplied	= 0x00, /**< the header object is not populated with data after construction*/
+		EDataInRawForm	= 0x01, /**< the data is in it's raw form, i.e. not accessible by part*/
+		EDataParsedOK	= 0x02, /**< the data is in it's client representation, i.e. parsed into parts.	*/
+		EDataParseError	= 0x03  /**< the data could not be parsed so remains in Raw form*/
+		};
+
+private: // attributes
+
+	/**  Name of this header (a reference into the string table) 
+	*/
+	RStringF iName;
+
+	/** Has this header been parsed yet? did it parse correctly?
+	*/
+	TDataState iDataParseState;
+
+	/**  Headers collection that owns this field
+	*/
+	CHeaders* iOwner;
+
+	/** Header data - in Raw format.
+	*/
+	HBufC8* iRawData;
+
+	/** Header data - in parsed format.
+	*/
+	RPointerArray<CHeaderFieldPart> iParts;
+	
+	/** Codec used to convert this header
+	*/
+	const CHeaderCodec& iCodec;
+
+	/** Size of data chunk used when allocating and extending the Raw data buffer
+	*/
+	TInt iRawChunkSize;
+	};
+
+
+
+
+/** Generalised representation of a single HTTP header value part.  The part takes a
+	value of one of the following three types:
+
+	- integer, signed (i.e. can be -ve or +ve)
+	- string token, which can represent free text (i.e. text with no special meaning; ETags; MD5 hashes;
+	  MIME types, etc.), enumerations (words with special meanings such as 'private', 'close', ') or URLs
+	- Date/Time
+
+	In addition the part may have one or more parameters.  These take the form of
+	attribute-value pairs.  They are implemented by the CHeaderFieldParam class.
+*/
+class CHeaderFieldPart : public CBase
+	{
+friend class THeaderFieldParamIter;
+
+public:
+	/** Create a new part, for the supplied HTTP value 
+		@param aVal The HTTP value for this part of the header field. A copy is taken when storing.
+		@return The constructed instance of CHeaderFieldPart.
+	*/
+	IMPORT_C
+	static CHeaderFieldPart* NewL(THTTPHdrVal aVal);
+
+	// Class destructor
+	virtual ~CHeaderFieldPart();
+
+	//
+	// Getters
+	//
+
+	/** Obtain the value held in this field part.  The caller must call Copy() on the returned THTTPHdrVal
+		if it is going to be stored.  This is needed in order to correctly maintain string references.
+		@return The field part's HTTP value
+	*/
+	IMPORT_C
+	THTTPHdrVal Value() const;
+
+	/** Obtain the number of parameters in this header
+		@return The number, as an integer
+	*/ 
+	IMPORT_C
+	TInt NumParameters() const;
+
+	/** Access the parameters in this header part via an iterator
+		@return An iterator constructed to point at the first parameter
+	*/
+	IMPORT_C
+	THeaderFieldParamIter Parameters() const;
+
+	/** Access the header parameters by index
+		@param aIndex The index of the desired parameter. 0 references the first one.
+		@return The indexed parameter, or NULL if the index was invalid.
+	*/
+	//CHeaderFieldParam* Parameter(TInt aIndex) const;
+
+	/** Access the header parameters by parameter name
+		@param aParamName The name of the desired part.
+		@return The named parameter, or NULL if it doesn't exist.
+	*/
+	CHeaderFieldParam* Parameter(RStringF aParamName) const;
+
+	//
+	// Setters
+	//
+
+	/** Change the value held in this field part
+		@param  The HTTP value. It is copied in order to store it.
+	*/
+	//void SetValue(THTTPHdrVal aVal);
+
+	/** Add a parameter to the header part. It is appended after any existing
+		parameters.
+		@param aParam The parameter to be added.  The header takes ownership of the
+					  new parameter.
+	*/
+	IMPORT_C
+	void AddParamL(CHeaderFieldParam* aParam);
+
+	/** Remove the specified parameter from the header part.
+		@param aParam The parameter to be removed.  The header deletes the removed
+					  parameter.
+		@return An error code; KErrNone if the removal succeeds or KErrNotFound if
+				it didn't.
+	*/
+	//TInt RemoveParam(CHeaderFieldParam* aParam);
+
+private: // methods
+
+	// Default constructor. 
+	CHeaderFieldPart(THTTPHdrVal aVal);
+
+private: // attributes
+
+	// The value of this part of the header field
+	THTTPHdrVal iValue;
+
+	// Parameters for this part.
+	RPointerArray<CHeaderFieldParam> iParams;
+	};
+
+
+/** Generalised representation of a single HTTP header parameter.  The parameter has
+	a name and takes a value using one of the three types supported in CHeaderFieldPart.
+
+	Special case:
+	- an unnamed parameter with an assigned value
+
+	Examples of the use for this special case are:
+
+	@verbatim
+	Cache-Control: max-stale [=delta-seconds]
+	Expect: expectation1=value1; expectation2=value2
+	Content-Range: bytes 0-1023/4096
+	@endverbatim
+
+	Cache-Control's max-stale directive can take an optional value; hence the client
+	should create a one-part header where the part is an enumeration value 'max-stale',
+	and assign to that part an un-named parameter for the delta-seconds value if it is
+	desired.
+
+	Expect's sets of expectation expressions should each be added by the client as a
+	separate part, each of which is given an unnamed parameter that takes the
+	expectation	value.
+
+	Content-Range should have one part added containing the enumeration 'bytes'.  Three
+	parameters should be defined for that part: 'first', 'last' and 'total' which take
+	the values in the byte-range.  This is, of course, application-specific and similar
+	guidelines might be adopted by the parser to represent other headers.
+	*/
+
+class CHeaderFieldParam : public CBase
+	{
+public: // methods
+
+	/** Create a new header parameter that has a descriptor value. 
+		@param aParamName The name of the parameter, as a string table
+						  reference. Can be an empty string.
+		@param aVal The HTTP value of the parameter. A copy is taken when storing.
+		@return The constructed instance of CHeaderFieldParam
+	*/
+	IMPORT_C
+	static CHeaderFieldParam* NewL(RStringF aParamName, THTTPHdrVal aVal);
+
+	// Class destructor
+	virtual ~CHeaderFieldParam();
+
+	//
+	// Getters
+	//
+
+	/** Obtain the name of the parameter, e.g. q
+	    @return String table reference to the name
+	*/
+	IMPORT_C
+	RStringF Name() const;
+
+	/** Obtain the value of the parameter.  The caller must call Copy() on the returned THTTPHdrVal
+		if it is going to be stored.  This is needed in order to correctly maintain string references.
+		@return The parameter's HTTP value
+	*/
+	IMPORT_C
+	THTTPHdrVal Value() const;
+
+	//
+	// Setters
+	//
+
+	/** Change the value held in this field parameter
+		@param  The HTTP value
+	*/
+	//void SetValue(THTTPHdrVal aVal);
+
+private: // methods
+
+	/** Default constructor. 
+	*/
+	CHeaderFieldParam(RStringF aName, THTTPHdrVal aVal);
+
+private: // attributes
+
+	// A string table reference for the name of this parameter
+	RStringF iName;
+
+	// The value of this part of the header field
+	THTTPHdrVal iValue;
+	};
+
+/** Iterator class to iterate the parts contained within a header field. Requires friendship with
+	CHeaderField and as such is tightly bound to that class.
+*/
+class THeaderFieldPartIter
+	{
+public:
+	/** Construct an iterator for the parts of the supplied header.
+		@param aHeader The header whose parts we want to iterate
+	*/
+	THeaderFieldPartIter(const CHeaderField* aHeader);
+	/** Class destructor
+	*/
+
+	/** Reset iterator to point at the first part of the header
+	*/
+	IMPORT_C
+	void First();
+	/** Check if the iterator is at the end of the list. If so, further calls to
+	    operator() will return NULL.
+		@return True if the iterator has hit the end of the parts list
+	*/
+	IMPORT_C
+	TBool AtEnd();
+
+	/** Advance the iterator.
+	*/
+	IMPORT_C
+	void operator++();
+	/** Obtain the header part currently pointed at by the iterator.
+		@return The header part;  NULL if the iterator has gone off the end of the list
+	*/
+	IMPORT_C
+	const CHeaderFieldPart* operator()();
+
+private:
+
+	/** Check the iterator state for invalidity following deletions in the list
+	*/
+	void CheckInvalidation();
+
+	/** The header whose parts we are iterating.
+	*/
+	const CHeaderField* iHeader;
+
+	/** The index of the part in the header that is currently pointed at by the iterator
+	*/
+	TInt iPosIdx;
+	};
+
+/** Iterator class to iterate the parameters contained within a header part. Requires friendship with
+	CHeaderFieldPart and as such is tightly bound to that class.
+*/
+class THeaderFieldParamIter
+	{
+public:
+	/** Construct an iterator for the parameterss of the supplied header part.
+		@param aHeaderPart The header part whose parameters we want to iterate
+	*/
+	THeaderFieldParamIter(const CHeaderFieldPart* aHeaderPart);
+	/** Class destructor
+	*/
+	IMPORT_C
+	~THeaderFieldParamIter();
+
+	/** Reset iterator to point at the first part of the header
+	*/
+	IMPORT_C
+	void First();
+	/** Check if the iterator is at the end of the list. If so, further calls to
+	    operator() will return NULL.
+	*/
+	IMPORT_C
+	TBool AtEnd();
+
+	/** Advance the iterator.
+		@return True if the iterator still points at a valid parameter after advancing.
+	*/
+	IMPORT_C
+	void operator++();
+	/** Obtain the header parameter currently pointed at by the iterator.
+		@return The header parameter;  NULL if the iterator has gone off the end of the list
+	*/
+	IMPORT_C
+	const CHeaderFieldParam* operator()();
+
+private:
+
+	/** Check the iterator state for invalidity following deletions in the list
+	*/
+	void CheckInvalidation();
+
+	/** The header part whose parameters we are iterating.
+	*/
+	const CHeaderFieldPart* iHeaderPart;
+	/** The index of the parameter in the header part that is currently pointed at by the iterator
+	*/
+	TInt iPosIdx;
+	};
+
+#endif // __CHEADERFIELD_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CHeaders.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,161 @@
+// 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 __CHEADERS_H__
+#define __CHEADERS_H__
+
+#include <e32base.h>
+#include <stringpool.h>
+
+
+class CHeaderField;
+class CHeaderFieldPart;
+class CHeaderFieldParam;
+class CHeaderCodec;
+class RHTTPHeaders;
+class THTTPHdrFieldIter;
+class THTTPHdrVal;
+
+
+/** The CHeaders class provides the internal implementation of the RHTTPHeaders interface, which is
+	documented in <http.h>.  Briefly, this interface provides a unified point at which all header data
+	can	be read and written for a given request or response.  The CHeaders object is related to an
+	instance of a specific CHTTPTransactionCodec subclass, which is used to provide on-demand decoding
+	and encoding of indivual header fields.
+	@see RHTTPHeaders
+*/
+class CHeaders : public CBase
+	{
+friend class THTTPHdrFieldIter;
+public:
+ 	
+	// Factory construction, given a particular codec.  Ownership of the codec remains with the caller.
+	static CHeaders* NewL(CHeaderCodec& aCodec);
+
+ 	// Destructor. Cleans up and releases resources to the system.
+	~CHeaders();
+
+	// Creates a handle that is an abstraction of the interface
+	RHTTPHeaders Handle();
+
+public: // methods proxied from RHTTPHeaders
+
+	// Create or append a field part for the named field and assigned value
+	void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue);
+
+	// Create or append a field part with parameter, for the specified field, parameter and associated values
+	void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue,
+				   RStringF aParamName, THTTPHdrVal aParamValue);
+
+	// Create a parameter in an exisitng part
+	void SetParamL(RStringF aFieldName, RStringF aParamName,THTTPHdrVal aParamValue,  TInt aPartIdx);
+
+	// Set a named field in the header to contain the supplied OTA data. Any existing header field of
+	// this name will be lost.
+	void SetRawFieldL(RStringF aFieldName, const TDesC8& aOtaFieldData, const TDesC8& aFieldSeparator);
+
+	// Remove, entirely, the named header field from the header collection. All its parts and
+	// associated parameters (where they exist) are also removed
+	TInt RemoveField(RStringF aFieldName);
+
+	// Remove the particular part of a field. All its parameters ,where they exist, are removed. If this is the only part
+	// then the header is also removed
+	TInt RemoveFieldPartL(RStringF aFieldName, TInt aIndex);
+
+
+	// Remove all the fields in this header collection
+	void RemoveAllFields();
+
+	// Obtain the number of parts in the named header field's value, Simple headers are created with a single part
+	// following one call to SetFieldL. Subsequent calls to SetFieldL create additional parts with the field exists
+	// already
+	TInt FieldPartsL(RStringF aFieldName) const;
+
+	// Obtain the named header field's value.  Optionally, the index of a part within the field
+	// may be specified. Parts are indexed from zero
+	 TInt GetField(RStringF aFieldName, TInt aPartIdx, THTTPHdrVal& aHeaderValue) const;
+
+	// Obtain an Over-The-Air representation of the named header field's value.
+	TInt GetRawField(RStringF aFieldName, TPtrC8& aRawFieldData) const;
+
+
+	// Obtain the value of a named parameter, associated with the named header field.  An optional index to a part
+	// within the header field may be supplied, if not it is assumed that it is the first part
+	THTTPHdrVal GetParam(RStringF aFieldName, RStringF aParamName, THTTPHdrVal& aValue, TInt aPartIdx) const;
+
+	// Access the header fields via an iterator
+	THTTPHdrFieldIter Fields() const;
+
+	// Access the codec used to convert header fields between OTA and parsed format
+	CHeaderCodec& Codec() const;
+
+	static const TStringTable& Table();
+
+private:
+
+	// Structure which contains the headerfield and the associated name
+	class THeaderFieldNamePair
+		{
+	public:
+		static TInt CompareFieldNames(const THeaderFieldNamePair& aField1, const THeaderFieldNamePair& aFieldName2);
+	public:
+		RStringF iFieldName;
+		CHeaderField* iField;
+		};
+
+	
+	// Constructor; stores the supplied codec pointer
+	CHeaders(CHeaderCodec& aCodec);
+
+	// Utility to look up a given header name from the iFieldNames array and return its index.
+	TInt LocateFieldName(RStringF aHeaderName) const;
+
+	// Looks up the given header name and returns the corresponding field if it exists; if not, a new field
+	// is created and returned
+	CHeaderField& CreateOrLookupFieldL(RStringF aHeaderName);
+
+	// Obtains the indexed part of the named field
+	CHeaderFieldPart* GetFieldPartL(RStringF aFieldName, TInt aPartIdx) const;
+
+	// Obtains the index parameter of the named field's indexed part
+	CHeaderFieldParam* GetFieldParameter(RStringF aFieldName, RStringF aParamName, TInt aPartIdx) const;
+
+	// Inserts a header in the order of the name.
+	void DoInsertInNameOrderL(CHeaderField* aHeader, RStringF aHeaderName);
+
+	// Deletes all fields
+	void PurgeFields();
+	
+private:
+
+	// An array of field name pairs. Each field contains several values that is associated with a name of a field
+	RArray<THeaderFieldNamePair> iFields;
+
+	// The transaction codec associated with this header collection.
+	CHeaderCodec& iCodec;
+	};
+
+
+inline CHeaders::CHeaders(CHeaderCodec& aCodec)
+	: iCodec(aCodec)
+	{
+	}
+
+inline CHeaderCodec& CHeaders::Codec() const
+	{
+	return iCodec;
+	}
+
+#endif // CMESSAGE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CMessage.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+// 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 __CMESSAGE_H__
+#define __CMESSAGE_H__
+
+// System includes
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/framework/cheadercodec.h>
+#include <es_mbuf.h>
+#include <comms-infras/mbufchain.h>
+
+// Local includes
+#include "CHeaders.h"
+#include "rhttpheaders.h"
+
+/** Abstract base class for implementation of HTTP requests and responses
+*/
+class CMessage : public CBase
+	{
+public:
+	/** Destructor.
+		(NB Although this method has an implementation - this class must be abstract)
+	*/
+	~CMessage() = 0;
+	
+	/** Specify the body data supplier for this HTTP message.
+		@see RHTTPMessage::AddBody
+	*/
+	inline void AddBody(MHTTPDataSupplier* aBody);
+
+	/** Determine whether this HTTP message has a body or not.
+		@see RHTTPMessage::HasBody
+	*/
+	inline TBool HasBody() const;
+
+	/** Obtain this HTTP message's body data supplier.
+		@see RHTTPMessage::GetBody
+	*/
+	inline MHTTPDataSupplier* Body() const;
+	
+protected:
+
+	/** Does base class 2 phase construction
+	*/
+	inline void ConstructL(CHeaderCodec& aCodec);
+
+private:
+
+	CHeaders* 				iHeaders;
+	MHTTPDataSupplier* 		iDataSupplier;
+	
+	friend class RUPnPMessage;
+	friend class RRequest;
+	friend class RResponse;
+	};
+
+#include "CMessage.inl"
+
+
+#endif // __CMESSAGE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CMessage.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+// 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 __CMESSAGE_INL__
+#define __CMESSAGE_INL__
+
+inline void CMessage::ConstructL(CHeaderCodec& aCodec)
+	{
+	iHeaders = CHeaders::NewL(aCodec);
+	}
+
+inline void CMessage::AddBody(MHTTPDataSupplier* aBody)
+	{
+	iDataSupplier = aBody;
+	}
+
+inline TBool CMessage::HasBody() const
+	{
+	return (iDataSupplier != NULL);
+	}
+
+inline MHTTPDataSupplier* CMessage::Body() const
+	{
+	return iDataSupplier;
+	}
+
+#endif // __CMESSAGE_INL__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CRequest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,103 @@
+// 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 __CREQUEST_H__
+#define __CREQUEST_H__
+
+#include <stringpool.h>
+
+#include "rrequest.h"
+#include "CMessage.h"
+
+/** An HTTP Request.  Provides the real implementation of a request,
+	as proxied in the public API by RRequest.
+	@see RRequest
+*/
+class CRequest : public CMessage
+	{
+public:
+
+	/** Constructs a request
+	*/
+	IMPORT_C static CRequest* NewL(CHeaderCodec& aCodec, RStringPool& aStringPool);
+	/** Destructor
+	*/
+	IMPORT_C ~CRequest();
+
+	/** Returns the method
+	*/
+	const RStringF& Method() const;
+
+	/** Returns the method (as a reference so you can set it)
+	*/
+	RStringF& Method();
+
+	/** Returns the URI (as a reference so you can set it)
+	*/
+	CUri8*& URI();
+
+	/** Obtain a handle for this request that can be used by the client.
+	*/
+	inline RRequest Handle();
+
+	/** Returns the string pool.
+	*/
+	RStringPool& StringPool();
+	
+	/** Returns the string pool
+	*/
+	const RStringPool& StringPool() const;
+	
+	/** Returns ETrue if the HTTP protocol version is 1.0
+	 */
+	inline TBool IsHTTP10() const;
+	
+  	/** Returns the HTTP version (returned as a reference, which you can set)
+  	*/
+  	inline TVersion& Version();
+  	
+  	/** Resets the request object.
+  	 */
+  	inline void Reset();
+
+private:
+
+	/** Constructor
+	*/
+	CRequest(RStringPool& aStringPool);
+
+private:
+
+	/** The URI
+	*/
+	CUri8* iURI;
+
+	/** The method
+	*/
+	RStringF iMethod;
+	
+	/** The string pool
+	*/
+	RStringPool& iStringPool;
+	
+	/** The HTTP version number (major/minor) obtained from the HTTP server's response
+	*/
+	TVersion iVersion;
+	
+	};
+
+#include "CRequest.inl"
+
+#endif // __CREQUEST_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CRequest.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,71 @@
+// 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 __CREQUEST_INL__
+#define __CREQUEST_INL__
+
+inline CRequest::CRequest(RStringPool& aStringPool)
+		:iStringPool(aStringPool)
+	{
+	}
+
+inline const RStringF& CRequest::Method() const
+  	{
+  	return iMethod;
+  	}
+
+inline RStringF& CRequest::Method()
+	{
+	return iMethod;
+	}
+
+inline CUri8*& CRequest::URI()
+	{
+	return iURI;
+	}
+
+inline RRequest CRequest::Handle()
+	{
+	RRequest r;
+	r.iImplementation = this;
+	return r;
+	}
+
+inline RStringPool& CRequest::StringPool()
+	{
+	return iStringPool;
+	}
+
+inline const RStringPool& CRequest::StringPool() const
+  	{
+  	return iStringPool;
+  	}
+  
+inline TBool CRequest::IsHTTP10() const
+	{
+	return (((iVersion.iMajor == 1)&&(iVersion.iMinor == 0))?(ETrue):(EFalse));
+	}
+
+inline TVersion& CRequest::Version()
+   	{
+  	return iVersion;
+  	}
+
+inline void CRequest::Reset()
+	{
+	Handle().GetHeaderCollection().RemoveAllFields();
+	}
+
+#endif // __CREQUEST_INL__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CResponse.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,99 @@
+// 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 __CRESPONSE_H__
+#define __CRESPONSE_H__
+
+#include <stringpool.h>
+
+#include "rresponse.h"
+#include "CMessage.h"
+
+/** An HTTP Response.  Provides the real implementation of a response,
+	as proxied in the public API by RResponse.
+	@see RResponse
+*/
+class CResponse : public CMessage
+	{
+ public:
+	/** Constructs a response
+	*/
+	IMPORT_C static CResponse* NewL(CHeaderCodec& aCodec, RStringPool& aStringPool);
+
+	/** Destructor
+	*/
+	IMPORT_C ~CResponse();
+
+	/** Returns the status (returned as a reference; use this call to set it)
+	*/
+	inline TInt& Status();
+
+	/** Returns the status string (returned as a reference, which you can set)
+	*/
+	inline RStringF& StatusString();
+
+	/** Returns ETrue if the HTTP protocol version is 1.0
+	 */
+	inline TBool IsHTTP10() const;
+	
+	/** Obtain a handle for this response that can be used by the client.
+	*/
+	inline RResponse Handle();
+
+	/** Returns the string pool.
+	*/
+	RStringPool& StringPool();
+	
+	/** Returns the string pool.
+	*/
+	const RStringPool& StringPool() const;
+	
+ 	/** Returns the HTTP version (returned as a reference, which you can set)
+   	*/
+   	inline TVersion& Version();
+
+   	/** Resets the request object.
+  	 */
+  	inline void Reset();
+
+ private:
+	/** Constructor
+	*/
+	CResponse(RStringPool& aStringPool);
+	
+ private:
+
+	/** The HTTP status code obtained from the HTTP server's response
+	*/
+	TInt iStatus;
+
+	/** The HTTP status description string obtained from the HTTP server's response
+	*/
+	RStringF iStatusString;
+
+	/** The HTTP version number (major/minor) obtained from the HTTP server's response
+	*/
+	TVersion iVersion;
+	
+	/** The string pool
+	*/
+	RStringPool& iStringPool;
+
+	};
+
+#include "CResponse.inl"
+
+
+#endif // __CRESPONSE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CResponse.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,66 @@
+// 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 __CRESPONSE_INL__
+#define __CRESPONSE_INL__
+
+inline CResponse::CResponse(RStringPool& aStringPool)
+	:iStringPool(aStringPool)
+	{
+	}
+
+inline TInt& CResponse::Status()
+	{
+	return iStatus;
+	}
+
+inline RStringF& CResponse::StatusString()
+	{
+	return iStatusString;
+	}
+
+inline TBool CResponse::IsHTTP10() const
+	{
+	return (((iVersion.iMajor == 1)&&(iVersion.iMinor == 0))?(ETrue):(EFalse));
+	}
+
+inline RResponse CResponse::Handle()
+	{
+	RResponse r;
+	r.iImplementation = this;
+	return r;
+	}
+
+inline RStringPool& CResponse::StringPool()
+	{
+	return iStringPool;
+	}
+
+inline const RStringPool& CResponse::StringPool() const
+  	{
+  	return iStringPool;
+  	}
+  
+inline TVersion& CResponse::Version()
+	{
+	return iVersion;
+	}
+
+inline void CResponse::Reset()
+	{
+	Handle().GetHeaderCollection().RemoveAllFields();
+	}
+
+#endif // __CRESPONSE_INL__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnpmessagecomposer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,76 @@
+// 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 __CUPNPMESSAGECOMPOSER_H
+#define __CUPNPMESSAGECOMPOSER_H
+
+#include <e32base.h>
+#include "mhttpmessagecomposerobserver.h"
+#include "rhttpmessagecomposer.h"
+#include <comms-infras/commsdebugutility.h>
+#include <rmemchunk.h>
+
+class MComposerObserver;
+class CUPnPMessageComposer : public CActive, 
+							public MHttpMessageComposerObserver
+	{	
+	public:
+	virtual ~CUPnPMessageComposer ();	
+	IMPORT_C void NotifyNewBodyData();
+	
+	inline void DataSentFailed ();
+	
+	protected:
+	CUPnPMessageComposer (MComposerObserver& aObserver);
+	void ConstructL ();
+	
+	protected:
+	// From CActive
+	void RunL ();
+	TInt RunError ();
+	inline void DoCancel ();
+	
+	void CompleteSelf ();
+
+	// methods from MHttpMessageComposerObserver
+	//virtual void StartLineL(TPtrC8& aVersion, TPtrC8& aStatusCode, TPtrC8& aStatusText);
+	//virtual TInt NextHeaderL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue);
+	//virtual MHTTPDataSupplier* HasBodyL();
+	//virtual TInt NextTrailerL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue);
+	virtual void MessageComplete();
+	virtual void MessageDataReadyL() ;
+	virtual TInt HandleComposeError(TInt aError);
+	
+	protected:
+	RHttpMessageComposer	iMessageComposer;
+	TInt					iFieldIterPos;
+	MComposerObserver& 		iObserver;			
+	RBuf8				iDataChain;
+
+	__FLOG_DECLARATION_MEMBER;
+	};
+
+void CUPnPMessageComposer::DoCancel ()
+	{
+	// Do nothing.	
+	}
+	
+void CUPnPMessageComposer::DataSentFailed ()
+	{
+	iDataChain.Close();
+	}
+
+#endif // __CUPNPMESSAGECOMPOSER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnprequestcomposer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,76 @@
+// 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 __CUPNPREQUESTCOMPOSER_H_
+#define __CUPNPREQUESTCOMPOSER_H_
+
+// System includes
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/thttphdrfielditer.h>
+#include <comms-infras/commsdebugutility.h>
+#include <http/thttptable.h>
+
+#include "cupnpmessagecomposer.h"
+// Local includes
+#include "CRequest.h"
+#include "mhttpmessagecomposerobserver.h"
+#include "rhttpmessagecomposer.h"
+#include "mcomposerobserver.h"
+
+class CUpnpRequestComposer: public CUPnPMessageComposer
+	{
+public:
+	IMPORT_C static CUpnpRequestComposer* NewL(MComposerObserver& aObserver);
+	IMPORT_C virtual ~CUpnpRequestComposer();
+	IMPORT_C void RequestDataSent();
+	IMPORT_C void ResetComposer();
+	
+public:
+	IMPORT_C void ComposeRequest(CRequest* aRequest);
+	inline CRequest& Request();
+	
+private:
+	// methods from MHttpMessageComposerObserver
+	void StartLineL(TPtrC8& aMethod, TPtrC8& aRequestUri, TPtrC8& aVersion);
+	TInt NextHeaderL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue);
+	MHTTPDataSupplier* HasBodyL();
+	inline TInt NextTrailerL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue);
+	void MessageComplete();
+	void MessageDataReadyL();
+	TInt HandleComposeError(TInt aError);
+	
+private:
+	CUpnpRequestComposer(MComposerObserver& aObserver);
+	void ConstructL();
+	
+private:
+	CRequest*				iRequest;
+	
+	__FLOG_DECLARATION_MEMBER;
+	};
+
+CRequest& CUpnpRequestComposer::Request()
+	{
+	return (*iRequest);
+	}
+
+TInt CUpnpRequestComposer::NextTrailerL(TPtrC8& /*aHeaderName*/, TPtrC8& /*aHeaderValue*/)
+	{
+	// We do not set any trailer headers in the request.
+	return KErrNotFound;
+	}
+
+#endif /*CUPNPREQUESTCOMPOSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnprequestparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,120 @@
+// 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 __CUPNPREQUESTPARSER_H_
+#define __CUPNPREQUESTPARSER_H_
+
+// System includes
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/framework/cheadercodec.h>
+#include <comms-infras/commsdebugutility.h>
+#include <http/thttptable.h>
+#include <rmemchunk.h>
+#include <rmemcell.h>
+
+// User includes
+#include "mhttpmessageparserobserver.h"
+#include "CRequest.h"
+#include "rhttpmessageparser.h"
+#include "mparserobserver.h"
+
+
+class CUpnpRequestParser: public CBase,
+							public MHttpMessageParserObserver,
+							public MHTTPDataSupplier
+	{
+public:
+	IMPORT_C static CUpnpRequestParser* NewL(MParserObserver& aObserver);
+	IMPORT_C virtual ~CUpnpRequestParser();
+	IMPORT_C void ParseRequest(RMemChunk& aMessage, CRequest* aRequest);
+	IMPORT_C void ResetParser();
+	inline void DataFailed ();
+	
+private: 
+	// methods from MHTTPDataSupplier
+	TBool GetNextDataPart(TPtrC8& aDataPart);
+	void ReleaseData();
+	TInt OverallDataSize();
+	TInt Reset();
+
+	// methods from MHttpMessageParserObserver
+	void GetDataPacket(TPtrC8& aData);
+	void ReleaseDataPacket();
+	void StartLineL(const TDesC8& aStartLine);
+	void HeaderL(const TDesC8& aFieldName, TDesC8& aFieldValue);
+	TInt BodySizeL();
+	void BodyChunkL(const TDesC8& aData);
+	void BodyCompleteL();
+	void MessageCompleteL(const TPtrC8& aExcessData);
+	TInt HandleParserError(TInt aError);
+	
+private:
+	CUpnpRequestParser(MParserObserver& aObserver);
+	void ConstructL();
+	
+	inline TBool BodyComplete();
+	inline TBool MessageComplete();
+	inline TBool NotifyReleaseData();
+    inline TBool IsExcessData();
+
+private:
+
+	enum THttpResponseFlags
+		{
+		EBodyComplete			= 0x02,
+	    ENotifyReleaseData		= 0x10,
+		EBodyPresent			= 0x20,
+		EExcessData				= 0x40,
+		};
+
+private:
+	CRequest* 				iRequest;
+	RHttpMessageParser		iMessageParser;
+	TInt					iFlags;
+	TInt					iOverallDataSize;
+	MParserObserver& 		iObserver;
+	RArray<TPtrC8>			iBodyParts;	
+	RMemChunk				iMsgBuf;
+	RArray<TPtrC8>			iRawDataArray;
+	
+	__FLOG_DECLARATION_MEMBER;
+	};
+	
+inline TBool CUpnpRequestParser::BodyComplete()
+	{
+	return iFlags & EBodyComplete;
+	}
+
+inline TBool CUpnpRequestParser::NotifyReleaseData()
+	{
+	return iFlags & ENotifyReleaseData;
+	}
+
+inline TBool CUpnpRequestParser::IsExcessData()
+ 	{
+ 	return iFlags & EExcessData;
+ 	}
+ 	
+// Free up corrupted UDP data packet
+void CUpnpRequestParser::DataFailed ()
+	{
+	if ( !iMsgBuf.IsEmpty() )
+		{
+		iMsgBuf.Free ();
+		}
+	}
+		
+#endif /*CUPNPREQUESTPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnpresponsecomposer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,71 @@
+// 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 __CUPNPRESPONSECOMPOSER_H_
+#define __CUPNPRESPONSECOMPOSER_H_
+
+// System includes
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/thttphdrfielditer.h>
+#include <comms-infras/commsdebugutility.h>
+#include <http/thttptable.h>
+#include "cupnpmessagecomposer.h"
+
+// Local includes
+#include "mhttpmessagecomposerobserver.h"
+#include "CResponse.h"
+#include "rhttpmessagecomposer.h"
+#include "mcomposerobserver.h"
+
+class CUpnpResponseComposer: public CUPnPMessageComposer
+	{
+public:
+	IMPORT_C static CUpnpResponseComposer* NewL(MComposerObserver& aObserver);
+	IMPORT_C virtual ~CUpnpResponseComposer();
+	IMPORT_C void ResponseDataSent();
+	IMPORT_C void ResetComposer();
+
+public:
+	IMPORT_C void ComposeResponse(CResponse* aResponse);
+	
+private:
+	// methods from MHttpMessageComposerObserver
+	void StartLineL(TPtrC8& aVersion, TPtrC8& aStatusCode, TPtrC8& aStatusText);
+	TInt NextHeaderL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue);
+	MHTTPDataSupplier* HasBodyL();
+	inline TInt NextTrailerL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue);
+	void MessageComplete();
+	void MessageDataReadyL();
+	TInt HandleComposeError(TInt aError);
+	
+private:
+	CUpnpResponseComposer(MComposerObserver& aObserver);
+	void ConstructL();
+	
+private:
+	CResponse* 				iResponse;
+	HBufC8*					iStatusCodeBuf;
+
+	__FLOG_DECLARATION_MEMBER;
+	};
+	
+TInt CUpnpResponseComposer::NextTrailerL(TPtrC8& /*aHeaderName*/, TPtrC8& /*aHeaderValue*/)
+	{
+	// Response cannot contain trailer headers
+	return KErrNotFound;
+	}
+
+#endif /*CUPNPRESPONSECOMPOSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/cupnpresponseparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,130 @@
+// 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 __CUPNPRESPONSEPARSER_H_
+#define __CUPNPRESPONSEPARSER_H_
+
+// System includes
+#include <e32base.h>
+#include <http/mhttpdatasupplier.h>
+#include <http/framework/cheadercodec.h>
+#include <comms-infras/commsdebugutility.h>
+#include <http/thttptable.h>
+#include <rmemchunk.h>
+
+// User includes
+#include "mhttpmessageparserobserver.h"
+#include "CResponse.h"
+#include "rhttpmessageparser.h"
+#include "mparserobserver.h"
+
+
+class CUpnpResponseParser: public CBase,
+							public MHttpMessageParserObserver,
+							public MHTTPDataSupplier
+	{
+public:
+	IMPORT_C static CUpnpResponseParser* NewL(MParserObserver& aObserver);
+	IMPORT_C virtual ~CUpnpResponseParser();
+	IMPORT_C void ParseResponse(RMemChunk& aMessage, CResponse* aResponse);
+	IMPORT_C void ResetParser();
+	inline CResponse& Response();
+	
+private: 
+	// methods from MHTTPDataSupplier
+	TBool GetNextDataPart(TPtrC8& aDataPart);
+	void ReleaseData();
+	TInt OverallDataSize();
+	TInt Reset();
+
+	// methods from MHttpMessageParserObserver
+	void GetDataPacket(TPtrC8& aData);
+	void ReleaseDataPacket();
+	void StartLineL(const TDesC8& aStartLine);
+	void HeaderL(const TDesC8& aFieldName, TDesC8& aFieldValue);
+	TInt BodySizeL();
+	void BodyChunkL(const TDesC8& aData);
+	void BodyCompleteL();
+	void MessageCompleteL(const TPtrC8& aExcessData);
+	TInt HandleParserError(TInt aError);
+	
+private:
+	CUpnpResponseParser(MParserObserver& aObserver);
+	void ConstructL();
+
+	void ResetData();
+	inline TBool ConsumingResponse();
+	inline TBool BodyComplete();
+	inline TBool MessageComplete();
+	inline TBool GotTrailers();
+	inline TBool NotifyReleaseData();
+	inline TBool IsExcessData();
+    
+private:
+
+	enum THttpResponseFlags
+		{
+		EConsumingResponse		= 0x01,
+		EBodyComplete			= 0x02,
+		EMessageComplete		= 0x04,
+	    ENotifyReleaseData		= 0x10,
+		EBodyPresent			= 0x20,
+		EExcessData				= 0x40		
+		};
+
+private:
+	CResponse* 				iResponse;
+	RHttpMessageParser		iMessageParser;
+	TInt					iFlags;
+	TInt					iOverallDataSize;
+	MParserObserver& 		iObserver;
+	RArray<TPtrC8>			iBodyParts;	
+	RMemChunk				iMsgBuf;
+	RArray<TPtrC8>			iRawDataArray;
+	
+	__FLOG_DECLARATION_MEMBER;
+	};
+	
+inline TBool CUpnpResponseParser::ConsumingResponse()
+	{
+	return iFlags & EConsumingResponse;
+	}
+
+inline TBool CUpnpResponseParser::BodyComplete()
+	{
+	return iFlags & EBodyComplete;
+	}
+
+inline TBool CUpnpResponseParser::MessageComplete()
+	{
+	return iFlags & EMessageComplete;
+	}
+
+inline TBool CUpnpResponseParser::NotifyReleaseData()
+	{
+	return iFlags & ENotifyReleaseData;
+	}
+		
+inline CResponse& CUpnpResponseParser::Response()
+	{
+	return (*iResponse);
+	}
+	
+inline TBool CUpnpResponseParser::IsExcessData()
+	{
+	return iFlags & EExcessData;	
+	}
+
+#endif /*CUPNPRESPONSEPARSER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/mcomposerobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,55 @@
+// 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 __MCOMPOSEROBSERVER_H_
+#define __MCOMPOSEROBSERVER_H_
+
+// System includes.
+#include <e32std.h>
+
+/**
+The MComposerObserver class is the observer API for the upnp request and response composer.
+It allows the composer to notify its observer when it has message data ready to 
+send and when the message has been completed.
+*/
+class MComposerObserver
+	{	
+public:
+/**
+	Notifies the observer that there is a message data that is ready to be sent.
+	The API will be invoked by the composer after it has composed the message start line and
+	the message headers. It'll again be invoked once the message body data is ready.
+*/	
+	virtual void MessageDataReadyL(RBuf8& aData) = 0;
+
+/**
+	Signals the end of the composing activity.
+*/	
+	virtual void ComposingConcluded() = 0;
+	
+/**
+	Error notifier. The composer has experienced an error.
+	@param aError The error code. Possible error codes are:
+	KErrNoMemory - When there is insufficient memory for allocations,
+	KErrCorrupt - When the body data supplier indicated that the last data part even though it 
+				  had not supplied all the data it specified. Or the body data supplier 
+				  has supplied all the data it specified but has not indicated a 
+                  last data part.
+    KErrNotFound - When the Locate() and Find() APIs of TDesC8 fail.
+*/	
+	virtual void ComposerError(TInt aError) = 0;
+	};
+
+#endif /*MCOMPOSEROBSERVER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/mhttpmessagecomposerobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,108 @@
+// 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 __MHTTPMESSAGECOMPOSEROBSERVER_H__
+#define __MHTTPMESSAGECOMPOSEROBSERVER_H__
+
+#include <e32std.h>
+
+class MHTTPDataSupplier;
+
+class MHttpMessageComposerObserver
+/**	
+The MHttpMessageComposerObserver class is the observer API for the http 
+message composer. It allows the composer to notify its observer when it has
+http message data ready to send and when the message has been completed.
+
+Also, the composer uses this API to obtain the http message info, e.g the 
+required start-line. The observer is responsible for ensuring that the 
+supplied tokens remain valid until the composer notifies it that it has 
+completed the message.
+
+The observer is notified of any errors that occur in the composer.	
+@see		RHttpMessageComposer
+*/
+	{
+public:	// methods
+
+/**	
+	Provides the start-line tokens.
+	@param		aToken1		An output argument set to the first token.
+	@param		aToken2		An output argument set to the second token.
+	@param		aToken3		An output argument set to the third token.
+*/
+	virtual void StartLineL(TPtrC8& aToken1, TPtrC8& aToken2, TPtrC8& aToken3) =0;
+
+/**	
+	Provides the next header field tokens. The return value indicates whether
+	there is a header or not. If there is no more headers, then the output 
+	arguments are not valid and therefore should not be used.
+	@param		aHeaderName		An output argument set to the header field name.
+	@param		aHeaderValue	An output argument set to the header field value.
+	@return		A value of KErrNotFound if there are no more headers. A value 
+				of KErrNone if a header field is specified in the output 
+				arguments.
+*/
+	virtual TInt NextHeaderL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue) =0;
+
+/**
+	Request to see if there is an entity body.
+	@return		A value of NULL if there is no entity body. If there is a entity
+				body a pointer to the data supplier object that will supply the
+				entity body data is returned.
+*/
+	virtual MHTTPDataSupplier* HasBodyL() =0;
+
+/**
+	Provides the next trailer header field tokens. The return value indicates 
+	whether there is a trailer header or not. If there is no more headers, then
+	the output arguments are not valid and therefore should not be used.
+	@param		aHeaderName		An output argument set to the header field name.
+	@param		aHeaderValue	An output argument set to the header field value.
+	@return		A value of KErrNotFound if there are no more trailers. A value 
+				of KErrNone if a trailer header field is specified in the output
+				arguments.
+*/
+	virtual TInt NextTrailerL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue) =0;
+
+/**	
+	Notifies the observer that the message has been completed.
+*/
+	virtual void MessageComplete() =0;
+
+/**
+	Notifies the observer that there is message data ready to be sent.
+*/
+	virtual void MessageDataReadyL() =0;
+
+/**
+	Notifies the observer that an error has ocurred in the composer. The 
+	composer has reset itself.
+	@param		aError	The error code that has occurred.
+	@return		A value of KErrNone if the error has been handled. Any other 
+				value if the error has not been handled.
+*/
+	virtual TInt HandleComposeError(TInt aError) =0;
+
+private:	// methods
+
+/**
+	Reserved function.
+*/
+//	virtual void Reserved_MHttpMessageComposerObserver() =0;
+
+	};
+
+#endif	// __MHTTPMESSAGECOMPOSEROBSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/mhttpmessageparserobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,154 @@
+// 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 __MHTTPMESSAGEPARSEROBSERVER_H__
+#define __MHTTPMESSAGEPARSEROBSERVER_H__
+
+#include <e32std.h>
+
+class MHttpMessageParserObserver
+/**	
+The MHttpMessageParserObserver class is the observer API for the http message
+parser. It allows the parser to notify its observer when it has found http
+message components, e.g. the start-line. 
+
+Also, the parser uses this API to obtain the data buffer containg http 
+message info. The observer is responsible for ensuring that the supplied 
+buffer remains valid until the parser notifies it that it has finished with
+the data.
+@see		RHttpMessageParser
+*/
+	{
+public:	// enums
+
+	enum TEntityBodyType
+/**	
+	The TEntityBodyType enumeration specifies the types of entity body. These 
+	are used when informing the parser of the entity body size.
+*/
+		{
+		/**	The entity body is chunk-encoded.
+		*/
+		EChunked		=		-2, 
+
+		/**	The size of the entity body is not known.
+		*/
+		EUnknown		=		-1,
+
+		/**	There is no entity body or the size is zero.
+		*/
+		ENoBody			=		0
+		};
+
+public:	// methods
+
+/**	
+	Obtain current data packet. The parser requires the data packet with the
+	current http message data. The observer must ensure that the buffer remains
+	valid until the parser releases the data.
+	@param		aData	An output argument set to the buffer containing the 
+						current http message data.
+*/
+	virtual void GetDataPacket(TPtrC8& aData) =0;
+
+/**
+	Current data is no longer needed. The parser has finished with the current
+	data buffer. The observer may release that buffer.
+*/
+	virtual void ReleaseDataPacket() =0;
+
+/**
+	The message start-line. The parser has found the message start-line. The 
+	observer is responsible for parsing it further as a request or status line.
+	The parser ensures that the buffer containing the start-line remains valid
+	for the duration of the call.
+*/
+	virtual void StartLineL(const TDesC8& aStartLine) =0;
+
+/**	
+	A header has been found. The parser has found a header field. Any header
+	values that were folded onto multiple lines have been merged into a single
+	line - any LWS between header values has been replaced by a SP or HT. Any
+	leading or trailing has been removed. Although, multiple SPs or HTs between
+	tokens in the field value have not been reduced to a single SP. The parser 
+	ensures that the buffers containing the field name and value remain valid
+	for the duration of the call. The observer is also notified of trailer 
+	header fields using this API.
+	@param		aFieldName		The header field name.
+	@param		aFieldValue		The header field value.
+*/
+	virtual void HeaderL(const TDesC8& aFieldName, TDesC8& aFieldValue) =0;
+
+/**	
+	Request the size of the entity body. The parser has found the empty line that
+	indicates the end of the header fields. The observer must indicate to the
+	parser the size of entity body. The are four cases - 
+	
+		1) EChunked	- the entity is chunk-encoded.
+		2) EUnknown	- the enity body length is unknown.
+		3) ENoBody	- there is no entity body or the entity body length is zero.
+
+	The fourth case is a positive value (greater than zero) that indicates the 
+	expected number of bytes in the entity body.
+	@return		An integer value greater than zero indicating the number bytes in
+				the entity body. A value of EChunked indicates a chunked-body, 
+				EUnknown an unknown size and ENoBody indicates that there is no
+				entity body.
+*/
+	virtual TInt BodySizeL() =0;
+
+/**	
+	Entity body data. The parser has parsed entity body data. If the entity body
+	was chunk-encoded the parser has removed the encoding. The supplied buffer
+	contains just the body data and no encoding info. The parser does not do any
+	copying of entity body data. Therefore the supplied buffer remains valid 
+	until the observer releases it. The observer should not release the data 
+	until the parser has notified it that it has finished with the current data
+	packet.
+	@param		aData	The buffer containing the entity body data.
+*/
+	virtual void BodyChunkL(const TDesC8& aData) =0;
+
+/**	
+	The entity body has been parsed. The parser has parsed all of the entity 
+	body data.
+*/
+	virtual void BodyCompleteL() =0;
+
+/**
+	The message is complete. The parser has parsed the entire message. Any data
+	in the current buffer that is part of the parsed message is supplied in the
+	buffer argument. This data could be the start of the next message in the 
+	case where pipelining of requests has occurred.
+*/
+	virtual void MessageCompleteL(const TPtrC8& aExcessData) =0;
+
+/**
+	Error notifier. The parser has experienced an error. It has reset itself and
+	is no longer able to continue parsing the current message.
+	@param		aError	The error code.
+*/
+	virtual TInt HandleParserError(TInt aError) =0;
+
+private:	// methods
+
+/**	
+	Reserved function.
+*/
+//	virtual void Reserved_MHttpMessageParserObserver() =0;
+	
+	};
+
+#endif	// __MHTTPMESSAGEPARSEROBSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/mparserobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,70 @@
+// 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 __MPARSEROBSERVER_H_
+#define __MPARSEROBSERVER_H_
+
+#include <e32std.h>
+//#include <es_mbuf.h>
+#include <rmemchunk.h>
+//#include <comms-infras/mbufchain.h>
+
+/**
+The MParserObserver class is the observer API for the upnp request and response parser.
+It allows the upnp request and response parser to notify its observer when it has found the
+headers, bodydata etc.
+*/
+class MParserObserver
+	{
+public:
+/**
+	The request/response headers have been found. The observer can gain access to the headers
+	through the RHTTPHeaders class.
+*/	
+	virtual void GotHeaders() = 0;
+	
+/**
+	The body data has been found. The observer can gain access to the body through 
+	the MHTTPDataSupplier class.
+*/
+	virtual void GotBodyData() = 0;
+	
+/**
+	The parser has parsed the supplied data and is waiting for more data from the observer.
+	This API does not indicate the end of the complete request or response parsing. It only
+	indicates that the data supplied is insufficient and more data is required for complete
+	parsing.
+*/	
+	virtual void DataParsed() = 0;
+	
+/**
+	The parser has completed the parsing of a single request/response. Any exess data will be
+	supplied to the observer through the aExcessData. This data could be the start of the next 
+	message.
+	@param aExcessData The excess data within the request/response if any.
+*/	
+	virtual void ParsingComplete(RMemChunk& aExcessData) = 0;
+	
+/**
+	Error notifier. The parser has experienced an error.
+	@param aError The error code.Possible error codes are:
+	KErrNoMemory - When there is insufficient memory for allocations,
+	KErrCorrupt - If the protocol in the response is not HTTP.
+    KErrNotFound - When the Locate() and Find() APIs of TDesC8 fail.
+*/	
+	virtual void ParserError(TInt aError) = 0;
+	};
+
+#endif /*MPARSEROBSERVER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rhttpheaders.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,191 @@
+// 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	__RHTTPHEADERS_H__
+#define	__RHTTPHEADERS_H__
+
+// System includes
+#include <http/thttphdrfielditer.h>
+#include <http/thttphdrval.h>
+
+
+class RHTTPHeaders
+/** 
+The collection of headers (or more correctly, header fields)
+associated with a message. Header (fields) can be created, read and
+modified. They may be composed of several parts (by repeated
+invocations of API methods, see below) and may be assigned one or
+more parameters.  Individual field parts and parameters take
+values described using THTTPHdrVal.
+@publishedAll
+@released
+@see RHTTPMessage
+@see THTTPHdrVal
+*/
+	{
+ public:
+	/** Default constructor
+	*/
+	inline RHTTPHeaders();
+
+	/**Getter methods
+		Methods for reading data.
+	*/
+	//@{
+	/** Obtain the number of parts in the named header field's value,
+		Simple headers are created with a single part following one
+		call to SetFieldL. Subsequent calls to SetFieldL create
+		additional parts if the field exists already.
+		@leave KErrNoMemory
+		@param aFieldName The header name
+		@return The number of parts, or zero if the field does not exist.  */
+	IMPORT_C TInt FieldPartsL(RStringF aFieldName) const;
+
+	/** Obtain the named header field's value. The index
+		of a part within the field must be specified. Parts are indexed
+		from 0 and fields with only one part return the entire field for index 0
+		@param aFieldName The header name
+		@param aPartIdx The index of the part
+		@param aHeaderValue The header field value
+		@return An error condition. Returns KErrNotFound if there is not  a field with the 
+				specifed field name
+	*/
+	IMPORT_C TInt GetField(RStringF aFieldName, 
+								  TInt aPartIdx, THTTPHdrVal& aHeaderValue) const;
+
+	/** Obtain an Raw representation of the named header
+		field's value.  Note that general client use of this method is
+		strongly discouraged since it exposes the Raw representation of particular headers.  
+		However it may be needed for some cases where received headers could not be
+		decoded by HTTP.  It will normally be used internally when
+		preparing header data to be transmitted with a request.
+		@param aFieldName The field name, e.g, 'Content-Type'
+		@param aRawFieldData The field's data content, in an appropriate Raw form 
+		@return An error condition. Returns KErrNotFound if there is not  a field with the 
+				specifed field name
+	*/
+	IMPORT_C TInt GetRawField(RStringF aFieldName, 
+							   TPtrC8& aRawFieldData) const;
+
+	/** Obtain the value of a named parameter, associated with the
+		named header field.  An optional index to a part within the
+		header field may be supplied, if not it is assumed that it is
+		the first part.
+		@param aFieldName The header name
+		@param aParamName The parameter name
+		@param aReturn The returned value. Note that this
+		must be Copy()d by the caller, if it wants to keep the value.
+		@param aPartIdx The optional index of the part
+		@return An error condition. Returns KErrNotFound if there is not  a field with the 
+				specifed field name  */
+	IMPORT_C TInt GetParam(RStringF aFieldName, 
+								  RStringF aParamName, 
+								  THTTPHdrVal& aReturn,
+								  TInt aPartIdx = 0) const;
+
+	/** Access the fields within this header collection, via an
+		iterator.  Each application of the iterator returns the name
+		of the next field type.  This may then be accessed via
+		RHTTPHeaders methods.
+		@return The iterator.  */
+	IMPORT_C THTTPHdrFieldIter Fields() const;
+	//@}
+
+	/** Setter Methods
+		Methods for writing data.
+	*/
+	//@{
+	/** Set a named field in the header.  On the first instance that
+		this API method is used for a given field name, the first will
+		be created.  On subsequent calls, the same field will be
+		extended to have several parts, with a new part created to
+		hold the supplied value.
+		@param aFieldName The field name, e.g, 'Content-Type'
+		@param aFieldValue The field value, e.g. 'text/html' */
+	IMPORT_C void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue);
+
+	/** Set a named field in the header, and associate with it the
+		supplied parameter. If the field doesn't already exist it will
+		be created along with a parameter; if it does exist, then a
+		new part will be created along with the parameter.
+		@param aFieldName The field name, e.g. 'Accept'
+		@param aFieldValue The field value. e.g. 'text/plain'
+		@param aParamName The parameter name, e.g. 'q'
+		@param aParamValue The parameter value, e.g. '0.3' */
+	IMPORT_C void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue,
+							RStringF aParamName, THTTPHdrVal aParamValue);
+
+	/** Set a parameter in an existing header. 
+		@param aFieldName The field name, e.g. 'Accept'
+		@param aPartIdx The part of the header to add the parameter to
+		@param aParamName The parameter name, e.g. 'q'
+		@param aParamValue The parameter value, e.g. '0.3'
+		@leave KErrNotFoud if the field, or the part within the field doesn't exist
+	*/
+	IMPORT_C void SetParamL(RStringF aFieldName, RStringF aParamName, THTTPHdrVal aParamValue, TInt aPartIdx);
+
+	/** Set a named field in the header to contain the supplied Raw header
+		data. If the header already exists then a LF and the new data will be added to the existing data. This is used to
+		indicate that there are multiple instances of this header
+
+
+		Note that general client use of this method is strongly
+		discouraged since it exposes the raw representation of particular headers.  
+		However it may be needed for some cases where headers to be transmitted have no encoding known
+		to HTTP.  It will normally be used internally when receiving data from a service provider.
+		@param aFieldName The field name, e.g, 'Content-Type'
+		@param aRawFieldData The field's data content, in a raw form
+		@param aFieldSeparator The header field separator
+	*/
+	IMPORT_C void SetRawFieldL(RStringF aFieldName, 
+							   const TDesC8& aRawFieldData,
+							   const TDesC8& aFieldSeparator);
+
+	/** Remove, entirely, the named header field from the header
+		collection. All its parts and associated parameters (where
+		they exist) are also removed.
+		@param aFieldName The field name.
+		@return KErrNone if the removal is successful; KErrNotFound if
+		the field didn't exist within the headers.  */
+	IMPORT_C TInt RemoveField(RStringF aFieldName);
+
+	/** Remove a single part of a header field. Just the part and any associated paramters are removed. If this 
+		results in no parts being present in the header then it will also be removed
+		@param aFieldName The header name
+		@param aIndex The particular part of the field to be removed
+		@return KErrNone if the removal is sucessful; KErrNotFound if the header didn't exist. No exception is raised if 
+		the particular value is not found as part of that header */
+	IMPORT_C TInt RemoveFieldPart(RStringF aFieldName, TInt aIndex);
+
+	/** Remove all the fields of this header collection
+	*/
+	IMPORT_C void RemoveAllFields();
+
+	//@}
+
+
+private:
+	friend class CHeaders;
+	CHeaders* iImplementation;
+	};
+
+
+inline RHTTPHeaders::RHTTPHeaders()
+		: iImplementation(NULL)
+	{
+	}
+
+
+#endif  // __RHTTPHEADERS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rhttpmessagecomposer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,172 @@
+// 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 __RHTTPMESSAGECOMPOSER_H__
+#define __RHTTPMESSAGECOMPOSER_H__
+
+#include <e32std.h>
+
+class CHttpMessageComposer;
+class MHttpMessageComposerObserver;
+
+class RHttpMessageComposer
+/**	
+The RHttpMessageComposer class provides functionality for creating HTTP/1.1 
+messages as defined in RFC2616. The HTTP/1.1 protocol specifies that the CR
+LF sequence is the end of line (eol) marker for all protocol elements except
+the entity-body.
+
+The composer does not process any header fields or start-line tokens. 
+Therefore it needs to be told if headers and/or an entity body is expected. 
+If the message does contain an entity body and the body data is streamed the
+composer will apply the chunked transfer encoding to the entity body.
+
+The composer needs an observer (MHttpMessageComposerObserver). The observer 
+supplies the message info such as the start-line tokens, header field tokens
+and other message info. An MHTTPDataSupplier object is used to supply the 
+entity body data if there is one. The observer must ensure that the 
+descriptors containing the tokens it supplies remain valid until the composer
+notifies it that the message is complete.
+
+The composer is initially in the Idle state waiting to be notified of 
+available message info. When it is notified, the composer moves into the 
+CreatingStartLine state.
+
+In the CreatingStartLine state the composer obtains the start-line tokens 
+from the observer. These are added to the current data buffer. The composer
+asks its observer if the message has any headers. If there are headers the 
+composer moves to the CreatingHeaders state otherwise it moves to the
+CreatingEndOfHeaders state.
+
+In the CreatingHeaders state the composer adds header fields to the current
+data buffer. The observer provides the header field tokens for the field name
+and field value. The composer will not fold header field values onto multiple
+lines unless the provided field token already contains folded field values.
+The observer also informs the composer if the provided field info is for the
+last header field. If this is the case the composer moves into the 
+CreatingEndOfHeaders state, otherwise it remains in the CreatingHeaders state.
+
+In the CreatingEndOfHeaders state the composer adds an empty line to the 
+current data buffer to mark the end of the header fields section. The current
+data buffer is ready to be sent and the composer informs its observer of this.
+The composer moves into the PendingEntityBody and waits for the observer to
+notify it that it has finished with the current data buffer.
+
+In the PendingEntityBody state the releases the current data buffer. It then
+asks its observer if the message has an entity body. If there is no entity 
+body or if it is zero length then the composer moves to PendingIdle state. 
+If there is an entity body and the size is known the composer moves to the 
+SendEntityData state. If the entity body size is unknown, implying streamed
+entity body data, the composer moves to the CreatingChunkSize state.
+
+In the SendEntityBody state the composer gets the next entity body data part
+from the data supplier for the entity body. It sets this data as the current
+send buffer and notifies the observer that message data is ready. A check is
+made to see that if the data supplier claims that this is the last data part 
+that all the specified amount of entity body data has been sent. If this is 
+not true the observer will receive an error code of KErrCorrupt. The composer
+moves to PendingReleaseData state and waits for the observer to notify it 
+that it has finished with the current data buffer.
+
+In the PendingReleaseData state the composer notifies the entity body data
+supplier that it has finished with the current data part. If all the 
+specified entity body data has been sent the composer moves to the 
+PendingIdle state. If there is more entity body data to send the composer
+moves to the SendEntityData and waits for the observer to notify it that 
+there is more message info available.
+
+In the CreatingChunkSize state the composer adds the size of the following
+chunk-data component to the current send buffer as defined in RFC2616 
+section 3.6.1. The send buffer wil contain the empty line delimiting the 
+previous chunk-data component if this is not the first chunk-size component
+to be sent. The composer notifies its observer that message data is ready. 
+The composer moves into the SendChunkData state and waits for the observer 
+to notify it that it has finished with the current data buffer.
+
+If the chunk-data is zero-length then the chunk-size component is not added
+to the send buffer.	
+
+In the SendChunkData state the composer releases the current data buffer. It
+then gets the chunk-data from the data supplier for the entity body. It sets
+this data as the current buffer. The observer is only notified that message 
+data is ready if the chunk-data is not zer-length. The composer moves into 
+the PendingReleaseChunk state and waits for the observer to notify it that 
+it has finished with the current data buffer.
+
+In the PendingReleaseChunk state the composer notifies the entity body data
+supplier that it has finished with the current data part. If that was the 
+last part of the entity body data the composer adds the last-chunk component
+to the current data buffer. It then asks the observer if the message has any 
+trailer headers. If there are trailer headers then the composer moves to the 
+CreatingTrailers state. Otherwise the composer moves to the 
+CreatingEndOfTrailers state. 
+
+If there is more entity body data to follow the composer moves to the 
+CreatingChunkSize state and waits for the observer to notify it that there is 
+more message info available.
+
+In the CreatingTrailers state the composer adds trailer header fields to the 
+current data buffer. The observer provides the trailer header field tokens 
+for the field name and field value. The composer will not fold header field 
+values onto multiple lines unless the provided field token already contains 
+folded field values. The observer also informs the composer if the provided 
+field info is for the last trailer header field. If this is the case the 
+composer moves into the CreatingEndOfTrailers state, otherwise it remains in 
+the CreatingTrailers state.
+
+In the CreatingEndOfTrailers state the composer adds an empty line to the 
+current data buffer to mark the end of the trailer header fields section. 
+The current data buffer is ready to be sent and the composer informs its 
+bserver of this. The composer moves into the PendingEndOfChunkedBody and 
+waits for the observer to notify it that it has finished with the current 
+data buffer.
+
+In the PendingEndOfChunkedBody the composer releases the current data buffer
+and moves into the PendingIdle state. 
+
+In the PendingIdle state the composer informs its observer that the message
+is complete. The composer moves to the Idle state.
+@see		MHttpMessageComposerObserver
+*/
+	{
+public:	// methods
+
+	inline RHttpMessageComposer();
+
+	IMPORT_C void OpenL(MHttpMessageComposerObserver& aObserver);
+	IMPORT_C void Close();
+	IMPORT_C void MessageInfoAvailable();
+	IMPORT_C void GetMessageData(TPtrC8& aData);
+	IMPORT_C void ReleaseMessageData();
+	IMPORT_C void Reset();
+	IMPORT_C TBool CheckMessagePendingComplete();
+
+private:	// methods
+
+	IMPORT_C void Reserved_RHttpMessageComposer();
+
+private:	// attributes
+
+	CHttpMessageComposer*	iImplementation;
+
+	};
+
+inline RHttpMessageComposer::RHttpMessageComposer()
+: iImplementation(NULL)
+	{
+	}
+
+#endif	// __RHTTPMESSAGECOMPOSER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rhttpmessageparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,147 @@
+// 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 __RHTTPMESSAGEPARSER_H__
+#define __RHTTPMESSAGEPARSER_H__
+
+#include <e32base.h>
+
+class CHttpMessageParser;
+class MHttpMessageParserObserver;
+
+class RHttpMessageParser
+/**
+The RHttpMessageParser class provides parsing functionality for HTTP/1.1 
+messages as defined in RFC2616. The HTTP/1.1 protocol specifies that the CR
+LF sequence is the end of line (eol) marker for all protocol elements except
+the entity-body. The parser tolerates some deviation from this, as the RFC
+recommends in section 19.3 - a LF without the leading CR can also be parsed
+as an eol marker.
+
+The parser does not process any header fields. Therefore it needs to be told
+if an entity body is expected. If one is then the parser needs to know if it
+is chunk-encoded and if not what the expected size is.
+
+With a chunked entity body the parser de-chunks the body data - the observer
+does not need to parse a chunked body.
+
+The parser needs an observer (MHttpMessageParserObserver). The observer 
+supplies the buffers containing the unparsed http message data. The observer
+must ensure that the buffers it supplies to the parser remain valid until the
+parser notifies it that it has parsed the entire contents of that buffer.
+
+The parser is initially in the Idle state waiting to be notified of available
+meesage data. When it is notified, the parser obtains the data and moves
+into the ParsingStartLine state.
+
+Whichever state it is in, the parser will notify the observer when it has
+parsed the entire contents of the current data buffer. It will then wait to
+be told that there is more data available. When it has been given the next 
+part of the message data it continues parsing.
+
+In the ParsingStartLine state the parser looks for the first eol marker. 
+This delimits the start-line. Once found the observer is notified and the
+parser moves into the ParsingHeaders state.
+
+In the ParsingHeaders state the parser searches for header field lines. 
+These lines are delimited by eol markers. In HTTP/1.1 it is possible to fold
+header field values over multiple lines if the continuation line is followed
+by a SP or HT. In this case the eol marker is part of LWS and is ignored. 
+Also any eol markers that are part of LWS are omitted from the header field
+data given to the observer.
+
+The header field section is completed once an empty line is parsed. The
+observer is informed and it should supply the parser with the necessary
+info about the entity body. If no entity body is expected then the parser 
+moves to the MessageComplete state. If a non-encoded entity body is expected
+then the parser moves to the ReadingBodyData state. If a chunk-encoded 
+entity body is expected then the parser moves to the ParsingChunkSize state.
+
+In the ReadingBodyData state the parser extracts the specified length of 
+entity body data. The observer is notified of each chunk body data parsed. 
+It is possible for the entity body data to be received in several parts due
+to segmentation at the transport layer, Once all the entity body data has 
+been received the parser notifies the observer that the entity body is 
+complete. The parser moves to MessageComplete state.
+
+Note that although the parser will have notified the obserer that it has 
+finished with the current data packet that held some entity body data, the
+observer should only release that data packet once it itself has no more use
+for the entity body data it has been given. Failure to do this will result
+in the buffer containing the received entity body chunks being invalid. The
+same is true when receiving a chunked entity body.
+
+In the ParsingChunkSize the parser searches for a chunk-size component as 
+defined in RFC2616 section 3.6.1. The chunk-size component is delimited by
+an eol marker. An optional chunk-extension component can be present between
+the chunk-size and the eol marker - the parser will ignore any 
+chunk-extension components. The chunk-size is a hex number specifying the 
+size of the subsequent chunk-data component. A chunk-size of value zero 
+indicates a last-chunk token - there are no subsequent chunk-data components
+and the parser moves to the ParsingTrailerHeaders state. A chunk-size of any
+other value indicates a subsequent chunk-data component and the parser moves
+to the ParsingChunkData state.
+
+In the ParsingChunkData state the parser extracts the length of entity body
+data specified in the preceeding chunk-size component. The observer is 
+notified of each chunk of entity body data. Note that a chunk-data component
+can be segmented in the transport layer resulting in the observer being 
+notified more than once for a given chunk-data component. The observer will
+not notice any disparate behaviour between receiving an entity body that has 
+not been chunk-encoded and one that has. Once the entire chunk-data has been 
+received the parser moves to the ParsingChunkSize state.
+
+The ParsingTrailerHeaders state is very similar to the ParsingHeaders state.
+The observer is notified of each header field and the trailer headers 
+section is delimited by an empty line. The observer is notified of the end
+of the trailer headers section and the parser moves to MessageComplete state.
+
+In the MessageComplete state the parser notifies the observer that the
+message is complete. The observer is presented with any remaining data in 
+the current data packet. This can be either excess data indicating a mal-
+formed message or the start of a pipelined message. In either case if the 
+observer wishes to use that data it must not release the current data packet
+as that will invalidate the data.
+@see		MHttpMessageParserObserver
+*/
+	{
+public:	// methods
+
+	inline RHttpMessageParser();
+
+	IMPORT_C void OpenL(MHttpMessageParserObserver& aObserver);
+	IMPORT_C void Close();
+	IMPORT_C void ReceivedMessageData();
+	IMPORT_C void CompletedBodyDataL();
+	IMPORT_C void Reset();
+	IMPORT_C void Flush ();
+	IMPORT_C TBool CompleteMessage ( const TDesC8& aData );
+
+private:	// methods
+
+	IMPORT_C void Reserved_RHttpMessageParser();
+
+private:	// attributes
+
+	CHttpMessageParser*		iImplementation;
+
+	};
+
+inline RHttpMessageParser::RHttpMessageParser()
+: iImplementation(NULL)
+	{
+	}
+	
+#endif // __RHTTPMESSAGEPARSER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rrequest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,70 @@
+// 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 __RRequest_H__
+#define __RRequest_H__ 
+
+// System includes
+#include <uri8.h>
+#include <stringpool.h>
+
+// Local includes
+#include "rupnpmessage.h"
+
+class RRequest : public RUPnPMessage
+/** 
+An HTTP Request.  This class extends the abstract HTTP Message to add an HTTP
+method to be invoked on the resource at the remote HTTP server, and the URL that
+identifies that resource.
+@publishedAll
+@released
+*/
+	{
+ public:
+	/** Get Methods
+		Methods for reading information from the response.
+	*/
+	//@{
+	// Gets the method name
+	// @return The method to be used in the HTTP request.
+	IMPORT_C RStringF Method() const;
+	// Gets the URI
+	// @return The URI to be used in the HTTP request.
+	IMPORT_C const TUriC8& URI() const;
+	/**
+		Returns ETrue version of HTTP used by the server is 1.0
+	*/
+	IMPORT_C TBool IsHTTP10() const;
+	//@}
+	/**Set Methods
+		
+		Methods for setting information. These methods will not be of
+		use to the client; they are intended for the use of advanced
+		filters
+	*/
+	//@{
+	// Sets the method name
+	// @param aMethod The method name to be used in the HTTP request.
+	IMPORT_C void  SetMethod(RStringF aMethod);
+	// Sets the URI
+	// @param aURI The URI to be used in the HTTP request.
+	IMPORT_C void SetURIL(const TUriC8& aURI);
+	// Sets the HTTP version
+	IMPORT_C void SetVersion(TVersion aVersion);
+	//@}
+	friend class CRequest;
+	};
+
+#endif //	__RRequest_H__  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rresponse.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,75 @@
+// 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:
+// This file contains Rose Model ID comments - please do not delete
+// 
+//
+
+#ifndef __RResponse_H__
+#define __RResponse_H__
+
+// System includes
+#include <e32std.h>
+#include <stringpool.h>
+
+// Local includes
+#include "rupnpmessage.h"
+
+
+class RResponse : public RUPnPMessage
+/** 
+An HTTP Response.  This class extends the abstract HTTP Message to add an HTTP
+version, a status code and status text.
+@publishedAll
+@released
+*/
+	{
+public:
+	/**Get Methods
+		Methods for reading information from the response.
+	*/
+	//@{
+	/** 
+		Returns the status code
+	*/
+	IMPORT_C TInt StatusCode() const;
+	/** Returns the status text, that is the text after the number on
+        the first line of the response. */
+	IMPORT_C RStringF StatusText() const;
+	/**
+		Returns ETrue version of HTTP used by the server is 1.0
+	*/
+	IMPORT_C TBool IsHTTP10() const;
+	//@}
+	/** Set Methods 
+
+		Methods for setting information. These methods will not be of
+		use to the client; they are intended for the use of advanced
+		filters
+	*/
+	//@{
+	/** Sets the status code.
+	 */
+	IMPORT_C void SetStatusCode(TInt aStatus);
+	// Sets the status string
+	IMPORT_C void SetStatusText(RStringF aStatusString);
+	// Sets the HTTP version
+	IMPORT_C void SetVersion(TVersion aVersion);
+	//@}
+
+	friend class CResponse;
+	};
+
+
+
+#endif // __RResponse_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/rupnpmessage.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,80 @@
+// 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:
+// RHTTPMessage.h
+// 
+//
+
+#ifndef __RHTTPMESSAGE_H__
+#define __RHTTPMESSAGE_H__
+
+// Forward declarations
+class RHTTPHeaders;
+class MHTTPDataSupplier;
+class CMessage;
+
+
+class RUPnPMessage 
+/** 
+An abstract HTTP message. In RFC2616, an HTTP message is defined as having a
+header and an optional body.  This class is specialised for HTTP requests and
+responses.
+@publishedAll
+@released
+*/
+	{
+ public:
+	// Default (uninitialised) constructor.
+	inline RUPnPMessage();
+
+	/** Returns the header collection for the message */
+	IMPORT_C RHTTPHeaders GetHeaderCollection();
+
+	/** Sets the messages body, replacing any existing body. The body
+        is supplied as a MHTTPDataSupplier, which will then return the
+        data in 1 or more chunks on request.  
+		@param aBody The data supplier that will supply the body.  */
+	IMPORT_C void SetBody(MHTTPDataSupplier& aBody);
+
+	/** Removes the body */
+	IMPORT_C void RemoveBody();
+
+	/** Determine whether this message has any associated body data.
+		@return ETrue if there is some body data, EFalse if not.
+	*/
+	IMPORT_C TBool HasBody() const;
+
+	/** Gets the body. The body is supplied as a MHTTPDataSupplier,
+        which can be used to return the current data chunk, and to
+        acknowledge when that chunk has been consumed by the client.
+
+		Note that the client can assume the body object will remain
+		unchanged from when it receives the first data until the end
+		of the transaction.
+
+		@return A data supplier that provides access to a body
+		data chunk. NULL if the body has not been set, or has been removed */
+	IMPORT_C MHTTPDataSupplier* Body() const;
+
+ protected:
+	CMessage* iImplementation;
+};
+
+
+inline RUPnPMessage::RUPnPMessage()
+		: iImplementation(NULL)
+	{
+	};
+
+
+#endif // __RUPnPMessage_H__ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/tupnpmessagepanic.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+// 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 __TUPNPMESSAGEPANIC_H_
+#define __TUPNPMESSAGEPANIC_H_
+
+#include <e32std.h>
+
+class TUPnPMessagePanic
+	{
+public:
+	
+	enum TUPnPMessagePanicCode
+		{
+		EHeaderInvalidType			= 0,
+		EHeaderFieldMissing			= 1,
+		EMissingRequest				= 2,
+		EMissingResponse			= 3,
+		ENoBodyPartInDataSupplier	= 4,
+		ENoMessage					= 5
+		};
+	
+	static void Panic (TUPnPMessagePanicCode aPanic);	
+	};
+
+#endif /*TUPNPMESSAGEPANIC_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CHeaderField.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,676 @@
+// 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:
+//
+
+// System includes
+#include <e32std.h>
+#include <http/framework/cheadercodec.h>
+
+// Local includes
+#include "CHeaders.h"
+#include "CHeaderField.h"
+
+
+CHeaderField* CHeaderField::NewL(RStringF aHeaderFieldName, CHeaders& aOwner)
+	{
+	return new(ELeave)CHeaderField(aHeaderFieldName, aOwner);
+	}
+
+/*
+CHeaderField* CHeaderField::NewL(RStringF aHeaderFieldName, CHeaders& aOwner, THTTPHdrVal aVal)
+	{
+	CHeaderField* me = new(ELeave)CHeaderField(aHeaderFieldName, aOwner);
+	CleanupStack::PushL(me);
+	CHeaderFieldPart* part = CHeaderFieldPart::NewL(aVal);
+	CleanupStack::PushL(part);
+	me->AddPartL(part);
+	CleanupStack::Pop(2);
+	return me;
+	}
+*/
+
+CHeaderField* CHeaderField::NewL(RStringF aHeaderFieldName, CHeaders& aOwner, const TDesC8& aRawData)
+	{
+	CHeaderField* me = new(ELeave)CHeaderField(aHeaderFieldName, aOwner);
+	CleanupStack::PushL(me);
+	me->ConstructL(aRawData);
+	CleanupStack::Pop(me);
+	return me;
+	}
+
+
+/** D'tor
+*/
+
+CHeaderField::~CHeaderField()
+	{
+	iName.Close();
+	ClearParsedData();
+	ClearRawData();
+	}
+
+
+/** Getter's
+*/
+/*
+RStringF CHeaderField::Name() const
+	{
+	return iName;
+	}
+*/
+
+TInt CHeaderField::NumPartsL()
+	{
+	// Convert, if necessary, to the parsed format
+	ConvertToParsedFormatL();
+
+	// Check the array exists first
+	return iParts.Count();
+	}
+
+
+THeaderFieldPartIter CHeaderField::PartsL()
+	{
+	// Convert, if necessary, to the parsed format
+	ConvertToParsedFormatL();
+
+	// create an iterator initialised for this header
+	return THeaderFieldPartIter(this);
+	}
+
+
+CHeaderFieldPart* CHeaderField::PartL(TInt aIndex)
+	{
+	// Convert, if necessary, to the parsed format
+	ConvertToParsedFormatL();
+
+	// Check the part is in range, if so return it
+	if (aIndex < NumPartsL())
+		return iParts[aIndex];
+	else
+		return NULL;
+	}
+
+EXPORT_C
+void CHeaderField::RawDataL(TPtrC8& aRawData)
+	{
+	ConvertToRawFormatL();
+	aRawData.Set(*iRawData);
+	}
+
+
+/** Setters
+*/
+/*
+void CHeaderField::SetPartL(CHeaderFieldPart* aPart, TInt aIndex)
+	{
+	if (aIndex < iParts.Count())
+		{
+		CHeaderFieldPart* oldPart = iParts[aIndex];
+		iParts[aIndex] = aPart;
+		delete oldPart;
+		}
+	else
+		User::LeaveIfError(iParts.Append(aPart));
+	}
+*/
+void CHeaderField::BeginRawDataL(TInt aChunkSize)
+	{
+	iRawChunkSize = aChunkSize;
+
+	// clear out any existing Raw data, but don't reallocate if not needed
+	if (!iRawData)
+		iRawData = HBufC8::NewL(iRawChunkSize);
+	else
+		{
+		TPtr8 rawPtr = iRawData->Des();
+		rawPtr.Zero();
+		}
+	}
+
+
+void CHeaderField::WriteRawDataL(const TDesC8& aData)
+	{
+    // Check to see if the buffer needs to grow
+	TInt maxLength  = iRawData->Des().MaxLength();
+	TInt reqdLength = iRawData->Length() + aData.Length();
+	if (reqdLength > maxLength)
+		{
+		// Yes - allocate a new buffer of a larger size, and copy the contents
+		// of the old one over. This may need more than one extra chunk. Check
+		// for partial chunks - add an extra one if necessary.
+		TInt numChunksReqd = (reqdLength - maxLength)/iRawChunkSize;
+		 if ( (reqdLength - maxLength)%iRawChunkSize > 0)
+			++numChunksReqd;
+		HBufC8* largerBuffer = iRawData->ReAllocL(maxLength + iRawChunkSize*numChunksReqd);
+
+		// Switch buffers. The old one was removed by ReAlloc.
+		iRawData = largerBuffer;
+		}
+
+	// Can now append confidently
+	iRawData->Des().Append(aData);
+	}
+
+/*
+void CHeaderField::WriteRawDataL(TChar aData)
+	{
+	// Check to see if the buffer descriptor needs to grow
+	TInt maxLength  = iRawData->Des().MaxLength();
+	TInt reqdLength = iRawData->Length() + 1;
+	if (reqdLength > maxLength)
+		{
+		// Yes - allocate a new buffer of a larger size, and copy the contents
+		// of the old one over. Since a single character is being added, one
+		// chunk will be enough.
+		HBufC8* largerBuffer = iRawData->ReAllocL(maxLength + iRawChunkSize);
+
+		// Switch buffers. The old one was removed by ReAlloc.
+		iRawData = largerBuffer;
+		}
+
+	// Can now append confidently
+	iRawData->Des().Append(aData);
+	}
+*/
+
+void CHeaderField::CommitRawData()
+	{
+	// Change state and remove the parsed form of the header data
+	iDataParseState = EDataInRawForm;
+	ClearParsedData();
+	}
+
+
+void CHeaderField::AddPartL(CHeaderFieldPart* aPart)
+	{
+	// Convert, if necessary, to the parsed format
+	ConvertToParsedFormatL();
+
+	// Append the item
+	User::LeaveIfError(iParts.Append(aPart));
+	}
+
+/*
+void CHeaderField::InsertPartL(CHeaderFieldPart* aPart, TInt aIndex)
+	{
+	// Convert, if necessary, to the parsed format
+	ConvertToParsedFormatL();
+
+	// If the array isn't yet constructed, or is empty, then use 'AddPart'
+	if (!NumPartsL()) 
+		AddPartL(aPart);
+	else
+		User::LeaveIfError(iParts.Insert(aPart, aIndex));
+	}
+*/
+/*
+TInt CHeaderField::RemovePartL(CHeaderFieldPart* aPart)
+	{
+	// Convert, if necessary, to the parsed format
+	ConvertToParsedFormatL();
+
+	// Sanity check - if no parts, then the part can't be removed...
+	if (iParts.Count() == 0)
+		return KErrNotFound;
+
+	// Find the part.  
+	TInt idx = iParts.Find(aPart);
+
+	// Now remove by index
+	iParts.Remove(idx);
+	iParts.Compress();
+	delete aPart;
+	return KErrNone;
+	}
+*/
+
+TInt CHeaderField::RemovePartL(TInt aIndex)
+	{
+	// Convert, if necessary, to the parsed format
+	ConvertToParsedFormatL();
+
+	// Sanity check - if no array exists or if the index supplied is out of the bounds
+	// of the array, then the part can't be removed...
+	if ((aIndex < 0) || (aIndex >= NumPartsL()))
+		return KErrNotFound;
+
+	// Note that the array doesn't actually delete the part itself. Also the array must be
+	// compressed to close the 'gap' left by the deleted part
+	CHeaderFieldPart* part = PartL(aIndex);
+	iParts.Remove(aIndex);
+	iParts.Compress();
+	delete part;
+	return KErrNone;
+	}
+
+
+/** Constructors and second-phase construction
+*/
+
+void CHeaderField::ConvertToRawFormatL()
+	{
+	if (iDataParseState != EDataParsedOK)
+		return;
+	RHeaderField rf(*this);
+	// State change and removal of parsed data  is done when the Raw data is committed by the codec when it is encoded
+	iCodec.EncodeHeaderL(rf);
+	}
+
+void CHeaderField::ConvertToParsedFormatL()
+	{
+	if (iDataParseState != EDataInRawForm)
+		return;
+	RHeaderField rf(*this);
+	iCodec.DecodeHeaderL(rf);
+
+	// If we haven't left, then it must have succeeded. Change state and remove the Raw data
+	iDataParseState = EDataParsedOK;
+	ClearRawData();
+	}
+
+CHeaderField::CHeaderField(RStringF aHeaderFieldName, CHeaders& aOwner)
+	: iDataParseState(ENoDataSupplied), iOwner(&aOwner), iCodec(aOwner.Codec())
+	{
+	// Ensure that we maintain string references correctly with the header field name
+	iName = aHeaderFieldName.Copy();
+	iDataParseState = EDataParsedOK;
+	}
+
+void CHeaderField::ConstructL(const TDesC8& aRawData)
+	{
+	// Copy the data.  Set the state.
+	iRawData = aRawData.AllocL();
+	iDataParseState = EDataInRawForm;
+	}
+
+void CHeaderField::ClearParsedData()
+	{
+	// Clear and destroy parts array and its contents
+	iParts.ResetAndDestroy();
+	}
+
+void CHeaderField::ClearRawData()
+	{
+	// Destroy any Raw data
+	delete iRawData;
+	iRawData = NULL;
+	}
+
+
+/** Implementation of CHeaderFieldPart class *************************************************
+*/
+
+/** Factory methods
+*/
+
+EXPORT_C
+CHeaderFieldPart* CHeaderFieldPart::NewL(THTTPHdrVal aVal)
+	{
+	return new(ELeave)CHeaderFieldPart(aVal);
+	}
+
+
+/** D'tor
+*/
+
+CHeaderFieldPart::~CHeaderFieldPart()
+	{
+	// Remove the parameter list.  Parent class clears the part value.
+	iParams.ResetAndDestroy();
+
+	// If the part's value is a string, then it must be closed.
+	if (iValue.Type() == THTTPHdrVal::KStrFVal)
+		iValue.StrF().Close();
+	if (iValue.Type() == THTTPHdrVal::KStrVal)
+		iValue.Str().Close();
+	}
+
+
+/** Getter's
+*/
+
+EXPORT_C
+THTTPHdrVal CHeaderFieldPart::Value() const
+	{
+	return iValue;
+	}
+
+EXPORT_C
+TInt CHeaderFieldPart::NumParameters() const
+	{
+	// Check the array exists first
+	return iParams.Count();
+	}
+
+
+EXPORT_C
+THeaderFieldParamIter CHeaderFieldPart::Parameters() const
+	{
+	// create an iterator initialised for this part
+	return THeaderFieldParamIter(this);
+	}
+
+/*
+CHeaderFieldParam* CHeaderFieldPart::Parameter(TInt aIndex) const
+	{
+	// Check the parameter is in range, if so return it
+	if (aIndex < NumParameters())
+		return (CHeaderFieldParam*)iParams[aIndex];
+	else
+		return NULL;
+	}
+*/
+
+CHeaderFieldParam* CHeaderFieldPart::Parameter(RStringF aParamName) const
+	{
+	// Iterate the parameter list looking for a name match
+	THeaderFieldParamIter it(this);
+	CHeaderFieldParam* retVal = NULL;
+	const CHeaderFieldParam* nextParam = NULL;
+	TBool done = EFalse;
+	while (!done && !it.AtEnd())
+		{
+		nextParam = it();
+		if (nextParam->Name() == aParamName)
+			{
+			retVal = CONST_CAST(CHeaderFieldParam*, nextParam);
+			done = ETrue;
+			}
+		++it;
+		}
+	return retVal;
+	}
+
+
+
+/** Setter's
+*/
+
+/*
+void CHeaderFieldPart::SetValue(THTTPHdrVal aVal)
+	{
+	// We must check for an existing string value since it will have to be closed
+	if (iValue.Type() == THTTPHdrVal::KStrFVal)
+		iValue.StrF().Close();
+	if (iValue.Type() == THTTPHdrVal::KStrVal)
+		iValue.Str().Close();
+	iValue = aVal.Copy();
+	}
+*/
+EXPORT_C
+void CHeaderFieldPart::AddParamL(CHeaderFieldParam* aParam)
+	{
+	// Append the item
+	User::LeaveIfError(iParams.Append(aParam));
+	}
+
+/*
+TInt CHeaderFieldPart::RemoveParam(CHeaderFieldParam* aParam)
+	{
+	// Sanity check - if no array exists, then the part can't be removed...
+	if (iParams.Count() == 0)
+		return KErrNotFound;
+
+	// Find the param. 
+	TInt idx = iParams.Find(aParam);
+
+	// Now remove by index. Note that the array doesn't actually delete the param itself. Also
+	// the array must be compressed to close the 'gap' left by the deleted param
+	if (idx != KErrNotFound)
+		{
+		iParams.Remove(idx);
+		iParams.Compress();
+		delete aParam;
+		idx = KErrNone;
+		}
+	return idx;
+	}
+*/
+
+/** c'tor
+*/
+CHeaderFieldPart::CHeaderFieldPart(THTTPHdrVal aVal)
+	: iValue(aVal)
+	{
+	// Ensure that we've copied the HdrVal properly - strings must be Copy()d in order to
+	// correctly maintain string references
+	iValue = aVal.Copy();
+	}
+
+
+	
+/** Implementation of CHeaderFieldParam class *************************************************
+*/
+
+/** Factory methods
+*/
+
+EXPORT_C
+CHeaderFieldParam* CHeaderFieldParam::NewL(RStringF aParamName, THTTPHdrVal aVal)
+	{
+	return new(ELeave)CHeaderFieldParam(aParamName, aVal);
+	}
+
+
+/** D'tor
+*/
+
+CHeaderFieldParam::~CHeaderFieldParam()
+	{
+	// Close the parameter name and value, if it is a string.
+	iName.Close();
+	if (iValue.Type() == THTTPHdrVal::KStrVal)
+		iValue.Str().Close();
+	if (iValue.Type() == THTTPHdrVal::KStrFVal)
+		iValue.StrF().Close();
+	}
+
+/** Getter's
+*/
+
+EXPORT_C
+RStringF CHeaderFieldParam::Name() const
+	{
+	return iName;
+	}
+
+EXPORT_C
+THTTPHdrVal CHeaderFieldParam::Value() const
+	{
+	return iValue;
+	}
+
+/** Setter's
+*/
+/*
+void CHeaderFieldParam::SetValue(THTTPHdrVal aVal)
+	{
+	// We must check for an existing string value since it will have to be closed
+	if (iValue.Type() == THTTPHdrVal::KStrFVal)
+		iValue.StrF().Close();
+	if (iValue.Type() == THTTPHdrVal::KStrVal)
+		iValue.Str().Close();
+	iValue = aVal.Copy();
+	}
+*/
+/** c'tor
+*/
+CHeaderFieldParam::CHeaderFieldParam(RStringF aName, THTTPHdrVal aVal)
+	: iValue(aVal)
+	{
+	// Ensure that we've copied the arguments properly - strings must be Copy()d in order to
+	// correctly maintain string references
+	iName = aName.Copy();
+	iValue = aVal.Copy();
+	}
+
+
+	
+/** Implementation of THeaderFieldPartIter class **********************************************
+*/
+
+
+/** Normal c'tor
+*/
+
+THeaderFieldPartIter::THeaderFieldPartIter(const CHeaderField* aHeader)
+	: iHeader(aHeader)
+	{
+	// to begin at the beginning...
+	First();
+	}
+
+/** d'tor
+*/
+
+
+/** Reset the iterator to point at the first element
+*/
+
+EXPORT_C
+void THeaderFieldPartIter::First()
+	{
+	// Check existence of the array in CHeaderField. If it hasn't been created yet then
+	// we must start off 'at the end'.  This is indicated by the position index set to KErrNotFound
+	iPosIdx = 0;
+	CheckInvalidation();
+	}
+
+/** Check if the iterator is at the end of the list it traverses
+*/
+
+EXPORT_C
+TBool THeaderFieldPartIter::AtEnd()
+	{
+	return (iPosIdx == KErrNotFound);
+	}
+
+/** Advance the iterator
+*/
+
+EXPORT_C
+void THeaderFieldPartIter::operator++()
+	{
+	// Do nothing if we're already at the end
+	if (iPosIdx >= 0)
+		{
+		++iPosIdx;
+		CheckInvalidation();
+		}
+	}
+
+/** Obtain the element at the iterator's current position
+*/
+
+EXPORT_C
+const CHeaderFieldPart* THeaderFieldPartIter::operator()()
+	{
+	CheckInvalidation();
+	if (iPosIdx > KErrNotFound)
+		return iHeader->iParts.operator[](iPosIdx);
+	else
+		return NULL;
+	}
+
+void THeaderFieldPartIter::CheckInvalidation()
+	{
+	// iPosIdx may have been valid after the last use of operator() but
+	// if an item was subsequently removed from the collection the iterator
+	// may have gone off the end.
+	if (iPosIdx >= iHeader->iParts.Count())
+		iPosIdx = KErrNotFound; // Hit the end
+	}
+
+
+
+/** Implementation of THeaderFieldParamIter class *********************************************
+*/
+
+
+/** Normal c'tor
+*/
+
+THeaderFieldParamIter::THeaderFieldParamIter(const CHeaderFieldPart* aHeaderPart)
+	: iHeaderPart(aHeaderPart)
+	{
+	// to begin at the beginning...
+	First();
+	}
+
+/** d'tor
+*/
+
+EXPORT_C
+THeaderFieldParamIter::~THeaderFieldParamIter()
+	{
+	// does nothing
+	}
+
+/** Reset the iterator to point at the first element
+*/
+
+EXPORT_C
+void THeaderFieldParamIter::First()
+	{
+	// Check existence of the array in CHeaderFieldPart. If it hasn't been created yet then
+	// we must start off 'at the end'.  This is indicated by the position index set to KErrNotFound
+	iPosIdx = 0;
+	CheckInvalidation();
+	}
+
+/** Check if the iterator is at the end of the list it traverses
+*/
+
+EXPORT_C
+TBool THeaderFieldParamIter::AtEnd()
+	{
+	return (iPosIdx == KErrNotFound);
+	}
+
+/** Advance the iterator
+*/
+
+EXPORT_C
+void THeaderFieldParamIter::operator++()
+	{
+	// Do nothing if we're already at the end
+	if (iPosIdx >= 0)
+		{
+		++iPosIdx;
+		CheckInvalidation();
+		}
+	}
+
+/** Obtain the element at the iterator's current position
+*/
+EXPORT_C
+const CHeaderFieldParam* THeaderFieldParamIter::operator()()
+	{
+	CheckInvalidation();
+	if (iPosIdx > KErrNotFound)
+		return iHeaderPart->iParams.operator[](iPosIdx);
+	else
+		return NULL;
+	}
+
+void THeaderFieldParamIter::CheckInvalidation()
+	{
+	// iPosIdx may have been valid after the last use of operator() but
+	// if an item was subsequently removed from the collection the iterator
+	// may have gone off the end.
+	if (iPosIdx >= iHeaderPart->iParams.Count())
+		iPosIdx = KErrNotFound; // Hit the end
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CHeaders.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,419 @@
+// 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:
+//
+
+// System includes
+#include <e32std.h>
+#include <http/thttptable.h>
+#include <upnp/tupnptable.h>
+
+// Local includes
+#include "CHeaderField.h"
+#include "CHeaders.h"
+#include "rhttpheaders.h"
+#include "tupnpmessagepanic.h"
+
+
+CHeaders* CHeaders::NewL(CHeaderCodec& aCodec)
+	{
+	CHeaders* me = new(ELeave)CHeaders(aCodec);
+	return me;
+	}
+
+CHeaders::~CHeaders()
+	{
+	PurgeFields();
+	iFields.Close();
+	}
+
+RHTTPHeaders CHeaders::Handle()
+	{	
+	RHTTPHeaders handle;
+	handle.iImplementation = this; 
+	return handle;
+	}
+
+
+// create or append a field part for the named field and assigned value
+void CHeaders::SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue)
+	{
+	CHeaderField& field = CreateOrLookupFieldL(aFieldName);
+	
+	// Create a part for the value supplied
+	CHeaderFieldPart* part = CHeaderFieldPart::NewL(aFieldValue);
+	CleanupStack::PushL(part);
+	field.AddPartL(part);
+	CleanupStack::Pop(part);
+	}
+
+// create or append a field part with parameter, for the specified field, parameter and associated values
+void CHeaders::SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue,
+						 RStringF aParamName, THTTPHdrVal aParamValue)
+	{
+	CHeaderField& field = CreateOrLookupFieldL(aFieldName);
+	
+	// Check whether a part with the supplied value already exists, if so then the API semantics are that
+	// an additional parameter should be set on that part. Otherwise a new part will be created.
+	THeaderFieldPartIter iter = field.PartsL();
+	iter.First();
+	CHeaderFieldPart* part = NULL;
+	while (!iter.AtEnd())
+		{
+		const CHeaderFieldPart* pt = iter();
+		if (pt->Value() == aFieldValue)
+			part = CONST_CAST(CHeaderFieldPart*, pt);
+		++iter;
+		}
+
+	// Create a part only if the match didn't occur
+	if (!part)
+		{
+		part = CHeaderFieldPart::NewL(aFieldValue);
+		CleanupStack::PushL(part);
+		field.AddPartL(part);
+		CleanupStack::Pop(part);
+		}
+	
+	// Create a parameter for the value supplied
+	CHeaderFieldParam* param = CHeaderFieldParam::NewL(aParamName, aParamValue);
+	CleanupStack::PushL(param);
+	part->AddParamL(param);
+	CleanupStack::Pop(param);
+	}
+
+// Set a named field in the header to contain the supplied Raw data. Any existing header field of
+// this name will be lost.
+void CHeaders::SetRawFieldL(RStringF aFieldName, const TDesC8& aRawFieldData, const TDesC8& aFieldSeparator)
+	{
+	// See if field exists
+	TInt idx = LocateFieldName(aFieldName);
+
+	if (idx == KErrNotFound)
+		{
+		// create a new one using the field name
+		CHeaderField* hdr = CHeaderField::NewL(aFieldName, *this, aRawFieldData);
+		CleanupStack::PushL(hdr);
+		DoInsertInNameOrderL(hdr, aFieldName);
+		CleanupStack::Pop(hdr); 
+		}
+	else
+		{
+		CHeaderField* field = iFields[idx].iField;
+		TPtrC8 originalRawData;
+		field->RawDataL(originalRawData);
+
+		// add the new raw data to the existing field using the aFieldSeparator param as a separator
+		HBufC8* newRawDataBuf = HBufC8::NewLC(originalRawData.Length() + aFieldSeparator.Length() + aRawFieldData.Length());
+		TPtr8 newRawDataPtr = newRawDataBuf->Des();
+		newRawDataPtr.Append(originalRawData);
+		newRawDataPtr.Append(aFieldSeparator);
+		newRawDataPtr.Append(aRawFieldData);
+		field->BeginRawDataL();
+		field->WriteRawDataL(*newRawDataBuf);
+		field->CommitRawData();
+		CleanupStack::PopAndDestroy(newRawDataBuf);
+		}	
+	}
+
+// Remove, entirely, the named header field from the header collection. All its parts and
+// associated parameters (where they exist) are also removed
+TInt CHeaders::RemoveField(RStringF aFieldName)
+	{
+	// Locate the name first - give up straight away if the field isn't found
+	TInt idx = LocateFieldName(aFieldName);
+	if (idx < 0)
+		return idx;
+
+	__ASSERT_DEBUG(idx < iFields.Count(), TUPnPMessagePanic::Panic(TUPnPMessagePanic::EHeaderFieldMissing));
+	// destroy the header field
+	CHeaderField* field = iFields[idx].iField;
+	iFields.Remove(idx);
+	delete field;
+
+	return KErrNone;
+	}
+
+TInt CHeaders::RemoveFieldPartL(RStringF aFieldName, TInt aIndex)
+	{
+	TInt idx = LocateFieldName(aFieldName);
+	if (idx == KErrNotFound)
+		return idx;
+
+	CHeaderField* field = iFields[idx].iField;
+	field->RemovePartL(aIndex);
+	
+	if (field->NumPartsL() == 0)
+		{
+		iFields.Remove(idx);
+		delete field;
+		}
+	return KErrNone;
+	}
+
+void CHeaders::RemoveAllFields()
+	{
+	PurgeFields();
+	iFields.Reset();
+	}
+
+// Obtain the number of parts in the named header field's value, Simple headers are created with a single part
+// following one call to SetFieldL. Subsequent calls to SetFieldL create additional parts with the field exists
+// already
+TInt CHeaders::FieldPartsL(RStringF aFieldName) const
+	{
+	TInt idx = LocateFieldName(aFieldName);
+	if (idx == KErrNotFound)
+		return 0;
+
+	CHeaderField* field = iFields[idx].iField;
+	return field->NumPartsL();
+	}
+
+// Obtain the named header field's value.  Optionally, the index of a part within the field
+// may be specified. Parts are indexed from zero
+TInt CHeaders::GetField(RStringF aFieldName, TInt aPartIdx, THTTPHdrVal& aHeaderValue) const
+	{
+	TInt error = KErrNone;
+	CHeaderFieldPart* part = NULL;
+	TRAPD(err, part = GetFieldPartL(aFieldName, aPartIdx));
+	if (err)
+		return err;
+
+	if (part)
+		aHeaderValue = part->Value();
+	else
+		error = KErrNotFound;
+	return error;
+	}
+
+// Obtain the raw representation of the named header field's value.
+TInt CHeaders::GetRawField(RStringF aFieldName, TPtrC8& aRawFieldData) const
+	{
+	TInt idx = LocateFieldName(aFieldName);
+	if (idx < 0)
+		return idx;
+	CHeaderField* field = iFields[idx].iField;
+	TRAPD(err,field->RawDataL(aRawFieldData));
+	
+	if (err == KErrNone)
+		{
+		TInt newLinePos = aRawFieldData.Locate('\n');
+		if (newLinePos != KErrNotFound)
+			{
+			aRawFieldData.Set(aRawFieldData.Left(newLinePos));
+			}
+		}
+		
+	return err;
+	}
+
+
+// Obtain the value of a named parameter, associated with the named header field.  An optional index to a part
+// within the header field may be supplied, if not it is assumed that it is the first part
+THTTPHdrVal CHeaders::GetParam(RStringF aFieldName, RStringF aParamName, 
+							   THTTPHdrVal& aValue, TInt aPartIdx) const
+	{
+	CHeaderFieldParam* param = GetFieldParameter(aFieldName, aParamName, aPartIdx);
+	if (param == NULL)
+		return KErrNotFound;
+	aValue =  param->Value();
+	return 0;
+	}
+
+// Set a param, overwriting one if it exists
+void CHeaders::SetParamL(RStringF aFieldName, RStringF aParamName,THTTPHdrVal aParamValue,  TInt aPartIdx)
+	{
+	// Locate the name first
+	TInt idx = LocateFieldName(aFieldName);
+	User::LeaveIfError(idx);
+	CHeaderField* field = iFields[idx].iField;
+	CHeaderFieldPart* part = field->PartL(aPartIdx);
+	CHeaderFieldParam* param = CHeaderFieldParam::NewL(aParamName, aParamValue);
+	CleanupStack::PushL(param);
+	part->AddParamL(param);
+	CleanupStack::Pop(param);
+	}
+
+
+// create an iterator initialised for this header collection
+THTTPHdrFieldIter CHeaders::Fields() const
+	{
+	return THTTPHdrFieldIter(this);
+	}
+
+// Obtain the index in the CHeaderField/RStringF arrays for the named header
+TInt CHeaders::LocateFieldName(RStringF aHeaderName) const
+	{
+	// Locate the name first in the array of field names
+	const TInt count = iFields.Count();
+	for (TInt ii = 0; ii < count; ++ii)
+		{
+		if (iFields[ii].iFieldName == aHeaderName)
+			return ii;
+		}
+	return KErrNotFound;
+	}
+
+// Check if a named header field exists. If so, return it. If not, create it.
+CHeaderField& CHeaders::CreateOrLookupFieldL(RStringF aFieldName)
+	{
+	// Locate the name first
+	TInt idx = LocateFieldName(aFieldName);
+
+	// If the header was found, return it.  If no header matched, create
+	// one for that field name
+	CHeaderField* found = NULL;
+	if (idx != KErrNotFound)
+		{
+		found = iFields[idx].iField;
+		}
+	else
+		{
+		CHeaderField* hdr = CHeaderField::NewL(aFieldName, *this);
+		CleanupStack::PushL(hdr);
+		DoInsertInNameOrderL(hdr, aFieldName);
+		CleanupStack::Pop(hdr);
+		found = hdr;
+		}
+	return *found;
+	}
+
+// Get the indexed part of the named field, if it exists
+CHeaderFieldPart* CHeaders::GetFieldPartL(RStringF aFieldName, TInt aPartIdx) const
+	{
+	// check the field really exists
+	TInt idx = LocateFieldName(aFieldName);
+	User::LeaveIfError(idx);
+	
+	CHeaderField* field = iFields[idx].iField;
+	CHeaderFieldPart* part = field->PartL(aPartIdx);
+	return part;
+	}
+
+// Get the named parameter from the named field, if it exists
+CHeaderFieldParam* CHeaders::GetFieldParameter(RStringF aFieldName, RStringF aParamName, TInt aPartIdx) const
+	{
+	// get the part and look up the named parameter
+	CHeaderFieldPart* part = NULL;
+	TRAPD(err, part = GetFieldPartL(aFieldName, aPartIdx));
+	if (part && !err)
+		return part->Parameter(aParamName);
+	
+	if (err == KErrNotFound)
+		return NULL;
+	else
+		{
+		// find out what circumstances this might occur in.  non-existent field is fine;
+		// however if GetFieldPartL left then there might be a decoding error that should
+		// be reported somehow.
+		__DEBUGGER();
+		return NULL;
+		}
+	}
+
+
+void CHeaders::DoInsertInNameOrderL(CHeaderField* aHeader, RStringF aHeaderName)
+	{
+	THeaderFieldNamePair field;
+	field.iFieldName = aHeaderName;
+	field.iField = aHeader;
+	TLinearOrder<THeaderFieldNamePair> sortKey(THeaderFieldNamePair::CompareFieldNames);
+	User::LeaveIfError(iFields.InsertInOrder(field,sortKey));
+	}
+
+
+TInt CHeaders::THeaderFieldNamePair::CompareFieldNames(const THeaderFieldNamePair& aField1, 
+													   const THeaderFieldNamePair& aField2)
+	{
+	TInt val1 = KErrNone;
+	TInt val2 = KErrNone;
+	
+	RStringF header1 = aField1.iFieldName;
+	RStringPool pool1 = aField1.iFieldName.Pool();
+	
+	RStringF nts1 = pool1.StringF(UPnP::ENTS, TUPnPTable::Table());
+	RStringF nt1 = pool1.StringF(UPnP::ENT, TUPnPTable::Table());
+	RStringF usn1 = pool1.StringF(UPnP::EUSN, TUPnPTable::Table());
+	RStringF mx1 = pool1.StringF(UPnP::EMX, TUPnPTable::Table());
+	RStringF st1 = pool1.StringF(UPnP::EST, TUPnPTable::Table());
+	RStringF timeout1 = pool1.StringF(UPnP::ETimeout, TUPnPTable::Table());
+	RStringF seq1 = pool1.StringF(UPnP::ESEQ, TUPnPTable::Table());
+	RStringF man1 = pool1.StringF(UPnP::EMAN, TUPnPTable::Table());
+	RStringF soapaction1 = pool1.StringF(UPnP::ESoapAction, TUPnPTable::Table());
+	RStringF ext1 = pool1.StringF(UPnP::EExt, TUPnPTable::Table());
+	RStringF sid1 = pool1.StringF(UPnP::ESID, TUPnPTable::Table());
+	RStringF callback1 = pool1.StringF(UPnP::ECallback, TUPnPTable::Table());
+	
+	RStringF header2 = aField2.iFieldName;
+	RStringPool pool2 = aField2.iFieldName.Pool();
+
+	RStringF nts2 = pool2.StringF(UPnP::ENTS, TUPnPTable::Table());
+	RStringF nt2 = pool2.StringF(UPnP::ENT, TUPnPTable::Table());
+	RStringF usn2 = pool2.StringF(UPnP::EUSN, TUPnPTable::Table());
+	RStringF mx2 = pool2.StringF(UPnP::EMX, TUPnPTable::Table());
+	RStringF st2 = pool2.StringF(UPnP::EST, TUPnPTable::Table());
+	RStringF timeout2 = pool2.StringF(UPnP::ETimeout, TUPnPTable::Table());
+	RStringF seq2 = pool2.StringF(UPnP::ESEQ, TUPnPTable::Table());
+	RStringF man2 = pool2.StringF(UPnP::EMAN, TUPnPTable::Table());
+	RStringF soapaction2 = pool2.StringF(UPnP::ESoapAction, TUPnPTable::Table());
+	RStringF ext2 = pool2.StringF(UPnP::EExt, TUPnPTable::Table());
+	RStringF sid2 = pool2.StringF(UPnP::ESID, TUPnPTable::Table());
+	RStringF callback2 = pool2.StringF(UPnP::ECallback, TUPnPTable::Table());
+
+	if(
+	   ((header1.DesC().Compare(nts1.DesC()) == 0)||(header1.DesC().Compare(nt1.DesC()) == 0)||
+	   (header1.DesC().Compare(usn1.DesC()) == 0)||(header1.DesC().Compare(mx1.DesC()) == 0)||
+	   (header1.DesC().Compare(st1.DesC()) == 0)||(header1.DesC().Compare(timeout1.DesC()) == 0)||
+	   (header1.DesC().Compare(seq1.DesC()) == 0)||(header1.DesC().Compare(man1.DesC()) == 0)||
+	   (header1.DesC().Compare(soapaction1.DesC()) == 0)||(header1.DesC().Compare(ext1.DesC()) == 0)||
+	   (header1.DesC().Compare(sid1.DesC()) == 0)||(header1.DesC().Compare(callback1.DesC()) == 0))&&
+	   ((header2.DesC().Compare(nts2.DesC()) == 0)||(header2.DesC().Compare(nt2.DesC()) == 0)||
+	   (header2.DesC().Compare(usn2.DesC()) == 0)||(header2.DesC().Compare(mx2.DesC()) == 0)||
+	   (header2.DesC().Compare(st2.DesC()) == 0)||(header2.DesC().Compare(timeout2.DesC()) == 0)||
+	   (header2.DesC().Compare(seq2.DesC()) == 0)||(header1.DesC().Compare(man2.DesC()) == 0)||
+	   (header2.DesC().Compare(soapaction2.DesC()) == 0)||(header2.DesC().Compare(ext2.DesC()) == 0)||
+	   (header2.DesC().Compare(sid2.DesC()) == 0)||(header2.DesC().Compare(callback2.DesC()) == 0))
+	  )
+		
+		{
+		val1 = aField1.iFieldName.Index(TUPnPTable::Table());
+		val2 = aField2.iFieldName.Index(TUPnPTable::Table());
+		}
+	else
+		{
+		val1 = aField1.iFieldName.Index(THTTPTable::Table());
+		val2 = aField2.iFieldName.Index(THTTPTable::Table());
+		}
+
+	if (val1 != KErrNotFound && val2 != KErrNotFound)
+		return val1 - val2;
+	else if (val1 != KErrNotFound)
+		return -1;
+	else if (val2 != KErrNotFound)
+		return 1;
+	else
+		return aField1.iFieldName.DesC().Ptr() - 
+			aField2.iFieldName.DesC().Ptr();
+	}
+
+
+void CHeaders::PurgeFields()
+	{
+	const TInt count = iFields.Count();
+	for (TInt ii = 0; ii< count; ++ii)
+		{
+		delete iFields[ii].iField;
+		}
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CMessage.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,28 @@
+// 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:
+//
+
+// System includes
+#include <e32std.h>
+
+// Local includes
+#include "CMessage.h"
+
+
+CMessage::~CMessage()
+	{
+	delete iHeaders;
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CRequest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+// 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:
+//
+
+// System includes
+#include <e32std.h>
+
+// Local includes
+#include "CRequest.h"
+
+
+EXPORT_C CRequest* CRequest::NewL(CHeaderCodec& aCodec, RStringPool& aStringPool)
+	{
+	CRequest* req = new (ELeave) CRequest(aStringPool);
+	CleanupStack::PushL(req);
+	req->ConstructL(aCodec);
+	CleanupStack::Pop(req);
+	return req;
+	}
+
+EXPORT_C CRequest::~CRequest()
+	{
+	delete iURI;
+	iMethod.Close();
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/CResponse.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,36 @@
+// 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:
+//
+
+// System includes
+#include <e32std.h>
+
+// Local includes
+#include "CResponse.h"
+
+
+EXPORT_C CResponse* CResponse::NewL(CHeaderCodec& aCodec, RStringPool& aStringPool)
+	{
+	CResponse* that = new (ELeave) CResponse(aStringPool);
+	CleanupStack::PushL(that);
+	that->ConstructL(aCodec);
+	CleanupStack::Pop(that);
+	return that;
+	}
+
+EXPORT_C CResponse::~CResponse()
+	{
+	iStatusString.Close();
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/RResponse.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+// 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:
+//
+
+// System includes
+#include <e32std.h>
+
+// Local includes
+#include "CResponse.h"
+#include "rresponse.h"
+
+
+EXPORT_C void RResponse::SetStatusCode(TInt aStatus)
+	{
+	static_cast<CResponse*>(iImplementation)->Status() = aStatus;
+	}
+EXPORT_C TInt RResponse::StatusCode() const
+	{
+	return static_cast<CResponse*>(iImplementation)->Status();
+	}
+EXPORT_C void RResponse::SetStatusText(RStringF aStatusString)
+	{
+	RStringF& statusString = 
+		static_cast<CResponse*>(iImplementation)->StatusString();
+	statusString.Close();
+	statusString = aStatusString.Copy();
+	}
+EXPORT_C RStringF RResponse::StatusText() const
+	{
+	return static_cast<CResponse*>(iImplementation)->StringPool().
+		StringF(static_cast<CResponse*>(iImplementation)->StatusString());
+	}
+EXPORT_C void RResponse::SetVersion(TVersion aVersion)
+	{
+	static_cast<CResponse*>(iImplementation)->Version() = aVersion;
+	}
+EXPORT_C TBool RResponse::IsHTTP10() const
+	{
+	return static_cast<CResponse*>(iImplementation)->IsHTTP10();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnpmessagecomposer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,128 @@
+// 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 "cupnpmessagecomposer.h"
+#include <http/thttphdrfielditer.h>
+#include "mcomposerobserver.h"
+
+__FLOG_STMT(_LIT8(KSubsys,"UPnPComposer");)
+__FLOG_STMT(_LIT8(KComponent,"UPnPMessage");)
+
+CUPnPMessageComposer ::~CUPnPMessageComposer ()
+	{
+	Cancel ();
+	iMessageComposer.Close ();
+	iDataChain.Close();
+	__FLOG(_L8("-> Request composer destroyed"));
+	__FLOG_CLOSE;		
+	}
+CUPnPMessageComposer::CUPnPMessageComposer (MComposerObserver& aObserver)
+: CActive (EPriorityNormal),
+iObserver ( aObserver )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+void CUPnPMessageComposer::ConstructL ()
+	{
+	iMessageComposer.OpenL(*this);
+	__FLOG_OPEN(KSubsys, KComponent);
+	__FLOG(_L8("-> Response composer created"));		
+	}
+
+EXPORT_C void CUPnPMessageComposer::NotifyNewBodyData()
+	{
+	if ( !IsActive () )
+		CompleteSelf();
+	else
+		return;
+	}
+
+// From MHttpMessageComposerObserver
+void CUPnPMessageComposer::MessageComplete()
+	{
+	__FLOG(_L8("-> Message complete\n"));
+	iFieldIterPos = 0;
+	iObserver.ComposingConcluded();
+	}
+
+void CUPnPMessageComposer::MessageDataReadyL()
+	{
+	__FLOG(_L8("-> Got composed request"));
+	TPtrC8 dataPtr;
+	iMessageComposer.GetMessageData(dataPtr);
+
+	__FLOG_1(_L8("%S"), &dataPtr);
+	
+	// Notify the observer that there is message data ready to send.
+	iDataChain.Close();
+	iDataChain.CreateL(dataPtr);
+	iObserver.MessageDataReadyL(iDataChain);
+	}
+
+TInt CUPnPMessageComposer::HandleComposeError(TInt aError)
+	{
+	// The Message Composer has found a problem. Report to error to the observer.
+	__FLOG_1(_L8("-> HTTP message composer received error: %d"), aError);
+	iFieldIterPos = 0;
+	iObserver.ComposerError(aError);
+	return KErrNone;
+	}
+
+//void CUPnPMessageComposer::StartLineL(TPtrC8& /*aVersion*/, TPtrC8& /*aStatusCode*/, TPtrC8& /*aStatusText*/)
+//	{
+//	ASSERT(0);		
+//	}
+
+//TInt CUPnPMessageComposer::NextHeaderL(TPtrC8& /*aHeaderName*/, TPtrC8& /*aHeaderValue*/)
+//	{
+//	ASSERT(0);	
+//	return KErrNone;	
+//	}
+
+//MHTTPDataSupplier* CUPnPMessageComposer::HasBodyL()	
+//	{
+//	ASSERT(0);	
+//	return NULL;	
+//	}
+
+//TInt CUPnPMessageComposer::NextTrailerL(TPtrC8& /*aHeaderName*/, TPtrC8& /*aHeaderValue*/)
+//	{
+//	ASSERT(0);	
+//	return 0;	
+//	}
+
+// From CActive
+void CUPnPMessageComposer::RunL ()
+	{
+	__FLOG_1(_L8("-> HTTP message composer RunL called: %d"), iStatus.Int());
+	User::LeaveIfError (iStatus.Int());
+	iMessageComposer.MessageInfoAvailable ();		
+	}
+
+TInt CUPnPMessageComposer::RunError ()
+	{
+	__FLOG_0(_L8("-> Composer called RunError"));
+	iFieldIterPos = 0;
+	iObserver.ComposerError(KErrUnknown);
+	return KErrNone;		
+	}
+
+void CUPnPMessageComposer::CompleteSelf ()
+	{
+	TRequestStatus* pStat = &iStatus;
+	User::RequestComplete(pStat, KErrNone);
+	SetActive();		
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnprequestcomposer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,151 @@
+// 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 <httpstringconstants.h>
+
+#include "cupnprequestcomposer.h"
+#include "tupnpmessagepanic.h"
+
+__FLOG_STMT(_LIT8(KSubsys,"UPnPReqComposer");)
+__FLOG_STMT(_LIT8(KComponent,"UPnPMessage");)
+
+
+EXPORT_C CUpnpRequestComposer* CUpnpRequestComposer::NewL(MComposerObserver& aObserver)
+	{
+	CUpnpRequestComposer* self = new (ELeave) CUpnpRequestComposer(aObserver);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CUpnpRequestComposer::~CUpnpRequestComposer()
+	{
+	iMessageComposer.Close();
+	__FLOG(_L8("-> Request composer destroyed"));
+	__FLOG_CLOSE;
+	}
+
+CUpnpRequestComposer::CUpnpRequestComposer(MComposerObserver& aObserver)
+	:CUPnPMessageComposer(aObserver)
+	{
+	}
+
+void CUpnpRequestComposer::ConstructL()
+	{
+	CUPnPMessageComposer::ConstructL();
+	__FLOG_OPEN(KSubsys, KComponent);
+	__FLOG(_L8("-> Request Composer created"));
+	}
+
+void CUpnpRequestComposer::StartLineL(TPtrC8& aMethod, TPtrC8& aRequestUri, TPtrC8& aVersion)
+	{
+	__FLOG(_L8("-> Composing request"));
+	__FLOG(_L8("-> Supplying start line"));
+
+	aMethod.Set(iRequest->StringPool().StringF(iRequest->Method()).DesC());
+	aRequestUri.Set(iRequest->URI()->Uri().UriDes());
+	aVersion.Set(iRequest->StringPool().StringF(HTTP::EHttp11, THTTPTable::Table()).DesC());
+	__FLOG_3(_L8("%S %S %S"), &aMethod, &aRequestUri, &aVersion);
+	}
+
+// This function should be moved to CUPnPMessageComposer once the CRequest, CResponse & CMessage
+// split happens.
+TInt CUpnpRequestComposer::NextHeaderL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue)
+	{
+	// Are there any more headers?
+	TInt err = KErrNotFound;
+	
+	THTTPHdrFieldIter fields = iRequest->Handle().GetHeaderCollection().Fields();
+	TInt fieldPos = 0;
+	
+	while(fieldPos != iFieldIterPos)
+		{
+		++fields;
+		fieldPos++;
+		}
+	
+	if( !fields.AtEnd() )
+		{
+		// Get field current field.
+		RStringF name = iRequest->StringPool().StringF(fields());
+
+		err = KErrNone;
+				
+		// Get the OTA version of the field value
+		TPtrC8 value;
+		iRequest->Handle().GetHeaderCollection().GetRawField(name, value);
+			
+		// Pass back these values
+		aHeaderName.Set(name.DesC());
+		aHeaderValue.Set(value);
+		__FLOG(_L8("-> Supplying header value pair"));
+		__FLOG_2(_L8("%S: %S"), &aHeaderName, &aHeaderValue);		
+		
+		// Move onto next header field...
+		++fields;
+		++iFieldIterPos;		
+		}
+	return err;
+	}
+
+MHTTPDataSupplier* CUpnpRequestComposer::HasBodyL()
+	{
+	return iRequest->Handle().Body();
+	}
+
+void CUpnpRequestComposer::MessageComplete()
+	{
+	CUPnPMessageComposer::MessageComplete();
+	}
+
+void CUpnpRequestComposer::MessageDataReadyL()
+	{
+	CUPnPMessageComposer::MessageDataReadyL();	
+	}
+
+TInt CUpnpRequestComposer::HandleComposeError(TInt aError)
+	{
+	return CUPnPMessageComposer::HandleComposeError(aError);
+	}
+
+
+EXPORT_C void CUpnpRequestComposer::ComposeRequest(CRequest* aRequest)
+	{
+	__ASSERT_DEBUG(aRequest, TUPnPMessagePanic::Panic(TUPnPMessagePanic::EMissingRequest));
+	iRequest = aRequest;
+
+	// Notify the Message Composer that the request composing can start.
+	//iMessageComposer.MessageInfoAvailable();
+	NotifyNewBodyData ( );
+	}
+
+EXPORT_C void CUpnpRequestComposer::RequestDataSent()
+	{
+	// Notify the Message Composed that the current data has been read and it can
+	// release it.
+	__FLOG(_L8("-> Releasing message data"));
+	iDataChain.Close(); //Need to check
+	iMessageComposer.ReleaseMessageData();		
+	}
+
+EXPORT_C void CUpnpRequestComposer::ResetComposer()
+	{
+	__FLOG(_L8("-> Request composer reset"));
+	iMessageComposer.Reset();
+	iRequest = NULL;
+	iFieldIterPos = 0;
+	iDataChain.Close();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnprequestparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,393 @@
+// 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 <inetprottextutils.h>
+#include <httperr.h>
+#include <httpstringconstants.h>
+
+#include "cupnprequestparser.h"
+#include "tupnpmessagepanic.h"
+
+_LIT8(KHeaderSeparator,	"\n");
+
+__FLOG_STMT(_LIT8(KSubsys,"UPnPReqParser");)
+__FLOG_STMT(_LIT8(KComponent,"UPnPMessage");)
+
+
+EXPORT_C CUpnpRequestParser* CUpnpRequestParser::NewL(MParserObserver& aObserver)
+	{
+	CUpnpRequestParser* self = new(ELeave) CUpnpRequestParser(aObserver);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CUpnpRequestParser::CUpnpRequestParser(MParserObserver& aObserver)
+	:iObserver(aObserver)
+	{
+	}
+
+EXPORT_C CUpnpRequestParser::~CUpnpRequestParser()
+	{
+	iMessageParser.Close();
+	iBodyParts.Close();
+	if(!iMsgBuf.IsEmpty())
+		{
+		iMsgBuf.Free();	
+		}
+	iRawDataArray.Close();
+	__FLOG(_L8("-> Request parser destroyed"));
+	__FLOG_CLOSE;
+	}
+
+void CUpnpRequestParser::ConstructL()
+	{
+	iMessageParser.OpenL(*this);
+	__FLOG_OPEN(KSubsys, KComponent);
+	__FLOG(_L8("-> Request parser created"));
+	}
+
+TBool CUpnpRequestParser::GetNextDataPart(TPtrC8& aDataPart)
+	{
+	__FLOG(_L8("-> Supplying request body part"));
+	
+	TInt bodyPartsCount = iBodyParts.Count();
+	__ASSERT_ALWAYS((bodyPartsCount > 0), TUPnPMessagePanic::Panic(TUPnPMessagePanic::ENoBodyPartInDataSupplier));
+		
+	// Provide the first chunk.
+	aDataPart.Set(iBodyParts[0]);
+	__FLOG_1(_L8("%S"), &aDataPart);
+	
+	return (BodyComplete() && bodyPartsCount == 1);
+	}
+
+void CUpnpRequestParser::ReleaseData()
+	{
+	__FLOG(_L8("-> Releasing request body part"));
+	
+	// Remove the oldest chunk.
+	if( iBodyParts.Count () > 0 )
+		{
+		iBodyParts.Remove ( 0 ); 
+		}
+	
+	// Are there any more chunks?
+	if( iBodyParts.Count () > 0 )
+		{
+		// Notify the sender about the presence of the body. He can then call
+		// MHTTPDataSupplier::GetNextDataPart() to get the body data.
+		iObserver.GotBodyData();
+		}
+
+	else
+		{
+		// Does this data packet need to be released?
+		if( NotifyReleaseData() )
+			{
+			// Notify sender that the current data is no longer needed.
+			// Can release as there are no body chunks waiting to be passed to the
+			// client.
+			iObserver.DataParsed();
+			iFlags &= ~ENotifyReleaseData;
+			}
+		}
+	}
+	
+TInt CUpnpRequestParser::OverallDataSize()
+	{
+	return (iOverallDataSize < 0) ? KErrNotFound : iOverallDataSize;
+	}
+
+TInt CUpnpRequestParser::Reset()
+	{
+	return KErrNotSupported;
+	}
+
+void CUpnpRequestParser::GetDataPacket(TPtrC8& aData)
+	{
+	__FLOG(_L8("-> Supplying request data to the HTTP message parser"));
+	aData.Set(iRawDataArray[0]);
+	iRawDataArray.Remove(0);
+	}
+
+void CUpnpRequestParser::ReleaseDataPacket()
+	{
+	__FLOG(_L8("-> Releasing request data"));
+	if ( iBodyParts.Count () == 0 )
+		{
+		if(iRawDataArray.Count() > 0 && !IsExcessData())
+			{
+			iMessageParser.ReceivedMessageData();
+			}
+		else
+			{
+			// Notify sender that the current data is no longer needed.
+			// Can release as there are no body chunks waiting to be passed to the
+			// client.
+			iObserver.DataParsed();
+			}
+		}
+	else
+		{
+		// Flag that the data needs to be released
+		iFlags |= ENotifyReleaseData;
+		}
+	}
+
+void CUpnpRequestParser::StartLineL(const TDesC8& aStartLine)
+	{	
+	// From RFC 2616 Sec 5.1 Request-Line   = Method SP Request-URI SP HTTP-Version CRLF
+	// Request-Line == Start-Line
+	__FLOG(_L8("-> Got the request start line"));
+	__FLOG_1(_L8("%S"), &aStartLine);
+	
+	TPtrC8 startLinePtr ( aStartLine );
+	// Find the first space.
+	TInt pos = startLinePtr.Locate ( ' ' );
+	User::LeaveIfError ( pos );
+	
+	// Extract the method
+	TPtrC8 method ( startLinePtr.Left ( pos ) );
+	InetProtTextUtils::RemoveWhiteSpace ( method, InetProtTextUtils::ERemoveBoth );
+		
+	// Now move past the space that we located
+	startLinePtr.Set ( startLinePtr.Mid ( pos + 1 ) );
+		
+	// Locate the next space.
+	pos = startLinePtr.Locate ( ' ' );
+	User::LeaveIfError ( pos );
+	
+	// Extract the request URI
+	TPtrC8 requestUri ( startLinePtr.Left ( pos ) );
+	InetProtTextUtils::RemoveWhiteSpace ( requestUri, InetProtTextUtils::ERemoveBoth );
+	
+	TUriParser8 uriParser;
+	User::LeaveIfError ( uriParser.Parse ( requestUri ) );
+	
+	// Now move past the space that we located
+	startLinePtr.Set ( startLinePtr.Mid ( pos + 1 ) );
+	
+	// Extract the version
+	TPtrC8 versionPtr ( startLinePtr );
+	if ( versionPtr.Length () == 0 )
+		User::Leave ( KErrCorrupt );
+	
+	InetProtTextUtils::RemoveWhiteSpace ( requestUri, InetProtTextUtils::ERemoveBoth );
+
+
+	RStringPool sp = iRequest->StringPool();
+
+	pos = versionPtr.Locate('/');
+	if( pos == KErrNotFound )
+		User::Leave(KErrCorrupt);
+	
+	versionPtr.Set(versionPtr.Mid(pos + 1));
+
+	// Extract the major version number
+	TInt major;
+	pos = InetProtTextUtils::ConvertDescriptorToInt(versionPtr, major);
+	User::LeaveIfError(pos);
+	
+	// Skip past major version number and the "."
+	versionPtr.Set(versionPtr.Mid(pos + 1));
+
+	// Extract the minor version number
+	TInt minor;
+	pos = InetProtTextUtils::ConvertDescriptorToInt(versionPtr, minor);
+	User::LeaveIfError(pos);
+
+	RStringF methodStr = sp.OpenFStringL ( method );
+	CleanupClosePushL(methodStr);
+	
+	RRequest request = iRequest->Handle ();
+	request.SetMethod ( methodStr );
+	request.SetURIL ( uriParser );
+	
+	TVersion version ( major, minor, 0);	
+	request.SetVersion ( version );
+	
+	CleanupStack::PopAndDestroy(&methodStr);
+	}
+
+void CUpnpRequestParser::HeaderL(const TDesC8& aFieldName, TDesC8& aFieldValue)
+	{
+	__FLOG(_L8("-> Got header value pair"));
+	__FLOG_2(_L8("%S: %S"), &aFieldName, &aFieldValue);
+	
+	RStringF name = iRequest->StringPool().OpenFStringL(aFieldName);
+	CleanupClosePushL(name);
+	
+	iRequest->Handle().GetHeaderCollection().SetRawFieldL(name, aFieldValue, KHeaderSeparator);
+	
+	CleanupStack::PopAndDestroy(&name);
+	}
+
+TInt CUpnpRequestParser::BodySizeL()
+	{
+	// Notify the sender that all the request headers have been parsed.
+	iObserver.GotHeaders();
+	
+	//First check for a Transfer-Encoding header field.
+	iRequest->Handle().SetBody(*this);
+	THTTPHdrVal value;
+	RStringF name = iRequest->StringPool().StringF(HTTP::ETransferEncoding, THTTPTable::Table());
+
+	if( iRequest->Handle().GetHeaderCollection().GetField(name, 0, value) == KErrNone )
+		{
+		// It exists - what's the value?
+		if( value.Type() == THTTPHdrVal::KStrFVal &&
+			value.StrF().Index(THTTPTable::Table()) == HTTP::EChunked )
+			{
+			// The Transfer-Encoding header is Chunked and as the chunked
+			// encoding is removed, we remove the header.
+			iRequest->Handle().GetHeaderCollection().RemoveField(name);
+			
+			__FLOG(_L8("-> Request has chunked body"));
+			// As the entity body is chunked the overall data size is unknown.
+			iOverallDataSize = MHttpMessageParserObserver::EChunked;
+			}
+		}
+
+	else
+		{
+		// Transfer-Encoding header was not present - now check for a 
+		// Content-Length header.
+		name = iRequest->StringPool().StringF(HTTP::EContentLength, THTTPTable::Table());
+		TInt err = iRequest->Handle().GetHeaderCollection().GetField(name, 0, value);
+		
+		if( err != KErrNone && err != KErrNotFound )
+			User::Leave(err);
+			
+		if( err == KErrNone && value.Type() == THTTPHdrVal::KTIntVal )
+			{
+			// Content-Length header value specified the length of entity in bytes.
+			iOverallDataSize = value.Int();
+			__FLOG_1(_L8("-> Request body length = %d"), iOverallDataSize);
+			}
+		}
+		
+	return iOverallDataSize;	
+	}
+
+void CUpnpRequestParser::BodyChunkL(const TDesC8& aData)
+	{
+	__FLOG(_L8("-> Got request body chunk"));
+	__FLOG_1(_L8("%S"), &aData);
+	iFlags |= EBodyPresent;
+	
+	if (aData.Length() > 0)
+		{
+		iBodyParts.Append(aData);
+		}
+
+	// Only notify the client that there is a body part if there is one.
+	if (iBodyParts.Count() > 0)
+		{
+		// Notify the sender about the presence of the body. He can then call
+		// MHTTPDataSupplier::GetNextDataPart() to get the body data.
+		iObserver.GotBodyData();
+		}
+	}
+
+void CUpnpRequestParser::BodyCompleteL()
+	{
+	__FLOG(_L8("-> Request body complete"));
+	iFlags |= EBodyComplete;
+	}
+
+void CUpnpRequestParser::MessageCompleteL(const TPtrC8& aExcessData)
+	{
+	__FLOG(_L8("-> Message complete"));
+	
+	if ( aExcessData.Length() > 0 || iRawDataArray.Count() > 0 )
+		{
+		__FLOG(_L8("->Excess Data:"));
+		__FLOG_1(_L8("%S"), &aExcessData);
+
+		iFlags |= EExcessData;
+		}
+	else
+		{
+		__FLOG(_L8("-> No excess data"));		
+		}
+	
+	// Post a message to the sender with aExcessData as the payload
+	TInt excessDataLen = aExcessData.Length();
+	TInt count = iRawDataArray.Count();
+	while(count > 0)
+		{
+		excessDataLen += iRawDataArray[count-1].Length();
+		count--;
+		}	
+	
+	TInt lenToTrim = iMsgBuf.Length() - excessDataLen;
+	iMsgBuf.TrimStart(lenToTrim);	
+	iObserver.ParsingComplete(iMsgBuf);
+	}
+
+TInt CUpnpRequestParser::HandleParserError(TInt aError)
+	{
+	__FLOG_1(_L8("-> HTTP message parser received error: %d"), aError);
+	iRawDataArray.Reset();
+	iBodyParts.Reset();
+	iObserver.ParserError(aError);
+	return KErrNone;
+	}
+
+EXPORT_C void CUpnpRequestParser::ParseRequest(RMemChunk& aMessage, CRequest* aRequest)
+	{
+	__FLOG(_L8("-> Parsing request"));
+	__ASSERT_DEBUG(aRequest, TUPnPMessagePanic::Panic(TUPnPMessagePanic::EMissingRequest));
+	__ASSERT_DEBUG(!aMessage.IsEmpty(), TUPnPMessagePanic::Panic(TUPnPMessagePanic::ENoMessage));
+
+	iRequest = aRequest;
+	if(!iMsgBuf.IsEmpty())
+		{
+		iMsgBuf.Init();	
+		}
+	iMsgBuf.Assign(aMessage);
+	TPtrC8 rMBufPtr;
+	RMemCell* rMBuf;
+	TMemCellIterator mBufIter(iMsgBuf);
+	TInt err = KErrNone;
+	while((rMBuf = mBufIter++) != NULL)
+		{
+		rMBufPtr.Set(rMBuf->Ptr(), rMBuf->Length());
+		err = iRawDataArray.Append(rMBufPtr);
+		if(err != KErrNone)
+			{
+			HandleParserError(err);
+			break;
+			}
+		}
+	
+	if(err == KErrNone)
+		{
+		// Initiate the message parser.
+		iMessageParser.ReceivedMessageData();
+		}
+	}
+
+EXPORT_C void CUpnpRequestParser::ResetParser()
+	{
+	__FLOG(_L8("-> Request parser reset"));
+	iMsgBuf.Init();
+	iMessageParser.Reset();
+	iRawDataArray.Reset();
+	iBodyParts.Reset();
+	iOverallDataSize = 0;
+	iFlags &= ~EExcessData;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnpresponsecomposer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,155 @@
+// 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 <http/framework/cheadercodecplugin.h>
+#include <httpstringconstants.h>
+#include <inetprottextutils.h>
+
+#include "cupnpresponsecomposer.h"
+#include "tupnpmessagepanic.h"
+
+__FLOG_STMT(_LIT8(KSubsys,"UPnPResComposer");)
+__FLOG_STMT(_LIT8(KComponent,"UPnPMessage");)
+
+
+EXPORT_C CUpnpResponseComposer* CUpnpResponseComposer::NewL(MComposerObserver& aObserver)
+	{
+	CUpnpResponseComposer* self = new (ELeave) CUpnpResponseComposer(aObserver);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+EXPORT_C CUpnpResponseComposer::~CUpnpResponseComposer()
+	{
+	iMessageComposer.Close();
+	delete iStatusCodeBuf;
+	__FLOG(_L8("-> Response composer destroyed"));
+	__FLOG_CLOSE;
+	}
+
+CUpnpResponseComposer::CUpnpResponseComposer(MComposerObserver& aObserver)
+	:CUPnPMessageComposer(aObserver)
+	{
+	}
+
+void CUpnpResponseComposer::ConstructL()
+	{
+	CUPnPMessageComposer::ConstructL();
+	__FLOG_OPEN(KSubsys, KComponent);
+	__FLOG(_L8("-> Response Composer created"));
+	}
+
+void CUpnpResponseComposer::StartLineL(TPtrC8& aVersion, TPtrC8& aStatusCode, TPtrC8& aStatusText)
+	{
+	__FLOG(_L8("-> Composing response"));
+	__FLOG(_L8("-> Supplying start line"));
+
+	TInt statusCode = iResponse->Status();
+	InetProtTextUtils::ConvertIntToDescriptorL(statusCode, iStatusCodeBuf);
+	
+	aStatusCode.Set(iStatusCodeBuf->Des());
+	aStatusText.Set(iResponse->StatusString().DesC());
+	aVersion.Set(iResponse->StringPool().StringF(HTTP::EHttp11, THTTPTable::Table()).DesC());
+	__FLOG_3(_L8("%S %S %S"), &aVersion, &aStatusCode, &aStatusText);
+	}
+	
+// This function should be moved to CUPnPMessageComposer once the CRequest, CResponse & CMessage
+// split happens.
+TInt CUpnpResponseComposer::NextHeaderL(TPtrC8& aHeaderName, TPtrC8& aHeaderValue)
+	{
+	// Are there any more headers?
+	TInt err = KErrNotFound;
+
+	THTTPHdrFieldIter fields = iResponse->Handle().GetHeaderCollection().Fields();
+	TInt fieldPos = 0;
+	
+	while(fieldPos != iFieldIterPos)
+		{
+		++fields;
+		fieldPos++;
+		}
+	
+	if( !fields.AtEnd() )
+		{
+		// Get field current field.
+		RStringF name = iResponse->StringPool().StringF(fields());
+
+		err = KErrNone;
+			
+		// Get the OTA version of the field value
+		TPtrC8 value;
+		iResponse->Handle().GetHeaderCollection().GetRawField(name, value);
+		
+		// Pass back these values
+		aHeaderName.Set(name.DesC());
+		aHeaderValue.Set(value);
+		__FLOG(_L8("-> Supplying header value pair"));
+		__FLOG_2(_L8("%S: %S"), &aHeaderName, &aHeaderValue);		
+		
+		// Move onto next header field...
+		++fields;
+		++iFieldIterPos;
+		}
+	return err;
+	}
+
+MHTTPDataSupplier* CUpnpResponseComposer::HasBodyL()
+	{
+	return iResponse->Handle().Body();
+	}
+
+void CUpnpResponseComposer::MessageComplete()
+	{
+	CUPnPMessageComposer::MessageComplete();
+	}
+
+void CUpnpResponseComposer::MessageDataReadyL()
+	{
+	CUPnPMessageComposer::MessageDataReadyL();	
+	}
+
+TInt CUpnpResponseComposer::HandleComposeError(TInt aError)
+	{
+	return CUPnPMessageComposer::HandleComposeError(aError);
+	}
+
+EXPORT_C void CUpnpResponseComposer::ComposeResponse(CResponse* aResponse)
+	{
+	__ASSERT_DEBUG(aResponse, TUPnPMessagePanic::Panic(TUPnPMessagePanic::EMissingResponse));
+	iResponse = aResponse;
+
+	// Notify the Message Composer that the response composing can start.
+	NotifyNewBodyData ( );
+	//iMessageComposer.MessageInfoAvailable();
+	}
+
+EXPORT_C void CUpnpResponseComposer::ResponseDataSent()
+	{
+	// Notify the Message Composed that the current data has been read and it can
+	// release it.
+	__FLOG(_L8("-> Releasing message data"));
+	iDataChain.Close();	//Need to check
+	iMessageComposer.ReleaseMessageData();	
+	}
+
+EXPORT_C void CUpnpResponseComposer::ResetComposer()
+	{
+	__FLOG(_L8("-> Response composer reset"));
+	iMessageComposer.Reset();
+	iFieldIterPos = 0;
+	iDataChain.Close();	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/cupnpresponseparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,463 @@
+// 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 <httpstringconstants.h>
+#include <inetprottextutils.h>
+#include <httperr.h>
+#include <rmemcell.h>
+
+#include "cupnpresponseparser.h"
+#include "tupnpmessagepanic.h"
+
+_LIT8(KHeaderSeparator,	"\n");
+
+__FLOG_STMT(_LIT8(KSubsys,"UPnPResParser");)
+__FLOG_STMT(_LIT8(KComponent,"UPnPMessage");)
+
+_LIT8(KHTTP, "HTTP");
+
+EXPORT_C CUpnpResponseParser* CUpnpResponseParser::NewL(MParserObserver& aObserver)
+	{
+	CUpnpResponseParser* self = new(ELeave) CUpnpResponseParser(aObserver);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CUpnpResponseParser::CUpnpResponseParser(MParserObserver& aObserver)
+	:iObserver(aObserver)
+	{
+	}
+
+EXPORT_C CUpnpResponseParser::~CUpnpResponseParser()
+	{
+	iMessageParser.Close();
+	iBodyParts.Close();
+	if(!iMsgBuf.IsEmpty())
+		{
+		iMsgBuf.Free();	
+		}
+	iRawDataArray.Close();
+	__FLOG(_L8("-> Response parser destroyed"));
+	__FLOG_CLOSE;
+	}
+
+void CUpnpResponseParser::ConstructL()
+	{
+	iMessageParser.OpenL(*this);
+	__FLOG_OPEN(KSubsys, KComponent);
+	__FLOG(_L8("-> Response parser created"));
+	}
+
+void CUpnpResponseParser::ResetData()
+	{
+	iMessageParser.Reset();
+	iBodyParts.Reset();
+	iOverallDataSize = 0;
+	iFlags = 0;
+	}
+
+TBool CUpnpResponseParser::GetNextDataPart(TPtrC8& aDataPart)
+	{
+	__FLOG(_L8("-> Supplying response body part"));
+	
+	TInt bodyPartsCount = iBodyParts.Count();
+	__ASSERT_ALWAYS((bodyPartsCount > 0), TUPnPMessagePanic::Panic(TUPnPMessagePanic::ENoBodyPartInDataSupplier));
+	
+	// Provide the first chunk.
+	aDataPart.Set(iBodyParts[0]);
+	__FLOG_1(_L8("%S"), &aDataPart);
+	
+	return (BodyComplete() && bodyPartsCount == 1);
+	}
+
+void CUpnpResponseParser::ReleaseData()
+	{
+	__FLOG(_L8("-> Releasing response body part"));
+	
+	// Remove the oldest chunk.
+	if( iBodyParts.Count() > 0 )
+		{
+		iBodyParts.Remove(0);
+		}
+	
+	// Are there any more chunks?
+	if(iBodyParts.Count() > 0)	
+		{
+		// Notify the sender about the presence of the body. He can then call
+		// MHTTPDataSupplier::GetNextDataPart() to get the body data.
+		iObserver.GotBodyData();
+		}
+
+	else
+		{
+		// Does this data packet need to be released?
+		if( NotifyReleaseData() )
+			{
+			// Notify sender that the current data is no longer needed.
+			// Can release as there are no body chunks waiting to be passed to the
+			// client.
+			iObserver.DataParsed();
+			iFlags &= ~ENotifyReleaseData;
+			}
+		}
+	}
+	
+TInt CUpnpResponseParser::OverallDataSize()
+	{
+	return (iOverallDataSize < 0) ? KErrNotFound : iOverallDataSize;
+	}
+
+TInt CUpnpResponseParser::Reset()
+	{
+	return KErrNotSupported;
+	}
+
+void CUpnpResponseParser::GetDataPacket(TPtrC8& aData)
+	{
+	__FLOG(_L8("-> Supplying response data to the HTTP message parser"));
+	aData.Set(iRawDataArray[0]);
+	iRawDataArray.Remove(0);
+	}
+
+void CUpnpResponseParser::ReleaseDataPacket()
+	{
+	__FLOG(_L8("-> Releasing response data"));
+	
+	if( ConsumingResponse() && MessageComplete() )
+		{
+		// Ok, the response was a 1xx message which has been consumed. Reset the
+		// this object and continue parsing the next part of the response.
+		ResetData();
+		iMessageParser.ReceivedMessageData();		 
+		}
+	else if(iBodyParts.Count() == 0)	
+		{
+		if(iRawDataArray.Count() > 0 && !IsExcessData())
+			{
+			iMessageParser.ReceivedMessageData();
+			}
+		else
+			{
+			// Notify sender that the current data is no longer needed.
+			// Can release as there are no body chunks waiting to be passed to the
+			// client.
+			iObserver.DataParsed();
+			}
+		}
+	else
+		{
+		// Flag that the data needs to be released
+		iFlags |= ENotifyReleaseData;
+		}
+	}
+
+void CUpnpResponseParser::StartLineL(const TDesC8& aStartLine)
+	{
+	// The RFC2616 defines the Status-Line as follows - 
+	// 
+	// Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
+	//
+	// First extract the HTTP-Version
+	__FLOG(_L8("-> Got the reponse start line"));
+	__FLOG_1(_L8("%S"), &aStartLine);
+	
+	TPtrC8 data = aStartLine;
+	User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(data, InetProtTextUtils::ERemoveLeft));
+	
+	// HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
+	TInt consumed = data.Locate('/');
+	User::LeaveIfError(consumed);
+	
+	if((consumed > KHTTP().Length()) || (consumed < KHTTP().Length()))
+		User::Leave(KErrCorrupt);
+	
+	TPtrC8 http = data.Left(consumed);
+	if( http.CompareF(iResponse->StringPool().StringF(HTTP::EHTTP, THTTPTable::Table()).DesC()) != 0 )
+		User::Leave(KErrCorrupt);
+		
+	// Skip past the HTTP and "/"
+	data.Set(data.Mid(consumed + 1));
+	
+	// Extract the major version number
+	TInt major;
+	consumed = InetProtTextUtils::ConvertDescriptorToInt(data, major);
+	User::LeaveIfError(consumed);
+	
+	// Skip past major version number and the "."
+	data.Set(data.Mid(consumed + 1));
+
+	// Extract the minor version number
+	TInt minor;
+	consumed = InetProtTextUtils::ConvertDescriptorToInt(data, minor);
+	User::LeaveIfError(consumed);
+
+	// Skip past minor version number and the SP
+	data.Set(data.Mid(consumed + 1));
+	
+	// Clear any extra surrounding whitespace
+	User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(data, InetProtTextUtils::ERemoveBoth));
+	
+	// Extract the status code
+	TInt status;
+	consumed = InetProtTextUtils::ConvertDescriptorToInt(data, status);
+	User::LeaveIfError(consumed);
+	
+	if( data.Length() > consumed )
+		{
+		// Skip past status code and the SP
+		data.Set(data.Mid(consumed + 1));
+	
+		// Remaining data is the status reason - trim any leading whitespace as right side already trimmed
+		User::LeaveIfError(InetProtTextUtils::RemoveWhiteSpace(data, InetProtTextUtils::ERemoveLeft));
+		}
+	else
+		{
+		// No reason phrase following the status code
+		data.Set(KNullDesC8());
+		}
+	// Populate the Status-Line info
+	RStringF reason = iResponse->StringPool().OpenFStringL(data);
+	
+	RResponse response = iResponse->Handle();
+
+	TVersion version(major, minor, 0);
+	response.SetVersion(version);
+	response.SetStatusCode(status);
+	response.SetStatusText(reason);
+	reason.Close();
+	
+	// Check to see if a body is expected
+	if( HTTPStatus::IsInformational(status) )
+		{
+		// 1xx status - no body and need to consume this response
+		iFlags |= EConsumingResponse;
+		}
+	}
+
+void CUpnpResponseParser::HeaderL(const TDesC8& aFieldName, TDesC8& aFieldValue)
+	{
+	// Only set the headers if we are not consuming the response.
+	__FLOG(_L8("-> Got header value pair"));
+	__FLOG_2(_L8("%S: %S"), &aFieldName, &aFieldValue);
+	
+	if( !ConsumingResponse() )
+		{
+		RStringF name = iResponse->StringPool().OpenFStringL(aFieldName);
+		CleanupClosePushL(name);
+		
+		iResponse->Handle().GetHeaderCollection().SetRawFieldL(name, aFieldValue, KHeaderSeparator);
+		
+		CleanupStack::PopAndDestroy(&name);
+		}
+	}
+
+TInt CUpnpResponseParser::BodySizeL()
+	{
+	if( !ConsumingResponse() )
+		{
+		// Notify the sender that all the response headers have been parsed.
+		iObserver.GotHeaders();
+		}
+
+	// Check for a body...
+	if( ConsumingResponse() ||	// this implies that the status code was 1xx - no body
+		iResponse->Handle().StatusCode() == 204 || 
+		iResponse->Handle().StatusCode() == 304 && 
+		// if 2xx response...
+		( HTTPStatus::IsSuccessful(iResponse->Handle().StatusCode()) ) )
+		{
+		// No entity body is expected as specified in RFC2616 section 4.4.
+		iOverallDataSize = MHttpMessageParserObserver::ENoBody;
+		iFlags |= EBodyComplete;
+		__FLOG(_L8("-> Response has no body"));
+		return iOverallDataSize;
+		}
+		
+	// A body is expected - find the length. First check for a Transfer-Encoding
+	// header field.
+	iResponse->Handle().SetBody(*this);
+	THTTPHdrVal value;
+	RStringF name = iResponse->StringPool().StringF(HTTP::ETransferEncoding, THTTPTable::Table());
+	
+	TInt err = iResponse->Handle().GetHeaderCollection().GetField(name, 0, value);
+	if( err != KErrNone && err != KErrNotFound )
+		User::Leave(err);
+
+	// It exists - what's the value?
+	if( err == KErrNone && value.Type() == THTTPHdrVal::KStrFVal &&
+		value.StrF().Index(THTTPTable::Table()) == HTTP::EChunked )
+		{
+		// The Transfer-Encoding header is Chunked and as the chunked
+		// encoding is removed, we remove the header.
+		iResponse->Handle().GetHeaderCollection().RemoveField(name);
+			
+		// As the entity body is chunked the overall data size is unknown.
+		iOverallDataSize = MHttpMessageParserObserver::EChunked;
+		__FLOG(_L8("-> Response has chunked body"));
+		return iOverallDataSize;			
+		}
+
+	// Either no Transfer-Encoding header was present - now check for a 
+	// Content-Length header.
+	err = KErrNone;
+	name = iResponse->StringPool().StringF(HTTP::EContentLength, THTTPTable::Table());
+	err = iResponse->Handle().GetHeaderCollection().GetField(name, 0, value);
+	
+	if( err != KErrNone && err != KErrNotFound )
+		User::Leave(err);
+		
+	if( err == KErrNone && value.Type() == THTTPHdrVal::KTIntVal )
+		{
+		// Content-Length header value specified the length of entity in bytes.
+		iOverallDataSize = value.Int();
+		__FLOG_1(_L8("-> Response body length = %d"), iOverallDataSize);
+		return iOverallDataSize;
+		}
+		
+	// There was no Content-Length header either, so the server will signal the
+	// end of the message by closing the connection - overall data size unknown.
+	iOverallDataSize = MHttpMessageParserObserver::EUnknown;
+	__FLOG(_L8("-> Response body size is unknown"));
+	return iOverallDataSize;
+	}
+
+void CUpnpResponseParser::BodyChunkL(const TDesC8& aData)
+	{
+	__FLOG(_L8("-> Got response body chunk"));
+	__FLOG_1(_L8("%S"), &aData);
+
+	iFlags |= EBodyPresent;
+	if (aData.Length() > 0)
+		{
+		iBodyParts.Append(aData);
+		}
+
+	// Only notify the client that there is a body part if there is one.
+	if(iBodyParts.Count() > 0)
+		{
+		// Notify the sender about the presence of the body. He can then call
+		// MHTTPDataSupplier::GetNextDataPart() to get the body data.
+		iObserver.GotBodyData();
+		}
+	}
+
+void CUpnpResponseParser::BodyCompleteL()
+	{
+	__FLOG(_L8("-> Response body complete"));
+	iFlags |= EBodyComplete;
+	}
+
+void CUpnpResponseParser::MessageCompleteL(const TPtrC8& aExcessData)
+	{
+	__FLOG(_L8("-> Message complete"));
+	
+	iFlags |= EMessageComplete;
+
+	if ( aExcessData.Length() > 0 || iRawDataArray.Count() > 0 )
+		{
+		__FLOG(_L8("->Excess Data:"));
+		__FLOG_1(_L8("%S"), &aExcessData);
+
+		iFlags |= EExcessData;
+		}
+	else
+		{
+		__FLOG(_L8("-> No excess data"));
+		}
+	
+	TInt excessDataLen = aExcessData.Length();
+	TInt count = iRawDataArray.Count();
+	while(count > 0)
+		{
+		excessDataLen += iRawDataArray[count-1].Length();
+		count--;
+		}
+	TInt lenToTrim = iMsgBuf.Length() - excessDataLen;
+	iMsgBuf.TrimStart(lenToTrim);
+
+	if( !ConsumingResponse() )
+		{
+		iObserver.ParsingComplete(iMsgBuf);
+		}
+	else
+		{
+		// There could be excess data - this data is for this response and needs
+		// to be parsed. Set it as the raw data.
+		iRawDataArray.Reset();
+		TPtrC8 rMBufPtr;
+		RMemCell* rMBuf;
+		TMemCellIterator mBufIter(iMsgBuf);
+		while((rMBuf = mBufIter++) != NULL)
+			{
+			rMBufPtr.Set(rMBuf->Ptr(), rMBuf->Length());
+			iRawDataArray.AppendL(rMBufPtr);
+			}
+		}
+	}
+
+TInt CUpnpResponseParser::HandleParserError(TInt aError)
+	{
+	__FLOG_1(_L8("-> HTTP message parser received error: %d"), aError);
+	iRawDataArray.Reset();
+	iBodyParts.Reset();
+	iObserver.ParserError(aError);
+	return KErrNone;
+	}
+
+EXPORT_C void CUpnpResponseParser::ParseResponse(RMemChunk& aMessage, CResponse* aResponse)
+	{
+	__FLOG(_L8("-> Parsing response"));
+	__ASSERT_DEBUG(aResponse, TUPnPMessagePanic::Panic(TUPnPMessagePanic::EMissingResponse));
+	__ASSERT_DEBUG(!aMessage.IsEmpty(), TUPnPMessagePanic::Panic(TUPnPMessagePanic::ENoMessage));
+	
+	iResponse = aResponse;
+	if(!iMsgBuf.IsEmpty())
+		{
+		iMsgBuf.Free();	
+		}
+	iMsgBuf.Assign(aMessage);
+	TPtrC8 rMBufPtr;
+	RMemCell* rMBuf;
+	TMemCellIterator mBufIter(iMsgBuf);
+	TInt err = KErrNone;
+	while((rMBuf = mBufIter++) != NULL)
+		{
+		rMBufPtr.Set(rMBuf->Ptr(), rMBuf->Length());
+		err = iRawDataArray.Append(rMBufPtr);
+		if(err != KErrNone)
+			{
+			HandleParserError(err);
+			break;
+			}
+		}
+	
+	if(err == KErrNone)
+		{
+		// Initiate the message parser
+		iMessageParser.ReceivedMessageData();
+		}
+	}
+ 
+EXPORT_C void CUpnpResponseParser::ResetParser()
+	{
+	__FLOG(_L8("-> Response parser reset"));
+	iMessageParser.Reset();
+	iRawDataArray.Reset();
+	iBodyParts.Reset();
+	iOverallDataSize = 0;
+	iFlags &= ~EExcessData;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/rhttpheaders.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,295 @@
+// 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:
+//
+
+// System includes
+#include <e32std.h>
+#include <http/thttphdrval.h>
+
+// Local includes
+#include "CHeaders.h"
+#include "rhttpheaders.h"
+
+
+EXPORT_C THTTPHdrVal::THTTPHdrVal()
+	{
+	iType = KNoType;
+	}
+
+EXPORT_C
+THTTPHdrVal::THTTPHdrVal(TInt aIntVal)
+	{
+	SetInt(aIntVal);
+	}
+
+EXPORT_C
+THTTPHdrVal::THTTPHdrVal(RStringF aStrVal)
+	{
+	SetStrF(aStrVal);
+	}
+EXPORT_C
+THTTPHdrVal::THTTPHdrVal(RString aStrVal)
+	{
+	SetStr(aStrVal);
+	}
+
+EXPORT_C
+THTTPHdrVal::THTTPHdrVal(TDateTime aDateVal)
+	{
+	SetDateTime(aDateVal);
+	}
+
+//
+// Clone this header value
+//
+
+EXPORT_C
+THTTPHdrVal THTTPHdrVal::Copy() const
+	{
+	THTTPHdrVal ret = *this;
+	if (iType == KStrVal)
+		Str().Copy();
+	if (iType == KStrFVal)
+		StrF().Copy();
+	return ret;
+	}
+
+
+//
+// Accessors
+//
+
+EXPORT_C
+THTTPHdrVal::THTTPValType THTTPHdrVal::Type() const
+	{
+	return iType;
+	}
+
+EXPORT_C
+TInt THTTPHdrVal::Int() const
+	{
+	__ASSERT_DEBUG(iType == KTIntVal, User::Invariant());//HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType));
+	return iVal;
+	}
+	
+EXPORT_C
+RStringF THTTPHdrVal::StrF() const
+	{
+	__ASSERT_DEBUG(iType == KStrFVal, User::Invariant());//HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType));
+	return *reinterpret_cast<const RStringF*>(&iVal);
+	}
+EXPORT_C
+RString THTTPHdrVal::Str() const
+	{
+	__ASSERT_DEBUG(iType == KStrVal, User::Invariant());//HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType));
+	return *reinterpret_cast<const RString*>(&iVal);
+	}
+
+EXPORT_C
+TDateTime THTTPHdrVal::DateTime() const
+	{
+	__ASSERT_DEBUG(iType == KDateVal, User::Invariant());//HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType));
+	return reinterpret_cast<const TTime*>(&iVal)->DateTime();
+	}
+
+EXPORT_C
+void THTTPHdrVal::SetInt(TInt aIntVal)
+	{
+	iVal  = aIntVal;
+	iType = KTIntVal;
+	}
+
+EXPORT_C
+void THTTPHdrVal::SetStr(RString aStrVal)
+	{
+	*reinterpret_cast<RString*>(&iVal) = aStrVal;
+	iType = KStrVal;
+	}
+EXPORT_C
+void THTTPHdrVal::SetStrF(RStringF aStrVal)
+	{
+	*reinterpret_cast<RStringF*>(&iVal) = aStrVal;
+	iType = KStrFVal;
+	}
+
+EXPORT_C
+void THTTPHdrVal::SetDateTime(TDateTime aDateVal)
+	{
+	*reinterpret_cast<TTime*>(&iVal) = aDateVal;
+	iType	  = KDateVal;
+	}
+
+EXPORT_C
+TBool THTTPHdrVal::operator==(THTTPHdrVal aVal) const
+	{
+	TBool ret = EFalse;
+	if (aVal.iType == iType)
+		{
+		switch (iType)
+			{
+		case KTIntVal:
+			ret = (aVal.iVal == iVal);
+			break;
+		case KStrVal:
+		case KStrFVal:
+		case KDateVal:
+			ret = (aVal.iVal == iVal && aVal.iMoreSpace == iMoreSpace);
+			break;
+		default:
+			User::Invariant();//HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType);
+			break;
+			}
+		}
+	return ret;
+	}
+
+EXPORT_C
+TBool THTTPHdrVal::operator!=(THTTPHdrVal aVal) const
+	{
+	return !operator==(aVal);
+	}
+
+
+
+
+
+EXPORT_C
+void RHTTPHeaders::SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue)
+	{
+	iImplementation->SetFieldL(aFieldName, aFieldValue);
+	}
+
+EXPORT_C
+void RHTTPHeaders::SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue,
+						RStringF aParamName, THTTPHdrVal aParamValue)
+	{
+	iImplementation->SetFieldL(aFieldName, aFieldValue, aParamName, aParamValue);
+	}
+
+EXPORT_C
+void RHTTPHeaders::SetRawFieldL(RStringF aFieldName, const TDesC8& aOtaFieldData, const TDesC8& aFieldSeparator)
+	{
+	iImplementation->SetRawFieldL(aFieldName, aOtaFieldData, aFieldSeparator);
+	}
+
+EXPORT_C
+TInt RHTTPHeaders::RemoveField(RStringF aFieldName)
+	{
+	return iImplementation->RemoveField(aFieldName);
+	}
+
+
+EXPORT_C TInt RHTTPHeaders::RemoveFieldPart(RStringF aFieldName, TInt aIndex)
+	{
+	TRAPD(err,iImplementation->RemoveFieldPartL(aFieldName, aIndex));
+	return err;
+	}
+
+EXPORT_C void RHTTPHeaders::RemoveAllFields()
+	{
+	iImplementation->RemoveAllFields();
+	}
+
+
+EXPORT_C 
+TInt RHTTPHeaders::FieldPartsL(RStringF aFieldName) const
+	{
+	return iImplementation->FieldPartsL(aFieldName);
+	}
+
+EXPORT_C TInt RHTTPHeaders::GetField(RStringF aFieldName, TInt aPartIdx, 
+									 THTTPHdrVal& aHeaderValue) const
+	{
+	return iImplementation->GetField(aFieldName, aPartIdx, aHeaderValue);
+	}
+
+EXPORT_C
+TInt RHTTPHeaders::GetRawField(RStringF aFieldName, TPtrC8& aRawFieldData) const
+	{
+	return iImplementation->GetRawField(aFieldName, aRawFieldData);
+	}
+
+EXPORT_C
+TInt RHTTPHeaders::GetParam(RStringF aFieldName, RStringF aParamName, 
+							THTTPHdrVal& aValue, TInt aPartIdx) const
+	{
+	return iImplementation->GetParam(aFieldName, aParamName, aValue, aPartIdx);
+	}
+
+EXPORT_C void RHTTPHeaders::SetParamL(RStringF aFieldName, RStringF aParamName, 
+									  THTTPHdrVal aParamValue, TInt aPartIdx)
+	{
+	iImplementation->SetParamL(aFieldName, aParamName, aParamValue, aPartIdx);
+	}
+
+EXPORT_C
+THTTPHdrFieldIter RHTTPHeaders::Fields() const
+	{
+	return iImplementation->Fields();
+	}
+
+
+
+EXPORT_C
+THTTPHdrFieldIter::~THTTPHdrFieldIter()
+	{
+	// does nothing
+	}
+
+EXPORT_C
+void THTTPHdrFieldIter::First()
+	{
+	// Check existence of the field name array in CHeaders. If it hasn't been created yet
+	// then we must start off 'at the end'.  This is indicated by the position index set
+	// to KErrNotFound
+	iPosIdx = 0;
+	CheckInvalidation();
+	}
+
+EXPORT_C
+TBool THTTPHdrFieldIter::AtEnd() const
+	{
+	return (iPosIdx == KErrNotFound);
+	}
+
+EXPORT_C
+void THTTPHdrFieldIter::operator++()
+	{
+	// Do nothing if we're already at the end
+	if (iPosIdx >= 0)
+		{
+		++iPosIdx;
+		CheckInvalidation();
+		}
+	}
+
+EXPORT_C
+RStringTokenF THTTPHdrFieldIter::operator()()
+	{
+	CheckInvalidation();
+	if (iPosIdx > KErrNotFound)
+		return iHeaders->iFields[iPosIdx].iFieldName;
+	else
+		return RStringF();
+	}
+
+void THTTPHdrFieldIter::CheckInvalidation()
+	{
+	// iPosIdx may have been valid after the last use of operator() but
+	// if an item was subsequently removed from the collection the iterator
+	// may have gone off the end.
+	if (iPosIdx >= iHeaders->iFields.Count())
+		iPosIdx = KErrNotFound; // Hit the end
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/rrequest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,59 @@
+// 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:
+//
+
+// System includes
+#include <e32std.h>
+
+// Local includes
+#include "CRequest.h"
+#include "rrequest.h"
+
+EXPORT_C RStringF RRequest::Method() const
+	{
+	return static_cast<CRequest*>(iImplementation)->StringPool().StringF(
+		static_cast<CRequest*>(iImplementation)->Method());
+	}
+EXPORT_C const TUriC8& RRequest::URI() const
+	{
+	return (static_cast<CRequest*>(iImplementation)->URI()->Uri());
+	}
+
+EXPORT_C void  RRequest::SetMethod(RStringF aMethod)
+	{
+	RStringF& method = static_cast<CRequest*>(iImplementation)->Method();
+	method.Close();
+	method = aMethod;
+	method.Copy();
+	}
+
+EXPORT_C void RRequest::SetURIL(const TUriC8& aURI)
+	{
+	CUri8*& uri = static_cast<CRequest*>(iImplementation)->URI();
+	CUri8* oldUri = uri;
+	uri = CUri8::NewL(aURI);
+	// If the NewL leaves, the delete won't get executed, and so the request
+	// will remain unmodified.
+	delete oldUri;
+	}
+
+EXPORT_C void RRequest::SetVersion(TVersion aVersion)
+	{
+	static_cast<CRequest*>(iImplementation)->Version() = aVersion;
+	}
+
+EXPORT_C TBool RRequest::IsHTTP10() const
+	{
+	return static_cast<CRequest*>(iImplementation)->IsHTTP10();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/rupnpmessage.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,50 @@
+// 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:
+// rhttpmessage.cpp
+// 
+//
+
+// System includes
+#include <e32std.h>
+
+// Local includes
+#include "CMessage.h"
+#include "rupnpmessage.h"
+
+
+EXPORT_C RHTTPHeaders RUPnPMessage::GetHeaderCollection()
+	{
+	return iImplementation->iHeaders->Handle();
+	}
+
+EXPORT_C void RUPnPMessage::SetBody(MHTTPDataSupplier& aBody)
+	{
+	iImplementation->AddBody(&aBody);
+	}
+
+EXPORT_C void RUPnPMessage::RemoveBody()
+	{
+	iImplementation->AddBody(NULL);
+	}
+
+EXPORT_C TBool RUPnPMessage::HasBody() const
+	{
+	return iImplementation->HasBody();
+	}
+
+EXPORT_C MHTTPDataSupplier* RUPnPMessage::Body() const
+	{
+	return iImplementation->Body();
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/src/tupnpmessagepanic.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,22 @@
+// 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 "tupnpmessagepanic.h"
+
+void TUPnPMessagePanic::Panic (TUPnPMessagePanicCode aPanic)
+	{
+	_LIT(KUPnPMessagePanic, "UPNPMESSAGEPANIC");
+	User::Panic(KUPnPMessagePanic(), aPanic);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/bwins/upnputilsu.DEF	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,67 @@
+EXPORTS
+	?GetAttribPtr@TSubsribeResponseInfo@@UBEPAEH@Z @ 1 NONAME ; unsigned char * TSubsribeResponseInfo::GetAttribPtr(int) const
+	?GetVDataTableStatic@TSigParamSetAny@@SAPBUSVDataTableEntry@Meta@@XZ @ 2 NONAME ; struct Meta::SVDataTableEntry const * TSigParamSetAny::GetVDataTableStatic(void)
+	?GetVDataTableStatic@TSubscribeRequestInfo@@SAPBUSVDataTableEntry@Meta@@XZ @ 3 NONAME ; struct Meta::SVDataTableEntry const * TSubscribeRequestInfo::GetVDataTableStatic(void)
+	?GetVDataTable@THttpServerFlowQuery@@UBEPBUSVDataTableEntry@Meta@@XZ @ 4 NONAME ; struct Meta::SVDataTableEntry const * THttpServerFlowQuery::GetVDataTable(void) const
+	?GetVDataTableStatic@TSubsribeResponseInfo@@SAPBUSVDataTableEntry@Meta@@XZ @ 5 NONAME ; struct Meta::SVDataTableEntry const * TSubsribeResponseInfo::GetVDataTableStatic(void)
+	?GetVDataTableStatic@THttpUdpFlowQuery@@SAPBUSVDataTableEntry@Meta@@XZ @ 6 NONAME ; struct Meta::SVDataTableEntry const * THttpUdpFlowQuery::GetVDataTableStatic(void)
+	?GetAttribPtr@TUPnPFlowQuery@@UBEPAEH@Z @ 7 NONAME ; unsigned char * TUPnPFlowQuery::GetAttribPtr(int) const
+	?GetVDataTable@TSigParamSet@@UBEPBUSVDataTableEntry@Meta@@XZ @ 8 NONAME ; struct Meta::SVDataTableEntry const * TSigParamSet::GetVDataTable(void) const
+	?GetVDataTable@TSigParamSetFlow@@UBEPBUSVDataTableEntry@Meta@@XZ @ 9 NONAME ; struct Meta::SVDataTableEntry const * TSigParamSetFlow::GetVDataTable(void) const
+	?GetVDataTableStatic@TSigParamSet@@SAPBUSVDataTableEntry@Meta@@XZ @ 10 NONAME ; struct Meta::SVDataTableEntry const * TSigParamSet::GetVDataTableStatic(void)
+	?GetVDataTableStatic@THttpClientFlowQuery@@SAPBUSVDataTableEntry@Meta@@XZ @ 11 NONAME ; struct Meta::SVDataTableEntry const * THttpClientFlowQuery::GetVDataTableStatic(void)
+	?GetAttribPtr@TSigNumberVersionBufChain@@UBEPAEH@Z @ 12 NONAME ABSENT ; unsigned char * TSigNumberVersionBufChain::GetAttribPtr(int) const
+	?GetVDataTable@TSigNumberBufChain@@UBEPBUSVDataTableEntry@Meta@@XZ @ 13 NONAME ABSENT ; struct Meta::SVDataTableEntry const * TSigNumberBufChain::GetVDataTable(void) const
+	?GetAttribPtr@TSigParamSet@@UBEPAEH@Z @ 14 NONAME ; unsigned char * TSigParamSet::GetAttribPtr(int) const
+	?GetAttribPtr@TSigParamSetFlow@@UBEPAEH@Z @ 15 NONAME ; unsigned char * TSigParamSetFlow::GetAttribPtr(int) const
+	?GetVDataTableStatic@TSigUPnPResponseInfo@@SAPBUSVDataTableEntry@Meta@@XZ @ 16 NONAME ; struct Meta::SVDataTableEntry const * TSigUPnPResponseInfo::GetVDataTableStatic(void)
+	?GetVDataTableStatic@TSigNumberBufChain@@SAPBUSVDataTableEntry@Meta@@XZ @ 17 NONAME ABSENT ; struct Meta::SVDataTableEntry const * TSigNumberBufChain::GetVDataTableStatic(void)
+	?GetVDataTable@TUPnPFlowQuery@@UBEPBUSVDataTableEntry@Meta@@XZ @ 18 NONAME ; struct Meta::SVDataTableEntry const * TUPnPFlowQuery::GetVDataTable(void) const
+	?LoadL@SMetaDataNetCtorExt@@SAPAVSMetaDataNetCtor@Meta@@AAVTPtrC8@@@Z @ 19 NONAME ; class Meta::SMetaDataNetCtor * SMetaDataNetCtorExt::LoadL(class TPtrC8 &)
+	?GetVDataTableStatic@TUPnPFlowQuery@@SAPBUSVDataTableEntry@Meta@@XZ @ 20 NONAME ; struct Meta::SVDataTableEntry const * TUPnPFlowQuery::GetVDataTableStatic(void)
+	?GetVDataTable@TSigRMBufChainFlow@@UBEPBUSVDataTableEntry@Meta@@XZ @ 21 NONAME ABSENT ; struct Meta::SVDataTableEntry const * TSigRMBufChainFlow::GetVDataTable(void) const
+	?GetVDataTable@THttpUdpFlowQuery@@UBEPBUSVDataTableEntry@Meta@@XZ @ 22 NONAME ; struct Meta::SVDataTableEntry const * THttpUdpFlowQuery::GetVDataTable(void) const
+	?GetVDataTable@THttpClientFlowQuery@@UBEPBUSVDataTableEntry@Meta@@XZ @ 23 NONAME ; struct Meta::SVDataTableEntry const * THttpClientFlowQuery::GetVDataTable(void) const
+	?GetVDataTableStatic@TSigNumberVersionBufChain@@SAPBUSVDataTableEntry@Meta@@XZ @ 24 NONAME ABSENT ; struct Meta::SVDataTableEntry const * TSigNumberVersionBufChain::GetVDataTableStatic(void)
+	?GetVDataTableStatic@TSigTUint8Size@@SAPBUSVDataTableEntry@Meta@@XZ @ 25 NONAME ; struct Meta::SVDataTableEntry const * TSigTUint8Size::GetVDataTableStatic(void)
+	?Match@TUPnPFlowQuery@@UAE?AW4TMatchResult@MFactoryQuery@Factories@@AAUTFactoryObjectInfo@4@@Z @ 26 NONAME ; enum Factories::MFactoryQuery::TMatchResult TUPnPFlowQuery::Match(struct Factories::TFactoryObjectInfo &)
+	?GetVDataTable@TSigSsdpInfo@@UBEPBUSVDataTableEntry@Meta@@XZ @ 27 NONAME ; struct Meta::SVDataTableEntry const * TSigSsdpInfo::GetVDataTable(void) const
+	?GetAttribPtr@THttpServerFlowQuery@@UBEPAEH@Z @ 28 NONAME ; unsigned char * THttpServerFlowQuery::GetAttribPtr(int) const
+	?GetAttribPtr@TSigUPnPResponseInfo@@UBEPAEH@Z @ 29 NONAME ; unsigned char * TSigUPnPResponseInfo::GetAttribPtr(int) const
+	?GetAttribPtr@TSigUPnPClientRequestInfo@@UBEPAEH@Z @ 30 NONAME ; unsigned char * TSigUPnPClientRequestInfo::GetAttribPtr(int) const
+	?GetAttribPtr@TSigNumberBufChain@@UBEPAEH@Z @ 31 NONAME ABSENT ; unsigned char * TSigNumberBufChain::GetAttribPtr(int) const
+	?GetAttribPtr@TSigTUint8Size@@UBEPAEH@Z @ 32 NONAME ; unsigned char * TSigTUint8Size::GetAttribPtr(int) const
+	?GetAttribPtr@TSubscribeRequestInfo@@UBEPAEH@Z @ 33 NONAME ; unsigned char * TSubscribeRequestInfo::GetAttribPtr(int) const
+	?GetVDataTableStatic@THttpServerFlowQuery@@SAPBUSVDataTableEntry@Meta@@XZ @ 34 NONAME ; struct Meta::SVDataTableEntry const * THttpServerFlowQuery::GetVDataTableStatic(void)
+	?GetAttribPtr@TEventNotifyRequestInfo@@UBEPAEH@Z @ 35 NONAME ; unsigned char * TEventNotifyRequestInfo::GetAttribPtr(int) const
+	?RegisterL@TUpnpMessage@@SAXPAVCCommonWorkerThread@Den@@@Z @ 36 NONAME ; void TUpnpMessage::RegisterL(class Den::CCommonWorkerThread *)
+	?GetVDataTableStatic@TSigRMBufChainFlow@@SAPBUSVDataTableEntry@Meta@@XZ @ 37 NONAME ABSENT ; struct Meta::SVDataTableEntry const * TSigRMBufChainFlow::GetVDataTableStatic(void)
+	?GetVDataTable@TSigUPnPResponseInfo@@UBEPBUSVDataTableEntry@Meta@@XZ @ 38 NONAME ; struct Meta::SVDataTableEntry const * TSigUPnPResponseInfo::GetVDataTable(void) const
+	?GetVDataTable@TSigTUint8Size@@UBEPBUSVDataTableEntry@Meta@@XZ @ 39 NONAME ; struct Meta::SVDataTableEntry const * TSigTUint8Size::GetVDataTable(void) const
+	?GetVDataTableStatic@TSigUPnPClientRequestInfo@@SAPBUSVDataTableEntry@Meta@@XZ @ 40 NONAME ; struct Meta::SVDataTableEntry const * TSigUPnPClientRequestInfo::GetVDataTableStatic(void)
+	?GetVDataTable@TSubscribeRequestInfo@@UBEPBUSVDataTableEntry@Meta@@XZ @ 41 NONAME ; struct Meta::SVDataTableEntry const * TSubscribeRequestInfo::GetVDataTable(void) const
+	?GetAttribPtr@TSigParamSetAny@@UBEPAEH@Z @ 42 NONAME ; unsigned char * TSigParamSetAny::GetAttribPtr(int) const
+	?GetAttribPtr@THttpUdpFlowQuery@@UBEPAEH@Z @ 43 NONAME ; unsigned char * THttpUdpFlowQuery::GetAttribPtr(int) const
+	?GetAttribPtr@TSigRMBufChainFlow@@UBEPAEH@Z @ 44 NONAME ABSENT ; unsigned char * TSigRMBufChainFlow::GetAttribPtr(int) const
+	?GetVDataTable@TSigParamSetAny@@UBEPBUSVDataTableEntry@Meta@@XZ @ 45 NONAME ; struct Meta::SVDataTableEntry const * TSigParamSetAny::GetVDataTable(void) const
+	?GetVDataTableStatic@TSigParamSetFlow@@SAPBUSVDataTableEntry@Meta@@XZ @ 46 NONAME ; struct Meta::SVDataTableEntry const * TSigParamSetFlow::GetVDataTableStatic(void)
+	?GetVDataTableStatic@TSigSsdpInfo@@SAPBUSVDataTableEntry@Meta@@XZ @ 47 NONAME ; struct Meta::SVDataTableEntry const * TSigSsdpInfo::GetVDataTableStatic(void)
+	?GetVDataTable@TSubsribeResponseInfo@@UBEPBUSVDataTableEntry@Meta@@XZ @ 48 NONAME ; struct Meta::SVDataTableEntry const * TSubsribeResponseInfo::GetVDataTable(void) const
+	?GetVDataTable@TEventNotifyRequestInfo@@UBEPBUSVDataTableEntry@Meta@@XZ @ 49 NONAME ; struct Meta::SVDataTableEntry const * TEventNotifyRequestInfo::GetVDataTable(void) const
+	?GetAttribPtr@TSigSsdpInfo@@UBEPAEH@Z @ 50 NONAME ; unsigned char * TSigSsdpInfo::GetAttribPtr(int) const
+	?GetAttribPtr@THttpClientFlowQuery@@UBEPAEH@Z @ 51 NONAME ; unsigned char * THttpClientFlowQuery::GetAttribPtr(int) const
+	?Table@TUPnPTable@@SAABUTStringTable@@XZ @ 52 NONAME ; struct TStringTable const & TUPnPTable::Table(void)
+	?GetVDataTable@TSigNumberVersionBufChain@@UBEPBUSVDataTableEntry@Meta@@XZ @ 53 NONAME ABSENT ; struct Meta::SVDataTableEntry const * TSigNumberVersionBufChain::GetVDataTable(void) const
+	?DeRegister@TUpnpMessage@@SAXXZ @ 54 NONAME ; void TUpnpMessage::DeRegister(void)
+	?GetVDataTable@TSigUPnPClientRequestInfo@@UBEPBUSVDataTableEntry@Meta@@XZ @ 55 NONAME ; struct Meta::SVDataTableEntry const * TSigUPnPClientRequestInfo::GetVDataTable(void) const
+	?GetVDataTableStatic@TEventNotifyRequestInfo@@SAPBUSVDataTableEntry@Meta@@XZ @ 56 NONAME ; struct Meta::SVDataTableEntry const * TEventNotifyRequestInfo::GetVDataTableStatic(void)
+	?GetVDataTable@TSigRMemChunkFlow@@UBEPBUSVDataTableEntry@Meta@@XZ @ 57 NONAME ; struct Meta::SVDataTableEntry const * TSigRMemChunkFlow::GetVDataTable(void) const
+	?GetAttribPtr@TSigNumberVersionMemChunk@@UBEPAEH@Z @ 58 NONAME ; unsigned char * TSigNumberVersionMemChunk::GetAttribPtr(int) const
+	?GetVDataTable@TSigNumberVersionMemChunk@@UBEPBUSVDataTableEntry@Meta@@XZ @ 59 NONAME ; struct Meta::SVDataTableEntry const * TSigNumberVersionMemChunk::GetVDataTable(void) const
+	?GetVDataTableStatic@TSigRMemChunkFlow@@SAPBUSVDataTableEntry@Meta@@XZ @ 60 NONAME ; struct Meta::SVDataTableEntry const * TSigRMemChunkFlow::GetVDataTableStatic(void)
+	?GetVDataTable@TSigNumberMemChunk@@UBEPBUSVDataTableEntry@Meta@@XZ @ 61 NONAME ; struct Meta::SVDataTableEntry const * TSigNumberMemChunk::GetVDataTable(void) const
+	?GetAttribPtr@TSigNumberMemChunk@@UBEPAEH@Z @ 62 NONAME ; unsigned char * TSigNumberMemChunk::GetAttribPtr(int) const
+	?GetVDataTableStatic@TSigNumberMemChunk@@SAPBUSVDataTableEntry@Meta@@XZ @ 63 NONAME ; struct Meta::SVDataTableEntry const * TSigNumberMemChunk::GetVDataTableStatic(void)
+	?GetVDataTableStatic@TSigNumberVersionMemChunk@@SAPBUSVDataTableEntry@Meta@@XZ @ 64 NONAME ; struct Meta::SVDataTableEntry const * TSigNumberVersionMemChunk::GetVDataTableStatic(void)
+	?GetAttribPtr@TSigRMemChunkFlow@@UBEPAEH@Z @ 65 NONAME ; unsigned char * TSigRMemChunkFlow::GetAttribPtr(int) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/eabi/upnputilsu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,115 @@
+EXPORTS
+	_ZN10TUPnPTable5TableEv @ 1 NONAME
+	_ZN12TSigParamSet19GetVDataTableStaticEv @ 2 NONAME
+	_ZN12TSigSsdpInfo19GetVDataTableStaticEv @ 3 NONAME
+	_ZN12TUpnpMessage10DeRegisterEv @ 4 NONAME
+	_ZN12TUpnpMessage9RegisterLEPN3Den19CCommonWorkerThreadE @ 5 NONAME
+	_ZN14TSigTUint8Size19GetVDataTableStaticEv @ 6 NONAME
+	_ZN14TUPnPFlowQuery19GetVDataTableStaticEv @ 7 NONAME
+	_ZN14TUPnPFlowQuery5MatchERN9Factories18TFactoryObjectInfoE @ 8 NONAME
+	_ZN15TSigParamSetAny19GetVDataTableStaticEv @ 9 NONAME
+	_ZN16TSigParamSetFlow19GetVDataTableStaticEv @ 10 NONAME
+	_ZN17THttpUdpFlowQuery19GetVDataTableStaticEv @ 11 NONAME
+	_ZN17TSigRMemChunkFlow19GetVDataTableStaticEv @ 12 NONAME
+	_ZN18TSigNumberMemChunk19GetVDataTableStaticEv @ 13 NONAME
+	_ZN19SMetaDataNetCtorExt5LoadLER6TPtrC8 @ 14 NONAME
+	_ZN20THttpClientFlowQuery19GetVDataTableStaticEv @ 15 NONAME
+	_ZN20THttpServerFlowQuery19GetVDataTableStaticEv @ 16 NONAME
+	_ZN20TSigUPnPResponseInfo19GetVDataTableStaticEv @ 17 NONAME
+	_ZN21TSubscribeRequestInfo19GetVDataTableStaticEv @ 18 NONAME
+	_ZN21TSubsribeResponseInfo19GetVDataTableStaticEv @ 19 NONAME
+	_ZN23TEventNotifyRequestInfo19GetVDataTableStaticEv @ 20 NONAME
+	_ZN25TSigNumberVersionMemChunk19GetVDataTableStaticEv @ 21 NONAME
+	_ZN25TSigUPnPClientRequestInfo19GetVDataTableStaticEv @ 22 NONAME
+	_ZNK12TSigParamSet12GetAttribPtrEi @ 23 NONAME
+	_ZNK12TSigParamSet13GetVDataTableEv @ 24 NONAME
+	_ZNK12TSigSsdpInfo12GetAttribPtrEi @ 25 NONAME
+	_ZNK12TSigSsdpInfo13GetVDataTableEv @ 26 NONAME
+	_ZNK14TSigTUint8Size12GetAttribPtrEi @ 27 NONAME
+	_ZNK14TSigTUint8Size13GetVDataTableEv @ 28 NONAME
+	_ZNK14TUPnPFlowQuery12GetAttribPtrEi @ 29 NONAME
+	_ZNK14TUPnPFlowQuery13GetVDataTableEv @ 30 NONAME
+	_ZNK15TSigParamSetAny12GetAttribPtrEi @ 31 NONAME
+	_ZNK15TSigParamSetAny13GetVDataTableEv @ 32 NONAME
+	_ZNK16TSigParamSetFlow12GetAttribPtrEi @ 33 NONAME
+	_ZNK16TSigParamSetFlow13GetVDataTableEv @ 34 NONAME
+	_ZNK17THttpUdpFlowQuery12GetAttribPtrEi @ 35 NONAME
+	_ZNK17THttpUdpFlowQuery13GetVDataTableEv @ 36 NONAME
+	_ZNK17TSigRMemChunkFlow12GetAttribPtrEi @ 37 NONAME
+	_ZNK17TSigRMemChunkFlow13GetVDataTableEv @ 38 NONAME
+	_ZNK18TSigNumberMemChunk12GetAttribPtrEi @ 39 NONAME
+	_ZNK18TSigNumberMemChunk13GetVDataTableEv @ 40 NONAME
+	_ZNK20THttpClientFlowQuery12GetAttribPtrEi @ 41 NONAME
+	_ZNK20THttpClientFlowQuery13GetVDataTableEv @ 42 NONAME
+	_ZNK20THttpServerFlowQuery12GetAttribPtrEi @ 43 NONAME
+	_ZNK20THttpServerFlowQuery13GetVDataTableEv @ 44 NONAME
+	_ZNK20TSigUPnPResponseInfo12GetAttribPtrEi @ 45 NONAME
+	_ZNK20TSigUPnPResponseInfo13GetVDataTableEv @ 46 NONAME
+	_ZNK21TSubscribeRequestInfo12GetAttribPtrEi @ 47 NONAME
+	_ZNK21TSubscribeRequestInfo13GetVDataTableEv @ 48 NONAME
+	_ZNK21TSubsribeResponseInfo12GetAttribPtrEi @ 49 NONAME
+	_ZNK21TSubsribeResponseInfo13GetVDataTableEv @ 50 NONAME
+	_ZNK23TEventNotifyRequestInfo12GetAttribPtrEi @ 51 NONAME
+	_ZNK23TEventNotifyRequestInfo13GetVDataTableEv @ 52 NONAME
+	_ZNK25TSigNumberVersionMemChunk12GetAttribPtrEi @ 53 NONAME
+	_ZNK25TSigNumberVersionMemChunk13GetVDataTableEv @ 54 NONAME
+	_ZNK25TSigUPnPClientRequestInfo12GetAttribPtrEi @ 55 NONAME
+	_ZNK25TSigUPnPClientRequestInfo13GetVDataTableEv @ 56 NONAME
+	_ZTI12TSigParamSet @ 57 NONAME
+	_ZTI12TSigSsdpInfo @ 58 NONAME
+	_ZTI14TSigTUint8Size @ 59 NONAME
+	_ZTI14TUPnPFlowQuery @ 60 NONAME
+	_ZTI15TSigParamSetAny @ 61 NONAME
+	_ZTI16TSigParamSetFlow @ 62 NONAME
+	_ZTI17THttpUdpFlowQuery @ 63 NONAME
+	_ZTI17TSigRMemChunkFlow @ 64 NONAME
+	_ZTI18TSigNumberMemChunk @ 65 NONAME
+	_ZTI20THttpClientFlowQuery @ 66 NONAME
+	_ZTI20THttpServerFlowQuery @ 67 NONAME
+	_ZTI20TSigUPnPResponseInfo @ 68 NONAME
+	_ZTI21TSubscribeRequestInfo @ 69 NONAME
+	_ZTI21TSubsribeResponseInfo @ 70 NONAME
+	_ZTI23TEventNotifyRequestInfo @ 71 NONAME
+	_ZTI25TSigNumberVersionMemChunk @ 72 NONAME
+	_ZTI25TSigUPnPClientRequestInfo @ 73 NONAME
+	_ZTIN4Meta5TMetaI12TAppProtAddrEE @ 74 NONAME
+	_ZTIN4Meta5TMetaI8TVersionEE @ 75 NONAME
+	_ZTIN4Meta5TMetaI9RMemChunkEE @ 76 NONAME
+	_ZTIN4Meta5TMetaI9TSsdpInfoEE @ 77 NONAME
+	_ZTIN4Meta5TMetaIN8Messages7TNodeIdEEE @ 78 NONAME
+	_ZTIN4Meta5TMetaIP12CTransactionEE @ 79 NONAME
+	_ZTIN4Meta5TMetaIP28CSubConExtensionParameterSetEE @ 80 NONAME
+	_ZTIN4Meta5TMetaIPhEE @ 81 NONAME
+	_ZTIN4Meta5TMetaIPvEE @ 82 NONAME
+	_ZTIN4Meta5TMetaIiEE @ 83 NONAME
+	_ZTIN4Meta8TMetaPtrI19SMetaDataNetCtorExtEE @ 84 NONAME
+	_ZTV12TSigParamSet @ 85 NONAME
+	_ZTV12TSigSsdpInfo @ 86 NONAME
+	_ZTV14TSigTUint8Size @ 87 NONAME
+	_ZTV14TUPnPFlowQuery @ 88 NONAME
+	_ZTV15TSigParamSetAny @ 89 NONAME
+	_ZTV16TSigParamSetFlow @ 90 NONAME
+	_ZTV17THttpUdpFlowQuery @ 91 NONAME
+	_ZTV17TSigRMemChunkFlow @ 92 NONAME
+	_ZTV18TSigNumberMemChunk @ 93 NONAME
+	_ZTV20THttpClientFlowQuery @ 94 NONAME
+	_ZTV20THttpServerFlowQuery @ 95 NONAME
+	_ZTV20TSigUPnPResponseInfo @ 96 NONAME
+	_ZTV21TSubscribeRequestInfo @ 97 NONAME
+	_ZTV21TSubsribeResponseInfo @ 98 NONAME
+	_ZTV23TEventNotifyRequestInfo @ 99 NONAME
+	_ZTV25TSigNumberVersionMemChunk @ 100 NONAME
+	_ZTV25TSigUPnPClientRequestInfo @ 101 NONAME
+	_ZTVN4Meta5TMetaI12TAppProtAddrEE @ 102 NONAME
+	_ZTVN4Meta5TMetaI8TVersionEE @ 103 NONAME
+	_ZTVN4Meta5TMetaI9RMemChunkEE @ 104 NONAME
+	_ZTVN4Meta5TMetaI9TSsdpInfoEE @ 105 NONAME
+	_ZTVN4Meta5TMetaIN8Messages7TNodeIdEEE @ 106 NONAME
+	_ZTVN4Meta5TMetaIP12CTransactionEE @ 107 NONAME
+	_ZTVN4Meta5TMetaIP28CSubConExtensionParameterSetEE @ 108 NONAME
+	_ZTVN4Meta5TMetaIPhEE @ 109 NONAME
+	_ZTVN4Meta5TMetaIPvEE @ 110 NONAME
+	_ZTVN4Meta5TMetaIiEE @ 111 NONAME
+	_ZTVN4Meta8TMetaPtrI19SMetaDataNetCtorExtEE @ 112 NONAME
+	_ZThn4_N14TUPnPFlowQuery5MatchERN9Factories18TFactoryObjectInfoE @ 113 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,29 @@
+// 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:
+// blf.inf
+// 
+//
+
+
+PRJ_TESTEXPORTS
+
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/pnpextparameterfamily.h		/epoc32/include/upnp/pnpextparameterfamily.h
+#endif
+../inc/pnpextparameterfamily.inl	SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/pnpextparameterfamily.inl)
+../inc/tupnptable.h SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(upnp/tupnptable.h)
+
+
+PRJ_TESTMMPFILES
+upnputils.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/group/upnputils.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,52 @@
+// 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:
+//
+
+TARGET		  upnputils.dll
+TARGETTYPE	  dll
+UID			 0x00000000 0x2001DC6C
+
+CAPABILITY	 All -TCB
+
+USERINCLUDE	 ../inc
+USERINCLUDE	 ../../upnpmessage/inc
+USERINCLUDE	 ../../Server/Flow/inc
+
+SYSTEMINCLUDE   /epoc32/include
+SYSTEMINCLUDE   /epoc32/include/comms-infras
+
+START STRINGTABLE ../strings/UpnpStringConstants.st
+	EXPORTPATH	/epoc32/include/upnp 
+END
+
+SOURCEPATH	  ../src
+SOURCE 		  upnp_cf_msgs.cpp
+SOURCE		  tupnptable.cpp
+
+LIBRARY		 euser.lib 
+LIBRARY		 bafl.lib 
+LIBRARY 	 efsrv.lib
+LIBRARY		 netmeta.lib
+LIBRARY		 esocksvr.lib
+LIBRARY		 commsfw.lib
+LIBRARY		 esock.lib
+LIBRARY		 insock.lib
+LIBRARY 	 virtualconstructors.lib
+LIBRARY 	 nodemessages.lib
+LIBRARY 	 chunkmgr.lib
+
+
+DEBUGLIBRARY comsdbgutil.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/inc/pnpextparameterfamily.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,35 @@
+// 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 __PNPEXTPARAMETERFAMILY_H__
+#define __PNPEXTPARAMETERFAMILY_H__
+
+#include <es_sock.h>
+#include <elements/metadata.h>
+#include <comms-infras/es_parameterfamily.h>
+#include <comms-infras/es_parameterbundle.h>
+
+/** Container of parameter sets.
+@internalAll
+*/
+class RUPnPParameterFamily : public RParameterFamily
+	{
+	public:
+		inline void DeleteParamSetL ( TInt aIndex );
+	};
+
+#include <upnp/pnpextparameterfamily.inl>
+
+#endif //__PNPEXTPARAMETERFAMILY_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/inc/pnpextparameterfamily.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,37 @@
+// 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:
+//
+
+void RUPnPParameterFamily::DeleteParamSetL ( TInt aIndex )
+	{
+	// UPnP is not having any usage of EAcceptable,EGranted
+	// so call three deletes that make sure, the null elements 
+	// as well are deleted.
+	
+	DeleteParameterSetL ( aIndex * ENumValues );
+	if ( CountParameterSets() )
+		{
+		if ( aIndex == 0 )
+			{
+			DeleteParameterSetL ( aIndex );
+			DeleteParameterSetL ( aIndex );
+
+			}
+		else
+			{
+			DeleteParameterSetL ( aIndex * ENumValues - RParameterFamily::EAcceptable );
+			DeleteParameterSetL ( aIndex * ENumValues - RParameterFamily::EGranted );					
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/inc/tupnptable.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,33 @@
+// 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	__TUPNPTABLE_H__
+#define	__TUPNPTABLE_H__
+
+// System includes
+#include <e32std.h>
+#include <stringpool.h>
+#include <upnp/upnpstringconstants.h>
+
+class TUPnPTable
+{
+private:
+	TUPnPTable();
+		
+public:
+	IMPORT_C static const TStringTable& Table();	
+};
+
+#endif //__TUPNPTABLE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/inc/upnp_cf_msgs.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,458 @@
+// 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:
+// UPnP-proprietary messages
+// //Pls.Pls..In Product Delivery before using these Messages check existing Comms Message
+// //support in ss_nodemessages.h
+// 
+//
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef __UPNPCFMSGS_H
+#define __UPNPCFMSGS_H
+
+#include <comms-infras/ss_nodemessages.h>
+//#include <es_mbuf.h>
+//#include <comms-infras/ss_fact2.h>
+#include <appprotintf/app_protintf_msgs.h>
+//#include <cchunkmanager.h>
+#include <rmemchunk.h>
+
+#include "ctransaction.h"
+
+using namespace ESock;
+using namespace Messages;
+
+const TInt KUpnpMessagesImplementationUid = 0x2000D060;
+
+
+struct TSsdpInfo
+	{
+
+	TSsdpInfo ()
+	{
+	}
+
+	TSsdpInfo ( RMemChunk& aSearchTarget )
+	: iSearchTarget ( aSearchTarget )
+	{
+	}
+
+	TSsdpInfo ( TInt aMx, RMemChunk& aSearchTarget )
+	: iMx ( aMx ),
+	iSearchTarget ( aSearchTarget )
+	{
+	}
+
+	TSsdpInfo ( RMemChunk& aSearchTarget, const TAppProtAddr& aAddr )
+	:iSearchTarget ( aSearchTarget ),
+	iAddr ( aAddr )
+	{
+	}
+
+	TSsdpInfo ( TInt aMx, RMemChunk& aLocation, RMemChunk& aUsn, RMemChunk& aSearchTarget )
+	: iMx ( aMx ),
+	iLocation ( aLocation ),
+	iUsn ( aUsn ),
+	iSearchTarget ( aSearchTarget )
+	{
+	}
+
+	TSsdpInfo ( RMemChunk& aUsn, RMemChunk& aSearchTarget )
+	: iUsn ( aUsn ),
+	iSearchTarget ( aSearchTarget )
+	{
+	}
+
+	TSsdpInfo ( TInt aMx, RMemChunk& aLocation, RMemChunk& aUsn, RMemChunk& aSearchTarget, const TAppProtAddr& aAddr )
+	: iMx ( aMx ),
+	iLocation ( aLocation ),
+	iUsn ( aUsn ),
+	iSearchTarget ( aSearchTarget ),
+	iAddr ( aAddr )
+	{
+
+	}
+
+	TInt 		iMx;
+	RMemChunk 	iLocation;
+	RMemChunk 	iUsn;
+	RMemChunk	iSearchTarget;
+	TAppProtAddr iAddr;
+	};
+
+
+
+struct SMetaDataNetCtorExt : public Meta::SMetaDataNetCtor
+	{
+	public:
+	IMPORT_C static Meta::SMetaDataNetCtor* LoadL(TPtrC8& aDes);
+	};
+
+	
+// UPnP Custom Message Signatures
+DECLARE_MESSAGE_SIG_1 ( SigParamSet, CSubConExtensionParameterSet*, ParamSet )
+DECLARE_MESSAGE_SIG_3 ( SigNumberVersionMemChunk, TInt, Status, TVersion, Version, RMemChunk, BodyData )
+DECLARE_MESSAGE_SIG_2 ( SigParamSetFlow, CSubConExtensionParameterSet*, ParamSet, TNodeId, FlowId)
+DECLARE_MESSAGE_SIG_2 ( SigRMemChunkFlow, RMemChunk, MemChunk, TNodeId, FlowId)
+DECLARE_MESSAGE_SIG_1 ( SigSsdpInfo, TSsdpInfo, SsdpInfo )
+
+DECLARE_MESSAGE_SIG_2 ( SigParamSetAny, CSubConExtensionParameterSet*, ParamSet, TAny*, Ptr)
+DECLARE_MESSAGE_SIG_2 ( SigTUint8Size, const TUint8*, Ptr, TInt, Size )
+
+
+struct TSigUPnPResponseInfo: public Messages::TSignatureBase
+    {
+protected:
+	inline TSigUPnPResponseInfo () : iInfo(NULL) {	}
+	explicit TSigUPnPResponseInfo ( const Messages::TNodeSignal::TMessageId& aMessageId, CTransaction* aTrans, TInt aStatus, SMetaDataNetCtorExt* aInfo )
+	: Messages::TSignatureBase ( aMessageId ),
+	  iTrans ( aTrans ), iStatus ( aStatus ), iInfo ( aInfo )
+		{	}
+public:
+	DECLARE_MVIP_CTR ( TSigUPnPResponseInfo )
+   	EXPORT_DATA_VTABLE_AND_FN
+	CTransaction* 		iTrans;
+	TInt 				iStatus;
+	SMetaDataNetCtorExt* iInfo;
+    };
+    
+template<TInt id, TInt32 realm>
+struct TMessageSigUPnPResponseInfo : public TSigUPnPResponseInfo, public Messages::TSignatureBase::TTypeToMessageId<id, realm>
+    {
+	explicit TMessageSigUPnPResponseInfo ( CTransaction* aTrans, TInt aStatus, SMetaDataNetCtorExt* aInfo )
+	: TSigUPnPResponseInfo ( Messages::TNodeSignal::TMessageId ( id, realm ), aTrans, aStatus, aInfo )
+    	{	}
+    };
+
+struct TUPnPFlowQuery: public TFactoryQueryBase
+    {
+public:
+	inline TUPnPFlowQuery () {	}
+	explicit TUPnPFlowQuery ( TNodeId aSCPRId, TInt aDataClientType, CChunkManager* aChunkManager ) : iSCPRId ( aSCPRId ), iDataClientType ( aDataClientType ), iChunkManager ( aChunkManager)
+		{	}
+	IMPORT_C Factories::MFactoryQuery::TMatchResult Match ( Factories::TFactoryObjectInfo& aObjectInfo );
+
+	TNodeId                       iSCPRId;
+	TInt                          iDataClientType;
+	CChunkManager*  			  iChunkManager;
+
+	DECLARE_MVIP_CTR ( TUPnPFlowQuery )
+	EXPORT_DATA_VTABLE_AND_FN
+    };
+
+struct THttpUdpFlowQuery: public TUPnPFlowQuery
+	{
+	public :
+	inline THttpUdpFlowQuery () {	}
+	explicit THttpUdpFlowQuery ( const TNodeId aSCPRId, TInt aDataClientType, CChunkManager* aChunkManager=NULL ) : TUPnPFlowQuery( aSCPRId, aDataClientType, aChunkManager ) 
+		{	}
+	Factories::MFactoryQuery::TMatchResult Compare ( Factories::TFactoryObjectInfo& aObjectInfo );
+
+	DECLARE_MVIP_CTR ( THttpUdpFlowQuery )
+	EXPORT_DATA_VTABLE_AND_FN
+	};
+
+struct THttpClientFlowQuery: public TUPnPFlowQuery
+	{
+	public :
+	inline THttpClientFlowQuery () {	}
+	explicit THttpClientFlowQuery ( TAppProtAddr aSockAddr, TNodeId aSCPRId, TInt aDataClientType, TInt aClientFlags, CChunkManager* aChunkManager=NULL ) : iSockAddr ( aSockAddr ), iClientFlags(aClientFlags), TUPnPFlowQuery ( aSCPRId, aDataClientType, aChunkManager )
+		{	}
+	Factories::MFactoryQuery::TMatchResult Compare ( Factories::TFactoryObjectInfo& aObjectInfo );
+
+	enum TClientFlags
+		{
+		ECreateNew,
+		EUseExisting,
+		};
+
+	TAppProtAddr	iSockAddr;
+	TInt 	 		iClientFlags;
+
+	DECLARE_MVIP_CTR ( THttpClientFlowQuery )
+	EXPORT_DATA_VTABLE_AND_FN
+	};
+
+struct THttpServerFlowQuery: public TUPnPFlowQuery
+	{
+	public :
+	inline THttpServerFlowQuery (): iUri ( NULL ) {	}
+	explicit THttpServerFlowQuery ( const TUint8* aUri, TInt aLength, TNodeId aCPRId, TInt aDataClientType, CChunkManager* aChunkManager=NULL )
+	: TUPnPFlowQuery ( aCPRId, aDataClientType, aChunkManager ), iUri ( aUri ), iLength ( aLength )
+		{	}
+	Factories::MFactoryQuery::TMatchResult Compare ( Factories::TFactoryObjectInfo& aObjectInfo );
+
+	const TUint8* 	iUri;
+	TInt 			iLength;
+
+	DECLARE_MVIP_CTR ( THttpServerFlowQuery )
+	EXPORT_DATA_VTABLE_AND_FN
+	};
+
+struct TSigNumberMemChunk: public TSigNumberVersionMemChunk
+    {
+protected:
+	inline TSigNumberMemChunk () {	};
+	TSigNumberMemChunk ( const Messages::TNodeSignal::TMessageId& aMessageId, TInt aStatus, TVersion aVersion, RMemChunk aBodyData, TInt aTimeOut, RMemChunk aURN )
+	: TSigNumberVersionMemChunk ( aMessageId, aStatus, aVersion, aBodyData ),
+      iTimeOut ( aTimeOut ), iURN ( aURN )
+		{	}
+public:
+	TInt		iTimeOut;
+	RMemChunk 	iURN;
+
+	DECLARE_MVIP_CTR ( TSigNumberMemChunk )
+   	EXPORT_DATA_VTABLE_AND_FN
+    };
+
+template<TInt id, TInt32 realm>
+struct TMessageSigNumberMemChunk: public TSigNumberMemChunk,
+								  public Messages::TNodeSignal::TTypeToMessageId<id, realm>
+    {
+	explicit TMessageSigNumberMemChunk ( TInt aStatus, TVersion aVersion, RMemChunk aBodyData, TInt aTimeOut, RMemChunk aURN )
+	: TSigNumberMemChunk ( Messages::TNodeSignal::TMessageId ( id, realm ), aStatus, aVersion, aBodyData, aTimeOut, aURN )
+		{	}
+    };
+
+
+// Subscription response info
+struct TSubsribeResponseInfo: public SMetaDataNetCtorExt
+	{
+public:
+	inline TSubsribeResponseInfo() {}
+	/*
+	explicit TSubsribeResponseInfo ( RMemChunk& aSid, TInt aTimeout): iSid(aSid),iTimeout(aTimeout)
+			{
+			}
+	*/
+	TInt 		iTimeout;
+	RMemChunk 	iSid;
+
+   DECLARE_MVIP_CTR ( TSubsribeResponseInfo )
+   EXPORT_DATA_VTABLE_AND_FN
+	};
+
+struct TSigUPnPClientRequestInfo: public Messages::TSignatureBase
+    {
+protected:
+	inline TSigUPnPClientRequestInfo () : iInfo ( NULL ) {	}
+	explicit TSigUPnPClientRequestInfo ( const Messages::TNodeSignal::TMessageId& aMessageId, TInt aRequestMethod, RMemChunk& aUri, RMemChunk& aBody, SMetaDataNetCtorExt* aInfo )
+	: Messages::TSignatureBase ( aMessageId ),
+	  iRequestMethod ( aRequestMethod ), iUri ( aUri ), iBody ( aBody ), iInfo ( aInfo )
+		{	}
+public:
+	TInt iRequestMethod;
+   	RMemChunk iUri;
+   	RMemChunk iBody;
+   	SMetaDataNetCtorExt* iInfo;
+
+   	DECLARE_MVIP_CTR ( TSigUPnPClientRequestInfo )
+   	EXPORT_DATA_VTABLE_AND_FN
+   	};
+template<TInt id, TInt32 realm>
+struct TMessageSigUPnPClientRequestInfo: public TSigUPnPClientRequestInfo,
+									     public Messages::TNodeSignal::TTypeToMessageId<id, realm>
+    {
+	explicit TMessageSigUPnPClientRequestInfo ( TInt aRequestMethod, RMemChunk& aUri, RMemChunk& aBody, SMetaDataNetCtorExt* aInfo )
+	: TSigUPnPClientRequestInfo ( Messages::TNodeSignal::TMessageId ( id, realm ), aRequestMethod, aUri, aBody, aInfo )
+        {	}
+    };
+
+struct TSubscribeRequestInfo: public SMetaDataNetCtorExt
+	{
+public:
+	inline 	TSubscribeRequestInfo () {	}
+	/*
+	explicit TSubscribeRequestInfo ( const Messages::TNodeSignal::TMessageId& aMessageId, TInt aTimeOut, RMemChunk& aCallback, RMemChunk& aSID )
+		: iMessageId ( aMessageId ), iTimeOut ( aTimeOut ), iCallback ( aCallback ), iSid ( aSID )
+	{	}
+	*/
+
+	Messages::TNodeSignal::TMessageId iMessageId;
+	TInt 		iTimeOut;
+	RMemChunk 	iCallback;
+	RMemChunk 	iSid;
+
+	DECLARE_MVIP_CTR ( TSubscribeRequestInfo )
+	EXPORT_DATA_VTABLE_AND_FN
+	};
+
+struct TEventNotifyRequestInfo: public SMetaDataNetCtorExt
+	{
+public:
+	inline 	TEventNotifyRequestInfo () {	}
+	/*
+	explicit TEventNotifyRequestInfo ( const Messages::TNodeSignal::TMessageId& aMessageId, TInt aSeqKey, RMemChunk& aSid )
+	: iMessageId ( aMessageId ), iSeqKey ( aSeqKey ), iSid ( aSid )
+		{	}
+	*/
+	Messages::TNodeSignal::TMessageId iMessageId;
+	TInt		iSeqKey;
+	RMemChunk	iSid;
+
+	DECLARE_MVIP_CTR ( TEventNotifyRequestInfo )
+	EXPORT_DATA_VTABLE_AND_FN
+	};
+
+/*
+@internalComponent
+*/
+class TUpnpMessage
+	{
+  public:
+    enum { ERealmId = 0x2000D05B }; // Same as DLL Uid
+
+  	enum
+  	    {
+  	    // 0 is associated with Messages::TNodeSignal::TMessageId::KCFNullMessageId		
+		ESearchRequest		= 1,
+		EDescribeRequest	= 2,
+		EDescribeResponse	= 3,
+		ESubmitRequest		= 4,
+		EUPnPStopSearch		= 5,
+		EResponse			= 6,
+		ESubscribeResponse  = 7,
+		EFindOrCreateFlow	= 8,
+		EStopSearch			= 9,
+		ESubscribeRequest	= 10,
+		EUnSubscribeRequest = 11,		
+		ENotifyRequest		= 12,
+		EUPnPRequest		= 13,
+		EUPnPResponse		= 14,
+		ECreateNotifyFlow	= 15,
+		ESPDeviceRequest 	= 16,
+		ECreateServerFlow	= 17,
+		EUPnPSearchRequest	= 18,
+		EUPnPSearchResponse	= 19,
+		EUPnPPublishAliveRequest 	= 20,
+		EUPnPPublishByeRequest 		= 21,
+		EUPnPNotifyRegistration		= 22,
+		EUPnPPublishRegistration	= 23,
+		ECancelParamSet				= 24,
+		EUPnPClientRequest			= 25,
+		EStartTimer					= 26,
+		EStopTimer					= 27,
+		ERegisterRootDevice 		= 28,
+		ERootDeviceRegistered 		= 29,
+		EServiceJoinRequest			= 30,
+		EDeviceJoinRequest 			= 31,
+		EServiceValidated 			= 32,
+		ERegisterService			= 33,
+		ERegisterDevice 			= 34,
+		EServiceRegistered			= 35,
+		EServiceRegistration		= 36,
+		EDeviceRegistration			= 37,
+		EUnregisterService			= 38,
+		EUnregisterDevice			= 39,
+		EDeviceRepublish			= 40,
+		EDeviceUnpublish			= 41,
+		ERequestLocalHost			= 42,
+		ELocalHost					= 43,
+		EActivityStop				= 44,
+		EActivityStopped			= 45,
+		ECancelRequest				= 46,
+		ECancelled					= 47,
+ 	    };
+
+	enum TUpnpActivity
+    	{
+    	// Simple Activities
+	    EActivityFindOrCreateFlow = ESock::ECFActivityCustom + 1,
+	    EActivityCreateServerFlow,
+	    EActivityServiceJoinRequest,	    		    	    
+	    EActivityNewServiceRegister,	    
+	    EActivityServiceRegistration,	    
+	    EActivityDeviceRegistration,	    
+	    EActivitySubscriptionTimer,	    
+	    EActivityDeviceRepublish,	    
+        EActivityRegisterRootDevice,
+        
+        
+        // End of Simple Activities
+        // New Simple Activities, should be dclared before EndOfList
+        EActivityEndOfList = 0xA0,
+        
+    	// UPnP Parallel Activities
+	    EActivitySearchRequest = EActivityEndOfList + 1,
+	    EActivitySearchResponse,
+	    EActivityRegisterNotifyRequest,	    
+	    EActivityDescribeRequest,
+	    EActivitySubscribeRequest,
+	    EActivityUnSubscribeRequest,
+	    EActivityRequestInfo,
+	    EActivityNotifyRequest,
+	    EActivityEventNotify,
+	    };
+
+  public:
+  	IMPORT_C static void RegisterL ( Den::CCommonWorkerThread *aWorkerThread );
+    IMPORT_C static void DeRegister ( );
+	
+	//UPnP Search related Messages
+	typedef TMessageSigParamSet < ESearchRequest, ERealmId > TSearchRequest;
+	//UPnP describe related Messages
+ 	typedef TMessageSigParamSet < EDescribeRequest, ERealmId > TDescribeRequest;
+	// TCP flow finder
+	typedef TMessageSigParamSet < ESubscribeRequest, ERealmId > TSubscribeRequest;
+	typedef TMessageSigParamSet < EUPnPNotifyRegistration, ERealmId > TRegisterNotifyRequest;
+	typedef TMessageSigParamSet < ECancelParamSet, ERealmId > TCancelParamSet;
+
+	// SCPR - TCP Flow Interface
+	typedef TMessageSigNumberVersionMemChunk < EResponse, ERealmId > TResponse;
+	typedef TMessageSigNumberMemChunk < ESubscribeResponse, ERealmId > TSubscribeResponse;
+	typedef TMessageSigAny < ENotifyRequest, ERealmId > TNotifyRequest;
+	typedef TMessageSigAny < ECreateNotifyFlow, ERealmId > TCreateNotifyFlow;
+	typedef TMessageSigSsdpInfo < EUPnPSearchRequest, ERealmId > TUPnPSearchRequest;
+	typedef TMessageSigSsdpInfo < EUPnPSearchResponse, ERealmId > TUPnPSearchResponse;
+	
+	typedef TMessageSigSsdpInfo < EUPnPPublishAliveRequest, ERealmId > TUPnPPublishAliveRequest;
+	typedef TMessageSigSsdpInfo < EUPnPPublishByeRequest, ERealmId > TUPnPPublishByeRequest;
+	typedef TMessageSigSsdpInfo < EUPnPNotifyRegistration, ERealmId > TUPnPNotifyRegistration;
+	typedef TMessageSigSsdpInfo < EUPnPPublishRegistration, ERealmId > TUPnPPublishRegistration;
+
+	// Server related messages
+	typedef TMessageSigAny < EUPnPRequest, ERealmId > TUPnPRequestInfo;
+	typedef TMessageSigUPnPResponseInfo < EUPnPResponse, ERealmId > TUPnPResponseInfo;
+
+	typedef TMessageSigVoid < ECreateServerFlow, ERealmId > TCreateServerFlow;
+	typedef TMessageSigVoid < ECancelRequest, ERealmId > TCancelRequest;
+	typedef TMessageSigVoid < ECancelled, ERealmId > TCancelled;
+	typedef TMessageSigUPnPClientRequestInfo < EUPnPClientRequest, ERealmId > TUPnPClientRequestInfo;
+
+	typedef TMessageSigVoid < EStartTimer, ERealmId > TStartTimer;
+	typedef TMessageSigVoid < EStopTimer, ERealmId > TStopTimer;
+	typedef TMessageSigVoid < EActivityStopped, ERealmId > TActivityStopped;
+
+	typedef TMessageSigAny < ERegisterRootDevice, ERealmId > TRegisterRootDevice;
+	typedef TMessageSigNumber < ERootDeviceRegistered, ERealmId > TRootDeviceRegistered;
+	typedef TMessageSigParamSet < EServiceJoinRequest, ERealmId > TServiceJoinRequest;
+	typedef TMessageSigParamSet < EDeviceJoinRequest, ERealmId > TDeviceJoinRequest;
+	typedef TMessageSigNumber < EServiceValidated, ERealmId > TServiceValidated;
+	typedef TMessageSigParamSetAny < ERegisterService, ERealmId > TRegisterService;
+	typedef TMessageSigParamSetAny < ERegisterDevice, ERealmId > TRegisterDevice;
+	typedef TMessageSigNumber < EServiceRegistered, ERealmId > TServiceRegistered;
+	typedef TMessageSigParamSet < EServiceRegistration, ERealmId > TServiceRegistration;
+	typedef TMessageSigParamSet < EDeviceRegistration, ERealmId > TDeviceRegistration;
+	typedef TMessageSigTUint8Size < EUnregisterService, ERealmId > TUnregisterService;
+	typedef TMessageSigTUint8Size < EUnregisterDevice, ERealmId > TUnregisterDevice;
+	typedef TMessageSigVoid < EDeviceRepublish, ERealmId > TDeviceRepublish;
+	typedef TMessageSigVoid < ERequestLocalHost, ERealmId > TRequestLocalHost;
+	typedef TMessageSigVoid < ELocalHost, ERealmId > TLocalHost;
+	};
+
+#endif // UPNPCFMSGS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/src/tupnptable.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,22 @@
+// 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 <upnp/tupnptable.h>
+
+EXPORT_C const TStringTable& TUPnPTable::Table()
+	{
+	return UPnP::Table;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/src/upnp_cf_msgs.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,277 @@
+// 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:
+// UPnP-proprietary messages
+// 
+//
+
+/**
+ @file
+ @internalTechnology
+*/
+//System Includes 
+#include <ss_glob.h>
+#include <comms-infras/metatype.h>
+#include <comms-infras/metabuffer.h>
+#include <comms-infras/ss_thread.h>
+
+
+//Local Includes
+#include "upnp_cf_msgs.h"
+#include "upnpflowbase.h"
+#include "httpserverflow.h"
+#include "httpclientflow.h"
+
+using namespace Messages;
+using namespace Factories;
+
+// UPnP Message _Signatures_ (NOT messages)
+enum EMessageTypeId 
+	{        
+    ESigParamSet			= 1,		
+    EUPnPFlow				= 2,
+    EClientFlow				= 3,
+    EServerFlow				= 4,
+    EUdpFlow				= 5,
+    ESigNumberVersionMemChunk = 6,
+    ESigNumberMemChunk		= 7,
+    ESigParamSetFlow 		= 8,
+    ESigUPnPRequestInfo		= 9,
+    ESigUPnPResponseInfo	= 10,
+    ESigUPnPSubscriptionInfo = 11,
+    ESigRMemChunkFlow      = 12,
+    ESigRMBufInt			= 13,
+    ESigSsdpInfo			= 14,
+    ESigParamSetAny			= 15,
+    ESigTUint8Size       	= 16,
+    ESigUPnPClientRequestInfo		= 17,
+    ESigUPnPSubscribeReqInfo = 18,
+    ESigUPnPEventNotifyReqInfo = 19,
+	};
+
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSigParamSet, KUpnpMessagesImplementationUid, ESigParamSet )
+	REGISTER_ATTRIBUTE ( TSigParamSet, iParamSet, TMeta<CSubConExtensionParameterSet*> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TUPnPFlowQuery, KUpnpMessagesImplementationUid, EUPnPFlow )
+	REGISTER_ATTRIBUTE ( TUPnPFlowQuery, iSCPRId, TMeta<TNodeId> )
+	REGISTER_ATTRIBUTE ( TUPnPFlowQuery, iDataClientType, TMeta<TInt> )
+	REGISTER_ATTRIBUTE ( TUPnPFlowQuery, iChunkManager, TMeta<TAny*> )
+END_ATTRIBUTE_TABLE ()
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( THttpClientFlowQuery, KUpnpMessagesImplementationUid, EClientFlow )
+	REGISTER_ATTRIBUTE ( THttpClientFlowQuery, iSockAddr, TMeta<TAppProtAddr> )
+	REGISTER_ATTRIBUTE ( THttpClientFlowQuery, iClientFlags, TMeta<TInt> )
+END_ATTRIBUTE_TABLE_BASE ( TUPnPFlowQuery, EUPnPFlow )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN( THttpServerFlowQuery, KUpnpMessagesImplementationUid, EServerFlow )
+	REGISTER_ATTRIBUTE ( THttpServerFlowQuery, iUri, TMeta<TUint8*> )
+	REGISTER_ATTRIBUTE ( THttpServerFlowQuery, iLength, TMeta<TInt> )
+END_ATTRIBUTE_TABLE_BASE(TUPnPFlowQuery, EUPnPFlow)
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN( THttpUdpFlowQuery, KUpnpMessagesImplementationUid, EUdpFlow )
+END_ATTRIBUTE_TABLE_BASE(TUPnPFlowQuery, EUPnPFlow)
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN( TSigNumberVersionMemChunk, KUpnpMessagesImplementationUid, ESigNumberVersionMemChunk )
+	REGISTER_ATTRIBUTE ( TSigNumberVersionMemChunk, iStatus, TMeta<TInt> )
+	REGISTER_ATTRIBUTE ( TSigNumberVersionMemChunk, iVersion, TMeta<TVersion> )
+	REGISTER_ATTRIBUTE ( TSigNumberVersionMemChunk, iBodyData, TMeta<RMemChunk> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN( TSigNumberMemChunk, KUpnpMessagesImplementationUid, ESigNumberMemChunk )
+	REGISTER_ATTRIBUTE ( TSigNumberMemChunk, iTimeOut, TMeta<TInt> )
+	REGISTER_ATTRIBUTE ( TSigNumberMemChunk, iURN, TMeta<RMemChunk> )
+END_ATTRIBUTE_TABLE_BASE ( TSigNumberVersionMemChunk, ESigNumberVersionMemChunk )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSigParamSetFlow, KUpnpMessagesImplementationUid, ESigParamSetFlow )
+	REGISTER_ATTRIBUTE ( TSigParamSetFlow, iParamSet, TMeta<CSubConExtensionParameterSet*> )
+	REGISTER_ATTRIBUTE ( TSigParamSetFlow, iFlowId, TMeta<TNodeId> )	
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSigUPnPResponseInfo, KUpnpMessagesImplementationUid, ESigUPnPResponseInfo )
+	REGISTER_ATTRIBUTE ( TSigUPnPResponseInfo, iTrans, TMeta<CTransaction*> )
+	REGISTER_ATTRIBUTE ( TSigUPnPResponseInfo, iStatus, TMeta<TInt> )	
+	REGISTER_ATTRIBUTE ( TSigUPnPResponseInfo, iInfo, TMetaPtr<SMetaDataNetCtorExt> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSigRMemChunkFlow, KUpnpMessagesImplementationUid, ESigRMemChunkFlow )
+	REGISTER_ATTRIBUTE ( TSigRMemChunkFlow, iMemChunk, TMeta<RMemChunk> )
+	REGISTER_ATTRIBUTE ( TSigRMemChunkFlow, iFlowId, TMeta<TNodeId> )	
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSubsribeResponseInfo, KUpnpMessagesImplementationUid, ESigUPnPSubscriptionInfo )
+	REGISTER_ATTRIBUTE ( TSubsribeResponseInfo, iSid, TMeta<RMemChunk> )
+	REGISTER_ATTRIBUTE ( TSubsribeResponseInfo, iTimeout, TMeta<TInt> )
+END_ATTRIBUTE_TABLE ()
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSigSsdpInfo, KUpnpMessagesImplementationUid, ESigSsdpInfo )
+	REGISTER_ATTRIBUTE ( TSigSsdpInfo, iSsdpInfo, TMeta<TSsdpInfo> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSigParamSetAny, KUpnpMessagesImplementationUid, ESigParamSetAny )
+	REGISTER_ATTRIBUTE ( TSigParamSetAny, iParamSet, TMeta<CSubConExtensionParameterSet*> )
+	REGISTER_ATTRIBUTE ( TSigParamSetAny, iPtr, TMeta<TAny*> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSigTUint8Size, KUpnpMessagesImplementationUid, ESigTUint8Size )
+	REGISTER_ATTRIBUTE ( TSigTUint8Size, iPtr, TMeta<TUint8*> )
+	REGISTER_ATTRIBUTE ( TSigTUint8Size, iSize, TMeta<TInt> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSigUPnPClientRequestInfo, KUpnpMessagesImplementationUid, ESigUPnPClientRequestInfo )
+	REGISTER_ATTRIBUTE ( TSigUPnPClientRequestInfo, iRequestMethod, TMeta<TInt> )
+	REGISTER_ATTRIBUTE ( TSigUPnPClientRequestInfo, iUri, TMeta<RMemChunk> )	
+	REGISTER_ATTRIBUTE ( TSigUPnPClientRequestInfo, iBody, TMeta<RMemChunk> )
+	REGISTER_ATTRIBUTE ( TSigUPnPClientRequestInfo, iInfo, TMetaPtr<SMetaDataNetCtorExt> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TSubscribeRequestInfo, KUpnpMessagesImplementationUid, ESigUPnPSubscribeReqInfo )
+	REGISTER_ATTRIBUTE ( TSubscribeRequestInfo, iTimeOut, TMeta<TInt> )
+	REGISTER_ATTRIBUTE ( TSubscribeRequestInfo, iCallback, TMeta<RMemChunk> )	
+	REGISTER_ATTRIBUTE ( TSubscribeRequestInfo, iSid, TMeta<RMemChunk> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+EXPORT_START_ATTRIBUTE_TABLE_AND_FN ( TEventNotifyRequestInfo, KUpnpMessagesImplementationUid, ESigUPnPEventNotifyReqInfo )
+	REGISTER_ATTRIBUTE ( TEventNotifyRequestInfo, iSeqKey, TMeta<TInt> )
+	REGISTER_ATTRIBUTE ( TEventNotifyRequestInfo, iSid, TMeta<RMemChunk> )
+END_ATTRIBUTE_TABLE_BASE ( TSignatureBase, ESignatureVoid )
+
+
+DEFINE_MVIP_CTR ( TSigParamSet );
+DEFINE_MVIP_CTR ( TUPnPFlowQuery);
+DEFINE_MVIP_CTR ( THttpClientFlowQuery );
+DEFINE_MVIP_CTR ( THttpServerFlowQuery );
+DEFINE_MVIP_CTR ( THttpUdpFlowQuery );
+DEFINE_MVIP_CTR ( TSigNumberVersionMemChunk );
+DEFINE_MVIP_CTR ( TSigNumberMemChunk );
+DEFINE_MVIP_CTR ( TSigParamSetFlow );
+DEFINE_MVIP_CTR ( TSigUPnPResponseInfo );
+DEFINE_MVIP_CTR ( TSubsribeResponseInfo );
+DEFINE_MVIP_CTR ( TSigRMemChunkFlow );
+DEFINE_MVIP_CTR ( TSigSsdpInfo );
+DEFINE_MVIP_CTR ( TSigParamSetAny );
+DEFINE_MVIP_CTR ( TSigTUint8Size );
+DEFINE_MVIP_CTR ( TSigUPnPClientRequestInfo );
+DEFINE_MVIP_CTR ( TSubscribeRequestInfo );
+DEFINE_MVIP_CTR ( TEventNotifyRequestInfo );
+
+
+const TImplementationProxy SignatureImplementationTable[] = 
+	{
+	//NOTE: Entries must be sorted for the binary search to work efficiently!
+	MVIP_CTR_ENTRY ( ESigParamSet, TSigParamSet ),
+	MVIP_CTR_ENTRY ( EUPnPFlow, TUPnPFlowQuery ),
+	MVIP_CTR_ENTRY ( EClientFlow, THttpClientFlowQuery ),
+	MVIP_CTR_ENTRY ( EServerFlow, THttpServerFlowQuery ),
+	MVIP_CTR_ENTRY ( EUdpFlow, THttpUdpFlowQuery ),
+	MVIP_CTR_ENTRY ( ESigNumberVersionMemChunk, TSigNumberVersionMemChunk ),
+	MVIP_CTR_ENTRY ( ESigNumberMemChunk, TSigNumberMemChunk ),
+	MVIP_CTR_ENTRY ( ESigParamSetFlow, TSigParamSetFlow ),
+	MVIP_CTR_ENTRY ( ESigUPnPResponseInfo, TSigUPnPResponseInfo ),	
+	MVIP_CTR_ENTRY ( ESigUPnPSubscriptionInfo, TSubsribeResponseInfo ),
+	MVIP_CTR_ENTRY ( ESigRMemChunkFlow, TSigRMemChunkFlow ),
+	MVIP_CTR_ENTRY ( ESigSsdpInfo, TSigSsdpInfo ),
+	MVIP_CTR_ENTRY ( ESigParamSetAny, TSigParamSetAny ),
+	MVIP_CTR_ENTRY ( ESigTUint8Size, TSigTUint8Size ),
+	MVIP_CTR_ENTRY ( ESigUPnPClientRequestInfo, TSigUPnPClientRequestInfo ),
+	MVIP_CTR_ENTRY ( ESigUPnPSubscribeReqInfo, TSubscribeRequestInfo ),
+	MVIP_CTR_ENTRY ( ESigUPnPEventNotifyReqInfo, TEventNotifyRequestInfo ),
+	};
+
+
+/*
+Note we need to register if a message needs to carries completely new set of parameters that is not supported by 
+TCFMessage....for this refer TCFUmtsIfMessageSig in IPProtoMessages.h
+*/
+EXPORT_C void TUpnpMessage::RegisterL ( Den::CCommonWorkerThread *aWorkerThread )
+	{
+	ASSERT ( aWorkerThread );	
+	aWorkerThread->TransportGlobals().RegisterInterfaceL ( TUid::Uid( KUpnpMessagesImplementationUid), sizeof(SignatureImplementationTable) / sizeof(SignatureImplementationTable[0] ), SignatureImplementationTable );	
+	}
+
+EXPORT_C void TUpnpMessage::DeRegister ( )
+	{
+	CWorkerThread* worker = SockManGlobals::Get()->SelfWorker();
+	ASSERT ( worker );
+	worker->TransportGlobals().DeregisterInterface( TUid::Uid ( KUpnpMessagesImplementationUid ) );
+	}
+
+EXPORT_C MFactoryQuery::TMatchResult TUPnPFlowQuery::Match( TFactoryObjectInfo& aObjectInfo )
+	{
+	CUPnPFlowBase* flow = static_cast<CUPnPFlowBase*>(aObjectInfo.iInfo.iFactoryObject);
+	if( ( iDataClientType == EHttpClientFlow ) && ( flow->FlowType() == EHttpClientFlow ) )
+		{
+		return static_cast<THttpClientFlowQuery&>(*this).Compare(aObjectInfo);
+		}
+	if( ( iDataClientType == EHttpServerFlow ) && ( flow->FlowType() == EHttpServerFlow ) )
+		{
+		return static_cast<THttpServerFlowQuery&>(*this).Compare(aObjectInfo);
+		}
+	if( ( iDataClientType == EHttpUdpFlow ) && ( flow->FlowType() == EHttpUdpFlow ) )
+		{
+		return static_cast<THttpUdpFlowQuery&>(*this).Compare(aObjectInfo);
+		}
+	if( ( iDataClientType == EHttpMUdpFlow ) && ( flow->FlowType() == EHttpMUdpFlow ) )
+		{
+		return static_cast<THttpUdpFlowQuery&>(*this).Compare(aObjectInfo);
+		}
+	return MFactoryQuery::EContinue;
+	}
+
+MFactoryQuery::TMatchResult THttpServerFlowQuery::Compare( TFactoryObjectInfo& aFactoryObjectInfo )
+	{
+	CHttpServerFlow* flow = static_cast<CHttpServerFlow*>(aFactoryObjectInfo.iInfo.iFactoryObject);
+	TPtrC8 uri(iUri);
+	if(flow->Uri() == uri)
+		{
+		return MFactoryQuery::EMatch;
+		}
+	return MFactoryQuery::EContinue;
+	}
+
+MFactoryQuery::TMatchResult THttpUdpFlowQuery::Compare(TFactoryObjectInfo& /*aFactoryObjectInfo*/ )
+	{
+	return MFactoryQuery::EMatch;
+	}
+
+MFactoryQuery::TMatchResult THttpClientFlowQuery::Compare(TFactoryObjectInfo& aFactoryObjectInfo )
+	{
+	const CHttpClientFlow* flow = static_cast<const CHttpClientFlow*>(aFactoryObjectInfo.iInfo.iFactoryObject);
+	
+	// iClientFlags == ECreateNew is handled by factory, other needs to be checked here	
+ 	TInetAddr remName;
+   	flow->RemName( remName );
+  	if ( remName.Address ( ) == iSockAddr.iAddr && remName.Port ( ) ==  iSockAddr.iPort && flow->Status( ) == KErrNone )
+		{
+		return MFactoryQuery::EMatch;
+		}
+	return MFactoryQuery::EContinue;
+	}
+
+EXPORT_C SMetaDataNetCtor* SMetaDataNetCtorExt::LoadL(TPtrC8& aDes)
+	{
+	TUint8* ptr = const_cast<TUint8*> ( aDes.Ptr() );
+	TPtr8 ptr2 ( ptr, aDes.Length() );
+	RBuf8 buf;
+	buf.CreateL(aDes);
+	
+	TPtrC8 ptr3 (buf.Ptr(), buf.Length());
+	CMetaDataVirtualCtorInPlace* vctr = SockManGlobals::Get()->SelfWorker()->TransportGlobals().VirtualCtor();
+	SMetaDataNetCtor* meta = vctr->New(ptr3, ptr2);
+	TInt len = buf.Length() - ptr3.Length();
+	aDes.Set(aDes.Ptr() + len, aDes.Length() - len);
+	buf.Close();
+	return meta;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servicediscoveryandcontrol/pnp/test/upnp/upnputils/strings/UpnpStringConstants.st	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,61 @@
+#
+# 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 the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+fstringtable UPnP
+#
+#Standard tokens specified in UPnP Device Architecture
+EInfinite infinite
+ENS ns
+#
+#UPnP Headers
+ENTS NTS
+ENT NT
+EUSN USN
+EMX MX
+EST ST
+ETimeout Timeout
+ESEQ SEQ
+EMAN MAN
+ESoapAction SoapAction
+EExt Ext
+ESID SID
+ECallback Callback
+#
+#UPnP request methods
+ENotify NOTIFY
+EMSearch M-SEARCH
+EMPost M-POST
+ESubscribe SUBSCRIBE
+EUnsubscribe UNSUBSCRIBE
+#
+#Standard constants
+ETextXml text/xml
+EUtf8 utf-8
+EUpnpEvent upnp:event
+EUpnpPropChange upnp:propchange
+ESoapUrl http://schemas.xmlsoap.org/soap/envelope
+ESoapHeader 01-SOAPACTION
+ENsParam 01
+#
+#Standard response status codes
+ENotFound Not Found
+EBadRequest Bad request
+EInternalServerError Internal Server Error
+ENotImplemented Not Implemented
+EPreconditionFailed Precondition Failed
+EMethodNotAllowed Method Not Allowed
+EOk OK
+EUnsupportedMediaType Unsupported Media Type
+ERequestTimeout Request Timeout
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/srvdiscovery_info/srvdiscovery_metadata/srvdiscovery_metadata.mrp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,6 @@
+component           srvdiscovery_metadata
+source   \sf\mw\srvdiscovery\srvdiscovery_info\srvdiscovery_metadata 
+source   \sf\mw\srvdiscovery\package_definition.xml
+source   \sf\mw\srvdiscovery\distribution.policy.s60
+notes_source      \component_defs\release.src
+ipr T 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_4_0.dtd	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,86 @@
+ <!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>
+ <!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>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* 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:      upnpservices build file
+*
+*/
+
+
+
+
+
+// For compatibility with S60 3.2 and IAD branch
+#include "upnpplatformvar.hrh"
+
+// Export domain and SDK headers
+#include "../upnpstack_plat/group/bld.inf"
+
+// upnp stack
+#include "../upnpstack/group/bld.inf"
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/group/upnpplatformvar.hrh	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,44 @@
+/*
+* 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:      Defines flags which are needed for compatibility with
+* S60 3.2 SDKs and IAD branch.
+*
+*/
+
+
+
+
+
+
+#ifndef UPNPPLATFORMVAR_HRH
+#define UPNPPLATFORMVAR_HRH
+
+#ifndef __SERIES60_32__
+#include <platform_paths.hrh>
+#else
+#include <platform_paths.hrh>
+#endif
+
+// LOC export for MCL SDKs.
+// Loc files have to be exported to /epoc32/include/... in MCL SDKs.
+#define UPNP_LOC_EXPORT(exported) ../loc/##exported MW_LAYER_LOC_EXPORT_PATH(exported)
+
+// No need for language ids in MCL SDKs
+
+// No need for LOC file include paths MCL SDKs.
+// But they need to be defined.
+#define UPNP_LOC_INCLUDE_PATH_COMPONENT
+#define UPNP_LOC_INCLUDE_PATH_SUBCOMPONENT
+
+#endif // UPNPPLATFORMVAR_HRH
Binary file upnp/upnpstack/cenrep/keys_upnpstack.xls has changed
Binary file upnp/upnpstack/conf/upnpstack.confml has changed
Binary file upnp/upnpstack/conf/upnpstack_101f9784.crml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/BWINS/UpnpControlPointBaseu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+EXPORTS
+	??0CUpnpControlPoint@@IAE@AAVMUpnpCpStackRequestor@@AAVMUpnpCpHttpRequestor@@@Z @ 1 NONAME ; CUpnpControlPoint::CUpnpControlPoint(class MUpnpCpStackRequestor &, class MUpnpCpHttpRequestor &)
+	??0CUpnpControlPoint@@IAE@XZ @ 2 NONAME ; CUpnpControlPoint::CUpnpControlPoint(void)
+	??1CUpnpControlPoint@@UAE@XZ @ 3 NONAME ; CUpnpControlPoint::~CUpnpControlPoint(void)
+	?ConstructL@CUpnpControlPoint@@IAEXABVCDesC8Array@@@Z @ 4 NONAME ; void CUpnpControlPoint::ConstructL(class CDesC8Array const &)
+	?ConstructL@CUpnpControlPoint@@IAEXABVTDesC8@@@Z @ 5 NONAME ; void CUpnpControlPoint::ConstructL(class TDesC8 const &)
+	?Device@CUpnpControlPoint@@QAEPBVCUpnpDevice@@ABVTDesC8@@@Z @ 6 NONAME ; class CUpnpDevice const * CUpnpControlPoint::Device(class TDesC8 const &)
+	?DeviceFoundL@CUpnpControlPoint@@UAEXAAVCUpnpDevice@@@Z @ 7 NONAME ; void CUpnpControlPoint::DeviceFoundL(class CUpnpDevice &)
+	?DeviceList@CUpnpControlPoint@@QBEABV?$RPointerArray@VCUpnpDevice@@@@XZ @ 8 NONAME ; class RPointerArray<class CUpnpDevice> const & CUpnpControlPoint::DeviceList(void) const
+	?DeviceLostL@CUpnpControlPoint@@UAEXAAVCUpnpDevice@@@Z @ 9 NONAME ; void CUpnpControlPoint::DeviceLostL(class CUpnpDevice &)
+	?DisableRadaDeviceL@CUpnpControlPoint@@QAEXXZ @ 10 NONAME ; void CUpnpControlPoint::DisableRadaDeviceL(void)
+	?EnableRadaDeviceL@CUpnpControlPoint@@QAEHXZ @ 11 NONAME ; int CUpnpControlPoint::EnableRadaDeviceL(void)
+	?EnableRadaDeviceL@CUpnpControlPoint@@QAEXAAVTRequestStatus@@@Z @ 12 NONAME ; void CUpnpControlPoint::EnableRadaDeviceL(class TRequestStatus &)
+	?Path@CUpnpControlPoint@@UAEABVTDesC8@@XZ @ 13 NONAME ; class TDesC8 const & CUpnpControlPoint::Path(void)
+	?SearchL@CUpnpControlPoint@@QAEXABVTDesC8@@@Z @ 14 NONAME ; void CUpnpControlPoint::SearchL(class TDesC8 const &)
+	?SendL@CUpnpControlPoint@@QAEXPAVCUpnpAction@@@Z @ 15 NONAME ; void CUpnpControlPoint::SendL(class CUpnpAction *)
+	?SendL@CUpnpControlPoint@@QAEXPAVCUpnpHttpMessage@@@Z @ 16 NONAME ; void CUpnpControlPoint::SendL(class CUpnpHttpMessage *)
+	?StartIPFilteringL@CUpnpControlPoint@@QAEXW4TFilteringMode@1@@Z @ 17 NONAME ; void CUpnpControlPoint::StartIPFilteringL(enum CUpnpControlPoint::TFilteringMode)
+	?StopIPFilteringL@CUpnpControlPoint@@QAEXW4TFilteringMode@1@@Z @ 18 NONAME ; void CUpnpControlPoint::StopIPFilteringL(enum CUpnpControlPoint::TFilteringMode)
+	?SubscribeL@CUpnpControlPoint@@QAEXPAVCUpnpService@@@Z @ 19 NONAME ; void CUpnpControlPoint::SubscribeL(class CUpnpService *)
+	?UnsubscribeL@CUpnpControlPoint@@QAEXPBVCUpnpService@@@Z @ 20 NONAME ; void CUpnpControlPoint::UnsubscribeL(class CUpnpService const *)
+	?NetworkEvent@CUpnpControlPoint@@UAEXPAVCUpnpNetworkEventBase@@@Z @ 21 NONAME ; void CUpnpControlPoint::NetworkEvent(class CUpnpNetworkEventBase *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/eabi/UpnpControlPointBaseu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+EXPORTS
+	_ZN17CUpnpControlPoint10ConstructLERK11CDesC8Array @ 1 NONAME
+	_ZN17CUpnpControlPoint10ConstructLERK6TDesC8 @ 2 NONAME
+	_ZN17CUpnpControlPoint10SubscribeLEP12CUpnpService @ 3 NONAME
+	_ZN17CUpnpControlPoint11DeviceLostLER11CUpnpDevice @ 4 NONAME
+	_ZN17CUpnpControlPoint12DeviceFoundLER11CUpnpDevice @ 5 NONAME
+	_ZN17CUpnpControlPoint12UnsubscribeLEPK12CUpnpService @ 6 NONAME
+	_ZN17CUpnpControlPoint16StopIPFilteringLENS_14TFilteringModeE @ 7 NONAME
+	_ZN17CUpnpControlPoint17EnableRadaDeviceLER14TRequestStatus @ 8 NONAME
+	_ZN17CUpnpControlPoint17EnableRadaDeviceLEv @ 9 NONAME
+	_ZN17CUpnpControlPoint17StartIPFilteringLENS_14TFilteringModeE @ 10 NONAME
+	_ZN17CUpnpControlPoint18DisableRadaDeviceLEv @ 11 NONAME
+	_ZN17CUpnpControlPoint4PathEv @ 12 NONAME
+	_ZN17CUpnpControlPoint5SendLEP11CUpnpAction @ 13 NONAME
+	_ZN17CUpnpControlPoint5SendLEP16CUpnpHttpMessage @ 14 NONAME
+	_ZN17CUpnpControlPoint6DeviceERK6TDesC8 @ 15 NONAME
+	_ZN17CUpnpControlPoint7SearchLERK6TDesC8 @ 16 NONAME
+	_ZN17CUpnpControlPointC2ER21MUpnpCpStackRequestorR20MUpnpCpHttpRequestor @ 17 NONAME
+	_ZN17CUpnpControlPointC2Ev @ 18 NONAME
+	_ZN17CUpnpControlPointD0Ev @ 19 NONAME
+	_ZN17CUpnpControlPointD1Ev @ 20 NONAME
+	_ZN17CUpnpControlPointD2Ev @ 21 NONAME
+	_ZNK17CUpnpControlPoint10DeviceListEv @ 22 NONAME
+	_ZTI17CUpnpControlPoint @ 23 NONAME ; #<TI>#
+	_ZTV17CUpnpControlPoint @ 24 NONAME ; #<VT>#
+	_ZN17CUpnpControlPoint12NetworkEventEP21CUpnpNetworkEventBase @ 25 NONAME
+	_ZThn4_N17CUpnpControlPoint11DeviceLostLER11CUpnpDevice @ 26 NONAME ; #<thunk>#
+	_ZThn4_N17CUpnpControlPoint12DeviceFoundLER11CUpnpDevice @ 27 NONAME ; #<thunk>#
+	_ZThn4_N17CUpnpControlPoint4PathEv @ 28 NONAME ; #<thunk>#
+	_ZThn8_N17CUpnpControlPoint12NetworkEventEP21CUpnpNetworkEventBase @ 29 NONAME ; #<thunk>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+/** @file
+* 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:  Build info for the ControlPointBase component
+*
+*/
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+upnpcontrolpointbase.mmp
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/group/upnpcontrolpointbase.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,105 @@
+/** @file
+* Copyright (c) 2002-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: 
+*     This is the project specification file for Upnp.
+*
+*/
+
+#include "../../../inc/upnpcompvariant.hrh"
+#include <data_caging_paths.hrh>
+
+TARGETTYPE      dll
+
+#if defined(__HN_31__) || defined(__HN_32__)
+TARGET          hncontrolpointbase.dll
+UID             0x1000008d 0x2000F882
+#else
+TARGET          upnpcontrolpointbase.dll
+UID             0x1000008d 0x2001B2BA
+#endif
+
+CAPABILITY      CAP_GENERAL_DLL
+VENDORID        VID_DEFAULT
+
+SOURCEPATH      ../src
+SOURCE          upnpserviceinfo.cpp
+SOURCE          upnpcontrolpoint.cpp
+
+// Device container and list utils
+SOURCE          upnpcpbdevicelistutils.cpp
+SOURCE          upnpcpbdevicerepository.cpp
+
+// Discovery phase
+SOURCE          upnpcpbdiscoveryagent.cpp
+
+// Description phase
+SOURCE          upnpcpbdescriptionagent.cpp
+SOURCE          upnpcpbdevicedescription.cpp
+SOURCE          upnpcpbsimpledevicedescription.cpp
+SOURCE          upnpcpbembeddeddevicedescription.cpp
+
+SOURCE          upnpcpbcurrenthttpclient.cpp
+SOURCE          upnpdevicedescriptionhttptransaction.cpp
+SOURCE          upnpservicedescriptionhttptransaction.cpp
+SOURCE          upnpcpstackrequestorimpl.cpp
+SOURCE          upnpcpstackrequestorimplbase.cpp
+SOURCE          upnpcphttprequestorimpl.cpp
+SOURCE          upnpcphttprequestorimplbase.cpp
+SOURCE          upnpsoapactionhttptransaction.cpp
+SOURCE          upnpservicesubscriptionhttptransaction.cpp 
+SOURCE          upnpserviceunsubscriptionhttptransaction.cpp
+SOURCE          upnpfilesender.cpp 
+SOURCE          upnpcpbinitialeventretry.cpp
+SOURCE          upnpcpbinitialeventretryhandler.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   ../../../inc
+SYSTEMINCLUDE   ../../inc
+USERINCLUDE     ../inc
+
+LIBRARY         euser.lib
+LIBRARY         esock.lib
+LIBRARY         bafl.lib
+LIBRARY         efsrv.lib
+LIBRARY         flogger.lib
+LIBRARY         insock.lib
+
+// UPnP
+#if defined(__HN_31__) || defined(__HN_32__)
+LIBRARY         hnipserversutils.lib
+LIBRARY         hnserviceframework.lib
+#ifdef RD_UPNP_REMOTE_ACCESS
+LIBRARY         hnradaclient.lib
+#endif
+#else
+LIBRARY         upnpipserversutils.lib
+LIBRARY         upnpserviceframework.lib
+LIBRARY         upnpconnectionmanagersession.lib
+#ifdef RD_UPNP_REMOTE_ACCESS
+LIBRARY         radaclient.lib
+#endif
+#endif
+
+LIBRARY         httptransfer.lib
+
+DEFFILE         UpnpControlPointBase
+
+
+//end of file
+
+VERSION 10.1
+
+paged
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbcurrenthttpclient.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,166 @@
+/** @file
+* Copyright (c) 2007-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 UPNPCPBCURRENTHTTPCLIENT_H_
+#define UPNPCPBCURRENTHTTPCLIENT_H_
+
+#include <upnpdispatcher.h>
+
+#include "upnpcpbhttpmessagecontroller.h"
+#include "upnphttpclientengine.h"
+
+class CUpnpGenaMessage;
+class CUpnpServiceInfo;
+class CUpnpControlPoint;
+class CUpnpHTTPTransaction;
+
+class MUpnpCpHttpRequestor;
+class CUpnpCpHttpRequestorImplBase;
+class MUpnpCpStackRequestor;
+class CUpnpCpStackRequestorImplBase;
+
+class CUpnpFileSender;
+
+NONSHARABLE_CLASS( CUpnpCpbCurrentHttpClient ) : public CBase, public MUpnpHttpClientObserver,
+    public MUpnpCpbHttpMessageController
+    {
+public:
+    static const TInt KDefaultSubscriptionTimeout = 300; // 5 minutes
+
+public:
+
+    virtual ~CUpnpCpbCurrentHttpClient();
+
+    static CUpnpCpbCurrentHttpClient* NewL(CUpnpControlPoint& aControlPoint,
+            MUpnpCpHttpRequestor* aHttpRequestor, MUpnpCpStackRequestor* aStackRequestor );
+
+    void StartIPFilteringL();
+
+    void StopIPFiltering();
+
+    void SendFileByPostL( CUpnpHttpMessage* aMessage );
+    /**
+     * It is called from bottom layer when wlan lost event occurs [callback method]     
+     * @result None
+     */
+    void WlanLostOccurs();
+    
+    /**
+     * It is called from bottom layer when address change event occurs [callback method]        
+     */
+    void AddressChangedL();
+    
+public:  //from MUpnpCpbHttpMessageController
+
+    virtual void SendL( CUpnpHttpMessage* aMessage );
+
+    virtual void SendActionL(CUpnpAction* aAction);
+
+    virtual void SendSubscribeL(CUpnpServiceInfo* aServiceInfo);
+
+    virtual void SendUnsubscribeL(CUpnpServiceInfo* aServiceInfo);
+
+    virtual void SendResubscribeL(CUpnpServiceInfo* aServiceInfo);
+
+    virtual TInt GetServiceDescriptionL(CUpnpDevice* aDevice, const TDesC8& aServiceUrl);
+
+    virtual TInt GetDeviceDescriptionL(CUpnpDevice* aDevice);
+
+    virtual void SearchL(const TDesC8& aSearchString);
+
+    /**
+     * Stops ignoring all embedded devices of specified device
+     * @since Series60 3.2
+     * @param aRoot Root device
+     */
+    virtual void StopIgnoringEmbeddedL( CUpnpDevice* aRoot );
+
+    virtual void StopIgnoringUuidL(const TDesC8& aUuids);
+
+    /**
+     * Stops ignoring all device tree
+     * @since Series60 3.2
+     * @param aRoot Root device
+     */
+    virtual void StopIgnoringL( CUpnpDevice* aDevice );
+
+private://from MUpnpDispatcherCustomer that is derived by MUpnpCpbHttpMessageController
+
+    virtual void MessageReceivedLD(CUpnpHttpMessage* aMessage);
+
+    virtual const TDesC8& Path();
+
+private: //from MUpnpHTTPClientObserver
+
+    /**
+     * Callback indicating that response was received within transaction.
+     *
+     * @param aCompletedTrasaction completed transaction that has response message
+     */
+    virtual void ClientResponseRecivedLD( CUpnpHttpTransaction& aCompletedTrasaction );
+
+private:
+    CUpnpCpbCurrentHttpClient( CUpnpControlPoint& aControlPoint,
+        MUpnpCpHttpRequestor* aHttpRequestor, MUpnpCpStackRequestor* aStackRequestor );
+
+    void ConstructL();
+
+    /**
+     * Set requestors which leaves with KErrNotReady or do nothing.
+     * This is used when WLan Lost occurs.
+     * @result None
+     */
+    void SetNullRequestorsL();
+
+private:
+
+    // control point, not owned
+    CUpnpControlPoint& iControlPoint;
+
+    // pointer to http requestor interface
+    MUpnpCpHttpRequestor* iHttpRequestor;
+
+    // default implementation of http requestor
+    CUpnpCpHttpRequestorImplBase* iHttpRequestorDefaultImpl;
+
+    // iStackRequestor uses DLNA webserver API for http, and dispacher to communicate with stack
+    MUpnpCpStackRequestor* iStackRequestor;
+
+    // default implementation of stack requestor
+    CUpnpCpStackRequestorImplBase* iStackRequestorDefaultImpl;
+
+    // value of USER-AGENT header in sent SOAP requests
+    HBufC8* iUserAgent;
+
+    // Current state of discovery engine
+    TInt iResult;
+
+    // The pending message list
+    RPointerArray<CUpnpHttpMessage> iPendingHttpMessages;
+
+    // pending transactions array
+    RPointerArray<CUpnpHttpTransaction> iPendingTransactions;
+    
+    CUpnpFileSender* iFileSender;
+    
+    };
+
+#endif /*UPNPCPBCURRENTHTTPCLIENT_H_*/
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbdescriptionagent.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,232 @@
+/** @file
+* Copyright (c) 2007-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:  Declares ControlPoint Discovery class.
+*
+*/
+
+
+#ifndef C_CUPNPCPBDESCRIPTIONAGENT_H
+#define C_CUPNPCPBDESCRIPTIONAGENT_H
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+class CUpnpDispatcher;
+class CUpnpControlPoint;
+class CUpnpHttpMessage;
+class CUpnpCpbDeviceRepository;
+class CUpnpDeviceContentHandler;
+class CUpnpCpbDeviceDescription;
+class CUpnpCpbSimpleDeviceDescription;
+class CUpnpCpbEmbeddedDeviceDescription;
+class MUpnpCpbHttpMessageController;
+class CUpnpNotifyTimer;
+class MUpnpNotifyTimerObserver;
+class CUpnpContentHandlersController;
+
+/**
+ * Mediator class handling whole discovery process.
+ * It gets device description and decides how it should be treated
+ * and how to discorery it.
+ *
+ * @lib controlpointbase.lib
+ * @since S60 v5.0
+ */
+NONSHARABLE_CLASS( CUpnpCpbDescriptionAgent ) : public CBase, public MUpnpNotifyTimerObserver
+    {
+    public:
+    /**
+     * Two-phased constructor
+     * @since S60 v5.0
+     */
+    static CUpnpCpbDescriptionAgent* CUpnpCpbDescriptionAgent::NewL(
+            CUpnpControlPoint& aBaseCP,
+            MUpnpCpbHttpMessageController& aMessanger,
+            CUpnpCpbDeviceRepository& aRepository);
+
+    /**
+     * Destructor
+     * @since S60 v5.0
+     */
+    ~CUpnpCpbDescriptionAgent();
+
+     /**
+      * New device found.
+      *
+      * @since S60 v5.0
+      * @param aDevice The target device.
+      */
+    void DeviceAliveNotificationL( CUpnpDevice* aDevice );
+
+     /**
+      * Process device message
+      * @param aHttpMessage Message to process
+      */
+    void ProcessDeviceMessageL(CUpnpHttpMessage* aHttpMessage);
+
+    /**
+      * Process service message
+      * @param aHttpMessage Message to process
+      */
+    void ProcessServiceMessageL(CUpnpHttpMessage* aHttpMessage);
+
+    public: // From MNotifyTimerObserve
+    /**
+     * Callback function used to inform about the timer events
+     */
+    void TimerEventL( CUpnpNotifyTimer* aTimer );
+
+    private:
+    /**
+     * Constructor
+     * @since S60 v5.0
+     */
+    CUpnpCpbDescriptionAgent(
+        CUpnpControlPoint& aBaseCP,
+        MUpnpCpbHttpMessageController& aMessanger,
+        CUpnpCpbDeviceRepository& aRepository);
+
+    /**
+     * Get next device description
+     *
+     * @since S60 v5.0
+     */
+    void DiscoverNextDeviceL();
+
+    /**
+     * Get device description
+     *
+     * @since S60 v5.0
+     * @param aDevice The target device.
+     */
+    void GetDeviceDescriptionL(CUpnpDevice* aDevice);
+
+    /**
+     * Choose description processor
+     *
+     * @since S60 v5.0
+     * @param aDevice The target device.
+     */
+    void ChooseDesriptionProcesor(CUpnpDevice* aDevice);
+
+    /**
+     * Function processing disscovery result
+     *
+     * @since S60 v5.0
+     * @param aResult result
+     */
+    void HandleDiscoveryResultL(TInt aResult);
+
+    /**
+     * Send stop ignoring message to MH
+     *
+     * @since S60 v5.0
+     * @param aUuids Uuids that should not be filtered
+     */
+    void StopIgnoringUuidL(const TDesC8& aUuids);
+
+    /**
+     * Check if device is valid
+     *
+     * @since S60 v5.0
+     * @param aDevice The target device.
+     */
+    TBool IsDeviceValid( CUpnpDevice* aDevice );
+
+    /**
+     * Copy results to repository
+     *
+     * @since S60 v5.0
+     * @return ETrue when devices was copied
+     */
+    TBool CUpnpCpbDescriptionAgent::CopyResult();
+
+    /**
+     * Copy results to repository
+     *
+     * @since S60 v5.0
+     */
+    void CUpnpCpbDescriptionAgent::CopyResultL();
+
+    /**
+     * Report discovered devices to the client
+     *
+     * @since S60 v5.0
+     */
+    void ReportDiscoveredDevicesL();
+
+    /**
+     * Second phase constructor
+     * @since S60 v5.0
+     */
+    void ConstructL();
+
+    /**
+     * Find network for device tree
+     *
+     * @since S60 v5.0
+     */
+    CUpnpDevice::TUpnpDeviceNetwork
+        FindNetworkForDeviceTree( RPointerArray<CUpnpDevice>& aDevices );
+
+
+    /**
+     * Construct and validate device tree
+     *
+     * @since S60 v5.0
+     */
+    void ConstructAndValidateDeviceTreeL( const TDesC8& aDeviceDescXml,
+                                          const TInetAddr& aAddr,
+                                          const TDesC8& aDeviceDescPath );
+
+    /**
+     * This function sets UrlBase value based on the relative path of the description URL.
+     */
+    void SetUrlBaseL( CUpnpDevice* aDevice, const TDesC8& aPath );
+
+
+    private:
+    // Dispatcher module is responsible for the messaging, not owned
+    CUpnpControlPoint& iBaseCP;
+    // Massenger handling HTTP messages. NOT OWNED
+    MUpnpCpbHttpMessageController& iMessanger;
+    // Ropository with devices, DO NOT DELETE
+    CUpnpCpbDeviceRepository& iDeviceRepository;
+
+    // Sax parsers for device description
+    CUpnpContentHandlersController* iSaxController;
+    // List with incoming devices
+    RPointerArray<CUpnpDevice> iIncomingDevices;
+    // Flag is TRUE when discovery is in progress
+    TBool iPendingDiscovery;
+    // Discovery timer
+    CUpnpNotifyTimer* iTimer;
+    // Root device uuid
+    RBuf8 iUuid;
+    // Current session number
+    TInt iDescriptionSession;
+
+    // Strategy used for current device, DO NOT DELETE
+    CUpnpCpbDeviceDescription* iDiscoveryEngine;
+    // Strategy used for simple devices
+    CUpnpCpbSimpleDeviceDescription* iSimpleDiscoveryEngine;
+    // Strategy used for embedded devices
+    CUpnpCpbEmbeddedDeviceDescription* iEmbeddedDiscoveryEngine;
+
+    };
+
+#endif // C_CUPNPCPBDESCRIPTIONAGENT_H
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbdevicedescription.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,189 @@
+/** @file
+* Copyright (c) 2007-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:  Base class - declares device description process.
+*
+*/
+
+
+#ifndef C_CUPNPCPBDEVICEDESCRIPTION_H
+#define C_CUPNPCPBDEVICEDESCRIPTION_H
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+class CUpnpControlPoint;
+class CUpnpContentHandlersController;
+class CUpnpCPBDiscovery;
+class MUpnpCpbHttpMessageController;
+class CUpnpCpbDeviceRepository;
+
+// CONST
+const TInt KDisscoveryFinished = 0;
+const TInt KDisscoveryIncorrect = 1;
+const TInt KDisscoveryInProgress = 2;
+
+/**
+ * Class handling discovery process of simple device.
+ * It is checking only services of device. Subdevices are not processed.
+ *
+ * @lib controlpointbase.lib
+ * @since S60 v5.0
+ */
+NONSHARABLE_CLASS( CUpnpCpbDeviceDescription ) : public CBase
+    {
+    public:
+    /**
+     * Destructor
+     * @since S60 v5.0
+     */
+    virtual ~CUpnpCpbDeviceDescription();
+
+    /**
+     * Start processing device.
+     *
+     * @since S60 v5.0
+     * @param aDevice Device that should be discovered
+     * @return One of symbian errors or
+     *                 0 - if discovery process is finished correctly
+     *                 1 - if discovery was not finished correctly
+     *                 2 - if discovery is in progress
+     */
+    virtual TInt DiscoverDeviceL( CUpnpDevice* aDevice ) = 0;
+
+    /**
+     * Function processing service description.
+     *
+     * @since S60 v5.0
+     * @param aMsg Service message
+     * @return One of symbian errors or
+     *                 0 - if discovery process is finished correctly
+     *                 1 - if discovery was not finished correctly
+     *                 2 - if discovery is in progress
+     */
+    virtual TInt ServiceDescriptionL( CUpnpHttpMessage* aMsg ) = 0;
+
+    /**
+     * Get currently processed device.
+     *
+     * @since S60 v5.0
+     * @return Pointer to processed device
+     */
+    CUpnpDevice* GetTargetDevice();
+
+    /**
+     * Get currently processed device, if it is inclomplete one.
+     *
+     * @since S60 v5.0
+     * @return Pointer to processed device
+     */
+    virtual CUpnpDevice* GetIncompliteRootDevice() = 0;
+
+    /**
+     * Set target device as null.
+     *
+     * @since S60 v5.0
+     */
+    virtual void NullTargetDevice();
+
+    /**
+     * Delete target device.
+     *
+     * @since S60 v5.0
+     */
+    virtual void DeleteTargetDevice();
+
+    /**
+     * Return incorect uuids
+     *
+     * @since S60 v5.0
+     * @return Uuids pointer
+     */
+    const TPtrC8 FailedUuidsL();
+
+    /**
+     * Append discovered devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     * @param aRemove determines if already discovered devices should be deleted from iAllDevicesInRoot array
+     */
+    virtual void GetDiscoveredDeviceL(
+        RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse ) = 0;
+
+    /**
+     * Append not discovered (does not match the type) devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     * @param aRemove determines if already discovered devices should be deleted from iNotNeededDevices array
+     */
+    virtual void GetUnnededDeviceL(
+        RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse ) = 0;
+
+    /**
+     * Append discovered but not metching target types devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     * @param aRemove determines if already discovered devices should be deleted from iDiscoveredDevices array
+     */
+    virtual void GetUninterestingDeviceL(
+        RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse ) = 0;
+
+    protected:
+    /**
+     * Constructor
+     * @since S60 v5.0
+     */
+    CUpnpCpbDeviceDescription( MUpnpCpbHttpMessageController& aMessanger,
+                              CUpnpCpbDeviceRepository& aRepository );
+
+    /**
+     * Second phase constructor
+     * @since S60 v5.0
+     */
+    virtual void ConstructL();
+
+    /**
+     * Add next uuid to uuid list
+     * @since S60 v5.0
+     * @param aUuid Uuid that should be added
+     */
+    void AddToUuidsL( const TDesC8& aUuid );
+
+    /**
+     * Get next service that should be discovered
+     * @param aDevice
+     * @return service description url
+     */
+    const TPtrC8 GetNextServiceType( CUpnpDevice* aDevice );
+
+    protected:
+    // incorrect uuids
+    RBuf8 iUuids;
+    // Current processed root device. NOT OWNED
+    CUpnpDevice* iRootDevice;
+    // Sax parsers for service description
+    CUpnpContentHandlersController* iSaxController;
+    // Current state of discovery engine
+    TInt iResult;
+    // Massenger handling HTTP messages. NOT OWNED
+    MUpnpCpbHttpMessageController& iMessanger;
+    // device repository, not owned
+    CUpnpCpbDeviceRepository& iRepository;
+    };
+
+#endif // C_CUPNPCPBDEVICEDESCRIPTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbdevicelistutils.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,104 @@
+/** @file
+* Copyright (c) 2007-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:  Declares utils function for devices list class.
+*
+*/
+
+
+#ifndef C_UPNPCPBDEVICELISTUTILS_H
+#define C_UPNPCPBDEVICELISTUTILS_H
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+
+/**
+ * Class with utils functions for device list
+ *
+ * @lib controlpointbase.lib
+ * @since S60 v5.0
+ */
+class UpnpCpbDeviceListUtils
+    {
+public:
+    /**
+     * Get device from list
+     *
+     * @since S60 v5.0
+     * @param aUuid Device uuid that should be return
+     * @param aList List with devices
+     * @return Pointer to the device
+     */
+    static CUpnpDevice* GetFromList(
+        const TDesC8& aUuid, RPointerArray<CUpnpDevice>& aList);
+
+    /**
+     * Get root device from list
+     *
+     * @since S60 v5.0
+     * @param aUuid Device uuid that parent root device should be return
+     * @param aList List with devices
+     * @return Pointer to the device or NULL if root device on specified list not found
+     */
+    static CUpnpDevice* GetRootFromList(
+        const TDesC8& aUuid, RPointerArray<CUpnpDevice>& aList );
+
+    /**
+     * Check list contains the device
+     *
+     * @since S60 v5.0
+     * @param aUuid Device uuid that should be search
+     * @param aList List with devices
+     * @return ETrue if array contains device, EFalse if not
+     */
+    static TBool ExistOnList(
+        const TDesC8& aUuid, RPointerArray<CUpnpDevice>& aList );
+
+    /**
+     * Add device to list
+     *
+     * @since S60 v5.0
+     * @param aDevice Device that should be added
+     * @param aList List with devices
+     * @return ETrue if device is added, EFalse if not
+     */
+    static TBool AddDeviceL(
+        CUpnpDevice* aDevice, RPointerArray<CUpnpDevice>& aList );
+
+    /**
+     * Add device to list
+     *
+     * @since S60 v5.0
+     * @param aDevice Device that should be added
+     * @param aList List with devices
+     * @param aError result of append function
+     * @return ETrue if device is added, EFalse if not
+     */
+    static TBool UpnpCpbDeviceListUtils::AddDevice(
+        CUpnpDevice* aDevice, RPointerArray<CUpnpDevice>& aList, TInt& aError);
+
+    /**
+     * Add devices to devices list
+     *
+     * @since S60 v5.0
+     * @param aSource List with devices
+     * @param aTarget Target list
+     */
+    static void AddDevicesL(
+        RPointerArray<CUpnpDevice>& aSource, RPointerArray<CUpnpDevice>& aTarget );
+    };
+
+#endif // C_UPNPCPBDEVICELISTUTILS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbdevicerepository.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,263 @@
+/** @file
+* Copyright (c) 2007-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:  Declares storage for devices known by control point.
+*
+*/
+
+
+#ifndef C_CUPNPCPBDEVICEREPOSITORY_H
+#define C_CUPNPCPBDEVICEREPOSITORY_H
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+
+/**
+ * Storage for devices known by control point
+ *
+ * @lib controlpointbase.lib
+ * @since S60 v5.0
+ */
+NONSHARABLE_CLASS( CUpnpCpbDeviceRepository ) : public CBase
+    {
+    public:
+    /**
+     * Two-phased constructor
+     * @since S60 v5.0
+     */
+    static CUpnpCpbDeviceRepository* CUpnpCpbDeviceRepository::NewL(
+        const CDesC8Array& aTargetDeviceTypes );
+
+    /**
+     * Destructor
+     * @since S60 v5.0
+     */
+    ~CUpnpCpbDeviceRepository();
+
+    /**
+     * Check if device type is interesting for control point
+     *
+     * @since S60 v5.0
+     * @param aDevice Device type that should be match
+     * @return ETrue if type is correct one, EFalse if not
+     */
+    TBool MatchTargetDevice(const TDesC8& aDeviceType);
+
+    /**
+     * Check if device is in repository
+     *
+     * @since S60 v5.0
+     * @param aDevice Device uuid that should be match
+     * @return ETrue if device is know, EFalse if not
+     */
+    TBool IsKnownDevice(const TDesC8& aDeviceUuid);
+
+    /**
+     * Check if device is discovered already
+     *
+     * @since S60 v5.0
+     * @param aDevice Device uuid that should be match
+     * @return ETrue if device is know, EFalse if not
+     */
+    TBool IsDiscoveredDevice(const TDesC8& aDeviceUuid);
+
+    /**
+     * Check if device is discovered but type is not matching
+     * needed devices types
+     *
+     * @since S60 v5.0
+     * @param aDevice Device uuid that should be match
+     * @return ETrue if device is know, EFalse if not
+     */
+    TBool IsUninterestingDevice(const TDesC8& aDeviceUuid);
+
+    /**
+     * Check if device is unneded (type is different then needed).
+     *
+     * @since S60 v5.0
+     * @param aDevice Device uuid that should be match
+     * @return ETrue if device is know, FALSE if not
+     */
+    TBool IsUnneededDevice(const TDesC8& aDeviceUuid);
+
+    /**
+     * Add device to discovered device list
+     *
+     * @since S60 v5.0
+     * @param aDevice Target device
+     * @return ETrue if device was added
+     */
+    TBool AddDiscoveredDeviceL(CUpnpDevice* aDevice);
+
+    /**
+     * Add device to unneded device list
+     *
+     * @since S60 v5.0
+     * @param aDevice Target device
+     * @return ETrue if device was added
+     */
+    TBool AddUnneddedDeviceL(CUpnpDevice* aDevice);
+
+    /**
+     * Add device to incomlite root device list
+     *
+     * @since S60 v5.0
+     * @param aDevice Target device
+     * @return ETrue if device was added
+     */
+    TBool AddIncompliteDeviceL(CUpnpDevice* aDevice);
+
+    /**
+     * Add device to discovered device list
+     *
+     * @since S60 v5.0
+     * @param aDevices Target device
+     */
+    void AddDiscoveredDevicesL(RPointerArray<CUpnpDevice>& aDevices);
+
+    /**
+     * Add device to unneded device list
+     *
+     * @since S60 v5.0
+     * @param aDevices Target device
+     */
+    void AddUninterestingDevicesL(RPointerArray<CUpnpDevice>& aDevices);
+
+    /**
+     * Add device to unneded device list
+     *
+     * @since S60 v5.0
+     * @param aDevices Target device
+     */
+    void AddUnneddedDevicesL(RPointerArray<CUpnpDevice>& aDevices);
+
+    /**
+     * Getter. Returns discovered device list.
+     *
+     * @since S60 v5.0
+     * @return List with discovered devices.
+     */
+    const RPointerArray<CUpnpDevice>& DiscoveredDeviceList() const;
+
+    /**
+     * Getter. Returns unnedded device list.
+     *
+     * @since S60 v5.0
+     * @return List with unnedded devices.
+     */
+    const RPointerArray<CUpnpDevice>& UnneddedDeviceList() const;
+
+    /**
+     * Getter. Returns uninteresting device list.
+     *
+     * @since S60 v5.0
+     * @return List with uninteresting devices.
+     */
+    const RPointerArray<CUpnpDevice>& UninterestingDeviceList() const;
+
+    /**
+     * Getter. Returns incomplite root device list.
+     *
+     * @since S60 v5.0
+     * @return List with incomplite root devices.
+     */
+    const RPointerArray<CUpnpDevice>& IncompliteDeviceList() const;
+
+    /**
+     * Getter. Find device in repository.
+     *
+     * @since S60 v5.0
+     * @return Device pointer if found.
+     */
+    CUpnpDevice* FindDevice( const TDesC8& aDeviceUuid );
+
+    /**
+     * Getter. Find incomplite device in repository.
+     *
+     * @since S60 v5.0
+     * @return Device pointer if found.
+     */
+    CUpnpDevice* FindIncompliteDevice(const TDesC8& aDeviceUuid);
+
+    /**
+     * Remove device from all list
+     *
+     * @since S60 v5.0
+     * @param aDevice Target device
+     */
+    void RemoveDevice( CUpnpDevice* aDevice );
+
+    /**
+     * Add device incoming from SSDP layer
+     * final device built from device description is synchronized with that
+     *
+     * @since S60 v5.0
+     * @param aDevice Target device
+     */
+    TBool AddIncomingDeviceL( CUpnpDevice* aDevice );
+
+    /**
+     * Remove device from incoming list
+     *
+     * @since S60 v5.0
+     * @param aDevice Target device
+     */
+    CUpnpDevice* RemoveIncomingDevice( const TDesC8& aUuid  );
+
+    /**
+      * Finds root of given device among dicovered and being discovered devices
+      * @since Series60 3.2
+      * @param aDeviceUuid UUID of device
+      * @return Device if found or NULL
+      */
+    CUpnpDevice* FindRoot( const TDesC8& aDeviceUuid );
+
+
+private:
+    /**
+     * Constructor
+     * @since S60 v5.0
+     */
+    CUpnpCpbDeviceRepository();
+
+    /**
+     * Second phase constructor
+     * @since S60 v5.0
+     */
+    void ConstructL(const CDesC8Array& aTargetDeviceTypes);
+
+private:
+
+    // Target device types
+    CDesC8ArrayFlat* iTargetDeviceTypes;
+    // List with discovered devices (only device that match target types)
+    RPointerArray<CUpnpDevice> iDiscoveredDevices;
+    // List with discovered devices but not metching target types
+    // As subdevices of interesting devices needs to be discovered
+    RPointerArray<CUpnpDevice> iUninterestingDevices;
+    // List with devices that was not discovered as type
+    // is not interesting
+    RPointerArray<CUpnpDevice> iUnneededDevices;
+    // List with inclomplite root devices (some sub devices are
+    // discovered so we need to remember also root device)
+    RPointerArray<CUpnpDevice> iIncomliteRootDevices;
+    // List with inclomplite root devices (some sub devices are
+    // discovered so we need to remember also root device)
+    RPointerArray<CUpnpDevice> iIncomingDevices;
+    };
+
+
+#endif // C_CUPNPCPBDEVICEREPOSITORY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbdiscoveryagent.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,120 @@
+/** @file
+* Copyright (c) 2007-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:  Declares ControlPoint Discovery class.
+*
+*/
+
+
+#ifndef C_CUPNPCPBDISCOVERYAGENT_H
+#define C_CUPNPCPBDISCOVERYAGENT_H
+
+// INCLUDES
+#include <e32base.h>
+#include "upnpdiscoveryobserver.h"
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+class CUpnpControlPoint;
+class MUpnpCpbHttpMessageController;
+#ifdef RD_UPNP_REMOTE_ACCESS
+class CUpnpRadaSync;
+#endif
+
+/**
+ * Mediator class handling whole discovery process.
+ * It gets device description and decides how it should be treated
+ * and how to discorery it.
+ *
+ * @lib controlpointbase.lib
+ * @since S60 v5.0
+ */
+NONSHARABLE_CLASS( CUpnpCpbDiscoveryAgent ) : public CBase
+    {
+    public:
+    /**
+     * Two-phased constructor
+     * @since S60 v5.0
+     */
+    static CUpnpCpbDiscoveryAgent* CUpnpCpbDiscoveryAgent::NewL(
+        MUpnpCpbHttpMessageController& aMessanger );
+
+    /**
+     * Destructor
+     * @since S60 v5.0
+     */
+    ~CUpnpCpbDiscoveryAgent();
+
+    public: // Functions from devired class
+
+    /**
+     * Make a SSDP search. Search string should be some of these strings (defined in UPnP Device Architecture)
+     * @since Series60 5.0
+     * @param aSearchString The search target.
+     */
+    void SearchL( const TDesC8& aSearchString );
+
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    /*
+     * Enables rada device
+     * @since Series60 5.0
+     */
+    void EnableRadaDeviceL( TRequestStatus& aStatus );
+
+    /*
+     * Enables rada device
+     * @since Series60 5.0
+     * @return Rada device start status
+     */
+    TInt EnableRadaDeviceL();
+
+    /*
+     * Disables rada device
+     * @since Series60 5.0
+     */
+    void DisableRadaDeviceL();
+
+    /**********IPFinterng*****/
+
+    void StartIPFilteringL();
+
+    void StopIPFiltering();
+
+    /***********************/
+    #endif
+
+    private:
+    /**
+     * Constructor
+     * @since S60 v5.0
+     */
+    CUpnpCpbDiscoveryAgent( MUpnpCpbHttpMessageController& aMessanger );
+
+    /**
+     * Second phase constructor
+     * @since S60 v5.0
+     */
+    void ConstructL();
+
+    private:
+    //not owned
+    MUpnpCpbHttpMessageController& iMessanger;
+
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    // RADA client
+    CUpnpRadaSync* iRadaClient;
+    #endif
+    };
+
+#endif // C_CUPNPCPBDISCOVERYAGENT_H
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbembeddeddevicedescription.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,173 @@
+/** @file
+* Copyright (c) 2007-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:  Declares simple device description process.
+*
+*/
+
+
+#ifndef C_CUPNPCPBEMBEDDEDDEVICEDESCRIPTION_H
+#define C_CUPNPCPBEMBEDDEDDEVICEDESCRIPTION_H
+
+// INCLUDES
+#include <e32base.h>
+
+#include "upnpcpbdevicedescription.h"
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+class CUpnpContentHandlersController;
+class CUpnpCpbDeviceRepository;
+
+/**
+ * Class handling discovery process of simple device.
+ * It is checking only services of device. Subdevices are not processed.
+ *
+ * @lib controlpointbase.lib
+ * @since S60 v5.0
+ */
+NONSHARABLE_CLASS( CUpnpCpbEmbeddedDeviceDescription ) : public CUpnpCpbDeviceDescription
+    {
+    public:
+    /**
+     * Two-phased constructor
+     * @since S60 v5.0
+     */
+    static CUpnpCpbEmbeddedDeviceDescription*
+            CUpnpCpbEmbeddedDeviceDescription::NewL(MUpnpCpbHttpMessageController& aMessanger,
+                                            CUpnpCpbDeviceRepository& aRepository);
+
+    /**
+     * Start processing device.
+     *
+     * @since S60 v5.0
+     * @param aDevice Device that should be discovered
+     * @return 0 - if discovery process is finished correctly
+     *                 1 - if discovery was not finished correctly
+     *                 2 - if discovery is in progress
+     */
+    TInt DiscoverDeviceL(CUpnpDevice* aDevice);
+
+    /**
+     * Function processing service description.
+     *
+     * @since S60 v5.0
+     * @param aMsg Service message
+     * @return 0 - if discovery process is finished correctly
+     *                 1 - if discovery was not finished correctly
+     *                 2 - if discovery is in progress
+     */
+    TInt ServiceDescriptionL(CUpnpHttpMessage* aMsg);
+
+    /**
+     * Append discovered devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     */
+    void GetDiscoveredDeviceL(RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse );
+
+    /**
+     * Append not discovered (does not match the type) devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     */
+    void GetUnnededDeviceL(RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse );
+
+    /**
+     * Append discovered but not metching target types devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     */
+    void GetUninterestingDeviceL(RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse );
+
+    /**
+     * Destructor
+     * @since S60 v5.0
+     */
+    ~CUpnpCpbEmbeddedDeviceDescription();
+
+    private:
+    /**
+     * Constructor
+     * @since S60 v5.0
+     */
+    CUpnpCpbEmbeddedDeviceDescription(MUpnpCpbHttpMessageController& aMessanger,
+                                            CUpnpCpbDeviceRepository& aRepository);
+
+    /**
+     * Parses service description and add it to device
+     *
+     * @since S60 v5.0
+     * @param aMsg Service message
+     * @return 0 - if discovery process is finished correctly
+     *                 1 - if discovery was not finished correctly
+     *                 2 - if discovery is in progress
+     */
+    TInt ProcessServiceDescriptionL(CUpnpDevice* aDevice, CUpnpHttpMessage* aMsg);
+
+    /**
+     * Second phase constructor
+     * @since S60 v5.0
+     */
+    void ConstructL();
+
+    /**
+     * Build interesting device list
+     * @since S60 v5.0
+     * @param aDevice Target device
+     */
+    void BuildDevicesListL(CUpnpDevice* aDevice);
+
+    /**
+     * Get first service description
+     * @since S60 v5.0
+     * @param aDevice Target device
+     */
+    void GetServiceDescriptionL(CUpnpDevice* aDevice);
+
+    /**
+     * Get currently processed device, if it is inclomplete one.
+     *
+     * @since S60 v5.0
+     * @return Pointer to processed device
+     */
+    CUpnpDevice* GetIncompliteRootDevice();
+
+    /**
+     * Build result list
+     * @since S60 v5.0
+     * @param aDevice Target device
+     * @return TRUE if device is discovered correctly
+     */
+    TBool CUpnpCpbEmbeddedDeviceDescription::BuildResultListsL(CUpnpDevice* aDevice);
+
+    /**
+     * Count result and create Uuids
+     * @since S60 v5.0
+     */
+    void CreateUuidsL();
+
+    private:
+    // List with discovered devices (only device that match target types)
+    RPointerArray<CUpnpDevice> iDiscoveredDevices;
+    // List with all devices in current target
+    RPointerArray<CUpnpDevice> iAllDevicesInRoot;
+    // List with devices not needed for correct discovery
+    // (not matching type and not being subdevice)
+    RPointerArray<CUpnpDevice> iNotNeededDevices;
+    };
+
+#endif // C_CUPNPCPBEMBEDDEDDEVICEDESCRIPTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbhttpmessagecontroller.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,62 @@
+/** @file
+* Copyright (c) 2007-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 MUPNPCPBHTTPMESSAGECONTROLLER_H_
+#define MUPNPCPBHTTPMESSAGECONTROLLER_H_
+
+#include "upnpdispatchercustomer.h"
+
+class CUpnpAction;
+class CUpnpServiceInfo;
+class CUpnpDevice;
+
+class MUpnpCpbHttpMessageController :
+    public MUpnpDispatcherCustomer
+    {
+
+public:
+
+    virtual void SendL(CUpnpHttpMessage* aHttpMessage) = 0;
+
+    virtual void SendActionL(CUpnpAction* aAction) = 0;
+
+    virtual void SendSubscribeL(CUpnpServiceInfo* aService) = 0;
+
+    virtual void SendUnsubscribeL(CUpnpServiceInfo* aService) = 0;
+
+    virtual TInt GetServiceDescriptionL(CUpnpDevice* aDevice,
+            const TDesC8& aServiceUrl) = 0;
+
+    virtual TInt GetDeviceDescriptionL(CUpnpDevice* aDevice) = 0;
+
+    virtual void SearchL( const TDesC8& aSearchString ) = 0;
+
+    virtual void StopIgnoringEmbeddedL( CUpnpDevice* aRoot ) = 0;
+
+    virtual void StopIgnoringUuidL( const TDesC8& aUuids ) = 0;
+
+    /**
+     * Stops ignoring all device tree
+     * @since Series60 3.2
+     * @param aRoot Root device
+     */
+    virtual void StopIgnoringL( CUpnpDevice* aDevice ) = 0;
+
+    };
+
+#endif /*UNPNPCPBHTTPMESSAGECONTROLLER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbinitialeventretry.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,62 @@
+/** @file
+* 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 CUPNPCPBINITIALEVENTRETRY_H
+#define CUPNPCPBINITIALEVENTRETRY_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CLASS DECLARATION
+class CUpnpGenaMessage;
+class CUpnpCpbInitialEventRetryHandler;
+
+
+/**
+ *  CUpnpCpbInitialEventRetry provides timeout for Gena message 
+ * 
+ */
+NONSHARABLE_CLASS( CUpnpCpbInitialEventRetry ) : public CTimer
+    {
+public:
+    // Constructors and destructor
+    // Ownership of aMessage is passed through
+    static CUpnpCpbInitialEventRetry* CUpnpCpbInitialEventRetry::NewLC(
+            CUpnpGenaMessage* aMessage,
+            CUpnpCpbInitialEventRetryHandler& iOwner );
+
+    ~CUpnpCpbInitialEventRetry();
+    
+    // CTimer callback implementation
+    void RunL();
+
+    CUpnpGenaMessage& Message();
+    
+private:    
+    CUpnpCpbInitialEventRetry( CUpnpGenaMessage* aMessage,
+                CUpnpCpbInitialEventRetryHandler& iOwner );
+    void ConstrucL();
+
+private:
+    // owned
+    CUpnpGenaMessage* iMessage;
+    CUpnpCpbInitialEventRetryHandler& iOwner;
+    
+    };
+
+#endif // CUPNPCPBINITIALEVENTRETRY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbinitialeventretryhandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,61 @@
+/** @file
+* 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 CUPNPCPBINITIALEVENTRETRYHANDLER_H
+#define CUPNPCPBINITIALEVENTRETRYHANDLER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CLASS DECLARATION
+class CUpnpGenaMessage;
+class CUpnpControlPoint;
+class CUpnpCpbInitialEventRetry;
+
+/**
+ *  CUpnpCpbInitialEventRetryHandler
+ * 
+ */
+NONSHARABLE_CLASS( CUpnpCpbInitialEventRetryHandler ) : public CBase
+    {
+public:        
+    
+    // Constructors and destructor
+    CUpnpCpbInitialEventRetryHandler( CUpnpControlPoint& aCp );
+    
+    ~CUpnpCpbInitialEventRetryHandler();
+   
+    /**
+     * Adds Gena message to handler, ownership of the argument is  passed through     
+     * @param aMsg Gena message
+     */ 
+    void AddL( CUpnpGenaMessage* aMsg ); 
+
+    /**
+     * Method to be invoked by CUpnpCpbInitialEventRetry      
+     * @param aTimer retry timer
+     */ 
+    void TimerExpired( CUpnpCpbInitialEventRetry* aEventRetry );
+
+private:
+     
+    RPointerArray<CUpnpCpbInitialEventRetry> iList;
+    CUpnpControlPoint& iControlPoint;
+    };
+
+#endif // CUPNPCPBINITIALEVENTRETRYHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpbsimpledevicedescription.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,155 @@
+/** @file
+* Copyright (c) 2007-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:  Declares simple device description process.
+*
+*/
+
+
+#ifndef C_CUPNPCPBSIMPLEDEVICEDESCRIPTION_H
+#define C_CUPNPCPBSIMPLEDEVICEDESCRIPTION_H
+
+// INCLUDES
+#include <e32base.h>
+
+#include "upnpcpbdevicedescription.h"
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+class CUpnpContentHandlersController;
+
+/**
+ * Class handling discovery process of simple device.
+ * It is checking only services of device. Subdevices are not processed.
+ *
+ * @lib controlpointbase.lib
+ * @since S60 v5.0
+ */
+NONSHARABLE_CLASS( CUpnpCpbSimpleDeviceDescription ) : public CUpnpCpbDeviceDescription
+    {
+    public:
+    /**
+     * Two-phased constructor
+     * @since S60 v5.0
+     */
+    static CUpnpCpbSimpleDeviceDescription*
+            CUpnpCpbSimpleDeviceDescription::NewL(
+                    MUpnpCpbHttpMessageController& aMessanger,
+                    CUpnpCpbDeviceRepository& aRepository);
+
+    /**
+     * Start processing device.
+     *
+     * @since S60 v5.0
+     * @param aDevice Device that should be discovered
+     * @return 0 - if discovery process is finished correctly
+     *                 1 - if discovery was not finished correctly
+     *                 2 - if discovery is in progress
+     */
+    TInt DiscoverDeviceL(CUpnpDevice* aDevice);
+
+    /**
+     * Function processing service description.
+     *
+     * @since S60 v5.0
+     * @param aMsg Service message
+     * @return 0 - if discovery process is finished correctly
+     *                 1 - if discovery was not finished correctly
+     *                 2 - if discovery is in progress
+     */
+    TInt ServiceDescriptionL(CUpnpHttpMessage* aMsg);
+
+    /**
+     * Append discovered devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     */
+    void GetDiscoveredDeviceL(RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse );
+
+    /**
+     * Append not discovered (does not match the type) devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     */
+    void GetUnnededDeviceL(RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse );
+
+    /**
+     * Append discovered but not metching target types devices to array
+     *
+     * @since S60 v5.0
+     * @param aArray array where devices should be appended
+     */
+    void GetUninterestingDeviceL(RPointerArray<CUpnpDevice>& aArray, TBool aRemove = EFalse );
+
+    /**
+     * Get currently processed device, if it is inclomplete one.
+     *
+     * @since S60 v5.0
+     * @return Pointer to processed device
+     */
+    CUpnpDevice* GetIncompliteRootDevice();
+
+    /**
+     * Set target device as null.
+     *
+     * @since S60 v5.0
+     */
+    void NullTargetDevice();
+
+    /**
+     * Delete target device.
+     *
+     * @since S60 v5.0
+     */
+    void DeleteTargetDevice();
+
+    /**
+     * Return incorect uuids
+     *
+     * @since S60 v5.0
+     * @return Uuids pointer
+     */
+    const TPtrC8 FailedUuidsL();
+
+    /**
+     * Destructor
+     * @since S60 v5.0
+     */
+    ~CUpnpCpbSimpleDeviceDescription();
+
+    private:
+    /**
+     * Constructor
+     * @since S60 v5.0
+     */
+    CUpnpCpbSimpleDeviceDescription(MUpnpCpbHttpMessageController& aMessanger,
+                                    CUpnpCpbDeviceRepository& aRepository);
+
+    /**
+     * Parses service description and add it to device
+     *
+     * @since S60 v5.0
+     * @param aMsg Service message
+     * @return 0 - if discovery process is finished correctly
+     *                 1 - if discovery was not finished correctly
+     *                 2 - if discovery is in progress
+     */
+    TInt ProcessServiceDescriptionL(CUpnpHttpMessage* aMsg);
+
+    // Inform if root device should be destroyed or not
+    TBool iIsNull;
+    };
+
+#endif // C_CUPNPCPBSIMPLEDEVICEDESCRIPTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcphttprequestor.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,46 @@
+/** @file
+* 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:  Declares MUpnpCpHttpRequestor class.
+*
+*/
+
+#ifndef MUPNPCPHTTPREQUESTOR_H_
+#define MUPNPCPHTTPREQUESTOR_H_
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class MUpnpHttpClientObserver;
+class CUpnpHttpTransaction;
+
+/**
+* Interface that allows control point to communicate by http in abstract manner
+*/
+class MUpnpCpHttpRequestor
+    {
+public:
+    /**
+     * Method is called by cp to initialise object, and subscribe for responses
+     */
+    virtual void InitialiseL( MUpnpHttpClientObserver& aObserver, TInt aActiveIap ) = 0;
+
+    /**
+     * Initialise sending http transaction
+     */
+    virtual void SendL( CUpnpHttpTransaction& aTransaction ) = 0;
+
+    };
+
+#endif /*MUPNPCPHTTPREQUESTOR_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcphttprequestorimpl.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,59 @@
+/** @file
+* 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:  Provides default implementation of MUpnpCpHttpRequestor interface.
+*
+*/
+
+#ifndef CUPNPCPHTTPREQUESTORIMPL_H_
+#define CUPNPCPHTTPREQUESTORIMPL_H_
+
+#include <e32base.h>
+#include "upnpcphttprequestorimplbase.h"
+
+class CUpnpHttpClientEngine;
+class MUpnpHttpClientObserver;
+
+/**
+* Default implementation of MUpnpCpHttpRequestor. It uses symbian http engine.
+*/
+NONSHARABLE_CLASS( CUpnpCpHttpRequestorImpl ) : public CUpnpCpHttpRequestorImplBase
+    {
+public:
+    /**
+    * Two phased constructor
+    * @return an instance of CUpnpCpHttpRequestorImpl class
+    */
+    static CUpnpCpHttpRequestorImpl* NewL();
+
+    /**
+    * Destructor
+    */
+    virtual ~CUpnpCpHttpRequestorImpl();
+
+private:
+    /**
+    * C++ constructor
+    */
+    CUpnpCpHttpRequestorImpl();
+
+private: //from MUpnpCpHttpRequestor
+    virtual void SendL( CUpnpHttpTransaction& aTransaction );
+
+    virtual void InitialiseL( MUpnpHttpClientObserver& aObserver, TInt aActiveIap );
+
+private:
+    CUpnpHttpClientEngine* iHttpClientEngine;
+    };
+
+#endif //CUPNPCPHTTPREQUESTORIMPL_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcphttprequestorimplbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+/** @file
+* 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:  Provides default implementation of MUpnpCpHttpRequestor interface.
+*
+*/
+
+#ifndef CUPNPCPHTTPREQUESTORIMPLBASE_H_
+#define CUPNPCPHTTPREQUESTORIMPLBASE_H_
+
+#include "upnpcphttprequestor.h"
+#include <e32base.h>
+
+
+/**
+ * Base implementation. Class used in WLan Lost case.
+ */
+NONSHARABLE_CLASS( CUpnpCpHttpRequestorImplBase ) : public CBase,
+                                                    public MUpnpCpHttpRequestor
+    {
+private: //from MUpnpCpHttpRequestor
+    virtual void SendL( CUpnpHttpTransaction& aTransaction );
+
+    virtual void InitialiseL( MUpnpHttpClientObserver& aObserver, TInt aActiveIap );
+
+    };
+
+#endif //CUPNPCPHTTPREQUESTORIMPLBASE_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpstackrequestor.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,114 @@
+/** @file
+* 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:  Declares MUpnpCpStackRequestor class.
+*
+*/
+
+#ifndef MUPNPCPSTACKREQUESTOR_H_
+#define MUPNPCPSTACKREQUESTOR_H_
+
+// INCLUDES
+#include <e32base.h>
+#include <in_sock.h>
+
+// FORWARD DECLARATIONS
+class MUpnpDispatcherCustomer;
+class CUpnpHttpMessage;
+class CUpnpDispatcher;
+
+/**
+* @brief Class defines interface which separates controlpointbase
+* and serviceframework modules.
+* It makes possible switch serviceframework implementation to another one.
+*
+*/
+class MUpnpCpStackRequestor
+    {
+public:
+
+    /**
+    * Sends a SSDP Search with 8-bit search string.
+    * @param aSearchString String to use in SSDP ST header.
+    */
+    virtual void SearchL( const TDesC8& aSearchString ) = 0;
+
+    /**
+    * Sends a SSDP Search with 16-bit search string. This method makes a
+    * conversion to 8-bit and then makes the search.
+    * @param aSearchString String to use in SSDP ST header.
+    */
+    virtual void SearchL( const TDesC16& aSearchString ) = 0;
+
+    /**
+    * Add a customer to the customer list of this dispatcher.
+    * It means that messages start being forwarded to that customer.
+    * @param aCustomer The customer to be added.
+    */
+    virtual void AddCustomerL( const MUpnpDispatcherCustomer& aCustomer ) = 0;
+
+    /**
+    * Remove a customer from the customer list of this dispatcher.
+    * Messages are not forwarded to that customer.
+    * @param aCustomer The customer to be removed.
+    */
+    virtual void RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer ) = 0;
+
+    /**
+    * Returns HTTP server address.
+    * @return Buffer that contains the address.
+    */
+    virtual TInetAddr HttpServerAddress() = 0;    
+
+    /**
+    * Send a request via serviceframework loopback. Used for SOAP communication
+    * between local control point and local device.
+    * @param aMessage The message to be sent.
+    * @param aCustomer Pointer to the callback interface.
+    */
+    virtual void SendLocalRequestL( CUpnpHttpMessage* aMessage,
+                                    MUpnpDispatcherCustomer& aCustomer ) = 0;
+
+    /**
+    * Send a HTTP client request. Used for description fetching, SOAP actions and
+    * subscription requests.
+    * @param aMessage The message to be sent.
+    * @param aCustomer pointer to observer
+    * @param aIsLocal
+    */
+    virtual void SendMessageL( CUpnpHttpMessage* aMessage,
+                               MUpnpDispatcherCustomer& aCustomer,
+                               TBool aIsLocal ) = 0;
+
+    /**
+    * Stops ignoring incoming SSDP notification
+    * for discovered device.
+    * @param aUuids UUids.
+    */
+    virtual void StopIgnoringL( const TDesC8& aUuids ) = 0;
+
+    virtual void StartIPFilteringL() = 0;
+    virtual void StopIPFiltering() = 0;
+
+    /**
+    * Stops htpp server    
+    */
+    virtual void StopHttpServer() = 0;
+    
+    /**
+    * Starts htpp server    
+    */
+    virtual void StartHttpServerL() =0;
+    };
+
+#endif /*MUPNPCPSTACKREQUESTOR_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpstackrequestorimpl.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,100 @@
+/** @file
+* 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:  Provides default implementation of MUpnpCpHttpClientRequestor interface.
+*
+*/
+
+#ifndef UPNPCPSTACKREQUESTORIMPL_H_
+#define UPNPCPSTACKREQUESTORIMPL_H_
+
+#include <e32base.h>
+#include "upnpcpstackrequestorimplbase.h"
+
+class CUpnpDispatcher;
+class CUpnpControlPoint;
+class MUpnpDiscoveryObserver;
+
+/**
+* @brief Class provides default implementation
+* of MUpnpCpStackRequestor interface
+* It simply delegates requests to the CUpnpDispatcher.
+*
+* @since Series60 3.2
+*/
+NONSHARABLE_CLASS( CUpnpCpStackRequestorImpl ) : public CUpnpCpStackRequestorImplBase
+    {
+public:
+    /**
+    * Two phased constructor
+    * @since Series60 3.2
+    * @return an instance of CUpnpCpStackRequestorImpl class
+    */
+    static CUpnpCpStackRequestorImpl* NewL( MUpnpDiscoveryObserver& aDiscoveryObserver );
+
+    /**
+    * Destructor
+    * @since Series60 3.2
+    */
+    virtual ~CUpnpCpStackRequestorImpl();
+
+public: //from MUpnpCpStackRequestor
+
+    virtual void SearchL( const TDesC8& aSearchString );
+    virtual void SearchL( const TDesC16& aSearchString );
+    virtual void AddCustomerL( const MUpnpDispatcherCustomer& aCustomer );
+    virtual void RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer );
+    virtual TInetAddr HttpServerAddress();
+    
+    
+    virtual void SendLocalRequestL( CUpnpHttpMessage* aMessage,
+                                    MUpnpDispatcherCustomer& aCustomer );
+
+    virtual void SendMessageL( CUpnpHttpMessage* aMessage,
+                               MUpnpDispatcherCustomer& aCustomer,
+                               TBool aIsLocal );
+
+    virtual void StopIgnoringL( const TDesC8& aUuids );
+
+    virtual void StartIPFilteringL();
+    virtual void StopIPFiltering();
+    
+    /**
+    * Stops http server    
+    */
+    virtual void StopHttpServer();
+    
+    /**
+    * Starts http server    
+    */
+    virtual void StartHttpServerL();
+    
+private:
+
+    /**
+    * C++ constructor
+    */
+    CUpnpCpStackRequestorImpl();
+
+    /**
+    * 2nd phase constructor
+    */
+    void ConstructL( MUpnpDiscoveryObserver& aDiscoveryObserver );
+
+private:
+
+    // pointer to dispatcher
+    CUpnpDispatcher* iDispatcher;
+    };
+
+#endif //UPNPCPSTACKREQUESTORIMPL_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpcpstackrequestorimplbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,53 @@
+/** @file
+* 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:  Provides default implementation of MUpnpCpHttpClientRequestor interface.
+*
+*/
+
+#ifndef UPNPCPSTACKREQUESTORIMPLBASE_H_
+#define UPNPCPSTACKREQUESTORIMPLBASE_H_
+
+#include "upnpcpstackrequestor.h"
+#include <e32base.h>
+
+
+
+/**
+ * Base implementation. Class used in WLan Lost case.
+ */
+NONSHARABLE_CLASS( CUpnpCpStackRequestorImplBase ) : public CBase, 
+                                                     public MUpnpCpStackRequestor
+    {
+public: //from MUpnpCpStackRequestor
+
+    virtual void SearchL( const TDesC8& aSearchString );
+    virtual void SearchL( const TDesC16& aSearchString );
+    virtual void AddCustomerL( const MUpnpDispatcherCustomer& aCustomer );
+    virtual void RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer );
+    virtual TInetAddr HttpServerAddress();    
+    virtual void SendLocalRequestL( CUpnpHttpMessage* aMessage,
+                                    MUpnpDispatcherCustomer& aCustomer );
+    virtual void SendMessageL( CUpnpHttpMessage* aMessage,
+                               MUpnpDispatcherCustomer& aCustomer,
+                               TBool aIsLocal );
+    virtual void StopIgnoringL( const TDesC8& aUuids );
+    virtual void StartIPFilteringL();
+    virtual void StopIPFiltering();
+    virtual void StopHttpServer();
+    virtual void StartHttpServerL();
+    
+
+    };
+
+#endif //UPNPCPSTACKREQUESTORIMPLBASE_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpdevicedescriptionhttptransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,58 @@
+/** @file
+* 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:  Declaration of CUpnpDeviceDescriptionHttpTransaction
+*
+*/
+
+#ifndef __UPNPDEVICEDESCRIPTIONHTTPTRANSACTION_H__
+#define __UPNPDEVICEDESCRIPTIONHTTPTRANSACTION_H__
+
+#include "upnphttptransaction.h"
+
+class CUpnpControlPoint;
+
+/**
+ * Http transation to get device description message.
+ */
+NONSHARABLE_CLASS ( CUpnpDeviceDescriptionHttpTransaction ) : public CUpnpHttpTransaction
+{
+public:
+    static CUpnpDeviceDescriptionHttpTransaction* NewLC( CUpnpHttpMessage* aRequest,
+                                                         CUpnpControlPoint& aControlPoint );
+
+    virtual ~CUpnpDeviceDescriptionHttpTransaction();
+
+private:    //from CUpnpHttpTransaction
+    /**
+     * Callback called when response comes.
+     * Processes response by passing it to control point.
+     */
+    virtual void ProcessResponseL();
+
+private:
+    CUpnpDeviceDescriptionHttpTransaction(
+        CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint );
+
+private:
+    /**
+     * Reference to control point - for callback purposes.
+     */
+    CUpnpControlPoint& iControlPoint;
+
+};
+
+#endif /*__UPNPDEVICEDESCRIPTIONHTTPTRANSACTION_H__*/
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpfilesender.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,95 @@
+/** @file
+ * 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:  CUpnpFileSender declaration
+ *
+ */
+
+#ifndef UPNPFILESENDER_H
+#define UPNPFILESENDER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include "httptransferobserver.h"
+
+class CHttpUploader;
+class CUpnpHttpMessage;
+class CUpnpControlPoint;
+
+// CLASS DECLARATION
+
+/**
+ *  CUpnpFileSender
+ * 
+ */
+NONSHARABLE_CLASS( CUpnpFileSender ) : public CBase, public MHttpTransferObserver
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpFileSender();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpFileSender* NewL( CUpnpControlPoint& aCPToNotifyOfSendingResult );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpFileSender* NewLC( CUpnpControlPoint& aCPToNotifyOfSendingResult );
+
+    /**
+     * Send particular file by http post
+     * Message should have post method and outfilenama set, and proper destination
+     * address set. Response will be notified to control point object
+     */
+    void SendL( CUpnpHttpMessage& aMessageToSend );
+    
+private:
+    //from MHttpTransferObserver
+    
+    virtual void TransferProgress( TAny* aKey,
+                                   TInt aBytes, 
+                                   TInt aTotalBytes );
+
+    virtual void ReadyForTransferL( TAny* aKey );
+
+    virtual void TransferCompleted( TAny* aKey, TInt aStatus );    
+    
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpFileSender( CUpnpControlPoint& aCPToNotifyOfSendingResult );
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+private:
+
+    // control point, not owned
+    CUpnpControlPoint& iControlPoint;
+    
+    CHttpUploader* iUploader;
+    
+    };
+
+#endif // UPNPFILESENDER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpservicedescriptionhttptransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,54 @@
+/** @file
+* 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:  Declaration of CUpnpServiceDescriptionHttpTransaction
+*
+*/
+
+
+#ifndef __UPNPSERVICEDESCRIPTIONHTTPTRANSACTION_H__
+#define __UPNPSERVICEDESCRIPTIONHTTPTRANSACTION_H__
+
+#include "upnphttptransaction.h"
+
+class CUpnpControlPoint;
+
+/**
+ * Http transation to get service description message.
+ */
+NONSHARABLE_CLASS ( CUpnpServiceDescriptionHttpTransaction ) : public CUpnpHttpTransaction
+{
+public:
+    static CUpnpServiceDescriptionHttpTransaction* NewLC(
+        CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint );
+    virtual ~CUpnpServiceDescriptionHttpTransaction();
+
+private:    //from CUpnpHttpTransaction
+    /**
+     * Callback called when response comes.
+     * Processes response by passing it to control point.
+     */
+    virtual void ProcessResponseL();
+
+private:
+    CUpnpServiceDescriptionHttpTransaction(
+        CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint );
+
+private:
+    CUpnpControlPoint& iControlPoint;
+};
+
+#endif /*__UPNPSERVICEDESCRIPTIONHTTPTRANSACTION_H__*/
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpserviceinfo.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,172 @@
+/** @file
+* 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:  implementation of Control Point
+*
+*/
+
+
+#ifndef C_CUPNPSERVICEINFO_H
+#define C_CUPNPSERVICEINFO_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <badesca.h>
+#include "upnpdispatchercustomer.h"
+#include "upnpdispatcher.h"
+#include "upnpnotifytimer.h"
+
+// FORWARD DECLARATIONS
+class CUpnpControlPoint;
+
+// CLASS DECLARATION
+/**
+*  @brief Implementation of the CUpnpServiceInfo
+*
+*  @since Series60 2.0
+*/
+NONSHARABLE_CLASS( CUpnpServiceInfo ) : public CBase, public MUpnpNotifyTimerObserver
+    {
+    public: // Constructors
+
+        /**
+        * Factory method
+        * @since Series60 3.1
+        * @param aControlPoint pointer to Control Point.
+        * @param aService Upnp Service
+        */
+        static CUpnpServiceInfo* CUpnpServiceInfo::NewLC(
+                            CUpnpControlPoint* aControlPoint,
+                            CUpnpService* aService );
+
+        /**
+        * Destructor
+        */
+        virtual ~CUpnpServiceInfo();
+
+        /**
+        * Starts timer
+        * @param aTimeout subscribtion timeout
+        */
+        void StartTimerL( const TDesC8& aTimeout );
+
+        /**
+        * Getter.
+        */
+        TInt SessionId();
+
+        /**
+        * Getter.
+        */
+        CUpnpService* Service();
+
+        /**
+        * Getter.
+        */
+        const TDesC8& Sid() const;
+
+        /**
+        * Setter.
+        */
+        void SetSidL( const TDesC8& aSid );
+
+        /**
+        * Get SEQ of the current service. SEQ is the sequence id of last
+        * eventing message from this service. SEQ can be inspected
+        * to observe eventing operations.
+        * @since Series60 2.0
+        * @return SEQ of last received event.
+        */
+        TUint32 Seq() const;
+
+        /**
+        * Set SEQ
+        * @since Series60 2.0
+        * @param aSeq SEQ of a event.
+        */
+        void SetSeq( TUint32 aSeq );
+
+    public: // From MNotifyTimerObserve
+
+       /**
+        * Callback function used to inform about the timer events
+        * @since Series60 2.0
+        */
+        void TimerEventL( CUpnpNotifyTimer* /*aTimer*/ );
+        /*
+        * ConstructSubscribtionPathLC
+        */
+        HBufC8* ConstructSubscribtionPathLC( const TDesC8& aControlPointPath,
+                                               TInetAddr& aAddr );
+    
+        /**
+        * These functions create Gena subscription message,
+        * which will be used for data retrieval.
+        */
+        CUpnpGenaMessage* CreateSubscriptionMessageL(
+                                          const TDesC8& aPath,
+                                          THTTPMsgType aType );
+
+        /*
+        * CreateSubscriptionMessageL
+        */
+        CUpnpGenaMessage* CreateSubscriptionMessageL(
+                                              THTTPMsgType aType);
+
+    private:
+
+        /**
+        * Constructor
+        */
+        CUpnpServiceInfo( CUpnpControlPoint * aControlPoint,
+                          CUpnpService* aService );
+        /**
+        * ConstructL
+        */
+        void ConstructL();
+
+        /*
+        * ResubscribeL
+        */
+        void ResubscribeL();
+
+      
+
+    private:
+
+        // Sid buffer, owned
+        HBufC8* iSid;
+
+        // For Control Point, owned
+        TUint32 iSeq;
+
+        // Session ID, owned
+        TInt iSessionId;
+
+        // Service, not owned
+        CUpnpService* iService;
+
+        // Resubscribe timer, owned
+        CUpnpNotifyTimer* iResubscribeTimer;
+
+        // Parent control point, not owned
+        CUpnpControlPoint* iControlPoint;
+
+        // Timeout, owned
+        TInt iTimeOut;
+    };
+
+#endif // C_CUPNPSERVICEINFO_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpservicesubscriptionhttptransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,70 @@
+/** @file
+* 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:  Declaration of CUpnpServiceSubscriptionHttpTransaction
+*
+*/
+
+#ifndef UPNPSERVICESUBSCRIPTIONHTTPTRANSACTION_H
+#define UPNPSERVICESUBSCRIPTIONHTTPTRANSACTION_H
+
+// INCLUDES
+#include "upnphttptransaction.h"
+
+// CLASS DECLARATION
+class CUpnpControlPoint;
+/**
+ *  CUpnpServiceSubscriptionHttpTransaction
+ * 
+ */
+
+NONSHARABLE_CLASS( CUpnpServiceSubscriptionHttpTransaction ) : public CUpnpHttpTransaction
+    {
+public:
+    // Constructors and destructor
+
+    /**
+    * Destructor.
+    */
+    ~CUpnpServiceSubscriptionHttpTransaction();
+
+    /**
+    * Two-phased constructor.
+    */
+    static CUpnpServiceSubscriptionHttpTransaction* NewLC( CUpnpHttpMessage* aRequest,
+                                                           CUpnpControlPoint& aControlPoint );
+
+private:    //from CUpnpHttpTransaction
+    /**
+    * Callback called when response comes.
+    * Processes response by passing it to control point.
+    */
+    virtual void ProcessResponseL();
+
+private:
+
+    /**
+    * Constructor for performing 1st stage construction
+    */
+    CUpnpServiceSubscriptionHttpTransaction( CUpnpHttpMessage* aRequest,
+                                             CUpnpControlPoint& aControlPoint );
+
+private:
+     //control point, not owned
+    CUpnpControlPoint& iControlPoint;
+
+    //SessionId of message that added service to control point's subscribed services
+    TInt iServiceSessionId;
+    };
+
+#endif // UPNPSERVICESUBSCRIPTIONHTTPTRANSACTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpserviceunsubscriptionhttptransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,69 @@
+/** @file
+* 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:  Declaration of CUpnpServiceUnsubscriptionHttpTransaction
+*
+*/
+
+#ifndef UPNPSERVICEUNSUBSCRIBETRANSACTION_H
+#define UPNPSERVICEUNSUBSCRIBETRANSACTION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include "upnphttptransaction.h"
+
+// CLASS DECLARATION
+class CUpnpControlPoint;
+/**
+ *  Cupnpserviceunsubscribetransaction
+ * 
+ */
+
+NONSHARABLE_CLASS( CUpnpServiceUnsubscriptionHttpTransaction ) : public CUpnpHttpTransaction
+    {
+public:
+    // Constructors and destructor
+
+    /**
+    * Destructor.
+    */
+    ~CUpnpServiceUnsubscriptionHttpTransaction();
+
+    /**
+    * Two-phased constructor.
+    */
+    static CUpnpServiceUnsubscriptionHttpTransaction* NewLC( CUpnpHttpMessage* aRequest,
+                                                             CUpnpControlPoint& aControlPoint );
+
+private:
+
+    /**
+    * Constructor for performing 1st stage construction
+    */
+    CUpnpServiceUnsubscriptionHttpTransaction( CUpnpHttpMessage* aRequest,
+                                               CUpnpControlPoint& aControlPoint );
+
+    /**
+    * Callback called when response comes.
+    * Processes response by passing it to control point.
+    */
+    virtual void ProcessResponseL();
+
+private: 
+
+	//control point, now owned
+    CUpnpControlPoint& iControlPoint;
+    };
+
+#endif // UPNPSERVICEUNSUBSCRIBETRANSACTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/inc/upnpsoapactionhttptransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,59 @@
+/** @file
+* 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:  Declaration of CUpnpSoapActionHttpTransaction
+*
+*/
+
+
+#ifndef C__CUPNPSOAPACTIONHTTPTRANSACTION_H__
+#define C__CUPNPSOAPACTIONHTTPTRANSACTION_H__
+
+#include "upnphttptransaction.h"
+
+class CUpnpControlPoint;
+
+/**
+ * Http transation to get service description message.
+ */
+NONSHARABLE_CLASS ( CUpnpSoapActionHttpTransaction ) : public CUpnpHttpTransaction
+{
+public:
+    static CUpnpSoapActionHttpTransaction* NewLC(
+        CUpnpHttpMessage* aRequest, TInt aActionId, CUpnpControlPoint& aControlPoint );
+    
+    virtual ~CUpnpSoapActionHttpTransaction();
+
+
+private:    //from CUpnpHttpTransaction
+    /**
+     * Callback called when response comes.
+     * Processes response by passing it to control point.
+     */
+    virtual void ProcessResponseL();
+
+private:
+    CUpnpSoapActionHttpTransaction(
+        CUpnpHttpMessage* aRequest, TInt aActionId, CUpnpControlPoint& aControlPoint );
+
+private:
+    
+    TInt iActionId; //owned
+    
+    CUpnpControlPoint& iControlPoint; //not owned
+    
+};
+
+#endif /*C__CUPNPSOAPACTIONHTTPTRANSACTION_H__*/
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcontrolpoint.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1276 @@
+/** @file
+* 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:  Declares ControlPoint class.
+ *
+*/
+
+
+// INCLUDE FILES
+
+#include <e32base.h>
+#include <e32cons.h>
+#include <e32std.h>
+#include <in_sock.h>
+#include <charconv.h>
+#include <utf.h>
+
+#include "upnpdispatcher.h"
+#include "upnphttpmessage.h"
+#include "upnpsoapmessage.h"
+#include "upnpicon.h"
+#include "upnpdevice.h"
+#include "upnpstring.h"
+#include "upnphttpmessagefactory.h"
+#include "upnpsoapmessagefactory.h"
+#include "upnpgenamessagefactory.h"
+#include "upnpserviceinfo.h"
+#include "upnpcontrolpoint.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcons.h"
+#include "upnpcpbhttpmessagecontroller.h"
+#include "upnpcpbcurrenthttpclient.h"
+#include "upnpcpbdescriptionagent.h"
+#include "upnpcpbdiscoveryagent.h"
+#include "upnpcpbdevicerepository.h"
+#include "upnpcpstackrequestor.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpconnectionmanagernetworkeventprovider.h"
+#include "upnpcpbinitialeventretryhandler.h"
+
+#define KLogFile _L("UPnPCP.txt")
+#include "upnpcustomlog.h"
+
+using namespace UpnpHTTP;
+
+static const TInt KDTargetDeviceTypesGranularity = 1;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::CUpnpControlPoint
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpControlPoint::CUpnpControlPoint()
+    : iPredefinedStackRequestor( NULL ), iPredefinedHttpRequestor( NULL )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::CUpnpControlPoint
+// C++ constructor for internal, automated test cases use
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpControlPoint::CUpnpControlPoint(
+    MUpnpCpStackRequestor& aStackRequestor, MUpnpCpHttpRequestor& aHttpRequestor )
+    : iPredefinedStackRequestor( &aStackRequestor ),
+      iPredefinedHttpRequestor( &aHttpRequestor )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::~CUpnpControlPoint
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpControlPoint::~CUpnpControlPoint()
+    {
+    LOG_FUNC_NAME;
+
+    delete iCpbHttpClient;
+
+    iSubscribedServicesInfos.ResetAndDestroy();
+    iActionList.ResetAndDestroy();
+    
+    if ( iTargetDeviceTypes )
+        {
+        iTargetDeviceTypes->Reset();
+        delete iTargetDeviceTypes;
+        }
+
+    delete iDescriptionAgent;
+    delete iDiscoveryAgent;
+
+    delete iNetworkEventProvider;
+
+    delete iSaxController;
+    delete iDeviceRepository;
+    delete iInitialEventRetry;
+    LOGS("CUpnpControlPoint::~CUpnpControlPoint - END");
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::ConstructL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::ConstructL( const CDesC8Array& aTargetDeviceTypes )
+    {
+    iNetworkEventProvider = CUpnpConnectionManagerNetworkEventProvider::NewL( *this );
+
+    iCpbHttpClient =
+        CUpnpCpbCurrentHttpClient::NewL(
+            *this, iPredefinedHttpRequestor, iPredefinedStackRequestor );
+    iTargetDeviceTypes = new( ELeave ) CDesC8ArrayFlat( KDTargetDeviceTypesGranularity );
+
+    for ( TInt i( 0 ); i < aTargetDeviceTypes.Count(); i++ )
+        {
+        iTargetDeviceTypes->AppendL( aTargetDeviceTypes[i]);
+        }
+    iDeviceRepository = CUpnpCpbDeviceRepository::NewL(*iTargetDeviceTypes);
+
+    iSaxController = CUpnpContentHandlersController::NewL();
+    iDiscoveryAgent = CUpnpCpbDiscoveryAgent::NewL( *iCpbHttpClient );
+    iDescriptionAgent =
+        CUpnpCpbDescriptionAgent::NewL(
+            *this, *iCpbHttpClient, *iDeviceRepository );
+    
+    iInitialEventRetry = new( ELeave ) CUpnpCpbInitialEventRetryHandler( *this );
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::ConstructL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::ConstructL( const TDesC8& aTargetDeviceType )
+    {
+    CDesC8ArrayFlat* targetDeviceTypes =
+    new (ELeave) CDesC8ArrayFlat( KDTargetDeviceTypesGranularity );
+    CleanupStack::PushL( targetDeviceTypes );
+    targetDeviceTypes->AppendL( aTargetDeviceType );
+    ConstructL( *targetDeviceTypes );
+    CleanupStack::PopAndDestroy( targetDeviceTypes );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::SearchL
+// Search intresting Device Types from network
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::SearchL( const TDesC8& aSearchString )
+    {
+    if( aSearchString.Length() == 0 )
+        {
+        User::Leave( KErrCorrupt );
+        }
+    iDiscoveryAgent->SearchL( aSearchString );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::SendL
+// Send an action message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::SendL( CUpnpAction* aAction )
+    {
+    iCpbHttpClient->SendActionL( aAction );
+    iActionList.AppendL( aAction );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::SendL
+// Send HTTP message
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::SendL( CUpnpHttpMessage* aHttpMessage )
+    {
+    iCpbHttpClient->SendFileByPostL(aHttpMessage);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::SendResponseMessageLD
+// Send HTTP message and destroy it (leave safe)
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::SendResponseMessageLD( CUpnpHttpMessage* aHttpMessage )
+    {
+    CleanupStack::PushL( aHttpMessage );
+    iCpbHttpClient->SendL( aHttpMessage );
+    CleanupStack::PopAndDestroy( aHttpMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::DeviceList
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const RPointerArray<CUpnpDevice>& CUpnpControlPoint::DeviceList() const
+    {
+    return iDeviceRepository->DiscoveredDeviceList();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::SubscribeL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::SubscribeL( CUpnpService* aService )
+    {
+    LOG_FUNC_NAME;
+
+    if ( !aService )
+        {
+        return;
+        }
+
+    if( FindServiceInfoByService( aService ) )
+        {
+        return;
+        }
+
+    LOGS("CUpnpControlPoint::SubscribeL - Subscribing service");
+
+    CUpnpServiceInfo* serviceInfo = CUpnpServiceInfo::NewLC( this, aService );
+    iSubscribedServicesInfos.AppendL( serviceInfo );
+    CleanupStack::Pop( serviceInfo );
+
+    iCpbHttpClient->SendSubscribeL( serviceInfo );
+
+    LOGS("CUpnpControlPoint::SubscribeL - end");
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::UnsubscribeL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::UnsubscribeL( const CUpnpService* aService )
+    {
+    UnsubscribeL( const_cast<CUpnpService*>( aService ) , ETrue );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::UnsubscribeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::UnsubscribeL( CUpnpService* aService,
+    TBool aSendUnsubscribeMessage )
+    {
+    LOG_FUNC_NAME;
+
+    if ( !aService )
+        {
+        return;
+        }
+
+    CUpnpServiceInfo* subscribedServiceInfo =
+            FindServiceInfoByService( aService );
+    if ( !subscribedServiceInfo )
+        {
+        return;
+        }
+
+    LOGS("CUpnpControlPoint::UnsubscribeL - Unsubscribing service");
+
+    RemoveFromSubscribedList( subscribedServiceInfo );
+
+    if ( aSendUnsubscribeMessage )
+        {
+        CleanupStack::PushL( subscribedServiceInfo );
+        iCpbHttpClient->SendUnsubscribeL( subscribedServiceInfo );
+        CleanupStack::Pop( subscribedServiceInfo );
+        }
+
+    delete subscribedServiceInfo;
+
+    LOGS("CUpnpControlPoint::UnsubscribeL - end");
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::ResubscribeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::ResubscribeL( CUpnpServiceInfo* aServiceInfo )
+    {
+    iCpbHttpClient->SendResubscribeL( aServiceInfo );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::RemoveFromSubscribedList
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::RemoveFromSubscribedList(
+    CUpnpServiceInfo* aServiceInfoToRemove )
+    {
+    const TInt idx = iSubscribedServicesInfos.Find( aServiceInfoToRemove );
+    if ( KErrNotFound != idx )
+        {
+        iSubscribedServicesInfos.Remove( idx );
+        }
+    iSubscribedServicesInfos.GranularCompress();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::DeviceFoundL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::DeviceFoundL( CUpnpDevice& aDevice )
+    {
+    iDescriptionAgent->DeviceAliveNotificationL(&aDevice);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::DeviceLostL
+// Callback function - remove device
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::DeviceLostL( CUpnpDevice& aDevice )
+    {
+    LOG_FUNC_NAME;
+
+    //device from ssdp
+    CUpnpDevice* ssdpDevice =
+        iDeviceRepository->RemoveIncomingDevice( aDevice.Uuid() );
+    if ( ssdpDevice )
+        {
+        delete ssdpDevice;
+        }
+    CUpnpDevice* device = NULL;
+
+    device = iDeviceRepository->FindDevice( aDevice.Uuid() );
+
+    if ( !device )
+        {
+        return;
+        }
+
+    if ( aDevice.Expired() )
+        {
+        device->SetExpired( ETrue );
+        if ( !AllDevicesExpired( device ) )
+            {
+            return;
+            }
+        }
+
+    // always remove whole device tree
+    if ( device->IsEmbeddDevice() )
+        {
+        CUpnpDevice* rootDevice = iDeviceRepository->FindRoot( device->Uuid() );
+        // In case of error when root device is not found during discovery
+        if ( rootDevice )
+            {
+            device = rootDevice;
+            }
+        }
+
+    RemoveRootDeviceLD( device );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::AllDevicesExpired
+//
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpControlPoint::AllDevicesExpired( CUpnpDevice* aDevice )
+    {
+    // notification about expiration of cache-control time of aDevice
+    if ( aDevice->IsEmbeddDevice() ) // take root device
+        {
+        aDevice = iDeviceRepository->FindRoot( aDevice->Uuid() );
+        }
+    // if root device not expired then return
+    if ( !aDevice || !aDevice->Expired() )
+        {
+        return EFalse;
+        }
+    RPointerArray<CUpnpDevice> devices;
+    aDevice->GetAllDevices( devices ); // take all embedded devices
+    for ( TInt k = 0; k < devices.Count(); k++ )
+        {
+        // if not all embedded devices expired then return
+        if ( !devices[k]->Expired() )
+            {
+            devices.Close();
+            return EFalse;
+            }
+        }
+    devices.Close();
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::Path
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpControlPoint::Path()
+    {
+    return KPath();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::MessageReceived
+// Callback funtion - HTTP message received
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::MessageReceived( CUpnpHttpMessage* aHttpMessage )
+    {
+    HttpResponseReceived( aHttpMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::MapHttpError
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpControlPoint::MapHttpError( TInt aError )
+    {
+    if ( aError >= EHttpBadRequest && aError < EHttpInternalServerError )
+        {
+        return KErrCouldNotConnect;
+        }
+    else if ( aError > EHttpInternalServerError )
+        {
+        return KErrServerBusy;
+        }
+    else
+        {
+        return KErrUnknown;
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::CheckEventKey
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpControlPoint::CheckEventKey( const TDesC8& aIncomingSeq,
+    TUint32 aExistingSeq )
+    {
+    const TUint KMaxSeq = 2146583647;
+    const TUint KMinSeq = 1;
+
+    TUint IncomingSeq;
+    TInt error = KErrNone;
+
+    TLex8 lex(aIncomingSeq);
+    lex.Mark();
+    error = lex.Val( IncomingSeq );
+
+    //--- check if SEQ is a number
+    if ( !error )
+        {
+        lex.UnGetToMark();
+
+        for ( TInt i(0); i < aIncomingSeq.Length(); i++ )
+            {
+            TChar character = lex.Get();
+            if ( !(character.IsDigit() ) )
+                {
+                error = KErrGeneral;
+                break;
+                }
+            }
+        }
+
+    //--- check SEQ incrementing/wrapping
+    if ( !error )
+        {
+        // when initial event appears, don't check SEQ increment
+        if ( (IncomingSeq == 0 ) && (aExistingSeq == 0 ) )
+            return KErrNone;
+
+        if ( aExistingSeq < KMaxSeq )
+            {
+            aExistingSeq++;
+            }
+        else
+            {
+            aExistingSeq = KMinSeq;
+            }
+
+        // if 'incoming SEQ' == 'incremented existing SEQ' -> OK
+        if ( IncomingSeq == aExistingSeq )
+            {
+            error = KErrNone;
+            }
+        else
+            {
+            error = KErrCancel;
+            }
+        }
+
+    return error;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::ThrowErrorL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::SendErrorResponseL( CUpnpHttpMessage* aHttpMessage,
+    THttpStatusCode aCode )
+    {
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL(
+        aHttpMessage, aCode );
+    SendResponseMessageLD( msg );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::SubscriptionResponseReceivedL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::SubscriptionResponseReceivedL(
+    CUpnpHttpMessage& aHttpMessage )
+    {
+    LOG_FUNC_NAME;
+    CUpnpGenaMessage* genaMsg =
+            reinterpret_cast <CUpnpGenaMessage*> ( &aHttpMessage );
+
+    CUpnpServiceInfo* tmpServiceInfo = FindServiceInfoByGenaMessage( genaMsg );
+    if ( !tmpServiceInfo )
+        {
+        return;
+        }
+
+    tmpServiceInfo->SetSidL( genaMsg->Sid() );
+    tmpServiceInfo->StartTimerL( genaMsg->Timeout() );
+    if(iDeviceRepository->MatchTargetDevice(_L8("*")))
+        {
+        aHttpMessage.SetType(ESubscription);
+        aHttpMessage.SetDestinationPathL(tmpServiceInfo->Service()->SubscriptionUrl());
+        TRAP_IGNORE( HttpResponseReceivedL( &aHttpMessage ) );
+        }
+
+    LOGS("CUpnpControlPoint::SubscRespRcvdL - end");
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::HandlePostponedInitialEventL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::HandlePostponedInitialEventL( CUpnpGenaMessage& aGenaMsg )
+    {
+    CUpnpServiceInfo* serviceInfo = FindServiceInfoBySid(
+            iSubscribedServicesInfos, aGenaMsg.Sid() );
+    if ( serviceInfo )
+        {
+        if(iDeviceRepository->MatchTargetDevice(_L8("*")))
+            {
+            aGenaMsg.SetDestinationPathL(serviceInfo->Service()->SubscriptionUrl());
+            TRAP_IGNORE( HttpResponseReceivedL( &aGenaMsg) );
+            }
+        ParseEventUpdateStateVariablesL( aGenaMsg, *serviceInfo );        
+        SendResponseMessageLD( RUpnpHttpMessageFactory::HttpResponseOkL(
+                &aGenaMsg ) );
+        }
+    else
+        {
+        SendErrorResponseL( &aGenaMsg, EHttpPreconditionFailed );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::UnSubscriptionResponseReceived
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::UnSubscriptionResponseReceived()
+    {
+    LOG_FUNC_NAME;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::NotifyReceivedL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::NotifyReceivedL( CUpnpHttpMessage& aHttpMessage )
+    {
+    LOGS( "CUpnpControlPoint::NotifyReceivedL - start" );
+    CUpnpGenaMessage* genaMsg =
+            reinterpret_cast<CUpnpGenaMessage*> ( &aHttpMessage );
+    CleanupStack::PushL(genaMsg);
+
+    THttpStatusCode code = ValidateEventResolveHttpResponseCode( *genaMsg );
+    if ( code != EHttp200Ok )
+        {
+        //--- If some of conditions are not fulfilled, send error
+        SendErrorResponseL(genaMsg, code);
+        CleanupStack::PopAndDestroy(genaMsg);
+        LOGS( "CUpnpControlPoint::NotifyReceivedL - end" );
+        return;
+        }
+    //--- checking if genaMsg SID is the same like the one in subscribed service.
+    CUpnpServiceInfo* subscribedServiceInfo = FindServiceInfoBySid(
+            iSubscribedServicesInfos, genaMsg->Sid());
+
+    if ( subscribedServiceInfo )
+        {
+        //===== Checking validity of SEQ header
+        TInt seqError = KErrNone;
+        seqError = CheckEventKey( genaMsg->Seq(), subscribedServiceInfo->Seq() );
+        if ( seqError )
+            {
+            if ( seqError == KErrCancel )
+                {
+                //------ if SEQ's order invalid
+                //-> e.g 0,1,2 and then 1 -> Unsubscribe/Subscribe
+                ResubscribeL( *subscribedServiceInfo );
+                }
+            else
+                {
+                LOGS( "CUpnpControlPoint::NotifyReceivedL - SEQ INAVLID" );
+                SendErrorResponseL( genaMsg, EHttpBadRequest );
+                User::Leave(seqError);
+                }
+            }
+        else
+            {
+            if(iDeviceRepository->MatchTargetDevice(_L8("*")))
+                {
+                genaMsg->SetDestinationPathL(subscribedServiceInfo->Service()->SubscriptionUrl());
+                TRAP_IGNORE( HttpResponseReceivedL( genaMsg) );
+                }
+            ParseEventUpdateStateVariablesL( *genaMsg, *subscribedServiceInfo );
+            SendResponseMessageLD(RUpnpHttpMessageFactory::HttpResponseOkL( genaMsg ));
+            LOGS( "CUpnpControlPoint::NotifyReceivedL - send OK" );
+            }        
+        CleanupStack::PopAndDestroy( genaMsg );
+        
+        }
+    else
+        {
+        TInt seq;
+        TLex8 lex( genaMsg->Seq() );
+        TInt error = lex.Val(seq);
+        
+        if ( !error && seq == 0 )
+            {
+            CleanupStack::Pop( genaMsg );
+            //ownership is passed through
+            iInitialEventRetry->AddL( genaMsg );        
+            }
+        else
+            {
+            SendErrorResponseL( genaMsg, EHttpPreconditionFailed );            
+            CleanupStack::PopAndDestroy( genaMsg );
+            }
+        }
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::Device
+// This function returns a pointer to device identified by UUID.
+// (other items were commented in a header).es
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceInfo* CUpnpControlPoint::FindServiceInfoBySid( RPointerArray<CUpnpServiceInfo>& aInfos,
+        const TDesC8& aSid )
+    {
+    for ( TInt i=0; i < aInfos.Count(); i++ )
+        {
+        CUpnpServiceInfo* subscribedServiceInfo = aInfos[i];             
+        if ( (subscribedServiceInfo->Sid().Length()> 0 )
+         && (subscribedServiceInfo->Sid() == aSid ) )
+            {
+            return subscribedServiceInfo;
+            }
+        }
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::ResubscribeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::ResubscribeL( CUpnpServiceInfo& aInfo )
+    {
+    //------ if SEQ's order invalid
+    //-> e.g 0,1,2 and then 1 -> Unsubscribe/Subscribe
+    CUpnpService* service =
+        aInfo.Service(); // remember the service
+
+    UnsubscribeL( service );
+    // after unsubscribing -> subscribe again
+    SubscribeL( service );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::ParseEventUpdateStateVariablesL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::ParseEventUpdateStateVariablesL(
+        CUpnpGenaMessage& aGenaMsg, CUpnpServiceInfo& aInfo )
+    {
+    TInt parsingError = KErrNone;
+        TRAP( parsingError, iSaxController->AttachL(
+                aGenaMsg.Body(), *( aInfo.Service() ) ) );
+    if ( parsingError )
+        {
+        LOGS( "CUpnpControlPoint::NotifyReceivedL - "
+                "parsing gena or parsing SEQ - FAILED" );
+        SendErrorResponseL( &aGenaMsg, EHttpBadRequest );
+        User::Leave( parsingError );
+        }
+
+    // if SEQ ok -> put the value to the service
+    TInt seq;
+    TLex8 lex( aGenaMsg.Seq() );
+    TInt error = lex.Val( seq );
+    // error ignored, it is fully checked in CheckEventKey()
+
+    aInfo.SetSeq( seq );
+    StateUpdated( aInfo.Service() );
+
+    }
+
+ // -----------------------------------------------------------------------------
+// CUpnpControlPoint::ValidateEventResolveHttpResponseCode
+//
+// -----------------------------------------------------------------------------
+//
+THttpStatusCode CUpnpControlPoint::ValidateEventResolveHttpResponseCode(
+        CUpnpGenaMessage& aGenaMsg )
+
+    {
+    THttpStatusCode code = EHttp200Ok;
+    //--- NOTIFY message syntax - checking if headers: NT and NTS exists
+    
+    if ( aGenaMsg.Method() != UpnpGENA::KGenaNotify() 
+            || aGenaMsg.Nt() == KNoHeader 
+            || aGenaMsg.Nts() == KNoHeader )
+        {
+        // headers NT or NTS are missing
+        code = EHttpBadRequest;
+        LOGS( "CUpnpControlPoint::NotifyReceivedL - bad request" );
+        }
+
+    //--- NOTIFY message syntax
+    //- checking if headers: NT and NTS has proper structure [name: value]
+    else if (aGenaMsg.Nt() != UpnpGENA::KDefaultNt || aGenaMsg.Nts()
+            != UpnpGENA::KDefaultNts)
+        {
+        // headers NT or NTS are invalid
+        code = EHttpPreconditionFailed;
+        LOGS( "CUpnpControlPoint::NotifyReceivedL - headers NT or NTS are invalid" );
+        }
+    return code;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::Device
+// This function returns a pointer to device identified by UUID.
+// (other items were commented in a header).es
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const CUpnpDevice* CUpnpControlPoint::Device(const TDesC8& aUuid)
+    {
+    RPointerArray<CUpnpDevice> devices = DeviceList();
+    for( TInt i(0); i < devices.Count(); i++)
+        {
+        if(aUuid.Compare( devices[i]->Uuid() ) == 0)
+            {
+            return devices[i];
+            }
+        }
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::AddressChangedL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::AddressChangedL()
+    {
+    LOG_FUNC_NAME;
+    TInt i(0);
+    RPointerArray<CUpnpDevice> devices = iDeviceRepository->DiscoveredDeviceList();
+    RPointerArray<CUpnpDevice> rootDevices;
+    CleanupClosePushL(rootDevices);
+    for( i = 0; i < devices.Count(); i++)
+        {
+        if(!devices[i]->IsEmbeddDevice())
+            {
+            rootDevices.AppendL(devices[i]);
+            }
+        }
+    devices = iDeviceRepository->UnneddedDeviceList();
+    for( i = 0; i < devices.Count(); i++)
+        {
+        if(!devices[i]->IsEmbeddDevice())
+            {
+            rootDevices.AppendL(devices[i]);
+            }
+        }
+    devices = iDeviceRepository->UninterestingDeviceList();
+    for( i = 0; i < devices.Count(); i++)
+        {
+        if(!devices[i]->IsEmbeddDevice())
+            {
+            rootDevices.AppendL(devices[i]);
+            }
+        }
+    devices = iDeviceRepository->IncompliteDeviceList();
+    for( i = 0; i < devices.Count(); i++)
+        {
+        if(!devices[i]->IsEmbeddDevice())
+            {
+            rootDevices.AppendL(devices[i]);
+            }
+        }
+
+    for( i = 0; i < rootDevices.Count(); i++)
+        {
+        RemoveRootDeviceLD( rootDevices[i] );
+        }
+    CleanupStack::PopAndDestroy(&rootDevices);
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::GiveAddressL
+//
+// -----------------------------------------------------------------------------
+//
+TInetAddr CUpnpControlPoint::GiveAddressL( const TDesC8& aUrl )
+    {
+    TInetAddr result= INET_ADDR(0,0,0,0);
+    result.SetPort( 0 );
+    TInt colonPos = aUrl.Find( KColon() ) ;
+    if ( colonPos != KErrNotFound )
+        {
+        TPtrC8 addressStr = aUrl.Left( colonPos );
+        HBufC* buffer = HBufC::NewL( addressStr.Length() );
+        TPtr bufferPtr(buffer->Des() );
+        bufferPtr.Copy( addressStr );
+        result.Input( *buffer );
+        delete buffer;
+        const TDesC8& portStr = aUrl.Mid( colonPos + 1 );
+        TLex8 lexer(portStr);
+        TInt port(0);
+        lexer.Val( port );
+        result.SetPort( port );
+        }
+    else
+        {
+        HBufC* buffer = HBufC::NewL( aUrl.Length() );
+        TPtr bufferPtr(buffer->Des() );
+        bufferPtr.Copy( aUrl );
+        result.Input( *buffer );
+        delete buffer;
+        }
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::RemoveRootDeviceLD
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::RemoveRootDeviceLD( CUpnpDevice* aDevice )
+    {
+    TBool isDiscovered = EFalse;
+
+    iCpbHttpClient->StopIgnoringL( aDevice );
+
+    RemoveActionsL( aDevice );
+    RemoveServicesL( aDevice );
+
+    //find all children of the device to be removed
+    RPointerArray<CUpnpDevice> devices;
+    aDevice->GetAllDevices( devices );
+    CleanupClosePushL( devices );
+
+    for ( TInt k = 0; k < devices.Count(); k++ )
+        {
+        RemoveActionsL( devices[k] );
+        isDiscovered
+                = iDeviceRepository->IsDiscoveredDevice( devices[k]->Uuid() );
+        iDeviceRepository->RemoveDevice( devices[k] );
+        if ( isDiscovered )
+            {
+            DeviceDisappeared( devices[k] );
+            }
+        RemoveServicesL( devices[k] );
+        }
+
+    CleanupStack::PopAndDestroy( &devices );
+
+    iActionList.Compress();
+    isDiscovered = iDeviceRepository->IsDiscoveredDevice( aDevice->Uuid() );
+    iDeviceRepository->RemoveDevice( aDevice );
+    if ( isDiscovered )
+        {
+        DeviceDisappeared( aDevice );
+        }
+
+    delete aDevice;
+    aDevice = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::RemoveActionsL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::RemoveActionsL( CUpnpDevice* aDevice )
+    {
+    for ( TInt i = 0; i < iActionList.Count(); ++i )
+        {
+        if( ( iActionList[i]->Service().Device().Uuid()).Compare(
+            aDevice->Uuid() ) == 0 )
+            {
+            CUpnpAction* action = iActionList[i];
+            
+            CUpnpSoapMessage* errorMsg =
+                    RUpnpSoapMessageFactory::SoapResponseL( action,
+                        EActionFailed );
+
+            CleanupStack::PushL( errorMsg );
+            iSaxController->UpdateActionWithErrorResponseL( errorMsg, action );
+            ActionResponseReceived( action );
+            iActionList.Remove( i );
+            delete action;
+            CleanupStack::PopAndDestroy( errorMsg );
+            //as a action is removed from the list the
+            //index is kept as same for the next loop.
+            --i;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::RemoveServicesL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::RemoveServicesL( CUpnpDevice* aDevice )
+    {
+    RPointerArray<CUpnpService>& services = aDevice->ServiceList();
+    for ( TInt j = 0; j < services.Count(); j++ )
+        {
+        UnsubscribeL( services[j], EFalse );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::FindServiceInfoByService
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceInfo* CUpnpControlPoint::FindServiceInfoByService(
+    CUpnpService* aService )
+    {
+    for ( TInt i=0; i < iSubscribedServicesInfos.Count() ; i++ )
+        {
+        if ( iSubscribedServicesInfos[i]->Service() == aService )
+            {
+            return iSubscribedServicesInfos[i];
+            }
+        }
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::FindServiceInfoByHttpMessage
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceInfo* CUpnpControlPoint::FindServiceInfoByGenaMessage(
+    CUpnpGenaMessage* aGenaMsg )
+    {
+    for ( TInt i=0; i < iSubscribedServicesInfos.Count() ; i++ )
+        {
+        if ( iSubscribedServicesInfos[i]->SessionId()
+                == aGenaMsg->SessionId() )
+            {
+            return iSubscribedServicesInfos[i];
+            }
+        }
+    return NULL;
+    }
+
+void CUpnpControlPoint::ProcessDeviceMessageL( CUpnpHttpMessage* aHttpMessage )
+    {
+    iDescriptionAgent->ProcessDeviceMessageL( aHttpMessage );
+    }
+
+void CUpnpControlPoint::ProcessServiceMessageL( CUpnpHttpMessage* aHttpMessage )
+    {
+    iDescriptionAgent->ProcessServiceMessageL( aHttpMessage );
+    }
+
+void CUpnpControlPoint::ProcessActionMessageL( CUpnpHttpMessage* aHttpMessage )
+    {
+    
+    TInt idx(0);
+    // Match request action
+    for ( ; idx < iActionList.Count() && iActionList[idx]->SessionId()
+            != aHttpMessage->SessionId(); idx++ )
+        {
+        }
+    if ( idx == iActionList.Count() )
+        {
+        return;
+        }
+
+    CUpnpAction* tmpAction = iActionList[idx];
+
+     
+    TInt error(KErrNone);
+    switch ( aHttpMessage->Error() )
+        {
+        case EHttp200Ok:
+            {
+            TRAP( error,
+                iSaxController->UpdateActionWithOKResponseL(
+                            static_cast<CUpnpSoapMessage*>(aHttpMessage), tmpAction );
+            );
+            }
+            break;
+        case EHttpInternalServerError:
+            {
+            TRAP( error,
+                iSaxController->UpdateActionWithErrorResponseL(
+                            static_cast<CUpnpSoapMessage*>(aHttpMessage), tmpAction );
+            );
+            break;
+            }
+        default:
+            {
+            if ( aHttpMessage->InternalError() )
+                {
+                tmpAction->SetError( aHttpMessage->InternalError() );
+                }
+            else
+                {
+                tmpAction->SetError( MapHttpError( aHttpMessage->Error() ) );
+                }
+            break;
+            }
+        }
+    if ( KErrNone != error )
+        {
+        tmpAction->SetError( error );
+        }
+    
+    ActionResponseReceived( tmpAction );
+    delete tmpAction;
+    iActionList.Remove( idx );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::StateUpdated
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::StateUpdated( CUpnpService* aService )
+    {
+    TRAP_IGNORE( StateUpdatedL( aService ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::DeviceDiscovered
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::DeviceDiscovered( CUpnpDevice* aDevice )
+    {
+    TRAP_IGNORE( DeviceDiscoveredL( aDevice ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::DeviceDisappeared
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::DeviceDisappeared( CUpnpDevice* aDevice )
+    {
+    TRAP_IGNORE( DeviceDisappearedL( aDevice ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::ActionResponseReceived
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::ActionResponseReceived( CUpnpAction* aAction )
+    {
+    TRAP_IGNORE( ActionResponseReceivedL( aAction ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::HttpResponseReceived
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpControlPoint::HttpResponseReceived( CUpnpHttpMessage* aMessage )
+    {
+    TRAP_IGNORE( HttpResponseReceivedL( aMessage ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::EnableRadaDeviceL
+//
+// -----------------------------------------------------------------------------
+//
+#ifdef RD_UPNP_REMOTE_ACCESS
+EXPORT_C void CUpnpControlPoint::EnableRadaDeviceL( TRequestStatus& aStatus )
+#else
+EXPORT_C void CUpnpControlPoint::EnableRadaDeviceL( TRequestStatus& /*aStatus*/ )
+#endif
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    iDiscoveryAgent->EnableRadaDeviceL( aStatus );
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::EnableRadaDeviceL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpControlPoint::EnableRadaDeviceL()
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    return iDiscoveryAgent->EnableRadaDeviceL();
+    #else
+    return KErrNotSupported;
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::DisableRadaDeviceL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::DisableRadaDeviceL()
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    iDiscoveryAgent->DisableRadaDeviceL();
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::StartIPFilteringL
+//
+// -----------------------------------------------------------------------------
+//
+#ifdef RD_UPNP_REMOTE_ACCESS
+EXPORT_C void CUpnpControlPoint::StartIPFilteringL( TFilteringMode aMode )
+#else
+EXPORT_C void CUpnpControlPoint::StartIPFilteringL( TFilteringMode /*aMode*/ )
+#endif
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    switch( aMode )
+        {
+        case EBoth:
+            {
+            iCpbHttpClient->StartIPFilteringL();
+            iDiscoveryAgent->StartIPFilteringL();
+            break;
+            }
+        case ERada:
+            {
+            iDiscoveryAgent->StartIPFilteringL();
+            break;
+            }
+        case EControlPoint:
+            {
+            iCpbHttpClient->StartIPFilteringL();
+            break;
+            }
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            break;
+            }
+        }
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::StopIPFilteringL
+//
+// -----------------------------------------------------------------------------
+//
+#ifdef RD_UPNP_REMOTE_ACCESS
+EXPORT_C void CUpnpControlPoint::StopIPFilteringL( TFilteringMode aMode )
+#else
+EXPORT_C void CUpnpControlPoint::StopIPFilteringL( TFilteringMode /*aMode*/ )
+#endif
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    switch( aMode )
+        {
+        case EBoth:
+            {
+            iCpbHttpClient->StopIPFiltering();
+            iDiscoveryAgent->StopIPFiltering();
+            break;
+            }
+        case ERada:
+            {
+            iDiscoveryAgent->StopIPFiltering();
+            break;
+            }
+        case EControlPoint:
+            {
+            iCpbHttpClient->StopIPFiltering();
+            break;
+            }
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            break;
+            }
+        }
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpControlPoint::NetworkEvent
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpControlPoint::NetworkEvent( CUpnpNetworkEventBase* aEvent )
+    {
+    LOG_FUNC_NAME;
+
+    switch ( aEvent->Type() )
+        {
+        case EWlanLostEvent:
+            {
+            iCpbHttpClient->WlanLostOccurs();
+            }
+            break;
+
+        case EAddressChangeEvent:
+            {         
+            TRAP_IGNORE( iCpbHttpClient->AddressChangedL(); AddressChangedL() );
+            }
+            break;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbcurrenthttpclient.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,503 @@
+/** @file
+* 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:  CUpnpCpbCurrentHttpClient
+ *
+*/
+
+#include <e32base.h>
+#include <e32cons.h>
+#include <e32std.h>
+#include <upnpsettings.h>
+#include <charconv.h>
+#include <utf.h>
+
+#include "upnpcpstackrequestor.h"
+#include "upnphttpmessage.h"
+#include "upnpsoapmessage.h"
+#include "upnpicon.h"
+#include "upnpdevice.h"
+#include "upnpstring.h"
+#include "upnphttpmessagefactory.h"
+#include "upnpsoapmessagefactory.h"
+#include "upnpgenamessagefactory.h"
+#include "upnpserviceinfo.h"
+#include "upnpcpbhttpmessagecontroller.h"
+#include "upnpcpbcurrenthttpclient.h"
+#include "upnpcontrolpoint.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcpbdevicedescription.h"
+#include "upnpdevicedescriptionhttptransaction.h"
+#include "upnpservicedescriptionhttptransaction.h"
+#include "upnpsoapactionhttptransaction.h"
+#include "upnpservicesubscriptionhttptransaction.h"
+#include "upnpserviceunsubscriptionhttptransaction.h"
+#include "upnpcphttprequestorimpl.h"
+#include "upnpcpstackrequestorimpl.h"
+#include "upnpfilesender.h"
+
+#define KLogFile _L("UPnPControlPoint.txt")
+#include <upnpcustomlog.h>
+
+using namespace UpnpHTTP;
+
+static const TInt KMessageTimeout( 10000000 );
+static const TInt KActionTimeout( 35000000 );
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::CUpnpCurrentHttpClient
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbCurrentHttpClient::CUpnpCpbCurrentHttpClient( CUpnpControlPoint& aControlPoint,
+        MUpnpCpHttpRequestor* aHttpRequestor, MUpnpCpStackRequestor* aStackRequestor )
+    : iControlPoint( aControlPoint ),
+    iHttpRequestor( aHttpRequestor ), iStackRequestor( aStackRequestor )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::~CUpnpCpbCurrentHttpClient
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbCurrentHttpClient::~CUpnpCpbCurrentHttpClient()
+    {
+    if ( iStackRequestor )
+        {
+        iStackRequestor->RemoveCustomer( *this );
+        }
+    iPendingHttpMessages.ResetAndDestroy();
+    iPendingTransactions.ResetAndDestroy();
+    delete iUserAgent;
+    delete iHttpRequestorDefaultImpl;
+    delete iStackRequestorDefaultImpl;
+    delete iFileSender;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::NewL
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbCurrentHttpClient* CUpnpCpbCurrentHttpClient::NewL(
+    CUpnpControlPoint& aControlPoint,
+    MUpnpCpHttpRequestor* aHttpRequestor, MUpnpCpStackRequestor* aStackRequestor)
+    {
+    LOG_FUNC_NAME;
+    CUpnpCpbCurrentHttpClient* self =
+        new (ELeave) CUpnpCpbCurrentHttpClient( aControlPoint, aHttpRequestor, aStackRequestor );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::ConstructL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::ConstructL()
+    {
+    iFileSender = CUpnpFileSender::NewL( iControlPoint );
+    
+    if ( !iHttpRequestor )
+        {
+        iHttpRequestorDefaultImpl = CUpnpCpHttpRequestorImpl::NewL();
+        iHttpRequestor = iHttpRequestorDefaultImpl;
+        }
+    iHttpRequestor->InitialiseL( *this, CUpnpSettings::GetIapL() );
+
+    if ( !iStackRequestor )
+        {
+        iStackRequestorDefaultImpl = CUpnpCpStackRequestorImpl::NewL( iControlPoint );
+        iStackRequestor = iStackRequestorDefaultImpl;
+        }
+    iStackRequestor->AddCustomerL( *this );
+    ASSERT( iHttpRequestor && iStackRequestor ); //ensure correct initialisation
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::SendActionL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::SendActionL( CUpnpAction* aAction )
+    {
+    if( !aAction )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    CUpnpHttpMessage* msg = RUpnpSoapMessageFactory::SoapRequestL( aAction );
+    CleanupStack::PushL( msg );
+
+    // 7.2.32.1 UPnP action requests (sent by a control point) must include a
+    // DLNA-CP-version in a USER-AGENT HTTP header value.
+    if ( !iUserAgent )
+        {
+        HBufC8* userAgent = CUpnpSettings::GetUserAgentL();
+        CleanupStack::PushL( userAgent );
+
+        iUserAgent = HBufC8::NewL( userAgent->Length() );
+        iUserAgent->Des().Append( *userAgent );
+
+        CleanupStack::PopAndDestroy( userAgent );
+        }
+
+    msg->AddPairL( UpnpHTTP::KHdrUserAgent, *iUserAgent );
+
+    msg->SetTcpTimeout( KActionTimeout );
+    
+    CleanupStack::Pop( msg );//ownership passed to Transaction and is safe
+    CUpnpHttpTransaction* soapTransaction = 
+         CUpnpSoapActionHttpTransaction::NewLC( msg, aAction->SessionId(), iControlPoint );
+                    
+    iPendingTransactions.AppendL( soapTransaction );
+    CleanupStack::Pop( soapTransaction );
+    iHttpRequestor->SendL( *soapTransaction );
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::SendSubscribeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::SendSubscribeL( CUpnpServiceInfo* aServiceInfo )
+    {
+    const TDesC8& path = Path();
+
+    TInetAddr addr = iStackRequestor->HttpServerAddress();
+    HBufC8* longPath = aServiceInfo->ConstructSubscribtionPathLC( path , addr ); 
+    CUpnpGenaMessage* gena = aServiceInfo->CreateSubscriptionMessageL(
+                                   *longPath,
+                                   ESubscription );
+    
+    gena->SetTcpTimeout( KMessageTimeout );
+    CUpnpServiceSubscriptionHttpTransaction* transaction =
+        CUpnpServiceSubscriptionHttpTransaction::NewLC( gena, iControlPoint );
+    iPendingTransactions.AppendL( transaction );
+    CleanupStack::Pop( transaction );
+    iHttpRequestor->SendL( *transaction );
+    CleanupStack::PopAndDestroy( longPath );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::SendUnsubscribeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::SendUnsubscribeL( CUpnpServiceInfo* aServiceInfo )
+    {
+    if ( aServiceInfo->Sid() != KNullDesC8 ) 
+        {
+        CUpnpGenaMessage* gena = aServiceInfo->CreateSubscriptionMessageL( EUnSubscription );
+        gena->SetTcpTimeout( KMessageTimeout );
+        CUpnpServiceUnsubscriptionHttpTransaction* transaction = 
+            CUpnpServiceUnsubscriptionHttpTransaction::NewLC( gena, iControlPoint) ;
+        iPendingTransactions.AppendL( transaction );
+        CleanupStack::Pop( transaction );
+        iHttpRequestor->SendL( *transaction );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::SendResubscribeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::SendResubscribeL( CUpnpServiceInfo* aServiceInfo )
+    {
+    CUpnpGenaMessage* gena = aServiceInfo->CreateSubscriptionMessageL( EResubscription );
+    gena->SetTcpTimeout( KMessageTimeout );
+    CUpnpServiceSubscriptionHttpTransaction* transaction =
+         CUpnpServiceSubscriptionHttpTransaction::NewLC( gena, iControlPoint );
+    iPendingTransactions.AppendL( transaction );
+    CleanupStack::Pop( transaction );
+    iHttpRequestor->SendL( *transaction );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::GetServiceDescriptionL
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbCurrentHttpClient::GetServiceDescriptionL( CUpnpDevice* aDevice,
+    const TDesC8& aUrl )
+    {
+    CUpnpHttpMessage* result( NULL );
+    TPtrC8 urlBase( aDevice->UrlBase() );
+
+    if ( aUrl.Find( KHttp ) == 0 )
+        {
+        result = RUpnpHttpMessageFactory::HttpGetL( aUrl );
+        }
+    else
+        {
+        TInetAddr addr = aDevice->Address();
+        if ( urlBase.Length() > 0 )
+            {
+            HBufC8* url = aDevice->ConcatWithUrlBaseL( aUrl );
+            CleanupStack::PushL( url );
+
+            if ( url->Find( KHttp ) )
+                {
+                result = RUpnpHttpMessageFactory::HttpGetL( addr, *url,
+                    KNullDesC8 );
+                }
+            else
+                {
+                result = RUpnpHttpMessageFactory::HttpGetL( *url );
+                }
+
+            CleanupStack::PopAndDestroy( url );
+            }
+        else
+            {
+            result = RUpnpHttpMessageFactory::HttpGetL( addr,
+                aDevice->DescriptionUrlPath(), aUrl );
+            }
+        }
+    result->SetTcpTimeout( KMessageTimeout );
+
+    CUpnpServiceDescriptionHttpTransaction* transaction =
+        CUpnpServiceDescriptionHttpTransaction::NewLC( result, iControlPoint );
+
+    iPendingTransactions.AppendL( transaction );
+    CleanupStack::Pop( transaction );
+    iHttpRequestor->SendL( *transaction );
+    return result->SessionId();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::GetDeviceDescriptionL
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbCurrentHttpClient::GetDeviceDescriptionL( CUpnpDevice* aDevice )
+    {
+    TInetAddr addr = aDevice->DescriptionUrlAddressL();
+    addr.SetPort( aDevice->DescriptionUrlPort() );
+
+    CUpnpHttpMessage* message = RUpnpHttpMessageFactory::HttpGetL( addr,
+        aDevice->DescriptionUrlPath() );
+    message->SetTcpTimeout( KMessageTimeout );
+
+    CUpnpDeviceDescriptionHttpTransaction* transaction =
+        CUpnpDeviceDescriptionHttpTransaction::NewLC( message, iControlPoint );
+
+    iPendingTransactions.AppendL( transaction );
+    CleanupStack::Pop( transaction );
+    iHttpRequestor->SendL( *transaction );
+
+    return message->SessionId();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::MessageReceivedLD
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::MessageReceivedLD( CUpnpHttpMessage* aHttpMessage )
+    {
+    if ( !aHttpMessage )
+        {
+        User::Leave( KErrArgument );
+        }
+    // match arrived response to pending request
+
+    TIdentityRelation<CUpnpHttpMessage> matcher( CUpnpHttpMessage::SessionIdMatch );
+    TInt idx = iPendingHttpMessages.Find ( aHttpMessage, matcher );
+
+    CleanupStack::PushL( aHttpMessage );
+
+    if ( aHttpMessage->IsGena() )
+        {
+        CleanupStack::Pop( aHttpMessage );
+        iControlPoint.NotifyReceivedL( *aHttpMessage );
+        }
+    else
+        {
+        iControlPoint.MessageReceived( aHttpMessage );
+        iPendingHttpMessages.Compress();
+        CleanupStack::PopAndDestroy( aHttpMessage );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::Path
+//
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CUpnpCpbCurrentHttpClient::Path()
+    {
+    return KPath();
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::StopIgnoringL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::StopIgnoringL( CUpnpDevice* aDevice )
+    {
+    iStackRequestor->StopIgnoringL( aDevice->Uuid() );
+    StopIgnoringEmbeddedL( aDevice );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::StopIgnoringEmbeddedL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::StopIgnoringEmbeddedL( CUpnpDevice* aRoot )
+    {
+    RPointerArray<CUpnpDevice> devicesAll;
+    aRoot->GetAllDevices( devicesAll );
+    CleanupClosePushL( devicesAll );
+    for ( TInt k = 0; k < devicesAll.Count(); k++ )
+        {
+        iStackRequestor->StopIgnoringL( devicesAll[k]->Uuid() );
+        }
+    CleanupStack::PopAndDestroy( &devicesAll );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::StopIgnoringUuidL
+// Send stop ignoring message to MH
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::StopIgnoringUuidL( const TDesC8& aUuids )
+    {
+    iStackRequestor->StopIgnoringL( aUuids );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::StartIPFilteringL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::StartIPFilteringL()
+    {
+    iStackRequestor->StartIPFilteringL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::StopIPFiltering
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::StopIPFiltering()
+    {
+    iStackRequestor->StopIPFiltering();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::SendL
+// Send response HTTP message
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::SendL( CUpnpHttpMessage* aHttpMessage )
+    {
+    const TInt KUnused(0);
+    iStackRequestor->SendMessageL( aHttpMessage, *this, KUnused );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::SendFileByPostL
+// Send HTTP message
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::SendFileByPostL( CUpnpHttpMessage* aHttpMessage )
+    {
+    if ( !aHttpMessage )
+        {
+        User::Leave( KErrArgument );
+        }
+    iFileSender->SendL( *aHttpMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::SearchL
+// Sends a SSDP Search with 8-bit search string.
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::SearchL( const TDesC8& aSearchString )
+    {
+    iStackRequestor->SearchL( aSearchString );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::ClientResponseRecivedLD
+// Callback indicating that response was received within transaction.
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::ClientResponseRecivedLD(
+    CUpnpHttpTransaction& aCompletedTrasaction )
+    {
+    TInt idx( iPendingTransactions.Find( &aCompletedTrasaction ) );
+    //it should never happen that we received transaction that wasn't sent by us
+    ASSERT( idx >= 0 );
+    aCompletedTrasaction.ProcessResponseL();
+    iPendingTransactions.Remove( idx );
+    delete ( &aCompletedTrasaction );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::WlanLostOccurs
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::WlanLostOccurs()
+    {
+    iStackRequestor->StopHttpServer();
+    TRAP_IGNORE( SetNullRequestorsL() );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::AddressChanged
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::AddressChangedL()
+    {
+    iStackRequestor->StopHttpServer();
+    iStackRequestor->StartHttpServerL();
+    }    
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbCurrentHttpClient::SetNullRequestorsL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbCurrentHttpClient::SetNullRequestorsL()
+    {
+    CUpnpCpHttpRequestorImplBase* httpReq = new ( ELeave ) CUpnpCpHttpRequestorImplBase();
+    delete iHttpRequestorDefaultImpl;
+    iHttpRequestorDefaultImpl = NULL;
+    iHttpRequestorDefaultImpl = httpReq;
+    iHttpRequestor = iHttpRequestorDefaultImpl;
+
+    CUpnpCpStackRequestorImplBase* stackReq = new ( ELeave ) CUpnpCpStackRequestorImplBase();
+    delete iStackRequestorDefaultImpl;
+    iStackRequestorDefaultImpl = NULL;
+    iStackRequestorDefaultImpl = stackReq;
+    iStackRequestor = iStackRequestorDefaultImpl;
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbdescriptionagent.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,631 @@
+/** @file
+* Copyright (c) 2007-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:  Declares ControlPoint Discovery class.
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32base.h>
+
+#include <upnpdevice.h>
+#include <upnpdevicedescription.h>
+
+#include <upnphttpmessagefactory.h>
+
+#include "upnpcontrolpoint.h"
+#include "upnpcpbdescriptionagent.h"
+#include "upnpcpbdevicerepository.h"
+#include "upnpcpbsimpledevicedescription.h"
+#include "upnpcpbembeddeddevicedescription.h"
+#include "upnpcpbhttpmessagecontroller.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcpstackrequestor.h"
+
+#define KLogFile _L("UPnPControlPoint.txt")
+#include <upnpcustomlog.h>
+
+// Time window reserved for single device discovery
+static const TInt KDeviceDiscoveryTimeout = 30000000;
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDescriptionAgent* CUpnpCpbDescriptionAgent::NewL(
+        CUpnpControlPoint& aBaseCP,
+        MUpnpCpbHttpMessageController& aMessanger,
+        CUpnpCpbDeviceRepository& aRepository)
+    {
+    LOG_FUNC_NAME;
+    CUpnpCpbDescriptionAgent* self =
+        new (ELeave) CUpnpCpbDescriptionAgent(
+            aBaseCP, aMessanger, aRepository );
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::~CUpnpCpbDescriptionAgent
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDescriptionAgent::~CUpnpCpbDescriptionAgent()
+    {
+    LOG_FUNC_NAME;
+
+    iIncomingDevices.ResetAndDestroy();
+    iIncomingDevices.Close();
+
+    if (iTimer)
+        {
+        iTimer->Cancel();
+        }
+    delete iTimer;
+
+    iUuid.Close();
+    delete iSaxController;
+    delete iSimpleDiscoveryEngine;
+    delete iEmbeddedDiscoveryEngine;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::CUpnpCpbDescriptionAgent
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDescriptionAgent::CUpnpCpbDescriptionAgent(
+        CUpnpControlPoint& aBaseCP,
+        MUpnpCpbHttpMessageController& aMessanger,
+        CUpnpCpbDeviceRepository& aRepository )
+:    iBaseCP( aBaseCP ), iMessanger( aMessanger ), iDeviceRepository( aRepository),
+     iPendingDiscovery( EFalse ), iDescriptionSession( KErrNotFound )
+    {
+    LOG_FUNC_NAME;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::ConstructL()
+    {
+    LOG_FUNC_NAME;
+    iSimpleDiscoveryEngine =
+        CUpnpCpbSimpleDeviceDescription::NewL(iMessanger, iDeviceRepository);
+    iEmbeddedDiscoveryEngine =
+        CUpnpCpbEmbeddedDeviceDescription::NewL(iMessanger, iDeviceRepository);
+    // Sax paresr for device description
+    iSaxController = CUpnpContentHandlersController::NewL();
+
+    iTimer = CUpnpNotifyTimer::NewL(this);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::DeviceAliveNotificationL
+// New device found
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::DeviceAliveNotificationL( CUpnpDevice* aDevice )
+    {
+    LOG_FUNC_NAME;
+
+    TPtrC8 deviceType;
+    deviceType.Set( aDevice->DeviceType() );
+
+    if ( (iDeviceRepository.MatchTargetDevice(deviceType)
+            || (UpnpSSDP::KUPnPRootDevice().Find( deviceType ) != KErrNotFound))
+            && !iDeviceRepository.IsKnownDevice( aDevice->Uuid() ) )
+        {
+        CUpnpDevice* tmp = aDevice->CloneL();
+        CleanupStack::PushL( tmp );
+
+        if ( iPendingDiscovery )
+            {
+            iIncomingDevices.AppendL(tmp);
+            }
+        else
+            {
+            GetDeviceDescriptionL( tmp );
+            }
+
+        CleanupStack::Pop(tmp);
+        }
+    else
+        {
+        CUpnpDevice* device = iDeviceRepository.FindDevice( aDevice->Uuid() );
+        if ( device )
+            {
+            device->SetExpired( EFalse );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::ProcessDeviceMessageL
+// Process device message
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::ProcessDeviceMessageL(
+    CUpnpHttpMessage* aHttpMessage )
+    {
+    if( iDescriptionSession != aHttpMessage->SessionId() )
+        {
+        return;
+        }
+
+    iDescriptionSession = KErrNotFound;
+    // No response
+    if ( !aHttpMessage->Is2xx() )
+        {
+        LOGS("CUpnpCpbDescriptionAgent::ProcessDeviceMessageL - "
+             "Request timed out. Max Retries reached. Ignoring device.");
+        if( iUuid.Length() )
+            {
+            iTimer->Cancel();
+            iPendingDiscovery = EFalse;
+            StopIgnoringUuidL(iUuid);
+            }
+        DiscoverNextDeviceL();
+        }
+    // Process description
+    else
+        {
+        ConstructAndValidateDeviceTreeL( aHttpMessage->Body( ),
+            aHttpMessage->Sender( ), aHttpMessage->SenderPath( ) );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//  CUpnpCpbDescriptionAgent::ConstructAndValidateDeviceTreeL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::ConstructAndValidateDeviceTreeL(
+    const TDesC8& aDeviceDescXml, const TInetAddr& aAddr,
+    const TDesC8& aDeviceDescPath )
+    {
+    CUpnpDevice* device = NULL;
+    TInt error;
+    if(iDeviceRepository.MatchTargetDevice(_L8("*")))
+    	{
+    	CUpnpDeviceDescription* deviceDescription =new CUpnpDeviceDescription();
+		TRAP( error, iSaxController->ParseDeviceL( aDeviceDescXml,deviceDescription ) );
+		if(!error)
+		    {
+		    CleanupStack::PushL( deviceDescription );
+            RBuf8 description;
+            if(deviceDescription->UrlBase().Length()!=0)
+                {
+                description.Create(aDeviceDescPath.Length()+deviceDescription->UrlBase().Length());
+                description.Copy(deviceDescription->UrlBase());
+                TInt firstSlash(aDeviceDescPath.Locate( KSlash8()[0] ) );		
+                if(firstSlash==0)
+                    description.Append( aDeviceDescPath.Mid( firstSlash+1,aDeviceDescPath.Length()-1 ) );
+                else
+                    description.Append(aDeviceDescPath);
+                deviceDescription->SetDescriptionUrlL(description);
+                description.Close();
+                }
+            else
+                {
+                TBuf<25> ipBuf;
+                description.Create(KUrlMaxLength);
+                description.Copy(KHttp());
+                
+                aAddr.Output ( ipBuf);
+                description.Append(ipBuf);
+                description.Append(_L8(":"));
+                ipBuf.Num(aAddr.Port());
+                description.Append(ipBuf);
+                description.Append(aDeviceDescPath);
+                deviceDescription->SetDescriptionUrlL(description);
+                description.Close();
+                }
+            CleanupStack::Pop(deviceDescription);
+            device=deviceDescription;  	
+		    }
+    	}
+	else
+	    {
+	    TRAP( error, device = iSaxController->ParseDeviceL( aDeviceDescXml ) );
+	    }    	
+
+   if ( error || ( !device ) )      // Description is wrong
+        {
+        if( iUuid.Length() )
+            {
+            iTimer->Cancel();
+            iPendingDiscovery = EFalse;
+            StopIgnoringUuidL(iUuid);
+            }
+        DiscoverNextDeviceL();
+        return;
+        }
+
+    if ( aDeviceDescPath.Length() != 0 )
+        {
+        SetUrlBaseL( device, aDeviceDescPath );
+        }
+
+    // Device is invalid
+    if( !IsDeviceValid( device ) )
+        {
+        delete device;
+        if( iUuid.Length() )
+            {
+            iTimer->Cancel();
+            iPendingDiscovery = EFalse;
+            StopIgnoringUuidL(iUuid);
+            }
+        DiscoverNextDeviceL();
+        return;
+        }
+
+    // Check if device is know now
+    if( iDeviceRepository.IsKnownDevice( device->Uuid() ))
+        {
+        delete device;
+        iTimer->Cancel();
+        iPendingDiscovery = EFalse;
+        DiscoverNextDeviceL();
+        return;
+        }
+    // Is device partialy discovered
+    CUpnpDevice* oldDevice =
+        iDeviceRepository.FindIncompliteDevice( device->Uuid() );
+    if( oldDevice )
+        {
+        iDeviceRepository.RemoveDevice( oldDevice );
+        delete device;
+        device = oldDevice;
+        }
+
+    RPointerArray<CUpnpDevice> devices;
+    device->GetAllDevices( devices );
+    devices.AppendL( device );
+
+    CUpnpDevice::TUpnpDeviceNetwork network = FindNetworkForDeviceTree( devices );
+
+    for (TInt i = 0; i < devices.Count(); i++ )
+        {
+        devices[i]->SetAddress( aAddr );
+        devices[i]->SetDeviceNetwork( network );
+        }
+    devices.Reset();
+    devices.Close();
+
+    ChooseDesriptionProcesor(device);
+    HandleDiscoveryResultL(iDiscoveryEngine->DiscoverDeviceL(device));
+    }
+
+// -----------------------------------------------------------------------------
+// This function sets UrlBase value based on the relative path of the description URL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::SetUrlBaseL(
+    CUpnpDevice* aDevice, const TDesC8& aPath )
+    {
+    if ( aDevice->UrlBase().Length( ) == 0 )
+        {
+        TInt firstSlash(aPath.Locate( KSlash8()[0] ) );
+        TInt lastSlash(aPath.LocateReverse( KSlash8()[0] ) );
+        if ( firstSlash == lastSlash )
+            {
+            aDevice->SetUrlBaseL( KSlash8( ) );
+            }
+        else
+            {
+            aDevice->SetUrlBaseL( aPath.Mid( firstSlash, lastSlash ) );
+            }
+        }
+    TPtrC8 baseURL(aDevice->UrlBase( ) );
+
+    RPointerArray<CUpnpDevice> devices;
+    aDevice->GetAllDevices( devices );
+    CleanupClosePushL( devices );
+
+    for ( TInt i(0); i< devices.Count( ); i++ )
+        {
+        if ( devices[i]->UrlBase().Length( ) == 0 )
+            {
+            devices[i]->SetUrlBaseL( baseURL );
+            }
+        }
+    CleanupStack::PopAndDestroy( &devices );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::ChooseDesriptionProcesor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::ChooseDesriptionProcesor(CUpnpDevice* aDevice)
+    {
+    if( aDevice->DeviceList().Count() )
+        {
+        iDiscoveryEngine = iEmbeddedDiscoveryEngine;
+        }
+    else
+        {
+        iDiscoveryEngine = iSimpleDiscoveryEngine;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::FindNetworkForDeviceTree
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice::TUpnpDeviceNetwork CUpnpCpbDescriptionAgent::FindNetworkForDeviceTree(
+    RPointerArray<CUpnpDevice>& aDevices )
+    {
+    CUpnpDevice::TUpnpDeviceNetwork network = CUpnpDevice::EUnknown;
+    for (TInt i = 0; i < aDevices.Count(); i++ )
+        {
+        CUpnpDevice* ssdpDevice =
+            iDeviceRepository.RemoveIncomingDevice( aDevices[i]->Uuid() );
+        if ( ssdpDevice )
+            {
+            aDevices[i]->SetExpired( EFalse );
+            network = ssdpDevice->DeviceNetwork();
+            delete ssdpDevice;
+            if ( network != CUpnpDevice::EUnknown )
+                {
+                break;
+                }
+            }
+        }
+    return network;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::ProcessServiceMessageL
+//  Process service message
+// -----------------------------------------------------------------------------
+//
+ void CUpnpCpbDescriptionAgent::ProcessServiceMessageL(
+    CUpnpHttpMessage* aHttpMessage)
+    {
+    if(iDiscoveryEngine)
+        {
+        HandleDiscoveryResultL(
+            iDiscoveryEngine->ServiceDescriptionL(aHttpMessage) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::DiscoverNextDeviceL
+// Start next device discovery
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::DiscoverNextDeviceL()
+    {
+    // search for new target device
+    while( iIncomingDevices.Count() > 0 )
+        {
+        CUpnpDevice* tempDevice = iIncomingDevices[0];
+        iIncomingDevices.Remove(0);
+        CleanupStack::PushL( tempDevice );
+
+        CUpnpDevice* tempDevice2 =
+            iDeviceRepository.FindDevice( tempDevice->Uuid() );
+
+        if( !tempDevice2 )
+            {
+            GetDeviceDescriptionL( tempDevice );
+            CleanupStack::Pop( tempDevice );
+            break;
+            }
+        else
+            {
+            tempDevice2->SetExpired( EFalse );
+            CleanupStack::PopAndDestroy( tempDevice );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::GetDeviceDescriptionL
+// Send get message
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::GetDeviceDescriptionL( CUpnpDevice* aDevice )
+    {
+    iUuid.Close();
+    iUuid.CreateL( aDevice->Uuid());
+    if( iDiscoveryEngine )
+        {
+        iDiscoveryEngine->DeleteTargetDevice();
+        iDiscoveryEngine = NULL;
+        }
+
+    iDeviceRepository.AddIncomingDeviceL( aDevice );
+
+    iTimer->Start( KDeviceDiscoveryTimeout );
+    iPendingDiscovery = ETrue;
+
+    iDescriptionSession = iMessanger.GetDeviceDescriptionL( aDevice );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::HandleDiscoveryResultL
+// Function processing disscovery result
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::HandleDiscoveryResultL(TInt aResult)
+    {
+    if(aResult == KErrNotFound || aResult == KDisscoveryInProgress)
+        {
+        return;
+        }
+    iTimer->Cancel();
+    iPendingDiscovery = EFalse;
+
+    TBool result;
+    if(aResult == KDisscoveryFinished)
+        {
+        result = CopyResult();
+        if(!result)
+            {
+            StopIgnoringUuidL(iDiscoveryEngine->FailedUuidsL());
+            }
+        else
+            {
+            iDiscoveryEngine->NullTargetDevice();
+            ReportDiscoveredDevicesL();
+            }
+        DiscoverNextDeviceL();
+        }
+    else if(aResult == KDisscoveryIncorrect)
+        {
+        result = CopyResult();
+        if(!result)
+            {
+            StopIgnoringUuidL(iDiscoveryEngine->GetTargetDevice()->Uuid());
+            }
+        else
+            {
+            StopIgnoringUuidL(iDiscoveryEngine->FailedUuidsL());
+            CUpnpDevice* dev = iDiscoveryEngine->GetIncompliteRootDevice();
+            if(dev)
+                {
+                iDeviceRepository.AddIncompliteDeviceL(dev);
+                }
+            iDiscoveryEngine->NullTargetDevice();
+            ReportDiscoveredDevicesL();
+            }
+        DiscoverNextDeviceL();
+        }
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::CopyResultL
+// Copy devices to repository
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDescriptionAgent::CopyResult()
+    {
+    TRAPD(error, CopyResultL());
+    if(error)
+        {
+        RPointerArray<CUpnpDevice> devices;
+        iDiscoveryEngine->GetTargetDevice()->GetAllDevices(devices);
+        for (TInt i(0); i < devices.Count(); i++)
+            {
+            iDeviceRepository.RemoveDevice(devices[i]);
+            }
+        iDeviceRepository.RemoveDevice(iDiscoveryEngine->GetTargetDevice());
+        devices.Close();
+        return EFalse;
+        }
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::CopyResultL
+// Copy devices to repository
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::CopyResultL()
+    {
+    RPointerArray<CUpnpDevice> devices;
+    CleanupClosePushL(devices);
+    iDiscoveryEngine->GetUninterestingDeviceL(devices, ETrue);
+    iDeviceRepository.AddUninterestingDevicesL(devices);
+    devices.Reset();
+    iDiscoveryEngine->GetUnnededDeviceL(devices, ETrue);
+    iDeviceRepository.AddUnneddedDevicesL(devices);
+    devices.Reset();
+    iDiscoveryEngine->GetDiscoveredDeviceL(devices, ETrue);
+    iDeviceRepository.AddDiscoveredDevicesL(devices);
+    CleanupStack::PopAndDestroy(&devices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::ReportDiscoveredDevicesL
+// Report discovered devices to the client
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::ReportDiscoveredDevicesL()
+    {
+    RPointerArray<CUpnpDevice> devices;
+    CleanupClosePushL(devices);
+    iDiscoveryEngine->GetDiscoveredDeviceL(devices);
+    for (TInt i(0); i < devices.Count(); i++)
+        {
+        iBaseCP.DeviceDiscovered(devices[i]);
+        }
+    CleanupStack::PopAndDestroy(&devices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::StopIgnoringUidL
+// Send stop filtering message to MH
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::StopIgnoringUuidL(const TDesC8& aUuids)
+    {
+    iMessanger.StopIgnoringUuidL(aUuids);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::IsDeviceValid
+// Check if device is valid
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDescriptionAgent::IsDeviceValid( CUpnpDevice* aDevice )
+    {
+    const TDesC8& targetUuid = aDevice->Uuid();
+       return !( aDevice->DeviceType() == KNullDesC8()
+               || targetUuid == KNullDesC8() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDescriptionAgent::TimerEventL
+// Callback function
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDescriptionAgent::TimerEventL( CUpnpNotifyTimer* aTimer )
+    {
+    if( !(aTimer->iStatus == KErrNone) )
+        {
+        return;
+        }
+
+    if ( iPendingDiscovery )
+        {
+        iPendingDiscovery = FALSE;
+        if(iDiscoveryEngine)
+            {
+            StopIgnoringUuidL(iDiscoveryEngine->FailedUuidsL());
+            DiscoverNextDeviceL();
+            }
+        else
+            {
+            if( iUuid.Length() )
+                {
+                StopIgnoringUuidL(iUuid);
+                }
+            }
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbdevicedescription.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,177 @@
+/** @file
+* Copyright (c) 2007-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:  Declares simple device discovery process.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32base.h>
+
+#include <upnpdevice.h>
+#include "upnpcontenthandlerscontroller.h"
+
+#include "upnpcpbdevicedescription.h"
+#include "upnpcpbhttpmessagecontroller.h"
+
+// LOGGER SETTINGS
+#define KLogFile _L("UPnPControlPoint.txt")
+#include <upnpcustomlog.h>
+
+static const TInt KDefaultLenght = 200;
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::~CUpnpCpbDeviceDescription
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDeviceDescription::~CUpnpCpbDeviceDescription()
+    {
+    LOG_FUNC_NAME;
+    delete iSaxController;
+    delete iRootDevice;
+    iUuids.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::NullTargetDevice
+// Constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceDescription::NullTargetDevice()
+    {
+    iRootDevice = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::NullTargetDevice
+// Constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceDescription::DeleteTargetDevice()
+    {
+    delete iRootDevice;
+    iRootDevice = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::CUpnpCpbDeviceDescription
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDeviceDescription::CUpnpCpbDeviceDescription(
+    MUpnpCpbHttpMessageController& aMessanger,
+    CUpnpCpbDeviceRepository& aRepository)
+    : iMessanger(aMessanger), iRepository(aRepository)
+    {
+    LOG_FUNC_NAME;
+    iResult = KDisscoveryFinished;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::FailedUuidsL
+// Returns incorrect uuids
+// -----------------------------------------------------------------------------
+//
+const TPtrC8 CUpnpCpbDeviceDescription::FailedUuidsL()
+    {
+    if ( !iUuids.Length() )
+        {
+        RPointerArray<CUpnpDevice> devices;
+        iRootDevice->GetAllDevices(devices);
+        CleanupClosePushL(devices);
+        for (TInt i(0); i<devices.Count(); i++)
+            {
+            AddToUuidsL(devices[i]->Uuid());
+            }
+        AddToUuidsL(iRootDevice->Uuid());
+        CleanupStack::PopAndDestroy(&devices);
+        }
+    return iUuids;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceDescription::ConstructL()
+    {
+    LOG_FUNC_NAME;
+    // Sax paresr for service description
+    iSaxController = CUpnpContentHandlersController::NewL();
+    iUuids.CreateL( KDefaultLenght );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::GetTargetDevice
+// Get currently processed device.
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* CUpnpCpbDeviceDescription::GetTargetDevice()
+    {
+    LOG_FUNC_NAME;
+    return iRootDevice;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::AddToUiidsL
+//  Add next uuid to uuid list
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceDescription::AddToUuidsL(const TDesC8& aUuid)
+    {
+    if ( (iUuids.Length() + aUuid.Length()
+            + UpnpString::KSemiColon().Length()) < iUuids.MaxLength() )
+        {
+        if (iUuids.Length())
+            {
+            iUuids.Append(UpnpString::KSemiColon());
+            }
+        iUuids.Append(aUuid);
+        }
+    else
+        {
+        iUuids.ReAllocL(iUuids.MaxLength() + aUuid.Length()
+                + UpnpString::KSemiColon().Length());
+        if (iUuids.Length())
+            {
+            iUuids.Append(UpnpString::KSemiColon());
+            }
+        iUuids.Append(aUuid);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// Finds next service description url to be processed.
+// -----------------------------------------------------------------------------
+//
+const TPtrC8 CUpnpCpbDeviceDescription::GetNextServiceType(CUpnpDevice* aDevice)
+    {
+    // Because all service descriptions are not retrieved, retrieve next one.
+    TInt serviceDescriptionsReceived = aDevice->ServiceList().Count();
+    TInt j;
+    for ( j=0; j < serviceDescriptionsReceived; j++)
+        {
+        if (aDevice->ServiceList()[j]->IsAdded() == EFalse)
+            {
+            return aDevice->ServiceList()[j]->ServiceDescriptionUrl();
+            }
+        }
+    return KNullDesC8();
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbdevicelistutils.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,152 @@
+/** @file
+* Copyright (c) 2007-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:  Declares utils function for devices list class.
+*
+*/
+ 
+
+// INCLUDE FILES
+
+#include <e32base.h>
+
+#include <upnpdevice.h>
+
+#include "upnpcpbdevicelistutils.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// UPnPCpbDeviceDistUtils::GetFromList
+// Get device from list
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* UpnpCpbDeviceListUtils::GetFromList(const TDesC8& aUuid, RPointerArray<CUpnpDevice>& aList)
+    {
+    CUpnpDevice* res = NULL;
+    for ( TInt l = 0; l < aList.Count(); l++ )
+        {
+        if ( aList[l]->Uuid().Compare( aUuid )  ==  0 )
+            {
+            res = aList[l];
+            break;
+            }	
+        }
+    return res;	
+    }
+    
+// -----------------------------------------------------------------------------
+// UPnPCpbDeviceDistUtils::GetRootFromList
+// Get device from list
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* UpnpCpbDeviceListUtils::GetRootFromList( const TDesC8& aDeviceUuid, 
+                                       RPointerArray<CUpnpDevice>& aDeviceList )
+    {
+    CUpnpDevice* res = NULL;
+    for ( TInt l = 0; l < aDeviceList.Count(); l++ )
+        {
+        if ( !aDeviceList[l]->IsEmbeddDevice() )
+            {            
+            if ( aDeviceList[l]->Uuid().Compare( aDeviceUuid )  ==  0 )
+                {
+                res = aDeviceList[l];
+                break;
+                }
+                
+            RPointerArray<CUpnpDevice> devicesAll;
+            aDeviceList[l]->GetAllDevices( devicesAll );                      
+            for ( TInt k = 0; k < devicesAll.Count(); k++ )
+                {            
+                if ( aDeviceUuid.Compare( devicesAll[k]->Uuid() ) == 0 )
+                    {
+                    devicesAll.Close();         
+                    res = aDeviceList[l];
+                    break;
+                    }
+                }
+            devicesAll.Close();
+            }
+        }
+    return res;	
+    }
+ 
+// -----------------------------------------------------------------------------
+// UPnPCPBDeviceDistUtils::ExistOnList
+// Chech if device is on list
+// -----------------------------------------------------------------------------
+//    
+TBool UpnpCpbDeviceListUtils::ExistOnList(const TDesC8& aUuid, RPointerArray<CUpnpDevice>& aList)
+    {
+    TBool res(EFalse);
+    if(UpnpCpbDeviceListUtils::GetFromList(aUuid,aList))
+        {
+        res = ETrue;
+        }
+    return res;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddDeviceL
+// Add device to device list
+// -----------------------------------------------------------------------------
+// 
+TBool UpnpCpbDeviceListUtils::AddDeviceL(CUpnpDevice* aDevice, RPointerArray<CUpnpDevice>& aList)
+    {
+    TInt error(KErrNone);
+    TInt result = AddDevice(aDevice, aList, error);
+    User::LeaveIfError(error);
+    return result;
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddDevicesL
+// Add devices to device list
+// -----------------------------------------------------------------------------
+// 
+void UpnpCpbDeviceListUtils::AddDevicesL(RPointerArray<CUpnpDevice>& aSource, RPointerArray<CUpnpDevice>& aTarget)
+    {
+    TInt error(KErrNone);
+    for(TInt i(0); i<aSource.Count(); i++)
+        {
+        AddDevice(aSource[i], aTarget, error);
+        if(error < KErrNone)
+            {
+            for(; i>0; i--)
+                {
+                aTarget.Remove(aTarget.Count() - 1);
+                }
+            break;
+            }
+        }
+    
+    User::LeaveIfError(error);
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddDevice
+// Add device to device list
+// -----------------------------------------------------------------------------
+// 
+TBool UpnpCpbDeviceListUtils::AddDevice(CUpnpDevice* aDevice, RPointerArray<CUpnpDevice>& aList, TInt& aError)
+    {
+    TBool result = EFalse;
+    if(!UpnpCpbDeviceListUtils::ExistOnList(aDevice->Uuid(), aList))
+        {
+        aError = aList.Append(aDevice);
+        result = ETrue;
+        }
+    return result;
+    };
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbdevicerepository.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,455 @@
+/** @file
+* Copyright (c) 2007-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:  Declares storage for devices known by control point.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32base.h>
+
+#include <upnpdevice.h>
+
+#include "upnpcpbdevicerepository.h"
+#include "upnpcpbdevicelistutils.h"
+
+#define KLogFile _L("UPnPControlPoint.txt")
+#include <upnpcustomlog.h>
+
+static const TInt KDTargetDeviceTypesGranularity = 1;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDeviceRepository* CUpnpCpbDeviceRepository::NewL(const CDesC8Array& aTargetDeviceTypes)
+    {
+    LOG_FUNC_NAME;
+    CUpnpCpbDeviceRepository* self = new (ELeave) CUpnpCpbDeviceRepository();
+
+    CleanupStack::PushL(self);
+    self->ConstructL(aTargetDeviceTypes);
+    CleanupStack::Pop(self);
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::~CUpnpCpbDeviceRepository
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDeviceRepository::~CUpnpCpbDeviceRepository()
+    {
+    LOG_FUNC_NAME;
+
+    TInt i;
+    // only root devices should be deleted
+    // subdevices are removed from all lists
+    for(i=(iDiscoveredDevices.Count());i;i--)
+        {
+        if ( iDiscoveredDevices[i-1]->IsEmbeddDevice() )
+            {
+            iDiscoveredDevices.Remove(i-1);
+            }
+        }
+
+    for(i=(iUninterestingDevices.Count());i;i--)
+        {
+        if (iUninterestingDevices[i-1]->IsEmbeddDevice())
+            {
+            iUninterestingDevices.Remove(i-1);
+            }
+        }
+
+    for(i=(iUnneededDevices.Count());i;i--)
+        {
+        if (iUnneededDevices[i-1]->IsEmbeddDevice())
+            {
+            iUnneededDevices.Remove(i-1);
+           }
+        }
+
+    iDiscoveredDevices.ResetAndDestroy();
+    iDiscoveredDevices.Close();
+
+    iUninterestingDevices.ResetAndDestroy();
+    iUninterestingDevices.Close();
+
+    iUnneededDevices.ResetAndDestroy();
+    iUnneededDevices.Close();
+
+    iIncomliteRootDevices.ResetAndDestroy();
+    iIncomliteRootDevices.Close();
+
+    iIncomingDevices.ResetAndDestroy();
+    iIncomingDevices.Close();
+
+    // Delete target devices list
+    if ( iTargetDeviceTypes )
+        {
+        iTargetDeviceTypes->Reset();
+        delete iTargetDeviceTypes;
+        }
+
+    LOGS("CUpnpCpbDeviceRepository::CUpnpCpbDeviceRepository - END");
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::MatchTargetDevice
+// Check if device match target types
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::MatchTargetDevice(const TDesC8& aDeviceType )
+    {
+    TBool result = FALSE;
+    if(iTargetDeviceTypes)
+        {
+        if((*iTargetDeviceTypes)[0].Find(_L8("*")) != KErrNotFound) 
+            {
+            result = TRUE;
+            return result;
+            }
+        for(TInt i(0); i < iTargetDeviceTypes->Count(); i++)
+            {
+            if(aDeviceType.Find((*iTargetDeviceTypes)[i]) != KErrNotFound)
+                {
+                result = TRUE;
+                break;
+                }
+            }
+        }
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::IsKnownDevice
+// Check if device is in repository
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::IsKnownDevice(const TDesC8& aDeviceUuid)
+    {
+    return (IsDiscoveredDevice(aDeviceUuid) || IsUninterestingDevice(aDeviceUuid)
+                    || IsUnneededDevice(aDeviceUuid));
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::IsDiscoveredDevice
+// Check if device is discovered already
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::IsDiscoveredDevice(const TDesC8& aDeviceUuid)
+    {
+    return UpnpCpbDeviceListUtils::ExistOnList(aDeviceUuid, iDiscoveredDevices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::IsUninterestingDevice
+// Check if device is discovered but type is not matching
+// needed devices types
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::IsUninterestingDevice(const TDesC8& aDeviceUuid)
+    {
+    return UpnpCpbDeviceListUtils::ExistOnList(aDeviceUuid, iUninterestingDevices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::IsUnneededDevice
+// Check if device is unneded (type is different then needed).
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::IsUnneededDevice(const TDesC8& aDeviceUuid)
+    {
+    return UpnpCpbDeviceListUtils::ExistOnList(aDeviceUuid, iUnneededDevices);
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddDiscoveredDeviceL
+// Add device to discovered device list
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::AddDiscoveredDeviceL(CUpnpDevice* aDevice)
+    {
+    return UpnpCpbDeviceListUtils::AddDeviceL(aDevice, iDiscoveredDevices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddUnnededDeviceL
+// Add device to discovered device list
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::AddUnneddedDeviceL(CUpnpDevice* aDevice)
+    {
+    return UpnpCpbDeviceListUtils::AddDeviceL(aDevice, iUnneededDevices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddIncompliteDeviceL
+// Add device to discovered device list
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::AddIncompliteDeviceL(CUpnpDevice* aDevice)
+    {
+    return UpnpCpbDeviceListUtils::AddDeviceL(aDevice, iIncomliteRootDevices);
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddIncomingDeviceL
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbDeviceRepository::AddIncomingDeviceL( CUpnpDevice* aDevice )
+    {
+    CUpnpDevice* device = RemoveIncomingDevice( aDevice->Uuid() );
+    if ( device )
+        {
+        delete device;
+        }
+    return UpnpCpbDeviceListUtils::AddDeviceL( aDevice, iIncomingDevices );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::RemoveIncomingDeviceL
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* CUpnpCpbDeviceRepository::RemoveIncomingDevice( const TDesC8& aUuid )
+    {
+    CUpnpDevice* res = NULL;
+    for ( TInt i = 0; i < iIncomingDevices.Count(); i++ )
+        {
+        if ( iIncomingDevices[i]->Uuid().Compare( aUuid )  ==  0 )
+            {
+            res = iIncomingDevices[i];
+            iIncomingDevices.Remove(i);
+            break;
+            }
+        }
+    return res;
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddUnnededDeviceL
+// Add device to discovered device list
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceRepository::AddDiscoveredDevicesL(RPointerArray<CUpnpDevice>& aDevices)
+    {
+    UpnpCpbDeviceListUtils::AddDevicesL(aDevices, iDiscoveredDevices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddUnnededDeviceL
+// Add device to uninteresting device list
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceRepository::AddUninterestingDevicesL(RPointerArray<CUpnpDevice>& aDevices)
+    {
+    UpnpCpbDeviceListUtils::AddDevicesL(aDevices, iUninterestingDevices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::AddUnnededDeviceL
+// Add device to unneded device list
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceRepository::AddUnneddedDevicesL(RPointerArray<CUpnpDevice>& aDevices)
+    {
+    UpnpCpbDeviceListUtils::AddDevicesL(aDevices, iUnneededDevices);
+    }
+
+// -----------------------------------------------------------------------------
+// Return discovered device list
+// -----------------------------------------------------------------------------
+//
+const RPointerArray<CUpnpDevice>& CUpnpCpbDeviceRepository::DiscoveredDeviceList() const
+    {
+    return iDiscoveredDevices;
+    }
+
+// -----------------------------------------------------------------------------
+// Return discovered device list
+// -----------------------------------------------------------------------------
+//
+const RPointerArray<CUpnpDevice>& CUpnpCpbDeviceRepository::UnneddedDeviceList() const
+    {
+    return iUnneededDevices;
+    }
+
+// -----------------------------------------------------------------------------
+// Return discovered device list
+// -----------------------------------------------------------------------------
+//
+const RPointerArray<CUpnpDevice>& CUpnpCpbDeviceRepository::UninterestingDeviceList() const
+    {
+    return iUninterestingDevices;
+    }
+
+// -----------------------------------------------------------------------------
+// Return discovered device list
+// -----------------------------------------------------------------------------
+//
+const RPointerArray<CUpnpDevice>& CUpnpCpbDeviceRepository::IncompliteDeviceList() const
+    {
+    return iIncomliteRootDevices;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::FindIncompliteDevice
+// Find incomplite device in repository
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* CUpnpCpbDeviceRepository::FindIncompliteDevice(const TDesC8& aDeviceUuid)
+    {
+    CUpnpDevice* res = NULL;
+    res = UpnpCpbDeviceListUtils::GetFromList(aDeviceUuid, iIncomliteRootDevices);
+    return res;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::FindDevice
+// Find device in repository
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* CUpnpCpbDeviceRepository::FindDevice(const TDesC8& aDeviceUuid)
+    {
+    CUpnpDevice* res = NULL;
+    res = UpnpCpbDeviceListUtils::GetFromList(aDeviceUuid, iDiscoveredDevices);
+    if(res)
+        {
+        return res;
+        }
+    res = UpnpCpbDeviceListUtils::GetFromList(aDeviceUuid, iUnneededDevices);
+    if(res)
+        {
+        return res;
+        }
+    res = UpnpCpbDeviceListUtils::GetFromList(aDeviceUuid, iUninterestingDevices);
+    if(res)
+        {
+        return res;
+        }
+    res = UpnpCpbDeviceListUtils::GetFromList(aDeviceUuid, iIncomliteRootDevices);
+    if(res)
+        {
+        return res;
+        }
+    return res;
+    }
+
+// -----------------------------------------------------------------------------
+// Finds root of given device among dicovered and being discovered devices
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* CUpnpCpbDeviceRepository::FindRoot( const TDesC8& aDeviceUuid )
+    {
+    CUpnpDevice* res = NULL;
+    res = UpnpCpbDeviceListUtils::GetRootFromList( aDeviceUuid, iDiscoveredDevices );
+    if ( res )
+        {
+        return res;
+        }
+    res = UpnpCpbDeviceListUtils::GetRootFromList( aDeviceUuid, iUnneededDevices );
+    if ( res )
+        {
+        return res;
+        }
+    res = UpnpCpbDeviceListUtils::GetRootFromList( aDeviceUuid, iUninterestingDevices );
+    if ( res )
+        {
+        return res;
+        }
+    res = UpnpCpbDeviceListUtils::GetRootFromList( aDeviceUuid, iIncomliteRootDevices );
+    if ( res )
+        {
+        return res;
+        }
+    return res;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::RemoveDevice
+// Remove device from all list
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceRepository::RemoveDevice(CUpnpDevice* aDevice)
+    {
+    TInt i = iDiscoveredDevices.Find(aDevice);
+    if (i !=KErrNotFound)
+        {
+        iDiscoveredDevices.Remove( i );
+        }
+    else
+        {
+        // check unneded device list
+        i = iUnneededDevices.Find(aDevice);
+        if ( i != KErrNotFound)
+            {
+            iUnneededDevices.Remove( i );
+            }
+        else
+            {
+            // check unninteresting device list
+            i = iUninterestingDevices.Find(aDevice);
+            if ( i != KErrNotFound)
+                {
+                iUninterestingDevices.Remove( i );
+                }
+            else
+                {
+                // check root devices with errors
+                i = iIncomliteRootDevices.Find(aDevice);
+                if ( i != KErrNotFound)
+                    {
+                    iIncomliteRootDevices.Remove( i );
+                    }
+                }
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::CUpnpCpbDeviceRepository
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDeviceRepository::CUpnpCpbDeviceRepository()
+    {
+    LOG_FUNC_NAME;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceRepository::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDeviceRepository::ConstructL(const CDesC8Array& aTargetDeviceTypes)
+    {
+    LOG_FUNC_NAME;
+    // coping target device
+    iTargetDeviceTypes = new( ELeave ) CDesC8ArrayFlat( KDTargetDeviceTypesGranularity );
+    for ( TInt i( 0 ); i < aTargetDeviceTypes.Count(); i++ )
+        {
+        iTargetDeviceTypes->AppendL( aTargetDeviceTypes[i]);
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbdiscoveryagent.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,141 @@
+/** @file
+* Copyright (c) 2007-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:  Declares ControlPoint Discovery class.
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32base.h>
+#include "upnpcompvariant.hrh"
+
+#include <upnpdevice.h>
+#ifdef RD_UPNP_REMOTE_ACCESS
+#include "upnpradasync.h"
+#endif
+#include "upnpcpbdiscoveryagent.h"
+#include "upnpcpbhttpmessagecontroller.h"
+
+#define KLogFile _L("UPnPControlPoint.txt")
+#include <upnpcustomlog.h>
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDiscoveryAgent::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDiscoveryAgent* CUpnpCpbDiscoveryAgent::NewL(
+    MUpnpCpbHttpMessageController& aMessanger )
+    {
+    LOG_FUNC_NAME;
+    CUpnpCpbDiscoveryAgent* self = new (ELeave) CUpnpCpbDiscoveryAgent(aMessanger);
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDiscoveryAgent::~CUpnpCpbDiscoveryAgent
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDiscoveryAgent::~CUpnpCpbDiscoveryAgent()
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    delete iRadaClient;
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDiscoveryAgent::SearchL
+// Search intresting Device Types from network
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDiscoveryAgent::SearchL( const TDesC8& aSearchString )
+    {
+    iMessanger.SearchL( aSearchString );
+
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    if(iRadaClient)
+        {
+        iRadaClient->GetDevicesL();
+        }
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDiscoveryAgent::CUpnpCpbDiscoveryAgent
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbDiscoveryAgent::CUpnpCpbDiscoveryAgent( MUpnpCpbHttpMessageController& aMessanger)
+    : iMessanger( aMessanger )
+    {
+    LOG_FUNC_NAME;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDiscoveryAgent::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDiscoveryAgent::ConstructL()
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    iRadaClient = CUpnpRadaSync::NewL(this);
+    #endif
+    }
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+// -----------------------------------------------------------------------------
+// CUpnpCpbDiscoveryAgent::EnableRadaDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDiscoveryAgent::EnableRadaDeviceL( TRequestStatus& aStatus )
+{
+   iRadaClient->EnableRadaL( aStatus );
+}
+// -----------------------------------------------------------------------------
+// CUpnpCpbDiscoveryAgent::EnableRadaDeviceL
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbDiscoveryAgent::EnableRadaDeviceL(  )
+{
+    return iRadaClient->EnableRadaL();
+}
+// -----------------------------------------------------------------------------
+// CUpnpCpbDiscoveryAgent::DisableRadaDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbDiscoveryAgent::DisableRadaDeviceL(  )
+{
+    iRadaClient->DisableRadaL();
+}
+
+void CUpnpCpbDiscoveryAgent::StartIPFilteringL( )
+{
+    iRadaClient->StartIPFilteringL( );
+}
+
+void CUpnpCpbDiscoveryAgent::StopIPFiltering( )
+{
+    iRadaClient->StopIPFiltering( );
+}
+#endif
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbembeddeddevicedescription.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,561 @@
+/** @file
+* Copyright (c) 2007-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:  Declares simple device discovery process.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32base.h>
+
+#include <upnpdevice.h>
+#include "upnpcontenthandlerscontroller.h"
+
+#include "upnpcpbembeddeddevicedescription.h"
+#include "upnpcpbdevicerepository.h"
+#include "upnpcpbdevicelistutils.h"
+#include "upnpcpbhttpmessagecontroller.h"
+
+// LOGGER SETTINGS
+#define KLogFile _L("UPnPControlPoint.txt")
+#include <upnpcustomlog.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbEmbeddedDeviceDescription* CUpnpCpbEmbeddedDeviceDescription::NewL(
+            MUpnpCpbHttpMessageController& aMessanger,
+            CUpnpCpbDeviceRepository& aRepository )
+    {
+    LOG_FUNC_NAME;
+    CUpnpCpbEmbeddedDeviceDescription* self =
+        new (ELeave) CUpnpCpbEmbeddedDeviceDescription(aMessanger, aRepository);
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbDeviceDescription::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbEmbeddedDeviceDescription::ConstructL()
+    {
+    LOG_FUNC_NAME;
+    CUpnpCpbDeviceDescription::ConstructL();
+
+    iDiscoveredDevices.Reset();
+    iDiscoveredDevices.Close();
+
+    iAllDevicesInRoot.Reset();
+    iAllDevicesInRoot.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::~CUpnpCpbEmbeddedDeviceDescription
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbEmbeddedDeviceDescription::~CUpnpCpbEmbeddedDeviceDescription()
+    {
+    LOG_FUNC_NAME;
+    iNotNeededDevices.Reset();
+    iNotNeededDevices.Close();
+    iAllDevicesInRoot.Reset();
+    iAllDevicesInRoot.Close();
+    iDiscoveredDevices.Reset();
+    iDiscoveredDevices.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::CUpnpCpbEmbeddedDeviceDescription
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbEmbeddedDeviceDescription::CUpnpCpbEmbeddedDeviceDescription(
+    MUpnpCpbHttpMessageController& aMessanger,
+    CUpnpCpbDeviceRepository& aRepository)
+    : CUpnpCpbDeviceDescription(aMessanger, aRepository)
+    {
+    LOG_FUNC_NAME;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::DiscoverDeviceL
+// Start processing device.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbEmbeddedDeviceDescription::DiscoverDeviceL(CUpnpDevice* aDevice)
+    {
+    LOG_FUNC_NAME;
+    if(!aDevice)
+        {
+        return KErrNotFound;
+        }
+
+    iAllDevicesInRoot.Reset();
+    iDiscoveredDevices.Reset();
+    iNotNeededDevices.Reset();
+
+    iRootDevice = aDevice;
+    iResult = KDisscoveryFinished;
+    iUuids.Zero();
+    BuildDevicesListL(iRootDevice);
+
+    // Start discovery if some device has services start to download it
+    // And change state to inprogress
+    for(TInt i = iAllDevicesInRoot.Count() - 1;  i > -1; i--)
+        {
+        if(iAllDevicesInRoot.Find(iAllDevicesInRoot[i]) != KErrNotFound)
+            {
+            GetServiceDescriptionL(iAllDevicesInRoot[i]);
+            }
+        }
+
+    return iResult;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::GetIncompliteRootDevice
+//  Append discovered devices to array
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* CUpnpCpbEmbeddedDeviceDescription::GetIncompliteRootDevice()
+    {
+    return iRootDevice;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::BuildDevicesListL
+// Build list with devices that should be processed
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbEmbeddedDeviceDescription::BuildDevicesListL(CUpnpDevice* aDevice)
+    {
+    if (iRepository.MatchTargetDevice(aDevice->DeviceType()))
+        {
+        // If device is already known (partial discovery of embedded)
+        // add it to temporary discovered list
+        if (iRepository.IsDiscoveredDevice(aDevice->Uuid()))
+            {
+            iDiscoveredDevices.AppendL(aDevice);
+            }
+        else
+            {
+            iAllDevicesInRoot.AppendL( aDevice );
+            }
+
+        // processing embedded devices
+        // GetAllDevices method returns list of all devices of embedded devices tree
+        RPointerArray<CUpnpDevice> devices;
+        aDevice->GetAllDevices(devices);
+        CleanupClosePushL(devices);
+        for (TInt i(0); i < devices.Count(); i++)
+            {
+            if (!iRepository.FindDevice(devices[i]->Uuid()))
+                {
+                iAllDevicesInRoot.AppendL( devices[i] );
+                }
+            else
+                {
+                // device is known
+                iDiscoveredDevices.AppendL(devices[i]);
+                // if was not reported as discovered
+                if (iRepository.IsUninterestingDevice(devices[i]->Uuid())
+                        && iRepository.MatchTargetDevice(devices[i]->DeviceType()))
+                    {
+                    iRepository.RemoveDevice(devices[i]);
+                    }
+                }
+            }
+        CleanupStack::PopAndDestroy(&devices);
+        }
+    else
+        {
+        iNotNeededDevices.AppendL(aDevice);
+        // Device is not interesting, process subdevices
+        RPointerArray<CUpnpDevice> deviceList  = aDevice->DeviceList();
+        for (TInt i(0); i < deviceList.Count(); i++)
+            {
+            BuildDevicesListL( deviceList[i] );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::GetServiceDescriptionL
+// Start getting services desriptions
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbEmbeddedDeviceDescription::GetServiceDescriptionL(
+    CUpnpDevice* aDevice )
+    {
+
+    // Because all service descriptions are not retrieved, retrieve next one.
+    TPtrC8 buffer(GetNextServiceType(aDevice));
+
+    if (buffer.Length())
+        {
+        //ask for 1st service description
+        iResult = KDisscoveryInProgress;
+        TInt sessionId = iMessanger.GetServiceDescriptionL(aDevice, buffer);
+        // put SessionID to memory per pending Service Description request
+        aDevice->WaitServiceDescriptionL( sessionId );
+        }
+        //no service, device is discovered
+    else
+        {
+        iDiscoveredDevices.AppendL( aDevice );
+        iAllDevicesInRoot.Remove(iAllDevicesInRoot.Find(aDevice));
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::ServiceDescription
+// Function processing service description
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbEmbeddedDeviceDescription::ServiceDescriptionL(
+    CUpnpHttpMessage* aMsg )
+    {
+    LOG_FUNC_NAME;
+
+    // Check if device is waiting for this service
+    TBool waiting(EFalse);
+    if(!iRootDevice)
+        {
+        iResult = KErrNotFound;
+        }
+    else
+        {
+        TInt servCount(0);
+        CUpnpDevice* device = NULL;
+        for (TInt i(0); i<iAllDevicesInRoot.Count(); i++)
+            {
+            for (servCount = 0;
+                 servCount < iAllDevicesInRoot[i]->WaitServiceDescriptionCount();
+                 servCount++ )
+                {
+                if ( iAllDevicesInRoot[i]->WaitServiceDescriptionSessionId( servCount )
+                         == aMsg->SessionId() )
+                    {
+                    device = iAllDevicesInRoot[i];
+                    waiting = ETrue;
+                    break;
+                    }
+                }
+                if (device)
+                    {
+                    break;
+                    }
+            }
+        // Waiting for service description
+        if (waiting)
+            {
+            // Processing message
+            if ( !aMsg->Is2xx())
+                {
+                LOGS("CUpnpCpbEmbeddedDeviceDescription::ServiceDescriptionL "
+                     "- Wrong response recived.");
+                iAllDevicesInRoot.Remove(iAllDevicesInRoot.Find(device));
+                device->WaitServiceDescriptionRemoveSessionId(servCount);
+                if (!iAllDevicesInRoot.Count())
+                    {
+                    // Function will set iResult
+                    BuildResultListsL(iRootDevice);
+                    CreateUuidsL();
+                    }
+                else
+                    {
+                    iResult = KDisscoveryInProgress;
+                    }
+                }
+            else
+                {
+                if(device != NULL)
+                    {
+					iResult = ProcessServiceDescriptionL(device, aMsg);
+                    }
+				else
+				    {
+					iResult = KErrNotFound;
+				    }
+
+                }
+            }
+        else
+            {
+            iResult = KErrNotFound;
+            }
+        }
+    return iResult;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::ServiceDescription
+// Parse service description
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbEmbeddedDeviceDescription::ProcessServiceDescriptionL(
+    CUpnpDevice* aDevice, CUpnpHttpMessage* aMsg)
+    {
+    LOG_FUNC_NAME;
+    CUpnpDevice::TServiceAdd result;
+
+    // Parsing service desription
+    CUpnpService* service = NULL;
+
+    TRAPD( error, service = iSaxController->ParseServiceL( aMsg->Body(), aDevice ) );
+    if( !service || error )
+        {
+        // error handling section
+        iAllDevicesInRoot.Remove(iAllDevicesInRoot.Find(aDevice));
+        if(!iAllDevicesInRoot.Count())
+            {
+            // Function will set iResult
+            BuildResultListsL(iRootDevice);
+            CreateUuidsL();
+            }
+        else
+            {
+            iResult = KDisscoveryInProgress;
+            }
+
+            return iResult;
+        }
+
+    CleanupStack::PushL(service);
+    result = aDevice->AddServiceL(aMsg->SessionId(), service);
+    CleanupStack::Pop(service);
+
+    if ( result == CUpnpDevice::EAllServicesAdded )
+        { // device has received all service descriptions
+        LOGS("CUpnpCpbEmbeddedDeviceDescription::ProcessServiceDescriptionL "
+             "- All service info added to the parent device");
+        // Process devicess
+        iDiscoveredDevices.AppendL( aDevice );
+        iAllDevicesInRoot.Remove(iAllDevicesInRoot.Find(aDevice));
+
+        if(!iAllDevicesInRoot.Count())
+            {
+            // Function will set iResult
+            BuildResultListsL(iRootDevice);
+            CreateUuidsL();
+            }
+        else
+            {
+            iResult = KDisscoveryInProgress;
+            }
+        }
+    else if ( result == CUpnpDevice::EServiceAdded )
+        {
+        LOGS("CUpnpCpbEmbeddedDeviceDescription::ProcessServiceDescriptionL "
+             "- Service added");
+        // Waiting for next desciptions.
+        iResult = KDisscoveryInProgress;
+        TPtrC8 buffer(GetNextServiceType(aDevice));
+        TInt sessionId = iMessanger.GetServiceDescriptionL(aDevice, buffer);
+         // put SessionID to memory per pending Service Description request
+        aDevice->WaitServiceDescriptionL( sessionId );
+        }
+    else
+        {
+        delete service;
+        iResult = KDisscoveryInProgress;
+        }
+
+    LOGS1("CUpnpCpbEmbeddedDeviceDescription::ProcessServiceDescriptionL -res=%d",
+        iResult);
+    return iResult;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::BuildResultListL
+//  Create result list
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpCpbEmbeddedDeviceDescription::BuildResultListsL(CUpnpDevice* aDevice)
+    {
+    //Devices discovered correctly will be moved to list iAllDevicesInRoot
+    TBool result = ETrue;
+    // Process all subdevices
+    RPointerArray<CUpnpDevice> deviceList  = aDevice->DeviceList();
+    for (TInt i(0); i < deviceList.Count(); i++)
+        {
+        result =  BuildResultListsL(deviceList[i]) && result;
+        }
+    // Process current device
+    if (result)
+        {
+        if (UpnpCpbDeviceListUtils::ExistOnList(aDevice->Uuid(), iDiscoveredDevices))
+            {
+            if (iRepository.MatchTargetDevice(aDevice->DeviceType()))
+                {
+                // correctly discovered devices are now on iAllDevicesInRoot list
+                iAllDevicesInRoot.AppendL(aDevice);
+                iDiscoveredDevices.Remove(iDiscoveredDevices.Find(aDevice));
+                }
+            }
+        else
+            {
+            result = EFalse;
+            }
+        }
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::CreateUuidsL
+// Count result and create Uuids
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbEmbeddedDeviceDescription::CreateUuidsL()
+    {
+    if(!iRootDevice)
+        {
+        return;
+        }
+
+    RPointerArray<CUpnpDevice> devices;
+    iRootDevice->GetAllDevices(devices);
+
+    // All devices
+    TInt allDevicesNumber = devices.Count() + 1;
+    // All devices with processing finished correctly
+    TInt correctlyProcessedDevices = iNotNeededDevices.Count() +
+                iDiscoveredDevices.Count() + iAllDevicesInRoot.Count();
+    CleanupClosePushL(devices);
+    // all devices found
+    if(allDevicesNumber == correctlyProcessedDevices)
+        {
+        iResult = KDisscoveryFinished;
+        }
+    else // Some devices are not finished correctly
+        {
+        iResult = KDisscoveryIncorrect;
+
+        for (TInt i(0); i < devices.Count(); i++)
+            {
+            if ( !UpnpCpbDeviceListUtils::ExistOnList(devices[i]->Uuid(),
+                    iNotNeededDevices )
+                    && !UpnpCpbDeviceListUtils::ExistOnList(devices[i]->Uuid(),
+                        iAllDevicesInRoot )
+                    && !UpnpCpbDeviceListUtils::ExistOnList(devices[i]->Uuid(),
+                        iDiscoveredDevices ) )
+                {
+                AddToUuidsL(devices[i]->Uuid());
+                }
+            }
+        AddToUuidsL(iRootDevice->Uuid());
+        // root might be only unneded, or not discovered correctly in case of wrong process
+        TInt idx = iNotNeededDevices.Find(iRootDevice);
+        if(idx != KErrNotFound)
+            {
+            iNotNeededDevices.Remove(idx);
+            }
+        else
+            {
+            idx = iDiscoveredDevices.Find(iRootDevice);
+            if(idx != KErrNotFound)
+                {
+                iDiscoveredDevices.Remove(idx);
+                }
+            }
+        }
+    CleanupStack::PopAndDestroy(&devices);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::GetDiscoveredDeviceL
+//  Append discovered devices to array
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbEmbeddedDeviceDescription::GetDiscoveredDeviceL(
+    RPointerArray<CUpnpDevice>& aArray, TBool aRemove )
+    {
+    if(iResult != KDisscoveryInProgress)
+        {
+        for(TInt i(0); i < iAllDevicesInRoot.Count(); i++)
+            {
+            if( iRepository.FindDevice( iAllDevicesInRoot[i]->Uuid() )
+                && aRemove )
+                {
+                iAllDevicesInRoot.Remove( i-- );
+                }
+            else
+                {
+                aArray.AppendL(iAllDevicesInRoot[i]);
+                }
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::GetUninterestingDeviceL
+//  Append not discovered (does not match the type) devices to array
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbEmbeddedDeviceDescription::GetUninterestingDeviceL(
+    RPointerArray<CUpnpDevice>& aArray , TBool aRemove )
+    {
+    if(iResult != KDisscoveryInProgress)
+        {
+        for(TInt i(0); i < iDiscoveredDevices.Count(); i++)
+            {
+            if( iRepository.FindDevice( iDiscoveredDevices[i]->Uuid() )
+                && aRemove )
+                {
+                iDiscoveredDevices.Remove( i-- );
+                }
+            else
+                {
+                aArray.AppendL(iDiscoveredDevices[i]);
+                }
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbEmbeddedDeviceDescription::GetUnnededDeviceL
+//  Append discovered but not metching target types devices to array
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbEmbeddedDeviceDescription::GetUnnededDeviceL(
+    RPointerArray<CUpnpDevice>& aArray , TBool aRemove )
+    {
+    if(iResult != KDisscoveryInProgress)
+        {
+        for(TInt i(0); i < iNotNeededDevices.Count(); i++)
+            if( iRepository.FindDevice( iNotNeededDevices[i]->Uuid() )
+                && aRemove )
+                {
+                iNotNeededDevices.Remove( i-- );
+                }
+            else
+                {
+                aArray.AppendL(iNotNeededDevices[i]);
+                }
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbinitialeventretry.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,93 @@
+/** @file
+* 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:  
+*
+*/
+
+#include "upnpcpbinitialeventretry.h"
+#include "upnpcpbinitialeventretryhandler.h"
+#include "upnpgenamessage.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetry::NewLC
+// Ownership of aMessage is passed through 
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbInitialEventRetry* CUpnpCpbInitialEventRetry::NewLC( 
+        CUpnpGenaMessage* aMessage, CUpnpCpbInitialEventRetryHandler& iOwner )
+    {
+    CleanupStack::PushL( aMessage );
+    //ownership is passed through
+    CUpnpCpbInitialEventRetry* self = new ( ELeave ) CUpnpCpbInitialEventRetry( aMessage, iOwner );
+    CleanupStack::Pop( aMessage );
+    CleanupStack::PushL( self ); 
+    self->ConstructL();
+    return self;
+    }
+
+        
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetry::CUpnpCpbInitialEventRetry
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbInitialEventRetry::CUpnpCpbInitialEventRetry( 
+            CUpnpGenaMessage* aMessage, CUpnpCpbInitialEventRetryHandler& iOwner ): 
+            CTimer(CActive::EPriorityStandard), iMessage( aMessage ), iOwner( iOwner )
+    {   
+    CActiveScheduler::Add( this );
+    }        
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetry::ConstrucL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbInitialEventRetry::ConstrucL()
+    {
+    CTimer::ConstructL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetry::RunL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbInitialEventRetry::RunL()
+   {           
+   iOwner.TimerExpired( this );
+   }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetry::Message
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpGenaMessage& CUpnpCpbInitialEventRetry::Message()
+    {
+    return *iMessage;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetry::~CUpnpCpbInitialEventRetry
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbInitialEventRetry::~CUpnpCpbInitialEventRetry()
+    { 
+    delete iMessage;
+    }
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbinitialeventretryhandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,75 @@
+/** @file
+* 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:  
+*
+*/
+
+#include "upnpcpbinitialeventretry.h"
+#include "upnpcpbinitialeventretryhandler.h"
+#include "upnpcontrolpoint.h"
+
+static const TInt KCpInitialEventTimeout = 1000000; 
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetryHandler::CUpnpCpbInitialEventRetryHandler
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbInitialEventRetryHandler::CUpnpCpbInitialEventRetryHandler( CUpnpControlPoint& aCp ):
+iControlPoint( aCp )    
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetryHandler::CUpnpCpbInitialEventRetryHandler
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbInitialEventRetryHandler::~CUpnpCpbInitialEventRetryHandler()
+    {
+    iList.ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetryHandler::AddL
+// Ownership of the argument is passed through
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbInitialEventRetryHandler::AddL( CUpnpGenaMessage* aMsg )
+    {
+    //ownership is passed through
+    CUpnpCpbInitialEventRetry* timer = CUpnpCpbInitialEventRetry::NewLC( aMsg, *this );    
+    iList.AppendL( timer ); 
+    CleanupStack::Pop( timer );
+    timer->After( KCpInitialEventTimeout );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbInitialEventRetryHandler::TimerExpired
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbInitialEventRetryHandler::TimerExpired( CUpnpCpbInitialEventRetry* aTimer )
+    {
+    TInt index = iList.Find( aTimer );
+    ASSERT( index != KErrNotFound );
+    iList.Remove( index );          
+    TRAP_IGNORE( iControlPoint.HandlePostponedInitialEventL( aTimer->Message() ) ) ;
+    delete aTimer;        
+    }
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpbsimpledevicedescription.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,321 @@
+/** @file
+* Copyright (c) 2007-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:  Declares simple device discovery process.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32base.h>
+
+#include <upnpdevice.h>
+#include "upnpcontenthandlerscontroller.h"
+
+#include "upnpcpbsimpledevicedescription.h"
+#include "upnpcpbhttpmessagecontroller.h"
+#include "upnpcpbdevicerepository.h"
+
+// LOGGER SETTINGS
+#define KLogFile _L("UPnPControlPoint.txt")
+#include <upnpcustomlog.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbSimpleDeviceDescription* CUpnpCpbSimpleDeviceDescription::NewL(
+        MUpnpCpbHttpMessageController& aMessanger,
+        CUpnpCpbDeviceRepository& aRepository)
+    {
+    LOG_FUNC_NAME;
+    CUpnpCpbSimpleDeviceDescription* self =
+        new (ELeave) CUpnpCpbSimpleDeviceDescription(aMessanger, aRepository);
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::~CUpnpCpbSimpleDeviceDescription
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbSimpleDeviceDescription::~CUpnpCpbSimpleDeviceDescription()
+    {
+    LOG_FUNC_NAME;
+    if(!iIsNull)
+        {
+        delete iRootDevice;
+        }
+    iRootDevice = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::CUpnpCpbSimpleDeviceDescription
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpCpbSimpleDeviceDescription::CUpnpCpbSimpleDeviceDescription(
+        MUpnpCpbHttpMessageController& aMessanger,
+        CUpnpCpbDeviceRepository& aRepository)
+    : CUpnpCpbDeviceDescription(aMessanger, aRepository)
+    {
+    LOG_FUNC_NAME;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::DiscoverDeviceL
+// Start processing device.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbSimpleDeviceDescription::DiscoverDeviceL(CUpnpDevice* aDevice)
+    {
+    LOG_FUNC_NAME;
+    iIsNull = EFalse;
+    iRootDevice = aDevice;
+    // check if device match the type
+    if(!iRepository.MatchTargetDevice(aDevice->DeviceType()))
+        {
+        iResult = KDisscoveryFinished;
+        return iResult;
+        }
+
+    iResult = KDisscoveryInProgress;
+    TPtrC8 buffer(GetNextServiceType(iRootDevice));
+
+    if (buffer.Length())
+        {
+        LOGS("CUpnpCpbSimpleDeviceDescription::DiscoverDeviceL - Discovering services");
+
+        //ask for 1st service description
+        iResult = KDisscoveryInProgress;
+        TInt sessionId = iMessanger.GetServiceDescriptionL (aDevice, buffer);
+        // put SessionID to memory per pending Service Description request
+        aDevice->WaitServiceDescriptionL( sessionId );
+        }
+    else
+        {
+        LOGS("CUpnpCpbSimpleDeviceDescription::DiscoverDeviceL - "
+             "No service info for the device");
+        LOGS("CUpnpCpbSimpleDeviceDescription::DiscoverDeviceL - "
+             "All device info brought - device officially discovered");
+        iResult = KDisscoveryFinished;
+        }
+    return iResult;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::ServiceDescription
+// Function processing service description
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbSimpleDeviceDescription::ServiceDescriptionL(CUpnpHttpMessage* aMsg)
+    {
+    LOG_FUNC_NAME;
+
+    // Check if device is waiting for this service
+    TBool waiting(EFalse);
+    if(!iRootDevice)
+        {
+        iResult = KErrNotFound;
+        }
+    else
+        {
+        for( TInt servCount(0);
+                servCount < iRootDevice->WaitServiceDescriptionCount(); servCount++)
+            {
+            if ( iRootDevice->WaitServiceDescriptionSessionId(servCount )
+                     == aMsg->SessionId())
+                {
+                waiting = ETrue;
+                break;
+                }
+            }
+        // Waiting for service description
+        if(waiting)
+            {
+            // Processing message
+            if ( !aMsg->Is2xx())
+                {
+                LOGS("CUpnpCpbSimpleDeviceDescription::ServiceDescriptionL - "
+                     "Wrong response recived.");
+                iResult = KDisscoveryIncorrect;
+                }
+            else
+                {
+                iResult = ProcessServiceDescriptionL(aMsg);
+                }
+            }
+        else
+            {
+            iResult = KErrNotFound;
+            }
+        }
+    return iResult;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::ServiceDescription
+// Parse service description
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpCpbSimpleDeviceDescription::ProcessServiceDescriptionL(CUpnpHttpMessage* aMsg)
+    {
+    LOG_FUNC_NAME;
+    CUpnpDevice::TServiceAdd result;
+
+    // Parsing service desription
+    CUpnpService* service = NULL;
+    service = iSaxController->ParseServiceL(aMsg->Body(), iRootDevice);
+
+    CleanupStack::PushL(service);
+    result = iRootDevice->AddServiceL(aMsg->SessionId(), service);
+    CleanupStack::Pop(service);
+
+    if ( result == CUpnpDevice::EAllServicesAdded )
+        { // device has received all service descriptions
+        LOGS("CUpnpCpbSimpleDeviceDescription::ProcessServiceDescriptionL  - "
+             "All service info added to the parent device");
+        iResult = 	KDisscoveryFinished;
+        }
+    else if ( result == CUpnpDevice::EServiceAdded )
+        {
+        LOGS("CUpnpCpbSimpleDeviceDescription::ProcessServiceDescriptionL - "
+             "Service added");
+        // Waiting for next desciptions.
+        iResult = 	KDisscoveryInProgress;
+
+        TPtrC8 buffer(GetNextServiceType(iRootDevice));
+        TInt sessionId = iMessanger.GetServiceDescriptionL (iRootDevice,
+                                  buffer);
+        // put SessionID to memory per pending Service Description request
+        iRootDevice->WaitServiceDescriptionL( sessionId );
+        }
+    else
+        {
+        delete service;
+        iResult = KDisscoveryInProgress;
+        }
+
+    LOGS1("CUpnpCpbSimpleDeviceDescription::ProcessServiceDescriptionL -res=%d", iResult);
+    return iResult;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::GetIncompliteRootDevice
+//  Append discovered devices to array
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice* CUpnpCpbSimpleDeviceDescription::GetIncompliteRootDevice()
+    {
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::NullTargetDevice
+// Constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbSimpleDeviceDescription::NullTargetDevice()
+    {
+    if (iResult == KDisscoveryFinished)
+        {
+        iIsNull = ETrue;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::NullTargetDevice
+// Constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbSimpleDeviceDescription::DeleteTargetDevice()
+    {
+    if (!iIsNull || iResult == KDisscoveryIncorrect)
+        {
+        delete iRootDevice;
+        }
+    iRootDevice = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::GetDiscoveredDeviceL
+//  Append discovered devices to array
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbSimpleDeviceDescription::GetDiscoveredDeviceL(
+    RPointerArray<CUpnpDevice>& aArray, TBool /*aRemove*/ )
+    {
+    if (iRootDevice && iRepository.MatchTargetDevice(iRootDevice->DeviceType()))
+        {
+        if(iResult == KDisscoveryFinished)
+            {
+            aArray.AppendL(iRootDevice);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::GetUninterestingDeviceL
+//  Append not discovered (does not match the type) devices to array
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbSimpleDeviceDescription::GetUninterestingDeviceL(
+    RPointerArray<CUpnpDevice>& aArray, TBool /*aRemove*/ )
+    {
+    if (iRootDevice && !iRepository.MatchTargetDevice(iRootDevice->DeviceType()))
+        {
+        if (iResult == KDisscoveryFinished)
+            {
+            aArray.AppendL(iRootDevice);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::GetUnnededDeviceL
+//  Append discovered but not matching target types devices to array
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpbSimpleDeviceDescription::GetUnnededDeviceL(
+    RPointerArray<CUpnpDevice>& /*aArray*/, TBool /*aRemove*/ )
+    {
+    // nothing to do, in case of simple device discovered are only matching type devices
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpbSimpleDeviceDescription::FailedUuids
+//  Returns incorrect uuids
+// -----------------------------------------------------------------------------
+//
+const TPtrC8 CUpnpCpbSimpleDeviceDescription::FailedUuidsL()
+    {
+    if (iRootDevice)
+        {
+        return iRootDevice->Uuid();
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcphttprequestorimpl.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,72 @@
+/** @file
+* 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:  Provides default implementation of MUpnpCpHttpClientRequestor interface.
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpcphttprequestorimpl.h"
+#include "upnphttpclientengine.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpRequestorImpl::CUpnpCpHttpRequestorImpl
+// -----------------------------------------------------------------------------
+//
+CUpnpCpHttpRequestorImpl::CUpnpCpHttpRequestorImpl()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpRequestorImpl::~CUpnpCpHttpRequestorImpl
+// -----------------------------------------------------------------------------
+//
+CUpnpCpHttpRequestorImpl::~CUpnpCpHttpRequestorImpl()
+    {
+    delete iHttpClientEngine;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpRequestorImpl::NewL
+// -----------------------------------------------------------------------------
+//
+CUpnpCpHttpRequestorImpl* CUpnpCpHttpRequestorImpl::NewL()
+    {
+    CUpnpCpHttpRequestorImpl* self = new (ELeave) CUpnpCpHttpRequestorImpl();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpRequestorImpl::InitialiseL
+// -----------------------------------------------------------------------------
+//
+void  CUpnpCpHttpRequestorImpl::InitialiseL(
+    MUpnpHttpClientObserver& aObserver, TInt aActiveIap )
+    {
+    delete iHttpClientEngine;
+    iHttpClientEngine = NULL;
+    iHttpClientEngine = CUpnpHttpClientEngine::NewL( aObserver, aActiveIap );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpRequestorImpl::SendL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpHttpRequestorImpl::SendL( CUpnpHttpTransaction& aTransaction )
+    {
+    ASSERT( iHttpClientEngine );//check if InitialiseL was invoked
+    iHttpClientEngine->SendL( aTransaction );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcphttprequestorimplbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+/** @file
+* 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:  Class used in WLan Lost case
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpcphttprequestorimplbase.h"
+
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpRequestorImplBase::InitialiseL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpHttpRequestorImplBase::InitialiseL(
+        MUpnpHttpClientObserver& /*aObserver*/, TInt /*aActiveIap*/ )
+    {
+    User::Leave( KErrNotReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpRequestorImplBase::SendL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpHttpRequestorImplBase::SendL( CUpnpHttpTransaction& /*aTransaction*/ )
+    {
+    User::Leave( KErrNotReady );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpstackrequestorimpl.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,176 @@
+/** @file
+* 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:  Provides default implementation of MUpnpCpHttpClientRequestor interface.
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpcpstackrequestorimpl.h"
+#include "upnpdispatcher.h"
+#include "upnpcontrolpoint.h"
+#include "upnpdeviceimplementationbase.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::CUpnpCpStackRequestorImpl
+// -----------------------------------------------------------------------------
+//
+CUpnpCpStackRequestorImpl::CUpnpCpStackRequestorImpl()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::~CUpnpCpStackRequestorImpl
+// -----------------------------------------------------------------------------
+//
+CUpnpCpStackRequestorImpl::~CUpnpCpStackRequestorImpl()
+    {
+    delete iDispatcher;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::NewL
+// -----------------------------------------------------------------------------
+//
+CUpnpCpStackRequestorImpl* CUpnpCpStackRequestorImpl::NewL(
+    MUpnpDiscoveryObserver& aDiscoveryObserver )
+    {
+    CUpnpCpStackRequestorImpl* self = new (ELeave) CUpnpCpStackRequestorImpl();
+    CleanupStack::PushL( self );
+    self->ConstructL( aDiscoveryObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::SearchL
+// -----------------------------------------------------------------------------
+//
+void  CUpnpCpStackRequestorImpl::SearchL( const TDesC8& aSearchString )
+    {
+    iDispatcher->SearchL( aSearchString );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::SearchL
+// -----------------------------------------------------------------------------
+//
+void  CUpnpCpStackRequestorImpl::SearchL( const TDesC16& aSearchString )
+    {
+    iDispatcher->SearchL( aSearchString );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::AddCustomerL
+// -----------------------------------------------------------------------------
+//
+void  CUpnpCpStackRequestorImpl::AddCustomerL( const MUpnpDispatcherCustomer& aCustomer )
+    {
+    iDispatcher->AddCustomerL( aCustomer, ETrue );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::RemoveCustomer
+// -----------------------------------------------------------------------------
+//
+void  CUpnpCpStackRequestorImpl::RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer )
+    {
+    iDispatcher->RemoveCustomer( aCustomer, ETrue );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::HttpServerAddress
+// -----------------------------------------------------------------------------
+//
+TInetAddr CUpnpCpStackRequestorImpl::HttpServerAddress()
+    {
+    return iDispatcher->HttpServerAddress();
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::ConstructL
+// -----------------------------------------------------------------------------
+//
+void  CUpnpCpStackRequestorImpl::ConstructL( MUpnpDiscoveryObserver& aDiscoveryObserver )
+    {
+    iDispatcher = CUpnpDispatcher::NewL( &aDiscoveryObserver );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::SendLocalRequestL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImpl::SendLocalRequestL( CUpnpHttpMessage* aMessage,
+                             MUpnpDispatcherCustomer &aCustomer )
+    {
+    iDispatcher->SendMessageL( aMessage, aCustomer, ETrue );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::SendMessageL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImpl::SendMessageL( CUpnpHttpMessage* aMessage,
+                                MUpnpDispatcherCustomer &aCustomer,
+                                TBool aIsLocal)
+    {
+    iDispatcher->SendMessageL( aMessage, aCustomer, aIsLocal );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::StopFilteringL
+// -----------------------------------------------------------------------------
+//
+void  CUpnpCpStackRequestorImpl::StopIgnoringL( const TDesC8& aUuids )
+    {
+    iDispatcher->StopFilteringL( aUuids );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImpl::StartIPFilteringL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImpl::StartIPFilteringL()
+    {
+    iDispatcher->StartIPFilteringL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpClientRequestorImpl::StopIPFiltering
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImpl::StopIPFiltering()
+    {
+    iDispatcher->StopIPFiltering();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpClientRequestorImpl::StopHttpServer
+// -----------------------------------------------------------------------------
+//    
+void CUpnpCpStackRequestorImpl::StopHttpServer()
+    {
+    iDispatcher->StopHttpServer();
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpClientRequestorImpl::StartHttpServerL
+// -----------------------------------------------------------------------------
+//    
+void CUpnpCpStackRequestorImpl::StartHttpServerL()
+    {
+    iDispatcher->StartHttpServerL( ETrue, KRandomPort );
+    }    
+
+//  End of File 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpcpstackrequestorimplbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,132 @@
+/** @file
+* 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:  Class used in WLan Lost case
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpcpstackrequestorimplbase.h"
+
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::SearchL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImplBase::SearchL( const TDesC8& /*aSearchString*/ )
+    {
+    User::Leave( KErrNotReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::SearchL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImplBase::SearchL( const TDesC16& /*aSearchString*/ )
+    {
+    User::Leave( KErrNotReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::AddCustomerL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImplBase::AddCustomerL( 
+                                  const MUpnpDispatcherCustomer& /*aCustomer*/ )
+    {
+    User::Leave( KErrNotReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::RemoveCustomer
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImplBase::RemoveCustomer( 
+                                  const MUpnpDispatcherCustomer& /*aCustomer*/ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::HttpServerAddress
+// -----------------------------------------------------------------------------
+//
+TInetAddr CUpnpCpStackRequestorImplBase::HttpServerAddress()
+    {
+    return TInetAddr();
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::SendLocalRequestL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImplBase::SendLocalRequestL( 
+        CUpnpHttpMessage* /*aMessage*/, MUpnpDispatcherCustomer& /*aCustomer*/ )
+    {
+    User::Leave( KErrNotReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::SendMessageL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImplBase::SendMessageL( CUpnpHttpMessage* /*aMessage*/,
+                                          MUpnpDispatcherCustomer& /*aCustomer*/,
+                                          TBool /*aIsLocal*/ )
+    {
+    User::Leave( KErrNotReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::StopFilteringL
+// -----------------------------------------------------------------------------
+//
+void  CUpnpCpStackRequestorImplBase::StopIgnoringL( const TDesC8& /*aUuids*/ )
+    {
+    User::Leave( KErrNotReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpStackRequestorImplBase::StartIPFilteringL
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImplBase::StartIPFilteringL()
+    {
+    User::Leave( KErrNotReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpClientRequestorImplBase::StopIPFiltering
+// -----------------------------------------------------------------------------
+//
+void CUpnpCpStackRequestorImplBase::StopIPFiltering()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpClientRequestorImplBase::StopHttpServer
+// -----------------------------------------------------------------------------
+//    
+void CUpnpCpStackRequestorImplBase::StopHttpServer()
+    {
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpCpHttpClientRequestorImplBase::StartHttpServer
+// -----------------------------------------------------------------------------
+//    
+void CUpnpCpStackRequestorImplBase::StartHttpServerL()
+    {
+    }    
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpdevicedescriptionhttptransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,72 @@
+/** @file
+* 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:  Definition of CUpnpDeviceDescriptionHttpTransaction
+*
+*/
+
+
+#include "upnpdevicedescriptionhttptransaction.h"
+#include "upnpcontrolpoint.h"
+
+// ----------------------------------------------------------------------------
+// CUpnpDeviceDescriptionHttpTransaction::~CUpnpDeviceDescriptionHttpTransaction
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpDeviceDescriptionHttpTransaction::~CUpnpDeviceDescriptionHttpTransaction()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpDeviceDescriptionHttpTransaction::NewLC
+// Two-phased constructor, that takes ownership of a message and guarantee it's
+// destruction even when leave ocures.
+// Caller shouldn't place aMsg on cleanupstack before method call
+// ----------------------------------------------------------------------------
+//
+CUpnpDeviceDescriptionHttpTransaction* CUpnpDeviceDescriptionHttpTransaction::NewLC(
+    CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint)
+    {
+    CleanupStack::PushL( aRequest );
+    CUpnpDeviceDescriptionHttpTransaction* self =
+        new (ELeave) CUpnpDeviceDescriptionHttpTransaction( aRequest, aControlPoint );
+    CleanupStack::Pop( aRequest );//now msg is safe it will be deleted from destructor
+    CleanupStack::PushL( self );
+    self->BaseConstructL();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpDeviceDescriptionHttpTransaction::CUpnpDeviceDescriptionHttpTransaction
+// Constructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpDeviceDescriptionHttpTransaction::CUpnpDeviceDescriptionHttpTransaction(
+    CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint ) :
+    CUpnpHttpTransaction( aRequest ), iControlPoint( aControlPoint )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// void CUpnpDeviceDescriptionHttpTransaction::ProcessResponseL()
+// Processes response by passing it to control point.
+// ----------------------------------------------------------------------------
+//
+void CUpnpDeviceDescriptionHttpTransaction::ProcessResponseL()
+    {
+    iControlPoint.ProcessDeviceMessageL( Response() );
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpfilesender.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,150 @@
+/** @file
+ * 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:  CUpnpFileSender implementation
+ *
+ */
+
+#include "upnpfilesender.h"
+#include "httpuploader.h"
+#include "upnphttpmessage.h"
+#include "upnpstring.h"
+#include "upnpcons.h"
+#include "upnphttpmessagefactory.h"
+#include "upnpcontrolpoint.h"
+
+// --------------------------------------------------------------------------
+// CUpnpFileSender::CUpnpFileSender
+// --------------------------------------------------------------------------
+//
+CUpnpFileSender::CUpnpFileSender( CUpnpControlPoint& aCPToNotifyOfSendingResult )
+    : iControlPoint( aCPToNotifyOfSendingResult )
+    {
+    // No implementation required
+    }
+
+// --------------------------------------------------------------------------
+// CUpnpFileSender::~CUpnpFileSender
+// --------------------------------------------------------------------------
+//
+CUpnpFileSender::~CUpnpFileSender()
+    {
+    delete iUploader;
+    }
+
+// --------------------------------------------------------------------------
+// CUpnpFileSender::NewLC
+// --------------------------------------------------------------------------
+//
+CUpnpFileSender* CUpnpFileSender::NewLC( CUpnpControlPoint& aCPToNotifyOfSendingResult )
+    {
+    CUpnpFileSender* self = new (ELeave) CUpnpFileSender( aCPToNotifyOfSendingResult );
+    CleanupStack::PushL( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CUpnpFileSender::NewL
+// --------------------------------------------------------------------------
+//
+CUpnpFileSender* CUpnpFileSender::NewL( CUpnpControlPoint& aCPToNotifyOfSendingResult )
+    {
+    CUpnpFileSender* self = CUpnpFileSender::NewLC( aCPToNotifyOfSendingResult );
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// DestinationUriL
+// Allocate destination uri from message
+// --------------------------------------------------------------------------
+//
+static HBufC8* DestinationUriL( CUpnpHttpMessage& aMessage )
+    {
+    TInetAddr add( aMessage.Receiver() );
+    HBufC8* address = UpnpString::InetToStringL( add );
+    CleanupStack::PushL( address );
+    TPtrC8 path( aMessage.SenderPathFromHeader() ) ;
+    HBufC8* uriBuf = HBufC8::NewL(
+        UpnpHTTP::KHTTPUrl().Length() + address->Length() + path.Length() );
+    TPtr8 uri( uriBuf->Des() );
+    uri.Append( UpnpHTTP::KHTTPUrl );
+    uri.Append( *address );
+    uri.Append( path );
+    CleanupStack::PopAndDestroy( address );
+    return uriBuf;
+    }
+
+// --------------------------------------------------------------------------
+// CUpnpFileSender::SendL
+// --------------------------------------------------------------------------
+//
+void CUpnpFileSender::SendL( CUpnpHttpMessage& aMessageToSend )
+    {
+    ASSERT( aMessageToSend.Method() == KHttpPost && aMessageToSend.OutFilename().Length() > 0 );
+    if ( !iUploader )   //late initialisation
+        {
+        const TInt KUnused(0);
+        const TUint KBufferSize( 10 * 1024 );
+        const TUint KParallelTransfersNumber( 1 );
+        iUploader = CHttpUploader::NewL(*this,KUnused,KBufferSize,KParallelTransfersNumber);
+        }
+
+    RBuf fileName;
+    User::LeaveIfError( fileName.Create( aMessageToSend.OutFilename().Length() ) );
+    CleanupClosePushL( fileName );
+    fileName.Copy( aMessageToSend.OutFilename() );
+    HBufC8* destUri = DestinationUriL( aMessageToSend );
+    CleanupStack::PushL( destUri );
+
+    iUploader->UploadFileL( *destUri, fileName, (TAny*)aMessageToSend.SessionId() );
+
+    CleanupStack::PopAndDestroy( destUri );
+    CleanupStack::PopAndDestroy( &fileName );
+    }
+
+// --------------------------------------------------------------------------
+// CUpnpFileSender::TransferProgress
+// --------------------------------------------------------------------------
+//
+void CUpnpFileSender::TransferProgress( TAny* /*aKey*/,
+                               TInt /*aBytes*/,
+                               TInt /*aTotalBytes*/ )
+     {
+     // no implementation needed
+     }
+
+// --------------------------------------------------------------------------
+// CUpnpFileSender::ReadyForTransferL
+// --------------------------------------------------------------------------
+//
+void CUpnpFileSender::ReadyForTransferL( TAny* aKey )
+    {
+    _LIT8( KTextHtmlMimeType, "text/html" );
+    iUploader->SetHeaderL( aKey, UpnpHTTP::KHdrContentType, KTextHtmlMimeType );
+    iUploader->SetHeaderL( aKey, UpnpHTTP::KConnection, UpnpHTTP::KClose );
+    iUploader->StartTransferL( aKey );
+    }
+
+// --------------------------------------------------------------------------
+// CUpnpFileSender::TransferCompleted
+// --------------------------------------------------------------------------
+//
+void CUpnpFileSender::TransferCompleted( TAny* /*aKey*/, TInt aStatus )
+    {
+    CUpnpHttpMessage* rsp = NULL;
+    TRAP_IGNORE(
+        rsp = RUpnpHttpMessageFactory::HttpResponseErrorL( TInetAddr(), aStatus ) );
+    iControlPoint.HttpResponseReceived( rsp );
+    delete rsp;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpservicedescriptionhttptransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,72 @@
+/** @file
+* 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:  Definition of CUpnpServiceDescriptionHttpTransaction
+*
+*/
+
+
+#include "upnpservicedescriptionhttptransaction.h"
+#include "upnpcontrolpoint.h"
+
+// ----------------------------------------------------------------------------
+// CUpnpServiceDescriptionHttpTransaction::~CUpnpServiceDescriptionHttpTransaction
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpServiceDescriptionHttpTransaction::~CUpnpServiceDescriptionHttpTransaction()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpServiceDescriptionHttpTransaction::NewLC
+// Two-phased constructor, that takes ownership of a message and guarantee it's
+// destruction even when leave ocures.
+// Caller shouldn't place aMsg on cleanupstack before method call
+// ----------------------------------------------------------------------------
+//
+CUpnpServiceDescriptionHttpTransaction* CUpnpServiceDescriptionHttpTransaction::NewLC(
+    CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint )
+    {
+    CleanupStack::PushL( aRequest );
+    CUpnpServiceDescriptionHttpTransaction* self =
+        new (ELeave) CUpnpServiceDescriptionHttpTransaction( aRequest, aControlPoint );
+    CleanupStack::Pop( aRequest );//now msg is safe it will be deleted from destructor
+    CleanupStack::PushL( self );
+    self->BaseConstructL();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpServiceDescriptionHttpTransaction::CUpnpServiceDescriptionHttpTransaction
+// Constructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpServiceDescriptionHttpTransaction::CUpnpServiceDescriptionHttpTransaction(
+    CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint) :
+    CUpnpHttpTransaction( aRequest ), iControlPoint( aControlPoint )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpServiceDescriptionHttpTransaction::ProcessResponseL()
+// Processes response by passing it to control point.
+// ----------------------------------------------------------------------------
+//
+void CUpnpServiceDescriptionHttpTransaction::ProcessResponseL()
+    {
+    iControlPoint.ProcessServiceMessageL( Response() );
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpserviceinfo.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,316 @@
+/** @file
+* 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:  Declares ServiceInfi class.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32base.h>
+#include <e32cons.h>
+#include "upnpdevice.h"
+#include "upnpserviceinfo.h"
+#include "upnpcontrolpoint.h"
+#include "upnpcommonupnplits.h"
+#include "upnpgenamessagefactory.h"
+
+#undef  KLogFile
+#define KLogFile _L("UPnPCP.txt")
+#include "upnpcustomlog.h"
+using namespace UpnpHTTP;
+
+static const TInt KSubscriptionRenewalTimeWindow = 3;
+static const TInt KSubscriptionRenewalMinimalTime = 6;
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceInfo* CUpnpServiceInfo::NewLC(
+                            CUpnpControlPoint* aControlPoint,
+                            CUpnpService* aService )
+    {
+    CUpnpServiceInfo* self = new (ELeave) CUpnpServiceInfo(
+                                aControlPoint,
+                                aService );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceInfo::ConstructL()
+    {
+    iResubscribeTimer = CUpnpNotifyTimer::NewL( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::CUpnpServiceInfo
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceInfo::CUpnpServiceInfo( CUpnpControlPoint* aControlPoint,
+                                    CUpnpService* aService ):
+        iService( aService ),
+        iControlPoint( aControlPoint ),
+        iTimeOut( CUpnpControlPoint::KDefaultSubscriptionTimeout )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::~CUpnpServiceInfo
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceInfo::~CUpnpServiceInfo()
+    {
+    delete iResubscribeTimer;
+    delete iSid;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::TimerEventL
+// Callback function
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceInfo::TimerEventL( CUpnpNotifyTimer* /*aTimer*/ )
+    {
+    ResubscribeL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::StartTimerL
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceInfo::StartTimerL( const TDesC8& aTimeout )
+    {
+    if ( aTimeout.FindC( KSeconds() ) != KErrNotFound )
+        {
+        TLex8 lex( aTimeout );
+        static const TInt KLengthOfWordSecondMinus = 7;
+        lex.Inc( KLengthOfWordSecondMinus );
+        TInt tOutValue;
+        TInt err( lex.Val( tOutValue ) );
+        User::LeaveIfError( err );
+        iTimeOut = tOutValue;
+        }
+    else
+        {
+        iTimeOut =
+             CUpnpControlPoint::KDefaultSubscriptionTimeout ;
+        }
+//prevention from too frequent subscriptions
+    if ( iTimeOut < KSubscriptionRenewalMinimalTime )
+        {
+        iTimeOut = KSubscriptionRenewalMinimalTime;
+        }
+    iResubscribeTimer->AfterSeconds(
+        iTimeOut - KSubscriptionRenewalTimeWindow);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::SessionId
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpServiceInfo::SessionId()
+    {
+    return iSessionId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::Service
+// -----------------------------------------------------------------------------
+//
+CUpnpService* CUpnpServiceInfo::Service()
+    {
+    return iService;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::Sid
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CUpnpServiceInfo::Sid() const
+    {
+    if ( iSid )
+        {
+        return *iSid;
+        }
+    else
+        {
+        return KNullDesC8;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::SetSidL
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceInfo::SetSidL( const TDesC8& aSid )
+    {
+    delete iSid;
+    iSid = NULL;
+    iSid = aSid.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::SetSeq
+// Sets sequence
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceInfo::SetSeq( TUint32 aSeq )
+    {
+    iSeq = aSeq;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::Seq
+//
+// -----------------------------------------------------------------------------
+//
+TUint32 CUpnpServiceInfo::Seq() const
+    {
+    return iSeq;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::CreateSubscribtionMessageL
+// -----------------------------------------------------------------------------
+//
+CUpnpGenaMessage* CUpnpServiceInfo::CreateSubscriptionMessageL(
+                                                     THTTPMsgType aType)
+    {
+    return CreateSubscriptionMessageL( *iSid, aType );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::CreateSubscribtionMessageL
+// -----------------------------------------------------------------------------
+//
+CUpnpGenaMessage* CUpnpServiceInfo::CreateSubscriptionMessageL(
+                                        const TDesC8& aPath, THTTPMsgType aType)
+    {
+    CUpnpGenaMessage* result = NULL;
+
+    TBuf8<UpnpString::KMaxIntLength> timeoutBuf;
+    timeoutBuf.Num( iTimeOut );
+
+    CUpnpDevice& device = iService->Device();
+
+    TInetAddr servAddress = iService->Address();
+    TPtrC8 subscribe = iService->SubscriptionUrl();
+
+    // check if path is not absolute
+    if( subscribe.Find( KHttp() ) == 0 )
+        {
+        subscribe.Set( subscribe.Mid( KHttp().Length() ) );
+        TInt slashPos = subscribe.Find( UpnpString::KSlash() );
+        if( slashPos != KErrNotFound )
+            {
+            servAddress    = iControlPoint->GiveAddressL( subscribe.Left( slashPos ));
+            subscribe.Set( subscribe.Mid( slashPos ) );
+            }
+        }
+
+    switch( aType )
+        {
+        case ESubscription:
+            {
+            result = RUpnpGenaMessageFactory::SubscribeL(
+                            subscribe, servAddress, aPath, timeoutBuf );
+           break;
+            }
+        case EResubscription:
+            {
+            result = RUpnpGenaMessageFactory::ResubscribeL(
+                            subscribe, servAddress, aPath, timeoutBuf );
+			break;
+            }
+        case EUnSubscription:
+            {
+            result = RUpnpGenaMessageFactory::UnsubscribeL(
+                            subscribe, servAddress, aPath);
+			break;
+            }
+        default:
+            {
+            // Undefined. Should not come here at all!
+            User::Leave(KErrArgument);
+            break;
+            }
+        }
+    if(result == NULL)
+        {
+        // To avoid Coverity FORWARD_NULL errors
+        User::Leave(KErrArgument);
+        }
+    
+    result->SetType( aType );
+    iSessionId = result->SessionId();
+
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::ResubscribeL
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceInfo::ResubscribeL()
+    {
+    LOGS( "CUpnpServiceInfo::ResubscribeL - start" );
+    iControlPoint->ResubscribeL( this );
+    LOGS( "CUpnpServiceInfo::ResubscribeL - end" );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::ConstructSubscribtionPathLC
+//
+// -----------------------------------------------------------------------------
+//
+HBufC8* CUpnpServiceInfo::ConstructSubscribtionPathLC( const TDesC8& aPath,
+                                     TInetAddr& aAddr )
+    {
+    TBuf8<UpnpString::KMaxAddrOutputLength> addrBuf;
+    CUpnpHttpMessage::AddrOutput( aAddr, addrBuf );
+
+    TBuf<UpnpString::KMaxIntLength> port;
+    port.Num( aAddr.Port() );
+
+    HBufC8* longPath = HBufC8::NewLC(
+        1 + KHTTPUrl().Length() +   // "<"
+        addrBuf.Length() + 1 +      // ":"
+        port.Length() + 1 +         // "\"
+        aPath.Length() + 1 +        // "\"
+        aPath.Length() + 1 );       // ">"
+
+    TPtr8 longPathPtr( longPath->Des() );
+    longPathPtr.Append( KLessThan8() );
+    longPathPtr.Append( KHTTPUrl() );
+    longPathPtr.Append( addrBuf );
+    longPathPtr.Append( UpnpString::KColon() );
+    longPathPtr.Append( port );
+    longPathPtr.Append( UpnpString::KSlash() );
+    longPathPtr.Append( aPath );
+    longPathPtr.Append( UpnpString::KSlash() );
+    longPathPtr.Append( aPath );
+    longPathPtr.Append( KGreaterThan8() );
+
+    return longPath;
+    }
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpservicesubscriptionhttptransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,67 @@
+/** @file
+* 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:  Declaration of CUpnpServiceSubscriptionHttpTransaction
+*
+*/
+
+#include "upnpservicesubscriptionhttptransaction.h"
+#include "upnpcontrolpoint.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceSubscriptionHttpTransaction::CUpnpServiceSubscriptionHttpTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceSubscriptionHttpTransaction::CUpnpServiceSubscriptionHttpTransaction(
+    CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint) :
+    CUpnpHttpTransaction( aRequest ), iControlPoint( aControlPoint ),
+    iServiceSessionId( aRequest->SessionId() )
+    {
+    
+    }
+// -----------------------------------------------------------------------------
+// CUpnpServiceSubscriptionHttpTransaction::~CUpnpServiceSubscriptionHttpTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceSubscriptionHttpTransaction::~CUpnpServiceSubscriptionHttpTransaction()
+    {
+    
+    }
+// -----------------------------------------------------------------------------
+// CUpnpServiceSubscriptionHttpTransaction::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceSubscriptionHttpTransaction* CUpnpServiceSubscriptionHttpTransaction::NewLC(
+                                   CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint)
+    {
+    CleanupStack::PushL( aRequest );
+    CUpnpServiceSubscriptionHttpTransaction* self = 
+        new (ELeave)CUpnpServiceSubscriptionHttpTransaction( aRequest, aControlPoint );
+    CleanupStack::Pop( aRequest );
+    CleanupStack::PushL( self );
+    self->BaseConstructL( );
+    return self;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpServiceSubscriptionHttpTransaction::ProcessResponseL
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceSubscriptionHttpTransaction::ProcessResponseL()
+    {
+    CUpnpHttpMessage* msg = Response();
+    msg->SetSessionId( iServiceSessionId );
+    iControlPoint.SubscriptionResponseReceivedL( *msg );
+    }
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpserviceunsubscriptionhttptransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+/** @file
+* 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:  Declaration of CUpnpServiceUnsubscriptionHttpTransaction
+*
+*/
+
+#include "upnpserviceunsubscriptionhttptransaction.h"
+#include "upnpcontrolpoint.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceUnsubscriptionHttpTransaction::CUpnpServiceUnsubscriptionHttpTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceUnsubscriptionHttpTransaction::CUpnpServiceUnsubscriptionHttpTransaction(
+    CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint) :
+    CUpnpHttpTransaction( aRequest ), iControlPoint( aControlPoint )
+    {
+    // No implementation required
+    }
+// -----------------------------------------------------------------------------
+// CUpnpServiceUnsubscriptionHttpTransaction::~CUpnpServiceUnsubscriptionHttpTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceUnsubscriptionHttpTransaction::~CUpnpServiceUnsubscriptionHttpTransaction()
+    {
+    }
+// -----------------------------------------------------------------------------
+// CUpnpServiceUnsubscriptionHttpTransaction::NewLC
+// Two-phased constructor 
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceUnsubscriptionHttpTransaction* CUpnpServiceUnsubscriptionHttpTransaction::NewLC(
+                                CUpnpHttpMessage* aRequest, CUpnpControlPoint& aControlPoint)
+    {
+    CleanupStack::PushL( aRequest );
+    CUpnpServiceUnsubscriptionHttpTransaction* self = 
+            new (ELeave)CUpnpServiceUnsubscriptionHttpTransaction( aRequest, aControlPoint );
+        CleanupStack::Pop( aRequest );
+        CleanupStack::PushL( self );
+        self->BaseConstructL( );
+        return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceUnsubscriptionHttpTransaction::ProcessResponseL
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceUnsubscriptionHttpTransaction::ProcessResponseL()
+    {
+    iControlPoint.UnSubscriptionResponseReceived();
+    }
+
+//end of file    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/controlpointbase/src/upnpsoapactionhttptransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+/** @file
+* 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:  Definition of CUpnpSoapActionHttpTransaction
+*
+*/
+
+#include "upnpaction.h"
+#include "upnpsoapactionhttptransaction.h"
+#include "upnpcontrolpoint.h"
+
+
+// ----------------------------------------------------------------------------
+// CUpnpSoapActionHttpTransaction::~CUpnpSoapActionHttpTransaction
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpSoapActionHttpTransaction::~CUpnpSoapActionHttpTransaction( )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpSoapActionHttpTransaction::NewLC
+// Two-phased constructor, that takes ownership of a message and guarantee it's
+// destruction even when leave ocures.
+// Caller shouldn't place aMsg on cleanupstack before method call
+// ----------------------------------------------------------------------------
+//
+CUpnpSoapActionHttpTransaction* CUpnpSoapActionHttpTransaction::NewLC(
+    CUpnpHttpMessage* aRequest, TInt aActionId, CUpnpControlPoint& aControlPoint )
+    {
+    CleanupStack::PushL( aRequest );
+    CUpnpSoapActionHttpTransaction* self =
+        new (ELeave) CUpnpSoapActionHttpTransaction( aRequest, aActionId, aControlPoint );
+    CleanupStack::Pop( aRequest );//now msg is safe it will be deleted from destructor
+    CleanupStack::PushL( self );
+    self->BaseConstructL();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpSoapActionHttpTransaction::CUpnpSoapActionHttpTransaction
+// Constructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpSoapActionHttpTransaction::CUpnpSoapActionHttpTransaction(
+    CUpnpHttpMessage* aRequest, TInt aActionId, CUpnpControlPoint& aControlPoint) :
+    CUpnpHttpTransaction( aRequest ), iActionId( aActionId ), iControlPoint( aControlPoint )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpSoapActionHttpTransaction::ProcessResponseL()
+// Processes response by passing it to control point.
+// ----------------------------------------------------------------------------
+//
+void CUpnpSoapActionHttpTransaction::ProcessResponseL()
+    {
+    Response()->SetSessionId( iActionId );
+    iControlPoint.ProcessActionMessageL( Response() );
+    }
+
+//  End of File
+
Binary file upnp/upnpstack/data/homemedia.sis has changed
Binary file upnp/upnpstack/data/upnpstack.sis has changed
Binary file upnp/upnpstack/data/upnpstack_withRADA.SIS has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/data/upnpstack_withRADA.pkg	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,53 @@
+; @file
+; 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:
+;
+; upnpstack.pkg
+;
+
+
+;Language - standard language definitions
+&EN
+
+; SIS file header
+#{"upnpstack"},(0x10204165),0,1,0
+
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;Supports Series 60
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+
+
+; reference files
+
+
+; test suite
+"" - "z:\Sys\Bin\upnpipserversutils.dll"
+"" - "z:\Sys\Bin\dlnawebserver.dll"
+"" - "z:\Sys\Bin\upnpserviceframework.dll"
+"" - "z:\Sys\Bin\ssdpserver.dll"
+"" - "z:\Sys\Bin\messagehandler.exe"
+"" - "z:\Sys\Bin\upnpcontrolpointbase.dll"
+"" - "z:\Sys\Bin\radasynchandler.exe"
+"" - "z:\Sys\Bin\radaclient.dll"
+"" - "z:\Sys\Bin\httptransfer.dll"
+
+"" - "z:\private\10282C65\public\RadaSync1\RadaSyncService1.xml"
+"" - "z:\private\10282C65\public\RadaSync1\RadaSync1.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/BWINS/DLNAwebserveru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,29 @@
+EXPORTS
+	?NewL@CUpnpHttpServerSession@@SAPAV1@IAAVMUpnpHttpServerObserver@@@Z @ 1 NONAME ; class CUpnpHttpServerSession * CUpnpHttpServerSession::NewL(unsigned int, class MUpnpHttpServerObserver &)
+	?Stop@CUpnpHttpServerSession@@QAEXXZ @ 2 NONAME ; void CUpnpHttpServerSession::Stop(void)
+	__E32Dll @ 3 NONAME ABSENT ; class TDesC8 const & CUpnpHttpServerTransaction::QueryRequestHeader(void)
+	__E32Dll @ 4 NONAME ABSENT ; class TDesC8 & CUpnpHttpServerTransaction::QueryHeader(class TDesC8 const &)
+	__E32Dll @ 5 NONAME ABSENT ; void CUpnpHttpServerTransaction::AddLineFeedToHeaderL(void)
+	?StopIPFiltering@CUpnpHttpServer@@QAEXXZ @ 6 NONAME ; void CUpnpHttpServer::StopIPFiltering(void)
+	__E32Dll @ 7 NONAME ABSENT ; void CUpnpHttpServerTransaction::CreateStartOfHeaderL(class TDesC8 const &)
+	??0CUpnpHttpServerTransaction@@IAE@XZ @ 8 NONAME ; CUpnpHttpServerTransaction::CUpnpHttpServerTransaction(void)
+	?SetDataSourceL@CUpnpHttpServerTransaction@@IAEXAAVRFile@@@Z @ 9 NONAME ; void CUpnpHttpServerTransaction::SetDataSourceL(class RFile &)
+	??1CUpnpHttpServerTransaction@@UAE@XZ @ 10 NONAME ; CUpnpHttpServerTransaction::~CUpnpHttpServerTransaction(void)
+	?StartIPFilteringL@CUpnpHttpServer@@QAEXXZ @ 11 NONAME ; void CUpnpHttpServer::StartIPFilteringL(void)
+	?DefaultRuntime@CUpnpHttpServerSession@@QAEAAVCUpnpHttpServerRuntime@@XZ @ 12 NONAME ; class CUpnpHttpServerRuntime & CUpnpHttpServerSession::DefaultRuntime(void)
+	?SetDataSinkL@CUpnpHttpServerTransaction@@IAEXAAVRFile@@@Z @ 13 NONAME ; void CUpnpHttpServerTransaction::SetDataSinkL(class RFile &)
+	__E32Dll @ 14 NONAME ABSENT ; int CUpnpHttpServerTransaction::HeaderExists(class TDesC8 const &)
+	?GetAddress@CUpnpHttpServerSession@@QAEXAAVTInetAddr@@@Z @ 15 NONAME ; void CUpnpHttpServerSession::GetAddress(class TInetAddr &)
+	?SetCreator@CUpnpHttpServerRuntime@@QAEXAAVMUpnpHttpServerTransactionCreator@@@Z @ 16 NONAME ; void CUpnpHttpServerRuntime::SetCreator(class MUpnpHttpServerTransactionCreator &)
+	?Error@CUpnpHttpServerTransaction@@QAEHXZ @ 17 NONAME ; int CUpnpHttpServerTransaction::Error(void)
+	__E32Dll @ 18 NONAME ABSENT ; void CUpnpHttpServerTransaction::SetError(int)
+	?HWAddressL@CUpnpHttpServerSession@@QAEPAVTSockAddr@@XZ @ 19 NONAME ; class TSockAddr * CUpnpHttpServerSession::HWAddressL(void)
+	?SendMessageL@CUpnpHttpServerSession@@QAEHPAVCUpnpHttpMessage@@@Z @ 20 NONAME ; int CUpnpHttpServerSession::SendMessageL(class CUpnpHttpMessage *)
+	?AddResponseHeaderL@CUpnpHttpServerTransaction@@QAEXABVTDesC8@@0@Z @ 21 NONAME ; void CUpnpHttpServerTransaction::AddResponseHeaderL(class TDesC8 const &, class TDesC8 const &)
+	?StartL@CUpnpHttpServerSession@@QAEXH@Z @ 22 NONAME ; void CUpnpHttpServerSession::StartL(int)
+	?SetRequest@CUpnpHttpServerTransaction@@QAEXPAVCUpnpHttpMessage@@@Z @ 23 NONAME ; void CUpnpHttpServerTransaction::SetRequest(class CUpnpHttpMessage *)
+	?SetHttpCode@CUpnpHttpServerTransaction@@IAEXH@Z @ 24 NONAME ; void CUpnpHttpServerTransaction::SetHttpCode(int)
+	?QueryRequestHeader@CUpnpHttpServerTransaction@@QAEAAVTDesC8@@ABV2@@Z @ 25 NONAME ; class TDesC8 & CUpnpHttpServerTransaction::QueryRequestHeader(class TDesC8 const &)
+	__E32Dll @ 26 NONAME ABSENT ; class TDesC8 const & CUpnpHttpServerTransaction::QueryResponsetHeader(void)
+	?QueryResponseHeader@CUpnpHttpServerTransaction@@QAEABVTDesC8@@XZ @ 27 NONAME ; class TDesC8 const & CUpnpHttpServerTransaction::QueryResponseHeader(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/eabi/DLNAwebserveru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,26 @@
+EXPORTS
+	_ZN15CUpnpHttpServer15StopIPFilteringEv @ 1 NONAME
+	_ZN15CUpnpHttpServer17StartIPFilteringLEv @ 2 NONAME
+	_ZN22CUpnpHttpServerRuntime10SetCreatorER33MUpnpHttpServerTransactionCreator @ 3 NONAME
+	_ZN22CUpnpHttpServerSession10GetAddressER9TInetAddr @ 4 NONAME
+	_ZN22CUpnpHttpServerSession10HWAddressLEv @ 5 NONAME
+	_ZN22CUpnpHttpServerSession12SendMessageLEP16CUpnpHttpMessage @ 6 NONAME
+	_ZN22CUpnpHttpServerSession14DefaultRuntimeEv @ 7 NONAME
+	_ZN22CUpnpHttpServerSession4NewLEjR23MUpnpHttpServerObserver @ 8 NONAME
+	_ZN22CUpnpHttpServerSession4StopEv @ 9 NONAME
+	_ZN22CUpnpHttpServerSession6StartLEi @ 10 NONAME
+	_ZN26CUpnpHttpServerTransaction10SetRequestEP16CUpnpHttpMessage @ 11 NONAME
+	_ZN26CUpnpHttpServerTransaction11SetHttpCodeEi @ 12 NONAME
+	_ZN26CUpnpHttpServerTransaction12SetDataSinkLER5RFile @ 13 NONAME
+	_ZN26CUpnpHttpServerTransaction14SetDataSourceLER5RFile @ 14 NONAME
+	_ZN26CUpnpHttpServerTransaction18AddResponseHeaderLERK6TDesC8S2_ @ 15 NONAME
+	_ZN26CUpnpHttpServerTransaction18QueryRequestHeaderERK6TDesC8 @ 16 NONAME
+	_ZN26CUpnpHttpServerTransaction19QueryResponseHeaderEv @ 17 NONAME
+	_ZN26CUpnpHttpServerTransaction5ErrorEv @ 18 NONAME
+	_ZN26CUpnpHttpServerTransactionC2Ev @ 19 NONAME
+	_ZN26CUpnpHttpServerTransactionD0Ev @ 20 NONAME
+	_ZN26CUpnpHttpServerTransactionD1Ev @ 21 NONAME
+	_ZN26CUpnpHttpServerTransactionD2Ev @ 22 NONAME
+	_ZTI26CUpnpHttpServerTransaction @ 23 NONAME ; #<TI>#
+	_ZTV26CUpnpHttpServerTransaction @ 24 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+/** @file
+* 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:  Build info for the DLNAwebserver component
+*
+*/
+
+PRJ_EXPORTS
+../inc/upnphttpserver.h |../../inc/upnphttpserver.h
+../inc/upnptcpserver.h |../../inc/upnptcpserver.h
+../inc/upnphttpfileaccess.h |../../inc/upnphttpfileaccess.h
+
+
+PRJ_MMPFILES
+dlnawebserver.mmp
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/group/dlnawebserver.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,100 @@
+/** @file
+* 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: 
+*     This is the project specification file for Upnp.
+*
+*/
+
+#include "../../../inc/upnpcompvariant.hrh"
+#include <data_caging_paths.hrh>
+
+TARGETTYPE          DLL
+
+#if defined(__HN_31__) || defined(__HN_32__)
+TARGET                  hndlnawebserver.dll
+UID                     0x1000008d 0x2000F884
+#else
+TARGET                  dlnawebserver.dll
+UID                     0x1000008d 0x10204165
+#endif
+
+LANG                    SC
+CAPABILITY              CAP_GENERAL_DLL
+VENDORID                VID_DEFAULT
+
+
+SOURCEPATH          ../src
+SOURCE              upnphttpbuffer.cpp
+SOURCE              upnphttpsession.cpp
+SOURCE              upnphttpserver.cpp
+SOURCE              upnptcpserver.cpp
+SOURCE              upnptcpsession.cpp
+SOURCE              upnptcpsessionreader.cpp
+SOURCE              upnptcpsessionwriter.cpp
+SOURCE              upnphttpfiletransferwriter.cpp
+SOURCE              upnphttpfileaccess.cpp
+SOURCE              upnphttpfiletransferreader.cpp
+SOURCE              upnphttpchunkfiletransferreader.cpp
+SOURCE              upnphttpchunkparser.cpp
+SOURCE              upnpretrywrite.cpp
+SOURCE              upnpsocketshutdown.cpp
+SOURCE              upnprangeheaderparser.cpp
+SOURCE              upnphttpservertransaction.cpp 
+SOURCE              upnphttpserversession.cpp 
+SOURCE              upnphttpserverruntime.cpp
+
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   ../../../inc
+SYSTEMINCLUDE   ../../inc
+USERINCLUDE     ../inc
+
+
+LIBRARY                    euser.lib 
+LIBRARY                    esock.lib
+LIBRARY                    insock.lib
+LIBRARY                    commdb.lib 
+LIBRARY                    efsrv.lib 
+LIBRARY                    bafl.lib 
+LIBRARY                    apgrfx.lib
+LIBRARY                    apmime.lib
+#if defined(__HN_31__) || defined(__HN_32__)
+LIBRARY                    hnipserversutils.lib
+LIBRARY                    hnserviceframework.lib
+#ifdef RD_UPNP_REMOTE_ACCESS 
+LIBRARY                    hnradaclient.lib
+#endif
+#else
+LIBRARY                    upnpipserversutils.lib
+LIBRARY                    upnpserviceframework.lib
+LIBRARY                    upnpconnectionmanagersession.lib
+
+#ifdef RD_UPNP_REMOTE_ACCESS 
+LIBRARY                    radaclient.lib
+#endif
+#endif
+
+
+//Max file size related libs
+LIBRARY                    commonui.lib
+
+LIBRARY                    flogger.lib
+DEFFILE                    DLNAwebserver
+//end of file
+
+VERSION 10.1
+
+paged
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnphttpbuffer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,274 @@
+/** @file
+* 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:  HTTPBuffer is used to buffer incoming HTTP messages.
+*
+*/
+
+
+#ifndef C_CUPNPHTTPBUFFER_H
+#define C_CUPNPHTTPBUFFER_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnplist.h"
+#include "upnphttpmessage.h"
+
+// FORWARD DECLARATIONS
+class CUpnpHttpSession;
+class CUpnpHttpFileAccess;
+class CUpnpHttpChunkParser;
+
+// CONSTANTS
+
+// CLASS DECLARATION
+
+/**
+*  @brief HTTPBuffer is used to buffer incoming HTTP messages.
+*  @since Series60 2.6
+*/
+NONSHARABLE_CLASS (CUpnpHttpBuffer) : public CBase
+		{
+public: // Constructor and destructor
+    /**
+    * Constructor function.
+    * @since Series60 2.6
+    * @param aSession Pointer to session that owns this buffer.
+    * @param aToBeSavedInFile ETrue, if incoming content should be saved 
+    *        in a file, EFalse otherwise.
+    * @return A new CUpnpHttpBuffer instance
+    **/
+    static CUpnpHttpBuffer* NewL( CUpnpHttpSession* aSession,TBool aToBeSavedInFile );
+
+    /**
+    * Virtual destructor function.
+    **/
+    virtual ~CUpnpHttpBuffer();
+
+public: // New funtions
+
+    /**
+    * This function appends the aBuffer data at the end of this HTTPBuffer.
+    * @since Series60 2.6
+    * @param aBuffer Buffer to append after current data.
+    * @param aToBeSavedInFile.
+    **/
+
+    TInt AppendL( TDesC8& aBuffer, TBool aToBeSavedInFile );
+    /**
+    * This function appends only headers from the aBuffer at the end of this HTTPBuffer.
+    * @since Series60 2.6
+    * @param aBuffer Buffer to append after current data.
+    * @param aToBeSavedInFile.
+    * @return position of double line feed
+    **/
+    TInt AppendHeadersL( TDesC8& aBuffer, TBool aToBeSavedInFile );
+
+    /**
+    * Decodes chunked messages.
+    * @since Series60 2.6
+    **/		
+    TInt ParseL( TDesC8& aBuffer );
+
+    /**
+    * Returns ETrue, if buffer is ready to be converted to HTTPMessage,
+    * else returns EFalse.
+    * @since Series60 2.6
+    * @return ETrue, if message is ready; EFalse otherwise.
+    **/
+    TBool IsReadyL();
+
+    /**
+    * Returns ETrue, if header part of HTTPMessage is ready, else returns
+    * EFalse.
+    * @since Series60 2.6
+    * @return ETrue, if header ready; EFalse otherwise.
+    **/
+    TBool IsHeaderReady();
+
+    /**
+    * Returns ETrue, if body part of HTTPMessage is ready, else returns EFalse.
+    * @since Series60 2.6
+    * @return ETrue, if body ready; EFalse otherwise.
+    **/
+    TBool IsBodyReadyL();
+
+    /**
+    * Returns the length of entire buffer.
+    * @since Series60 2.6
+    * @return Length of buffer.
+    **/
+    TInt BytesInBuffer();
+
+    /**
+    * This function deletes aLength bytes from the beginning of HTTPBuffer.
+    * @since Series60 2.6
+    * @param aLength Number of bytes to remove.
+    **/
+    void RemoveL( TInt aLength );
+
+    /**
+    * Returns ETrue, if chunk encoded message is finished.
+    * @since Series60 2.6
+    * @return ETrue, if message is ready; EFalse otherwise.
+    */	
+    TBool ChunkTransferFinished();
+
+    /**
+    * Returns ETrue, if message has body, else returns EFalse.
+    * @since Series60 2.6
+    * @return ETrue, if message has body; EFalse otherwise.
+    **/
+    TBool HasBody();
+
+    /**
+    * Returns ETrue, if message's header contains 
+    *	 "Transfer-encoding: Chunked" header.
+    * @since Series60 2.6
+    * @return ETrue, if message's header contains 
+    *  "Transfer-encoding: Chunked" -header; EFalse otherwise.
+    **/	
+    TBool IsChunked();
+
+    /**
+    * Returns Headers of the first message in the buffer.
+    * @since Series60 2.6
+    * @return Message headers.
+    **/
+    TPtrC8 Headers();
+
+    /**
+    * Returns the content of buffer.
+    * @since Series60 2.6
+    * @return Message body.
+    **/
+    TPtrC8 Content();
+
+    /**
+    * Returns the content length of first message in the buffer.
+    * @since Series60 2.6
+    * @return Length of message.
+    * @leave KErrOverflow if Content-Length > 2^32
+    **/		
+    TInt ContentLengthL();
+
+    /**
+    * Returns ETrue, if message's header contains "Connection: close" -header.
+    * @since Series60 2.6
+    * @return ETrue, if message's header contains "Connection: close" -header;
+    *         EFalse otherwise.
+    **/	
+    TBool UsesConnectionClose();
+
+    /**
+    * Returns the error code of message in buffer.
+    * @param aBuffer Buffer to check the error code (buffer that contains the)
+    * HTTP message).
+    * @since Series60 2.6
+    **/	
+    TInt MessageErrorCode( TDesC8& aBuffer );
+
+    /**
+    * Returns the method (GET, POST ...) of message in buffer.
+    * @since Series60 2.6
+    **/	
+    TPtrC8 Method();
+
+    /**
+    * Returns the method target of message in buffer.
+    * Target in this context means the url of message (like in GET / HTTP/1.1 the middle part)
+    * @since Series60 2.6
+    **/	
+    TPtrC8 Target();
+    
+    /**
+    * Returns True if message content is going to be saved in file.
+    * @since Series60 2.6
+    * @return ETrue if message content will be saved in file, EFalse if not.
+    */
+    TBool IsToFile();
+    
+    /**
+    * Sets if body of message contained in buffer should be saved in file.
+    * @since Series60 2.6
+    * @param aToFile - should message content be saved in file.
+    */
+    void SetToFile( TBool aToFile );
+    
+
+private: // Constructors
+
+    /**
+    * First phase constructor.
+    * @param aSession Handle to session that owns CUpnpHttpBuffer instance.
+    * @param aToBeSaveInFile Should content be saved to the file.
+    **/
+    CUpnpHttpBuffer( CUpnpHttpSession* aSession, TBool aToBeSavedInFile );
+
+    /**
+    * By default Symbian 2nd phase constructor is private
+    */
+    void ConstructL();
+
+    /**
+     * Parse - decodes chunked-encoding     
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return error code
+     */
+    TInt Parse( TDes8& aBuffer, TInt& aPos );
+    
+protected: 
+
+    // Buffer that contains the messages, owned
+    RBuf8 iBuffer;
+
+    // ETrue if message has content-type -header, EFalse otherwise, owned
+    TBool iHasContentType;
+
+    // ETrue, if content of message should be saved to a file; EFalse otherwise, owned
+    TBool iToFile;
+
+    // Pointer to the session that owns this CUpnpHttpFileAccess, owned
+    CUpnpHttpSession* iSession;
+
+    // If message is not chunked, contains the current length of message, owned
+    TInt iContentLengthCounter;
+
+    // If message is not chunked, contains the total length of message given
+    // in Content-Length -header, owned
+    TInt iContentLength;
+
+    // Checking that responses with error codes ( = error code not 200)        
+    // are not saved to files.
+    TBool iErrorCodeCheckedForSaving;
+    
+    // ETrue, if it is allowed to save given buffer to file
+    // EFalse if it is not allowed (HTTP error other than 200).
+    TBool iOkToSaveToFile;
+    
+    TInt iFileReadBufferSize;
+    
+    // Position in buffer    
+    TInt iPos;
+    
+    // Chunk parser
+    CUpnpHttpChunkParser *iChunkParser;
+	};
+
+#endif // C_CUPNPHTTPBUFFER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnphttpchunkfiletransferreader.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,183 @@
+/** @file
+* 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:  CUpnpHttpChunkFileTransferReader is a class responsible for 
+*                asynchronous TCP reading and controlling the encoded data
+*
+*/
+
+
+
+#ifndef C_CUPNPHTTPCHUNKFILETRANSFERREADER_H
+#define C_CUPNPHTTPCHUNKFILETRANSFERREADER_H
+
+
+#include <e32base.h>
+#include <in_sock.h>
+#include <f32file.h>
+
+
+class CUpnpTcpSession;
+class CUpnpHttpFileTransferBuffer;
+class CUpnpHttpFileAccess;
+class CUpnpHttpFileTransferReader;
+class CUpnpHttpChunkParser;
+
+/**
+ *  CUpnpHttpChunkFileTransferReader is responsible for asynchronous reading.
+ *  It reads chunked-encoded data and process it  
+ *  @lib DLNAWebServer.lib
+ *  @since Series60 3.2
+ */
+NONSHARABLE_CLASS (CUpnpHttpChunkFileTransferReader) : public CUpnpHttpFileTransferReader
+    {
+
+public: // Constructors and destructors
+    
+    /**
+    * CUpnpHttpChunkFileTransferReader factory method.
+    * @since Series60 3.2
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    * @param aReadPortion - size of the buffer to read from the socket
+    * @param aBufferSize - the buffer size
+    * @return new CUpnpHttpChunkFileTransferReader object's instance.
+    */
+    static CUpnpHttpChunkFileTransferReader* NewL( CUpnpTcpSession& aSession,
+                                        RSocket& aSocket,
+                                        TThreadPriority aPriority,                                        
+                                        TInt aReadPortion,
+                                        TInt aBufferSize);
+    
+    /**
+    * Virtual destructor.
+    * @since Series60 3.2
+    */                             
+    virtual ~CUpnpHttpChunkFileTransferReader();             
+     
+
+private: // Constructors and destructors
+
+    /**
+    * CUpnpHttpChunkFileTransferReader constructor.
+    * @since Series60 3.2
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    * @param aHandle handle for logging for this thread.
+    * @param aPriority priority with which the reader will be working.
+    * @param aReadPortion - size of the buffer to read from the socket
+    * @param aBufferSize - the buffer size
+    */
+    CUpnpHttpChunkFileTransferReader( CUpnpTcpSession& aSession,
+                           RSocket& aSocket,
+                           TThreadPriority aPriority,
+                           TInt aReadPortion,
+                           TInt aBufferSize);
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @since Series60 3.2
+    */
+    void ConstructL();
+    
+    /**
+    * Remaing number of bytes to read.
+    * @since Series60 3.2    
+    * @return TInt
+    */
+    TInt RemainingBytes();
+    
+    /**
+    * Starts reading in asynchronous mode.
+    * @since Series60 3.2
+    */
+    void StartL();   
+
+private:
+
+    /**
+    * Issues reading in asynchronous mode.
+    * @since Series60 3.2
+    */
+    void RunL();
+    
+    /**
+    * Invoked when RunL leaves.
+    */
+    TInt RunError( TInt aErr );
+    
+    /**
+     * Parse - decodes chunked-encoding     
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return error code
+     */
+    TInt Parse( TDes8& aBuffer, TInt& aPos );
+   
+protected:
+
+	/**
+    * Bytes to be read from the socket
+    * @since Series60 3.2    
+    * @return TInt
+    */
+    TInt ReadBufferSize();   
+    
+    /**
+    * Handle buffer of data
+    * @since Series60 3.2    
+    * @return TBool if all data handled
+    */
+    TBool HandleL();   
+    
+    /**
+    * Finish the session
+    * @since Series60 3.2
+    */
+    void Finish();  
+    
+    
+    /**
+    * Reads from socket
+    * @since Series60 3.2    
+    */
+    void ReadFromSocket();
+    
+    /**
+    * Resets the reader
+    * @since Series60 3.2    
+    */
+    void Reset();
+
+    /**
+    * Handles read data - trims the buffer and save data to file
+    * @since Series60 5.0
+    * @return TInt 
+    */
+    TInt HandleReadDataL( TInt aPieceToRead );
+                      
+private: 
+
+	//parser for chunked-encoding
+    CUpnpHttpChunkParser* iParser;
+
+    //decoded data
+    TInt iDecoded;    
+    };
+
+
+#endif // C_CUPNPHTTPCHUNKFILETRANSFERREADER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnphttpchunkparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,183 @@
+/** @file
+* 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:  Parses chunked-encoding content.
+*
+*/
+
+
+#ifndef C_CUPNPHTTPCHUNKPARSER_H
+#define C_CUPNPHTTPCHUNKPARSER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <f32file.h>
+
+// FORWARD DECLARATIONS
+
+// CONSTANTS
+
+/**
+ *  CUpnpHttpChunkParser:
+ *	Parses chunked-encoding content.
+ *  @lib dlnawebserver.lib
+ *  @since S60 3.2
+ */
+NONSHARABLE_CLASS (CUpnpHttpChunkParser) : public CBase
+		{
+public: 
+	//possible values of the context
+    enum TChunkContext
+        {
+        EUnknown=0,
+        EHeader,        
+        EBody,
+        ELastChunk,
+        EExtension,
+        ETrailer,
+        EEndChunkBody,
+        EError,
+        EFinish,
+        };
+
+
+	// Constructor and destructor
+    /**
+    * Constructor function.
+    * @since Series60 3.2 
+    * @return A new CUpnpHttpChunkParser instance
+    **/
+    static CUpnpHttpChunkParser* NewL();
+
+    /**
+    * Virtual destructor function.
+    * @since Series60 3.2 
+    **/
+    virtual ~CUpnpHttpChunkParser();
+    
+     /**
+     * Parse - decodes chunked-encoding     
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return error code
+     */
+    TInt Parse(TDes8& aBuffer,TInt& aPos);
+    
+    /**
+     * SetErrorState - set error state
+     * @since S60 3.2          
+     */
+    void SetErrorState();
+
+	/**
+     * IsFinished - if decoding finished    
+     * @since S60 3.2     
+     * @return TBool
+     */	
+	TBool IsFinished();
+		
+	/**
+     * Reset - resets parser for new decoding
+     * @since S60 3.2          
+     */
+	void Reset();
+
+
+  
+protected: // Constructors
+
+    /**
+    * First phase constructor.
+    * @param aSession Handle to session that owns CUpnpChunkFileTransferBuffer instance.
+    * @param aToBeSaveInFile Should content be saved to the file.
+    **/
+    CUpnpHttpChunkParser();
+
+    /**
+    * By default Symbian 2nd phase constructor is private
+    */
+    void ConstructL();
+	   
+private:
+
+   	/**
+     * ParseBody - decodes chunk-body     
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return ETrue if all data parsed
+     */
+    TBool ParseBody(TDes8& aBuffer,TInt& aPos);
+    
+    /**
+     * ParseHeader - decodes chunk-header    
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return ETrue if all data parsed
+     */
+    TBool ParseHeader(TDes8& aBuffer,TInt& aPos);
+    
+    /**
+     * ParseExtension - decodes chunk-extension     
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return ETrue if all data parsed
+     */
+    TBool ParseExtension(TDes8& aBuffer,TInt& aPos);
+    
+    /**
+     * ParseTrailer - decodes chunk-trailer    
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return ETrue if all data parsed
+     */
+    TBool ParseTrailer(TDes8& aBuffer,TInt& aPos);
+    
+    /**
+     * ParseLastChunk - decodes last chunk     
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return ETrue if all data parsed
+     */
+    TBool ParseLastChunk(TDes8& aBuffer,TInt& aPos);
+    
+    /**
+     * IsEmpty - checks if any data left     
+     * @since S60 3.2
+     * @param buffer
+     * @param position in the buffer
+     * @return ETrue if no data left
+     */
+    TBool IsEmpty(TDes8& aBuffer,TInt aPos);        
+    
+protected: 
+	
+    //Context of the parser
+    TChunkContext iContext;
+    //size of the current chunk
+    TInt iChunkSize;
+	//error in parsing    
+    TInt iError;
+    //already appended bytes of the current chunk
+    TInt iBytesAppended;        
+    
+	};
+
+#endif // C_CUPNPHTTPCHUNKPARSER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnphttpfileaccess.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,333 @@
+/** @file
+* 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:  UpnpHttpFileAccess is a class responsible for serving 
+*                requested files to upload as well as for saving file that are 
+*                being downladed.
+*
+*/
+
+
+#ifndef C_CUPNPHTTPFILEACCESS_H
+#define C_CUPNPHTTPFILEACCESS_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <f32file.h>
+
+// FORWARD DECLARATIONS
+class CUpnpHttpSession;
+  
+// CLASS DECLARATION
+
+/**
+*  @brief CUpnpHttpFileAccess is used to send and receive files in Httpserver
+*  and Httpsession.
+*  @since Series60 2.6
+*/
+NONSHARABLE_CLASS (CUpnpHttpFileAccess) : public CBase
+		{
+public: // Constructors and destructor
+
+    /**
+    * Constructor function. This constructor is used when file is served by
+    *  HttpServer.
+    * @since Series60 2.6
+    * @param aSession Pointer to owning session of this CUpnpHttpFileAccess.
+    * @param aHeaderBuffer Buffer that contains the headers of message to 
+    *  be served.
+    * @param aFilename Name of file to be served.
+    * @param aFileSize Size of file to be served.
+    * @return A new CUpnpHttpFileAccess instance.
+    **/
+    static CUpnpHttpFileAccess* NewL( CUpnpHttpSession* aSession, 
+                                          		const TDesC8& aHeaderBuffer, 
+		                                        const TDesC16& aFilename, 
+		                                          TInt aFileSize );
+
+    /**
+    * Constructor function. This constructor is used when file is to be received.
+    * @since Series60 2.6
+    * @param aSession Pointer to owning session of this CUpnpHttpFileAccess.
+    * @param aFilename Name of file to be saved locally.
+    * @param aHandle the thread log handle.
+    * @return A new CUpnpHttpFileAccess instance.
+    **/
+    static CUpnpHttpFileAccess* NewL( CUpnpHttpSession* aSession, 
+		                                          const TDesC16& aFilename );
+
+    /**
+    * Virtual Destructor function.
+    **/
+    ~CUpnpHttpFileAccess();
+
+public: // New functions
+
+    /**
+    * Returns the number of bytes that has been transferred
+    * @since Series60 2.6
+    * @return Number of bytes that has been transferred.
+    **/ 
+    TInt TransferredBytes();
+
+    /**
+    * Returns the number of bytes that is to be transferred, ie size of file.
+    * @since Series60 2.6
+    * @return Number of bytes to be transferred.
+    **/ 
+    TInt TransferTotal();
+    /**
+    * Sets the reading position of the file.
+    * @since Series60 2.6
+    * @param aNewPos Position of reading, counting from start of file.
+    **/
+    void SetPosOfFile( TUint aNewPos );
+
+    /**
+    * Returns the reading position of the file.
+    * @since Series60 2.6
+    * @return Position of reading, counting from start of file.
+    **/
+    TUint PosOfFile();
+
+		/**
+    * Sets the offset of the local file at which should be downloaded content saved.
+    * @since Series60 2.6
+    * @param aNewPos Offset of the local file from the start of the file.
+    **/
+    void SetOffset( TUint aOffset );
+
+   	/**
+    * Sets the position where to stop reading the file.
+    * @since Series60 2.6
+    * @param aNewPos position where to stop reading the file, counting from start of file.
+    **/
+    void SetEndPosOfFile( TInt aNewEndPos );
+
+    /**
+    * Returns the position where to stop reading the file.
+    * @since Series60 2.6
+    * @return position where to stop reading the file, counting from start of file.
+    **/
+    TInt EndPosOfFile();
+
+    /**
+    * Sets the reading position of the headerbuffer.
+    * @since Series60 2.6
+    * @param aNewPos Position of reading, counting from start of headerbuffer.
+    */  
+    void SetPosOfHeader( TUint aNewPos );
+
+    /**
+    * Returns the filename of the served file.
+    * @since Series60 2.6
+    * @return Name of file.
+    **/ 
+    TDesC16& FileToServe();
+
+       
+    /**
+    * Gets bytes to be sent
+    * @since Series60 3.2
+    * @param aPointer to write the read content
+    * @param aBytesToSend Number of bytes to send.
+    * @return ETrue, if transfer is finished; EFalse otherwise.
+    **/   
+    TBool GetL( TPtr8& aPointer, TInt aBytesToSend );
+
+	/**
+    * Saves aBuffer at the end of file used in this CUpnpHttpFileAccess.
+    * @since Series60 3.2
+    * @param aBuffer Content to save (append) to file.
+    * @return error code
+    **/ 
+    TInt SaveL( TDesC8& aBuffer );
+
+    /**
+    * Sets the total size of file transfer (FileSize). 
+    * @since Series60 2.6
+    **/ 
+    void SetTotalSize( TInt aSizeToSet );
+
+    /**
+    * Deletes file in error cases.
+    * @since Series60 2.6
+    **/ 
+    void DeleteFile();
+    
+    /**
+    * Returnes if currently handled file is downloaded or uploaded.
+    * @since Series60 2.6
+    * @return if currently handled file is downloaded or uploaded.
+    **/
+    TBool Download();
+   
+   /**
+    * Returnes true if currently handled file is not removed.
+    * @since Series60 3.2
+    * @return TRUE if processed file exist.
+    **/
+    TBool FileExist();
+    
+    /**
+    * Returnes the number of bytes written
+    * @since Series60 3.2
+    * @return TInt
+    **/
+    TInt BytesWritten();
+    
+    /**
+    * Sets the encoding mode
+    * @param TBool 
+    * @since Series60 3.2
+    **/
+    void SetEncodingMode(TBool aIsChunked);
+    
+    /**
+    * Returns the encoding mode
+    * @since Series60 3.2
+    * @return ETrue if chunked-encoded    
+    **/
+    TBool EncodingMode();
+    
+    /**
+    * Sets the size of the transfer
+    * @since Series60 3.2
+    * @param TInt
+    **/
+    void SetTransferTotal(TInt aLength);
+    
+	/**
+    * Gets the headers of content to be sent
+    * @since Series60 3.2
+    * @param TInt
+    **/
+    const TDesC8& GetHeaders();    
+    
+    /**
+    * Called after headers were queued to be sent
+    * @since Series60 3.2    
+    **/
+    void SetHeadersSent();  
+    
+    /**
+    * True if HTTP headers sent
+    * @since Series60 3.2    
+    **/
+    TBool HeadersSent();
+
+    /**
+    * True when chunk tranfer completes
+    * @since Series60 3.2    
+    **/
+    void SetChunkCompleted( TBool aCompleted );
+
+private: // Constructors
+
+    /**
+    * First phase constructor. This constructor is used when file is to be 
+    * sent from HttpServer.
+    * @since Series60 2.6
+    * @param aFileSize Size of file to be served.
+    **/
+    CUpnpHttpFileAccess( TInt aFileSize );
+
+    /**
+    * First phase constructor. This constructor is used when file is to 
+    * be received.
+    * @since Series60 2.6
+    **/
+    CUpnpHttpFileAccess();
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @param aSession handle to parent session that owns this object.
+    * @param aHeaderBuffer descriptor with message headers.
+    * @param aFileName file name of the file to serve.
+    */
+    void ConstructL( CUpnpHttpSession* aSession, 
+    								 const TDesC8& aHeaderBuffer, 
+    								 const TDesC16& aFilename );
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @param aSession handle to parent session that owns this object.
+    * @param aFileName file name of the file in which the incoming content is saved.
+    */
+    void ConstructL( CUpnpHttpSession* aSession, const TDesC16& aFilename );
+    
+    /**
+    * Checks if whole file has been read - returns ETrue if yes
+    * Close iTargetFile when returns ETrue
+    */
+    TBool IsEndOfFile();
+
+private: // Data
+
+    // Total Size of downloaded file, owned
+    TInt iTotalSizeOfDownload;
+
+    // Buffer that contains the headers of served message owned
+    HBufC8* iHeaderBuffer;
+
+    // Name of served file, owned
+    HBufC16* iFileToServe;
+
+    // Position to read or write file, owned
+    TInt iPosInFile;
+
+		// Position to stop read file at, owned
+    TInt iEndPosOfFile;
+
+    // Total Size of served file, owned
+    TInt iSizeOfFile;
+
+    // Position to read or write headerbuffer, owned
+    TInt iPosToReadHeader;
+
+    // Length of headers, owned
+    TInt iHeaderLength;
+
+    // Pointer to owning session, owned
+    CUpnpHttpSession* iSession;
+
+    // ETrue, if headers has been sent; EFalse otherwise, owned
+    TBool iHeadersSent;
+
+    // FileServer handle that is used to hold iFile open, owned
+    RFs iFsSession;
+
+    // File handle that is used for downloading and locking the 
+    // active file, owned
+    RFile iFile;
+
+    // Boolean to detect if it is download or upload, owned
+    TBool iIsDownload;
+    
+    RFile iTargetFile;
+    TInt iOpen;
+    HBufC* iOpenedFile;  
+    //bytes already written
+    TInt iBytesWritten;  
+    //if data is chunked
+    TBool iIsChunked;   
+    //if chunk transfer is completed
+    TBool iIsChunkCompleted;   
+    //activated when resource closed and deleted
+    TBool iIsDeleted;
+  };
+
+#endif //C_CUPNPHTTPFILEACCESS_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnphttpfiletransferreader.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,320 @@
+/** @file
+* 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:  CUpnpHttpFileTransferReader is a class responsible for 
+*                   asynchronous reading from socket owned by CUpnpTcpSession.
+*
+*/
+
+
+
+#ifndef C_CUPNPHTTPFILETRANSFERREADER_H
+#define C_CUPNPHTTPFILETRANSFERREADER_H
+
+
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnpnotifytimer.h"
+
+//constants
+static const TInt KMaxRetryErrors = 5;
+static const TInt KRetryWaitTime = 1000000;
+static const TInt KTwoSec = 2000000;
+static const TInt KOneSec = 1000000;
+
+//FORWARD DECLARATIONS
+class CUpnpTcpSession;
+class CUpnpHttpFileTransferBuffer;
+class CUpnpHttpFileAccess;
+
+
+/**
+ *  CUpnpHttpFileTransferReader is responsible for asynchronous reading.
+ *  Reader starta reading in asynchronous mode. Issues reading and then waits 
+ *  for the operation to be completed. When it is completed then received
+ *  data is forwarded to upper layer - CUpnpTcpSession and the new read 
+ *  operation is issues. This continues in loop until the Cancel() is invoked
+ *  or object is destroyed.
+ *  @lib DLNAWebServer.lib
+ *  @since Series60 3.2
+ */
+NONSHARABLE_CLASS (CUpnpHttpFileTransferReader) : public CActive, MUpnpNotifyTimerObserver
+    {
+
+public:
+    
+    /**
+    * CUpnpHttpFileTransferReader factory method.
+    * @since Series60 3.2
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    * @param aReadPortion - size of the buffer to read from the socket
+    * @param aBufferSize - the buffer size
+    * @return new CUpnpHttpFileTransferReader object's instance.
+    */
+    static CUpnpHttpFileTransferReader* NewL( CUpnpTcpSession& aSession,
+                                        RSocket& aSocket,
+                                        TThreadPriority aPriority,                                        
+                                        TInt aReadPortion,
+                                        TInt aBufferSize);
+    
+    /**
+    * Virtual destructor.
+    * @since Series60 3.2
+    */                             
+    virtual ~CUpnpHttpFileTransferReader();
+    
+    /**
+    * Appends first portion of data to the buffer.
+    * @since Series60 3.2
+    */    
+    void AppendL(const TDesC8& aBeginning);
+    
+    /**
+    * Calculates the buffer size as exponent of 2
+    * and proper for read portions
+    * @since Series60 3.2
+    */    
+    static TInt CalculateBufferSize(TInt aReadPortion, TInt aBufferSize);            
+    /**
+    * Starts reading in asynchronous mode.
+    * @since Series60 3.2
+    */
+    virtual void StartL();
+
+    /**
+    * Cancel the timers
+    * @since Series60 3.2
+    */
+    void CancelTimers();
+
+    /**
+    * Resets some member values to start reading data
+    * @since Series60 3.2
+    */
+    
+    virtual void Reset();
+    
+    /**
+    * Checks if the reader is started meaning in use
+    * @since Series60 3.2
+    * @return TBool
+    */
+    TBool Activated();
+     
+    /**
+    * Sets the state of the reader to activated
+    * @since Series60 3.2    
+    * @param state - ETrue/EFalse
+    */
+    void SetActivated(TBool aValue);
+
+  
+
+protected: // Functions from CActive
+   
+    /**
+    * Cancels issued reading request.
+    * Standard active object function
+    * @since Series60 3.2
+    */
+    void DoCancel();
+    
+     /**
+    * Function called when the read request is finished.
+    * Standard active object function
+    * @since Series60 3.2
+    */
+    virtual void RunL();
+    
+    /**
+    * Trap RunL leaves
+    * Standard active object function
+    * @since Series60 3.2
+    */
+    TInt RunError( TInt aError );
+
+	// Constructors and destructors
+
+    /**
+    * CUpnpHttpFileTransferReader constructor.
+    * @since Series60 3.2
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    * @param aReadPortion - size of the buffer to read from the socket
+    * @param aBufferSize - the buffer size
+    */
+    CUpnpHttpFileTransferReader( CUpnpTcpSession& aSession,
+                           RSocket& aSocket,
+                           TThreadPriority aPriority,
+                           TInt aReadPortion,
+                           TInt aBufferSize);
+    
+
+        
+
+protected: // New functions
+
+    /**
+    * Issues reading in asynchronous mode.
+    * @since Series60 3.2
+    */
+    void IssueRead();
+    
+    /**
+    * Callback function for timer expirations.
+    * @since Series60 2.6
+    * @param aTimer Timer that has expired.
+    **/
+	void TimerEventL( CUpnpNotifyTimer* /*aTimer*/ );
+
+    /**
+    * Starts the cancel timer.
+    * @since Series60 3.2
+    */
+    void StartCancelTimer();
+
+	/**
+    * Base constructor to be used also in derived classes.
+    * @since Series60 3.2
+    */
+    void BaseConstructL();
+    
+    /**
+    * Initiates the buffer
+    * @since Series60 3.2      
+    */
+    void InitiateBufferL();
+	
+	/**
+    * Remaing number of bytes to read.
+    * @since Series60 3.2    
+    * @return TInt
+    */
+    virtual TInt ReadBufferSize();   
+    
+    /**
+    * Handles buffer of data
+    * @since Series60 3.2    
+    * @return TBool
+    */
+    virtual TBool HandleL();   
+    
+    /**
+    * Handles leave from RunL
+    * @since Series60 3.2    
+    * @param aError
+    */
+    void HandleError();   
+    
+    /**
+    * Finish the session
+    * @since Series60 3.2
+    */
+    virtual void Finish();  
+    
+    
+    /**
+    * Reads from socket
+    * @since Series60 3.2    
+    */
+    virtual void ReadFromSocket();
+    
+    /**
+    * Remaing number of bytes to read.
+    * @since Series60 3.2    
+    * @return TInt
+    */
+    virtual TInt RemainingBytes();
+    
+    /**
+    * Returns bytes to be read unless FIN received, then returns 0
+    * @since Series60 3.2    
+    * @return TInt
+    */
+    TInt TcpFinFoundRemainingBytes();
+    
+    /**
+    * Returns how many bytes will still fit into the buffer
+    * @since Series60 3.2    
+    * @return TInt
+    */
+    TInt AvailableSpace();
+    
+    /**
+    * If content length is less than single buffer size
+    * transaction is completed and session is closed
+    * @since Series60 3.2    
+    * @return TInt
+    */    
+    void HandleOneBufferShortTransferL();
+    
+     
+    
+protected: // Data
+      
+    //Socket from which the data will be read, not owned.    
+    RSocket& iSocket;   
+    
+    // Reference to session that owns this reader.   
+    CUpnpTcpSession& iSession;
+    
+    //Pointer that points to receiving buffer.
+    TPtr8 iReceivePtr;       
+    
+    // Buffer that is used to receive data to session.   
+    RBuf8 iCacheBuffer;
+        	
+    // Read buffer size
+    TInt iReadBufferSize;
+
+    //size of buffered data
+    TInt iBufferSize;  	
+
+    //processing has finished
+    TInt iIsFinished;
+
+    //whether upload reader is activated
+    TBool iIsActivated;
+
+    /**
+    * Timer used for retry process.
+    */
+    CUpnpNotifyTimer *iRetryTimer;
+
+    /**
+    * Timer used for cancel reciving process.
+    */
+    CUpnpNotifyTimer *iCancelTimer;
+
+    /**
+    * Variable indicating when the cancel was called from cancel timer.
+    */
+    TBool iCancelFromTimer;
+
+    /**
+    * Count of reading errors.
+    */
+    TInt iRetryErrorCount;
+
+    //length of data read from socket
+    TSockXfrLength iLen;
+
+    };
+
+
+#endif // C_CUPNPHTTPFILETRANSFERREADER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnphttpfiletransferwriter.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,277 @@
+/** @file
+* 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:  CUpnpHttpFileTransferWriter is a class responsible for 
+*                   asynchronous writing to a socket owned by CUpnpTcpSession.
+*
+*/
+
+
+
+#ifndef C_UPNPHTTPFILETRANSFERWRITER_H
+#define C_UPNPHTTPFILETRANSFERWRITER_H
+
+
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnpretrywrite.h"
+
+class CUpnpTcpSession;
+class CUpnpHttpFileAccess;
+    
+/**
+ *  CUpnpHttpFileTransferWriter is responsible for asynchronous writing.
+ *  Writer class is owned by CUpnpTcpSession which request asynchronous 
+ *  writing from it and is notified by writer when the write request 
+ *  is completed or an error occured.
+ *  When writer receives data to send it checks if it can be sent to the socket
+ *  right away and if session is not yet connected or writer already sends data
+ *  then it queues incoming data. When writing to the socket ends, writer checks 
+ *  if there is data in queue waiting for sending. If thereis then it issues writing it 
+ *  until the queue is empty. After writing all data, the writer notifies session about
+ *  completion of the writing taska and switches to waiting state until it receives 
+ *  another write request.
+ *  @lib DLNAWebServer.lib
+ *  @since Series60 3.2
+ */
+NONSHARABLE_CLASS (CUpnpHttpFileTransferWriter) : public CActive, MUpnpRetryWriteObserver
+    {
+public:
+
+    /**
+    * CUpnpHttpFileTransferWriter factory method.
+    * @since Series60 3.2
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    */
+    static CUpnpHttpFileTransferWriter* NewL( CUpnpTcpSession& aSession,
+                                        RSocket& aSocket,
+                                        TThreadPriority aPriority,
+                                        TInt aWriteSize);
+
+    /**
+    * Virtual destructor.
+    * @since Series60 3.2
+    */   
+    virtual ~CUpnpHttpFileTransferWriter();
+
+public: // New functions
+    
+       
+    /**
+    * Passes control to the reader
+    * @since series60 3.2    
+    */  
+    void StartL();
+    
+    /**
+    * Resets state of the writer
+    * @since series60 3.2   
+    */
+    void Reset();
+    
+    /**
+    * Indicates it writer is waiting for connection
+    * @since series60 3.2   
+    */
+    TBool IsWaiting();
+    
+    /**
+    * Indicates it writer is in use
+    * @since series60 3.2   
+    */
+    TBool IsActivated();
+    
+    /**
+    * Indicates it iRetryWrite object is waiting to rewrite
+    * @since series60 3.2   
+    */
+    TBool IsRetrying();
+    
+    /**
+    * Indicates it file download is cancelled
+    * @since series60 3.2   
+    */
+    TBool IsCancelled();
+    
+    /**
+    * Sets that post notification is need
+    * @since series60 3.2   
+    */
+    void SetPostNotify();
+    
+private: // from MUpnpRetryWriteObserver
+	
+    /**
+    * Called when retrying of writing was succesed.
+    * @since Series60 3.2
+    */
+	void RetryWriteSucceed();
+
+    /**
+    * Called when retrying of writing fail.
+    * @since Series60 3.2
+    */
+	void RetryWriteFailL( TInt aError );
+
+
+protected: // Functions from base CActive
+    
+    /**
+    * Cancels issued writing request.
+    * Standard active object function
+    * @since Series60 3.2
+    */
+    void DoCancel();
+    
+    /**
+    * Function called when the write request is finished.
+    * Standard active object function
+    * @since Series60 3.2
+    */
+    void RunL();
+    
+    /**
+    * Trap RunL leaves
+    * Standard active object function
+    * @since Series60 3.2
+    */
+    TInt RunError( TInt aError );
+    
+private: // Constructors and destructors
+    
+    /**
+    * CUpnpHttpFileTransferWriter constructor.
+    * @since Series60 3.2
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    * @param aWriteSize
+    */
+    CUpnpHttpFileTransferWriter( CUpnpTcpSession& aSession,
+                           RSocket& aSocket,
+                           TThreadPriority aPriority,
+                           TInt aWriteSize);
+
+    /**
+    * By default Symbian 2nd phase constructor is private.    
+    * @since Series60 3.2
+    */
+    void ConstructL();
+
+    /**
+    * Sends next queued write request if such exists.
+    * @since Series60 3.2
+    */
+    void SendNextPortionL();
+    
+    /**
+    * Sends HTTP headers
+    * @since Series60 3.2
+    */
+    void SendHeadersL();
+    
+    
+    /**
+    * Writes to the socket
+    * @since Series60 3.2
+    */
+    void WriteToSocket();
+    
+    /**
+    * Finishes downloading
+    * @since Series60 3.2
+    */
+    void FinishL();
+    
+    /**
+    * Handles RunL error
+    * @since Series60 3.2
+    */
+    void HandleErrorL();
+
+private: // Enumerations
+
+    /**
+    * TWriteState, records whether a write request is pending.
+    *   - EUnknown Initial state
+    *   - EHeaders Sending headers
+    *   - EContent Sending content    
+    *   - ECancelled Writing to the socket is cancelled
+    */
+
+   enum TFileTransferWriterState
+    {
+    EUnknown,
+    EHeaders,
+    EContent,
+    EFinished,
+    ECancelled
+    };        
+
+private: // Data
+    
+    /**
+    * Socket used for writing data, not owned.
+    */
+    RSocket& iSocket;
+
+    /**
+    * Reference to session that owns the writer.
+    * Session is request writing and is notified when it's finished or
+    * errors occure, not owned.
+    */
+    CUpnpTcpSession& iSession;
+    
+    /**
+    * State of the writer.
+    */
+    TFileTransferWriterState iState;
+
+    /**
+    * Buffer that is used to send data.    
+    */
+    RBuf8 iSendBuffer;
+    
+    /**
+    * Pointer to data to be sent    
+    */
+    TPtr8 iSendPointer;
+        
+    
+    /**
+    * Size of the write buffer
+    */
+    TInt iWriteSize;
+    
+    /**
+    * Indicates when writed needs to wait for connecting to the remote host
+    */
+    TBool iWaiting;
+    
+    /**
+    * Indicates when POST is being sent
+    */
+    TBool iHttpPostStarted;    
+
+    /**
+    * Implementation of retrying write to the socket
+    */
+    CUpnpRetryWrite* iRetryWrite;
+
+    };
+
+#endif // C_UPNPHTTPFILETRANSFERWRITER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnphttpserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,228 @@
+/** @file
+* 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:  Base class for HTTP servers. Includes HTTP specific
+*                functionality and represent the highest layer of the HTTP stack.
+*
+*/
+
+
+#ifndef C_CUPNPHTTPSERVER_H
+#define C_CUPNPHTTPSERVER_H
+
+// INCLUDES
+
+#include <f32file.h>
+#include "upnptcpserver.h"
+#include "upnphttpserverobserver.h"
+#include "upnphttpmessage.h"
+
+// FORWARD DECLARATIONS
+class CUpnpHttpFileAccess;
+class CUpnpHttpSession;
+class CUpnpHttpMessage;
+class MUpnpHttpServerTransactionCreator;
+
+// CLASS DECLARATION
+
+/**
+* Base class for HTTP servers. Includes HTTP specific functionality and represents
+*  the highest layer of the HTTP stack.
+*  Http Server derives from CUpnpTcpServer and adds HTTP related features as sending
+*  HTTP messages, queueing messages, forwarding received messages and error codes
+*  to observer layer etc.
+* @lib DLNAWebServer.lib
+* @since Series60 2.6
+*/
+NONSHARABLE_CLASS (CUpnpHttpServer) : public CUpnpTcpServer
+    {
+public: // Constructor and destructor
+
+    /**
+    * Constructor function.
+    * @since Series60 2.6
+    * @param aObserver Pointer to this HttpServer observer for callback
+    *        functions.
+    * @param aSocketServ Pointer to Socket server.
+    * @param aActiveIap IAP to use with connection.
+    * @param aHandle the thread log handle
+    * @return A new CUpnpHttpServer instance.
+    **/
+    static CUpnpHttpServer* NewL( MUpnpHttpServerObserver* aObserver,
+                                           RSocketServ* aSocketServ,
+                                           TInt aActiveIap );
+
+    
+    /**
+    * Virtual Destructor function.
+    * @since Series60 2.6
+    **/
+    virtual ~CUpnpHttpServer();
+
+public: // New funtions
+
+    /**
+    * Starts the HttpServer.
+    * @since Series60 5.0
+    * @param aPort HTTP make attempt to start on that port
+    **/
+    void StartL( const TInt aPort );
+
+    /**
+    * Stops the HttpServer.
+    * @since Series60 2.6
+    **/
+    void Stop();
+
+    /**
+    * Forwards message to the upper layer.
+    * @since Series60 2.6
+    * @param aMsg Pointer to message.
+    **/
+    void ToReceiveStackD( CUpnpHttpMessage* aMsg );
+
+    /**
+    * Sends the message.
+    * @since Series60 2.6
+    * @param aMessage Pointer to message.
+    * @return Errorcode.
+    **/
+    TInt SendMessageL( CUpnpHttpMessage* aMessage );
+
+    /**
+    * Returns Server's description string.
+    * @since Series60 2.6
+    * @return Server's description string
+    **/
+    TDesC8& ServerDescription();
+
+    /**
+    * This function sets handle to transaction creator interface.
+    * @since Series60 5.0 
+    * @param aTransactionCreator pointer to object implementing MUpnpHttpServerTransactionCreator
+    *     interface.
+    **/
+    void SetTransactionCreator( MUpnpHttpServerTransactionCreator* aTransactionCreator );
+
+    /**
+     * Gets httpFilter
+     */
+    MUpnpHttpServerTransactionCreator* TransactionCreator();
+
+   /**
+    * This method returns the file session handle.
+    * @since Series60 2.6
+    */
+    RFs& FileSession();
+
+    /**
+    * This method returns the connection handle.
+    * @since Series60 2.6
+    */
+    RConnection& ConnectionL();
+
+    
+    /****IPFIltering*****/
+    IMPORT_C void StartIPFilteringL();
+    IMPORT_C void StopIPFiltering();
+    /*************************/
+
+public: // From MUpnpMessageObserver
+
+    /**
+    * Callback for timer in aMessage. This gets called when timer expires and message
+    * is tried to be sent again.
+    * @since Series60 2.6
+    * @param aMessage Message to be sent.
+    **/
+    void MessageExpiredL( CUpnpHttpMessage* aMessage );
+
+private: // From CUpnpTcpServer
+
+    /**
+    * Accept the incoming connection from listening socket, creates a session
+    * and start new listening socket.
+    * @since Series60 2.6
+    * @param aSocket Socket that has received a new connection.
+    * @return Pointer to a new incoming session.
+    **/
+    CUpnpTcpSession* ConnectionAcceptedL( RSocket aSocket );
+
+private: // New functions
+
+    /**
+    * Function that is used for sending messages.
+    * Function first tries to find if message should be sent using existing
+    * session - it means that the message is response for request. If
+    * session is not found then the new one is created and the message is sent
+    * as a request.
+    * @since Series60 2.6
+    * @param aMessage Message to be sent.
+    * @return If everything is ok, returns session id for that session. Else contains
+    * error code (if value < KErrNone).
+    */
+    TInt TrapSendMessageL( CUpnpHttpMessage* aMessage );
+
+     /**
+    * Returns session
+    * @since Series60 3.2
+    * @param aSessionId
+    * @return pointer to CUpnpHttpSession
+    **/
+    CUpnpHttpSession* GetSession( TInt aSessionId );
+
+    /**
+    * Increments the counter of redirecting and check if no. of redirections is not above the limit
+    * @since Series60 3.2
+    * @param aSessionId
+    * @return ETrue - if the counter hasnt exceeded the maximum after incrementating it
+    **/
+    TBool NewRedirection( TInt aSessionId );
+
+private: // Constructors
+
+    /**
+    * First phase constructor
+    * @since Series60 2.6
+    * @param aObserver handle to observer.
+    * @param aSocketServ server socket used for accepting connestions.
+    * @param aActiveIap number of IAP that should be used for connection.
+    * @param aHandle the thread log handle
+    **/
+    CUpnpHttpServer( MUpnpHttpServerObserver* aObserver,
+                     MUpnpHttpServerTransactionCreator* aCreator,
+                     RSocketServ* aSocketServ,
+                     TInt aActiveIap );
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @since Series60 2.6
+    */
+    void ConstructL();
+
+private: // Data
+
+    // Pointer to this server's observer, not owned.
+    MUpnpHttpServerObserver* iObserver;
+
+    // Handle to a file server session.
+    RFs iFs;   
+
+    // Bufer containing server's descriptions string used
+    // for filling HTTP Server header value. Owned
+    HBufC8* iServerDescription;
+};
+
+#endif // C_CUPNPHTTPSERVER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnphttpsession.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,495 @@
+/** @file
+* 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:  HttpSession is class that is used to handle single 
+*                 connections to HttpServer
+*
+*/
+
+
+#ifndef C_CUPNPHTTPSESSION_H
+#define C_CUPNPHTTPSESSION_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <f32file.h>
+#include <apasvst.h>
+#include <apaflrec.h>
+#include <e32std.h>
+
+#include "upnphttpmessage.h"
+#include "upnptcpsession.h"
+
+
+// FORWARD DECLARATIONS
+
+class CFileReader;
+class CUpnpHttpBuffer;
+class CUpnpHttpServer;
+class CUpnpHttpFileAccess;
+class CUpnpHttpServerTransaction;
+
+// CONSTANTS
+
+_LIT8( KMedia,  "\\MEDIA\\" );
+_LIT8( KLog,    "\\LOG\\" );              
+_LIT( KPercent,   "%" );
+
+static const TInt KDefaultLastActionSize = 2048;
+static const TInt KMaxRedirectCount=5;
+
+// CLASS DECLARATION
+
+/**
+*  @brief HttpSession is class that is used to handle single connections to HttpServer.  
+*
+*  @since Series60 2.6
+*/
+NONSHARABLE_CLASS (CUpnpHttpSession) : public CUpnpTcpSession
+    {
+    
+public: // Construtors and destructor
+
+    /**
+    * Constructor function. This constructor is used when connection is iniatiated
+    *  from network.
+    * @param aSocket Pointer to new socket.
+    * @param aServer Pointer to owning HttpServer.
+    * @param aSessionId Session id of this session.
+    * @param aPriority Priority of this session
+    * @return A new CUpnpHttpServer instance.
+    **/
+    static CUpnpHttpSession* NewL( RSocket aSocket, 
+                               CUpnpHttpServer* aServer,
+                               TInt aSessionId,
+                               TThreadPriority aPriority );
+
+    /**
+    * Virtual Destructor function.
+    */
+    virtual ~CUpnpHttpSession();
+
+public: // From CUpnpTcpSession
+    /**
+    * Callback function from TcpSession. Session has received aBuffer 
+    *  from network.
+    * @since Series60 2.6
+    * @param aBuffer Buffer that has been received.
+    * @return None.
+    **/
+    void BufferReceivedL( TDesC8& aBuffer );
+
+public: // New functions
+
+    /**
+    * Sends aMessage to session's remote host.
+    * @since Series60 2.6
+    * @param aMessage Message to be sent.
+    **/
+    void SendL( CUpnpHttpMessage* aMessage );
+
+    /**
+    * Deletes current session.
+    * @since Series60 2.6
+    * @param aSession Session to b deleted.
+    **/
+    void DeleteThisSessionL( CUpnpTcpSession* aSession );
+    
+    /**
+    * Deletes a file named aFilename if it exists. Used in receiving files
+    * to delete file if it already exists.
+    * @since Series60 2.6
+    * @param aFilename File to be deleted.
+    * @return None.
+    **/
+    void DeleteFileIfExists( TDesC16& aFilename );
+
+    /**
+    * Returns a pointer to file transfer object of this session.
+    * @since Series60 2.6
+    * @return Pointer to file transfer object.
+    **/
+    CUpnpHttpFileAccess* FileAccess();
+       
+    /**
+    * Should the existing local file be overwritten with the requested content.
+    *  If not then the new file with name: iInFilename_serialNumber will be created
+    *  to save incoming content. It's connected only with download.
+    * @return Should the local in-file be overwritten with incoming content.
+    **/
+    TBool OverwriteExisting();
+    
+    // Range request parameters, only used for GET and HEAD requests with Range HTTP header.
+    /**
+    * Returns offset of the file that should be requested from server. 
+    * @return offset to save content at.
+    **/
+    TInt Offset();
+    
+    /**
+    * Returns the length of file content to be requested.
+    * @return Length of file content to be requested.
+    **/
+    TInt Length(); 
+    
+    /**
+    * Returns if should the requested offset of the remote file be 
+    *  saved at physical offset of existing local file.
+    *  Only for Range requests
+    * @return Should the requested offset of the remote file be saved at 
+    *  physical offset of existing local file.
+    */
+    TBool SaveAtOffset();
+    
+    /**
+    * Notifies upper layers that there is a HTTP error.
+    * @since Series60 3.2
+    * @param the HTTP error code
+    **/
+    void NotifyErrorL(TInt aError, TInt aInternalError = KErrNone);
+    
+    /**
+    * Returns ETrue when message is totally downloaded [completed]
+    * @since Series60 3.2
+    * @return ETrue if message is completed
+    **/
+    TBool IsMsgReady();
+    
+    /**
+    * Increments the redirect counter
+    * @since Series60 3.2
+    * @return ETrue if the number of Redirecting has exceeded the maximum
+    **/
+    TBool SetRedirectCount();
+
+    /**
+    * Returns HttpServer pointer
+    * @since Series60 3.2
+    **/    
+    CUpnpHttpServer* HttpServer();
+    
+    /**
+    * Deletes the FileAccess of this session.
+    * @since Series60 2.6
+    * @return None.
+    **/ 
+    void DeleteServeFileL();
+
+protected: // New functions
+    
+    void DestroyIt(CUpnpTcpSession* aSession );
+    
+    /**
+    * Returns ETrue, if fileserve exists.
+    * @since Series60 2.6
+    * @return ETrue, if fileserve exists; EFalse otherwise.
+    **/
+    TBool FileServeExists();
+   
+    /**
+    * Returns the port of this HttpSession.
+    * @since Series60 2.6
+    * @return Number of server port.
+    **/   
+    TInt ServerPort();
+    
+private: // Constructors
+
+    /**
+    * First phase constructor. This constructor is used when connection is
+    *  iniatiated from network.
+    * @since Series60 2.6
+    * @param aSocket Pointer to new socket.
+    * @param aServer Pointer to owning HttpServer.
+    * @param aSessionId Session id of this session.
+    * @param aPriority Priority of this session
+    **/
+    CUpnpHttpSession( RSocket aSocket, 
+                  CUpnpHttpServer* aServer, 
+                  TInt aSessionId,
+                  TThreadPriority aPriority );
+    
+    /**
+    * Symbian constructor
+    */
+    void ConstructL();
+
+    /**
+    * Received buffer processing from network.
+    * @since Series60 2.6
+    * @param aBuffer Buffer that has been received.
+    * @return None.
+    **/
+    void BufferReceivedProcessL( TDesC8& aBuffer );
+
+/**
+    * Received buffer checking headers for a message coming from network.
+    * @since Series60 2.6
+    * @param aBuffer Buffer that has been received.
+    * @return None.
+    **/
+    void BufferReceivedCheckingHeadersL( TDesC8& aBuffer );
+
+
+    /**
+    * Single POST buffer processing
+    *  
+    * @since Series60 2.6
+    * @param aBuffer Buffer that has been received.
+    * @return None.
+    **/
+    void CUpnpHttpSession::SinglePostBufferReceivedL( TDesC8& aBuffer ); 
+    
+    
+
+    TInt PrepareRangeHeaderL( CUpnpHttpMessage* aMsg,
+        TBool aServingOutFileName,
+        TInt aFileSize, CUpnpHttpServerTransaction &aTransaction, TInt& aRangeStatus,
+        TInt& aStartPos, TInt& aEndPos );
+
+    
+private: // New funtions
+
+    enum THttpInvalidMessage
+        {
+        EMessageOk = 0,
+        EUnknownMethod
+        };
+    
+    /**
+    * Matches an error to a proper HTTP error code
+    * @error to be matched
+    * @return HTTP error code.
+    **/
+    TInt MatchHttpError( TInt error );
+    /**
+    * Checks message validity. Returns type of error.
+    * @since Series60 2.6
+    * @param aMsg Message to check.
+    * @return Errorcode.
+    **/
+    THttpInvalidMessage IsValidMessage( CUpnpHttpMessage* aMsg );
+
+    
+    /**
+    * Decides what to do with the message, should it be sent to upper layer,        
+    * Takes ownership of a parameter (it should be popped from cleanup stack
+    * before call
+    * @since Series60 2.6
+    * @param aMsg Message to check.
+    **/
+    void HandleQueryL( CUpnpHttpMessage* aMsg );
+
+
+    /**
+    * Repsonse with HTTP error mesage to remoteServer
+    * @since Series60 2.6
+    * @param aStatus Number of status code
+    **/
+    void ResponseErrorL(TInt aStatus);
+
+    
+  
+
+    /**
+    * Prepares serve a file. Checks that file exists and paths are correct. 
+    *  Checks filesize and so on.
+    * @since Series60 2.6
+    * @param aMsg Message to check.
+    * @return error code
+    **/
+    TInt PrepareToServeFileL( CUpnpHttpMessage* aMsg );
+
+    /**
+    * Notifies upper layers that session has disconnected.
+    * @since Series60 2.6
+    * @param aAddr Address of remote host to which the connection has been
+    *  disconnected.
+    **/
+    void NotifyDisconnectL( TInetAddr aAddr );
+    
+    /**
+    * Notifies upper layers that session has expired
+    * @since Series60 3.2        
+    **/
+    void NotifyTimeoutL();
+    
+    /**
+    * File Transfer Reader callback when upload done
+    * @since Series60 3.2        
+    **/
+    void FileTransferReaderDoneL();
+    
+    /**
+    * File Transfer Reader callback when upload with error
+    * @since Series60 3.2        
+    * @param error        
+    **/    
+    void FileTransferReaderErrorL(TInt aError);
+    
+    /**
+    * Resets settings after upload
+    * @since Series60 3.2            
+    **/
+    void ResetSettingsL();
+    
+    
+    /**
+    * File Transfer Writer callback when download done
+    * @since Series60 3.2                 
+    **/
+    void FileTransferWriterDoneL();
+    
+    /**
+    * File Transfer Writer callback for handling more downloads
+    * @since Series60 3.2               
+    **/
+    void FileTransferWriterHandleMoreL();
+    
+    /**
+    * Checks session and message against persistence
+    * @since Series60 3.2                 
+    **/
+    void CheckSessionPersistence(CUpnpHttpMessage* aMsg);
+    
+    /**
+    * Notifies upper layers that Socket Server is unable to handle any more data by \
+    *  sending Expectation failed HTTP error to upper layers.
+    * @since Series60 2.6
+    * @param aAddr Address of remote host to which the connection has been tried to connect
+    **/
+    void SocketServerBusyL( const TInetAddr& aAddr );
+    
+     /**
+    * Notifies upper layers with error message. Method guarantee destrustion of parameter
+    * (even when leave ocure), and parameter should be poped from cleanupstack
+    * @since Series60 2.6
+    * @param aMessage message that will be sent to upper layer.
+    **/
+    void NotifyUpperLayerLD( CUpnpHttpMessage* aMessage );
+    
+    /**
+    * Checks if session uses Connection close communication.
+    * @since Series60 2.6
+    **/ 
+    void CheckConnectionCloseL();
+
+    /**
+    * Callback function. Informs upper layers that HTTP POST has been started 
+    *  by sending HTTP error code 801 message to upper layers.
+    * @since Series60 2.6
+    **/
+    void NotifyUpperLayersOnPostL();
+
+    /**
+    * Callback function. Informs upper layers that HTTP POST has been finished.
+    * @since Series60 2.6
+    **/
+    void PostingFileCompleteL();
+    
+    void WriteMsgAndHeaderL( CUpnpHttpMessage* aMsg, const TDesC8& aHeaderToWrite,
+        const TDesC& aPathWithNewMethod, TInt aFileSize, TInt aRangeStatus,
+        const TInt aStartPos, const TInt aEndPos );
+    
+    /**
+    * Function to cut Ip and port from absoulute Uri in get request, it only cuts them when 
+    * they are same as http server ones
+    * @since S60 5.1
+    **/    
+    TPtrC8 PrepareRelativeUriL( const TDesC8& aUri );
+    
+private: 
+
+    // Request type of last sent message. This is used to store CHttpMessages type. 
+    // This information is used by upper layers, not by HttpServer.
+    THTTPMsgType iRequestType;
+
+    // Resend counter. This information is used by upper layers, not by HttpServer.
+    TInt iRetryCounter;
+
+    // Pointer to owning HttpServer.
+    CUpnpHttpServer* iServer;
+
+    // Used to check that notification of receiving of large files has been 
+    // sent on this session.
+    TBool iRequestedTransferNotifySent;
+
+    // Used to check if session uses Connection close.
+    TBool iUsesConnectionClose;
+
+    // Buffer that contains the filename of file, that is meant to be 
+    // received and saved.
+    HBufC8* iInFilename;
+      
+    // Should the existing local file be overwritten with the requested content.
+    // If not then the new file with name: iInFilename_serialNumber will be created
+    // to save incoming content. It's connected only with download.
+    TBool iOverwriteExisting;
+    
+    /* Range request parameters, only used for GET and HEAD requests with 
+       Range HTTP header. 
+    */
+    // Offset of the file that should be requested from server. 
+    TInt iOffset;
+    
+    //Length of file content to be requested.
+    TInt iLength; 
+    
+    // Should the requested offset of the remote file be saved at physical 
+    // offset of existing local file.
+    // Only for Range requests!
+    TBool iSaveAtOffset;
+    /**/
+
+    // Buffer that contains the filename of file, that is meant to be sent 
+    // out as body of CUpnpHttpMessage.
+    HBufC8* iOutFilename;
+
+    // Buffer that contains the name of destination service. Used by upper 
+    // layer, not by CUpnpHttpServer
+    HBufC8* iDestinationPath;
+
+    // Buffer that contains the name of destination service. Used by upper
+    // layer, not by CUpnpHttpServer
+    HBufC8* iSenderPath;
+
+    // Pointer used by upper layer, not by CUpnpHttpServer.
+    TAny* iPendingRequest;
+
+    // Requests that have not yet been served.
+    RPointerArray<CUpnpHttpMessage>* iPendingRequests;
+
+    // Pointer to this session's file access object.
+    CUpnpHttpFileAccess* iFileServe;
+
+    // Variable that is used to check if we can delete this session after 
+    // we get response from remote end.
+    TBool iSessionIsDeletedAfterResponse;
+    
+    // Flag informing if content-length of incoming message was checked
+    // and it's value is not bigger than maximum size allowed.
+    TBool iMaximumSizeChecked;
+    
+    // Flag informing session if message headers were checked
+    TBool iHeadersCompleted;
+
+    //error has been notified to the remote client
+    TBool iErrorNotified;
+    //if received message is chunked-encoded
+    TBool iIsChunked;
+    };
+
+#endif // C_CUPNPHTTPSESSION_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnprangeheaderparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,165 @@
+/** @file
+* 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:  CUpnpRangeHeaderParser is a class used to range header prsing
+*
+*/
+
+
+#ifndef C_CUPNPRANGEHEADERPARSER_H
+#define C_CUPNPRANGEHEADERPARSER_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnpcons.h"
+#include "upnphttpservertransaction.h"
+
+class CUpnpHttpMessage;
+
+static const TInt KIntegerOccurance = 3;
+static const TInt KSlashSpaceAndMinusSize = 3;
+static const TInt KMaxIntegerInContentLength = 2;
+
+
+// CLASS DECLARATION
+
+NONSHARABLE_CLASS (CUpnpRangeHeaderParser) : public CBase
+    {
+    public:  // Constructors and destructor
+        
+        /**
+        * Two-phased constructor.
+        * 
+        * @param aHeaderBuffer should be leave safe
+        */
+        static CUpnpRangeHeaderParser* NewL( CUpnpHttpServerTransaction& aTransaction,
+                                              TInt& aStartPos, TInt& aEndPos );
+        static CUpnpRangeHeaderParser* NewLC( CUpnpHttpServerTransaction& aTransaction,
+                                                       TInt& aStartPos, TInt& aEndPos );
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CUpnpRangeHeaderParser();
+
+    public: // New functions
+
+        /**
+        * Returns parsing status as HTTP error code (e.g. EHttpPartialContent, -EHttpBadRequest) if Range header exist or
+        * EHttpOk if doesn't
+        * If request is corrected and Range header exist all references passed into construction phase
+        * gots new value
+        */        
+        TInt ParseRangeL( CUpnpHttpMessage* aMsg, TInt aFileSize );
+ 
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+
+        CUpnpRangeHeaderParser( CUpnpHttpServerTransaction &aTransaction,
+                                TInt& aStartPos, TInt& aEndPos );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * Checks syntax of Range header
+        * EHttpPartialContent if Range header exists and syntax is proper 
+        * EHttpOk if Range header doesn't exist
+        * -EHttpBadRequest if Range syntax is improper
+        */        
+        TInt CheckRangeHeaderSyntax( CUpnpHttpMessage* aMsg );
+        
+        /**
+        * Checks Range value
+        * EHttpPartialContent if values there are proper
+        * - HTTP error code if not
+        */        
+        TInt CheckRangeValues( TInt aFileSize );
+
+        /**
+        * Parses HTTP Range header, according to rules described in DLNA specyfication
+        *  and if header is correct, it returns first and last byte positions. If header
+        *  is not correct, those values are random and should not be used.
+        * @param aRangeHeader Range header.
+        * @param aStartPos reference which will be filled with first byte position.
+        * @param aEndPos reference which will be filled with last byte position or
+        *  with KErrNotFound if such position was not specified in the header which is correct.
+        * @return ETrue if header syntax is correct, EFalse if not.
+        **/
+        static TBool ParseRangeHeader( TDesC8& aRangeHeader, TInt& aStartPos, TInt& aEndPos );
+        
+        /**
+        * Appends Content-Length header to response
+        */        
+        void AppendContentLengthToResponseL( TInt aFileSize, TInt rangeStatus );
+        
+           
+        /**
+        * Appends Bytes header to response
+        */        
+        void AppendBytesToResponseL( TInt aFileSize );
+               
+               
+        /**
+        * Creates response for 206 Partial Content
+        */        
+        void CreatePartialContentResponseL( 
+            TInt aFileSize, TInt aHttpCode );
+        
+        /**
+        * Creates response for 204 No Content
+        */        
+        void CreateNoContentResponseL( TInt aFileSize, TInt aHttpCode  );
+
+        /**
+        * Checks number format
+        * Returns ETrue if aNumber is improper
+        */   
+        static TBool HasImproperChars( const TLex8& aNumber );
+        
+        /**
+        * Moves parser position to first not white space
+        */ 
+        static void MovePosition( const TDesC8& aString, TInt& aPos );
+        
+        /**
+        * Handles conversion exception
+        * Returns EFalse if error cannot be handled
+        */ 
+        static TBool HandleConversionException( TLex8& aNumber, TInt& aRangePos, TInt aError );
+        
+        /**
+        Members
+        */
+    private:
+        // Reference to response header, not owned
+    	CUpnpHttpServerTransaction &iTransaction;
+        // Reference to start position
+        TInt& iStartPos;
+        // Reference to end position
+        TInt& iEndPos; 
+        //size parsing buffer
+        TBuf8<KMaxIntegerInContentLength*KMaxIntegerLength> iSizeBuffer;
+
+    };
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnpretrywrite.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,189 @@
+/** @file
+* 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 C_CUPNPRETRYWRITE_H
+#define C_CUPNPRETRYWRITE_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <in_sock.h>
+
+
+static const TInt KWriteErrorsMax = 5;
+static const TInt KWaitWithSocketWrite = 1000000;
+
+
+// CLASS DECLARATION
+/**
+* An interface for retry write
+*
+*  @since Series60 3.1
+*/
+class MUpnpRetryWriteObserver
+{
+	public:
+
+        /**
+        * RetryWriteSucceed
+        * A callback function for succeed writing.
+        * @since Series60 3.1
+        */
+		virtual void RetryWriteSucceed() = 0;
+
+        /**
+        * RetryWriteFailL
+        * A callback function for failed writing.
+        * @since Series60 3.1
+		* @param aError Error code
+        */
+		virtual void RetryWriteFailL( TInt aError ) = 0;
+};
+
+
+NONSHARABLE_CLASS (CUpnpRetryWrite) : CActive
+{
+	public:
+		
+	    /**
+	    * Constructor function.
+	    * @since Series60 3.1
+	    * @return A new CUpnpRetryWrite instance.
+	    **/
+		static CUpnpRetryWrite* NewL( CUpnpTcpSession&, RSocket&, MUpnpRetryWriteObserver*, TThreadPriority );
+
+        /**
+        * Destructor.
+        */
+		~CUpnpRetryWrite();
+
+        /**
+        * IssueWriteRetry
+        * Starts retry procedure
+        * @since Series60 3.1
+        */
+		void IssueWriteRetry();
+		
+        /**
+        * IsStarted
+        * Checks if the retrying procedure is started
+        * @since Series60 3.1
+        * @return ETrue when retrying procedure is started, else return EFalse
+        */
+		TBool IsStarted();
+		
+	private:
+        /**
+        * Constructor
+        */
+		CUpnpRetryWrite(CUpnpTcpSession&, RSocket&, MUpnpRetryWriteObserver*, TThreadPriority );
+
+        /**
+        * ConstructL
+        */
+		void ConstructL();
+	
+        /**
+        * WriteToSocket
+        * Starts writing null descriptor to the socket
+        * @since Series60 3.1
+        */
+		void WriteToSocket();
+
+        /**
+        * PassErrorToObserverL
+        * Retruns the error code to the observer
+        * @since Series60 3.1
+		* @param aError Returned error code
+        */
+		void PassErrorToObserverL( TInt aError );
+	
+        /**
+        * RunL
+        * Active object state machine.
+        * @since Series60 2.0
+        */
+		void RunL();
+
+        /**
+        * DoCancel
+        * Cancel outstanding request(s) and reset the iActive flag.
+        * @since Series60 2.0
+        */
+		void DoCancel();
+
+        /**
+        * RunError
+        * RunError in case RunL leaves.
+        * @since Series60 2.0
+        */
+		TInt RunError( TInt aError );
+			
+	
+        /**
+        * TInternalState
+        * Internal states.
+        * @since Series60 3.1
+        */
+    enum TInternalState
+        {
+        EUnknown,
+        EWaiting,
+        EWriting
+        };
+	
+	private:
+
+	    /**
+	    * Reference to session that owns the writer.
+	    * Session is request writing and is notified when it's finished or
+	    * errors occure, not owned.
+	    */
+		CUpnpTcpSession& iSession;
+
+	    /**
+	    * Socket used for writing data, not owned.
+	    */
+		RSocket& iSocket;
+	
+	    /**
+	    * Interface observer object.
+	    */
+		MUpnpRetryWriteObserver* iObserver;
+
+	    /**
+	    * Internal state variable.
+	    */
+		TInternalState iInternalState;
+	
+	    /**
+	    * Internal timer.
+	    */
+		RTimer iWriteTimer;
+
+	    /**
+	    * Errors coumter.
+	    */
+		TInt iWriteErrorsCount;
+		
+};
+
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnpsocketshutdown.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,165 @@
+/** @file
+* 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 C_CUPNPSOCKETSHUTDOWN_H
+#define C_CUPNPSOCKETSHUTDOWN_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <in_sock.h>
+
+class CUpnpTcpSession;
+class CUpnpNotifyTimer;
+
+
+// CLASS DECLARATION
+
+
+NONSHARABLE_CLASS (CUpnpSocketShutdown) : CActive, MUpnpNotifyTimerObserver
+{
+    public:
+        
+    /**
+        * Constructor function.
+        * @since Series60 3.1
+        * @return A new CUpnpSocketShutdown instance.
+        **/
+    static CUpnpSocketShutdown* NewL( CUpnpTcpSession&, RSocket&, TThreadPriority );
+
+    /**
+        * Destructor.
+        */
+    ~CUpnpSocketShutdown();
+
+    /**
+        * HandleError
+        * Error servicing
+        * @since Series60 3.1
+        * @param aError Error code
+        */
+    void HandleError( TInt aError );
+        
+    /**
+        * ShutdownImmediate
+        * Shutdown with EImmediate
+        * @since Series60 3.1
+        */
+    void ShutdownImmediate();
+    
+    /**
+        * ShutdownStop
+        * Shutdown with ENormal or EStopOutput
+        * @since Series60 3.1
+        */
+    void ShutdownStop();
+        
+    /**
+        * MarksTimeout
+        * Marks if timeout occured on session
+        * @since Series60 3.2
+        */
+    void MarksTimeout();
+
+    private:
+    
+    /**
+        * Constructor
+        */
+    CUpnpSocketShutdown( CUpnpTcpSession&, RSocket&, TThreadPriority );
+
+    /**
+        * ConstructL
+        */
+    void ConstructL();
+    
+    /**
+        * RunL
+        * Active object state machine.
+        * @since Series60 2.0
+        */
+    void RunL();
+
+    /**
+        * DoCancel
+        * Cancel outstanding request(s) and reset the iActive flag.
+        * @since Series60 2.0
+        */
+    void DoCancel();
+
+    /**
+        * RunError
+        * RunError in case RunL leaves.
+        * @since Series60 2.0
+        */
+    TInt RunError( TInt aError );
+            
+    /**
+        * Callback function for timer expirations.
+        * @since Series60 2.6
+        * @param aTimer Timer that has expired.
+        **/
+    void TimerEventL( CUpnpNotifyTimer* aTimer );
+
+    /**
+        * TInternalState
+        * Internal states.
+        * @since Series60 3.1
+        */
+    enum TInternalState 
+        {
+        EUnknown,
+        EShuttingDownStopOutput,
+        EShuttingDownNormal,
+        EWaitingForInputError,
+        EInputErrorReceived,
+        ENotConnected
+        };
+    
+    private:
+
+    /**
+        * Reference to session that owns the writer.
+        * Session is request writing and is notified when it's finished or
+        * errors occure, not owned.
+        */
+    CUpnpTcpSession& iSession;
+
+    /**
+        * Socket used for writing data, not owned.
+        */
+    RSocket& iSocket;
+
+    /**
+        * Internal state variable.
+        */
+    TInternalState iInternalState;
+
+    // Timeout timer for input errors after shutdown normal and stop input 
+    CUpnpNotifyTimer* iInputTimeoutTimer;
+        
+    /**
+        * Determines if timeout occured on session
+        */
+    TBool iSessionTimeouted;
+
+};
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnptcpserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,355 @@
+/** @file
+* 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:  Declares main application classes
+*
+*/
+
+
+#ifndef C_CUPNPTCPSERVER_H
+#define C_CUPNPTCPSERVER_H
+
+// INCLUDES
+#include "upnpcompvariant.hrh"
+
+#include <e32base.h>
+#include <es_sock.h>
+#include <in_sock.h>
+#include <commdbconnpref.h>
+
+#include "upnpnotifytimer.h"
+#include "upnpconnectionmanagerproxy.h"
+
+// FORWARD DECLARATIONS
+class CUpnpTcpSession;
+class MUpnpHttpServerTransactionCreator;
+class CUpnpDlnaFilter;
+
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+class CUpnpIPFilterManager;
+#endif
+
+// CONSTANTS
+static const TInt KMaxConnectionCount = 16;
+const TInt KRetryTime = 1000000;
+static const TInt KDefaultHttpPort = 50001; // HTTP default port number
+// A Category value for a property of Publish and Subscribe
+const TUid KdlnawebserverCat={0x10204165};
+enum TdlnawebserverKeys {EdlnawebserverCounter};
+
+// CLASS DECLARATION
+
+/**
+* A virtual base class for TCP servers. Includes a server socket and methods
+* starting server socket, accepting connections and creating CUpnpTcpSessions for
+* incoming connections. After creating tcp session and adding it to
+* active sessions' tableserver returns to listening for new connections and
+* the tcp session takes care about whole communication with remote host.
+* After handling connection the session is destroyed and removed from sessions' list.
+*
+* @lib DLNAwebserver.lib
+* @since Series60 2.6
+*/
+NONSHARABLE_CLASS (CUpnpTcpServer) : public CActive, public MUpnpNotifyTimerObserver
+    {
+public: // Enumerations
+
+    /**
+    * Enum for state of server.
+    */
+    enum TState
+        {
+        // Server is not listetnig for connections.
+        ENotListening,
+        // Server is listening and accepting incoming connections.
+        EAccepting
+        };
+
+public: // Constructor and destructor
+
+    /**
+    * Constructor function. This constructor is used when connection is
+    * iniatiated from network.
+    * @since Series60 2.6
+    * @param aSocketServ Pointer to Socket Server.
+    * @param aPort Number of listening port.
+    * @param aIap Number of active Iap to use with connections.
+    * @return A new CUpnpTcpServer instance.
+    **/
+    CUpnpTcpServer( RSocketServ* aSocketServ,
+                    TInt aPort,
+                    TInt aIap );
+
+    /**
+    * TcpServer might-leave initialization method.
+    * NOTE: Must be called by extending class
+    * @since Series60 2.6
+    **/
+    void BaseConstructL();
+
+    /**
+    * Virtual destructor function.
+    * @since Series60 2.6
+    **/
+    virtual ~CUpnpTcpServer();
+
+public: // From CActive
+
+    /**
+    * Do active object operations
+    * Standard active object function
+    * @since Series60 2.6
+    */
+    void RunL();
+
+    /**
+    * Do active object operations
+    * Standard active object function
+    * @since Series60 2.6
+    * @param aError from RunL.
+    * @return KErrNone.
+    */
+    TInt RunError( TInt aError );
+
+    /**
+    * Cancel active object requests
+    * Standard active object function
+    * @since Series60 2.6
+    */
+    void DoCancel();
+
+public: // From MUpnpNotifyTimerObserver
+
+    /**
+    * Callback from iRetrySocketTimer. This method tries to
+    * open new socket again, because last time server
+    * socket binding has failed.
+    * @since Series60 2.6
+    * @param aTimer Pointer to timer that has expired.
+    **/
+    void TimerEventL( CUpnpNotifyTimer* aTimer);
+
+public: // New functions
+
+    /**
+    * Deletes given session.
+    * @since Series60 2.6
+    * @param aSession Session to be deleted.
+    **/
+    void DeleteSession( CUpnpTcpSession* aSession );
+
+    /**
+    * Opening socket for listening
+    * @since Series60 5.0
+    **/
+    void OpenSocketL();
+
+    /**
+    * Starts to listen for incoming connections.
+    * @since Series60 5.0
+    **/
+    void BindRandomPortL();
+
+    /**
+    * Starts to listen for incoming connections.
+    * @since Series60 5.0
+    * @param aPort try to bind to port
+    **/
+    void BindL( const TInt aPort );
+
+    /**
+    * Stops TcpServer.
+    * @since Series60 2.6
+    */
+    void StopTcpServerL();
+        
+    /**
+    * Set the new IP address
+    * @since Series60 5.0 HN
+    * @param aAddr IP address to be set.
+    **/
+    void SetServerAddress( const TInetAddr& aAddr );
+
+    /**
+    * Returns the IP address of this server.
+    * @since Series60 2.6
+    * @param aAddr IP address of this server is returned to this reference.
+    **/
+    void ServerAddress( TInetAddr& aAddr );
+
+    /**
+    * Returns the port of this server.
+    * @since Series60 2.6
+    * @return Port of this server.
+    **/
+    TUint ServerPort();
+
+    /**
+    * Returns the Hardware address of active IAP.
+    * @since Series60 2.6
+    * @return HW address.
+    **/
+    TSockAddr* HWAddressL();
+
+    /**
+    * Returns a new available port number.
+    * @since Series60 2.6
+    * @return A new Port number.
+    **/
+    TInt NewPortNumberL(); 	
+
+	/**
+    * Starts retrying accepting the new connection.
+    * @since Series60 3.2
+    **/
+    void StartRetryTimer();
+
+	/**
+    * Sets file write buffer size
+    * @since Series60 2.6
+    **/
+	void SetFileWriteBufferSize(TInt aSize);
+
+
+	/**
+    * Returns file read buffer size
+    * @since Series60 2.6
+    **/
+	TInt FileWriteBufferSize();
+
+	/**
+    * Sets file read buffer size
+    * @since Series60 2.6
+    **/
+	void SetFileReadBufferSize(TInt aSize);
+
+
+	/**
+    * Returns file write buffer size
+    * @since Series60 2.6
+    **/
+	TInt FileReadBufferSize();
+
+
+protected: // New functions
+
+    /**
+    * Callback function for new connection creation.
+    * @since Series60 2.6
+    * @param aSocket Socket that is bound to new connection.
+    * @return Pointer to new CUpnpTcpSession.
+    **/
+    virtual CUpnpTcpSession* ConnectionAcceptedL( RSocket aSocket ) = 0;
+
+    /**
+    * Starts to listen a socket.
+    * @since Series60 2.6
+    * @return error code if listening start fails.
+    **/
+    TInt StartToListenL();
+
+    /**
+    * Accepts new connection ans starts to listen for new connections.
+    * @since Series60 2.6
+    **/
+    void AcceptConnectionL();
+
+    /**
+    * Gets the value of iServerAddress
+    * @param aAddr
+    * @since Series60 3.2
+    **/
+    TBool GetServerAddress(TInetAddr& aAddr);
+
+    /**
+     * Connects to the Connection Manager
+     * @since Series60 5.0
+     **/
+    void CreateConnectionManagerSessionL();
+    
+    /**
+     * Closes sockets
+     * @since Series60 5.0
+     **/
+    void CloseSockets();
+    
+     /**
+     * Prepares to close sockets
+     * @since Series60 5.0
+     **/
+    void PrepareToCloseSockets();
+    
+     /**
+     * Cancels retry timer
+     * @since Series60 5.0
+     **/
+    void CancelRetryTimer();
+
+protected:
+
+    // Connection that is used to bind the used socket server on
+    // given interface.
+    CUpnpConnectionManagerProxy *iConnectionManagerProxy;
+
+    // State of server, owned
+    TState iState;
+
+    // Socket server that is used by TcpServer, owned
+    RSocketServ* iSocketServ;
+
+    // Listening socket, owned
+    RSocket iServerSocket;
+
+    // Socket that is used to bind new connections, owned
+    RSocket iClientSocket;
+
+    // List of sessions, owned
+    RPointerArray<CUpnpTcpSession> iSessionList;
+
+    // Listening port of this server, owned
+    TUint iServerPort;
+
+    // Address of this server, owned
+    TInetAddr iServerAddress;
+
+    // Used Iap, owned
+    TInt iActiveIap;
+
+    // Timer that is used when RSocket::Open() fails. This way
+    // we try to bind listening server socket again later.
+    CUpnpNotifyTimer* iRetrySocketTimer;
+
+    // preference for connection
+    TCommDbConnPref iCommDbPref;
+
+  	// File write buffer size
+  	TInt iFileWriteBufferSize;
+
+  	// File read buffer size
+  	TInt iFileReadBufferSize;
+
+  	#ifdef RD_UPNP_REMOTE_ACCESS
+    /*******IPFiltering *******/
+    CUpnpIPFilterManager* iIPFilteringManager;
+    /*******IPFiltering *******/
+    #endif
+    
+    
+    MUpnpHttpServerTransactionCreator* iTransactionCreator;
+    
+    };
+
+#endif // C_CUPNPTCPSERVER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnptcpsession.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,532 @@
+/** @file
+* 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:  Class that is derived by CUpnpHttpSession. Implements TCP-level
+*                functionalities
+*
+*/
+
+
+#ifndef C_CUPNPTCPSESSION_H
+#define C_CUPNPTCPSESSION_H
+
+// INCLUDES
+#include <e32base.h>
+#include "upnphttpmessage.h"
+#include "upnplist.h" 
+#include "upnpnotifytimer.h"
+#include "upnpsocketshutdown.h"
+
+// FORWARD DECLARATIONS
+
+class CUpnpHttpBuffer;
+class CUpnpHttpServer;
+class CUpnpSocketShutdown;
+class RSocket;
+class CUpnpTcpSessionWriter;
+class CUpnpHttpFileTransferReader;
+class CUpnpHttpFileTransferWriter;
+class CUpnpTcpSessionReader;
+class CUpnpHttpFileAccess;
+
+// CONSTANTS
+static const TInt KErrorTimeout = 3000000;
+//when reading from a file
+static const TInt KServeFileSizeDefault = 10000;
+// Based on 7.2.9.4 (DLNA 1.5 rev 0.90)
+// We need wait until 30second for response
+static const TInt KSessionTimeout = 35000000; 
+
+static const TInt KConnectTimeout = 7000000;
+
+//default buffer size for reading from socket
+static const TInt KRcvBufSizeDefault = 10000;
+//default size for fiel content reading from a socket, must be a power of 2
+static const TInt KFileTransferReaderBufSizeDefault = 16384;
+//timeout value for awaiting 100 continue
+static const TInt K100ContinueTimeout = 5000000;
+
+// CLASS DECLARATION
+
+/**
+*  @brief CUpnpTcpSession is a class handling TCP functionality of the session.
+*   Class is responsible for managing connection and its timeout as well as
+*   for reading from and writing to socket. Those two last are directly 
+*   handled by CUpnpTcpSessionReader and CUpnpTcpSessionWriter but CUpnpTcpSession 
+*   supervises those processes.
+*  @lib DLNAWebServer.lib
+*  @since Series60 2.6
+*/  
+NONSHARABLE_CLASS (CUpnpTcpSession) : public CBase, public MUpnpNotifyTimerObserver
+    {
+       friend class CUpnpSocketShutdown;        
+public: // Constructors and destructor
+
+    /** 
+    * Constructor for building CUpnpTcpSession. 
+    * This constructor is used when connection is iniatiated from network.
+    * Second-phase construction is made by TcpConstructL().
+    * @param aSocket Pointer to new Socket.
+    * @param aPriority Priority of this session
+    * @return A new CUpnpTcpServer instance.
+    **/
+    CUpnpTcpSession( RSocket& aSocket, TThreadPriority aPriority );
+
+    /** 
+    * Virtual destructor.
+    **/
+    virtual ~CUpnpTcpSession();
+
+   
+public: // Session functionality
+    
+    void ShutdownStop();
+
+    /**
+    * Starts to receive messages to this session
+    * @since Series60 3.2
+    * @return None.
+    **/
+    void InitialReceiveL();
+    
+    /**
+    * Receive messages to this session
+    * @since Series60 3.2
+    * @return None.
+    **/
+    void ReceiveL();
+
+    /**
+    * Writes data thru this session's socket
+    * @since Series60 2.6
+    * @param aBuffer Data to write.
+    * @return None.
+    **/
+    void WriteL( const TDesC8& aBuffer );
+
+    /**
+    * Checks is session is connected.
+    * @since Series60 2.6
+    * @return ETrue, if session is connected; EFalse othewise.
+    **/
+    TBool IsConnected();
+
+    /**
+    * Returns the address that session is connected to.
+    * @since Series60 2.6
+    * @return Address of remote endpoint of session's socket.
+    **/
+    TInetAddr& RemoteHost();
+
+    /**
+    * Starts the timeoutTimer for session. If timer expires, no reply has 
+    * been sent to remote host.
+    * @since Series60 2.6
+    * @param aSessionErrorReplyNeeded ETrue, if in timeout there should be
+    * sent HTTP error 408 Server timeout.
+    **/
+    void StartTimeoutTimer( TBool aSessionErrorReplyNeeded );
+
+    /**
+    * Starts the timeoutTimer for session. Session is deleted after 0.5ms by default.
+    * @since Series60 2.6
+    **/
+    void StartDisconnectingTimer(TInt aTime = 500);
+    
+    /**
+    * Starts disconnect session.
+    * @since Series60 3.2
+    **/
+    
+    void StartDisconnect( TBool aDisconnectNotification = EFalse );
+    
+    /**
+    * Function that is used to send notification to client and disconnect 
+    * the session.
+    * @since Series60 2.6
+    **/
+    void ServerBusyL();
+    
+    /**
+    * Returns the SessionId of this session.
+    * @since Series60 3.1
+    * @return SessionId.
+    **/
+    TInt Id();
+
+public: // Callback functions for reader and writer
+
+    /**
+    * Handles possible error that can occure in the session as well as
+    * in reader and writer active objects.
+    * @since Series60 3.0
+    * @param aError error code
+    **/
+    void HandleErrorL( TInt aError  );
+    
+    /**
+    * Callback function for reader object. When the reader gets some 
+    * data, it forwards it to the session with this callback.
+    * @since Series60 3.0
+    * @param aBuffer buffer with received data.
+    **/
+    void ReceivingCompletedL( TDesC8& aBuffer );
+    
+    /**
+    * Callback function for writer object. When the request writing is
+    * completed then writer calls this function to notify session about it.
+    * @since Series60 3.0
+    **/
+    void WritingCompletedL();
+    
+    /**
+    * Callback function for writer object. When the request writing is
+    * not completed due to an error, a new attempt to write is being made...
+    * @since Series60 3.2
+    **/
+    void WaitRetryError(TInt aError, TBool aStartTimer = EFalse);    
+     /** 
+    * Second phase constructor for building CUpnpTcpSession. 
+    * This constructor is used when connection is iniatiated from network.
+    * @param aSocket Pointer to new Socket which is already connected 
+    *  to remote host.
+    * @return None
+    **/
+    void TcpConstructL( RSocket aSocket, TInt aReadBufferSize, TInt aFileReadBufferSize );
+
+   
+    /** 
+    * Cancels TcpReader
+    * @return None.
+    **/
+    void CancelTcpReader();
+    
+
+public: // virtual callback functions
+
+    /**
+    * Callback function. Called when data has been received.
+    * @since Series60 2.6
+    * @param aBuffer Data that has been received thru session.
+    **/
+    virtual void BufferReceivedL( TDesC8& aBuffer ) = 0;
+    
+    /**
+    * Callback function. Deletes given session.
+    * @since Series60 2.6
+    * @param aSession Session to delete.
+    **/
+    virtual void DeleteThisSessionL( CUpnpTcpSession* aSession ) = 0;
+
+    /**
+    * Checks if FileServe Exists.
+    * @since Series60 2.6
+    * @return ETrue, if fileServe exists; EFalse otherwise.
+    **/
+    virtual TBool FileServeExists() = 0;
+
+    /**
+    * Callback function. Notifies upper layers that session has been disconnected.
+    * @since Series60 2.6
+    * @param aAddr Address of remote host.
+    **/
+    virtual void NotifyDisconnectL( TInetAddr aAddr ) = 0;
+    virtual void NotifyTimeoutL() = 0;
+    
+    //file transfer reader callbacks
+    
+    /**
+    * Callback function. Notifies http session when upload finished
+    * @since Series60 3.2    
+    **/
+    virtual void FileTransferReaderDoneL() = 0;
+    
+    /**
+    * Callback function. Notifies http session when error in upload
+    * @since Series60 3.2    
+    **/
+    virtual void FileTransferReaderErrorL(TInt aError) = 0;
+    
+    /**
+    * Callback function. Notifies http session when download finished
+    * @since Series60 3.2    
+    **/
+    virtual void FileTransferWriterDoneL() = 0;
+    
+    /**
+    * Callback function. Checks for outstanding downloads
+    * @since Series60 3.2    
+    **/
+    virtual void FileTransferWriterHandleMoreL() = 0;
+    
+    /**
+    * Callback function. Notifies upper layers that SocketServer is busy.
+    * @since Series60 2.6
+    * @param aAddr Address of remote host.
+    **/
+    virtual void SocketServerBusyL( const TInetAddr& aAddr ) = 0;
+
+    /**
+    * Callback function. Deletes fileserve of this session.
+    * @since Series60 2.6
+    **/
+    virtual void DeleteServeFileL() = 0;
+    
+    /**
+    * Returns a pointer to FileAccess object of this session.
+    * @since Series60 3.2
+    * @return Pointer to FileAccess object.
+    **/
+    virtual CUpnpHttpFileAccess* FileAccess()=0;
+
+    /**
+    * Callback function. Returns the port number of parent HttpServer.
+    * @since Series60 2.6
+    * @return Portnumber of http server.
+    **/
+    virtual TInt ServerPort() = 0;
+
+    /**
+    * Callback function. Checks if connection uses Connection: Close 
+    * header, and if so, tries to parse message and send it to upper layers.
+    * @since Series60 2.6
+    **/
+    virtual void CheckConnectionCloseL() = 0;
+
+    /**
+    * Callback function. Informs upper layers that HTTP POST has been started 
+    * by sending HTTP error code 801 message to upper layers.
+    * @since Series60 2.6
+    **/
+    virtual void NotifyUpperLayersOnPostL() = 0;
+
+    /**
+    * Callback function. Informs upper layers that HTTP POST has been finished 
+    * @since Series60 2.6
+    **/
+    virtual void PostingFileCompleteL() = 0;
+    
+public: // From MNotifyTimeObserver
+
+    /**
+    * Callback function for timer expirations.
+    * @since Series60 2.6
+    * @param aTimer Timer that has expired.
+    **/
+    void TimerEventL( CUpnpNotifyTimer* aTimer );   
+    
+    /**
+    * Cancel timer
+    * @since Series60 3.2
+    **/
+    void TimerCancel();
+ 
+    /**
+    * Handles disconnect request
+    * @since Series60 3.2
+    **/
+    void DisconnectRequestL();      
+    
+    /**
+    * Starts closing the session, no more message to be sent to the client
+    * @since Series60 3.2
+    **/
+    void StartClosingSession();
+    
+     /**
+    * Marked if a persistent connection
+    * @since Series60 3.2
+    **/
+    TBool IsPersistentConnection();
+    
+     /**
+    * Returns pointer to CUpnpHttpFileTransferReader
+    * @since Series60 3.2
+    * @return CUpnpHttpFileTransferReader*
+    **/
+    CUpnpHttpFileTransferReader* FileTransferReader();
+    
+     /**
+    * Returns pointer to CUpnpHttpFileTransferWriter
+    * @since Series60 3.2
+    * @return CUpnpHttpFileTransferWriter*
+    **/
+    CUpnpHttpFileTransferWriter* FileTransferWriter();
+            
+    /**
+    * Checks if there are outstanding sending operations.
+    * @since Series60 3.2
+    * @return TBool
+    **/
+    TBool DownloadOngoing();
+    
+    /**
+    * Checks if the session is being shutdown
+    * @since Series60 3.2
+    * @return TBool
+    **/
+    TBool ShuttingDown() ;
+      /**
+    * Returns current value of the timeout
+    * @since Series60 3.2
+    * @return TInt
+    */
+    
+     /**
+    * Closes the socket
+    * @since Series60 3.2
+    */
+    void CloseSocketL();
+
+    TInt TimeoutCurrentValue();  
+private: // private enumerations
+
+    /**
+    * State of session.
+    *   - EnotConnected - Connection is not established yet.
+    *   - EConnecting - TcpSession requested connection in asynchronous mode.
+    *   - EConnected  - Connection is established, TcpReader is started and TcpWriter 
+    *                 can write to the socket.
+    *   - EDisconnecting - Session is about to be disconnected but socket is not closed
+    *                 so TcpWriter can still write a response.
+    *   - EServerBusy - Server is already occupied with processing requests so no other
+    *                 session can be established.
+    **/
+    enum TUpnpTcpSessionState 
+      {
+      ENotConnected,
+      EConnecting,
+      EConnected,
+      EDisconnecting,
+      EShuttingDownWriteWait,
+      EShuttingDownStop,
+      EShuttingDown,
+      EServerBusy
+      };
+      
+private: // New functions
+  
+    /**
+    * Sets session statel.
+    * @since Series60 2.6
+    * @param aState new state of the session.
+    **/
+    void SetState( TUpnpTcpSessionState aState );
+    
+    /**
+    * Checks if there are outstanding writing operations.
+    * @since Series60 3.2
+    * @return TBool
+    **/
+    TBool OutstandingWritings();
+
+protected:
+    
+     /**
+    * Contructs file transfer reader
+    * @since Series60 3.2
+    **/
+    void FileTransferReaderConstructL();
+    
+    virtual void DestroyIt(CUpnpTcpSession* aSession ) = 0;
+
+
+    /**
+    * Contructs file transfer writer
+    * @since Series60 3.2
+    **/
+    void FileTransferWriterConstructL(TInt aWriteSize);    
+    
+protected:  
+    
+    TInt iFileReadBufferSize;
+    // Session's socket, owned
+    RSocket iSocket;
+
+    // Address of remote host, owned
+    TInetAddr iAddr;
+
+    // iTcpReader, active object to control reads from the socket.
+    // Owned by CUpnpTcpSession object.
+    CUpnpTcpSessionReader* iTcpReader;
+    
+    // iFileTransferReader, active object to control reads from the socket.
+    // Owned by CUpnpTcpSession object.
+    CUpnpHttpFileTransferReader* iFTReader;
+    
+    // iFileTransferWriter, active object to control writes from the socket.
+    // Owned by CUpnpTcpSession object.
+    CUpnpHttpFileTransferWriter* iFTWriter;
+
+    // iTcpWriter, active object to control writes to the socket.
+    // Owned by CUpnpTcpSession object.
+    CUpnpTcpSessionWriter* iTcpWriter;
+    
+    // Timer that is used to disconnect session when timeout expires, owned
+    CUpnpNotifyTimer* iTimeoutTimer;
+    
+    // Buffer that is used to receive messages. See CUpnpHttpBuffer.
+    CUpnpHttpBuffer* iReceivedMessage;
+
+    // Session id of this session, owned
+    TInt iId;
+
+    // State of session, owned
+    TUpnpTcpSessionState iState;
+
+    // ETrue, if session is meant to be kept alive; EFalse otherwise, owned
+    TBool iSessionKeepAlive;
+    
+    // ETrue, if session needs 408 HTTP error on timeout, owned
+    TBool iSessionNeedsErrorReply;
+    
+    // Used with session disconnects. If ETrue, session send notification 
+    // of disconnect to upper layers, owned
+    TBool iDisconnectNotification;
+    
+    //Flag set true if any pending requests are left in a pipeline awating to be proccessed
+    TBool iPendingPostRequests;
+
+    // value that is used to check if downloaded content should be saved 
+    // into a file.
+    TBool iSaveToFile;
+
+    // The current value of timeout, changes dependent on a operation-connecting, sending,...
+    TInt iTimeoutCurrentValue;
+    
+    // Timeout that defines the session length
+    TInt iTimeoutSessionValue;
+    
+    // Flag indicating if POST message with header "Expect: 100-continue"
+    // was received and server should wait for download of body after
+    // sending permission to continue download.
+    TBool iContinuedMessageDownload;
+    
+    // Initial priority, priority set for message that initialize this session
+    TThreadPriority iInitialPriority;
+    
+    //flag for indicating a persistant connection
+    TBool iIsPersistent;
+    
+    // Implementation of the socket shutdown algorithm
+    CUpnpSocketShutdown *iSocketShutdown;
+    
+    // Retry counter during export action
+    TInt iExportRetryCounter;
+    
+    TInt iSessionError;
+    };
+
+#endif // C_CUPNPTCPSESSION_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnptcpsessionreader.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,196 @@
+/** @file
+* 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:  CUpnpTcpSessionReader is a class responsible for 
+*                   asynchronous reading from socket owned by CUpnpTcpSession.
+*
+*/
+
+
+
+#ifndef C_CUPNPTCPSESSIONREADER_H
+#define C_CUPNPTCPSESSIONREADER_H
+
+
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnpnotifytimer.h"
+
+class CUpnpTcpSession;
+
+/**
+ *  CUpnpTcpSessionReader is responsible for asynchronous reading.
+ *  Reader starta reading in asynchronous mode. Issues reading and then waits 
+ *  for the operation to be completed. When it is completed then received
+ *  data is forwarded to upper layer - CUpnpTcpSession and the new read 
+ *  operation is issues. This continues in loop until the Cancel() is invoked
+ *  or object is destroyed.
+ *  @lib DLNAWebServer.lib
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS (CUpnpTcpSessionReader) : public CActive, MUpnpNotifyTimerObserver
+    {
+
+public: // Constructors and destructors
+    
+    /**
+    * CUpnpTcpSessionReader factory method.
+    * @since Series60 2.6
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    * @return new CUpnpTcpSessionReader object's instance.
+    */
+    static CUpnpTcpSessionReader* NewL( CUpnpTcpSession& aSession,
+                                        RSocket& aSocket,
+                                        TThreadPriority aPriority,
+                                        TInt aBufferSize );
+    
+    /**
+    * Virtual destructor.
+    * @since Series60 2.6
+    */                             
+    virtual ~CUpnpTcpSessionReader();
+    
+public: // New functions
+    
+    /**
+    * Starts reading in asynchronous mode.
+    * @since Series60 2.6
+    */
+    void Start();
+  
+    /**
+    * Cancel the timers
+    * @since Series60 3.2
+    */
+    void CancelTimers();
+
+protected: // Functions from CActive
+   
+    /**
+    * Cancels issued reading request.
+    * Standard active object function
+    * @since Series60 2.6
+    */
+    void DoCancel();
+    
+     /**
+    * Function called when the read request is finished.
+    * Standard active object function
+    * @since Series60 2.6
+    */
+    void RunL();
+    
+    /**
+    * Trap RunL leaves
+    * Standard active object function
+    * @since Series60 2.0
+    */
+    TInt RunError( TInt aError );
+
+private: // Constructors and destructors
+
+    /**
+    * CUpnpTcpSessionReader constructor.
+    * @since Series60 2.6
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    */
+    CUpnpTcpSessionReader( CUpnpTcpSession& aSession,
+                           RSocket& aSocket,
+                           TThreadPriority aPriority,
+                           TInt aBufferSize  );
+    
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @since Series60 2.6
+    */
+    void ConstructL();
+
+private: // New functions
+
+    /**
+    * Issues reading in asynchronous mode.
+    * @since Series60 2.6
+    */
+    void IssueRead();
+    
+        /**
+    * Callback function for timer expirations.
+    * @since Series60 2.6
+    * @param aTimer Timer that has expired.
+    **/
+	void TimerEventL( CUpnpNotifyTimer* /*aTimer*/ );
+
+    /**
+    * Starts the cancel timer.
+    * @since Series60 3.2
+    */
+    void StartCancelTimer();
+    
+private: 
+    
+    /**
+    * Socket from which the data will be read, not owned.
+    */
+    RSocket& iSocket;
+
+    /**
+    * Reference to session that owns this reader.
+    * Session is notified when reader read some data and when 
+    * errors occure, not owned.
+    */
+    CUpnpTcpSession& iSession;
+
+    /**
+    * Buffer that is used to receive data to session.
+    * Own.
+    */
+    RBuf8 iReceiveBuffer;
+
+    /**
+    * Length of data that has been received.
+    */
+    TSockXfrLength iLen;
+    	
+  	// Read buffer size
+  	TInt iBufferSize;
+    
+    /**
+    * Timer used for retry process.
+    */
+    CUpnpNotifyTimer *iRetryTimer;
+
+    /**
+    * Timer used for cancel reciving process.
+    */
+    CUpnpNotifyTimer *iCancelTimer;
+
+    /**
+    * Variable indicating when the cancel was called from cancel timer.
+    */
+    TBool iCancelFromTimer;
+
+    /**
+    * Count of reading errors.
+    */
+    TInt iRetryErrorCount;
+
+    };
+
+
+#endif // C_CUPNPTCPSESSIONREADER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/inc/upnptcpsessionwriter.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,241 @@
+/** @file
+* 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:  CUpnpTcpSessionWriter is a class responsible for 
+*                   asynchronous writing to a socket owned by CUpnpTcpSession.
+*
+*/
+
+
+
+#ifndef C_UPNPTCPSESSIONWRITER_H
+#define C_UPNPTCPSESSIONWRITER_H
+
+
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnpretrywrite.h"
+
+class CUpnpTcpSession;
+class CUpnpTcpWriteRequest;
+
+    
+/**
+ *  CUpnpTcpSessionWriter is responsible for asynchronous writing.
+ *  Writer class is owned by CUpnpTcpSession which request asynchronous 
+ *  writing from it and is notified by writer when the write request 
+ *  is completed or an error occured.
+ *  When writer receives data to send it checks if it can be sent to the socket
+ *  right away and if session is not yet connected or writer already sends data
+ *  then it queues incoming data. When writing to the socket ends, writer checks 
+ *  if there is data in queue waiting for sending. If thereis then it issues writing it 
+ *  until the queue is empty. After writing all data, the writer notifies session about
+ *  completion of the writing taska and switches to waiting state until it receives 
+ *  another write request.
+ *  @lib DLNAWebServer.lib
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS (CUpnpTcpSessionWriter) : public CActive, MUpnpRetryWriteObserver
+    {
+public:
+
+    /**
+    * CUpnpTcpSessionWriter factory method.
+    * @since Series60 2.6
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    * @return ?description
+    */
+    static CUpnpTcpSessionWriter* NewL( CUpnpTcpSession& aSession,
+                                        RSocket& aSocket, 
+                                        TThreadPriority aPriority );
+
+    /**
+    * Virtual destructor.
+    * @since Series60 2.6
+    */   
+    virtual ~CUpnpTcpSessionWriter();
+
+public: // New functions
+    
+    /**
+    * Issues writing in asynchronous mode.
+    * @since Series60 2.6
+    * @param aData buffer with data to write.
+    */
+    void IssueWriteL( const TDesC8& aData );
+    
+    
+    /**
+    * Function used by CUpnpTcpSession that owns the writer
+    * to notify if socket is connected and if writer can write data.
+    * @since Series60 2.6
+    * @param aConnected
+    */
+    void SessionConnected( TBool aConnected );
+    
+    /**
+    * Returnes true if there are some write request queued and
+    *   false if all data has been sent already.
+    * @since Series60 2.6
+    * @return true if there are some write request queued and
+    *   false if all data has been sent already.
+    */
+    TBool HasWriteRequestsToSend();
+    
+    /**
+    * Returns if retrying of writng occurs
+    * @since series60 3.2
+    * @return ETrue/EFalse
+    */  
+    TBool IsRetrying();
+
+    /**
+    * Returns if writer is writing some data at the moment.
+    * @since series60 2.6
+    * @return true if writer writes data at the moment.
+    */  
+    TBool IsWriting();
+
+protected: // Functions from base CActive
+    
+    /**
+    * Cancels issued writing request.
+    * Standard active object function
+    * @since Series60 2.6
+    */
+    void DoCancel();
+    
+    /**
+    * Function called when the write request is finished.
+    * Standard active object function
+    * @since Series60 2.6
+    */
+    void RunL();
+    
+    /**
+    * Trap RunL leaves
+    * Standard active object function
+    * @since Series60 2.0
+    */
+    TInt RunError( TInt aError );
+    
+private: // Constructors and destructors
+    
+    /**
+    * CUpnpTcpSessionWriter constructor.
+    * @since Series60 2.6
+    * @param aSession session that runs and supervises reader.
+    * @param aSocket socket from which data will be read.
+    * @param aPriority priority with which the reader will be working.
+    */
+    CUpnpTcpSessionWriter( CUpnpTcpSession& aSession,
+                           RSocket& aSocket,
+                           TThreadPriority aPriority );
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @since Series60 2.6
+    */
+    void ConstructL();
+
+
+private: // New functions
+
+    /**
+    * Sends next queued write request if such exists.
+    * @since Series60 2.6
+    */
+    void SendNextWriteRequestL();
+    
+private: // from MUpnpRetryWriteObserver
+	
+    /**
+    * Called when retrying of writing was succesed.
+    * @since Series60 3.2
+    */
+	void RetryWriteSucceed();
+
+    /**
+    * Called when retrying of writing fail.
+    * @since Series60 3.2
+    */
+	void RetryWriteFailL( TInt aError );
+
+private: // Enumerations
+
+    /**
+    * TWriteState, records whether a write request is pending.
+    *   - EnotConnected Socket is not yet connected so writer cannot write.
+    *   - EWriting  A write request is pending with the socket server.
+    *   - EWaiting  The idle state for this object. Socket is connected
+    *               and the writer waits for write requests form session.
+    *   - EDisconnected Session is already disconnected so don't write and don't 
+    *               queue requests.
+    */
+    enum TWriterState
+        {
+        ENotConnected,
+        EWriting,
+        EWaiting,
+        EDisconnected
+        };
+
+private: 
+    
+    /**
+    * Socket used for writing data, not owned.
+    */
+    RSocket& iSocket;
+
+    /**
+    * Reference to session that owns the writer.
+    * Session is request writing and is notified when it's finished or
+    * errors occure, not owned.
+    */
+    CUpnpTcpSession& iSession;
+
+    /**
+    * State of the writer.
+    */
+    TWriterState iState;
+
+    /**
+    * Buffer that is used to send data to session.
+    * Own.
+    */
+    RBuf8 iSendBuffer;
+
+    /**
+    * List of write requests. If session is unable to send data to session,
+    * it is put into write request list.
+    * Own.
+    */
+    RPointerArray<CUpnpTcpWriteRequest> iWriteRequestList;
+    
+    /**
+    * Initial priority of the active object.
+    */
+    TThreadPriority iInitialPriority;
+    
+    /**
+    * Implementation of retrying write to the socket
+    */
+    CUpnpRetryWrite* iRetryWrite;
+
+    };
+
+#endif // C_UPNPTCPSESSIONWRITER_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpbuffer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,952 @@
+/** @file
+* 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:  Declares HttpServer class.
+*
+*/
+
+
+// INCLUDE FILES
+#include <libc/limits.h>
+#include "upnphttpbuffer.h"
+#include "upnphttpserver.h"
+#include "upnpcons.h"
+#include "upnphttpsession.h"
+#include "upnphttpfileaccess.h"
+#include "upnphttpfiletransferreader.h"
+#include "upnphttpchunkparser.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "upnpcons.h"
+#include "httperr.h"
+// CONSTANTS
+
+const TInt KMaxBufferLength = 10240;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpBuffer* CUpnpHttpBuffer::NewL( CUpnpHttpSession* aSession, TBool aToBeSavedInFile )
+	{
+LOGS("CUpnpHttpBuffer::NewL(CUpnpHttpSession*, TBool)");
+	CUpnpHttpBuffer* self = new (ELeave) CUpnpHttpBuffer( aSession, aToBeSavedInFile );
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop( self );
+	
+	return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::~CUpnpHttpBuffer
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpBuffer::~CUpnpHttpBuffer()
+	{
+LOGS("CUpnpHttpBuffer::~CUpnpHttpBuffer()");
+
+	iBuffer.Close();
+    delete iChunkParser;
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::CUpnpHttpBuffer
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpBuffer::CUpnpHttpBuffer( CUpnpHttpSession* aSession, TBool aToBeSavedInFile )
+	{
+	iContentLength = -1;
+	iSession = aSession;
+	iToFile = aToBeSavedInFile;
+	iContentLengthCounter = 0;
+	iErrorCodeCheckedForSaving = EFalse;
+	iOkToSaveToFile = EFalse;
+	iFileReadBufferSize = aSession->HttpServer()->FileReadBufferSize();
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::ConstructL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpBuffer::ConstructL()
+	{
+	iBuffer.Create( 0 );
+	iChunkParser = CUpnpHttpChunkParser::NewL();
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::AppendHeadersL
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpBuffer::AppendHeadersL( TDesC8& aBuffer, TBool aToBeSavedInFile )
+{
+	TInt PosOfDoubleLineFeed ( KErrNotFound );
+	
+	LOGS("CUpnpHttpBuffer::AppendL(TDesC8&)");
+	
+	if ( !IsHeaderReady() )
+		{
+		 iToFile = aToBeSavedInFile;
+		// header not yet ready. Checking if it gets ready with this received buffer
+		PosOfDoubleLineFeed = aBuffer.FindF( UpnpString::KDoubleLineFeed );
+		
+//trying to find double linefeed by spliiitng line
+		
+			if (iBuffer.Length() > 0)
+				{
+				if( !iBuffer.Right(UpnpString::KLineFeedLength).CompareF( UpnpString::KLineFeed) 
+					&& !aBuffer.FindF(UpnpString::KLineFeed) )
+					{
+					PosOfDoubleLineFeed = iBuffer.Length() - UpnpString::KLineFeedLength;
+					}				
+				else if	(!iBuffer.Right(UpnpString::KCRLength).CompareF(UpnpString::KCR) 
+					&& !aBuffer.FindF(UpnpString::KLFCRLF))				
+					{
+					PosOfDoubleLineFeed = iBuffer.Length() - UpnpString::KCRLength;
+					}
+				else if	(!iBuffer.Right(UpnpString::KCRLFCRLength).CompareF(UpnpString::KCRLFCR)  
+					&& !aBuffer.FindF(UpnpString::KLinefeed))				
+					{
+					PosOfDoubleLineFeed = iBuffer.Length() - UpnpString::KCRLFCRLength;
+					}
+				//if double linefeed there are not found by splitting line
+				//may be it (all double linefeed) is in ne line	
+				else if ( PosOfDoubleLineFeed != KErrNotFound )
+					{
+					PosOfDoubleLineFeed += 	iBuffer.Length();			
+					}
+				}
+		
+		if ( PosOfDoubleLineFeed == KErrNotFound )
+			{
+			// double linefeed not found, so only adding unfinished headers to 
+			// iBuffer
+			
+			if (iBuffer.Length() <= KMaxBufferLength )    //10kb
+				{
+				    iBuffer.ReAllocL( iBuffer.Length() + aBuffer.Length() );
+					iBuffer.Append( aBuffer );
+				}
+			
+			}
+		else
+			{
+			//  Double linefeed found. Appending headers and then checking if 
+			// response is OK.
+			TInt afterDoubleLineFeed = PosOfDoubleLineFeed + UpnpString::KDoubleLineFeedLength - iBuffer.Length();
+			iBuffer.ReAllocL(PosOfDoubleLineFeed + UpnpString::KDoubleLineFeedLength);
+			iBuffer.Append( aBuffer.Left(afterDoubleLineFeed));
+
+            // is headers checked
+    		if( !iErrorCodeCheckedForSaving )
+    		    {
+    		    TInt messageError = MessageErrorCode( iBuffer );
+    		    TPtrC8 method = Method();
+    		    TPtrC8 target = Target();
+    		    
+    		    if(method == KHttpPost ) 
+    		        {
+    		        messageError = EHttpOk;
+    		        }
+    		    
+    		    _LIT8( KControl, "/control");
+    		    
+    		    if( method.FindC( KHttpPost() ) == 0 && 
+    		        method.Length() == KHttpPost().Length() 
+    		        )
+    		        {
+        		    TInt lastSlash = target.LocateReverse('/');
+        		    if( lastSlash > KErrNotFound )
+        		        {
+            		    target.Set( target.Mid( lastSlash ) );
+            		    }
+                    }
+    		    
+    		    if ( messageError == EHttpOk || messageError == EHttpPartialContent )
+    		        {
+                    iOkToSaveToFile = ETrue;
+    		        }
+    		        
+    		    // if EXPORTING, then saving to file
+    		    else if( method.FindC( KHttpPost() ) == 0 &&
+                            method.Length() == KHttpPost().Length() &&
+                            target.FindC( KControl ) != 0 )
+                    {
+                    iOkToSaveToFile = ETrue;
+    		        }
+    		    else
+    		        {
+    		        iOkToSaveToFile = EFalse;
+    		        CUpnpHttpFileAccess* temp = iSession->FileAccess();
+    		        // Delete only downloaded file if it is not complete.
+       		        if( temp && temp->Download() )
+	       		        {
+                        temp->DeleteFile();
+	                    // no delete, not owned
+	        		    temp = NULL;
+	       		        }
+    		        }
+    		    // error code checked, no need to check it again.
+    	        iErrorCodeCheckedForSaving = ETrue;
+    		    }
+
+    		return afterDoubleLineFeed;
+			}
+		}
+
+	return PosOfDoubleLineFeed;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::AppendL
+// This function appends the aBuffer data at the end of this HTTPBuffer.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpBuffer::AppendL( TDesC8& aBuffer, TBool aToBeSavedInFile)
+	{
+	TInt retVal ( KErrNone );
+	
+	LOGS("CUpnpHttpBuffer::AppendL(TDesC8&)");
+	
+	if ( !IsHeaderReady() )
+		{
+		TInt PosOfDoubleLineFeed = AppendHeadersL( aBuffer, aToBeSavedInFile );
+
+		if ( PosOfDoubleLineFeed > KErrNotFound )
+		{
+			TInt afterDoubleLineFeed = PosOfDoubleLineFeed + UpnpString::KDoubleLineFeedLength - iBuffer.Length();
+    		TPtrC8 AppendPointer( aBuffer.Right( aBuffer.Length() - PosOfDoubleLineFeed ) );
+			//for file upload, data copied to the file transfer reader
+			if(iToFile && iOkToSaveToFile 
+				&& iSession->FileTransferReader() && iSession->FileTransferReader()->Activated())
+				{
+				if(AppendPointer.Length() > 0)
+					iSession->FileTransferReader()->AppendL(AppendPointer);
+				}
+			else if ( IsChunked() )
+				{
+				iPos =  iBuffer.Length();											
+				retVal = ParseL( AppendPointer );
+				}
+			else
+				{
+				iBuffer.ReAllocL( iBuffer.Length() + aBuffer.Length() );
+				iBuffer.Append( AppendPointer );				
+				}
+			}
+		}
+	else
+		{
+		if( !iErrorCodeCheckedForSaving )
+		    {
+		    TInt messageError = MessageErrorCode( iBuffer );
+		    if ( messageError == EHttpOk || messageError == EHttpPartialContent )
+		        {
+                iOkToSaveToFile = ETrue;
+		        }
+		    else
+		        {
+		        iOkToSaveToFile = EFalse;
+   		        CUpnpHttpFileAccess* temp = iSession->FileAccess();
+   		        if( temp )
+   		            {
+    		        temp->DeleteFile();
+                    // no delete, not owned
+    		        temp = NULL;
+    		        }
+		        }
+		    // error code checked, no need to check it again.
+	        iErrorCodeCheckedForSaving = ETrue;
+		    }
+		
+		//for file upload, data copied to the file transfer reader
+		if(iToFile && iOkToSaveToFile &&
+			iSession->FileTransferReader() && iSession->FileTransferReader()->Activated())
+			{
+			if(aBuffer.Length() > 0)
+				iSession->FileTransferReader()->AppendL(aBuffer);
+			return retVal;
+			}
+			    
+		if ( IsChunked() )
+			{
+			retVal = ParseL( aBuffer );
+			}
+		else
+			{
+			iBuffer.ReAllocL( iBuffer.Length() + aBuffer.Length() );
+			iBuffer.Append( aBuffer );
+			}
+	    }
+	return retVal;
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::ParseL
+// Decodes chunked messages.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpBuffer::ParseL( TDesC8& aBuffer )
+    {
+    iBuffer.ReAllocL( iBuffer.Length() + aBuffer.Length() );
+    iBuffer.Append( aBuffer );
+    return Parse( iBuffer, iPos ) < 0 ? KErrHttpUnknownParseState: KErrNone;                  
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::Parse
+// Decodes chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//	
+TInt CUpnpHttpBuffer::Parse(TDes8& aBuffer, TInt& aPos)
+    {    
+    if( aPos >= aBuffer.Length() )
+        {
+        iChunkParser->Reset();
+        return KErrNone;
+        }
+    return iChunkParser->Parse( aBuffer, aPos );		
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::IsReady
+// Returns ETrue, if buffer is ready to be converted to HTTPMessage 
+// else returns EFalse.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpBuffer::IsReadyL()
+	{
+LOGS("CUpnpHttpBuffer::IsReady()");
+	if ( IsHeaderReady() )
+		{
+		//Assuming here that HTTP GET -requests may not have a body.
+		//So if a HTTP GET request arrives and it has a CONTENT-TYPE or a 
+		//CONTENT-LENGHT header we may still serve the file
+		TPtrC8 method = Method();
+		if ( method.FindC( KHttpGet() ) == 0 )
+		    {
+		    return ETrue;
+		    }
+		if ( HasBody() )
+			{
+			return IsBodyReadyL();
+			}
+		else 
+			{
+			return ETrue;
+			}
+		}
+	return EFalse;
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::IsHeaderReady
+// Returns ETrue, if header part of HTTPMessage is ready, else returns EFalse.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpBuffer::IsHeaderReady()
+	{
+LOGS("CUpnpHttpBuffer::IsHeaderReady()");
+	if ( iBuffer.Find( UpnpString::KDoubleLineFeed() ) > KErrNotFound )
+		{
+		return ETrue;
+		}
+	else
+		{
+		return EFalse;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::IsBodyReadyL
+// Returns ETrue, if body part of HTTPMessage is ready, else returns EFalse.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpBuffer::IsBodyReadyL()
+	{
+LOGS("CUpnpHttpBuffer::IsBodyReadyL()");
+	TInt bodyStart = iBuffer.FindF( UpnpString::KDoubleLineFeed );
+	TInt contLength = ContentLengthL();
+	if ( IsChunked() )
+		{
+		return ChunkTransferFinished();
+		}
+	else
+		{
+		if ( iHasContentType )
+			{	
+			TPtrC8 body = iBuffer.Mid( bodyStart + 
+                UpnpString::KDoubleLineFeed().Length() );
+			return body.Find( UpnpString::KDoubleLineFeed() ) != KErrNotFound;
+			}
+		}
+
+	TPtrC8 tempPtr;
+	if ( iToFile && iOkToSaveToFile )
+		{
+		if ( iContentLengthCounter >= contLength )
+			{
+			return !(IsChunked() && !ChunkTransferFinished());
+			}
+		else
+			{
+			return EFalse;		
+			}
+		}
+	else
+		{
+		tempPtr.Set( iBuffer.Mid( bodyStart + UpnpString::KDoubleLineFeedLength ) );		
+		if (  tempPtr.Length() >= contLength )
+			{
+			return !(IsChunked() && !ChunkTransferFinished());
+			}
+		else
+			{
+			return EFalse;
+			}
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::BytesInBuffer
+// Returns the length of entire buffer.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpBuffer::BytesInBuffer()
+	{
+LOGS("CUpnpHttpBuffer::BytesInBuffer()");
+	return iBuffer.Length();
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::RemoveL
+// This function deletes aLength bytes from the beginning of HTTPBuffer.
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpBuffer::RemoveL( TInt aLength )
+	{
+LOGS1("CUpnpHttpBuffer::RemoveL(%i)", aLength);
+	if ( aLength <= iBuffer.Length() )
+		{
+		iBuffer.Delete( 0, aLength );
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::ChunkTransferFinished
+// Returns ETrue, if chunk encoded message is finished.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpBuffer::ChunkTransferFinished()
+	{
+LOGS("CUpnpHttpBuffer::ChunkTransferFinished()");
+	return iChunkParser->IsFinished();
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::HasBody
+// Returns ETrue, if message has body, else returns EFalse.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpBuffer::HasBody()
+	{
+LOGS("CUpnpHttpBuffer::HasBody()");
+	if( IsChunked() )
+		{
+		return ETrue;
+		}
+TInt endOfHeader = iBuffer.Find( UpnpString::KDoubleLineFeed );
+if (endOfHeader>0)
+	{TPtrC8 tmp = iBuffer.Mid(0, endOfHeader);
+	if ( tmp.FindC( UpnpHTTP::KContentLength() ) > -1 )
+		{
+		iHasContentType = EFalse;
+		return ETrue;
+		}
+	else if ( tmp.FindC( UpnpHTTP::KContentType() ) > -1)
+		{
+		iHasContentType = ETrue;
+		return ETrue;
+		}
+	else 
+		{
+		iHasContentType = EFalse;
+		return EFalse;
+		}
+	}
+else
+	{
+	iHasContentType = EFalse;
+	return EFalse; //no end of the header, not possible to judge if there is a body	
+	}
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::IsChunked
+// Returns ETrue, if message's header contains "Transfer-encoding: 
+// Chunked" -header.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpBuffer::IsChunked()
+	{
+	LOGS("CUpnpHttpBuffer::IsChunked()");	
+	TInt endOfHeader = iBuffer.Find( UpnpString::KDoubleLineFeed );	
+		
+	// to check only first 2k of data or whole portion with all headers 
+	// if they are bigger	
+	TPtrC8 TranferCodingPointer;
+	if (endOfHeader <= UpnpSSDP::KMaxMessageLength)
+		TranferCodingPointer.Set( iBuffer.Left( endOfHeader + UpnpString::KLineFeedLength ) ); 
+	else 
+		TranferCodingPointer.Set( iBuffer.Left( UpnpSSDP::KMaxMessageLength ) ); 
+
+	TInt TransferEncodingIndex = 
+        TranferCodingPointer.FindC( UpnpHTTP::TransferEncoding );
+
+	if ( TransferEncodingIndex == KErrNotFound ) 
+		{
+		return EFalse;
+		}
+	else
+		{
+		TInt correct = 0;
+		TInt transferHeaderLength = 0;
+		correct = TransferEncodingIndex;
+		transferHeaderLength = UpnpHTTP::TransferEncoding().Length();
+
+		TPtrC8 tempPtr = iBuffer.Mid( correct + transferHeaderLength, 
+            iBuffer.Length() - correct - transferHeaderLength );
+	
+		TInt LineFeedAfterTransferCoding = tempPtr.FindF( UpnpString::KLineFeed );
+
+		TPtrC8 codingPtr = tempPtr.Left( LineFeedAfterTransferCoding );
+		if ( codingPtr.FindC( UpnpHTTP::Chunked ) != KErrNotFound )
+			{
+			return ETrue;
+			}
+		else
+			{
+			return EFalse;
+			}
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::Headers
+// Returns Headers of the first message in the buffer.
+// -----------------------------------------------------------------------------
+//
+TPtrC8 CUpnpHttpBuffer::Headers()
+	{
+LOGS("CUpnpHttpBuffer::Headers()");
+	TInt EndOfHeaders = iBuffer.FindC( UpnpString::KDoubleLineFeed );
+	TPtrC8 headers = iBuffer.Left( EndOfHeaders + UpnpString::KDoubleLineFeedLength  );	
+	return headers;
+	}
+
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::L
+// Returns the content of buffer.
+// -----------------------------------------------------------------------------
+//
+TPtrC8 CUpnpHttpBuffer::Content()
+	{
+LOGS("CUpnpHttpBuffer::Content()");
+	TInt PosOfContLength = iBuffer.FindC( UpnpHTTP::KHdrContentLength() );
+	TInt contLen = 0;
+	
+	if ( PosOfContLength > 0 )
+		{
+		TRAPD(error, contLen = ContentLengthL());
+		if (error)
+			{
+			contLen = 0;
+			}
+		}
+	else if ( iHasContentType )
+		{
+		return TPtrC8( iBuffer );
+		}
+	else if( IsChunked() )
+		{
+		TInt StartOfMessage = iBuffer.FindC( UpnpString::KDoubleLineFeed );
+		contLen = iBuffer.Length() - StartOfMessage;	
+		}
+	/*else
+		{
+		TInt StartOfMessage = iBuffer.FindC( UpnpString::KDoubleLineFeed );
+		contLen = iBuffer.Des().Length() - StartOfMessage;
+		}*/	
+
+	TInt endOfHeader = iBuffer.Find( UpnpString::KDoubleLineFeed );
+	TInt length = 0;
+	// Probably not all headers were sent
+	
+	if( endOfHeader == KErrNotFound  )
+		{
+		length = iBuffer.Length();
+		}
+	else
+		{
+		length = endOfHeader + contLen + UpnpString::KDoubleLineFeedLength;	
+		}
+
+    if( length < 0 ) // in case of overflow of length value
+        {
+        length = INT_MAX;
+        }
+
+	TPtrC8 message = iBuffer.Left( length );
+	return message;
+	}	
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::ContentLengthL
+// Returns the content length of first message in the buffer.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpBuffer::ContentLengthL()
+	{
+	LOGS("CUpnpHttpBuffer::ContentLengthL()");
+	
+	TInt endOfHeader = iBuffer.Find( UpnpString::KDoubleLineFeed );	
+    User::LeaveIfError(endOfHeader);
+	TPtrC8 findptr;
+	// to check only first 2k of data or whole portion with all headers 
+	// if they are bigger	
+	if (endOfHeader >= UpnpSSDP::KMaxMessageLength)
+		findptr.Set( iBuffer.Left( endOfHeader + UpnpString::KLineFeedLength ) ); 
+	else 
+		findptr.Set( iBuffer.Left( UpnpSSDP::KMaxMessageLength ) ); 						
+
+	TInt contentLengthIndex = findptr.FindC( UpnpHTTP::KHdrContentLength() );
+
+	TInt lengthOfContentLength = UpnpHTTP::KHdrContentLength().Length() +
+        UpnpString::KColon().Length();
+	
+	if ( contentLengthIndex <= 0 ) 
+		{
+	return KErrNotFound;
+		}
+
+	TPtrC8 rest;
+	rest.Set( findptr );
+	rest.Set( rest.Mid( contentLengthIndex + lengthOfContentLength ) );
+
+	TInt lineEnd = rest.Find( UpnpString::KLineFeed );
+	if ( lineEnd < 0 )
+		{
+		return KErrNotFound;
+		}
+	
+	// LWS and spanning headers
+	TInt indexLWS = 0;
+	TPtrC8 clRest = rest;
+	TInt contentLengthValueEnd = lineEnd;
+	
+	while( ETrue )
+	    {
+	    indexLWS = CUpnpHttpMessage::FindLWS( clRest );
+	    if( indexLWS == lineEnd )
+	        {	     
+	        clRest.Set( clRest.Mid( lineEnd + UpnpString::KLineFeed().Length() ) );
+	        lineEnd = clRest.Find( UpnpString::KLineFeed );
+	        contentLengthValueEnd += lineEnd + UpnpString::KLineFeed().Length();
+	        }
+	    else
+	        {
+	        break;
+	        }
+	    }			
+    
+	TPtrC8 length = rest.Left( contentLengthValueEnd );
+    
+    if( !length.Compare( KNullDesC8() ) )
+        return -1;
+    
+    // Unfold header
+    HBufC8* clValueBuf = length.AllocLC();
+    TPtr8 ptrCLValue = clValueBuf->Des();
+    
+    // Remove CRLFs
+    TInt pos;
+	while( ( pos = ptrCLValue.FindC( UpnpString::KLineFeed() ) ) != KErrNotFound)
+	    {
+		ptrCLValue.Delete(pos, UpnpString::KLineFeedLength);
+	    }
+	
+    // Remove spaces
+    while( ( pos = ptrCLValue.FindC( UpnpString::KSpace() ) ) != KErrNotFound)
+	    {
+		ptrCLValue.Delete(pos, 1);
+	    }
+	
+	// Remove tabs
+    while( ( pos = ptrCLValue.FindC( UpnpString::KTab() ) ) != KErrNotFound)
+	    {
+		ptrCLValue.Delete(pos, 1);
+	    }
+   
+	TLex8 lex( ptrCLValue );
+	TInt val = 0;
+	User::LeaveIfError(lex.Val( val ));
+	
+	CleanupStack::PopAndDestroy( clValueBuf );
+
+	iContentLength = val;
+
+	return val;
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::UsesConnectionClose
+// Returns ETrue, if message's header contains "Connection: close" -header.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpBuffer::UsesConnectionClose()
+	{
+LOGS("CUpnpHttpBuffer::UsesConnectionClose()");
+	if(IsHeaderReady())
+		{
+		TPtrC8 headers=Headers();
+		TInt posOfConn=headers.FindC(UpnpHTTP::KConnection());
+		TInt posOfHttp10 = headers.FindC(KHttp10); 	
+		
+		if( posOfConn != KErrNotFound )
+			{
+			TPtrC8 conn=headers.Mid(posOfConn+UpnpHTTP::KConnection().Length() +
+                UpnpString::KColon().Length());
+			
+			TInt posOfLineFeed=conn.FindC(UpnpString::KLineFeed());
+			if(posOfLineFeed != KErrNotFound)
+				{
+				conn.Set(conn.Left(posOfLineFeed));
+				
+				while((conn.Left(1)).CompareC(UpnpString::KSpace()) == 0)
+					{
+					conn.Set(conn.Mid(1)); // removing spaces in front of value
+					}
+					
+				if(conn.FindC(UpnpHTTP::KClose()) >= 0)
+					{
+					return ETrue;
+					}
+				else
+					{
+					return EFalse;
+					}
+				}
+			else
+				{
+				// If rsp = 'HTTP/1.0', we can assume that it contains 'connection:close' header, even if it doesn't!	
+		                   if( posOfHttp10 != KErrNotFound )
+		                        return ETrue;
+				return EFalse;
+				}
+			}
+		else
+			{
+		         // If rsp = 'HTTP/1.0', we can assume that it contains 'connection:close' header, even if it doesn't!	
+		         if( posOfHttp10 != KErrNotFound )
+		             return ETrue;
+			return EFalse;
+			}
+		}
+	return EFalse;
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::MessageErrorCode
+// Checks error code of received message.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpBuffer::MessageErrorCode( TDesC8& aBuffer )
+    {
+    if( IsHeaderReady() )
+        {
+    	TInt posOfNextLine = aBuffer.Find(UpnpString::KLineFeed); 
+    	if( posOfNextLine != KErrNotFound )
+    		{
+    		TPtrC8 spacePtr;
+    		spacePtr.Set( aBuffer );
+    		
+    		// finding first space
+    		TInt posOfFirstSpace = spacePtr.Find(UpnpString::KSpace);
+            if ( posOfFirstSpace != KErrNotFound )
+                {
+    		    spacePtr.Set( spacePtr.Left( posOfFirstSpace ) );
+
+                }
+
+    		// back to basic handling
+    		spacePtr.Set( aBuffer );
+    		
+    		if( posOfFirstSpace < posOfNextLine && posOfFirstSpace != KErrNotFound )
+    			{
+    			// if first space is found, it has to be before linefeed
+    			// +1 comes from going over the first space, we are interested
+    			// in what comes after it.
+    			spacePtr.Set( spacePtr.Mid( posOfFirstSpace  + 1 ) );
+    			TInt posOfSecondSpace = spacePtr.Find(UpnpString::KSpace);
+    			if( posOfSecondSpace < posOfNextLine && posOfSecondSpace != KErrNotFound )
+    				{
+    				// check that length of path is longer than zero.
+    				if( posOfSecondSpace > 0 )
+    					{
+                        // now setting spacePtr so that we have the error number in spacePrt
+    					spacePtr.Set( spacePtr.Left( posOfSecondSpace ) );
+
+                        // making conversion
+          				TLex8 errorValue( spacePtr );
+                        TInt messageErrorValue( 0 );                        
+        				TInt convError = errorValue.Val( messageErrorValue );
+        				
+        				// checking that conversion was ok
+        				if( convError == KErrNone )
+        				    {
+        				    return messageErrorValue;
+        				    }
+        				else
+        				    {
+        				    return KErrAbort;
+        				    }
+        				
+    					}
+    				else
+    					{
+    					// header too short. Invalid message
+    					return KErrAbort;
+    					}
+    				}
+    			else
+    				{
+    				// no second space found. Invalid message.
+    				return KErrAbort;
+    				}
+    			}
+    		else
+    			{
+    			// no space found before linefeed. Invalid message
+    			return KErrAbort;
+    			}
+     		}
+		else
+			{
+			// no linefeed found in headers. Invalid message
+			return KErrAbort;
+			}        
+        }
+    else
+        {
+        return KErrAbort;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::Method
+// returns the method of message
+// -----------------------------------------------------------------------------
+//
+TPtrC8 CUpnpHttpBuffer::Method()
+    {
+    if( IsHeaderReady() )
+        {
+        TPtrC8 ret;
+        ret.Set( Headers() );
+        TInt posOfSpace = ret.Locate(' ');
+        if( posOfSpace != KErrNotFound )
+            {
+            ret.Set( ret.Left( posOfSpace ) );
+            return ret;
+            }
+        else
+            {
+            return KNullDesC8();
+            }
+        
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::Target
+// 
+// -----------------------------------------------------------------------------
+//    
+TPtrC8 CUpnpHttpBuffer::Target()
+    {
+    if( IsHeaderReady() )
+        {
+        TPtrC8 ret;
+        ret.Set( Headers() );
+        TInt posOfSpace = ret.Locate(' ');
+        if( posOfSpace != KErrNotFound )
+            {
+            ret.Set( ret.Mid( posOfSpace +1 ) );
+            posOfSpace = ret.Locate(' ');
+            if( posOfSpace != KErrNotFound )
+                {
+                ret.Set( ret.Left( posOfSpace ) );
+                return ret;
+                }
+            else
+                {
+                return KNullDesC8();
+                }
+            }
+        else
+            {
+            return KNullDesC8();
+            }
+        
+        }
+    else
+        {
+        return KNullDesC8();
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::IsToFile
+// Returns True if message content is going to be saved in file.
+// -----------------------------------------------------------------------------
+//    
+TBool CUpnpHttpBuffer::IsToFile()
+	{
+	return iToFile;		
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpBuffer::SetToFile
+// Sets if body of message contained in buffer should be saved in file.
+// -----------------------------------------------------------------------------
+//        
+void CUpnpHttpBuffer::SetToFile( TBool aToFile )
+	{
+	iToFile = aToFile;			
+	}
+
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpchunkfiletransferreader.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,360 @@
+/** @file
+* 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:  CUpnpHttpChunkFileTransferReader is a class responsible for 
+*                asynchronous TCP reading and controlling data
+*
+*/
+
+
+
+#include "upnphttpsession.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "upnphttpfiletransferreader.h"
+#include "upnphttpchunkfiletransferreader.h"
+#include "upnphttpchunkparser.h"
+#include "upnphttpfileaccess.h"
+#include "inet6err.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::NewL
+// Factory method.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpChunkFileTransferReader* CUpnpHttpChunkFileTransferReader::NewL( 
+                                                    CUpnpTcpSession& aSession,
+                                                    RSocket& aSocket,
+                                                    TThreadPriority aPriority,
+                                                    TInt aReadPortion,
+                                                    TInt aBufferSize)
+    {
+    CUpnpHttpChunkFileTransferReader* self = new ( ELeave ) 
+                    CUpnpHttpChunkFileTransferReader( aSession, aSocket,
+                                             aPriority, aReadPortion, aBufferSize);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::CUpnpHttpChunkFileTransferReader
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpChunkFileTransferReader::CUpnpHttpChunkFileTransferReader( CUpnpTcpSession& aSession,
+                                              RSocket& aSocket,
+                                              TThreadPriority aPriority,
+                                              TInt aReadPortion,
+                                              TInt aBufferSize)
+    :CUpnpHttpFileTransferReader( aSession, aSocket,
+               aPriority, aReadPortion, aBufferSize + aReadPortion),
+    iDecoded(0)
+    {        
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::ConstructL
+// Two-phased constructor
+// constructor that can leave. Used from derived classes.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpChunkFileTransferReader::ConstructL()
+    {   
+    BaseConstructL();
+    
+    iParser = CUpnpHttpChunkParser::NewL();
+    }    
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::~CUpnpHttpChunkFileTransferReader
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpChunkFileTransferReader::~CUpnpHttpChunkFileTransferReader()
+    {        
+    delete iParser;    
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::RemainingBytes
+// Returns the remaining numbers of bytes to read
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpHttpChunkFileTransferReader::RemainingBytes()
+    {
+    if( !iSession.FileAccess() )
+        return KErrNone;
+
+    return ( iSession.FileAccess()->TransferTotal()-iSession.FileAccess()->BytesWritten() );
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::Start
+// Starts reading.
+// ---------------------------------------------------------------------------
+//    
+void CUpnpHttpChunkFileTransferReader::StartL()
+    {    
+    LOGS1( "%i, CUpnpHttpFileTransferReader::Start", iSession.Id() );
+    
+    // Initiate a new read from socket into iBuffer
+    if ( !IsActive() )
+    {
+          
+          //checks buffer buffer is not empty   
+         if(iCacheBuffer.Length() > 0) 
+            {
+            //check buffer session should be finished
+            iIsFinished = HandleL();
+            if(iIsFinished)
+                {
+                Finish();
+
+                if( iSession.FileAccess() )
+                    iSession.FileAccess()->SetChunkCompleted( iIsFinished );
+                }
+            //if not issue reading
+            else
+                {
+                IssueRead();
+                iSession.StartTimeoutTimer(ETrue);
+                }
+        
+            }
+        else
+            {
+            IssueRead();
+            }
+        
+    }
+    } 
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::ReadBufferSize
+// Returns the maximum size of bytes to read for once
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpHttpChunkFileTransferReader::ReadBufferSize()
+    {
+    return(AvailableSpace());
+    }
+        
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::Parse
+// Decoding the chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpChunkFileTransferReader::Parse( TDes8& aBuffer, TInt& aPos )
+    {    
+    if( aPos >= aBuffer.Length() )
+        {
+        iParser->SetErrorState();
+        return ETrue;
+        }
+    return iParser->Parse( aBuffer, aPos );
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::HandleL
+// Handles data in buffer, returns if file transfer has finished
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpHttpChunkFileTransferReader::HandleL()
+    {
+    TInt error = KErrGeneral;
+        
+    error = Parse(iCacheBuffer, iDecoded);
+            
+    if( error == KErrNone && iSession.FileAccess() )
+        {
+        if ( iSession.FileAccess()->TransferTotal() == KErrNotFound )
+            {
+            iSession.FileAccess()->SetTransferTotal( 0 );
+            }
+        //parser finished decoding - writing all bytes
+        if ( iParser->IsFinished() )
+            {
+            error = HandleReadDataL( iDecoded );
+            }
+        //buffer almost full - writing a fixed block of decoded data
+        else if ( iBufferSize - iDecoded <= iReadBufferSize )
+            {
+            error = HandleReadDataL( iBufferSize - iReadBufferSize );
+            }
+    }
+    iCacheBuffer.ReAllocL( iBufferSize );
+    
+    if( error != KErrNone )
+        {        
+        iSession.FileTransferReaderErrorL( error );
+        return ETrue;
+        }
+    else if( iParser->IsFinished() )
+        {
+        if ( iSession.FileAccess() )
+            {
+            iSession.FileAccess()->SetChunkCompleted( ETrue );
+            }
+        iSession.FileTransferReaderDoneL();
+        return ETrue;
+        }
+            
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::HandleReadDataL
+// Handles read data - trims the buffer and save data to file
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpHttpChunkFileTransferReader::HandleReadDataL( TInt aPieceToRead )
+    {        
+    //reads decoded data
+    TPtr8 ptr = iCacheBuffer.LeftTPtr( aPieceToRead );
+    
+    //saves decoded data
+    TInt error = iSession.FileAccess()->SaveL( ptr );
+    iSession.FileAccess()->SetTransferTotal( 
+        iSession.FileAccess()->TransferTotal() + aPieceToRead );
+    
+    //saved data are cut from buffer
+    iCacheBuffer.Delete( 0, aPieceToRead );
+  
+    //position adjusted to the number of still encoded bytes        
+    iDecoded -= aPieceToRead;			
+
+    return error;
+    }    
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::Finish
+// On finishing the file transfer
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpChunkFileTransferReader::Finish()
+    {        
+    CUpnpHttpFileTransferReader::Finish();    
+    }    
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::RunL
+// From class CActive.
+// Function is called as a callback when the issued reading is completed.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpChunkFileTransferReader::RunL()
+    {
+    LOGS2( "%i, CUpnpHttpChunkFileTransferReader::RunL(), iStatus %i",
+            iSession.Id(), iStatus.Int() );
+
+    // Active object request complete handler
+    switch ( iStatus.Int() )
+        {
+        case KErrNone:
+            iRetryErrorCount = 0;
+            iCancelTimer->Cancel();
+ 
+           iSession.TimerCancel();
+           iCacheBuffer.SetLength( iCacheBuffer.Length() + iLen() );            
+           iIsFinished = HandleL();                                           
+            
+            if(!iIsFinished)
+                {
+                IssueRead();
+                iSession.StartTimeoutTimer(ETrue);
+                }
+            else
+                 Finish();                                     
+            break;
+        
+        case KErrCancel:
+            if(iCancelFromTimer) 
+                {          
+                IssueRead();
+                iCancelFromTimer = EFalse;
+                }
+            break;
+        case KErrEof:
+            iSession.TimerCancel();
+            iCacheBuffer.SetLength( iLen() );                    
+            iIsFinished = HandleL();            
+            
+            if(iIsFinished)
+                {
+                iSession.HandleErrorL( iStatus.Int() );
+                break;
+                }
+           case KErrNoMemory:
+        case KErrNotReady:
+        case KErrInet6AddressExpired:
+            if( iRetryErrorCount < KMaxRetryErrors )
+                {
+                iRetryTimer->Cancel();
+                iRetryTimer->After( KRetryWaitTime * ++iRetryErrorCount, EFalse );
+                break;
+                }         
+            
+        default:            
+            iIsFinished = ETrue;
+            iIsActivated = EFalse;            
+            iSession.HandleErrorL( iStatus.Int() );
+            break;
+        }
+        if( iSession.FileAccess() )
+            iSession.FileAccess()->SetChunkCompleted( iIsFinished );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::RunError
+// From CActive.
+// Invoked when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpChunkFileTransferReader::RunError( TInt aErr )
+    {
+    LOGS1("CUpnpHttpChunkFileTransferReader::RunError(%d)", aErr);
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::Reset
+// Makes reader ready to start reading new content
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpChunkFileTransferReader::Reset()
+    {    
+    iCacheBuffer.SetLength(0);
+    iDecoded = 0;
+    iParser->Reset();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpChunkFileTransferReader::ReadFromSocket
+// Reads from the socket
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpChunkFileTransferReader::ReadFromSocket()
+    {    
+    Deque();
+    CActiveScheduler::Add(this);
+    
+    iReceivePtr.Set( (TUint8*)iCacheBuffer.RightTPtr( 0 ).Ptr(), ReadBufferSize(), ReadBufferSize() );
+    StartCancelTimer();
+    iSocket.RecvOneOrMore( iReceivePtr,0,iStatus,iLen);       
+    SetActive();
+    }        
+       
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpchunkparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,412 @@
+/** @file
+* 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:  Declares chunk parsing class.
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnphttpchunkparser.h"
+#include "upnpcons.h"
+
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpChunkParser* CUpnpHttpChunkParser::NewL()
+	{
+
+	CUpnpHttpChunkParser* self = new (ELeave) CUpnpHttpChunkParser();
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop( self );
+	
+	return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::~CUpnpHttpChunkParser
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpChunkParser::~CUpnpHttpChunkParser()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::CUpnpHttpChunkParser
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpChunkParser::CUpnpHttpChunkParser()
+:iContext(EUnknown),
+ iChunkSize(KErrNotFound),
+ iError (KErrNone)
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::ConstructL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpChunkParser::ConstructL()
+	{
+	}
+   
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::Reset
+// Checks if decoding ended
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpChunkParser::Reset()
+    {
+    iContext = EUnknown;
+    iError = KErrNone;
+    iChunkSize = KErrNotFound;	
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::SetErrorState
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpChunkParser::SetErrorState()
+    {
+    iError = EHttpRequestTimeout;
+    iContext = EError;
+    }				    
+	
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::Parse
+// Decoding the chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpChunkParser::Parse(TDes8& aBuffer, TInt& aPos)
+    {		
+    TBool interrupt = EFalse;
+    while(!interrupt)
+        {
+        switch(iContext)
+            {
+            case EUnknown:
+                iContext = EHeader;
+            case EHeader:
+                interrupt = ParseHeader(aBuffer,aPos);
+                break;
+            case ELastChunk:
+                interrupt = ParseLastChunk(aBuffer,aPos);
+                break;	
+            case EBody:
+                interrupt = ParseBody(aBuffer,aPos);
+                break;
+            case EEndChunkBody:
+                iContext = EHeader;
+                break;
+            case EExtension:
+                interrupt = ParseExtension(aBuffer,aPos);
+                break;
+            case ETrailer:
+                interrupt = ParseTrailer(aBuffer,aPos);
+                break;
+            case EError:			
+                return iError;
+            case EFinish:
+                return KErrNone;
+            default:
+                return KErrUnknown;
+            }
+        }
+    return KErrNone;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::ParseL
+// Decoding the chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpChunkParser::ParseBody( TDes8& aBuffer, TInt& aPos )
+	{	
+    if ( IsEmpty( aBuffer, aPos ) )
+        {	    
+        return ETrue;
+        }
+
+    TPtrC8 pointer( aBuffer.Right( aBuffer.Length() - aPos ) );	
+
+    if ( iBytesAppended + pointer.Length() >= iChunkSize )
+        {	
+        aPos += ( iChunkSize - iBytesAppended );		
+        pointer.Set( aBuffer.Right( aBuffer.Length() - aPos ) );
+        TInt lineFeed = pointer.FindF(UpnpString::KLineFeed());		
+        //linefeed found
+        if ( !lineFeed )
+            {			
+            aBuffer.Delete( aPos, UpnpString::KLineFeed().Length() );
+            iContext = EEndChunkBody;	
+            return ( aPos == aBuffer.Length() );
+            }
+        //linefeed not found, end of buffer	
+        else if ( lineFeed == KErrNotFound && 
+                ( ( aPos + UpnpString::KLineFeed().Length() ) > aBuffer.Length() )
+                )
+            {			
+            iBytesAppended = iChunkSize; 				
+            return ETrue;
+            }
+        //size doesn't comply with the header value
+        iError = KErrGeneral;	
+        iContext = EError;	
+        return EFalse;	
+        }
+    else
+        {
+        iBytesAppended += pointer.Length();
+        aPos = aBuffer.Length();
+        return ETrue;
+        }		
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::ParseL
+// Decoding the chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpChunkParser::ParseHeader( TDes8& aBuffer, TInt& aPos )
+	{
+    if ( IsEmpty( aBuffer, aPos ) )
+        {	    
+        return ETrue;
+        }
+    iChunkSize = KErrNotFound;
+    iBytesAppended = 0;
+    TPtrC8 pointer(NULL,0);
+    //if '\r\n' exists
+    TInt lineFeed = aBuffer.Right( aBuffer.Length() - aPos ).FindF( UpnpString::KLineFeed );
+    //if ';' exists
+    TInt semiColon = aBuffer.Right( aBuffer.Length() - aPos ).FindF( UpnpString::KSemiColon );
+    //semicolon ignored if occurs after the linefeed
+    if ( semiColon !=KErrNotFound && lineFeed !=KErrNotFound && lineFeed<semiColon )
+        {
+        semiColon = KErrNotFound;
+        }
+    if ( semiColon !=KErrNotFound )
+        {		
+        pointer.Set(aBuffer.Right( aBuffer.Length() - aPos ).Mid( 0,semiColon ) );		
+        }
+    else if ( lineFeed !=KErrNotFound )
+        {
+        pointer.Set( aBuffer.Right( aBuffer.Length() - aPos ).Mid( 0,lineFeed ) );		
+        }
+    else
+        {
+        pointer.Set( aBuffer.Right( aBuffer.Length() - aPos ) );		
+        }
+
+    TLex8 lex( pointer );	
+    //skip white spaces	
+    lex.SkipSpace();
+    TUint size;
+    //neither semicolon nor linefeed found
+    if ( lineFeed == KErrNotFound && semiColon == KErrNotFound )
+        {
+        //remember the num of cut spaces
+        TInt len = lex.Offset();
+        if ( !lex.Eos() )
+            {
+            //check the chunk header size for the limit
+            TInt error = lex.Val( size, EHex );			
+            if ( error!= KErrNone || size > KMaxTInt )	
+                {
+                //size too big
+                iError = ( error ) ? error: EHttpInsufficientStorage;
+                iContext = EError;
+                return EFalse;
+                }			
+            }
+
+        aBuffer.Delete( aPos,len );
+        return ETrue;
+        }
+			
+    //get size	
+    TInt error = lex.Val( size, EHex );
+    if ( error!= KErrNone || size > KMaxTInt )
+        {
+        //unexpected characters or size too big
+        iError = ( error ) ? error: EHttpInsufficientStorage ;
+        iContext = EError;
+        return EFalse;
+        }	
+    iChunkSize = size;	
+    //skip white spaces	
+    lex.SkipSpace();	
+    if ( !lex.Eos() )
+        {
+        //unexpected characters
+        iError = KErrGeneral;
+        iContext = EError;
+        return EFalse;
+        }
+    if ( lineFeed != KErrNotFound )
+        {
+        //the whole chunk header is parsed
+        aBuffer.Delete( aPos, lineFeed + UpnpString::KLineFeed().Length() );
+        //chunk size == 0
+        if ( !iChunkSize )
+            {        
+            iContext = ELastChunk;
+            }
+        else
+            {        
+            iContext = EBody;
+            }
+        return ( aPos == aBuffer.Length() );
+        }
+    else if ( semiColon != KErrNotFound )
+        {
+        //extension found, 
+        //one character left - possible linefeed
+        if ( aPos<aBuffer.Length() )
+            {            
+            aBuffer.Delete( aPos, aBuffer.Length() - aPos - 1 );		
+            }
+        iContext = EExtension;
+        return ETrue;	
+        }
+        
+    iError = KErrUnknown;	
+    iContext = EError;	
+    return EFalse;		    	
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::ParseL
+// Decoding the chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpChunkParser::ParseExtension( TDes8& aBuffer, TInt& aPos )
+    {	
+    if ( IsEmpty( aBuffer, aPos ) )
+        {	    
+        return ETrue;	
+        }
+
+    //if '\r\n' exists
+    TInt lineFeed = aBuffer.Right( aBuffer.Length() - aPos ).FindF( UpnpString::KLineFeed );
+    if ( lineFeed != KErrNotFound )
+        {
+        aBuffer.Delete( aPos, lineFeed + UpnpString::KLineFeed().Length() );		
+        if ( !iChunkSize )
+            {
+            iContext = ETrailer;
+            return EFalse;		
+            }
+        else
+            {
+            iContext = EBody;
+            return EFalse;
+            }		
+        }
+    else
+        {
+        //one character left - possible linefeed
+        if ( aPos + 1 < aBuffer.Length() )
+            {            
+            aBuffer.Delete( aPos, aBuffer.Length() - aPos - 1 );
+            }
+        return ETrue;
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::ParseL
+// Decoding the chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpChunkParser::ParseLastChunk( TDes8& aBuffer, TInt& aPos )
+    {		
+    //if empty or only one character present
+    if ( (aBuffer.Length() - aPos) < UpnpString::KLineFeedLength )
+        {	    
+        return ETrue;
+        }
+    //if '\r\n' exists
+    TInt lineFeed = aBuffer.Right( aBuffer.Length() - aPos ).FindF( UpnpString::KLineFeed );
+    if ( !lineFeed )
+        {
+        aBuffer.Delete( aPos, lineFeed + UpnpString::KLineFeed().Length() );		
+        iContext = EFinish;
+        return ETrue;		
+        }
+    else
+        {
+        iContext = ETrailer;
+        return EFalse;		
+        }		
+
+    }	
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::ParseL
+// Decoding the chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpChunkParser::ParseTrailer( TDes8& aBuffer, TInt& aPos )
+	{		
+    if ( IsEmpty( aBuffer, aPos ) )
+        {	    
+        return ETrue;
+        }
+    //if double '\r\n' exists
+    TInt doublelineFeed = aBuffer.Right( aBuffer.Length() - aPos ).FindF( UpnpString::KDoubleLineFeed );
+    if (doublelineFeed != KErrNotFound ) 
+        {
+        aBuffer.Delete( aPos, doublelineFeed + UpnpString::KDoubleLineFeed().Length() );		
+        iContext = EFinish;
+        return ETrue;	
+        }
+    else
+        {
+        //waiting,3 characters reserved for double linefeed
+        if ( aPos + UpnpString::KCRLFCRLength < aBuffer.Length() )
+            {            
+            aBuffer.Delete( aPos, aBuffer.Length() - aPos - UpnpString::KCRLFCRLength );
+            }
+        return ETrue;	
+        }
+    }
+		
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::IsEmpty
+// Decoding the chunked-encoded buffer
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpChunkParser::IsEmpty( TDes8& aBuffer, TInt aPos )
+    {
+    return ( aPos >= aBuffer.Length() );
+    }   
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpChunkParser::IsFinished
+// Checks if decoding ended
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpChunkParser::IsFinished()
+    {
+    return ( iContext==EFinish );
+    }   
+
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpfileaccess.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,570 @@
+/** @file
+* 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:  Declares HttpServer class.
+ *
+*/
+
+
+// INCLUDE FILES
+#include "upnphttpsession.h"
+#include "upnphttpfileaccess.h"
+#include "upnpcommonupnplits.h"
+#include "upnpfileutils.h"
+#include "upnpcons.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+
+#include <e32math.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpFileAccess* CUpnpHttpFileAccess::NewL( CUpnpHttpSession* aSession,
+    const TDesC8& aHeaderBuffer, const TDesC16& aFilename, TInt aFileSize )
+    {
+    LOGSH( aHandle, "CUpnpHttpFileAccess::NewL" );
+    CUpnpHttpFileAccess* self = new (ELeave) CUpnpHttpFileAccess(
+            aFileSize );
+    CleanupStack::PushL( self );
+    self->ConstructL( aSession, aHeaderBuffer, aFilename );
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::NewL
+// C++ default constructor, called when saving download
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpFileAccess* CUpnpHttpFileAccess::NewL( CUpnpHttpSession* aSession,
+    const TDesC16& aFilename )
+    {
+    LOG_FUNC_NAME;
+    CUpnpHttpFileAccess* self = new (ELeave) CUpnpHttpFileAccess();
+    CleanupStack::PushL( self );
+    self->ConstructL( aSession, aFilename );
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::~CUpnpHttpBuffer
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpFileAccess::~CUpnpHttpFileAccess()
+    {
+    LOGS1( "%i, CUpnpHttpFileAccess::~CUpnpHttpFileAccess", this );
+    if ( iIsDownload )
+        {
+        if ( !iIsDeleted )
+            {
+            iFile.Close( );
+            if ( (iTotalSizeOfDownload - iBytesWritten )!= 0
+                    || ( !iIsChunkCompleted && iIsChunked ) )
+                iFsSession.Delete( *iFileToServe );
+            }
+
+        }
+    if ( iOpen )
+        {
+        iTargetFile.Close( );
+        }
+
+    iFsSession.Close( );
+
+    delete iHeaderBuffer;
+
+    delete iFileToServe;
+    delete iOpenedFile;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::CUpnpHttpFileAccess
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpFileAccess::CUpnpHttpFileAccess( TInt aFileSize )
+    {
+    LOGS1H( aHandle, "%i, CUpnpHttpFileAccess::CUpnpHttpFileAccess", this );
+    SetPosOfFile( 0 );
+    SetEndPosOfFile( KErrNotFound );
+    SetPosOfHeader( 0 );
+    iSizeOfFile = aFileSize;
+    iHeadersSent = EFalse;
+    iTotalSizeOfDownload = KErrNotFound;
+    iIsDownload = EFalse;
+    iIsDeleted = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::CUpnpHttpFileAccess
+// C++ default constructor, called when saving download
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpFileAccess::CUpnpHttpFileAccess()
+    {
+    LOGS1H( aHandle, "%i, CUpnpHttpFileAccess::CUpnpHttpFileAccess", this );
+    SetPosOfFile( 0 );
+    SetEndPosOfFile( KErrNotFound );
+    iHeadersSent = ETrue;
+    iTotalSizeOfDownload = KErrNotFound;
+    iSizeOfFile = KErrNotFound;
+    iIsDownload = ETrue;
+    iBytesWritten = 0;
+    iIsDeleted = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::CUpnpHttpFileAccess
+// Two-phased constructor, called when saving download
+// -----------------------------------------------------------------------------
+//
+
+
+void CUpnpHttpFileAccess::ConstructL( CUpnpHttpSession* aSession,
+    const TDesC16& aFilename )
+    {
+    LOGS1(
+            "%i, CUpnpHttpFileAccess::ConstructL(CUpnpHttpSession*, TDesC16&)",
+            this );
+
+    User::LeaveIfError(iFsSession.Connect());
+    iFileToServe = aFilename.AllocL(); 
+
+    TInt error =  0; 
+    iPosInFile = 0;
+    iHeaderLength = 0;
+    iSession = aSession;
+    if (iSession->OverwriteExisting() && !iSession->SaveAtOffset())
+        {
+        error = iFile.Replace(iFsSession, *iFileToServe, EFileWrite
+                | EFileShareAny);
+        User::LeaveIfError(error);
+        }
+    else if (iSession->OverwriteExisting() && iSession->SaveAtOffset())
+        {
+        error = iFile.Open(iFsSession, *iFileToServe, EFileWrite
+                | EFileShareAny);
+        if (error != KErrNotFound)
+            {
+            TInt size = 0;
+            error = iFile.Size(size);
+            if (size >= (iSession->Offset()))
+                {
+                iPosInFile = iSession->Offset();
+                }
+            else
+                {
+                iFile.Close();
+                error = iFile.Replace(iFsSession, *iFileToServe, EFileWrite
+                        | EFileShareAny);
+                User::LeaveIfError(error);
+                }
+            }
+        else
+            {
+            error = iFile.Create(iFsSession, *iFileToServe, EFileWrite
+                    | EFileShareAny);
+            User::LeaveIfError(error);
+            }
+        }
+    else
+        {
+        error = iFile.Open(iFsSession, *iFileToServe, EFileWrite
+                | EFileShareAny);
+        if (error == KErrNotFound)
+            {
+            error = iFile.Create(iFsSession, *iFileToServe, EFileWrite
+                    | EFileShareAny);
+            User::LeaveIfError(error);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::ConstructL
+// Two-phased constructor, called when serving file
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::ConstructL( CUpnpHttpSession* aSession,
+    const TDesC8& aHeaderBuffer, const TDesC16& aFilename )
+    {
+    LOGS1H(
+        iHandle,
+        "%i, CUpnpHttpFileAccess::ConstructL(CUpnpHttpSession*, TDesC8&, TDesC16&)",
+        this );
+    iHeaderBuffer = HBufC8::NewL( aHeaderBuffer.Length( ) );
+    iHeaderBuffer->Des().Zero( );
+    iHeaderBuffer->Des().Append( aHeaderBuffer );
+
+    iFileToServe = HBufC16::NewL( aFilename.Length( ) );
+    iFileToServe->Des().Zero( );
+    iFileToServe->Des().Append( aFilename );
+
+    iHeaderLength = aHeaderBuffer.Length( );
+    User::LeaveIfError( iFsSession.Connect( ) );
+    iSession = aSession;
+    iOpenedFile = KNullDesC().AllocL( );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::SetPosOfFile
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::SetPosOfFile( TUint aNewPos )
+    {
+    iPosInFile = aNewPos;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::PosOfFile
+// 
+// -----------------------------------------------------------------------------
+//
+TUint CUpnpHttpFileAccess::PosOfFile()
+    {
+    return iPosInFile;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::SetPosOfFile
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::SetEndPosOfFile( TInt aNewEndPos )
+    {
+    iEndPosOfFile = aNewEndPos;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::PosOfFile
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileAccess::EndPosOfFile()
+    {
+    return iEndPosOfFile;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::GetHeaders
+// 
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CUpnpHttpFileAccess::GetHeaders()
+    {
+    return (iHeaderBuffer) ? *iHeaderBuffer : KNullDesC8( );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::SetPosOfHeader
+// 
+// -----------------------------------------------------------------------------
+//	
+void CUpnpHttpFileAccess::SetPosOfHeader( TUint aNewPos )
+    {
+    iPosToReadHeader = aNewPos;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::SetTotalSize
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::SetTotalSize( TInt aSizeToSet )
+    {
+    iTotalSizeOfDownload = aSizeToSet;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::SaveL
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileAccess::SaveL( TDesC8& aBuffer )
+    {
+    LOGS1( "%i, CUpnpHttpFileAccess::SaveL()", this );
+    if ( iIsDeleted )
+        {
+        LOGS( "file closed" );
+        return KErrGeneral;
+        }
+    LOGS( "file not closed" );
+    TInt toWrite = (EncodingMode( )|| (TransferTotal( ) == KErrNotFound ) )
+        ? aBuffer.Length( ) : (TransferTotal( )- iBytesWritten);
+
+    if ( aBuffer.Size( ) < toWrite )
+        {
+        toWrite = aBuffer.Size( );
+        }
+
+    if ( UpnpFileUtil::CheckDiskSpaceShortL( iFileToServe->Des( ), toWrite,
+        iFsSession ) )
+        {
+        DeleteFile( );
+        return EHttpInsufficientStorage;
+        }
+
+    TInt error = KErrNone;
+
+    // At first time iPosInFile == 0 or range offset, see ConstructL, and the next time 
+    // saving will continue at stopped point. 	
+
+    error = iFile.Write( iPosInFile, aBuffer.Right( toWrite ) );
+    if ( error != KErrNone )
+        {
+        return error;
+        }
+    iPosInFile += toWrite;
+    iBytesWritten += toWrite;
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::TransferredBytes
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileAccess::TransferredBytes()
+    {
+    LOGS1( "%i, CUpnpHttpFileAccess::TransferredBytes()", this);
+    TInt sent = 0;
+    if ( !iHeadersSent )
+        {
+        sent = iPosToReadHeader;
+        }
+    else
+        {
+        sent = PosOfFile();
+        }
+    return sent;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::TransferTotal
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileAccess::TransferTotal()
+    {
+    LOGS1( "%i, CUpnpHttpFileAccess::TransferTotal()", this);
+    if ( iTotalSizeOfDownload == KErrNotFound )
+        {
+        return iSizeOfFile;
+        }
+    else
+        {
+        return iTotalSizeOfDownload;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::FileToServe
+// 
+// -----------------------------------------------------------------------------
+//
+TDesC16& CUpnpHttpFileAccess::FileToServe()
+    {
+    return *iFileToServe;
+    }
+   
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::GetL
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileAccess::GetL( TPtr8& aPointer, TInt aBytesToSend )
+    {
+    LOGS1H( aHandle, "%i, CUpnpHttpFileAccess::GetL", this );
+    if ( iFileToServe->Compare( *iOpenedFile ) ) // ignore if the same file
+        {
+        if ( iOpen )
+            {
+            iTargetFile.Close( );
+            }
+        iOpen = EFalse;
+        }
+
+    if ( !iOpen )
+        {
+        User::LeaveIfError( iTargetFile.Open( iFsSession, *iFileToServe,
+            EFileRead|EFileShareReadersOnly ) );
+        HBufC* tmp = iFileToServe->AllocL( );
+        delete iOpenedFile;
+        iOpenedFile = tmp;
+        iOpen = ETrue;
+        }
+
+    User::LeaveIfError( iTargetFile.Seek( ESeekStart, iPosInFile ) );
+
+    TInt BytesToRead = aBytesToSend;
+
+    // Get min value from iEndPosInFile and buffer length 
+    // iEndPosInFile + - iPosInFile 1 because indicated byte should also be included
+    if ( EndPosOfFile( ) != KErrNotFound )
+        BytesToRead = (EndPosOfFile( ) - iPosInFile + 1) < BytesToRead
+            ? (EndPosOfFile( ) - iPosInFile + 1) : BytesToRead;
+
+    LOGS1( "BytesToRead: %d", BytesToRead );
+
+    User::LeaveIfError( iTargetFile.Read( aPointer, BytesToRead ) );
+    iPosInFile = iPosInFile + aPointer.Length( );
+
+    return IsEndOfFile();
+    }
+// -----------------------------------------------------------------------------
+//CUpnpHttpFileAccess::DeleteServedFile
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::DeleteFile()
+    {
+    LOGS1( "%i, CUpnpHttpFileAccess::DeleteFile()", this );
+    if ( !iIsDeleted )
+        {
+        iFile.Close( );
+        iFsSession.Delete( *iFileToServe );
+        iIsDeleted = ETrue;
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::Download
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileAccess::Download()
+    {
+    return iIsDownload;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::FileExist
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileAccess::FileExist()
+    {
+    return !iIsDeleted;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::BytesWritten
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileAccess::BytesWritten()
+    {
+    return (iIsDownload ? iBytesWritten : 0);   
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::SetEncodingMode(TBool aIsChunked)
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::SetEncodingMode( TBool aIsChunked )
+    {
+    iIsChunked = aIsChunked;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::EncodingMode()
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileAccess::EncodingMode()
+    {
+    return iIsChunked;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::SetTransferTotal(aLength)
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::SetTransferTotal( TInt aLength )
+    {
+    iTotalSizeOfDownload = aLength;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::HeadersSent
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::SetHeadersSent()
+    {
+    delete iHeaderBuffer;
+    iHeaderBuffer = NULL;
+    iPosToReadHeader = NULL;
+    iHeadersSent = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::HeadersSent()
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileAccess::HeadersSent()
+    {
+    return iHeadersSent;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::SetChunkComplete( TBool aCompleted )
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpFileAccess::SetChunkCompleted( TBool aCompleted )
+    {
+    iIsChunkCompleted = aCompleted;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileAccess::IsEndOfFile
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileAccess::IsEndOfFile()
+    {
+    TInt limit = iSizeOfFile;
+    if ( EndPosOfFile() != KErrNotFound )
+        {
+        limit = ( EndPosOfFile() + 1 ) < iSizeOfFile ? ( EndPosOfFile() + 1 ) : iSizeOfFile;
+        }
+        
+    if ( iPosInFile >= limit )
+        {
+        iTargetFile.Close();
+        iOpen = EFalse;
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
+    
+// End Of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpfiletransferreader.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,556 @@
+/** @file
+* 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:  CUpnpHttpFileTransferReader is a class responsible for 
+*                asynchronous reading data from socket and controlling it
+*
+*/
+
+
+
+#include "upnphttpsession.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "upnphttpfiletransferreader.h"
+#include "upnphttpfileaccess.h"
+#include "inet6err.h"
+
+
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::NewL
+// Factory method.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpFileTransferReader* CUpnpHttpFileTransferReader::NewL( CUpnpTcpSession& aSession,
+                                                RSocket& aSocket,
+                                                TThreadPriority aPriority,
+                                                TInt aReadPortion,
+                                                TInt aBufferSize)
+    {
+    CUpnpHttpFileTransferReader* self = new ( ELeave ) 
+                            CUpnpHttpFileTransferReader( aSession, aSocket,
+                                              aPriority, aReadPortion, aBufferSize );
+    CleanupStack::PushL( self );
+    self->BaseConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::CUpnpHttpFileTransferReader
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpFileTransferReader::CUpnpHttpFileTransferReader( CUpnpTcpSession& aSession,
+                                          RSocket& aSocket,
+                                          TThreadPriority aPriority,
+                                          TInt aReadPortion,
+                                          TInt aBufferSize)
+    :CActive( aPriority ),
+    iSocket( aSocket ),
+    iSession( aSession ),
+    iReceivePtr( NULL, 0, 0 ),
+    iReadBufferSize(aReadPortion),
+    iBufferSize( aBufferSize )
+    {
+    LOGS1( "%i, CUpnpHttpFileTransferReader::CUpnpHttpFileTransferReader", iSession.Id() ); 
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::BaseConstructL
+// Two-phased constructor
+// constructor that can leave. Used from derived classes.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::BaseConstructL()
+    {
+    CActiveScheduler::Add( this );              
+                
+    iRetryTimer = CUpnpNotifyTimer::NewL( this );
+    iCancelTimer = CUpnpNotifyTimer::NewL( this );        
+    
+    InitiateBufferL();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::CalculateBufferSize
+// Finds nearest higher power of 2 for the given size
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileTransferReader::CalculateBufferSize( TInt aReadPortion, 
+                                                       TInt aBufferSize )
+    {
+    aBufferSize -= 1;
+    aBufferSize = aBufferSize | (aBufferSize >> 1);
+    aBufferSize = aBufferSize | (aBufferSize >> 2);
+    aBufferSize = aBufferSize | (aBufferSize >> 4);
+    aBufferSize = aBufferSize | (aBufferSize >> 8);
+    aBufferSize = aBufferSize | (aBufferSize >> 16);    
+    aBufferSize += 1;
+
+    if (aBufferSize <aReadPortion)
+        {        
+        aBufferSize = aReadPortion;
+        }
+    return aBufferSize;
+    }            
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::~CUpnpHttpFileTransferReader
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpFileTransferReader::~CUpnpHttpFileTransferReader()
+    {    
+    Cancel();    
+    iCacheBuffer.Close();        
+    delete iRetryTimer;
+    delete iCancelTimer;   
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::Start
+// Starts reading.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::StartL()
+    {    
+    LOGS1( "%i, CUpnpHttpFileTransferReader::Start", iSession.Id() );
+    if ( IsActive() )
+        {        
+        return;
+        }
+    
+    if ( RemainingBytes() <= 0 )
+        {
+        HandleOneBufferShortTransferL();
+        }
+    else 
+        {
+        IssueRead();
+        }
+    }    
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::HandleOneBufferShortTransferL
+// ---------------------------------------------------------------------------
+//    
+void CUpnpHttpFileTransferReader::HandleOneBufferShortTransferL()
+    {    
+    TInt totalLength = iSession.FileAccess()->TransferTotal();
+    if ( totalLength > 0 && totalLength < iCacheBuffer.Length() )
+        {
+        //cut off malicious bytes exceeding contenth-length
+        iCacheBuffer.SetLength( totalLength );
+        }
+    TInt error = iSession.FileAccess()->SaveL( iCacheBuffer );
+            
+    if ( error != KErrNone )
+        {                
+        iSession.FileTransferReaderErrorL( error );
+        LOGSH( error, "error in HandleOneBufferShortTransferL" );
+        return;
+        }
+    iSession.FileTransferReaderDoneL();
+    Finish();
+    }     
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::DoCancel
+// From class CActive.
+// Cancels issued reading.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::DoCancel()
+    {
+    LOGS1( "%i, CUpnpHttpFileTransferReader::DoCancel", iSession.Id() );
+    // Cancel asychronous read request
+    iSocket.CancelRead();
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::CancelRetry
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::CancelTimers()
+    {
+    iRetryTimer->Cancel();
+    iCancelTimer->Cancel();
+    }       
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::RunL
+// From class CActive.
+// Function is called as a callback when the issued reading is completed.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::RunL()
+    {
+    LOGS2( "%i, CUpnpHttpFileTransferReader::RunL(), iStatus %i",
+            iSession.Id(), iStatus.Int() );
+
+    // Active object request complete handler
+    switch ( iStatus.Int() )
+        {
+        case KErrNone:
+            iRetryErrorCount = 0;
+            iCancelTimer->Cancel();
+
+            iSession.TimerCancel();
+            iCacheBuffer.SetLength( iCacheBuffer.Length() + iLen() );
+            if ( ( iCacheBuffer.MaxLength() == iCacheBuffer.Length() ) 
+                || !(RemainingBytes() > 0))
+                {                
+                iIsFinished = HandleL();                               
+                }                                      
+            if ( !iIsFinished )
+                {
+                IssueRead();
+                iSession.StartTimeoutTimer( ETrue );
+                }
+            else
+                {                
+                Finish();
+                }                                       
+            break;
+         case KErrCancel:
+            if ( iCancelFromTimer ) 
+                {          
+                IssueRead();
+                iCancelFromTimer = EFalse;
+                }
+            break;            
+        case KErrEof:
+            iSession.TimerCancel();
+            iCacheBuffer.SetLength( iCacheBuffer.Length() + iLen() );
+            iIsFinished = HandleL();                        
+            if ( iIsFinished )
+                {
+                iSession.HandleErrorL( iStatus.Int() );
+                break;
+                }                       
+        case KErrNoMemory:
+        case KErrNotReady:
+        case KErrInet6AddressExpired:
+            if ( iRetryErrorCount < KMaxRetryErrors )
+                {
+                iRetryTimer->Cancel();
+                iRetryTimer->After( KRetryWaitTime * ++iRetryErrorCount, EFalse );
+                break;
+                }
+        default:            
+            iIsFinished = ETrue;
+            iIsActivated = EFalse;
+            if ( iSession.FileAccess() ) 
+                { 
+                iSession.FileAccess()->DeleteFile();            
+                }
+            iSession.HandleErrorL( iStatus.Int() );
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::RunError
+// RunError is called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+
+TInt CUpnpHttpFileTransferReader::RunError( TInt /*aError*/ )
+    {  
+    LOGS( "CUpnpHttpFileTransferReader::RunError"); 
+    HandleError();      
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSessionReader::TimerEventL
+// Retry read
+// -----------------------------------------------------------------------------
+//        
+void CUpnpHttpFileTransferReader::TimerEventL( CUpnpNotifyTimer* aTimer )
+    {
+    if ( aTimer == iCancelTimer )
+        {
+        LOGS( "CUpnpHttpFileTransferReader::TimerEventL, canceltimer");
+        iCancelFromTimer = ETrue;
+        iSocket.CancelRecv();
+        }
+    else if ( aTimer == iRetryTimer )
+        {
+        IssueRead();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSessionReader::StartCancelTimer
+// -----------------------------------------------------------------------------
+//  
+void CUpnpHttpFileTransferReader::StartCancelTimer()
+    {
+    LOGS( "CUpnpHttpFileTransferReader::StartCancelTimer");
+    TInt timeout = iSession.TimeoutCurrentValue();
+    iCancelTimer->Cancel();
+       
+    timeout = timeout/2 - KTwoSec;
+    if ( timeout <= 0 ) 
+        {
+        timeout = KOneSec;
+        }
+    iCancelTimer->After( timeout, EFalse );
+    iCancelFromTimer = EFalse;
+    }
+   
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::IssueRead
+// Issues reading.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::IssueRead()
+    {       
+    if ( IsActive() )
+        {
+        LOGS1( "%i, PANIC: CUpnpHttpFileTransferReader::IssueRead!", 
+                iSession.Id() );
+        User::Panic( _L("CUpnpHttpFileTransferReader is active" ), KErrGeneral );    
+        } 
+                                               
+    if ( iSession.IsConnected() )
+        {          
+        ReadFromSocket();
+        }
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::RemainingBytes
+// Returns the remaining numbers of bytes to read
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileTransferReader::RemainingBytes()
+    {
+    LOGS( "CUpnpHttpFileTransferReader::RemainingBytes()");
+    if ( !iSession.FileAccess() )
+        {        
+        return 0;
+        }    
+    if ( iSession.FileAccess()->TransferTotal() == KErrNotFound ) 
+        {        
+        return ( TcpFinFoundRemainingBytes() );
+        }    
+    return ( iSession.FileAccess()->TransferTotal() - 
+             iSession.FileAccess()->BytesWritten() - iCacheBuffer.Length() );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::ReadBufferSize
+// Returns the maximum size of bytes to read for once
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileTransferReader::ReadBufferSize()
+    {
+    LOGS( "CUpnpHttpFileTransferReader::ReadBufferSize()");
+    if ( !iSession.FileAccess() )
+        {        
+        return 0;
+        }
+    //checks how much space in the buffer
+    TInt availableSpace = AvailableSpace();
+    
+    //content-length no specified            
+    if( iSession.FileAccess()->TransferTotal() == KErrNotFound )
+        {        
+        return availableSpace;
+        }
+        
+    TInt remainingBytes = RemainingBytes();     
+    //chooses free space in the buffer or the num of remaining bytes to read        
+    return ( availableSpace >= remainingBytes ) ? remainingBytes : availableSpace;    
+    }               
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::HandleL
+// Handles adata in buffer, returns if file transfer has finished
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileTransferReader::HandleL()
+    {
+    LOGS( "CUpnpHttpFileTransferReader::HandleL");
+    TInt error = KErrGeneral;    
+    if ( iSession.FileAccess() )
+        {
+        LOGS( "calling iFile->SaveL()");
+        TPtr8 ptr = iCacheBuffer.LeftTPtr( iCacheBuffer.Size() );
+        error = iSession.FileAccess()->SaveL( ptr );
+        iCacheBuffer.SetLength(0);
+        }    
+    if ( error != KErrNone )
+        {                
+        iSession.FileTransferReaderErrorL( error );
+        LOGS( "returning ETrue after FileTransferReaderErrorL" );
+        return ETrue;
+        }
+    else if ( !( RemainingBytes() > 0 ) )
+        {
+        iSession.FileTransferReaderDoneL();
+        LOGS( "returning ETrue FileTransferReaderDoneL");
+        return ETrue;
+        }        
+    LOGS( "returning EFalse"); 
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::Finish
+// Finishes session
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::Finish()
+    {            
+    iIsActivated = EFalse;
+    iSession.StartClosingSession();        
+    }    
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::Reset
+// Makes reader ready to start reading new content
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::Reset()
+    {    
+    iIsFinished = EFalse;
+    iIsActivated = EFalse;
+    iCacheBuffer.SetLength(0);
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::Activated
+// Checks if the filetransfer reader is started and in use
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileTransferReader::Activated()
+    {    
+    return iIsActivated;
+    } 
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::SetActivated
+// Filetransfer reader taken in use
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::SetActivated( TBool aValue )
+    {    
+    iIsActivated = aValue;
+    }
+        
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::ReadFromSocket
+// Reads data from socket
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::ReadFromSocket()
+    {    
+    Deque();
+    CActiveScheduler::Add(this);
+    
+    TInt len = ReadBufferSize();
+    TPtr8 ptr = iCacheBuffer.RightTPtr( 0 );
+    iReceivePtr.Set( (TUint8*)ptr.Ptr(), len, len );
+    StartCancelTimer();
+    iSocket.RecvOneOrMore( iReceivePtr, 0, iStatus, iLen );   
+    SetActive();
+    }        
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::AppendL(const TDesC8& aBeginning)
+// Appends beginning data to the buffer
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::AppendL( const TDesC8& aBeginning )
+    {    
+    //if no space for this operation, abort it,it shouldn't occur
+    if ( iCacheBuffer.MaxSize() - iCacheBuffer.Length() < aBeginning.Length() )
+        {        
+        User::Leave(KErrAbort);
+        }
+    
+    iCacheBuffer.Append( aBeginning );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::InitiateBufferL()
+// Initiates the buffer
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::InitiateBufferL()
+    {    
+    if ( !iSession.FileAccess() )
+        {        
+        User::Leave( KErrGeneral );  
+        }
+    
+    iCacheBuffer.Close();    
+    iCacheBuffer.CreateL( iBufferSize );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::HandleError
+// Handles error from RunL
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferReader::HandleError()
+    {
+    if ( iSession.FileAccess() )
+        {
+        iSession.FileAccess()->DeleteFile();        
+        }
+    iIsFinished = ETrue;
+    Finish();        
+    }    
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::TcpFinFoundRemainingBytes
+// Detects end of body when no content length
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileTransferReader::TcpFinFoundRemainingBytes()
+    {
+    if ( iStatus.Int() == KErrEof )
+        {
+        //the num of written bytes will be the transfer total
+        iSession.FileAccess()->SetTransferTotal( 
+                                   iSession.FileAccess()->BytesWritten() );
+        return 0;
+        }        
+    else
+        {        
+        return AvailableSpace();        
+        }
+    }  
+       
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferReader::AvailableSpace
+// Returns num of bytes that will still fit into the buffer
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileTransferReader::AvailableSpace()
+    {
+    TInt space = (iBufferSize < iCacheBuffer.Length() + iReadBufferSize) ?
+                iBufferSize - iCacheBuffer.Length(): iReadBufferSize;    
+    return space;        
+    }  
+        
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpfiletransferwriter.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,448 @@
+/** @file
+* 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:  CUpnpHttpFileTransferWriter is a class responsible for 
+*                   asynchronous writing to a socket owned by CUpnpTcpSession.
+*
+*/
+
+
+
+#include "upnptcpsession.h"
+#include "upnphttpfiletransferwriter.h"
+#include "upnphttpfileaccess.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::NewL
+// Factory method.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpFileTransferWriter* CUpnpHttpFileTransferWriter::NewL( CUpnpTcpSession& aSession,
+                                                    RSocket& aSocket,
+                                                    TThreadPriority aPriority,
+                                                    TInt aWriteSize )
+    {
+    CUpnpHttpFileTransferWriter* self = new ( ELeave ) 
+            CUpnpHttpFileTransferWriter( aSession, aSocket, aPriority, aWriteSize );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::CUpnpHttpFileTransferWriter
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpFileTransferWriter::CUpnpHttpFileTransferWriter( CUpnpTcpSession& aSession,
+                                              RSocket& aSocket, 
+                                              TThreadPriority aPriority,
+                                              TInt aWriteSize )
+    :CActive( aPriority ),
+    iSocket( aSocket ),
+    iSession( aSession ),
+    iState(EUnknown),
+    iSendPointer(NULL,0),
+    iWriteSize(aWriteSize)
+    {
+    LOGS1( "%i, CUpnpHttpFileTransferWriter::CUpnpHttpFileTransferWriter", iSession.Id() );
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::ConstructL
+// Two-phased constructor
+// constructor that can leave. Used from derived classes.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::ConstructL()
+    {
+    CActiveScheduler::Add( this );   
+    iRetryWrite = CUpnpRetryWrite::NewL( iSession, iSocket, this, (TThreadPriority)Priority() );
+    
+    iSendBuffer.CreateL( iWriteSize );
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::~CUpnpTcpSessionReader
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpFileTransferWriter::~CUpnpHttpFileTransferWriter()
+    {    
+    Cancel();    
+    
+    iSendBuffer.Close();
+    
+    delete iRetryWrite;
+    }
+ 
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::DoCancel
+// From class CActive
+// Cancels issued writing request.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::DoCancel()
+    {
+    LOGS1( "%i, CUpnpHttpFileTransferWriter::DoCancel", iSession.Id() );
+    
+	iState = ECancelled;
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::RunL
+// From class CActive
+// Function called when issued writing is completed. Function checks if there
+// are any write requests left to send and if there are then it issues writing.
+// If queue is empty then function informs upper layer that writing is completed.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::RunL()
+    {
+    LOGS2( "%i, CUpnpHttpFileTransferWriter::RunL(), iStatus %i", 
+    		iSession.Id() , iStatus.Int() );
+    
+    // Active object request complete handler
+    if ( iStatus == KErrNone )
+        {
+        switch( iState )
+            {
+            // Character has been written to socket
+            case EHeaders:
+            	//100-continue not expected
+            	if(!iSession.FileAccess())
+            		{
+            		Cancel();
+            		break;
+            		}
+            	else 
+            		{
+            		iState = EContent;            		
+            		}
+            case EContent:            	
+            	SendNextPortionL();            
+                
+                break;
+            case EFinished:                    	    	
+            	iSession.FileTransferWriterDoneL();
+
+            	iSession.StartTimeoutTimer(EFalse);            	                      	
+				FinishL();
+            	//export finished
+            	break;    
+            
+            default:                
+                break;
+            };
+        }
+    else
+        {
+           if( (iState == EHeaders || iState == EContent || iState == EFinished) &&
+              (iStatus.Int() == KErrNoMemory || iStatus.Int() == KErrNotReady ) )
+           {
+				iRetryWrite->IssueWriteRetry();
+    	   }
+		   else
+	       {
+				// Error: pass it up to session
+				iSession.HandleErrorL( iStatus.Int() );
+				iState = ECancelled;
+			}
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::RunError
+// RunError is called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpFileTransferWriter::RunError( TInt aError )
+    {
+    LOGS2( "%i, CUpnpHttpFileTransferWriter::RunError %d"
+    		, iSession.Id() , aError);
+    
+    iState = EFinished;        
+                
+    TRAP_IGNORE( HandleErrorL() );
+    iSession.StartClosingSession();
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::SendNextWriteRequestL
+// Function checks if there are any write requests left and if there are then
+// issues writing and removes this request from queue.
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::SendNextPortionL()
+    {
+    LOGS2( "%i, CUpnpHttpFileTransferWriter::SendNextPortionL(), iState %i",
+    		iSession.Id() , iState );
+	
+	if( iSession.FileAccess() )
+		{
+		if( iState == EContent )    	
+	    	if( !IsActive() )
+	    		{      	
+		    	iSendPointer.Set( (TUint8*)iSendBuffer.Ptr(),0,iSendBuffer.MaxLength() );
+		        if( iSession.FileAccess()->GetL(iSendPointer,iSendBuffer.MaxLength()) )
+		        	{
+		        	iState = EFinished;     		
+		        	}
+		        
+				
+				iSession.TimerCancel();        
+		        WriteToSocket();
+		        iSession.StartTimeoutTimer(ETrue);	       
+		        
+	    		}
+		}
+	else
+		{
+		Cancel();
+		}
+  
+    }  
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::StartL
+// Passes control to the reader
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::StartL()
+    {
+    iWaiting = EFalse;    
+	switch(iState)
+		{
+			case EUnknown:			
+				
+				iState = EHeaders;
+				SendHeadersL();
+				break;
+			case EHeaders:
+				
+				if(iSession.FileAccess()->HeadersSent())
+					{
+					iState = EContent;				
+					SendNextPortionL();
+					}
+				else
+					SendHeadersL();
+				break;
+				
+			default:
+				break;
+		}
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::StartL
+// Sends the HTTP headers of the content
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::SendHeadersL()
+    {
+    if(iState == EHeaders)
+    	if( iSession.FileAccess() )
+    		if(!IsActive())
+    			{ 
+    			//in case session not connected,waiting...
+    			if(!iSession.IsConnected())
+					{
+					iWaiting = ETrue;
+					return;
+					}   			
+				iSendBuffer.Zero();
+				
+				if ( ( iSession.FileAccess()->GetHeaders().Length() -
+				       iSession.FileAccess()->TransferredBytes()) <= 
+		               iSendBuffer.MaxLength() )
+					{
+					TPtrC8 headerPointer;
+					headerPointer.Set(iSession.FileAccess()->GetHeaders());
+					headerPointer.Set( headerPointer.Right( 
+		            iSession.FileAccess()->GetHeaders().Length()-
+		                iSession.FileAccess()->TransferredBytes()) );
+				
+					iSendBuffer.Append( headerPointer );			
+					iSession.FileAccess()->SetHeadersSent();
+
+                    // Adding file content to the header
+                    TInt length = iSendBuffer.MaxLength()-iSendBuffer.Length();
+                    						
+                    HBufC8* tmpBuffer = HBufC8::NewLC(length);
+					
+                    iSendPointer.Set(tmpBuffer->Des());
+                    if( iSession.FileAccess()->GetL(iSendPointer,length) )
+                        {
+                        iState = EFinished;
+                        }
+                    iSendBuffer.Append(iSendPointer);
+                    CleanupStack::PopAndDestroy( tmpBuffer );
+					}
+				else
+					{
+					TPtrC8 headerPointer;
+					headerPointer.Set( iSession.FileAccess()->GetHeaders() );
+					headerPointer.Set( headerPointer.Right( 
+		            iSession.FileAccess()->GetHeaders().Length() -
+		                iSession.FileAccess()->TransferredBytes() ) );
+					headerPointer.Set( headerPointer.Left( 
+		                iSendBuffer.Length() ) );
+					
+					iSendBuffer.Append( headerPointer );				
+					iSession.FileAccess()->SetPosOfHeader( 
+					    iSession.FileAccess()->TransferredBytes() + headerPointer.Length() );							
+					}
+		    	
+		    	iSendPointer.Set((TUint8*)iSendBuffer.Ptr(),iSendBuffer.Length(),iSendBuffer.MaxLength());
+    	   		
+    	   		iSession.TimerCancel();        
+	        	WriteToSocket();
+	        	iSession.StartTimeoutTimer(ETrue);
+	        	
+	        	if(!iHttpPostStarted)
+	        		{
+	        		iSession.NotifyUpperLayersOnPostL();
+	        		iHttpPostStarted = ETrue;
+	        		}
+	        		
+    			}
+    }          
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::Reset
+// Resets the state of the writer
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::Reset()
+    {
+    iState = EUnknown;  
+    iHttpPostStarted = ETrue;  
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::WriteToSocket
+// Writes data to socket
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::WriteToSocket()
+    {
+	Deque();
+	CActiveScheduler::Add(this);  
+
+	iSocket.Write(iSendPointer,iStatus);
+	SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::IsWaiting
+// Checks if file transfer writer is in use
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileTransferWriter::IsWaiting()
+    {
+	return iWaiting;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::IsActivated
+// Writes data to socket
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileTransferWriter::IsActivated()
+    {
+	return (!iWaiting && iState!=EUnknown);
+    } 
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::IsRetrying
+// if waiting to retry writing to a socket
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileTransferWriter::IsRetrying()
+    {
+	return (iRetryWrite->IsStarted());
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::IsCancelled
+// Checks if transfer is cancelled
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpHttpFileTransferWriter::IsCancelled()
+    {
+	return (iState== ECancelled);
+    }        
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::FinishL
+// Finishes download
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::FinishL()
+    {
+	iSession.FileTransferWriterHandleMoreL();
+    }    
+    
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::HandleErrorL
+// Handles RunL error
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::HandleErrorL()
+    {
+    iSession.FileTransferWriterDoneL(); // 200ok to upper layers + delete iFileServe    
+    FinishL();                          // serving uotstanding requests  
+    }
+        
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::SetPostNotify
+// Post notify will be sent
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpFileTransferWriter::SetPostNotify()
+    {
+	iHttpPostStarted = EFalse;
+    }    
+        
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::RetryWriteFailL
+// 
+// ---------------------------------------------------------------------------
+//    
+void CUpnpHttpFileTransferWriter::RetryWriteFailL( TInt aError )
+	{
+	// Error: pass it up to session
+	iSession.HandleErrorL( aError );
+    iState = ECancelled;
+	}
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpFileTransferWriter::RetryWriteSucceed
+// 
+// ---------------------------------------------------------------------------
+// 
+void CUpnpHttpFileTransferWriter::RetryWriteSucceed()
+	{
+	WriteToSocket();
+	}
+    
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpserver.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,353 @@
+/** @file
+* 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:  Declares HttpServer class.
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32std.h>
+#include <upnpsettings.h>
+
+#include "upnphttpserver.h"
+#include "upnphttpsession.h"
+#include "upnphttpfileaccess.h"
+#include "upnpstring.h"
+#include "upnpcommonupnplits.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "upnpcons.h"
+#include "upnphttpmessagefactory.h"
+#include "upnphttpservertransactioncreator.h"
+#ifdef RD_UPNP_REMOTE_ACCESS
+#include "upnpipfiltermanager.h"
+#endif
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::CUpnpHttpServer
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServer::CUpnpHttpServer( MUpnpHttpServerObserver* aObserver,
+                                  MUpnpHttpServerTransactionCreator* aCreator,
+                                  RSocketServ* aSocketServ,
+                                  TInt aActiveIap )
+    : CUpnpTcpServer( aSocketServ, KDefaultHttpPort, aActiveIap )
+    {
+    iObserver = aObserver;
+    iTransactionCreator = aCreator;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::~CUpnpHttpServer
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServer::~CUpnpHttpServer()
+    {
+    delete iServerDescription;
+    iFs.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServer* CUpnpHttpServer::NewL( MUpnpHttpServerObserver* aObserver,
+                                                 RSocketServ* aSocketServ,
+                                                 TInt aActiveIap )
+    {
+    LOG_FUNC_NAME;
+       
+    CUpnpHttpServer* self = new (ELeave) CUpnpHttpServer( aObserver, NULL,           
+            aSocketServ, aActiveIap );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::ConstructL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServer::ConstructL()
+    {
+    BaseConstructL();
+    User::LeaveIfError(iFs.Connect());
+    iServerDescription =  CUpnpSettings::GetServerHeaderL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::StartL
+// Start tcp server
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServer::StartL( const TInt aPort )
+    {
+    LOG_FUNC_NAME;
+    OpenSocketL();
+    if ( aPort )
+        {
+        BindL( aPort );
+        }
+        else
+        {
+        BindRandomPortL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::Stop
+// Stop tcp server
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServer::Stop()
+    {
+    LOG_FUNC_NAME;
+    TRAP_IGNORE( StopTcpServerL() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::ToReceiveStackD
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServer::ToReceiveStackD( CUpnpHttpMessage* aMsg )
+    {
+    LOG_FUNC_NAME;
+    //to indicate that the upper layer can give a response for it is acting as a host in this session
+    if ( !aMsg )
+        {
+        return;
+        }
+	aMsg->SetClientRequest(ETrue);
+	//for redirection codes
+
+    #ifdef _DEBUG
+        TInt err;
+        TRAP( err, iObserver->HttpEventLD( aMsg ) );
+        LOGS1H( iHandle, "CUpnpHttpServer::ToReceiveStack() Error %i", err );
+
+    #else
+        TRAP_IGNORE(  iObserver->HttpEventLD( aMsg ) );
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::SendMessageL
+// Send HTTP message
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpServer::SendMessageL( CUpnpHttpMessage* aMessage )
+    {
+    LOG_FUNC_NAME;
+
+    if (!aMessage)
+		{
+		LOGS("CUpnpHttpServer::SendMessageL - Tried to send Null");
+		return KErrNotFound;
+		}
+
+    TInt trapError( KErrNone );
+    TInt sessId( KErrNone );
+
+    TRAP(trapError, sessId = TrapSendMessageL( aMessage ) );
+
+    if( trapError < KErrNone )
+        {
+        LOGS1( "HTTP *** Sending of message failed. Error: %i", trapError );
+        // HttpSession errors that cannot be forwarded to upper layers
+        if( -trapError >= EHttpBadRequest && -trapError <= EHttpExpectationFailed )
+            {
+            CUpnpHttpMessage* notify = NULL;
+            notify = RUpnpHttpMessageFactory::HttpResponseErrorL( aMessage, -trapError );
+            CUpnpHttpSession* sess = GetSession( aMessage->SessionId() );
+            sess->DeleteThisSessionL( sess );
+
+            ToReceiveStackD( notify ); //Upper layer takes care about cleanup
+            }
+        else
+            {
+            User::Leave(trapError);
+            }
+        }
+    // nobody use the value
+    return sessId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::TrapSendMessageL
+// Send HTTP message
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpServer::TrapSendMessageL( CUpnpHttpMessage* aMessage )
+    {
+    CUpnpHttpSession* sess = GetSession( aMessage->SessionId() );
+    if( sess )
+        {
+        sess->SendL( aMessage );
+        return sess->Id();
+        }
+    else
+        {
+        // If running out of memory, there is nothing else to do but leave
+        if ( KErrNoMemory == aMessage->SessionId() )
+            {
+            LOGS("CUpnpHttpServer::TrapSendMessageL - OUT OF MEMORY");
+            User::Leave( KErrNoMemory );
+            }        
+        }
+    return KErrNotFound;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::GetSession
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpSession* CUpnpHttpServer::GetSession( TInt aSessionId )
+    {
+    CUpnpHttpSession* sess = NULL;
+
+    for ( TInt i=0; i < iSessionList.Count(); i++ )
+        {
+        if ( ( (CUpnpHttpSession*) iSessionList[i] )->Id() == aSessionId )
+            {
+            sess = (CUpnpHttpSession*) iSessionList[i];
+            return sess;
+            }
+        }
+
+    return sess;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::ServerDescription
+// Returns server's description
+// -----------------------------------------------------------------------------
+//
+TDesC8& CUpnpHttpServer::ServerDescription()
+    {
+    return *iServerDescription;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::ConnectionAcceptedL
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpTcpSession* CUpnpHttpServer::ConnectionAcceptedL( RSocket aSocket )
+    {
+    LOG_FUNC_NAME;
+
+    #ifdef _DEBUG
+    TInetAddr tempAddr;
+    aSocket.RemoteName( tempAddr );
+    tempAddr.ConvertToV4();
+
+    const TInt KMaxAdressLength = 20;
+    TBuf<KMaxAdressLength> addrBuf;
+    tempAddr.Output( addrBuf );
+
+    HBufC8* addrBuf8 = UpnpString::FromUnicodeL( addrBuf );
+    CleanupStack::PushL( addrBuf8 );
+
+    LOGS( "CUpnpHttpServer::ConnectionAcceptedL - Remote socket connected" );
+    LOGT( addrBuf8->Des() );
+
+    LOGS1("CUpnpHttpServer::ConnectionAcceptedL - Creating a new Http session. Session count: %i", iSessionList.Count());
+
+    CleanupStack::PopAndDestroy(addrBuf8);
+    #endif //_DEBUG
+    CUpnpHttpSession* sess = CUpnpHttpSession::NewL( aSocket, this,
+        CUpnpHttpMessage::NewSessionIdL(), EPriorityNormal );
+
+    return sess;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::SetCdDataFinder
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServer::SetTransactionCreator( 
+                                 MUpnpHttpServerTransactionCreator* aTransactionCreator )
+    {
+    iTransactionCreator = aTransactionCreator;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::HttpFilter
+//
+// -----------------------------------------------------------------------------
+//
+MUpnpHttpServerTransactionCreator* CUpnpHttpServer::TransactionCreator()
+    {
+    //ASSERT( iHttpFilter ) set in constructor defaultHttpFilter to ensure not null
+    return iTransactionCreator;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::FileSession
+// -----------------------------------------------------------------------------
+//
+RFs& CUpnpHttpServer::FileSession()
+    {
+    return iFs;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::ConnectionL
+// -----------------------------------------------------------------------------
+//
+RConnection& CUpnpHttpServer::ConnectionL()
+    {
+    return iConnectionManagerProxy->ConnectionL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::StartIPFilteringL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpServer::StartIPFilteringL()
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    if( !iIPFilteringManager )
+    {
+    iIPFilteringManager = CUpnpIPFilterManager::NewL();
+    }
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServer::StopIPFiltering
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpServer::StopIPFiltering()
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    delete iIPFilteringManager;
+    iIPFilteringManager = NULL;
+    #endif
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpserverruntime.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,174 @@
+/** @file
+* 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:  CUpnpHttpServerRuntime is a single runtime.
+*
+*/
+
+#include "upnphttpserverruntime.h"
+#include "upnpconnectionmanagerproxy.h"
+#include "upnphttpserver.h"
+#include "upnpsettings.h"
+
+static const TUint KSocketServerConnectionSlots = 60;
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::CUpnpHttpServerRuntime
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerRuntime::CUpnpHttpServerRuntime( TUint /*aUnusedIapId*/,
+                                                MUpnpHttpServerObserver& aObserver ):
+    iObserver( aObserver )                                               
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::~CUpnpHttpServerRuntime
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerRuntime::~CUpnpHttpServerRuntime()
+    {
+    delete iHttpServer;
+    CloseSocketServer();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::NewLC
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerRuntime* CUpnpHttpServerRuntime::NewLC( 
+    TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver )
+    {
+    CUpnpHttpServerRuntime* self = new (ELeave) CUpnpHttpServerRuntime( aUnusedIapId, aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::NewL
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerRuntime* CUpnpHttpServerRuntime::NewL( 
+    TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver )
+    {
+    CUpnpHttpServerRuntime* self = CUpnpHttpServerRuntime::NewLC( aUnusedIapId, aObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServerRuntime::ConstructL()
+    {    
+    // connecting to needed servers
+    OpenSocketServerL();
+    GetIapAndStartServerL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::GetIapAndStartServer
+// -----------------------------------------------------------------------------
+//    
+void CUpnpHttpServerRuntime::GetIapAndStartServerL()
+    {       
+    // Gets IAP
+    CUpnpConnectionManagerProxy *proxy = CUpnpConnectionManagerProxy::NewLC( iSocketServ );
+    User::LeaveIfError( proxy->EnsureStart() );
+    TInt iap = proxy->ActiveIap();    
+    
+    TInt bufferSize = CUpnpSettings::GetFileBufferSizeL();
+    // creating Http server
+    iHttpServer = CUpnpHttpServer::NewL( &iObserver, &iSocketServ, iap );
+    iHttpServer->SetFileReadBufferSize( bufferSize );
+    iHttpServer->SetFileWriteBufferSize( bufferSize );
+    
+    CleanupStack::PopAndDestroy( proxy );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::SetCreator
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpServerRuntime::SetCreator( MUpnpHttpServerTransactionCreator& aCreator )
+    {
+    iTransactionCreator = &aCreator;
+    iHttpServer->SetTransactionCreator( &aCreator );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::HttpServer
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServer& CUpnpHttpServerRuntime::HttpServer()
+    {
+    return *iHttpServer; 
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::DeleteServer
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServerRuntime::DeleteServer()
+    {
+    if ( iHttpServer )
+        {
+        // server should be stopped to notify failed transfers
+        iHttpServer->Stop();
+        delete iHttpServer;
+        iHttpServer = NULL;   
+        CloseSocketServer();
+        }    
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::StartServerL
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServerRuntime::StartServerL(  const TInt aPort )
+    {
+    OpenSocketServerL();  
+    if ( !iHttpServer )
+        {
+        GetIapAndStartServerL();
+        }
+    iHttpServer->SetTransactionCreator( iTransactionCreator );  
+    iHttpServer->StartL( aPort );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::OpenSocketServerL
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServerRuntime::OpenSocketServerL()
+    {
+    if ( !iIsSocketOpened )
+        {
+        User::LeaveIfError( iSocketServ.Connect( KSocketServerConnectionSlots ) );
+        iIsSocketOpened = ETrue;
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerRuntime::CloseSocketServer
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServerRuntime::CloseSocketServer()
+    {
+    iSocketServ.Close();
+    iIsSocketOpened = EFalse;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpserversession.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,130 @@
+/** @file
+* 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:  CUpnpHttpServerSession is class that is used to handle single 
+*                 connections to HttpServer
+*
+*/
+
+#include "upnphttpserversession.h"
+#include "upnphttpserverruntime.h"
+#include "upnphttpserver.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::CUpnpHttpServerSession
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerSession::CUpnpHttpServerSession()
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::~CUpnpHttpServerSession
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerSession::~CUpnpHttpServerSession()
+    {
+    delete iServerRuntime;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::NewLC
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerSession* CUpnpHttpServerSession::NewLC(
+    TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver )
+    {
+    CUpnpHttpServerSession* self = new (ELeave) CUpnpHttpServerSession();
+    CleanupStack::PushL( self );
+    self->ConstructL( aUnusedIapId, aObserver );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpServerSession* CUpnpHttpServerSession::NewL(
+    TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver )
+    {
+    CUpnpHttpServerSession* self = CUpnpHttpServerSession::NewLC( aUnusedIapId, aObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServerSession::ConstructL( 
+    TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver )
+    {
+    iServerRuntime = CUpnpHttpServerRuntime::NewL( aUnusedIapId, aObserver );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::StartL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpServerSession::StartL( const TInt aPort )
+    {    
+    iServerRuntime->StartServerL( aPort ) ;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::Stop
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpServerSession::Stop()
+    {
+    iServerRuntime->DeleteServer();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::GetAddress
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpServerSession::GetAddress( TInetAddr& aAddr )
+    {    
+    iServerRuntime->HttpServer().ServerAddress( aAddr );
+    aAddr.SetPort( iServerRuntime->HttpServer().ServerPort() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::DefaultRuntime
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpServerRuntime& CUpnpHttpServerSession::DefaultRuntime()
+    {
+    return *iServerRuntime;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::SendMessageL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpServerSession::SendMessageL( CUpnpHttpMessage* aMessage )
+    {
+    return iServerRuntime->HttpServer().SendMessageL( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerSession::HWAddressL
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C TSockAddr* CUpnpHttpServerSession::HWAddressL()
+    {
+    return iServerRuntime->HttpServer().HWAddressL();
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpservertransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,200 @@
+/** @file
+ * 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:  CUpnpHttpServerTransaction implementation.
+ *
+ */
+
+#include <f32file.h>
+#include "upnpcons.h"
+#include "upnphttpservertransaction.h"
+#include "upnphttpmessage.h"
+#include "upnpfileutils.h"
+#include "upnphttpservertransactioncreator.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::CUpnpHttpServerTransaction
+// 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C CUpnpHttpServerTransaction::CUpnpHttpServerTransaction()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::~CUpnpHttpServerTransaction
+// 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C CUpnpHttpServerTransaction::~CUpnpHttpServerTransaction()
+    {
+    iHeaderBuffer.Close();
+    iFile.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::SetDataSourceL
+// used for GET 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C void CUpnpHttpServerTransaction::SetDataSourceL( RFile& aFile )
+    {
+    iFile.Close();
+    iFile = aFile;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::SetDataSinkL
+// used for POST 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C void CUpnpHttpServerTransaction::SetDataSinkL( RFile& aFile )
+    {
+    iFile.Close();
+    iFile = aFile;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::DataSource
+// used for GET 
+// ---------------------------------------------------------------------------
+// 
+RFile& CUpnpHttpServerTransaction::DataSource()
+    {
+    return iFile;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::DataSink
+//  used for POST 
+// ---------------------------------------------------------------------------
+// 
+RFile& CUpnpHttpServerTransaction::DataSink()
+    {
+    return iFile;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::AddResponseHeaderL
+// 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C void CUpnpHttpServerTransaction::AddResponseHeaderL( const TDesC8& aName, 
+                                                              const TDesC8& aValue )
+    {
+    TInt newLength = iHeaderBuffer.Length() + aValue.Length() 
+                     + UpnpString::KDoubleLineFeed().Length();
+    TBool nameUsed = ( aName != KNullDesC8() );
+    TInt dlfLen = UpnpString::KDoubleLineFeed().Length();
+    
+    if ( iHeaderBuffer.Right( dlfLen ).Compare( UpnpString::KDoubleLineFeed() ) == 0 )
+        {   // if buffer ends with double line feed then remove it and append line feed
+        iHeaderBuffer.Delete( iHeaderBuffer.Length() - dlfLen, dlfLen );
+        iHeaderBuffer.Append( UpnpString::KLineFeed() );
+        }
+
+    if ( nameUsed )
+        {
+        newLength += UpnpString::KColon().Length() + UpnpString::KSpace().Length() 
+                     + aName.Length();
+        }
+
+    iHeaderBuffer.ReAllocL( newLength );
+
+    if ( nameUsed )
+        {
+        iHeaderBuffer.Append( aName );
+        iHeaderBuffer.Append( UpnpString::KColon() );
+        iHeaderBuffer.Append( UpnpString::KSpace() );
+        }
+    else
+        {
+        iHeaderBuffer.Zero();
+        }
+
+    iHeaderBuffer.Append( aValue );
+    iHeaderBuffer.Append( UpnpString::KLineFeed() );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::QueryResponseHeader
+// 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C const TDesC8& CUpnpHttpServerTransaction::QueryResponseHeader()
+    {
+    if ( iHeaderBuffer.Find( UpnpString::KDoubleLineFeed() ) == KErrNotFound )
+        {
+        if ( iHeaderBuffer.Right( UpnpString::KLineFeed().Length() ).
+                                    Compare( UpnpString::KLineFeed() ) == 0 )
+            {
+            if ( iHeaderBuffer.ReAlloc( iHeaderBuffer.Length() +
+                             UpnpString::KLineFeed().Length() ) == KErrNone )
+                {
+                iHeaderBuffer.Append( UpnpString::KLineFeed() );
+                }
+            }
+        else
+            {
+            if ( iHeaderBuffer.ReAlloc( iHeaderBuffer.Length() + 
+                       UpnpString::KDoubleLineFeed().Length() ) == KErrNone )
+                {
+                iHeaderBuffer.Append( UpnpString::KDoubleLineFeed() );
+                }
+            }
+        }
+    return iHeaderBuffer;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::SetHttpCode
+// 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C void CUpnpHttpServerTransaction::SetHttpCode( TInt aCode )
+    {
+    iHttpCode = aCode;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::QueryRequestHeader
+// 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C TDesC8& CUpnpHttpServerTransaction::QueryRequestHeader( const TDesC8& aHeaderName )
+    {
+    return iRequest->GetHeaderValue( aHeaderName );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::Error
+// 
+// ---------------------------------------------------------------------------
+// 
+EXPORT_C TInt CUpnpHttpServerTransaction::Error()
+    {
+    return iHttpCode;
+    }
+ 
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransaction::SetRequest
+// 
+// ---------------------------------------------------------------------------
+//    
+EXPORT_C void CUpnpHttpServerTransaction::SetRequest( CUpnpHttpMessage* aRequest )
+    {
+    iRequest = aRequest;
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnphttpsession.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1818 @@
+/** @file
+ * 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:  Declares HttpServer class.
+ *
+ */
+// INCLUDE FILES
+#include <in_sock.h>
+#include <e32std.h>
+#include <apgcli.h> // For RApaLsSession
+#include <apmstd.h>
+#include <escapeutils.h>
+#include <bautils.h>
+#include "upnphttpserver.h"
+#include "upnpstring.h"
+#include "upnpcons.h"
+#include "upnphttpsession.h"
+#include "upnphttpbuffer.h"
+#include "upnphttpfiletransferreader.h"
+#include "upnphttpfiletransferwriter.h"
+#include "upnphttpmessagefactory.h"
+#include "upnphttpheader.h"
+#include "upnperrors.h"
+#include "upnpcommonupnplits.h"
+#include "upnpfileutils.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "upnphttpfileaccess.h"
+#include "httperr.h"
+#include "upnphttpservertransactioncreator.h"
+#include "upnprangeheaderparser.h"
+#include "upnphttpservertransaction.h"
+
+// CONSTANTS
+_LIT8( KTransferPending801, "HTTP/1.1 801 Transfer Pending");
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpSession* CUpnpHttpSession::NewL( RSocket aSocket,
+    CUpnpHttpServer* aServer, TInt aSessionId, TThreadPriority aPriority )
+    {
+    LOGS1(  "%i, CUpnpHttpSession::NewL - creating session for incoming connection",
+            aSessionId );
+
+    CUpnpHttpSession* self = new (ELeave) CUpnpHttpSession( aSocket, aServer,
+        aSessionId, aPriority );
+    CleanupStack::PushL( self );
+    self->TcpConstructL( aSocket, KRcvBufSizeDefault,
+        aServer->FileReadBufferSize() );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    LOGS1( "%i, CUpnpHttpSession::NewL - HTTP *** Created new session.",
+            self->Id( ) );
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::CUpnpHttpSession
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpSession::CUpnpHttpSession( RSocket aSocket,
+    CUpnpHttpServer* aServer, TInt aSessionId, TThreadPriority aPriority ) :
+    CUpnpTcpSession( aSocket, aPriority )
+    {
+    iId = aSessionId;
+    iServer = aServer;
+    iRequestedTransferNotifySent = EFalse;
+    // Assume that session should be kept alive unless the request
+    // with HTTP header "Connection: close" comes.
+    iSessionKeepAlive = ETrue;
+    iSessionIsDeletedAfterResponse = EFalse;
+    iUsesConnectionClose = EFalse;
+    iSaveToFile = EFalse;
+    iOverwriteExisting = EFalse;
+    iOffset = 0;
+    iLength = 0;
+    iSaveAtOffset = EFalse;
+    iMaximumSizeChecked = EFalse;
+    iHeadersCompleted = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::ConstructL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::ConstructL()
+    {
+    LOGS1( "%i, CUpnpHttpSession::ConstructL", iId );
+    iFileServe = NULL;
+
+    iDestinationPath = HBufC8::NewL( 0 );
+    iSenderPath = HBufC8::NewL( 0 );
+
+    iInFilename = HBufC8::NewL( 0 );
+    iOutFilename = HBufC8::NewL( 0 );
+
+    iPendingRequests = new (ELeave) RPointerArray<CUpnpHttpMessage> ( 1 );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::~CUpnpHttpSession
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpSession::~CUpnpHttpSession()
+    {
+    LOGS1( "%i, CUpnpHttpSession::~CUpnpHttpSession()", iId );
+
+    delete iFileServe;
+    delete iInFilename;
+    delete iOutFilename;
+    delete iDestinationPath;
+    delete iSenderPath;
+
+    if ( iPendingRequests )
+        {
+        iPendingRequests->ResetAndDestroy();
+        iPendingRequests->Close();
+        delete iPendingRequests;
+        }
+
+    // no deleting of iPendingRequest, it's not owned
+    iPendingRequest = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::SendL
+// Send HTTP message.
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::SendL( CUpnpHttpMessage* aMessage )
+    {
+    LOGS1( "%i, CUpnpHttpSession::SendL(CUpnpHttpMessage*)", iId );
+
+    if ( !IsConnected() )
+        {
+        return;
+        }
+
+    iSessionNeedsErrorReply = EFalse;
+
+    // Set senders and destination path
+    delete iSenderPath;
+    iSenderPath = NULL;
+    delete iDestinationPath;
+    iDestinationPath = NULL;
+
+    if ( aMessage->Method().Find( KHttp11WithoutSpace ) == 0 )
+        {
+        iSenderPath = HBufC8::NewL( 0 );
+        aMessage->AddPairL( UpnpHTTP::KHdrServer(),
+            iServer->ServerDescription() );
+        }
+    else
+        {
+        iSenderPath = aMessage->SenderPathFromHeader().AllocL();
+        }
+
+    iDestinationPath = aMessage->SenderPath().AllocL();
+
+    // Set other properties
+    iRequestType = aMessage->Type();
+    iRetryCounter = aMessage->RetryCounter();
+
+    if ( aMessage->PendingRequest() )
+        {
+        iPendingRequest = aMessage->PendingRequest();
+        }
+
+    //we assume that converting to UTF8 is already done by upper layers
+    HBufC8* buf = aMessage->ToStringL();
+    CleanupStack::PushL( buf );
+    WriteL( *buf );
+    CleanupStack::PopAndDestroy( buf );
+    if ( !iIsPersistent )
+        {
+        iSessionKeepAlive = EFalse;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::DeleteThisSessionL
+// Delete the session.
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::DeleteThisSessionL( CUpnpTcpSession* /*aSession*/)
+    {
+    LOGS1( "%i, CUpnpHttpSession::DeleteThisSessionL", iId );
+
+    if ( iReceivedMessage )
+        {
+        if ( iReceivedMessage->BytesInBuffer() > 0
+                && iReceivedMessage->IsReadyL() )
+            {
+            TPtrC8 content = iReceivedMessage->Content();
+            CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL( content,
+                RemoteHost(), iId );
+            CleanupStack::PushL( msg );
+
+            msg->SetType( iRequestType );
+
+            msg->SetRetryCounter( iRetryCounter );
+
+            THttpInvalidMessage aVal;
+            aVal = IsValidMessage( msg );
+
+            switch ( aVal )
+                {
+
+                case EMessageOk:
+                    //HandleQuery will take ownership of msg object
+                    CleanupStack::Pop( msg );
+                    // Pass the message forward
+                    HandleQueryL( msg );
+                    break;
+
+                default:
+                    CleanupStack::PopAndDestroy( msg );
+                    break;
+                }
+            }
+        }
+
+    ShutdownStop();
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::DeleteFileIfExists
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::DeleteFileIfExists( TDesC16& aFilename )
+    {
+    iServer->FileSession().Delete( aFilename );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::MatchHttpError
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpSession::MatchHttpError( TInt error )
+    {
+    TInt httpError = KErrNone;
+
+    if ( error == KErrDiskFull )
+        httpError = EHttpInsufficientStorage;
+    else if ( error == KErrOverflow ) //one of the reason can be if chunk value is > 2^32
+        httpError = EHttpInsufficientStorage;
+    else if ( error == KErrAbort ) //POST HTTP/1.1
+        httpError = EHttpBadRequest;
+    else if ( error == KErrGeneral || error == KErrHttpUnknownParseState ) // this error may occur e.g when ContentLengthL() leaves
+        httpError = EHttpBadRequest;
+    else if ( -error >= EHttpBadRequest ) // HTTP errors
+        httpError = -error;
+    else if ( error == KErrNoMemory )
+        httpError = EHttpEntityTooLarge; // OOM handling
+    else if ( error == KErrNotSupported )
+        httpError = EHttpNotFound; // no transaction
+    else
+        httpError = EHttpInternalServerError;
+
+    return httpError;
+
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::BufferReceivedL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::BufferReceivedL( TDesC8& aBuffer )
+    {
+
+    TInt index = 0;
+    TPtrC8 ptrIn( aBuffer );
+    iPendingPostRequests = ETrue;
+    //handling requests on the server-side
+    if ( ptrIn.Length() > KHttpPost().Length() )
+        {
+        TPtrC8 ptrInOffset( ptrIn.Mid( KHttpPost().Length() ) );
+
+        //this loop splits buffer if it includes more than one POST message
+        while ( (index = ptrInOffset.Find( KHttpPost() )) >= 0 )
+            {
+            TPtrC8 ptrL = ptrIn.Left( index + KHttpPost().Length() );
+            SinglePostBufferReceivedL( ptrL );
+            ptrIn.Set( ptrIn.Mid( index + KHttpPost().Length() ) );
+            ptrInOffset.Set( ptrIn.Mid( KHttpPost().Length() ) );
+            }
+        }
+    SinglePostBufferReceivedL( ptrIn );
+    iPendingPostRequests = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::SinglePostBufferReceivedL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::SinglePostBufferReceivedL( TDesC8& aBuffer )
+    {
+    TInt error = KErrNone;
+        TRAP( error, BufferReceivedProcessL( aBuffer ) )
+    LOGS2( "%i, CUpnpHttpSession::BufferReceivedL finished with error %i", iId, error );
+    if ( error != KErrNone )
+        {
+        //if session left - no continuation of file transfer
+        if ( iFTReader && iFTReader->Activated() )
+            {
+            iFTReader->SetActivated( EFalse );
+            if ( iFileServe )
+                iFileServe->DeleteFile();
+            }
+
+        TInt httpError = MatchHttpError( error );
+        if ( httpError != KErrNone )
+            {// If we act as a server side
+            ResponseErrorL( httpError );
+            if ( httpError == EHttpEntityTooLarge )
+                {
+                NotifyErrorL( httpError, error );
+                }
+            ShutdownStop();
+            return;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::BufferReceivedCheckingHeadersL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::BufferReceivedCheckingHeadersL( TDesC8& aBuffer )
+    {
+    // If iInFilename is defined, data should be saved in to a file,
+    // this is the case of incoming GET response and for following parts of POST request.
+    if ( iInFilename && iInFilename->Length() > 0 )
+        {
+        iSaveToFile = ETrue;
+
+        // If this flag was set it means that even previously message was not ment
+        // to be saved to file, now when the body is downloaded it will be saved to file.
+        if ( iContinuedMessageDownload && !iReceivedMessage->IsToFile() )
+            {
+            iReceivedMessage->SetToFile( ETrue );
+            }
+
+        // Check Maximum Size requirement, but do this only once
+        if ( !iMaximumSizeChecked )
+            {
+            //Make temp buffer to check content of incoming data,
+            //its possible that content-Length is too huge (>2^32)
+            CUpnpHttpBuffer* checkBuf = CUpnpHttpBuffer::NewL( this, EFalse );
+            CleanupStack::PushL( checkBuf );
+            //leaves in case of problems with string operation, no HTTP error
+            checkBuf->AppendHeadersL( aBuffer, iSaveToFile );
+
+            if ( checkBuf->IsHeaderReady() )
+                {
+                // Now headers were checked
+                iHeadersCompleted = ETrue;
+                TRAPD( error, checkBuf->ContentLengthL( ) );
+                if ( error )
+                    {
+                    iSaveToFile = EFalse;
+                    }
+                iMaximumSizeChecked = ETrue;
+
+                //mark chunked encoding
+                iIsChunked = checkBuf->IsChunked();
+                //mark if persistent connection
+                if ( IsPersistentConnection() )
+                    iIsPersistent = !checkBuf->UsesConnectionClose();
+                }
+            else
+                {
+                iSaveToFile = EFalse;
+                }
+
+            CleanupStack::PopAndDestroy( checkBuf );
+            }
+        }
+    // Checking that if file is a POST that needs to be saved to a file. Only check this
+    // for the first time (iFileServe does not exist only on receiving the first buffer of data)
+    else if ( !iFileServe )
+        {
+        // making temp buffer to check content of incoming data
+        CUpnpHttpBuffer* checkBuf = CUpnpHttpBuffer::NewL( this, EFalse );
+        CleanupStack::PushL( checkBuf );
+        //leaves in case of problems with string operation, no HTTP error
+        checkBuf->AppendHeadersL( aBuffer, iSaveToFile );
+
+        if ( checkBuf->IsHeaderReady() )
+            {
+            // Now headers were checked
+            iHeadersCompleted = ETrue;
+
+            TPtrC8 headers = checkBuf->Headers();
+            CUpnpHttpMessage* tempMsg = NULL;
+            TRAPD( err, tempMsg = CUpnpHttpMessage::NewL( (TDesC8&) headers,
+                            RemoteHost( ), iId ) );
+
+            //POST HTTP/1.1
+            if ( err == KErrAbort )
+                {
+                if ( checkBuf->Method().Find( KHttpPost ) == 0 )
+                    //leaves in case of HTTP error for a POST
+                    User::Leave( KErrAbort );
+                }
+            else if ( err < KErrNone )
+                {
+                User::Leave( err );
+                }
+            else if ( err == KErrNone )
+                {
+                CleanupStack::PushL( tempMsg );
+
+                // Check method and make decision about handling message.
+                // It's a POST message
+                if ( tempMsg->Method().Find( KHttpPost ) == 0 )
+                    {
+                    // 100-Continue check should be done for all types of POST reqests, even for GENAs and SOAPs
+
+                    // First thing to do in case of upload is to chceck if there
+                    // is sufficient disk space to save incoming file.
+                    TUint fileSize = 0;
+                    TBool hasCL;
+                    TLex8 cntLength( tempMsg->IsHeader(
+                        UpnpHTTP::KHdrContentLength, hasCL ) );
+                    if ( hasCL )
+                        {
+                        TInt errorLength = cntLength.Val( fileSize );
+                        if ( errorLength == KErrOverflow )
+                            {
+                            iSaveToFile = EFalse;
+                            //leaves in case of HTTP error
+                            User::Leave( -EHttpInsufficientStorage );
+                            }
+                        else if ( errorLength != KErrNone )
+                            {
+                            iSaveToFile = EFalse;
+                            //leaves in case of HTTP error
+                            User::Leave( errorLength );
+                            }
+                        }
+                    //First check URI, because there is no sense in sending 100 continue for invalid URI
+                    if (!(tempMsg->IsGena()) && !(tempMsg->IsSoap()))
+                        {
+                        //response is sent inside function
+
+                        delete iInFilename;
+                        iInFilename = NULL;
+                        
+                        if ( !iServer->TransactionCreator() )
+                            {
+                            User::Leave( KErrNotSupported );
+                            }
+                        if ( UpnpFileUtil::ParseUri( tempMsg->SenderPathFromHeader() ) 
+                             != KErrNone )
+                            {
+                            iInFilename = KNullDesC8().AllocL();
+                            iSaveToFile = EFalse;
+                            User::Leave( -EHttpBadRequest );
+                            }
+                        TPtrC8 relativeUri = PrepareRelativeUriL( tempMsg->SenderPathFromHeader() );
+                        CUpnpHttpServerTransaction* transactionOut;
+                        iServer->TransactionCreator()->NewTransactionL(
+                                tempMsg->Method(), relativeUri,
+                                tempMsg->Sender(), transactionOut );
+                        CleanupStack::PushL( transactionOut );
+
+                        transactionOut->SetRequest(tempMsg);
+                        transactionOut->OnCallbackL( CUpnpHttpServerTransaction::EOnRequestStart );
+                        
+                        iSaveToFile = EFalse;
+                        User::LeaveIfError( transactionOut->Error() );
+                        RBuf fileName;
+                        fileName.CreateL( KMaxFileName );
+                        CleanupClosePushL( fileName );
+                        User::LeaveIfError( transactionOut->DataSink().FullName( fileName ) );
+                        iInFilename = UpnpString::FromUnicodeL( fileName );
+                        iSaveToFile = ETrue;
+                        CleanupStack::PopAndDestroy(&fileName);
+                        
+                        transactionOut->OnCallbackL( CUpnpHttpServerTransaction::EOnComplete );
+                        CleanupStack::PopAndDestroy( transactionOut );
+                        }
+
+                    
+                    //Maximum size was checked already so don't do this again
+                    iMaximumSizeChecked = ETrue;
+
+                    // If client sends Expect: 100-continue header then it must be checked
+                    // if file can be saved and if so, server should responds with 100.
+                    if ( tempMsg->GetHeaderValue( UpnpHTTP::KHdrExpect ).FindC(
+                        UpnpHTTP::K100Continue ) == 0 )
+                        {
+
+                        // Check disk space and ContentLength limit (2^32) and if it's not sufficient send 507 response and
+                        // close connection - sugested behaviour from DLNA 1.5 spec.
+
+                        HBufC16* pathTmp = NULL;
+                        pathTmp = UpnpString::ToUnicodeL( iInFilename->Des() );
+                        CleanupStack::PushL( pathTmp );
+
+                        TBool noSpace = UpnpFileUtil::CheckDiskSpaceShortL(
+                            pathTmp->Des(), fileSize, iServer->FileSession() );
+                        CleanupStack::PopAndDestroy( pathTmp );
+
+                        if ( noSpace )
+                            {
+                            iSaveToFile = EFalse;
+                            //leaves in case of HTTP error
+                            User::Leave( -EHttpInsufficientStorage );
+                            }
+                        else
+                            {
+                            // Set the flag informing that current message's body will
+                            // should be downloaded in some time
+                            iContinuedMessageDownload = ETrue;
+
+                            // If there is enough space to save incoming file send response 100,
+                            // which means that client can continue with sending the body.
+                            CUpnpHttpMessage* reply =
+                                    RUpnpHttpMessageFactory::Http11ResponseL(
+                                        tempMsg, EHttpContinue );
+                            CleanupStack::PushL( reply );
+                            HBufC8* sendBuf = reply->ToStringL();
+                            CleanupStack::PushL( sendBuf );
+                            WriteL( *sendBuf );
+                            CleanupStack::PopAndDestroy( sendBuf );
+                            CleanupStack::PopAndDestroy( reply );
+                            }
+
+                        }
+                    }
+                if ( iSaveToFile )
+                    {
+                    CleanupStack::Pop( tempMsg );
+                    tempMsg->SetType( ETransferStart );
+                    iServer->ToReceiveStackD( tempMsg );
+                    }
+                else
+                    {
+                    CleanupStack::PopAndDestroy( tempMsg );
+                    }
+                }
+            }
+        //mark if chunked encoding
+        iIsChunked = checkBuf->IsChunked();
+        //mark if persistent connection
+        if ( IsPersistentConnection() )
+            iIsPersistent = !checkBuf->UsesConnectionClose();
+        CleanupStack::PopAndDestroy( checkBuf );
+        }
+    else
+        {
+        iSaveToFile = EFalse;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::BufferReceivedProcessL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::BufferReceivedProcessL( TDesC8& aBuffer )
+    {
+    TInt httpError;
+    LOGS1( "%i, CUpnpHttpSession::BufferReceivedProcessL", iId );
+
+    if ( !iHeadersCompleted && iReceivedMessage )
+        {
+        // If all headers aren't completed after receiving a few data chunks,
+        // enlarge the buffer and try again.
+        HBufC8* headers = HBufC8::NewLC( iReceivedMessage->Content().Length()
+                + aBuffer.Length() );
+
+        headers->Des().Zero();
+        headers->Des().Append( iReceivedMessage->Content() );
+        headers->Des().Append( aBuffer );
+        //returns HTTP error only in case of a POST
+        BufferReceivedCheckingHeadersL( *headers );
+        CleanupStack::PopAndDestroy( headers );
+        }
+    else if ( !iHeadersCompleted && !iReceivedMessage )
+        {
+        // The first data chunk, both variables are not set. returns HTTP error only in case of a POST
+        BufferReceivedCheckingHeadersL( aBuffer );
+        }
+
+    // If message content should be saved to file then create a file access object
+    // that takes care of this operation.
+    if ( iSaveToFile && !iFileServe )
+        {
+        HBufC16* name = NULL;
+        name = UpnpString::ToUnicodeL( *iInFilename );
+        CleanupStack::PushL( name );
+        iFileServe = CUpnpHttpFileAccess::NewL( this, *name );
+        CleanupStack::PopAndDestroy( name );
+
+        // If it's response for Range reqest then setup range saving parameters in iFileServe
+        if ( iSaveAtOffset )
+            {
+            iFileServe->SetPosOfFile( iOffset );
+            iFileServe->SetEndPosOfFile( iOffset + Length() - 1 );
+            }
+
+        delete iInFilename;
+        iInFilename = NULL;
+
+        iInFilename = UpnpString::FromUnicodeL( iFileServe->FileToServe() );
+        }
+    //initiate filetransfer component
+    if ( iSaveToFile && iFileServe )
+        {
+        //file transfer reader
+        iFileServe->SetEncodingMode( iIsChunked );
+        FileTransferReaderConstructL();
+        }
+
+    if ( !iReceivedMessage )
+        {
+        iReceivedMessage = CUpnpHttpBuffer::NewL( this, iSaveToFile );
+        }
+    //leaves in case of problems with string operation, no HTTP error
+    User::LeaveIfError( iReceivedMessage->AppendL( aBuffer, iSaveToFile ) );
+
+    // This 'if statement' is required for proper deleting partial file
+    // when 'stop transfer' was invoked during exporting the resource from other MS.
+    if ( iFileServe && iReceivedMessage )
+        iFileServe->SetTotalSize( iReceivedMessage->ContentLengthL() );
+
+    
+    if ( FileTransferReader() && FileTransferReader()->Activated() )
+        return;
+    // Finish receiving message and handle query contained in message.
+    // Processing goes on and on till the incoming buffer is empty -
+    // this is the way the pipelining is handled.
+    while ( iReceivedMessage->IsReadyL() )
+        {
+
+        TPtrC8 buffer = iReceivedMessage->Content();
+
+        CUpnpHttpMessage* msg = NULL;
+        TInt err( KErrNone );
+            TRAP( err, msg = CUpnpHttpMessage::NewL( buffer, RemoteHost( ), iId ) );
+        CleanupStack::PushL( msg );
+
+        if ( err < KErrNone )
+            {
+            LOGS1(
+                    "%i, CUpnpHttpSession::BufferReceivedProcessL - failed", iId );
+
+            // sending response to remote host: bad request
+            httpError = MatchHttpError( -EHttpBadRequest );
+            if ( httpError != KErrNone )
+                {// If we act as a server side
+                ResponseErrorL( httpError );
+                }
+            CleanupStack::PopAndDestroy( msg );
+            }
+        else
+            {
+            iSessionKeepAlive = ETrue;
+            if ( IsPersistentConnection() )
+                if ( !iFileServe && iPendingRequests->Count() == 0 )
+                    if ( msg->GetHeaderValue( UpnpHTTP::KConnection() ).FindC(
+                        UpnpHTTP::KClose() ) >= 0
+                            || msg->RequestHTTPVersion() == KHttp10() )
+                        {
+                        iIsPersistent = EFalse;
+                        }
+
+            if ( !IsPersistentConnection() && !msg->IsSoap()
+                    && !msg->IsGena() )
+                {
+                iSessionKeepAlive = EFalse;
+                }
+
+            msg->SetType( iRequestType );
+
+            msg->SetSessionId( iId );
+
+            msg->SetRetryCounter( iRetryCounter );
+
+            if ( (iSaveToFile) && (iInFilename) )
+                {
+                msg->SetInFilenameL( iInFilename->Des() );
+                }
+
+            THttpInvalidMessage aVal;
+            aVal = IsValidMessage( msg );
+
+            switch ( aVal )
+                {
+                case EMessageOk:
+                    //HandleQueryL will take ownership of msg object
+                    CleanupStack::Pop( msg );
+                    TRAP( err, HandleQueryL( msg ) );
+                    if ( err < KErrNone ) 
+                        {
+                        httpError = MatchHttpError( err );
+                        if ( httpError != KErrNone )
+                            {// If we act as a server side
+                            ResponseErrorL( httpError );
+                            }
+                        }
+
+                    break;
+
+                case EUnknownMethod:
+                    {
+                    LOGS1H(
+                            iHandle,
+                            "%i, CUpnpHttpSession::BufferReceivedL - Unknown method",
+                            iId );
+
+                    httpError = MatchHttpError( -EHttpMethodNotAllowed );
+                    if ( httpError != KErrNone )
+                        {// If we act as a server side
+                        ResponseErrorL( httpError );
+                        }
+                    CleanupStack::PopAndDestroy( msg );
+                    }
+                    break;
+
+                default:
+                    LOGS1(
+                            "%i, CUpnpHttpSession::BufferReceivedL - failed", iId );
+                    CleanupStack::PopAndDestroy( msg );
+                    break;
+                };
+
+            }
+
+        // No continued message download is expected because
+        // the message processing is finished
+        iContinuedMessageDownload = EFalse;
+        iReceivedMessage->RemoveL( buffer.Length() );
+
+        iHeadersCompleted = EFalse;
+
+        delete iInFilename;
+        iInFilename = NULL;
+        iInFilename = HBufC8::NewL( 0 );
+
+        if ( iSessionIsDeletedAfterResponse )
+            {
+            StartDisconnect();
+            }
+        }
+
+    if ( iReceivedMessage->BytesInBuffer() <= 0 )
+        {
+        delete iReceivedMessage;
+        iReceivedMessage = NULL;
+        if ( iSessionIsDeletedAfterResponse )
+            {
+            StartDisconnect();
+            }
+        else
+            {
+            StartTimeoutTimer( iSessionNeedsErrorReply );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::ResponseErrorL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::ResponseErrorL( TInt aStatus )
+    {
+    LOGS2( "%i, CUpnpHttpSession::ResponseErrorL - error code %i",
+            iId, aStatus );
+
+    CUpnpHttpMessage* reply = NULL;
+    reply = RUpnpHttpMessageFactory::HttpResponseErrorL( RemoteHost(),
+        aStatus );
+    CleanupStack::PushL( reply );
+
+    reply->AddPairL( UpnpHTTP::KHdrServer(), iServer->ServerDescription() );
+    reply->SetSessionId( Id() );
+    reply->SetDestinationPathL( *iDestinationPath );
+    reply->SetSenderPathL( *iSenderPath );
+
+    HBufC8* sendBuf = reply->ToStringL();
+    CleanupStack::PushL( sendBuf );
+    WriteL( *sendBuf );
+    CleanupStack::PopAndDestroy( sendBuf );
+    CleanupStack::PopAndDestroy( reply );
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::HandleQueryL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::HandleQueryL( CUpnpHttpMessage* aMsg )
+    {
+    LOGS1( "%i, CUpnpHttpSession::HandleQueryL", iId );
+    CleanupStack::PushL( aMsg );
+    
+    // Handle GET and HEAD requests
+    if ( aMsg->Method().Find( KHttpGet ) == 0 || aMsg->Method().Find(
+        KHttpHead ) == 0 )
+        {
+        // method starts with GET or HEAD
+        if ( FileServeExists() || (FileTransferWriter()
+                && FileTransferWriter()->IsActive()) )
+            {
+            User::LeaveIfError( iPendingRequests->Append( aMsg ) );
+            CleanupStack::Pop( aMsg );
+            }
+        else
+            {
+            User::LeaveIfError( PrepareToServeFileL( aMsg ) );
+            CleanupStack::PopAndDestroy( aMsg );
+            aMsg = NULL;
+            }
+        }
+
+    // Handle GENA, SOAP, responses, other messages etc.
+    else
+        {
+        aMsg->SetInFilenameL( *iInFilename );
+        delete iInFilename;
+        iInFilename = NULL;
+        iInFilename = HBufC8::NewL( 0 );
+        if ( !aMsg->Is1xx() )
+            {
+            CleanupStack::Pop( aMsg );
+            NotifyUpperLayerLD( aMsg );
+            iPendingRequest = NULL;
+            }
+        else
+            {
+            CleanupStack::PopAndDestroy( aMsg );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::PrepareToServeFileL
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpSession::PrepareToServeFileL( CUpnpHttpMessage* aMsg )
+    {
+
+    LOGS1( "%i, CUpnpHttpSession::PrepareToServeFileL", iId );
+    if ( !iServer->TransactionCreator() )
+         {
+         User::Leave( KErrNotSupported ); 
+         }
+    
+    CheckSessionPersistence( aMsg );
+    TInt parseUrlError = UpnpFileUtil::ParseUri( aMsg->SenderPathFromHeader() );
+    if ( parseUrlError != KErrNone )
+        {
+        return -EHttpBadRequest;
+        }
+    
+    TPtrC8 relativeUri = PrepareRelativeUriL( aMsg->SenderPathFromHeader() );
+    
+    CUpnpHttpServerTransaction* transactionOut; 
+    iServer->TransactionCreator()->NewTransactionL( aMsg->Method() ,
+            relativeUri, aMsg->Sender(), transactionOut );    
+    CleanupStack::PushL( transactionOut );
+    
+    transactionOut->SetRequest( aMsg );    
+    transactionOut->OnCallbackL( CUpnpHttpServerTransaction::EOnRequestStart );
+    TInt error = transactionOut->Error();
+    if( error != KErrNone )
+        {
+        CleanupStack::PopAndDestroy( transactionOut ); 
+        return error;
+        }
+                 
+    // 2. Try to open requested file
+    RFile& file = transactionOut->DataSource();
+    
+    TInt fileSize = -1;    
+    if( file.Size( fileSize ) != KErrNone  )
+        {
+        fileSize = -1;
+        }
+
+    TBool servingOutFilename = ( aMsg->OutFilename().Length() > 0 );
+
+    TInt result( KErrNone );
+    // 3. If file was opened it means it exists and might be served
+    if ( fileSize >= 0 )
+        {
+        TInt rangeStatus;
+        TInt startPos;
+        TInt endPos;
+        TInt errorValue;
+        errorValue = PrepareRangeHeaderL( 
+            aMsg, servingOutFilename, fileSize, *transactionOut,
+            rangeStatus, startPos, endPos );
+        
+        if ( errorValue == KErrNone )
+            {
+            if ( EHttpNoContent == rangeStatus )
+                {
+                transactionOut->AddResponseHeaderL( UpnpHTTP::KHdrServer(),
+                                                    iServer->ServerDescription() );             
+             
+                WriteL( transactionOut->QueryResponseHeader() );
+                }
+            else
+                {
+                transactionOut->OnCallbackL( CUpnpHttpServerTransaction::EOnResponseStart );
+                //last header fiished by double CRLF so we must add last CRLF
+
+                errorValue = transactionOut->Error();
+                if ( errorValue != KErrNone  ) 
+                    {
+                        CleanupStack::PopAndDestroy( transactionOut );
+                        return errorValue;
+                    }
+                if ( transactionOut->QueryResponseHeader().Length() > 0 )
+                    {
+                    transactionOut->AddResponseHeaderL( UpnpHTTP::KHdrServer(),
+                                                        iServer->ServerDescription() );             
+                    RBuf fileName;
+                    fileName.CreateL( KMaxFileName );
+                    CleanupClosePushL( fileName );
+                    User::LeaveIfError( file.FullName( fileName ) );
+                    WriteMsgAndHeaderL( aMsg, transactionOut->QueryResponseHeader(),
+                        fileName, fileSize, rangeStatus, startPos, endPos );
+                    CleanupStack::PopAndDestroy( &fileName );
+                    }
+                }
+            }
+        result = errorValue;
+        }
+    else // 4. File was not found, so just respose with HTTP 404 error.
+        {
+
+        if ( !iSaveToFile )
+            {
+            //error. No such file or folder found. Send error message.
+            result = -EHttpNotFound;
+            }
+        }
+    if ( KErrNone == result )
+        {
+        result = transactionOut->Error();
+        }    
+
+    
+    transactionOut->OnCallbackL( CUpnpHttpServerTransaction::EOnComplete );
+    CleanupStack::PopAndDestroy( transactionOut );
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::WriteMsgAndHeaderL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::WriteMsgAndHeaderL( CUpnpHttpMessage* aMsg,
+    const TDesC8& aHeaderToWrite, const TDesC& aPathWithNewMethod,
+    TInt aFileSize, TInt aRangeStatus, const TInt aStartPos,
+    const TInt aEndPos )
+    {
+    if ( aMsg->Method().Find( KHttpHead ) == 0 ) // HEAD - just header
+        {
+        WriteL( aHeaderToWrite );
+        DeleteServeFileL();
+        }
+    else // GET response and also sending POST message
+        {
+        if ( iFileServe )
+            {
+            delete iFileServe;
+            iFileServe = NULL;
+            }
+
+        iFileServe = CUpnpHttpFileAccess::NewL( this, aHeaderToWrite,
+            aPathWithNewMethod, aFileSize );
+
+        if ( aStartPos != KErrNotFound )
+            iFileServe->SetPosOfFile( aStartPos );
+
+        if ( aEndPos != KErrNotFound )
+            iFileServe->SetEndPosOfFile( aEndPos );
+
+        if ( !FileTransferWriter() )
+            {
+            TInt requestedBytes = aRangeStatus == EHttpPartialContent
+                ? aEndPos - aStartPos + 1 : aFileSize;
+            if ( requestedBytes <= HttpServer()->FileWriteBufferSize() )
+                {
+                FileTransferWriterConstructL( requestedBytes
+                        + aHeaderToWrite.Length() );
+                }
+            else
+                {
+                FileTransferWriterConstructL(
+                    HttpServer()->FileWriteBufferSize() );
+                }
+            }
+        FileTransferWriter()->Reset();
+
+        if ( iOutFilename->Length() > 0 && iDestinationPath->Length() > 0 )
+            {
+            FileTransferWriter()->SetPostNotify();
+            }
+        FileTransferWriter()->StartL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::FileServeExists
+//
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpSession::FileServeExists()
+    {
+    return iFileServe ? ETrue : EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::DeleteServeFileL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::DeleteServeFileL()
+    {
+    LOGS1( "%i, CUpnpHttpSession::DeleteServeFileL()", iId );
+
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL(
+        iAddr, EHttp200Ok );
+    CleanupStack::PushL( msg );
+    msg->SetType( EExportComplete );
+
+    msg->SetSessionId( Id() );
+
+    CleanupStack::Pop( msg );
+    iServer->ToReceiveStackD( msg );
+
+    delete iFileServe;
+    iFileServe = NULL;
+
+    if ( iPendingRequests->Count() > 0 )
+        {
+        CUpnpHttpMessage* request = (*iPendingRequests)[0];
+        iPendingRequests->Remove( 0 );
+        CleanupStack::PushL( request );
+        User::LeaveIfError( PrepareToServeFileL( request ) );
+        CleanupStack::PopAndDestroy( request );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::NotifyErrorL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::NotifyErrorL( const TInt aError, TInt aInternalError )
+    {
+    LOGS2( "%i, CUpnpHttpSession::NotifyErrorL error = %i", iId,
+            aError );
+
+    CUpnpHttpMessage* msg = NULL;
+    msg = RUpnpHttpMessageFactory::HttpResponseErrorL( RemoteHost(), aError );
+    msg->SetInternalError( aInternalError );
+    NotifyUpperLayerLD( msg );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::NotifyDisconnectL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::NotifyDisconnectL( TInetAddr aAddr )
+    {
+    LOGS1( "%i, CUpnpHttpSession::NotifyDisconnectL", iId );
+
+    if ( iSenderPath->Length() > 0 && iDestinationPath->Length() > 0 )
+        {
+        CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL(
+            aAddr, EHttpRequestTimeout );
+        CleanupStack::PushL( msg );
+        msg->SetInFilenameL( *iInFilename );
+        msg->SetInternalError( iSessionError );
+
+        CleanupStack::Pop( msg );
+        NotifyUpperLayerLD( msg );
+
+        if ( iReceivedMessage && iFileServe )
+            {
+            iFileServe->SetTotalSize( iReceivedMessage->ContentLengthL() );
+            }
+        }
+    else if ( iReceivedMessage && iReceivedMessage->Method() == KHttpPost )
+        {
+        if ( !iErrorNotified )
+            {
+            // incoming post failed
+            CUpnpHttpMessage* msg =
+                    RUpnpHttpMessageFactory::HttpResponseErrorL( iAddr,
+                        EHttpRequestTimeout );
+            CleanupStack::PushL( msg );
+            msg->SetType( ETransferError );
+            msg->SetSessionId( Id() );
+            // get destination path
+            msg->SetDestinationPathL( iReceivedMessage->Target() );
+
+            CleanupStack::Pop( msg );
+            iServer->ToReceiveStackD( msg );
+            iErrorNotified = ETrue;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::NotifyTimeoutL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::NotifyTimeoutL()
+    {
+    if ( iReceivedMessage )
+        {
+        if ( iReceivedMessage->Method() == KHttpPost )
+            {
+            // incoming post failed
+            CUpnpHttpMessage* msg =
+                    RUpnpHttpMessageFactory::HttpResponseErrorL( iAddr,
+                        EHttpRequestTimeout );
+            CleanupStack::PushL( msg );
+            msg->SetType( ETransferError );
+            msg->SetSessionId( Id() );
+
+            // get destination path
+            msg->SetDestinationPathL( iReceivedMessage->Target() );
+
+            CleanupStack::Pop( msg );
+            iServer->ToReceiveStackD( msg );
+            iErrorNotified = ETrue;
+            if ( iFileServe )
+                iFileServe->DeleteFile();
+            }
+        else if ( iReceivedMessage->Method().Find( KHttp8 ) != KErrNotFound
+                && iReceivedMessage->Target() == KHttpOkCode8 )
+            { // incoming response failed
+            CUpnpHttpMessage* msg =
+                    RUpnpHttpMessageFactory::HttpResponseErrorL( iAddr,
+                        EHttpRequestTimeout );
+            CleanupStack::PushL( msg );
+            msg->SetType( ETransferError );
+
+            // get destination path
+            msg->SetDestinationPathL( KNullDesC8 );
+            msg->SetSessionId( Id() );
+
+            CleanupStack::Pop( msg );
+            iServer->ToReceiveStackD( msg );
+            iErrorNotified = ETrue;
+            }
+        else
+            { // incoming response failed
+            CUpnpHttpMessage* msg =
+                    RUpnpHttpMessageFactory::HttpResponseErrorL( iAddr,
+                        EHttpRequestTimeout );
+            CleanupStack::PushL( msg );
+            msg->SetType( ETransferError );
+
+            // get destination path
+            msg->SetDestinationPathL( iReceivedMessage->Target() );
+            msg->SetSessionId( Id() );
+            if ( iInFilename )
+                {
+                msg->SetInFilenameL( *iInFilename );
+
+                }
+            CleanupStack::Pop( msg );
+            iServer->ToReceiveStackD( msg );
+            iErrorNotified = ETrue;
+            }
+
+        }
+    else
+        {
+        CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL(
+            iAddr, EHttpRequestTimeout );
+        CleanupStack::PushL( msg );
+        msg->SetType( ETransferError );
+
+        // get destination path
+        msg->SetDestinationPathL( KNullDesC8 );
+        msg->SetSessionId( Id() );
+
+        CleanupStack::Pop( msg );
+        iServer->ToReceiveStackD( msg );
+        iErrorNotified = ETrue;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::SocketServerBusyL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::SocketServerBusyL( const TInetAddr& aAddr )
+    {
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL(
+        aAddr, EHttpExpectationFailed );
+    CleanupStack::PushL( msg );
+    msg->SetInFilenameL( *iInFilename );
+
+    CleanupStack::Pop( msg );
+    NotifyUpperLayerLD( msg );
+
+    if ( iReceivedMessage && iFileServe )
+        {
+        iFileServe->SetTotalSize( iReceivedMessage->ContentLengthL() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::NotifyUpperLayerL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::NotifyUpperLayerLD( CUpnpHttpMessage* aMessage )
+    {
+    LOGS2( "%i, CUpnpHttpSession::NotifyUpperLayerL %i", iId,
+            aMessage->Error( ) );
+    CleanupStack::PushL( aMessage );
+
+    aMessage->SetSessionId( iId );
+
+    if ( iPendingRequest )
+        {
+        aMessage->SetPendingRequest( iPendingRequest );
+        }
+    aMessage->SetSenderPathL( *iSenderPath );
+
+    if ( aMessage->Method().FindC( KHttp11WithoutSpace ) == 0
+            || aMessage->Method().FindC( KHttp10 ) == 0 )
+        {
+        aMessage->SetDestinationPathL( *iDestinationPath );
+        }
+    else
+        {
+        TPtrC8 path = aMessage->SenderPathFromHeader();
+        aMessage->SetDestinationPathL( path );
+        }
+
+    aMessage->SetType( iRequestType );
+    aMessage->SetRetryCounter( iRetryCounter );
+
+    iDisconnectNotification = EFalse;
+    aMessage->SetOutFilenameL( *iOutFilename );
+    CleanupStack::Pop( aMessage );
+    iServer->ToReceiveStackD( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::IsValidMessage
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpSession::THttpInvalidMessage CUpnpHttpSession::IsValidMessage(
+    CUpnpHttpMessage* aMsg )
+    {
+    // Checking method. METHOD NAMES ARE CASE SENSITIVE,
+    // so checking that method is OK.
+    // http://www.w3.org/Protocols/HTTP/Methods.html
+    if ( aMsg->Method().Find( KHttpGet() ) != 0 && aMsg->Method().Find(
+        KHttpPost() ) != 0 && aMsg->Method().Find( KHttpHead() ) != 0
+            && aMsg->Method().Find( KHttpOptions() ) != 0
+            && aMsg->Method().Find( KHttpPut() ) != 0 && aMsg->Method().Find(
+        KHttpDelete() ) != 0 && aMsg->Method().Find( KHttpTrace() ) != 0
+            && aMsg->Method().Find( KHttpConnect() ) != 0
+            && aMsg->Method().Find( KHttp11WithoutSpace() ) != 0
+            && aMsg->Method().Find( KHttp10() ) != 0 && aMsg->Method().Find(
+        UpnpGENA::KGenaSubscribe() ) != 0 && aMsg->Method().Find(
+        UpnpGENA::KGenaUnSubscribe() ) != 0 && aMsg->Method().Find(
+        UpnpGENA::KGenaNotify() ) != 0 )
+        {
+        return EUnknownMethod;
+        }
+    return EMessageOk;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::FileAccess
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpFileAccess* CUpnpHttpSession::FileAccess()
+    {
+    return iFileServe;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::OverwriteExisting
+//
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpSession::OverwriteExisting()
+    {
+    return iOverwriteExisting;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::Offset
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpSession::Offset()
+    {
+    return iOffset;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::Length
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpSession::Length()
+    {
+    return iLength;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::SaveAtOffset
+//
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpSession::SaveAtOffset()
+    {
+    return iSaveAtOffset;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::ServerPort
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpSession::ServerPort()
+    {
+    return iServer->ServerPort();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::CheckConnectionClose
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::CheckConnectionCloseL()
+    {
+    LOGS1( "%i, CUpnpHttpSession::CheckConnectionCloseL", iId );
+
+    if ( iReceivedMessage )
+        {
+        if ( iReceivedMessage->IsHeaderReady()
+                && iReceivedMessage->UsesConnectionClose() )
+            {
+            TPtrC8 buffer = iReceivedMessage->Content();
+
+            CUpnpHttpMessage* msg = NULL;
+            TInt err;
+                TRAP( err, msg = CUpnpHttpMessage::NewL( buffer, RemoteHost( ),
+                                iId ) );
+            CleanupStack::PushL( msg );
+            // If parsing error occurs, or 'stop transfer' occurs during export from other MS to this MS
+            // and the resource [file] isn't completely downloaded -> don't notify upper layers
+            if ( err < KErrNone || (err == KErrNone
+                    && (iReceivedMessage->Method().Find( KHttpPost ) == 0)
+                    && !iReceivedMessage->IsReadyL()) )
+                {
+                LOGS1H(
+                        iHandle,
+                        "%i, CUpnpHttpSession::CheckConnectionCloseL - parsing error",
+                        iId );
+
+                iReceivedMessage->RemoveL( buffer.Length() );
+                StartDisconnect();
+                CleanupStack::PopAndDestroy( msg );
+                return;
+                }
+
+            msg->SetInFilenameL( *iInFilename );
+            if ( !iReceivedMessage->IsToFile()
+                    || (iReceivedMessage->IsToFile() && iFileServe
+                            && iFileServe->FileExist()) )
+                {
+                CleanupStack::Pop( msg );
+                NotifyUpperLayerLD( msg );
+                }
+            else
+                {
+                CleanupStack::PopAndDestroy( msg );
+                }
+            iPendingRequest = NULL;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::NotifyUpperLayersOnPostL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::NotifyUpperLayersOnPostL()
+    {
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseOkL(
+        RemoteHost() );
+
+    CleanupStack::PushL( msg );
+
+    CUpnpHttpHeaderList* List = NULL;
+    List = msg->HeaderList();
+
+    CUpnpHttpHeader* hdr = List->First();
+
+	if(hdr != NULL)
+	{
+		HBufC8* newHeader = NULL;
+		newHeader = HBufC8::NewLC( KTransferPending801().Length() );
+		newHeader->Des().Zero();
+		newHeader->Des().Append( KTransferPending801() );
+
+		hdr->SetNameL( *newHeader );
+
+		CleanupStack::PopAndDestroy( newHeader );
+	}
+    msg->SetOutFilenameL( *iOutFilename );
+    CleanupStack::Pop( msg );
+    NotifyUpperLayerLD( msg );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::PostingFileCompleteL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::PostingFileCompleteL()
+    {
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseOkL(
+        RemoteHost() );
+    CleanupStack::PushL( msg );
+    msg->SetOutFilenameL( *iOutFilename );
+
+    CleanupStack::Pop( msg );
+    NotifyUpperLayerLD( msg );
+    }
+
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::IsMsgReady
+//
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpHttpSession::IsMsgReady()
+    {
+    TBool ret = EFalse;
+
+    if ( iReceivedMessage )
+        {
+        TRAPD( err, ret = iReceivedMessage->IsReadyL( ) );
+
+        if ( err != KErrNone )
+            return EFalse;
+
+        return ret;
+        }
+    else
+        return EFalse;
+    }
+
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::HttpServer()
+// Returns pointer to the CUpnpHttpServer object
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServer* CUpnpHttpSession::HttpServer()
+    {
+    return iServer;
+    }
+
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::FileTransferReaderDoneL()
+// Callback from file transfer reader
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::FileTransferReaderDoneL()
+    {
+    LOGS1( "%i, CUpnpHttpSession::FileTransferReaderDoneL", iId );
+    //notify import completed to upper layers
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL(
+        iAddr, EHttp200Ok );
+    CleanupStack::PushL( msg );
+    msg->SetType( EImportComplete );
+    msg->SetSessionId( Id() );
+    //setting it only for a POST request
+    msg->SetDestinationPathL( KNullDesC8 );
+    CleanupStack::Pop( msg );
+    iServer->ToReceiveStackD( msg );
+
+    TPtrC8 headers = iReceivedMessage->Headers();
+    //original message received from the remote MS
+    CUpnpHttpMessage* original = CUpnpHttpMessage::NewL( (TDesC8&) headers,
+        RemoteHost(), iId );
+    CleanupStack::PushL( original );
+    original->SetInFilenameL( *iInFilename );
+    delete iFileServe;
+    iFileServe = NULL;
+    //notify POST is finished
+    //prepare reply 200 Ok for the remote MS
+    CUpnpHttpMessage* reply = RUpnpHttpMessageFactory::HttpResponseOkL(
+        original );
+    CleanupStack::PushL( reply );
+    reply->AddPairL( UpnpHTTP::KHdrServer(), iServer->ServerDescription() );
+    reply->AddPairL( UpnpHTTP::KConnection(), UpnpHTTP::KClose() );
+    HBufC8* sendBuf = reply->ToStringL();
+    CleanupStack::PopAndDestroy( reply );
+    CleanupStack::Pop( original );
+    //inform the upper layer
+    iServer->ToReceiveStackD( original );
+    CleanupStack::PushL( sendBuf );
+    //send reply to the client
+    WriteL( *sendBuf );
+    CleanupStack::PopAndDestroy( sendBuf );
+
+    ResetSettingsL();
+
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::FileTransferReaderDoneL()
+// Callback from file transfer reader
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::FileTransferReaderErrorL( TInt aError )
+    {
+    LOGS1( "CUpnpHttpSession::FileTransferReaderErrorL %d", aError );
+    if ( iFileServe )
+        iFileServe->DeleteFile();
+    NotifyErrorL( aError );
+    if ( aError > 0 )
+        aError = -aError;
+    TInt httpError = MatchHttpError( aError );
+    if ( httpError != KErrNone )
+        {// If we act as a server side
+        ResponseErrorL( httpError );
+        ShutdownStop();
+        return;
+        }
+    ResetSettingsL();
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::ResetSettingsL()
+// Callback from file transfer reader
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::ResetSettingsL()
+
+    {
+    LOGS1( "%d, CUpnpHttpSession::ResetSettingsL", iId );
+    iContinuedMessageDownload = EFalse;
+    iHeadersCompleted = EFalse;
+
+    delete iFileServe;
+    iFileServe = NULL;
+
+    delete iReceivedMessage;
+    iReceivedMessage = NULL;
+
+    delete iInFilename;
+    iInFilename = NULL;
+    iInFilename = HBufC8::NewMaxL( 0 );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpSession::FileTransferWriterDoneL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::FileTransferWriterDoneL()
+    {
+
+    LOGS1( "%i, CUpnpHttpSession::FileTransferWriterDoneL()", iId );
+
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL(
+        iAddr, EHttp200Ok );
+    CleanupStack::PushL( msg );
+    msg->SetType( EExportComplete );
+
+    msg->SetSessionId( Id() );
+
+    CleanupStack::Pop( msg );
+    iServer->ToReceiveStackD( msg );
+
+    delete iFileServe;
+    iFileServe = NULL;
+
+    iSessionNeedsErrorReply = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::FileTransferWriterHandleMoreL()
+// Callback from file transfer writer
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::FileTransferWriterHandleMoreL()
+
+    {
+    LOGS1( "%i, CUpnpHttpSession::FileTransferWriterHandleMoreL()",
+            iId );
+    if ( FileTransferWriter() )
+        FileTransferWriter()->Reset();
+
+    if ( !IsPersistentConnection() )
+        {
+        StartClosingSession();
+        return;
+        }
+
+    while ( iPendingRequests->Count() > 0 )
+        {
+        iSessionNeedsErrorReply = ETrue;
+
+        CUpnpHttpMessage* request = (*iPendingRequests)[0];
+        iPendingRequests->Remove( 0 );
+        CleanupStack::PushL( request );
+        TInt error = PrepareToServeFileL( request );
+        CleanupStack::PopAndDestroy( request );
+
+        if ( error )
+            {
+            NotifyErrorL( error );
+            if ( error > 0 )
+                error = -error;
+            TInt httpError = MatchHttpError( error );
+            if ( httpError != KErrNone )
+                {// If we act as a server side
+                if ( iSessionNeedsErrorReply )
+                    {
+                    ResponseErrorL( httpError );
+                    }
+                }
+
+            if ( !IsPersistentConnection() )
+                {
+                StartClosingSession();
+                }
+            }
+        else
+            {
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::CheckSessionPersistence
+// Checks if message contains CONNECTION:CLOSE
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::CheckSessionPersistence( CUpnpHttpMessage* aMsg )
+    {
+    if ( aMsg->GetHeaderValue( UpnpHTTP::KConnection() ).FindC(
+        UpnpHTTP::KClose() ) >= 0 || aMsg->RequestHTTPVersion() == KHttp10() )
+        {
+        iIsPersistent = EFalse;
+        }
+    else
+        {
+        iIsPersistent = ETrue;
+        }
+
+    if ( !IsPersistentConnection() )
+        {
+        iSessionKeepAlive = EFalse;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::DestroyIt()
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpSession::DestroyIt( CUpnpTcpSession* aSession )
+    {
+    iServer->DeleteSession( aSession );
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::PrepareRangeHeaderL()
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpSession::PrepareRangeHeaderL( CUpnpHttpMessage* aMsg,
+    TBool aServingOutFileName, TInt aFileSize,
+    CUpnpHttpServerTransaction &aTransaction, TInt& aRangeStatus, TInt& aStartPos, TInt& aEndPos )
+    {
+    // Generating headers
+    aStartPos = KErrNotFound;
+    aEndPos = KErrNotFound;
+
+    // Check if there is a Range header in request and if it's correct
+    CUpnpRangeHeaderParser* rangeParser = CUpnpRangeHeaderParser::NewLC(
+        aTransaction, aStartPos, aEndPos );
+    aRangeStatus = rangeParser->ParseRangeL( aMsg, aFileSize );
+    CleanupStack::PopAndDestroy( rangeParser );
+
+    if ( aRangeStatus != EHttpOk )
+        {
+        if ( aRangeStatus <= -EHttpBadRequest )
+            {
+            return aRangeStatus;
+            }
+        else if ( aRangeStatus == EHttpNoContent )
+            {
+            return KErrNone;
+            }
+        }
+    else
+        {
+        // Serve whole file
+        if ( !aServingOutFileName )
+            {
+            // If OutFilename() was set in msg
+            TBuf8<2 * KMaxIntegerLength> sizeBuffer;
+            sizeBuffer.Num( aFileSize );
+            aTransaction.AddResponseHeaderL( KNullDesC8(), UpnpHTTP::KHTTPOk() );
+            aTransaction.AddResponseHeaderL( UpnpHTTP::KHdrContentLength(), sizeBuffer );
+            }
+        else
+            {
+            // If file path was extracted from header
+            HBufC8* tempBuffer = aMsg->HeadersToStringL();
+            CleanupStack::PushL( tempBuffer );
+            aTransaction.AddResponseHeaderL( KNullDesC8(), *tempBuffer );
+            CleanupStack::PopAndDestroy( tempBuffer );
+            }            
+        }
+
+    return  KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::PrepareRelativeUriL
+//
+// -----------------------------------------------------------------------------
+//
+TPtrC8 CUpnpHttpSession::PrepareRelativeUriL( const TDesC8& aUri )
+    {
+    TInetAddr resourceServerAddress;
+    iServer->ServerAddress( resourceServerAddress );
+    TInt portNo = iServer->ServerPort();
+    
+    TBuf<KMaxName> addrTmp;
+    resourceServerAddress.Output( addrTmp );
+    HBufC8* addr = UpnpString::FromUnicodeL( addrTmp );
+    CleanupStack::PushL( addr );
+    
+    TBuf8<KMaxName> port;
+    port.Num( portNo );
+    
+    TInt addrLength = UpnpHTTP::KHTTPUrl().Length() +  addr->Length( ) + UpnpString::KColon().Length( ) + port.Length( );
+    HBufC8* temp = HBufC8::NewLC( addrLength );
+    TPtr8 tempPtr( temp->Des() );
+    tempPtr.Append(  UpnpHTTP::KHTTPUrl );
+    tempPtr.Append( *addr );
+    tempPtr.Append( UpnpString::KColon );
+    tempPtr.Append( port );
+
+    CleanupStack::Pop( temp );
+    CleanupStack::PopAndDestroy( addr );
+    
+    if ( aUri.Find( *temp ) == 0  )
+        {
+        delete temp;
+        return aUri.Mid( addrLength );
+        }
+    
+    delete temp;
+    return aUri; 
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnprangeheaderparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,463 @@
+/** @file
+* 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:  Declares CUpnpRangeHeaderParser class.
+*
+*/
+
+#include "upnphttpservertransactioncreator.h"
+#include "upnphttpmessage.h"
+#include "upnprangeheaderparser.h"
+#include "upnphttpservertransaction.h"
+#include "upnphttpservertransaction.h"
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::NewL
+// Factory method.
+// ---------------------------------------------------------------------------
+//
+CUpnpRangeHeaderParser* CUpnpRangeHeaderParser::NewL(
+    CUpnpHttpServerTransaction &aTransaction, TInt& aStartPos, TInt& aEndPos )
+    {
+    CUpnpRangeHeaderParser* self = 
+        CUpnpRangeHeaderParser::NewLC( aTransaction, aStartPos, aEndPos );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::NewLC
+// Factory method.
+// ---------------------------------------------------------------------------
+//
+CUpnpRangeHeaderParser* CUpnpRangeHeaderParser::NewLC(
+    CUpnpHttpServerTransaction &aTransaction, TInt& aStartPos, TInt& aEndPos )
+    {
+    CUpnpRangeHeaderParser* self = 
+        new( ELeave ) CUpnpRangeHeaderParser( aTransaction, aStartPos, aEndPos );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::CUpnpRangeHeaderParser
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpRangeHeaderParser::CUpnpRangeHeaderParser(
+    CUpnpHttpServerTransaction &aTransaction, TInt& aStartPos, TInt& aEndPos )
+    :iTransaction(aTransaction), iStartPos( aStartPos ), iEndPos( aEndPos )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::ConstructL
+// Two-phased constructor
+// ---------------------------------------------------------------------------
+//    
+void CUpnpRangeHeaderParser::ConstructL()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::~CUpnpRangeHeaderParser
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpRangeHeaderParser::~CUpnpRangeHeaderParser()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::ParseRangeL
+// Function returns parsinfg status.
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpRangeHeaderParser::ParseRangeL( CUpnpHttpMessage* aMsg, TInt aFileSize )
+    {
+    //checks if Range header exist and is correct
+    TInt rangeStatus = CheckRangeHeaderSyntax( aMsg );
+    if ( rangeStatus != EHttpPartialContent )
+        {
+        return rangeStatus;
+        }
+    
+    //checks Range values    
+    rangeStatus = CheckRangeValues( aFileSize );
+    if ( rangeStatus < 0 )
+    {
+        return rangeStatus;
+    }
+    
+    // creates response if Range header occurs
+    if ( rangeStatus==EHttpPartialContent )
+        {
+        //HTTP/1.1 206 Partial Content
+        CreatePartialContentResponseL( aFileSize, rangeStatus ); 
+        }
+    else if ( rangeStatus==EHttpNoContent )
+        {
+        //HTTP/1.1 204 No Content
+        CreateNoContentResponseL( aFileSize, rangeStatus ); //HTTP/1.1 204 No Content
+        }
+
+    return rangeStatus;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::CheckRangeHeaderSyntax
+// Checks range header syntax.
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpRangeHeaderParser::CheckRangeHeaderSyntax( CUpnpHttpMessage* aMsg )
+    {
+    // checks if range header exist
+    TBool rangeHeaderExist = EFalse;
+    aMsg->IsHeader( (TDesC8&) UpnpHTTP::KHdrRange, rangeHeaderExist );
+    if( !rangeHeaderExist )
+        {
+        return EHttpOk; //Range header doesn't exist
+        }
+    
+    // checks if Range value exist    
+    if( !(aMsg->GetHeaderValue( (TDesC8&) UpnpHTTP::KHdrRange ).Length() > 0 ) )
+        {
+        return -EHttpBadRequest; //Range value doesn't exist
+        }
+    
+    // checks syntax of Range header
+    if( !CUpnpRangeHeaderParser::ParseRangeHeader( aMsg->GetHeaderValue(
+        (TDesC8&) UpnpHTTP::KHdrRange ), iStartPos, iEndPos ) )
+        {
+        return -EHttpBadRequest; //error in syntax
+        }            
+     
+     return EHttpPartialContent; //Range header is proper
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::CheckRangeValue
+// Checks range values.
+// ---------------------------------------------------------------------------
+//    
+TInt CUpnpRangeHeaderParser::CheckRangeValues( TInt aFileSize )
+    { 
+    
+    // empty file
+    if ( aFileSize == 0 )
+        {
+        if ( ( iStartPos == 0 ) || ( iStartPos == iEndPos ) 
+             || ( iStartPos > 0 && iEndPos == KErrNotFound ) 
+             || ( iStartPos == KErrNotFound && iEndPos > 0 ) )
+            {
+            return EHttpNoContent;
+            }
+        else
+            {
+            return -EHttpBadRequest;
+            }
+        }
+     else
+        {
+        // final bytes request
+        // e.g. Range: bytes=-70 
+        if ( ( iStartPos == KErrNotFound && iEndPos > 0 && iEndPos <= aFileSize ) )
+            {
+            iStartPos = aFileSize - iEndPos; 
+            iEndPos = aFileSize-1;
+            return EHttpPartialContent;
+            }
+        // bad posision dependece
+        // e.g. Range: bytes=70-20 
+        // e.g requested final bytes bigger than file size
+        else if ( ( iStartPos == KErrNotFound && iEndPos == 0 ) 
+                  || ( iStartPos == KErrNotFound && iEndPos > 0  && iEndPos > aFileSize )
+                  || ( iStartPos > iEndPos && iEndPos != KErrNotFound ) )   
+            {
+            return -EHttpBadRequest;
+            }
+        // start position larger than file size     
+        else if ( ( iStartPos >= aFileSize 
+                  && ( iStartPos <= iEndPos || iEndPos == KErrNotFound ) ) )
+            {
+            return -EHttpRequestedRangeNotSatisfiable;
+            }
+        }
+        
+        // updates end position if it is out of file size
+        if ( iEndPos == KErrNotFound || iEndPos > aFileSize-1 )
+            {
+            iEndPos = aFileSize-1;
+            }
+            
+        return EHttpPartialContent; 
+    }
+     
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::AppendContentLengthToResponseL
+// Appends Content-Length header to response.
+// ---------------------------------------------------------------------------
+//            
+void CUpnpRangeHeaderParser::AppendContentLengthToResponseL( 
+    TInt aFileSize, TInt rangeStatus )
+    {
+    TInt size( 0 );
+    if ( rangeStatus == EHttpPartialContent )
+        {
+        size = iEndPos - iStartPos + 1;    
+        }
+    else
+        {
+        size = aFileSize;
+        }
+    iSizeBuffer.Num( size ); 
+    iTransaction.AddResponseHeaderL( UpnpHTTP::KHdrContentLength(), iSizeBuffer );
+    }
+       
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::AppendBytesToResponseL
+// Appends Bytes header to response.
+// ---------------------------------------------------------------------------
+//         
+void CUpnpRangeHeaderParser::AppendBytesToResponseL( TInt aFileSize )
+    {
+    HBufC8* buffer = HBufC8::NewLC( sizeof(UpnpHTTP::KBytes) +
+                         KIntegerOccurance*KMaxIntegerLength + KSlashSpaceAndMinusSize );
+    
+    //bytes
+    buffer->Des().Append( UpnpHTTP::KBytes() );
+    buffer->Des().Append( UpnpString::KSpace );
+    //x
+    iSizeBuffer.Num( iStartPos );
+    buffer->Des().Append( iSizeBuffer ); 
+    buffer->Des().Append( UpnpString::KMinus );
+    //y
+    iSizeBuffer.Num( iEndPos ); 
+    buffer->Des().Append( iSizeBuffer ); 
+    buffer->Des().Append( UpnpString::KSlash );
+    //total
+    iSizeBuffer.Num( aFileSize );
+    buffer->Des().Append( iSizeBuffer );
+
+    iTransaction.AddResponseHeaderL( UpnpHTTP::KHdrContentRange(), *buffer );
+
+    CleanupStack::PopAndDestroy( buffer );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::CreatePartialContentResponseL
+// Creates response 206 Partial Content.
+// ---------------------------------------------------------------------------
+//     
+void CUpnpRangeHeaderParser::CreatePartialContentResponseL( 
+    TInt aFileSize, TInt aHttpCode )
+    {
+    // append Partial Content To Response - "206 Partial Content"    
+    iTransaction.AddResponseHeaderL( KNullDesC8(), UpnpHTTP::KHTTPPartialContent() );
+    AppendContentLengthToResponseL( aFileSize, aHttpCode );
+    
+    AppendBytesToResponseL( aFileSize );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpRangeHeaderParser::CreateNoContentResponseL
+// Creates response for 204 No Content.
+// ---------------------------------------------------------------------------
+//     
+void CUpnpRangeHeaderParser::CreateNoContentResponseL( 
+    TInt aFileSize, TInt aHttpCode )
+    {
+    // append No Content To Response - "204 No Content"
+    iTransaction.AddResponseHeaderL( KNullDesC8(), UpnpHTTP::KHTTPNoContent() );    
+    
+    AppendContentLengthToResponseL( aFileSize, aHttpCode );
+
+    // Append No Content Fields To Response;
+    iTransaction.AddResponseHeaderL( UpnpHTTP::KHdrPragma(), UpnpHTTP::KNoCache() );
+    iTransaction.AddResponseHeaderL( UpnpHTTP::KHdrCacheControl(), UpnpHTTP::KNoCache() );
+
+    
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpSession::ParseRangeHeader
+//  Parse range values
+// -----------------------------------------------------------------------------
+//    
+TBool CUpnpRangeHeaderParser::ParseRangeHeader( TDesC8& aRangeHeader, TInt& aStartPos,
+                                                TInt& aEndPos )
+    {
+    // Check header's syntax: "bytes=x-y" where y i optional
+    TInt pos( KErrNotFound );
+
+    // 1 string has to contain "="
+    pos = aRangeHeader.FindC( UpnpString::KEqual() );
+    if( pos == KErrNotFound ) 
+        return EFalse;
+
+    // 2 "bytes" has to be at the beginnig
+    pos = aRangeHeader.FindC( UpnpHTTP::KBytes() );
+    if( pos == KErrNotFound || pos != 0 ) 
+        return EFalse;
+
+    // 3 Sets position to after bytes
+    pos = UpnpHTTP::KBytes().Length();
+
+    // 4 If there any space or tab after "bytes" - move pos after it
+    CUpnpRangeHeaderParser::MovePosition( aRangeHeader, pos );
+
+    // 5 "=" - has to be at this position (after "bytes" + spaces or tabs)
+    if( aRangeHeader[ pos ] != UpnpString::KEqual()[0] )
+        return EFalse;
+
+    // 6 Sets position to after "="
+    pos++;
+
+    // 7 If there any space or tab after "=" - move pos after it
+    CUpnpRangeHeaderParser::MovePosition( aRangeHeader, pos );
+    
+    // 8 extract x-y. -1 stands for '=' length
+    TPtrC8 byteRange = aRangeHeader.Right( aRangeHeader.Length() - pos );
+
+    // 9 There can't be any comas because multi-range is not allowed
+    if( byteRange.Find( UpnpString::KComa() ) != KErrNotFound ) 
+        return EFalse;
+
+    // 10 "-" delimiter must occure and it cant't be first char, because notation as follows: "-y"  is not allowed
+    pos = byteRange.Find( UpnpString::KMinus() );
+    if( pos == KErrNotFound ) 
+        return EFalse;
+    
+    // 11 Checks if it is a final bytes request
+    // e.g. Range: bytes= -20
+    if( pos == 0 )
+        {
+        // If there any space or tab after "-" - move pos after it
+        CUpnpRangeHeaderParser::MovePosition( byteRange.Right( byteRange.Length()-1 ), pos );
+        // if pos equal 0 should be 1 to avoid "-" in getting number from string operation
+        pos = pos == 0 ? 1 : pos;
+        TLex8 endMinus( byteRange.Right( byteRange.Length() - pos  ) );
+        endMinus.SkipSpace();
+        TInt error = endMinus.Val( aEndPos );
+        if ( !CUpnpRangeHeaderParser::HandleConversionException( endMinus, aEndPos, error ) )
+            {
+            return EFalse;
+            }
+            
+        // We have to check if something else than space or tab leaves after conversion - unless for example 11a will be correct but it is not
+        if ( CUpnpRangeHeaderParser::HasImproperChars( endMinus ) )
+            return EFalse;
+         
+        aStartPos = KErrNotFound;
+        return ETrue;
+        }
+
+    // 12 All looks fine, so now parse it and get x and y
+    TLex8 start( byteRange.Left( pos ) );
+    start.SkipSpace();
+
+    // 13 If conversion fails - return error
+    TInt error = start.Val( aStartPos );
+    if ( !CUpnpRangeHeaderParser::HandleConversionException( start, aStartPos, error ) )
+        {
+        return EFalse;
+        }
+    // 14 We have to check if something else than space or tab leaves after conversion - unless for example 11a will be correct but it is not
+    if ( CUpnpRangeHeaderParser::HasImproperChars( start ) )
+            return EFalse;
+
+    // y is optional
+    if( ( byteRange.Length() - pos - 1 ) > 0 )
+        {
+        TLex8 end( byteRange.Right( byteRange.Length() - pos - 1 ) );
+        end.SkipSpace();
+        
+        error = end.Val( aEndPos );
+        if ( !CUpnpRangeHeaderParser::HandleConversionException( end, aEndPos, error ) )
+            {
+            return EFalse;
+            }
+            
+        // We have to check if something else than space or tab leaves after conversion - unless for example 11a will be correct but it is not
+        if ( CUpnpRangeHeaderParser::HasImproperChars( end ) )
+            return EFalse;
+        
+        } 
+    else
+        {
+        aEndPos = KErrNotFound; 
+        } 
+
+    return ETrue;
+    } 
+
+// -----------------------------------------------------------------------------
+//  CUpnpRangeHeaderParser::HasImproperChars
+//  Checks number format
+// -----------------------------------------------------------------------------
+//  
+TBool CUpnpRangeHeaderParser::HasImproperChars( const TLex8& aNumber )
+    {
+    TPtrC8 rem_ptr = aNumber.Remainder();
+    for( TInt index = 0; index < rem_ptr.Length(); index++ )
+        {
+        if( rem_ptr[ index ] != UpnpString::KSpace()[0] &&
+            rem_ptr[ index ] != UpnpString::KTab()[0] )
+            return ETrue;
+        }
+    return EFalse;    
+    }
+    
+// -----------------------------------------------------------------------------
+//  CUpnpRangeHeaderParser::MovePosition
+//  Moves parser position to first not white space
+// -----------------------------------------------------------------------------
+//  
+void CUpnpRangeHeaderParser::MovePosition( const TDesC8& aString, TInt& aPos )
+    {
+    while ( aPos < aString.Length() && 
+            ( aString[ aPos ] == UpnpString::KSpace()[0] || aString[ aPos ] ==
+                                                            UpnpString::KTab()[0] ) 
+          ) 
+        {
+        aPos++;
+        }  
+    }    
+
+// -----------------------------------------------------------------------------
+//  CUpnpRangeHeaderParser::HandleConversionException
+//  Handles conversion exceptions
+// -----------------------------------------------------------------------------
+// 
+TBool CUpnpRangeHeaderParser::HandleConversionException( TLex8& aNumber, TInt& aRangePos,
+                                                         TInt aError )
+    {
+    if( aError == KErrOverflow )
+    {
+        aRangePos = KMaxTInt;
+        while ( aNumber.Peek().IsDigit() )
+            {
+            aNumber.Inc();
+            }        
+    }        
+    else if ( aError != KErrNone )
+        {
+        return EFalse;
+        }
+    
+    return ETrue;
+    }
+    
+// End Of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnpretrywrite.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,195 @@
+/** @file
+* 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:  
+*
+*/
+
+
+
+#include "upnptcpsession.h"
+#include "upnpretrywrite.h"
+
+#ifdef _DEBUG
+#define KLogFile _L("DLNAWebServer.txt")
+#endif
+#include "upnpcustomlog.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::NewL
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpRetryWrite* CUpnpRetryWrite::NewL( CUpnpTcpSession& aSession, RSocket& aSocket, MUpnpRetryWriteObserver* aObserver, TThreadPriority aPriority )
+    {
+    CUpnpRetryWrite* self = new ( ELeave ) CUpnpRetryWrite( aSession, aSocket, aObserver, aPriority );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::CUpnpRetryWrite
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpRetryWrite::CUpnpRetryWrite( CUpnpTcpSession& aSession, RSocket& aSocket, MUpnpRetryWriteObserver* aObserver, TThreadPriority aPriority ):CActive( aPriority ),iSession( aSession ),iSocket( aSocket ),iObserver( aObserver ),iInternalState(EUnknown),iWriteErrorsCount(0)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::ConstructL
+//
+// -----------------------------------------------------------------------------
+//	
+void CUpnpRetryWrite::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    User::LeaveIfError( iWriteTimer.CreateLocal() );   
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::~CUpnpRetryWrite
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpRetryWrite::~CUpnpRetryWrite()
+    {
+    Cancel();
+    iWriteTimer.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::IssueWriteRetry
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpRetryWrite::IssueWriteRetry()
+    {
+	iSession.WaitRetryError(iStatus.Int());
+	iWriteTimer.After( iStatus, KWaitWithSocketWrite * ++iWriteErrorsCount );
+	SetActive();
+	iInternalState = EWaiting;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::WriteToSocket
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpRetryWrite::WriteToSocket()
+    {
+	iSession.WaitRetryError(iStatus.Int(), ETrue);
+	iSocket.Write( KNullDesC8, iStatus );
+	SetActive();
+	iInternalState = EWriting;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::PassErrorToObserverL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpRetryWrite::PassErrorToObserverL( TInt aError )
+	{
+	iInternalState = EUnknown;	
+	iWriteErrorsCount = 0;
+	iObserver->RetryWriteFailL( aError );
+	}
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::RunL
+//
+// -----------------------------------------------------------------------------
+//	
+void CUpnpRetryWrite::RunL()
+    {
+	if ( iStatus == KErrNone )
+		{
+		switch( iInternalState )
+			{
+			case EWaiting:
+				WriteToSocket();
+				break;
+			case EWriting:
+				iInternalState = EUnknown;	
+				iWriteErrorsCount = 0;
+				iObserver->RetryWriteSucceed();
+				break;
+			}
+		}
+	else
+		{
+		if( iInternalState == EWriting )
+			{
+			switch( iStatus.Int() )
+				{
+				case KErrNoMemory:
+				case KErrNotReady:							
+					if( iWriteErrorsCount < KWriteErrorsMax )
+						{
+						IssueWriteRetry();
+						break;
+						}							
+				default:
+					PassErrorToObserverL( iStatus.Int() );
+					break;
+				}
+			}
+        else
+	    	{
+    		if( iInternalState == EWaiting && iStatus.Int() == KErrAbort )
+	    		{        		
+        		iWriteTimer.After(iStatus,1);
+        		iWriteErrorsCount++;
+        		SetActive();
+	    		}	
+    		else
+	    		PassErrorToObserverL( iStatus.Int() );
+	    	}			
+		}
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::DoCancel
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpRetryWrite::DoCancel()
+    {
+    iWriteErrorsCount = 0;
+	iInternalState = EUnknown;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::RunError
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpRetryWrite::RunError( TInt aError )
+    {
+    LOGS1("CUpnpRetryWrite::RunError(%d)", aError);
+   	return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRetryWrite::IsStarted
+//
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpRetryWrite::IsStarted()
+	{
+	return (iInternalState != EUnknown);
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnpsocketshutdown.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,232 @@
+/** @file
+* 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: 
+*
+*/
+
+
+
+#include "upnptcpsession.h"
+#include "upnptcpsessionreader.h"
+#include "upnptcpsessionwriter.h"
+#include "upnphttpfiletransferwriter.h"
+#include "upnphttpfiletransferreader.h"
+#include "upnpsocketshutdown.h"
+#include "upnpnotifytimer.h"
+
+
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::NewL
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpSocketShutdown* CUpnpSocketShutdown::NewL( CUpnpTcpSession& aSession, RSocket& aSocket, TThreadPriority aPriority )
+    {
+    CUpnpSocketShutdown* self = new ( ELeave ) CUpnpSocketShutdown( aSession, aSocket, aPriority );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::CUpnpSocketShutdown
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpSocketShutdown::CUpnpSocketShutdown( CUpnpTcpSession& aSession, RSocket& aSocket, TThreadPriority aPriority ):CActive( aPriority ),iSession( aSession ),iSocket( aSocket ),iInternalState(EUnknown), iSessionTimeouted( EFalse )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::ConstructL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSocketShutdown::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    iInputTimeoutTimer = CUpnpNotifyTimer::NewL( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::~CUpnpSocketShutdown
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpSocketShutdown::~CUpnpSocketShutdown()
+    {
+    Cancel();
+    delete iInputTimeoutTimer;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::ShutdownImmediate
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//
+void CUpnpSocketShutdown::ShutdownImmediate()
+    {
+    iSession.iTcpReader->Cancel();       
+    iSession.iTcpWriter->Cancel();      
+    if( iSession.iFTReader )
+        {
+        iSession.iFTReader->Cancel();
+        }
+    if( iSession.iFTWriter )
+        {
+        iSession.iFTWriter->Cancel();
+        }
+    iSocket.Shutdown( iSocket.EImmediate, iStatus );
+    iInternalState = ENotConnected;                
+    SetActive();    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::ShutdownStop
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//
+void CUpnpSocketShutdown::ShutdownStop()
+    {
+    if ( iInternalState == EUnknown )
+        {
+        iSession.iTcpReader->CancelTimers();
+        if( iSession.iFTReader )
+            {
+            iSession.iFTReader->CancelTimers();
+            }
+        
+        if( iSession.iTcpReader->IsActive() 
+            || ( iSession.iFTReader && iSession.iFTReader->IsActive() ) 
+          )
+            {
+            iSocket.Shutdown( iSocket.EStopOutput, iStatus );            
+            iInternalState = EShuttingDownStopOutput ;               
+            }
+        else
+            {
+            iSocket.Shutdown( iSocket.ENormal, iStatus );
+            iInternalState = EShuttingDownNormal;
+            }
+        SetActive();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::MarksTimeout
+// Marks if timeout occured on session
+// -----------------------------------------------------------------------------
+//
+void CUpnpSocketShutdown::MarksTimeout()
+    {
+    iSessionTimeouted = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::HandleError
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//
+void CUpnpSocketShutdown::HandleError( TInt /*aError*/ )
+    {
+    switch ( iInternalState )
+        {
+        case EUnknown: // error happened during reading/writing - start shutdown procedure
+            ShutdownStop();
+            break;
+        case EShuttingDownStopOutput: // input error appeares while shutdown stop output is pending
+                                      // when it returns shutdown immediate is invoked in RunL  
+            iInternalState = EInputErrorReceived;
+            break;
+        case EWaitingForInputError: // error response from reader after shutdown stop output                  
+            ShutdownImmediate();
+            break;
+        case EShuttingDownNormal: // do nothimg session is being closed
+        case ENotConnected: // do nothing session is closed
+        default:
+            break;        
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::HandleError
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//
+void CUpnpSocketShutdown::RunL()
+    {
+    switch( iInternalState )
+        {
+        case EShuttingDownNormal: // shutdown normal response came
+            ShutdownImmediate();
+            break;
+        case EShuttingDownStopOutput: // shutdown stop output response came
+                                // waiting for KErrEof from HandleError()                                
+            if( !iSessionTimeouted )
+                {
+                iInternalState = EWaitingForInputError;                                
+                iInputTimeoutTimer->Cancel();
+                iInputTimeoutTimer->After(KSessionTimeout, EFalse);     
+                break;                
+                }
+        case EInputErrorReceived: // input error came before stop output finished
+            ShutdownImmediate();
+            break;
+        case ENotConnected:  // shutdown immediate response came          
+            iSession.CloseSocketL();           
+            break;
+        default:
+            break;    
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::TimerEventL
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//        
+void CUpnpSocketShutdown::TimerEventL( CUpnpNotifyTimer* /*aTimer*/ )
+    {
+     switch( iInternalState )
+        {
+        case EWaitingForInputError: // waiting for input error timeout 
+            ShutdownImmediate();
+            break;            
+        default: 
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::DoCancel
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//
+void CUpnpSocketShutdown::DoCancel()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSocketShutdown::HandleError
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpSocketShutdown::RunError( TInt /*aError*/ )
+    {
+    return KErrNone;
+    }
+  
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnptcpserver.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,608 @@
+/** @file
+* 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:  Declares ControlPoint class.
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnptcpserver.h"
+#include <commdb.h>
+
+#include "upnpcons.h"
+#include "upnphttpsession.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "upnphttpservertransactioncreator.h"
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+#include "upnpipfiltermanager.h"
+#endif
+
+// Include for Publish and Subscribe
+#include <e32math.h>
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::CUpnpTcpServer
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpTcpServer::CUpnpTcpServer( RSocketServ* aSocketServ,
+                                TInt aPort,
+                                TInt aIap )
+    : CActive( EPriorityNormal )
+    {
+    CActiveScheduler::Add( this );
+
+    iServerPort = aPort;
+    iSocketServ = aSocketServ;
+    iActiveIap = aIap;
+
+    iServerAddress = TInetAddr( INET_ADDR(0,0,0,0), 0 );
+    iRetrySocketTimer = NULL;
+    iFileReadBufferSize  = KRcvBufSizeDefault;
+    iFileWriteBufferSize = KServeFileSizeDefault;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::BaseConstructL
+// TcpServer might-leave initialization method.
+// NOTE: Must be called by extending class
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::BaseConstructL()
+    {
+    iRetrySocketTimer = CUpnpNotifyTimer::NewL( this );
+
+    CreateConnectionManagerSessionL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::CUpnpTcpServer
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpTcpServer::~CUpnpTcpServer()
+    {
+    LOG_FUNC_NAME;
+    PrepareToCloseSockets();
+    delete iRetrySocketTimer;
+    
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    delete iIPFilteringManager;
+    #endif
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::CreateConnectionManagerSessionL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::CreateConnectionManagerSessionL()
+    {
+    if ( !iConnectionManagerProxy )
+        {
+        iConnectionManagerProxy = CUpnpConnectionManagerProxy::NewL( *iSocketServ );
+        TInt error = iConnectionManagerProxy->EnsureStart();
+        if ( error )
+            {
+            LOGS1H( iHandle, "CUpnpTcpServer::OpenSocketL *** Error in attaching: %d", error );
+
+            // Nothing else to do but leave, connection is not possible and
+            // can't access network
+            User::LeaveIfError( error );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::ListenL
+// Listen incoming connections
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::OpenSocketL()
+    {
+    CreateConnectionManagerSessionL();
+
+    SetServerAddress( iConnectionManagerProxy->LocalAddress() );
+    iActiveIap = iConnectionManagerProxy->ActiveIap();
+
+    LOGSH( iHandle, "CUpnpTcpServer::ListenL()");
+
+    TInt error = iServerSocket.Open( *iSocketServ, KAfInet, KSockStream,
+                                      KProtocolInetTcp,
+                                      iConnectionManagerProxy->ConnectionL() );
+
+    if ( error != KErrNone)
+        {
+        LOGSH( iHandle, "CUpnpTcpServer ListenL - Open failed.");
+        User::Leave( error );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::BindRandomPortL
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::BindRandomPortL()
+    {
+    LOG_FUNC_NAME;
+    iServerPort = NewPortNumberL();
+
+    TInetAddr addr =  TInetAddr(iServerPort);
+
+    TInt error = iServerSocket.Bind( addr );
+
+    if ( KErrNone == error )
+        {
+        error = StartToListenL();
+        }
+    // If the port is in use, then get a new port number and try again.
+    else if ( KErrInUse == error )
+        {
+            LOGS1H( iHandle, "CUpnpTcpServer ListenL - Bind fail, trying new port: %d", iServerPort);
+
+
+        while ( KErrInUse == error )
+            {
+            iServerPort = NewPortNumberL();
+            iServerAddress.SetPort( iServerPort );
+            error = iServerSocket.Bind( iServerAddress );
+            if ( KErrNone == error )
+                {
+                error = StartToListenL();
+                }
+            }
+        if ( KErrNone != error )
+            {
+                LOGS1H( iHandle, "CUpnpTcpServer ListenL Bind fail: %d", error);
+
+            iServerSocket.Close();
+            }
+        }
+    // Bind failed, close socket and log problem
+    else
+        {
+        iServerSocket.Close();
+            LOGS1H( iHandle, "CUpnpTcpServer ListenL -RSocket::Bind fail: %d", error);
+        }
+    // In case of failure, there is nothing else to do but leave.
+    // Construction will fail.
+    if ( KErrNone != error )
+        {
+        LOGSH( iHandle, "CUpnpTcpServer ListenL - Bind or listen failed.");
+
+        User::Leave( error );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::BindL
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::BindL( const TInt aPort)
+{
+    LOGS1H( iHandle , "CUpnpTcpServer BindL to fixed port %d" , aPort);
+    iServerPort = aPort;
+
+    TInetAddr addr( iServerPort );
+    TInt error( iServerSocket.Bind( addr ) );
+    if( error == KErrNone )
+        {
+        User::LeaveIfError( StartToListenL() );
+        }
+    else
+        {
+        LOGSH( iHandle, "CUpnpTcpServer ListenL - open, Bind or listen failed");
+        iServerSocket.Close();
+        User::Leave( error ) ;
+        }
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::StartToListenL
+// Start to listen a socket.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpTcpServer::StartToListenL()
+    {
+    TInt error = iServerSocket.Listen( UpnpSocket::KMaxConnectionsInQueue );
+    if ( KErrNone == error )
+        {
+        // Both bind and listen ok, accept connection if OK
+        LOGS1H( iHandle, "CUpnpTcpServer::StartToListenL - at port %i", ServerPort() );
+
+        AcceptConnectionL();
+        }
+    // Listen failed, close socket and log problem
+    else
+        {
+        iServerSocket.Close();
+        LOGS1H( iHandle, "CUpnpTcpServer StartToListenL - fail: %d" , error);
+        }
+    return error;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::AcceptConnection
+// Open connection
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::AcceptConnectionL()
+    {
+    LOG_FUNC_NAME;
+    TInt error = 0;
+
+    if( iSessionList.Count() >= KMaxConnectionCount )
+    {
+        LOGSH( iHandle, "CUpnpTcpServer::AcceptConnectionL - HTTP *** SessionList full");
+
+        StartRetryTimer();
+        return;
+    }
+
+    error = iClientSocket.Open( *iSocketServ );
+    if ( error < KErrNone )
+        {
+        LOGS1H( iHandle, "CUpnpTcpServer::AcceptConnectionL - error to open client socket,%i", error);
+
+        iClientSocket.Close();
+
+        StartRetryTimer();
+        }
+    else
+        {
+        iServerSocket.Accept( iClientSocket, iStatus );
+        SetActive();
+        iState = EAccepting;
+        LOGSH( iHandle, "CUpnpTcpServer::AcceptConnection - State = EAccepting ");
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::DeleteSession
+// Delete sessions.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::DeleteSession( CUpnpTcpSession* aSession )
+    {
+    LOG_FUNC_NAME;
+    TInt pos = iSessionList.Find( aSession );
+
+    if( pos != KErrNotFound )
+        {
+        iSessionList.Remove( pos );
+        iSessionList.Compress();
+        delete aSession;
+        aSession = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::RunL
+// State machine
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::RunL()
+    {
+     switch ( iState )
+        {
+        case EAccepting:
+            {
+            if( iStatus == KErrNone )
+                {
+                iClientSocket.SetOpt( KSoTcpNoDelay, KSolInetTcp, 1 );
+
+                #ifdef RD_UPNP_REMOTE_ACCESS
+/**************     IPFIltering    ********************/
+                TInetAddr tempAddr;
+                iClientSocket.RemoteName( tempAddr );
+                tempAddr.ConvertToV4();
+
+                if( iIPFilteringManager && !iIPFilteringManager->IsAllowed( tempAddr ) )
+                    {
+                    iClientSocket.Close();  //mozliwe ze konieczny bedzie jeszcze
+                                            //Shutdown - EImmediate; default jest ENormal
+                    AcceptConnectionL()  ;
+                    break;
+                    }
+
+                #if _DEBUG
+                TBuf<20> addrBuf;
+                tempAddr.Output( addrBuf );
+                #endif
+/******************* IPFiltering END *******************/
+                #endif
+
+                CUpnpTcpSession* sess = ConnectionAcceptedL( iClientSocket );
+                iSessionList.Append( sess );
+
+                }
+            else
+                {
+                iClientSocket.Close();
+                }
+
+            AcceptConnectionL();
+
+            break;
+            }
+
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::RunError
+// RunError is called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpTcpServer::RunError( TInt aError )
+    {
+    LOGS1H( iHandle, "CUpnpTcpServer::RunError - Error: %d", aError);
+    StartRetryTimer();
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::StopTcpServerL
+// Stop session and reset the lists
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::StopTcpServerL()
+    {
+    LOG_FUNC_NAME;      
+    for( TInt i(0) ; i < iSessionList.Count() ; i++ )
+        {
+        iSessionList[i]->NotifyTimeoutL();
+        }
+    PrepareToCloseSockets();     
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::PrepareToCloseSockets
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::PrepareToCloseSockets()
+    {
+    iSessionList.ResetAndDestroy();
+    if ( IsActive() )
+        {
+        Cancel();
+        }
+    else
+        {
+        CancelRetryTimer();
+        CloseSockets();
+        }  
+    delete iConnectionManagerProxy;
+    iConnectionManagerProxy = NULL;    
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::DoCancel
+// Cancel outstanding operations and close the connection
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::DoCancel()
+    {
+    CancelRetryTimer();
+
+    iServerSocket.CancelAll();
+
+    CloseSockets();
+
+    LOGSH( iHandle, "CUpnpTcpServer::DoCancel - iState = ENotListening" );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::CloseSockets
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::CloseSockets()
+    {
+    iServerSocket.Close();
+
+    iClientSocket.Close();
+
+    iState = ENotListening;
+    LOGSH( iHandle, "CUpnpTcpServer::CloseSockets - iState = ENotListening" );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::ServerAddress
+// Return server address.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::ServerAddress( TInetAddr& aAddr )
+    {
+    LOG_FUNC_NAME;
+    aAddr = iServerAddress;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::SetServerAddress
+// Set new server address.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::SetServerAddress( const TInetAddr& aAddr )
+    {
+    iServerAddress = aAddr;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::ServerPort
+// Return server port number,
+// -----------------------------------------------------------------------------
+//
+TUint CUpnpTcpServer::ServerPort()
+    {
+    return iServerPort;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::HWAddressL
+// Return hardware address.
+// -----------------------------------------------------------------------------
+//
+TSockAddr* CUpnpTcpServer::HWAddressL()
+    {
+    LOG_FUNC_NAME;
+    // Fetch IP address
+    ServerAddress(iServerAddress);
+
+    // return value is TSockAddr* because it won't work
+    // correctly always with TSockAddr
+    TPckgBuf<TSoInetInterfaceInfo> item;
+
+    RSocket sock;
+
+    TInt result = sock.Open( *iSocketServ, KAfInet, KSockStream,
+        KProtocolInetTcp, iConnectionManagerProxy->ConnectionL() );
+    if ( KErrNone == result )
+        {
+        result = sock.GetOpt( KSoInetNextInterface, KSolInetIfCtrl, item );
+
+        // checking all interfaces. If interface has same IP address as socket, is
+        // the current active interface. In this case we get that interface's
+        // hardware address.
+        while ( result == KErrNone )
+            {
+            TSoInetInterfaceInfo& ifInfo = item();
+            TInetAddr ifAddr = ifInfo.iAddress;
+            ifAddr.ConvertToV4();
+            ifAddr.SetPort( iServerAddress.Port() );
+            if ( ifAddr == iServerAddress )
+                {
+                sock.Close();
+                TSockAddr tempAddr = ifInfo.iHwAddr;
+                return new (ELeave) TSockAddr( tempAddr );
+                }
+            result = sock.GetOpt( KSoInetNextInterface, KSolInetIfCtrl, item );
+            }
+        }
+
+    sock.Close();
+    return new (ELeave) TSockAddr();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::NewPortNumberL
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpTcpServer::NewPortNumberL()
+    {
+    LOG_FUNC_NAME;
+    TInt id( 0 );
+
+    //get random port
+    TTime now;
+    now.HomeTime();
+    TInt64 randSeed = now.Int64();
+    id =  Math::Rand( randSeed ) % (KInetMaxAutoPort-KInetMinAutoPort+1) + KInetMinAutoPort;
+    return id;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::TimerEventL
+// Function is callback from iRetrySocketTimer. This timer is used
+// to retry to open new server socket.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::TimerEventL( CUpnpNotifyTimer* /*aTimer*/)
+    {
+    // Timer has expired, now trying to bind server socket again.
+    LOGSH( iHandle, "CUpnpTcpServer::TimerEventL - retrying to open new socket server");
+    AcceptConnectionL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::StartRetryTimer
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::StartRetryTimer()
+    {
+    CancelRetryTimer();
+    iRetrySocketTimer->After(KRetryTime);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::SetFileWriteBufferSize
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::SetFileWriteBufferSize(TInt aSize)
+    {
+    iFileWriteBufferSize = aSize;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::FileWriteBufferSize
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpTcpServer::FileWriteBufferSize()
+    {
+    return iFileWriteBufferSize;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::SetFileReadBufferSize
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpServer::SetFileReadBufferSize(TInt aSize)
+    {
+    iFileReadBufferSize = aSize;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::FileReadBufferSize
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpTcpServer::FileReadBufferSize()
+    {
+    return iFileReadBufferSize;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::GetServerAddress
+// Return server address.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpTcpServer::GetServerAddress( TInetAddr& aAddr )
+    {
+    aAddr = iServerAddress;
+    return (iServerAddress.Address() != 0);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpServer::CancelRetryTimer
+// -----------------------------------------------------------------------------
+//    
+void CUpnpTcpServer::CancelRetryTimer()
+    {
+    if ( iRetrySocketTimer )
+        {
+        iRetrySocketTimer->Cancel();
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnptcpsession.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,765 @@
+/** @file
+* 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:  Declares ControlPoint class.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "upnptcpsessionreader.h"
+#include "upnphttpfiletransferreader.h"
+#include "upnphttpchunkfiletransferreader.h"
+#include "upnphttpfiletransferwriter.h"
+#include "upnptcpsessionwriter.h"
+#include "upnphttpsession.h"
+#include "upnphttpfileaccess.h"
+#include "upnphttpmessagefactory.h"
+#include "upnphttpbuffer.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+
+//CONSTANTS
+const TInt KMaxExportRetry = 0;
+ 
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::CUpnpTcpSession
+// C++ constructor used when remote host issued connection to server
+// -----------------------------------------------------------------------------
+//
+CUpnpTcpSession::CUpnpTcpSession( RSocket& aSocket,
+                                  TThreadPriority aPriority )
+    : iSocket( aSocket ),
+      iTimeoutCurrentValue( KSessionTimeout ), iTimeoutSessionValue(KSessionTimeout)
+    {
+    iInitialPriority = aPriority;
+
+    iSessionNeedsErrorReply = ETrue;
+    iDisconnectNotification=ETrue;
+    iContinuedMessageDownload = EFalse;
+    iExportRetryCounter = 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::TcpConstructL
+// Two-phased constructor
+// constructor that can leave. Used from derived classes.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::TcpConstructL( RSocket aSocket,
+                                     TInt aReadBufferSize,
+                                     TInt aFileReadBufferSize )
+    { 
+    
+    LOGS1( "%i, CUpnpTcpSession::TcpConstructL(RSocket)", iId );
+
+    aSocket.RemoteName( iAddr );
+    iAddr.ConvertToV4();
+          
+    // Create timeout timer and start it.
+    iTimeoutTimer = CUpnpNotifyTimer::NewL( this );
+    iSocketShutdown = CUpnpSocketShutdown::NewL( *this, iSocket, iInitialPriority );
+
+    // Create socket read and write active objects
+    iTcpReader = CUpnpTcpSessionReader::NewL( *this, iSocket,
+                                     iInitialPriority, aReadBufferSize );    
+    iTcpWriter = CUpnpTcpSessionWriter::NewL( *this, iSocket, iInitialPriority );
+
+    iDisconnectNotification = ETrue;
+    iIsPersistent = ETrue;
+    iFileReadBufferSize = aFileReadBufferSize;
+
+    SetState( EConnected );
+
+    InitialReceiveL();
+    
+    StartTimeoutTimer( iSessionNeedsErrorReply );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::FileTransferReaderConstructL
+// Creates and activates the File Transfer reder object
+// constructor that can leave. Used from derived classes.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::FileTransferReaderConstructL()
+    {
+    LOGS1( "%i, CUpnpTcpSession::FileTransferConstructL", iId );
+        
+    // Create filetransfer reader, active object
+   if(!iFTReader)
+       {       
+       if(this->FileAccess() && this->FileAccess()->EncodingMode())
+           {
+           iFTReader = CUpnpHttpChunkFileTransferReader::NewL( *this, iSocket,
+                                      iInitialPriority, KFileTransferReaderBufSizeDefault, 
+                   CUpnpHttpChunkFileTransferReader::CalculateBufferSize(
+                            KFileTransferReaderBufSizeDefault,iFileReadBufferSize));
+           }
+       else
+           {
+           iFTReader = CUpnpHttpFileTransferReader::NewL( *this, iSocket,
+                                 iInitialPriority, KFileTransferReaderBufSizeDefault, 
+                       CUpnpHttpChunkFileTransferReader::CalculateBufferSize(
+                            KFileTransferReaderBufSizeDefault,iFileReadBufferSize));      
+           }
+       }       
+   else
+       iFTReader->Reset();
+   
+   iFTReader->SetActivated(ETrue);
+    
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::FileTransferWriterConstructL
+// Creates and activates the File Transfer writer object
+// constructor that can leave. Used from derived classes.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::FileTransferWriterConstructL(TInt aWriteSize)
+    {
+    LOGS1( "%i, CUpnpTcpSession::FileTransferWriterConstructL", iId );
+        
+    // Create filetransfer writer, active object
+   if (!iFTWriter)
+       {        
+     iFTWriter = CUpnpHttpFileTransferWriter::NewL( *this, iSocket,
+                                                  iInitialPriority, aWriteSize);  
+       }       
+   else
+       iFTWriter->Reset();
+   
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::~CUpnpTcpSession
+// C++ default destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpTcpSession::~CUpnpTcpSession()
+    {
+    delete iTcpReader;
+    delete iTcpWriter;   
+    delete iFTReader;
+    if(iFTWriter)
+        {
+        if(iState != ENotConnected)
+            {
+            iSocket.CancelWrite();
+            }            
+        delete iFTWriter;
+        }    
+
+    delete iTimeoutTimer;
+    delete iReceivedMessage;
+    delete iSocketShutdown;
+    LOGS2( "%i, CUpnpTcpSession::~CUpnpTcpSession() - iState: %i",iId, iState );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::ShutdownStop
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::ShutdownStop()
+    {
+    LOGS2( "%i, CUpnpTcpSession::ShutdownStop, state %i", iId, iState );
+    iState = EShuttingDownWriteWait;
+    if( !iTcpWriter->IsWriting() && !iTcpWriter->IsRetrying() ) 
+        {
+        iSocketShutdown->ShutdownStop();
+           SetState( EShuttingDown);
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::WriteL
+// Write
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::WriteL( const TDesC8& aBuffer )
+    {
+    LOGS1( "%i, CUpnpTcpSession::WriteL(TDesC8&)", iId );
+
+    iTcpWriter->IssueWriteL( aBuffer );
+
+    StartTimeoutTimer( iContinuedMessageDownload );
+
+    LOGS2( "%i, CUpnpTcpSession::WriteL - HTTP (Serverport %i) *** Writing...",
+            iId, ServerPort() );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::InitialReceiveL
+// Receive
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::InitialReceiveL()
+    {
+    LOGS1( "%i, CUpnpTcpSession::ReceiveL()", iId );
+    if ( ( iState == EConnected ) && ( !iTcpReader->IsActive() ) )
+        {
+        iTcpReader->Start();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::ReceiveL
+// Receive
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::ReceiveL()
+    {      
+    // If session is already close or it will be closed when reading is finisihed
+    if ( IsConnected() && ( iSessionKeepAlive || DownloadOngoing() ) )
+        {
+        if (iFTReader && iFTReader->Activated())
+            {
+            iFTReader->StartL();
+            }
+        else
+            {
+            iTcpReader->Start();
+            }
+        StartTimeoutTimer( iSessionNeedsErrorReply );
+        }             
+    else if ( OutstandingWritings() ) //outstanding TCP writing operations
+        {
+        StartTimeoutTimer( iSessionNeedsErrorReply );
+        }
+    else
+        {
+        StartDisconnect();
+        }
+    }    
+
+  
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::ReceivingCompletedL
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::ReceivingCompletedL( TDesC8& aBuffer )
+    {
+    LOGS1( "%i, CUpnpTcpSession::ReceivingCompletedL(TDesC8& aBuffer)", iId);
+
+    iTimeoutTimer->Cancel();
+    BufferReceivedL( aBuffer );
+    ReceiveL();            
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::WritingCompletedL
+// 
+// -----------------------------------------------------------------------------
+//    
+void CUpnpTcpSession::WritingCompletedL()
+    {
+    LOGS2( "%i, CUpnpTcpSession::WritingCompletedL() iState %i", iId, iState );
+
+    iTimeoutTimer->Cancel();              
+    
+    switch( iState )
+        {
+        case EConnected:
+            {
+            TInetAddr local;
+            iSocket.LocalName( local );
+            local.SetFamily( KAfInet );
+
+            TInetAddr remote;
+            iSocket.RemoteName( remote );
+            remote.SetFamily( KAfInet );    
+            
+            if( ( iSessionKeepAlive || remote == local ) && !iContinuedMessageDownload )
+                {
+                // 20s timeout without HTTP 408 message
+                StartTimeoutTimer( EFalse );
+                }
+            else if( iContinuedMessageDownload )
+                {
+                // If there is expected content of the POST message after sending
+                // there should be error response after timeout.
+                // 20s timeout with HTTP 408 message
+                StartTimeoutTimer( ETrue );
+                }
+            else
+                {
+                //if no POSTs left in a pipeline
+                if (!iSessionKeepAlive)                   
+                    {
+                    iSessionNeedsErrorReply = EFalse;
+                    StartDisconnect();
+                    }
+                }
+            }           
+                
+            break;
+        case EShuttingDownWriteWait:
+                //after successful writing continue to shutdown
+                ShutdownStop();
+                break;
+        case EDisconnecting:
+            if ( iDisconnectNotification )
+                {
+                NotifyDisconnectL( RemoteHost() );
+                DeleteThisSessionL( this );
+                }
+            else
+                {
+                iSessionNeedsErrorReply = EFalse;
+                StartDisconnect();
+                }
+            break;
+           case EServerBusy:
+               DeleteThisSessionL( this );
+              break;
+        default:
+            LOGS2( "%i, PANIC: CUpnpTcpSession::WritingCompletedL, iState: %i", iId, iState );
+            break;
+
+        }
+    }
+        
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::ServerBusyL
+// Send server busy.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::ServerBusyL()
+    {
+    LOGS1( "%i, CUpnpTcpSession::ServerBusyL()", iId );
+    // no reason for reader to read data
+    iTcpReader->Cancel();
+    if(iFTReader)
+        iFTReader->Cancel();
+    
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL( 
+                        RemoteHost(), 
+                        EHttpServiceUnavailable );
+    CleanupStack::PushL( msg );
+    HBufC8* msgbody = NULL;
+    msgbody = msg->ToStringL();
+
+    CleanupStack::PopAndDestroy(msg);
+    CleanupStack::PushL( msgbody );
+
+    WriteL( *msgbody );
+    CleanupStack::PopAndDestroy(msgbody);
+
+    iState = EServerBusy;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::Id
+// Returns session ID
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpTcpSession::Id()
+    {
+    return iId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::StartTimeoutTimerL
+// Start timer.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::StartTimeoutTimer( TBool aSessionErrorReplyNeeded )
+    {
+    LOGS2( "%i, CUpnpTcpSession::StartTimeoutTimer, state %i", iId, iState );
+
+        if( !ShuttingDown())
+            {
+            iTimeoutTimer->Cancel();          
+            iTimeoutTimer->After( iTimeoutCurrentValue, EFalse );
+            iSessionNeedsErrorReply = aSessionErrorReplyNeeded;    
+            LOGS2( "%i, CUpnpTcpSession::StartTimeoutTimer session:%i"
+                             , iId, iTimeoutCurrentValue );
+            }
+            else 
+                {
+                // If already session is switched to disconnected state then just delete it.
+                LOGS1( "%i, CUpnpTcpSession::StartTimeoutTimer session disconnected"
+                                , iId );
+                iSessionNeedsErrorReply = EFalse;
+                StartDisconnect();
+                }
+    }
+  
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::StartDisconnectingTimer
+// Start timer.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::StartDisconnectingTimer(TInt aTime)
+    {
+    LOGS2( "%i, CUpnpTcpSession::StartDisconnectingTimer, state %i",
+            iId, iState );
+    StartDisconnect();         
+    iTimeoutTimer->After( aTime, EFalse );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::StartDisconnect
+// Start disconnect session.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::StartDisconnect(TBool aDisconnectNotification)
+    {
+    LOGS2( "%i, CUpnpTcpSession::StartDisconnect, state %i",
+            iId, iState ); 
+
+    iDisconnectNotification = aDisconnectNotification;
+    if( iState == EConnected )
+        SetState( EDisconnecting );
+    iTimeoutTimer->Cancel();
+    TRAPD( err, DisconnectRequestL() );
+    if( err < 0 ) 
+        {
+        ShutdownStop();
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::TimerEventL
+// Timer event.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::TimerEventL( CUpnpNotifyTimer* /*aTimer*/ )
+    {
+    if( iState == EConnected ) iSocketShutdown->MarksTimeout();
+    this->DisconnectRequestL();
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::DisconnectRequestL
+// Handles discnnect request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::DisconnectRequestL()
+    {
+    LOGS2( "%i, CUpnpTcpSession::DisconnectRequestL -  HTTP (Serverport %i)"
+            , iId, ServerPort() );
+    if (DownloadOngoing() && (iState != EDisconnecting))
+        {
+        if(iExportRetryCounter < KMaxExportRetry)
+            {
+            //restart timer - download ongoing
+            StartTimeoutTimer(ETrue);
+            iExportRetryCounter++;                
+            }
+        else
+            {
+            iSocket.CancelWrite();
+            SetState( ENotConnected );
+                       NotifyDisconnectL( RemoteHost() );
+                       iSessionNeedsErrorReply=EFalse;
+                       DeleteThisSessionL( this );
+            }
+            return;
+        }
+    
+    if ( iSessionNeedsErrorReply && !ShuttingDown() )
+        {
+        LOGS1( "%i, CUpnpTcpSession::DisconnectRequestL - reply 408!", iId );
+
+        CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL( 
+                                                        RemoteHost(), 
+                                                        EHttpRequestTimeout );
+        CleanupStack::PushL( msg );
+        HBufC8* tempBuf = NULL;
+        tempBuf = msg->ToStringL();
+        CleanupStack::PopAndDestroy( msg );
+        CleanupStack::PushL( tempBuf );
+        WriteL( *tempBuf );
+        CleanupStack::PopAndDestroy( tempBuf );
+        SetState( EDisconnecting );
+        NotifyTimeoutL();
+        }
+    else
+        {
+        LOGS1( "%i, CUpnpTcpSession::DisconnectRequestL - no reply!", iId );
+        DeleteThisSessionL( this );
+        }
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::SetState
+// Set state to connected.
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::SetState( TUpnpTcpSessionState aState )
+    {
+    LOGS1( "%i, CUpnpTcpSession::SetState()", iId );
+    iState = aState;
+    switch(iState)
+        {
+            case EConnected:
+            
+                iTcpWriter->SessionConnected( ETrue );                                    
+                break;
+            case EDisconnecting:
+                //outstandings writings
+                iTcpWriter->SessionConnected( ETrue );
+                        
+                break;
+            default:
+                iTcpWriter->SessionConnected( EFalse );
+                if(iFTWriter)
+                    iFTWriter->Cancel();
+                break;        
+                
+        }
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::IsConnected
+// Retrun connection state.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpTcpSession::IsConnected()
+    {
+    return ( iState == EConnected );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::RemoteHost
+// Return remote host address.
+// -----------------------------------------------------------------------------
+//
+TInetAddr& CUpnpTcpSession::RemoteHost()
+    {
+    return iAddr;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::HandleErrorL
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpTcpSession::HandleErrorL( TInt aError  )
+    {
+    LOGS2( "%i, CUpnpTcpSession::HandleErrorL( %i )", iId , aError);
+    
+    if ( aError == KErrCancel )
+        {
+        return;    
+        }
+         
+
+    if(!ShuttingDown())
+        {
+        if( iState ==  EShuttingDownWriteWait )
+            {
+            ShutdownStop();
+            return;
+            }
+
+    switch( aError )
+        {
+        case KErrNoMemory:
+            NotifyTimeoutL();
+            CheckConnectionCloseL();
+            iSessionNeedsErrorReply = EFalse;
+            SetState( EDisconnecting );
+            NotifyDisconnectL( RemoteHost() );
+            iDisconnectNotification = EFalse;
+            StartDisconnectingTimer( KErrorTimeout );
+            break;            
+
+        case KErrEof:
+            NotifyTimeoutL();
+            CheckConnectionCloseL();
+            iSessionNeedsErrorReply = EFalse;
+            SetState( EDisconnecting );
+            NotifyDisconnectL( RemoteHost() );
+            DeleteThisSessionL( this );
+            break;
+        
+        case KErrServerBusy:
+            iDisconnectNotification = ETrue;
+            iSessionNeedsErrorReply=EFalse;
+            SocketServerBusyL( RemoteHost() );           
+            StartDisconnect();    
+            break;
+
+        case KErrDisconnected:
+            CheckConnectionCloseL();
+            SetState( EDisconnecting );            
+			iSessionNeedsErrorReply = EFalse;
+			iDisconnectNotification = EFalse;
+			StartDisconnect();
+			break;            
+        case KErrCouldNotConnect:      
+        case KErrHostUnreach:    
+        default:
+            iSessionError = aError;            
+            ShutdownStop();
+            break;
+            }
+        }
+    else
+        {
+        iSocketShutdown->HandleError( aError );
+        }
+
+    }
+ 
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::WaitWriteError
+// 
+// -----------------------------------------------------------------------------
+//    
+void CUpnpTcpSession::WaitRetryError(TInt aError, TBool aStartTimer)
+    {
+    LOGS2( "%i, CUpnpTcpSession::WaitRetryError - %i",
+            iId, aError );
+    iTimeoutTimer->Cancel();
+    if (aStartTimer)
+        StartTimeoutTimer( iContinuedMessageDownload );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::StartClosingSession
+// 
+// -----------------------------------------------------------------------------
+//    
+void CUpnpTcpSession::StartClosingSession()    
+{    
+    iSessionNeedsErrorReply=EFalse;
+    StartDisconnect( ETrue );    
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::IsPersistentConnection
+// 
+// -----------------------------------------------------------------------------
+//    
+TBool CUpnpTcpSession::IsPersistentConnection()    
+{    
+    return iIsPersistent;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::IsPersistentConnection
+// 
+// -----------------------------------------------------------------------------
+//    
+CUpnpHttpFileTransferReader* CUpnpTcpSession::FileTransferReader()
+{    
+    return iFTReader;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::FileTransferWriter
+// 
+// -----------------------------------------------------------------------------
+//    
+CUpnpHttpFileTransferWriter* CUpnpTcpSession::FileTransferWriter()
+{    
+    return iFTWriter;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::IsPersistentConnection
+// 
+// -----------------------------------------------------------------------------
+//    
+TBool CUpnpTcpSession::OutstandingWritings()    
+{    
+    //whether content being served or outstanding messages to be written to the socket
+    return (FileServeExists() || iTcpWriter->HasWriteRequestsToSend());
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::DownloadOngoing
+// 
+// -----------------------------------------------------------------------------
+//    
+TBool CUpnpTcpSession::DownloadOngoing() 
+{    
+    //whether content being served or outstanding messages to be written to the socket
+    return (FileTransferWriter() && FileTransferWriter()->IsActivated() &&
+                                    !FileTransferWriter()->IsCancelled());
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::TimerCancel
+// 
+// -----------------------------------------------------------------------------
+//    
+void CUpnpTcpSession::TimerCancel()    
+    {
+    iTimeoutTimer->Cancel();    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::ShuttingDown
+// 
+// -----------------------------------------------------------------------------
+//    
+TBool CUpnpTcpSession::ShuttingDown() 
+    {    
+    return (iState == ENotConnected || iState == EShuttingDown );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::CloseSocketL
+// 
+// -----------------------------------------------------------------------------
+//    
+void CUpnpTcpSession::CloseSocketL()
+    {
+    if( iDisconnectNotification )
+        {
+        NotifyDisconnectL( RemoteHost() );
+        }
+    else
+        {
+        NotifyTimeoutL();
+        }
+    iState = ENotConnected;
+    iSocket.Close();
+    DestroyIt( this );        
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::TimeoutCurrentValue
+// 
+// -----------------------------------------------------------------------------
+//    
+TInt CUpnpTcpSession::TimeoutCurrentValue()
+    {
+    return iTimeoutCurrentValue;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTcpSession::CancelTcpReader()
+// 
+// -----------------------------------------------------------------------------
+//    
+void CUpnpTcpSession::CancelTcpReader()
+    {
+    iTcpReader->Cancel();    
+    }    
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnptcpsessionreader.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,265 @@
+/** @file
+* 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:  CUpnpTcpSessionReader is a class responsible for 
+*                   asynchronous reading from socket owned by CUpnpTcpSession.
+*
+*/
+
+
+
+#include "upnptcpsession.h"
+#include "upnptcpsessionreader.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "inet6err.h"
+
+static const TInt KMaxRetryErrors = 5;
+static const TInt KRetryWaitTime = 1000000;
+static const TInt KTwoSec = 2000000;
+static const TInt KOneSec = 1000000;
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::NewL
+// Factory method.
+// ---------------------------------------------------------------------------
+//
+CUpnpTcpSessionReader* CUpnpTcpSessionReader::NewL( CUpnpTcpSession& aSession,
+                                                    RSocket& aSocket,
+                                                    TThreadPriority aPriority,
+                                                    TInt aBufferSize )
+    {
+    CUpnpTcpSessionReader* self = new ( ELeave ) 
+                CUpnpTcpSessionReader( aSession, aSocket, aPriority, aBufferSize );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::CUpnpTcpSessionReader
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpTcpSessionReader::CUpnpTcpSessionReader( CUpnpTcpSession& aSession,
+                                              RSocket& aSocket, 
+                                              TThreadPriority aPriority,
+                                              TInt aBufferSize )
+    :CActive( aPriority ),
+    iSocket( aSocket ),
+    iSession( aSession ),
+    iBufferSize( aBufferSize )
+    {
+    LOGS1( "%i, CUpnpTcpSessionReader::CUpnpTcpSessionReader", iSession.Id() );
+    
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::TcpConstructL
+// Two-phased constructor
+// constructor that can leave. Used from derived classes.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionReader::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    
+    iReceiveBuffer.CreateL( iBufferSize );
+        
+    iRetryTimer = CUpnpNotifyTimer::NewL( this );
+    iCancelTimer = CUpnpNotifyTimer::NewL( this );        
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::~CUpnpTcpSessionReader
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpTcpSessionReader::~CUpnpTcpSessionReader()
+    {
+    LOGS1( "%i, CUpnpTcpSessionReader::~CUpnpTcpSessionReader", iSession.Id() );
+    Cancel();
+    
+    iReceiveBuffer.Close();  
+    
+    delete iRetryTimer;
+    delete iCancelTimer;   
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::Start
+// Starts reading.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionReader::Start()
+    {
+    LOGS1( "%i, CUpnpTcpSessionReader::Start", iSession.Id() );
+    // Initiate a new read from socket into iBuffer
+    if ( !IsActive() )
+        {
+        IssueRead();
+        }
+    }    
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::DoCancel
+// From class CActive.
+// Cancels issued reading.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionReader::DoCancel()
+    {
+    LOGS1( "%i, CUpnpTcpSessionReader::DoCancel", iSession.Id() );
+    // Cancel asychronous read request
+    iSocket.CancelRead();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::CancelRetry
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionReader::CancelTimers()
+    {
+	iRetryTimer->Cancel();
+	iCancelTimer->Cancel();
+    }       
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::RunL
+// From class CActive.
+// Function is called as a callback when the issued reading is completed.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionReader::RunL()
+    {
+    LOGS2( "%i, CUpnpTcpSessionReader::RunL(), iStatus %i",
+    		iSession.Id(), iStatus.Int() );
+
+    // Active object request complete handler
+    switch ( iStatus.Int() )
+        {
+        case KErrNone:
+           	iRetryErrorCount = 0;
+           	iCancelTimer->Cancel();
+
+            // Forward read data to HTTPSession 
+            iSession.ReceivingCompletedL( iReceiveBuffer );
+            break;
+            
+         case KErrCancel:
+            if(iCancelFromTimer) 
+                {          
+                IssueRead();
+                iCancelFromTimer = EFalse;
+                }
+            break;
+       
+        case KErrNoMemory:
+        case KErrNotReady:
+        case KErrInet6AddressExpired:
+            if( iRetryErrorCount < KMaxRetryErrors )
+	            {
+	        	iRetryTimer->Cancel();
+				iRetryTimer->After( KRetryWaitTime * ++iRetryErrorCount, EFalse );
+				break;
+	            }
+            
+        default:
+            iSession.HandleErrorL( iStatus.Int() );
+            break;
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::RunError
+// RunError is called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpTcpSessionReader::RunError( TInt aError )
+    {
+    LOGS2( "%i, CUpnpTcpSessionReader::RunError - %d"
+    		, iSession.Id(), aError);
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSessionReader::TimerEventL
+// Retry read
+// -----------------------------------------------------------------------------
+//        
+void CUpnpTcpSessionReader::TimerEventL( CUpnpNotifyTimer* aTimer )
+    {
+    if( aTimer == iCancelTimer )
+        {
+        iCancelFromTimer = ETrue;
+        iSocket.CancelRecv();
+        }
+    else if( aTimer == iRetryTimer )
+        {
+        IssueRead();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTcpSessionReader::StartCancelTimer
+// -----------------------------------------------------------------------------
+//  
+void CUpnpTcpSessionReader::StartCancelTimer()
+    {
+    TInt timeout = iSession.TimeoutCurrentValue();
+   	iCancelTimer->Cancel();
+   	
+   	timeout = timeout/2 - KTwoSec;
+   	if( timeout <= 0 ) timeout = KOneSec;
+   	
+	iCancelTimer->After( timeout, EFalse );
+    iCancelFromTimer = EFalse;
+    }
+   
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::IssueRead
+// Issues reading.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionReader::IssueRead()
+    {
+    LOGS1( "%i, CUpnpTcpSessionReader::IssueRead", iSession.Id());
+    // Initiate a new read from socket into iBuffer
+    if( IsActive() )
+        {
+        LOGS1( "%i, PANIC: CUpnpTcpSessionReader::IssueRead!", iSession.Id() );
+        User::Panic( _L("CUpnpTcpSessionReader is active" ), KErrGeneral );    
+        } 
+                                               
+    if( iSession.IsConnected() )
+        {
+      	LOGS1( "%i, CUpnpTcpSessionReader::IssueRead"
+          	, iSession.Id());
+          	
+        Deque();
+        CActiveScheduler::Add(this);
+          	
+        iReceiveBuffer.Zero();
+        
+        StartCancelTimer();
+
+        iSocket.RecvOneOrMore( iReceiveBuffer, 0, iStatus, iLen );   
+        SetActive();
+        }
+    }
+
+    
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/dlnawebserver/src/upnptcpsessionwriter.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,383 @@
+/** @file
+* 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:  CUpnpTcpSessionWriter is a class responsible for 
+*                   asynchronous writing to a socket owned by CUpnpTcpSession.
+*
+*/
+
+
+
+#include "upnptcpsession.h"
+#include "upnptcpsessionwriter.h" 
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+
+
+class CUpnpTcpWriteRequest : public CBase
+  	{
+public:
+  	static CUpnpTcpWriteRequest* NewL( const TDesC8& aBuffer )
+		    {
+		    CUpnpTcpWriteRequest* self = new (ELeave) CUpnpTcpWriteRequest();
+		    CleanupStack::PushL( self );
+		    self->ConstructL( aBuffer );
+		    CleanupStack::Pop();
+		
+		    return self;
+		    }
+    
+private:
+	  CUpnpTcpWriteRequest() {}
+	  void ConstructL( const TDesC8& aBuffer )
+		    {
+		    iBuffer.CreateL( aBuffer );
+		    }
+    
+public:
+  	TDesC8& Buffer()
+		    {
+		    return iBuffer;
+		    }
+  
+	  ~CUpnpTcpWriteRequest()
+		    {
+		    iBuffer.Close();
+		    }
+    
+private:
+  	RBuf8 iBuffer;
+  	};
+  
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::NewL
+// Factory method.
+// ---------------------------------------------------------------------------
+//
+CUpnpTcpSessionWriter* CUpnpTcpSessionWriter::NewL( CUpnpTcpSession& aSession,
+                                                    RSocket& aSocket,
+                                                    TThreadPriority aPriority )
+    {
+    CUpnpTcpSessionWriter* self = new ( ELeave ) 
+            CUpnpTcpSessionWriter( aSession, aSocket, aPriority );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::CUpnpTcpSessionWriter
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpTcpSessionWriter::CUpnpTcpSessionWriter( CUpnpTcpSession& aSession,
+                                              RSocket& aSocket, 
+                                              TThreadPriority aPriority )
+    :CActive( aPriority ),
+    iSocket( aSocket ),
+    iSession( aSession ),
+    iInitialPriority( aPriority )
+    {
+    LOGS1( "%i, CUpnpTcpSessionWriter::CUpnpTcpSessionWriter", iSession.Id() );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::TcpConstructL
+// Two-phased constructor
+// constructor that can leave. Used from derived classes.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionWriter::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    iState = ENotConnected;
+    iRetryWrite = CUpnpRetryWrite::NewL( iSession, iSocket, this, (TThreadPriority)Priority() );
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionReader::~CUpnpTcpSessionReader
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpTcpSessionWriter::~CUpnpTcpSessionWriter()
+    {
+    LOGS1( "%i, CUpnpTcpSessionWriter::~CUpnpTcpSessionWriter", iSession.Id() );
+    
+    Cancel();
+    iState = EDisconnected;
+    
+    iWriteRequestList.ResetAndDestroy();
+    iWriteRequestList.Close();
+  
+    iSendBuffer.Close();
+
+    delete iRetryWrite;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::IssueWriteL
+// Issues writing request if session is connected and the socket is not 
+// already sending. If metioned conditions are not met then it queues the request.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionWriter::IssueWriteL( const TDesC8& aBuffer )
+    {
+    LOGS1( "%i, CUpnpTcpSessionWriter::IssueWriteL(TDesC8&)", iSession.Id() );
+    
+    // Don't do anything because socket is already closed or we are writing already.
+    if( iState == EDisconnected || (iSession.DownloadOngoing() ) 
+        	|| (iSession.ShuttingDown() && iState != ENotConnected) )
+        return;
+    
+    // If session not connected yet or is already sending then queue the write request
+    if ( iState == ENotConnected || iState == EWriting )
+        {
+        CUpnpTcpWriteRequest* req = CUpnpTcpWriteRequest::NewL( aBuffer );
+        CleanupStack::PushL(req);
+        User::LeaveIfError(iWriteRequestList.Append( req ));
+        CleanupStack::Pop();
+        
+        LOGS2(  "%i, CUpnpTcpSessionWriter::IssueWriteL - queue size=%i,"
+                          , iSession.Id(), iWriteRequestList.Count() );
+        return;
+        }
+    
+    LOGS2( "%i, CUpnpTcpSessionWriter::IssueWriteL queue size=%i"
+                     , iSession.Id() , iWriteRequestList.Count() );
+                     
+    // If session already connected then just prepare sending buffer and request 
+    // send from socket
+
+    iSendBuffer.Close();
+    iSendBuffer.CreateL( aBuffer );
+    
+    /*if (Priority() == iInitialPriority)       
+        SetPriority( iInitialPriority - 5);       
+    else 
+        SetPriority( iInitialPriority); */
+        
+    Deque();
+    CActiveScheduler::Add(this);  
+    
+    iSocket.Write( iSendBuffer, iStatus );
+    iState = EWriting;  
+    
+    SetActive();
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::SessionConnected
+// Informs writer if session is connected. If it is then writer checks if there
+// are queued write requests. If there are any then it issues writing.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionWriter::SessionConnected( TBool aConnected )
+    {
+    LOGS2( "%i, CUpnpTcpSessionWriter::SessionConnected(),aConnected %i"
+    		, iSession.Id() , aConnected );
+    if( aConnected && iState == ENotConnected )
+        {
+        iState = EWaiting;
+        TRAP_IGNORE( SendNextWriteRequestL() );
+        }
+    else if( !aConnected && iState != ENotConnected )
+        {
+        Cancel();
+        iState = EDisconnected;
+        }
+    } 
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::HasWriteRequestsToSend
+// Returns true if there are any write requests queued.
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpTcpSessionWriter::HasWriteRequestsToSend()
+    {
+    return ( iWriteRequestList.Count() > 0 );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::IsWriting
+// Returns true if writer is writing data to the socket at the moment.
+// ---------------------------------------------------------------------------
+//          
+TBool CUpnpTcpSessionWriter::IsWriting()
+  {
+  return iState == EWriting;    
+  }
+  
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::DoCancel
+// From class CActive
+// Cancels issued writing request.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionWriter::DoCancel()
+    {
+    LOGS1( "%i, CUpnpTcpSessionWriter::DoCancel", iSession.Id() );
+    
+    // Cancel asychronous write request
+    iState = EWaiting;
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::RunL
+// From class CActive
+// Function called when issued writing is completed. Function checks if there
+// are any write requests left to send and if there are then it issues writing.
+// If queue is empty then function informs upper layer that writing is completed.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionWriter::RunL()
+    {
+    LOGS2( "%i, CUpnpTcpSessionWriter::RunL(), iStatus %i", 
+    		iSession.Id() , iStatus.Int() );
+    
+    // Active object request complete handler
+    if ( iStatus == KErrNone )
+        {
+        switch( iState )
+            {
+            // Character has been written to socket
+            case EWriting:
+                
+                if (Priority() == iInitialPriority)       
+                    SetPriority( iInitialPriority + 5);       
+                else 
+                    SetPriority( iInitialPriority); 
+                
+                // Change state because write request is finished already
+                iState = EWaiting;
+                if( HasWriteRequestsToSend() )
+                    SendNextWriteRequestL();
+                else
+                    iSession.WritingCompletedL();
+                break;
+            
+            default:
+                LOGS2( "%i, PANIC: CUpnpTcpSessionWriter::RunL, %i",
+                		iSession.Id() , iState );
+                User::Panic( _L("Writer::RunL"), iState );
+                break;
+            };
+        }
+    else
+        {
+			if( iState == EWriting && (iStatus.Int() == KErrNoMemory || iStatus.Int() == KErrNotReady ) )
+			{
+				iRetryWrite->IssueWriteRetry();
+       		}
+        else
+	        {
+
+				// Error: pass it up to session
+				iState = EWaiting;
+				iSession.HandleErrorL( iStatus.Int() );
+			}
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::RunError
+// RunError is called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpTcpSessionWriter::RunError( TInt aError )
+    {
+    LOGS2( "%i, CUpnpTcpSessionWriter::RunError %d"
+    		, iSession.Id() , aError);
+    return KErrNone;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::SendNextWriteRequestL
+// Function checks if there are any write requests left and if there are then
+// issues writing and removes this request from queue.
+// ---------------------------------------------------------------------------
+//
+void CUpnpTcpSessionWriter::SendNextWriteRequestL()
+    {
+    LOGS2( "%i, CUpnpTcpSessionWriter::SendNextWriteRequest(), iState %i",
+    		iSession.Id() , iState );
+    switch( iState )
+        {
+        case EWaiting:
+            // Write queued request
+            if ( iWriteRequestList.Count() > 0 )
+            		{
+                CUpnpTcpWriteRequest* req = iWriteRequestList[0];
+                if ( req )
+                    {
+                    iWriteRequestList.Remove(0);
+                    iWriteRequestList.Compress();
+                    CleanupStack::PushL( req );
+                    IssueWriteL( req->Buffer() );
+                    CleanupStack::PopAndDestroy( req );
+                    }
+            }
+            break;
+
+        case ENotConnected:
+        case EDisconnected:
+            LOGS2( "%i, PANIC: CUpnpTcpSessionWriter::SendNextWriteRequest, %i",
+            		iSession.Id() , iState );
+            User::Panic( _L("SendNext::ENotConnected or EDisconnected"), iState );
+            break;
+        }
+    }  
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::RetryWriteFailL
+//    
+// ---------------------------------------------------------------------------
+//    
+void CUpnpTcpSessionWriter::RetryWriteFailL( TInt aError )
+	{
+	// Error: pass it up to session
+	iSession.HandleErrorL( aError );
+	iState = EWaiting;
+	}
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::RetryWriteSucceed
+//    
+// ---------------------------------------------------------------------------
+//    
+void CUpnpTcpSessionWriter::RetryWriteSucceed()
+	{
+    if ( iSendBuffer.Length() == 0 ) return;
+    
+    Deque();
+    CActiveScheduler::Add(this);  
+    
+    iSocket.Write( iSendBuffer, iStatus );
+    iState = EWriting;         
+    
+    SetActive();
+	}
+
+// ---------------------------------------------------------------------------
+// CUpnpTcpSessionWriter::IsRetrying
+//    
+// ---------------------------------------------------------------------------
+//    
+TBool CUpnpTcpSessionWriter::IsRetrying()
+	{
+	return (iRetryWrite->IsStarted());
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,50 @@
+/** @file
+* 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:  Build info for the UPnP Stack subsystem
+*
+*/
+
+
+#include "../upnputils/inc/upnpcompvariant.hrh"
+#include "../../group/upnpplatformvar.hrh"
+
+PRJ_PLATFORMS
+WINSCW ARMV5
+//DEFAULT
+
+PRJ_EXPORTS
+../rom/upnpstack.iby CORE_MW_LAYER_IBY_EXPORT_PATH(upnpstack.iby)
+../rom/upnpstack_stub.iby CORE_MW_LAYER_IBY_EXPORT_PATH(upnpstack_stub.iby)
+//Stub SIS File to update upnpstack in future
+../data/upnpstack.sis /epoc32/data/z/system/install/upnpstack.sis
+../data/homemedia.sis /epoc32/data/z/system/install/homemedia.sis
+../conf/upnpstack.confml MW_LAYER_CONFML(upnpstack.confml)
+../conf/upnpstack_101f9784.crml MW_LAYER_CRML(upnpstack_101f9784.crml)
+
+PRJ_MMPFILES
+#include "../upnputils/group/bld.inf"
+#include "../upnpconnectionmanagersession/group/bld.inf"
+#include "../upnpconnmanager/group/bld.inf"  
+#ifdef RD_UPNP_REMOTE_ACCESS
+#include "../radasync/group/bld.inf"
+#include "../radaclient/group/bld.inf"
+#endif
+#include "../dlnawebserver/group/bld.inf"
+#include "../serviceframework/group/bld.inf"
+#include "../ssdpserver/group/bld.inf"
+#include "../messagehandler/group/bld.inf"
+#include "../controlpointbase/group/bld.inf"
+#include "../upnphttptransfer/group/bld.inf"
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,24 @@
+/** @file
+* 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:  Build info for the messagehandler component
+*
+*/
+
+PRJ_EXPORTS
+../inc/upnpmhcommon.h       |../../inc/upnpmhcommon.h
+../inc/upnpcustomlog.h      |../../../inc/upnpcustomlog.h
+
+PRJ_MMPFILES
+messagehandler.mmp
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/group/messagehandler.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/** @file
+* 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: 
+*     This is the project specification file for Upnp.
+*
+*/
+
+#include "../../../inc/upnpcompvariant.hrh"
+
+TARGETTYPE        exe
+
+#if defined(__HN_31__) || defined(__HN_32__)
+TARGET             hnmessagehandler.exe
+UID                0x1000008d 0x2000F881
+#else
+TARGET             messagehandler.exe
+UID                0x1000008d 0x10005BCD
+#endif
+
+CAPABILITY        CAP_SERVER NetworkControl
+VENDORID          VID_DEFAULT
+
+SOURCEPATH        ../src
+SOURCE            upnpmessagehandlerengine.cpp
+SOURCE            upnpmessagehandlersession.cpp
+SOURCE            upnpmessagehandler.cpp
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+SOURCE            upnpipfiltering.cpp
+SOURCE            upnpipfilteringdnsquery.cpp
+#endif
+
+SOURCE            upnpssdphandlerbase.cpp
+SOURCE            upnpssdphandlerdown.cpp
+SOURCE            upnpssdphandlerup.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   ../../../inc
+SYSTEMINCLUDE   ../../inc
+USERINCLUDE     ../inc
+
+LIBRARY                euser.lib
+LIBRARY                insock.lib
+LIBRARY                esock.lib
+
+#if defined(__HN_31__) || defined(__HN_32__)
+LIBRARY                hnipserversutils.lib
+LIBRARY                hnssdpserver.lib
+#else
+LIBRARY                upnpipserversutils.lib
+LIBRARY                ssdpserver.lib
+LIBRARY                upnpconnectionmanagersession.lib
+#endif
+
+// for the IAP query
+LIBRARY                commdb.lib
+// for logging
+LIBRARY                flogger.lib
+// for CDesCArrayFlat
+LIBRARY                bafl.lib
+//
+LIBRARY     ecom.lib
+LIBRARY     efsrv.lib
+
+//***IPFILTERING*/
+#ifdef RD_UPNP_REMOTE_ACCESS
+LIBRARY                estor.lib
+LIBRARY                upnpconnectionmanagersession.lib
+#endif
+//end of file
+
+VERSION 10.1
+
+paged
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpcustomlog.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,294 @@
+/** @file
+* 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:  Declares Logger Functions
+*
+*/
+
+
+
+
+
+#ifndef C_UPNPCUSTOMLOG_H
+#define C_UPNPCUSTOMLOG_H
+
+#include <flogger.h>
+#include <e32svr.h>
+
+// UPNP_LOG :
+//1 - logging, UDEB
+//0 - no logging, UREL
+
+//UPNP_FLOGGING = file logging, default in UDEB
+//UPNP_CLOGGING = console logging
+
+
+#ifndef _DEBUG
+    // UREL
+    #define UPNP_LOG  0   // No logging in UREL builds
+
+#else
+
+    // UDEB
+    #define UPNP_LOG  1
+    #define UPNP_FLOGGING //File logger
+    //#define UPNP_CLOGGING //console logger
+
+    _LIT(KEventLogFile, "EventActionLog.txt");
+    // If log file is not defined in CPP file, use UPnPStackLog as default
+    #ifndef KLogFile
+        #define KLogFile _L("UPnPStack.txt")
+    #endif
+
+#endif
+
+_LIT(KLogFolder,"upnp");
+const TInt KMaxLogLen = 256;
+//_LIT(KLogFile, LOG_FILE);
+
+// Writing some descriptor into log
+// LOGT(own_desc);
+//
+// Writing data into log
+// LOGS("My log string");
+//
+// Writing data with one decimal parameter
+// LOGS1("Log with decimal parameter %i", desimalValue);
+//
+// Writing data with one decimal and hexa parameter
+// LOGS2("Log with decimal and hexa parameters %i %x", desimalValue, hexaValue);
+//
+// Writing data with one descriptor and decimal parameters
+// LOGS2("String %S and decimal value %i", &stringData, decimalValue);
+//
+// Writing User::AllocSize
+// LOGM;
+
+#if UPNP_LOG == 1
+
+#ifdef UPNP_FLOGGING
+
+static void DoOutput(TDesC8& aData)
+    {
+    if(!aData.Length())
+        {
+        return;
+        }
+    RFileLogger logger;
+    logger.Connect();
+
+    logger.CreateLog( KLogFolder(), KLogFile, EFileLoggingModeAppend);
+    logger.Write( aData.Mid(0,(aData.Length()<KMaxLogLen)? aData.Length():KMaxLogLen) );
+
+    logger.CloseLog();
+    logger.Close();
+    }
+
+static void DebugStringNarrowL(const char* aFmt, ...)
+    {
+    VA_LIST args;
+    VA_START(args, aFmt);
+
+    TPtrC8 fmt(reinterpret_cast<const unsigned char *>(aFmt));
+
+    HBufC8* buf = HBufC8::NewLC(KMaxLogLen);
+
+    buf->Des().FormatList(fmt, args);
+    DoOutput(*buf);
+
+    VA_END(args);
+    CleanupStack::PopAndDestroy(buf);
+    }
+
+static void DebugStringWideL(const char* aFmt, ...)
+    {
+    VA_LIST args;
+    VA_START(args, aFmt);
+
+    TPtrC8 fmt(reinterpret_cast<const unsigned char *>(aFmt));
+
+    HBufC* fmt16 = HBufC::NewLC(fmt.Length());
+    fmt16->Des().Copy(fmt);
+
+    HBufC* buf = HBufC::NewLC(KMaxLogLen);
+    TPtrC pointer = fmt16->Des() ;
+    buf->Des().FormatList(pointer, args);
+
+    HBufC8* buf8 = HBufC8::NewLC(buf->Length());
+    buf8->Des().Copy(*buf);
+
+    DoOutput(*buf8);
+
+    VA_END(args);
+
+    CleanupStack::PopAndDestroy(buf8);
+    CleanupStack::PopAndDestroy(buf);
+    CleanupStack::PopAndDestroy(fmt16);
+    }
+
+
+static void DebugBufferL(const TDesC8& aBuf)
+    {
+    DebugStringNarrowL("\"%S\"", &aBuf);
+    }
+
+static void DebugBufferL(const TDesC& aBuf)
+    {
+    DebugStringWideL("\"%S\"", &aBuf);
+    }
+
+static void DebugTimeL()
+    {
+    TTime time;
+    time.UniversalTime();
+
+    TBuf<64> dateTimeString;
+
+    _LIT(KTimeString, "%-B%:0%J%:1%T%:2%S%.%*C4%:3%+B");
+    time.FormatL(dateTimeString, KTimeString);
+    DebugBufferL(dateTimeString);
+
+    }
+
+
+// ------------ Content Directory logging specific ---------------
+_LIT(KInfoFormatString, "INFO#%S#%S#%d#%S");
+_LIT(KErrFormatString, "ERROR#%S#%S#%d#%S");
+
+static void LOGCD(const char* aInFunction, const char* aCalledFunction, TInt aErrorCode, const char* aComment)
+{
+    // Transforming parameters from 'const char *' into 'HBufC'
+    TPtrC8 InFunction8(reinterpret_cast<const unsigned char *>(aInFunction));
+    HBufC* InFunction16 = HBufC::NewLC(128);
+    InFunction16->Des().Copy(InFunction8);
+
+    TPtrC8 CalledFunction8(reinterpret_cast<const unsigned char *>(aCalledFunction));
+    HBufC* CalledFunction16 = HBufC::NewLC(128);
+    CalledFunction16->Des().Copy(CalledFunction8);
+
+    TPtrC8 Comment8(reinterpret_cast<const unsigned char *>(aComment));
+    HBufC* Comment16 = HBufC::NewLC(128);
+    Comment16->Des().Copy(Comment8);
+
+    // preparing main 16bit buffer
+    HBufC* buf = HBufC::NewLC(KMaxLogLen);
+
+    // formating all together in 16bit descriptor
+    if(aErrorCode < 0)
+    {
+        buf->Des().Format(KErrFormatString, &*InFunction16, &*CalledFunction16, aErrorCode, &*Comment16);
+    }
+    else
+    {
+        buf->Des().Format(KInfoFormatString, &*InFunction16, &*CalledFunction16, aErrorCode, &*Comment16);
+    }
+
+    // converting 16bit descriptor into 8bit one
+    HBufC8* buf8 = HBufC8::NewLC(buf->Length());
+    buf8->Des().Copy(*buf);
+
+    // main file logging
+    DoOutput(*buf8);
+
+    // cleaning
+    CleanupStack::PopAndDestroy(buf8);
+    CleanupStack::PopAndDestroy(buf);
+    CleanupStack::PopAndDestroy(Comment16);
+    CleanupStack::PopAndDestroy(CalledFunction16);
+    CleanupStack::PopAndDestroy(InFunction16);
+}
+
+
+    #define LOGTIME DebugTimeL()
+    #define LOG(x) DebugStringNarrowL x
+    #define LOG8(x) DebugStringNarrowL x
+    #define LOG16(x) DebugStringWideL x
+
+    #define LOGT(A)
+    #define LOGS(A)      LOG16((A))
+    #define LOGS1(A,B)   LOG16((A,B))
+    #define LOGS2(A,B,C) LOG16((A,B,C))
+    #define LOGM
+
+    #define LOGTH(H,A)       LOGT(A)
+    #define LOGSH(H,A)       LOGS(A)
+    #define LOGS1H(H,A,B)    LOGS1(A,B)
+    #define LOGS2H(H,A,B,C)  LOGS2(A,B,C)
+
+    #define ACTIONSEND(A)
+    #define ACTIONRECV(A,B)
+
+static void LOGSQL(const char* aInFunction, const char* aCalledFunction, TInt aErrorCode, const TDesC* aCommand)
+{
+    LOGCD(aInFunction, aCalledFunction, aErrorCode, "SQL Command:");
+
+    // log whole sql command separately
+    LOGS1("%S", aCommand);
+}
+
+
+
+#else     // UPNP_CLOGGING = console logging
+    #define LOGS(A)      RDebug::Print(_L(A));
+    #define LOGS1(A,B)   RDebug::Print(_L(A),B);
+    #define LOGS2(A,B,C) RDebug::Print(_L(A),B,C);
+
+    #define LOGT(A)
+    #define LOGM
+    #define ACTIONSEND(A)
+    #define ACTIONRECV(A,B)
+
+    #define LOGTH(H,A)       LOGT(A)
+    #define LOGSH(H,A)       LOGS(A)
+    #define LOGS1H(H,A,B)    LOGS1(A,B)
+    #define LOGS2H(H,A,B,C)  LOGS2(A,B,C)
+    #define LOGCD(A,B,C,D)
+    #define LOGSQL(A,B,C,D)
+
+    #define LOGTIME
+    #define LOG(x)
+    #define LOG8(x)
+    #define LOG16(x)
+
+
+#endif //UPNP_LOG == 1
+
+#else // UPNP_LOG == 0 or invalid
+    #define LOGT(A)
+    #define LOGS(A)
+    #define LOGS1(A,B)
+    #define LOGS2(A,B,C)
+    #define LOGM
+    #define ACTIONSEND(A)
+    #define ACTIONRECV(A,B)
+
+    #define LOGTH(H,A)
+    #define LOGSH(H,A)
+    #define LOGS1H(H,A,B)
+    #define LOGS2H(H,A,B,C)
+
+    #define LOGCD(A,B,C,D)
+    #define LOGSQL(A,B,C,D)
+
+    #define LOGTIME
+    #define LOG(x)
+    #define LOG8(x)
+    #define LOG16(x)
+
+#endif // UPNP_LOG
+
+#define LOG_FUNC_NAME LOGS( __PRETTY_FUNCTION__ )
+
+#endif // C_UPNPCUSTOMLOG_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpipfiltering.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,161 @@
+/** @file
+* 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:  
+*
+*/
+
+
+#ifndef C_CUPNPIPFILTERING_H
+#define C_CUPNPIPFILTERING_H
+
+#include <e32cmn.h>
+#include <in_sock.h>
+#include <ES_SOCK.H>
+#include <CommDbConnPref.h>
+
+#include "upnpmessagehandlerengine.h"
+#include "upnpmessagehandlerengineobserver.h"
+#include "upnpconnectionmanagerproxy.h"
+
+class CUpnpIPFilteringDNSQuery;
+
+class CUpnpIPFiltering : public CBase
+    {
+
+public:
+   /**
+    * Two-phased constructor.
+    * @param aSocketServer 
+    * @param aIap an interface numbe which going to be use for connection
+    * @param aObserver
+    */
+    static CUpnpIPFiltering* NewL( RSocketServ& aSocketServer, TInt aIap,
+                                   MMessageHandlerEngineObserver& aObserver );
+    /**
+    * Two-phased constructor.
+    * @param aSocketServer 
+    * @param aIap an interface numbe which going to be use for connection
+    * @param aObserver
+    */
+    static CUpnpIPFiltering* NewLC( RSocketServ& aSocketServer, TInt aIap,
+                                    MMessageHandlerEngineObserver& aObserver );
+
+    /**
+    * Destructor.
+    */
+    virtual ~CUpnpIPFiltering();
+
+    /**
+    * Adds address to the whitelist
+    * @since S60 v3.2
+    * @param aAddress anaddress which going to be addres to the list
+    * @return KErrNone if succesfully added or index number if already exist on list
+    */
+    TInt AddAddressL( const TInetAddr& aAddress );
+
+    /**
+    * Adds address to the whitelist
+    * @since S60 v3.2
+    * @param aQuery query to DNS server
+    */
+    void AddAddressL( CUpnpIPFilteringDNSQuery* aQuery  );
+    
+    
+    /**
+    * Removes address from the whitelist
+    * @since S60 v3.2
+    * @param aAddress anaddress which going to be removed
+    * @return KErrNone if succesfully removed
+    */
+    TInt RemoveAddressL( const TInetAddr& aAddress );
+
+    /**
+    * Removes address from the whitelist
+    * @since S60 v3.2
+    * @param aQuery query to DNS server
+    * @return KErrNone if succesfully removed
+    */
+    void RemoveAddressL( CUpnpIPFilteringDNSQuery* aQuery  );
+    
+    /**
+    * Removes all addressses from the list
+    *
+    */
+    TInt RemoveAll( );
+
+    /**
+    * Checks if address is on the whitelist
+    * @since S60 v3.2
+    * @param aAddress an address to be checked
+    * @return True if address is on whitelist
+    */
+    TBool  IsAllowed( const TInetAddr& aAddress ) const;
+   
+    /**
+    * Counts object on the whitelist
+    * @since S60 v3.2
+    * @return number of addresses on the list
+    */
+    TInt Count() const;
+     
+    /**
+    * 
+    * @since S60 v3.2
+    * @return list of addresses
+    */
+    const TDesC8& GetIPFilterList( );
+     
+    /**
+    * Completes asynchronous DNS request, and removes it from the procesed list
+    */
+    void RequestCompleted( CUpnpIPFilteringDNSQuery* iQuery );
+    
+    
+    /**
+    * Callback if there are changes on the list
+    */ 
+    void IPListChange();
+     
+private:
+
+
+    CUpnpIPFiltering( RSocketServ& aSocketServer, TInt aIap,
+                      MMessageHandlerEngineObserver& aObserver );
+
+    void ConstructL( RSocketServ& aSocketServer );
+
+    
+    TInt FindInList( const TInetAddr& aAddress ) const;
+    
+    void IPList2Des8L();
+    
+private: 
+
+
+    RArray<TInetAddr> iAllowedIPsList;  //owned
+    
+    RSocketServ& iSockServ;             //not owned
+    
+    CUpnpConnectionManagerProxy* iConnectionManagerProxy; //owned
+    
+    TInt iActiveIap;    
+    
+    RBuf8 iListBuf;                     //owned
+    
+    RPointerArray<CUpnpIPFilteringDNSQuery> iDNSQueriesList; //owned
+    
+    MMessageHandlerEngineObserver& iObserver;//not owned - changes on the list
+    };
+
+#endif // C_CUPNPIPFILTERING_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpipfilteringdnsquery.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,133 @@
+/** @file
+* 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:  
+*
+*/
+
+
+#ifndef C_CUPNPIPFILTERINGDNSQUERY_H
+#define C_CUPNPIPFILTERINGDNSQUERY_H
+
+#include <e32cmn.h>
+#include <in_sock.h>
+#include <ES_SOCK.H>
+
+#include "upnpipfiltering.h"
+
+ /**
+ *  Encapsulates DNS query
+ *
+ *  @since S60 v3.2
+ */
+class CUpnpIPFilteringDNSQuery : public CActive
+    {
+
+private:
+
+    enum TActionType
+        {
+        EAddAddress,
+        ERemoveAddress,
+        };
+
+public:
+    /**
+    * Two-phased constructor.
+    * @param aMessage a messagy which will ber cmpleted when queris resoves name
+    * @param aRemoteName a name to be resolved by DNS server
+    */
+    static CUpnpIPFilteringDNSQuery* NewL( const RMessage2& aMessage, 
+                                           const TDesC8& aRemoteName );
+     
+    /**
+    * Two-phased constructor.
+    * @param aMessage a messagy which will ber cmpleted when queris resoves name
+    * @param aRemoteName a name to be resolved by DNS server
+    */
+    static CUpnpIPFilteringDNSQuery* NewLC( const RMessage2& aMessage, 
+                                            const TDesC8& aRemoteName );
+
+    /**
+    * Destructor.
+    */
+    virtual ~CUpnpIPFilteringDNSQuery();
+    
+    /**
+    * Marks current query as addAddress
+    */    
+    void AddAddress( );
+    
+    /**
+    * Marks current query as removeAddress
+    */    
+    void RemoveAddress( );
+    
+    /**
+    * Starts to process current query
+    * @param 
+    * @param aConnection an network interface which will be used during queries
+    * @param aListOwner here we store results of queries
+    */    
+    void StartDNSQuery( RSocketServ& aSockServ, RConnection& aConnection , 
+                        CUpnpIPFiltering* aListOwner ); 
+    
+public://from CActive
+     
+    /**
+    * Completes with query result
+    */
+    void RunL();    
+    
+    /**
+    * Handels leaves from RunL method
+    */
+    TInt RunError( TInt aError );
+   
+    
+private:
+    /**
+    * Constructor
+    */
+    CUpnpIPFilteringDNSQuery( const RMessage2& aMessage );
+
+    /**
+    * Two-phased constructor.
+    */
+    void ConstructL( const TDesC8& aRemoteName );
+    
+    void RequestCompleted( TInt aStatus );
+    
+    /**
+    * Evaluates query result
+    */
+    TInt Status( TInt aStatus );
+    
+private://from CActive
+    
+    void DoCancel();
+
+private: 
+
+    RHostResolver iHostResolver;        //owned
+    TActionType iAction;
+    RBuf iRemoteName;                   //owned
+    TNameEntry iAddrDetails;
+    
+    TInt iDNSStatus;
+    const RMessage2 iMessage;           //not owned
+    
+    CUpnpIPFiltering* iIPListOwner;     //not owned
+    };
+
+#endif // C_CUPNPIPFILTERINGDNSQUERY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpmessagehandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,163 @@
+/** @file
+ * 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: 
+ *     Declares MessageHandler Class
+ *
+ */
+
+#ifndef C_CUPNPMESSAGEHANDLER_H
+#define C_CUPNPMESSAGEHANDLER_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include "upnpmessagehandlerengineobserver.h"
+#include "upnpmessagehandler.pan"
+#include "upnpmessagehandlerobserver.h"
+#include <upnpsymbianserverbase.h>
+
+
+// FORWARD DECLARATIONS
+
+class CUpnpMessageHandlerEngine;
+
+// CLASS DECLARATION
+
+/**
+ *brief The main class of Message Handler.
+ * 
+ * An instance of class CUpnpMessageHandler is the main server class. Message Handler
+ * is used to send and receive SSDP messages. CUpnpMessageHandler owns 
+ * CUpnpMessageHandlerEngine object that is used as engine class of main functionalities 
+ * of Message Handler.
+ */
+
+class CUpnpMessageHandler : public CUpnpSymbianServerBase,
+    public MMessageHandlerEngineObserver
+    {
+public:
+    // New methods
+
+    /**
+     * Create a CUpnpMessageHandler object using two phase construction,
+     * and return a pointer to the created object, leaving a pointer to the
+     * object on the cleanup stack
+     * @result pointer to created CUpnpMessageHandler object
+     */
+    static CUpnpSymbianServerBase* NewLC();
+
+    /**
+     * Destroy the object and release all memory objects
+     */
+    ~CUpnpMessageHandler();
+
+    /**
+     * Informs every Observer (every session) that the device list has changed
+     */
+    void DeviceListUpdateL();
+
+    /**
+     * Add Observer (session) to the list
+     */
+    void AddObserverL( MMessageHandlerObserver* aObserver );
+
+    /**
+     * Removes Observer (session) from list
+     */
+    void RemoveObserver( MMessageHandlerObserver* aObserver );
+
+    /**
+     * Tests if SSDP servers are started
+     */
+    TBool IsSsdpStarted();
+
+    /**
+     * Getter of starting error
+     */
+    TInt StartingError();
+
+    /**
+     * Setter of SSDP state
+     */
+    void SetSsdpStarted( TBool aStarted );
+
+private:
+    // New methods
+
+    /**
+     * Performs the first phase of two phase construction 
+     */
+    CUpnpMessageHandler();
+
+    /**
+     * Performs the second phase construction of a CUpnpMessageHandler object
+     */
+    void ConstructL();
+
+    /**
+     * callback from observer
+     */
+    void IPListChange(); 
+	
+	/**
+     * Returns sessions
+     */
+    TDblQueIter< CSession2 >& Sessions();
+
+private:
+    // From CServer
+
+    /**
+     * Create a time server session, and return a pointer to the created object
+     * @param aVersion the client version 
+     * @result pointer to new session
+     */
+    CSession2 * NewSessionL( const RMessage2& aMessage ) const;
+
+private: // from CUpnpSymbianServerBase
+    
+    /**
+     * Return name of a server
+     * @result name of a server
+     */
+    const TDesC& ServerName() const;
+
+    /**
+     * Returns version that is supported by this server.
+     */
+    virtual TVersion SupportedVersion() const;
+
+    /**
+     * Process any errors
+     * @param aError the leave code reported.
+     * @result return KErrNone if leave is handled
+     */
+    TInt RunError( TInt aError );
+
+private:
+
+	// pointer to engine
+    CUpnpMessageHandlerEngine* iEngine;
+
+	// observers array
+    RPointerArray<MMessageHandlerObserver> iObservers;
+
+	// starting flag
+    TBool iSsdpStarted;
+
+	// start error flag
+    TInt iStartingError;
+    };
+
+#endif // C_CUPNPMESSAGEHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpmessagehandler.pan	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+/** @file
+* 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 __MESSAGEHANDLER_PAN__
+#define __MESSAGEHANDLER_PAN__
+
+/** Panic Category */
+_LIT(KMessageHandler, "MessageHandler");
+
+/** MessageHandler panic codes */
+enum TMessageHandlerPanic
+    {
+    EMessageHandlerBadRequest = 1,
+    EMessageHandlerBadDescriptor = 2,
+    EMessageHandlerSrvCreateServer = 3,
+    EMessageHandlerMainSchedulerError = 4,
+    EMessageHandlerCreateTrapCleanup = 5,
+    EMessageHandlerSrvSessCreateTimer = 6,
+    EMessageHandlerReqAlreadyPending = 7,		//	A request is already pending
+    EMessageHandlerDifferencesInIap = 8,
+    EMessageHandlerBadState = 9,
+    EMessageHandlerRemoveNonExistingCp = 10
+    };
+
+#endif // __MESSAGEHANDLER_PAN__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpmessagehandlerengine.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,271 @@
+/** @file
+ * 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:  Defines MessageHandlerEngine class
+ *
+ */
+
+#ifndef C_CUPNPMESSAGEHANDLERENGINE_H
+#define C_CUPNPMESSAGEHANDLERENGINE_H
+
+// INCLUDES
+#include <upnpnetworkeventobserver.h>
+#include "upnpdevicelibrary.h"
+#include "upnphttpmessage.h"
+#include "upnphttpserverobserver.h"
+#include "upnpssdpserverobserver.h"
+#include "upnpmessagehandlersession.h"
+#include "upnpmessagehandlerengineobserver.h"
+#include "upnpcompvariant.hrh"
+
+// LITERALS
+
+static const TInt KSSDPAddressLength=40;
+_LIT( KMessagehandlerPanic, "UPnP messagehandler Panic" );
+_LIT8( KEmptyMessage, " " );
+_LIT8( KMulticastPacket, " " );
+
+// FORWARD DECLARATIONS
+class CUpnpHttpServer;
+class CUpnpSsdpServer;
+class MMessageHandlerEngineObserver;
+class CUpnpMSearchTimer;
+class CUpnpConnectionManagerProxy;
+class CUpnpSsdpHandlerBase;
+class CUpnpSsdpHandlerUp;
+class CUpnpSsdpHandlerDown;
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+class CUpnpIPFiltering;
+#endif
+
+// CLASS DECLARATION
+
+/*! 
+ \brief The UPnP engine of Message Handler
+ 
+ The message handler is divided into three modules: 
+ CUpnpMessageHandler (having the server functionality), 
+ CUpnpMessageHandlerSession (having the session functionality) and 
+ CUpnpMessageHandlerEngine (having the actual message handling engine).
+
+ Thus, this class represents the engine of the message handling. 
+ 
+ */
+class CUpnpMessageHandlerEngine : public CBase,
+    public MUpnpDeviceLibraryObserver, public MUpnpSsdpServerObserver,
+    public MUpnpNetworkEventObserver
+    {
+private:
+    enum TMessagehandlerPanics
+        {
+        ENullDeviceLibrary,
+        ENullSsdpServer,
+        };
+public:
+
+    /**
+     A two-phased constructor function
+     @param aObserver to observe engine
+     @result A new instance of CUpnpMessageHandlerEngine
+     */
+    static CUpnpMessageHandlerEngine* NewL(
+        MMessageHandlerEngineObserver& aObserver );
+    
+    /** 
+     Destructor function
+     */
+    virtual ~CUpnpMessageHandlerEngine();
+
+public:
+
+    /**
+     Starts ssdp
+     @result error
+     */
+    TInt StartSsdpL();
+
+    /**
+     This function is called from SSDP server after receiving a SSDP message
+     @param aMessage The SSDP message that is just received
+     @result None.
+     */
+    void SsdpEventL( CUpnpSsdpMessage* aMessage );
+    
+    /**
+     * Returns device library     
+     */
+    CUpnpDeviceLibrary* DeviceLibrary();
+    
+    /**
+     Adds a new local device to the device library
+     @param aDevice A structure containing indexes to the data buffer
+     @param aBuffer A data buffer containing the actual information
+     @result KErrNone or one of the system-wide error codes
+     */
+    TInt AddLocalDeviceL( TUpnpAddLocalDevice& aDevice, TDesC8& aBuffer );
+
+    /**
+     Removes a local device from the device library
+     @param aUuid UUID of the target device
+     @result None.
+     */
+    void RemoveLocalDeviceL( const TDesC8& aUuid, TBool aSilent );
+
+    /**
+     Adds a new local control point client
+     */
+    TInt AddLocalControlPoint();
+
+    /**
+     Removes a local control point client
+     */
+    TInt RemoveLocalControlPoint();
+    
+    /**
+     It stops using filtering for a target device
+     @param aUuid UUID of the target device
+     @result None.
+     */
+    void StopFilteringDeviceL( const TDesC8& aUuid );
+
+    /**
+     Returns the device library elements in a pointer array
+     @result A pointer to an array containing pointers to the device library 
+     elements
+     */
+    RPointerArray<CUpnpDeviceLibraryElement>& DeviceList();
+
+    /**
+     callback method
+     */
+    void InterfaceDown();
+           
+public:
+    // From MUpnpDeviceLibraryObserver
+
+    /**
+     Implementation of MUpnpDeviceLibraryObserver::AdvertiseDevice). 
+     
+     Advertises a device using SSDP server to 
+     send SSDP advertisements to the network.
+     @param aLive Tells whether to use ssdp:alive or ssdp:byebye
+     @param anElement The device to advertise
+     @result None.
+     */
+    void AdvertiseDeviceL( TInt aLive, CUpnpDeviceLibraryElement& aElement );
+
+    /** 
+     Returns the id of the active IAP. 
+     @result The id of the IAP
+     */
+    TInt ActiveIap() const;
+
+    /**
+     Makes a SSDP search.
+     @param aSearchString The SSDP search string, that is placed to the 
+     ST header of the SSDP message.
+     @result None.
+     */
+    void SsdpSearchL( TDesC8& aSearchString, TDesC8& aMX );
+
+    /**
+     Inform observer that device list changed.
+     @result None.
+     */
+    void DeviceListChangedL();
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+    void AddAddressL( const TInetAddr& aAddress );
+    void AddAddressL( const RMessage2& aMessage, const TDesC8& aRemoteName );
+    void RemoveAddressL( const TInetAddr& aAddress );
+    void RemoveAddressL( const RMessage2& aMessage, const TDesC8& aRemoteName );
+    void RemoveAll();
+    void StartIPFiltering();
+    void StopIPFiltering();
+    TBool IsIPFilteringStarted() const;
+    TBool IsIPAllowed( const TInetAddr& aAddress ) const;
+    void IPFilteringStatus( TInt& aListSize ) const;
+    const TDesC8& GetIPFilterList();
+#endif
+
+private:    // from MUpnpNetworkEventObserver
+
+    /**
+     * It is called from bottom layer when network event occurs [callback method]     
+     * @result None
+     */
+    void NetworkEvent( CUpnpNetworkEventBase* aEvent );
+
+private:
+
+    /**
+     Default constructor.
+     @param aObserver to observe engine
+     @param aHandle the message handler thread log handle
+     */
+    CUpnpMessageHandlerEngine( MMessageHandlerEngineObserver& aObserver );
+
+    /**
+     Default (leaving) constructor.
+     */
+    void ConstructL();
+
+    /**
+     Create session id property and signal id semaphore.
+     */
+    void CreateSessionIdPropertyL();
+
+    /**
+     * Callback function used to inform about the timer events
+     */
+    void TimerEventL( CUpnpNotifyTimer* aTimer );
+
+private:
+    // current state of ssdp servers
+    CUpnpSsdpHandlerBase* iCurrentSsdpHandler;
+
+    // ssdp up and runnig state handler 
+    CUpnpSsdpHandlerUp* iSsdpHandlerUp;
+
+    // ssdp stopped state handler     
+    CUpnpSsdpHandlerDown* iSsdpHandlerDown;
+
+    // The device library 
+    CUpnpDeviceLibrary* iDeviceLibrary;
+
+    // The active socket server connection 
+    RSocketServ iSocketServ;
+
+    // The MessageHandler observer 
+    MMessageHandlerEngineObserver& iObserver;
+
+    // True if SSDP server is ready for shutdown 
+    TBool iSsdpReadyForShutdown;
+
+    //Local control points counter 
+    TInt iCPCounter;
+
+    // Object used for WLAN lost and address change events and getting local address
+    CUpnpConnectionManagerProxy *iConnectionManagerProxy;
+    
+    // session id access semaphore
+    RSemaphore iAccessSemaphore;
+    
+#ifdef RD_UPNP_REMOTE_ACCESS    
+    //Local control points counter 
+    CUpnpIPFiltering* iIPFilterRepository;
+#endif    
+    };
+
+#endif // C_CUPNPMESSAGEHANDLERENGINE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpmessagehandlerengineobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/** @file
+* 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: 
+*    
+*
+*/
+
+
+#ifndef C_MUPNPMESSAGEHANDLERENGINEOBSERVER_H
+#define C_MUPNPMESSAGEHANDLERENGINEOBSERVER_H
+
+#include <e32base.h>
+
+#include <badesca.h>
+#include "upnpmessagehandlerengine.h"
+
+
+class CUpnpMessageHandlerEngine;
+
+
+class MMessageHandlerEngineObserver
+    {
+public:
+
+    virtual void DeviceListUpdateL() = 0;
+    
+    /****IPFIltering***/
+    
+    virtual void IPListChange() = 0;
+    /*******/
+    
+    // return symbian server session array
+    virtual TDblQueIter< CSession2 >& Sessions() = 0;
+    };
+
+#endif //C_MUPNPMESSAGEHANDLERENGINEOBSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpmessagehandlerobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+/** @file
+* 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: 
+*    
+*
+*/
+
+
+#ifndef C_MUPNPMESSAGEHANDLEROBSERVER_H
+#define C_MUPNPMESSAGEHANDLEROBSERVER_H
+
+#include <e32base.h>
+
+#include <badesca.h>
+#include "upnpmessagehandler.h"
+
+
+class CUpnpMessageHandler;
+
+
+class MMessageHandlerObserver
+    {
+public:
+    virtual void DeviceListChangeL() = 0;
+    
+    /*   IPFIltering */
+    
+    virtual void IPListChange() = 0;
+    /*****************/
+    
+    };
+#endif //C_MUPNPMESSAGEHANDLEROBSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpmessagehandlersession.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,261 @@
+/** @file
+ * 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:  defines MessageHandlerSession class
+ *
+ */
+
+#ifndef C_CUPNPMESSAGEHANDLERSESSION_H
+#define C_CUPNPMESSAGEHANDLERSESSION_H
+
+// INCLUDES
+
+#include <e32base.h>
+
+#include "upnpmessagehandler.h"
+#include "upnpcommonstructs.h"
+#include "upnpmhcommon.h"
+#include "upnpmessagehandlerobserver.h"
+
+static const TInt KMaxUuidLength=43;
+// FORWARD DECLARATIONS
+
+class CUpnpHttpMessage;
+class MMessageHandlerObserver;
+class CUpnpMessageHandler;
+class CUpnpMessageHandlerEngine;
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+class CUpnpIPFiltering;
+#endif
+
+// CLASS DECLARATION
+
+/** 
+ An instance of class CUpnpMessageHandlerSession is created for each client
+ */
+
+class CUpnpMessageHandlerSession : public CSession2,
+    public MMessageHandlerObserver
+    {
+
+public:
+    // New methods
+
+    /**
+     Create a CUpnpMessageHandlerSession object using two phase construction,
+     and return a pointer to the created object
+     @param aClient client's thread
+     @param aServer the message handler server
+     @param aEngine the message handler engine
+     @param aHandle the message handler thread log handle
+     @result pointer to new session
+     */
+    static CUpnpMessageHandlerSession* NewL( CUpnpMessageHandler& aServer,
+        CUpnpMessageHandlerEngine& aEngine );
+
+    /**
+     Create a CUpnpMessageHandlerSession object using two phase construction,
+     and return a pointer to the created object
+     (leaving a pointer to the object on the cleanup stack)
+     @param aClient client's thread
+     @param aServer the message handler server
+     @param anEngine the message handler engine
+     @param aHandle the message handler thread log handle
+     @result pointer to new session
+     */
+    static CUpnpMessageHandlerSession* NewLC( CUpnpMessageHandler& aServer,
+        CUpnpMessageHandlerEngine& anEngine );
+
+    /**
+     Destroy the object and release all memory objects
+     */
+    virtual ~CUpnpMessageHandlerSession();
+    
+    /**
+     Callback method
+     @result None
+     */
+    void DeviceListChangeL();
+    
+    /**
+     Cancells outstanding requests
+     @result None
+     */
+    void CancelPendingRequests();
+
+public:
+    // From CSession
+    TInt EventStartSsdpL();
+
+    /**
+     Called after a service request from client; from class CSession
+     @param aMessage message from client (containing requested operation and any data)
+     @result None.
+     */
+    void ServiceL( const RMessage2& aMessage );
+
+private:
+    // New methods
+
+    /**
+     Is Ssdp stateted ? 
+     */
+    void EventCheckErrorL( const RMessage2& aMessage );
+
+    /**
+     Perform the first phase of two phase construction 
+     @param aServer the message handler server
+     @param aEngine the message handler engine
+     @param aHandle the message handler thread log handle
+     @result None.
+     */
+    CUpnpMessageHandlerSession( CUpnpMessageHandler& aServer,
+        CUpnpMessageHandlerEngine& anEngine );
+
+    /**
+     Perform the second phase construction of a CUpnpMessageHandlerSession object
+     @result None.
+     */
+    void ConstructL();
+
+    /**
+     Causes the client thread to panic
+     @param panic code
+     */
+    void PanicClient( const RMessage2& aMessage, TInt aPanic ) const;
+
+private:
+
+    // functions for various events from client
+
+    /**
+     This function is called when a dispatcher has requested that a local device 
+     should be added to the device library. 
+     @param aMessage The inter-process message we've got
+     @result None.
+     */
+    void EventAddLocalDeviceL( const RMessage2& aMessage );
+
+    /**
+     This function is called when a dispatcher has requested that a local device 
+     should be removed from the device library. 
+     @param aMessage The inter-process message we've got
+     @result None.
+     */
+    void EventRemoveLocalDeviceL( const RMessage2& aMessage, TBool aSilent );
+
+    /**
+     This function is called when a dispatcher has requested that a local control point
+     should be added. 
+     */
+    void EventAddLocalControlPoint( const RMessage2& aMessage );
+
+    /**
+     This function is called when a dispatcher has requested that a local control point
+     should be removed. 
+     */
+    void EventRemoveLocalControlPoint( const RMessage2& aMessage );
+
+    /**
+     This function is called when a dispatcher has requested that device notifications
+     should not be filtered by ssdp server. 
+     */
+    void EventStopFilteringDeviceL( const RMessage2& aMessage );
+
+    /**
+     This function is called when a dispatcher has requested that it would like 
+     to get a list of updated devices. This is the second phase of device list update.
+     @param aMessage The inter-process message we've got
+     @result None.
+     */
+    void EventGetDeviceListL( const RMessage2& aMessage );
+
+    /**
+     This function is called when a dispatcher has requested that it would like 
+     to get the actual list of updated devices; this is the first phase of device 
+     list update.
+     @param aMessage The inter-process message we've got
+     @result None.
+     */
+    void EventGetDeviceListSizeL( const RMessage2& aMessage );
+
+    /**
+     This function is called when a dispatcher has requested that it would like 
+     to get the id of the active iap.
+     @param aMessage The inter-process message we've got
+     @result None.
+     */
+    void EventActiveIapL( const RMessage2& aMessage ) const;
+
+    /**
+     This function is called when a dispatcher has requested that a ssdp search should be done.
+     @param aMessage The inter-process message we've got
+     @result None.
+     */
+    void EventSsdpSearchL( const RMessage2& aMessage );
+
+    void CompletePendingRequest();
+
+    void CopyMessage( RMessage2& aMessage );
+
+    void EventAddFilterAddrByIpL( const RMessage2& aMessage );
+    void EventAddFilterAddrByHostnameL( const RMessage2& aMessage );
+    void EventRemoveFilterAddrByIpL( const RMessage2& aMessage );
+    void EventRemoveFilterAddrByHostnameL( const RMessage2& aMessage );
+    void EventRemoveAllIPsAddressesL( const RMessage2& aMessage );
+    TBool EventIsIPAddressAllowedL( const RMessage2& aMessage );
+    void EventSubscriveIPListChanges( RMessage2& aMessage );
+    void EventCancelIPListSubscription( const RMessage2& aMessage );
+    void EventGetIPFilterListL( const RMessage2& aMessage );
+    void IPListChange();//from observer
+
+private:
+
+    /* @var iAwaitingUpdateDevices This pointer is used temporarily during device list updates */
+    TUpnpDevice* iAwaitingUpdateDevices;
+
+    /* @var iAwaitingUpdateServices This pointer is used temporarily during device list updates */
+    TUpnpService* iAwaitingUpdateServices;
+
+    /* @var iSize A variable that is used temporarily during device list updates */
+    TUpnpGetDeviceListSize iSize;
+
+    /* @var iServer Reference to the server (message handler) */
+    CUpnpMessageHandler& iMessageHandler;
+
+    /* @var iEngine Reference to the message handler engine */
+    CUpnpMessageHandlerEngine& iEngine;
+
+    // @var iDeviceListSizeMessage Reference to a DeviceListSizeMessage used for responding as device list is updated. 
+    // IMPORTANT: This variable is not owned by this module
+    RMessage2 iDeviceListSizeMessage;
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+    /*******IPFiltering*************/
+    RMessage2 iIPListSizeMessage;
+    TInt iSeqNo;
+    /*******************************/
+#endif
+
+    TBool iMoreNewDevices;
+    TBool iDeviceListSizeRequested;
+    TInt iOldId;
+
+    /* @var iAddedDevices Devices that have been added thru this Message Handler session. If the session
+     is disconnected, devices added thru this session are also removed. This array contains the UUIDs
+     of devices added. */
+    CDesC8ArrayFlat iAddedDevices;
+    };
+
+#endif // C_CUPNPMESSAGEHANDLERSESSION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpmhcommon.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,112 @@
+/** @file
+* 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:  Common structs
+*
+*/
+
+#ifndef C_UPNPMHCOMMON_H
+#define C_UPNPMHCOMMON_H
+
+#include <e32base.h>
+
+#include "upnpcommonstructs.h"
+#include "upnpcompvariant.hrh"
+// CONSTANTS
+
+// Server name
+
+
+#if defined(__HN_31__) || defined(__HN_32__)
+_LIT( KMessageHandlerName,          "hnMessageHandler" );
+_LIT( KMessageHandlerThreadName,    "hnMessageHandler_MainThread" );
+_LIT( KMessageHandlerFilename,      "hnMessageHandler" );
+#else
+_LIT( KMessageHandlerName,          "MessageHandler" );
+_LIT( KMessageHandlerThreadName,    "MessageHandler_MainThread" );
+_LIT( KMessageHandlerFilename,      "MessageHandler" );
+#endif
+
+// The server version. A version must be specified when 
+// creating a session with the server
+const TUint KMessageHandlerMajorVersionNumber=0;
+const TUint KMessageHandlerMinorVersionNumber=1;
+const TUint KMessageHandlerBuildVersionNumber=1;
+
+// ENUMERATIONS
+
+// Opcodes used in message passing between client and server
+enum TMessageHandlerRqst
+    {
+    EAddLocalDevice = 100,
+    ERemoveLocalDevice,
+    ERemoveSilentLocalDevice,
+    EAddControlPointClient,
+    ERemoveControlPointClient,
+    EStopFilteringDevice,
+    EGetMessageSize,
+    EGetMessageSizeSynch,
+    EGetMessage,
+    ESendMessageSize,
+    ESendMessage,    
+    EGetDeviceListSize,
+    EGetDeviceList,
+    ESsdpSearch,
+    ETransferLength,
+    ETransferStatus,
+    EActiveIap,
+    EStartSsdp,
+    ECheckError,    
+    
+    ECancelRequest,
+    
+    EAddFilterAddrByIP,
+    EAddFilterAddrByHostname,
+    ERemoveFilterAddrByIP,
+    ERemoveFilterAddrByHostname,
+    ERemoveAllIPsAddresses,
+    EIsIPAddressAllowed,
+    ESubscribeIPListChanges,
+    ECancelIPLIstSubsctiption,
+    EGetIPFilterList,
+    };
+
+// Opcodes used by server to indicate which asynchronous service
+// has completed
+enum TMessageHandlerRqstComplete
+    {
+    EAddLocalDeviceComplete = 100,
+    ERemoveLocalDeviceComplete,
+    ERemoveSilentLocalDeviceComplete,
+    EAddControlPointClientComplete,
+    ERemoveControlPointClientComplete,
+    EStopFilteringDeviceComplete,
+    EGetMessageSizeComplete,
+    EGetMessageSizeSynchComplete,
+    EGetMessageComplete,
+    ESendMessageSizeComplete,
+    ESendMessageComplete,
+    EGetDeviceListSizeComplete,
+    EGetDeviceListComplete,
+    ESsdpSearchComplete,
+    ETransferLengthComplete,
+    ETransferStatusComplete,
+    EActiveIapComplete,
+    EStartSsdpComplete, 
+    ECheckErrorComplete,    
+
+    ECancelRequestComplete
+    };
+#endif // C_UPNPMHCOMMON_H
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpssdphandlerbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,94 @@
+/** @file
+* 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 UPNPSSDPHANDLER_H
+#define UPNPSSDPHANDLER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <in_sock.h>
+
+// CLASS DECLARATION
+class CUpnpDeviceLibraryElement;
+class MUpnpSsdpServerObserver;
+class RSocketServ;
+
+/**
+ *  CUpnpSsdpHandlerBase is a base class for 
+ *  classes which handle SSDP server states.
+ */
+class CUpnpSsdpHandlerBase : public CBase
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpSsdpHandlerBase();
+
+    /**
+     * Method for ssdp startup 
+     * aSocketServ - reference to socket server session
+     */
+    virtual void StartL( RSocketServ& aSocketServ ) = 0;
+     
+    /**
+     * Method for ssdp immidiate stop
+     */    
+    virtual void Stop() = 0;
+    
+     /**
+     * Method for address change event
+     */    
+    virtual void AddressChangeL( TInetAddr& aAddress  ) = 0;
+        
+    /**
+     * Method for ssdp m-search
+     * aSearchString - The SSDP search string, that is placed to the 
+     *                 ST header of the SSDP message.
+     * aMX - list of MX times for m-search messages
+     */    
+    virtual void SsdpSearchL( const TDesC8& aSearchString, TDesC8& aMX ) = 0;
+    
+    /**
+     * Method for adverising local device
+     */    
+    virtual void AdvertiseDeviceL( TInt aLive,  CUpnpDeviceLibraryElement& aElement ) = 0;
+  
+    /**
+     * Method checks if ssdp is started
+     */    
+    virtual TBool IsStarted() = 0;
+
+protected:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpSsdpHandlerBase( MUpnpSsdpServerObserver& aObserver );
+
+protected:
+
+    // Observer pointer 
+    MUpnpSsdpServerObserver& iSsdpServerObserver; 
+    
+    };
+
+#endif // UPNPSSDPHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpssdphandlerdown.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,96 @@
+/** @file
+* 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 CUPNPSSDPHANDLERDOWN_H
+#define CUPNPSSDPHANDLERDOWN_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include "upnpssdphandlerbase.h"
+
+
+
+// CLASS DECLARATION
+class MUpnpSsdpServerObserver;
+
+/**
+ *  CUpnpSsdpHandlerDown handles the state when ssdp servers   
+ *  are stopped. In this state most operation should do nothing 
+ *  so respective methods have empty body
+ */
+class CUpnpSsdpHandlerDown : public CUpnpSsdpHandlerBase
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpSsdpHandlerDown();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpSsdpHandlerDown* NewL( MUpnpSsdpServerObserver& aSsdpServerObserver );
+
+    /**
+     * Empty implementation
+     */
+    virtual void StartL( RSocketServ& aSocketServ );
+          
+    /**
+     * Empty implementation
+     */
+    virtual void Stop();
+             
+    /**
+     * Empty implementation
+     */
+    virtual void SsdpSearchL( const TDesC8& aSearchString, TDesC8& aMX );
+        
+    /**
+     * Empty implementation
+     */
+    virtual void AdvertiseDeviceL( TInt aLive,  CUpnpDeviceLibraryElement& aElement );
+    
+    /**
+     * Always returns true
+     */    
+    virtual TBool IsStarted();
+    
+     /**
+     * Method for address change event
+     */    
+    virtual void AddressChangeL( TInetAddr& aAddress );
+    
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpSsdpHandlerDown( MUpnpSsdpServerObserver& aSsdpServerObserver );
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+    
+    };
+
+#endif // CUPNPSSDPHANDLERDOWN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/inc/upnpssdphandlerup.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,142 @@
+/** @file
+* 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 CUPNPSSDPHANDLERUP_H
+#define CUPNPSSDPHANDLERUP_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include "upnpssdphandlerbase.h"
+#include "upnpmsearchtimer.h"
+
+
+
+// CLASS DECLARATION
+class CUpnpDeviceLibrary;
+class CUpnpSsdpServer;
+class CUpnpNotifyTimer;
+
+
+// CONST DECLARATION
+const TInt KMXTimeBuffer = 10;
+
+
+// CLASS DECLARATION
+
+/**
+ *  CUpnpSsdpHandlerUp handles the state when ssdp servers   
+ *  are up and running.
+ */
+class CUpnpSsdpHandlerUp : public CUpnpSsdpHandlerBase, 
+                           public MUpnpNotifyTimerObserver
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpSsdpHandlerUp();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpSsdpHandlerUp* NewL( MUpnpSsdpServerObserver& aSsdpServerObserver );
+
+    /**
+     * Starts two ssdp servers - unicast and multicast 
+     * aSocketServ - reference to socket server session
+     */
+    virtual void StartL( RSocketServ& aSocketServ );
+        
+        
+    /**
+     * Stops two ssdp servers 
+     */
+    virtual void Stop();
+        
+    /**
+     * Starts sending ssdp m-search messages
+     * aSearchString - The SSDP search string, that is placed to the 
+     *                 ST header of the SSDP message.
+     * aMX - list of MX times for messages
+     */            
+    virtual void SsdpSearchL( const TDesC8& aSearchString, TDesC8& aMX );
+        
+    /**
+     * Stops two ssdp servers 
+     */
+    virtual void AdvertiseDeviceL( TInt aLive,  CUpnpDeviceLibraryElement& aElement );
+    
+    /**
+     * Informs if start method was performed
+     */
+    virtual TBool IsStarted();   
+    
+     /**
+     * Method for address change event
+     */    
+    virtual void AddressChangeL( TInetAddr& aAddress );
+     
+    /**
+     * Increments control point session count
+     */    
+    TInt AddLocalControlPoint( );
+    
+    /**
+     * Decrements control point session count
+     */    
+    TInt RemoveLocalControlPoint( );
+    
+private: // from MUpnpNotifyTimerObserver
+    
+    void TimerEventL( CUpnpNotifyTimer* aTimer );
+        
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpSsdpHandlerUp( MUpnpSsdpServerObserver& aSsdpServerObserver );
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+        
+    void ClearTimers();        
+
+private:
+    
+    // Unicast SSDP server instance 
+    CUpnpSsdpServer* iSsdpServer;
+
+    // Multicast SSDP server instance 
+    CUpnpSsdpServer* iMulticastSsdpServer;
+
+	// timers array        
+    RPointerArray<CUpnpMSearchTimer> iTimers;
+    
+    // Local control points counter 
+    TInt iCPCounter;
+    
+    };
+
+#endif // CUPNPSSDPHANDLERUP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/src/upnpipfiltering.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,277 @@
+/** @file
+* 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: 
+*
+*/
+
+
+
+#include <S32MEM.H>
+#include "upnpipfiltering.h"
+#include "upnpipfilteringdnsquery.h"
+
+const TInt KGranularity = 1;
+
+
+
+// ======== MEMBER FUNCTIONS ========
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::CUpnpIPFiltering
+// ---------------------------------------------------------------------------
+//
+CUpnpIPFiltering::CUpnpIPFiltering( RSocketServ& aSocketServer, TInt aIap,
+                                    MMessageHandlerEngineObserver& aObserver ) :
+                    iAllowedIPsList( KGranularity ),
+                    iSockServ( aSocketServer ),
+                    iActiveIap( aIap ),
+                    iObserver( aObserver )
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFiltering::ConstructL( RSocketServ& aSocketServer )
+    {
+
+    iConnectionManagerProxy = CUpnpConnectionManagerProxy::NewL( aSocketServer );
+    User::LeaveIfError( iConnectionManagerProxy->EnsureStart() );
+
+    IPList2Des8L();
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::NewL
+// ---------------------------------------------------------------------------
+//
+CUpnpIPFiltering* CUpnpIPFiltering::NewL( RSocketServ &aSocketServer, TInt aIap,
+                                          MMessageHandlerEngineObserver& aObserver )
+    {
+    CUpnpIPFiltering* self = CUpnpIPFiltering::NewLC( aSocketServer, aIap ,aObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::NewLC
+// ---------------------------------------------------------------------------
+//
+CUpnpIPFiltering* CUpnpIPFiltering::NewLC( RSocketServ &aSocketServer, TInt aIap,
+                                           MMessageHandlerEngineObserver& aObserver )
+    {
+    CUpnpIPFiltering* self = new ( ELeave ) CUpnpIPFiltering( aSocketServer, aIap,
+                                                              aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL( aSocketServer );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::~CUpnpIPFiltering
+// ---------------------------------------------------------------------------
+//
+CUpnpIPFiltering::~CUpnpIPFiltering()
+    {
+    iDNSQueriesList.ResetAndDestroy();
+    iAllowedIPsList.Close();
+    delete iConnectionManagerProxy;
+
+    iListBuf.Close();
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::AddAddress
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpIPFiltering::AddAddressL( const TInetAddr& aAddress )
+    {
+    if ( !( aAddress.IsBroadcast() ||
+            aAddress.Address() == 0 ) )
+        {
+        TInt index( FindInList( aAddress ) );
+        if( index == KErrNotFound )
+            {
+            iAllowedIPsList.AppendL( aAddress );
+            IPList2Des8L();
+            return KErrNone;
+            }
+        return index;
+        }
+    return KErrArgument;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::AddAddressL
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFiltering::AddAddressL( CUpnpIPFilteringDNSQuery* aQuery )
+    {
+    iDNSQueriesList.AppendL( aQuery );
+    aQuery->AddAddress();
+    aQuery->StartDNSQuery( iSockServ , iConnectionManagerProxy->ConnectionL() , this );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::RemoveAddress
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpIPFiltering::RemoveAddressL( const TInetAddr& aAddress )
+    {
+    if ( !( aAddress.IsBroadcast() ||
+            aAddress.Address() ==0 ) )
+        {
+        TInt index( FindInList( aAddress ) );
+        if( index != KErrNotFound )
+            {
+            iAllowedIPsList.Remove( index );
+            iAllowedIPsList.Compress();
+            IPList2Des8L();
+            }
+        return index;
+        }
+    return KErrArgument;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::RemoveAddressL
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFiltering::RemoveAddressL( CUpnpIPFilteringDNSQuery* aQuery )
+    {
+    iDNSQueriesList.AppendL( aQuery );
+    aQuery->RemoveAddress();
+    aQuery->StartDNSQuery( iSockServ , iConnectionManagerProxy->ConnectionL() , this );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::RemoveAll
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpIPFiltering::RemoveAll( )
+    {
+    if( iAllowedIPsList.Count() )
+        {
+        iAllowedIPsList.Reset();
+        iAllowedIPsList.Compress();
+        TRAP_IGNORE( IPList2Des8L() );
+        return KErrNone;
+        }
+    return KErrNotFound;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::IsAllowed
+// ---------------------------------------------------------------------------
+//
+TBool CUpnpIPFiltering::IsAllowed( const TInetAddr& aAddress ) const
+  {
+  return ( FindInList( aAddress ) != KErrNotFound );
+  }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::Count
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpIPFiltering::Count(  ) const
+    {
+    return iAllowedIPsList.Count();
+    }
+
+const TDesC8& CUpnpIPFiltering::GetIPFilterList(  )
+    {
+    return iListBuf;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::FindInList
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpIPFiltering::FindInList( const TInetAddr& aAddress ) const
+    {
+    for ( TInt index( 0 ) ; index < iAllowedIPsList.Count() ; index++ )
+        {
+        if ( iAllowedIPsList[index].Address() == aAddress.Address() )
+            {
+            return index;
+            }
+        }
+    return KErrNotFound;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::IPList2Des8L
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFiltering::IPList2Des8L()
+    {
+    iListBuf.Close();
+
+    const TInt KOne( 10 );
+
+    CBufFlat* buf = CBufFlat::NewL( KOne );
+    CleanupStack::PushL( buf );
+    RBufWriteStream writer( *buf );
+    CleanupClosePushL( writer );
+
+    writer.WriteInt32L( Count() );
+
+    for ( TInt i(0) ; i < iAllowedIPsList.Count() ; i++  )
+        {
+        TPckg<TInetAddr> temp( iAllowedIPsList[i] );
+        writer << temp;
+        }
+
+    // create heap descriptor
+    iListBuf.Create( buf->Size() );
+    buf->Read( 0, iListBuf, buf->Size() );
+
+    // clean up;
+    CleanupStack::PopAndDestroy( &writer );
+    CleanupStack::PopAndDestroy(buf);
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::RequestCompleted
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFiltering::RequestCompleted( CUpnpIPFilteringDNSQuery* iQuery )
+    {
+    for( TInt i(0) ; i < iDNSQueriesList.Count() ; i++ )
+        {
+        if( iDNSQueriesList[i] == iQuery )
+            {
+            delete iDNSQueriesList[i];
+            iDNSQueriesList.Remove( i );
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFiltering::IPListChange
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFiltering::IPListChange()
+    {
+    iObserver.IPListChange();
+    }
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/src/upnpipfilteringdnsquery.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,227 @@
+/** @file
+* 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:  
+*
+*/
+
+
+
+#include "upnpipfilteringdnsquery.h"
+
+
+// ======== MEMBER FUNCTIONS ========
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::CUpnpIPFilteringDNSQuery
+// ---------------------------------------------------------------------------
+//
+CUpnpIPFilteringDNSQuery::CUpnpIPFilteringDNSQuery( const RMessage2& aMessage ) 
+                                        : CActive( EPriorityStandard ),
+                                          iDNSStatus( KErrNotFound ),
+                                          iMessage( aMessage )
+                    
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFilteringDNSQuery::ConstructL( const TDesC8& aRemoteName )
+    {
+    iRemoteName.CreateL( aRemoteName.Length() );
+    iRemoteName.Copy( aRemoteName );                                            
+    CActiveScheduler::Add( this );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::NewL(
+// ---------------------------------------------------------------------------
+//
+CUpnpIPFilteringDNSQuery* CUpnpIPFilteringDNSQuery::NewL( 
+                                                    const RMessage2& aMessage,
+                                                    const TDesC8& aRemoteName
+                                                    )
+    {
+    CUpnpIPFilteringDNSQuery* self = CUpnpIPFilteringDNSQuery::NewLC( 
+                                    aMessage, aRemoteName );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::NewLC
+// ---------------------------------------------------------------------------
+//
+CUpnpIPFilteringDNSQuery* CUpnpIPFilteringDNSQuery::NewLC( 
+                                                    const RMessage2& aMessage,
+                                                    const TDesC8& aRemoteName )
+    {
+    CUpnpIPFilteringDNSQuery* self = new ( ELeave ) CUpnpIPFilteringDNSQuery( 
+                                                            aMessage );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRemoteName );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::~CUpnpIPFilteringDNSQuery
+// ---------------------------------------------------------------------------
+//
+CUpnpIPFilteringDNSQuery::~CUpnpIPFilteringDNSQuery()
+    {
+    Cancel();
+    iHostResolver.Close();
+    iRemoteName.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::AddAddress
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFilteringDNSQuery::AddAddress( )
+    {
+    iAction = EAddAddress;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::RemoveAddress
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFilteringDNSQuery::RemoveAddress( )
+    {
+    iAction = ERemoveAddress;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::StartDNSQuery
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFilteringDNSQuery::StartDNSQuery( RSocketServ& aSockServ, 
+                                              RConnection& aConnection,
+                                              CUpnpIPFiltering* aIPListOwner )
+    {
+    iIPListOwner = aIPListOwner;
+    TInt err( iHostResolver.Open( aSockServ, KAfInet,
+                                             KProtocolInetUdp, 
+                                             aConnection ) );
+    if( err )
+        {
+        RequestCompleted( err );
+        return;
+        }
+    
+    iHostResolver.GetByName( iRemoteName, iAddrDetails, iStatus );
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::Status
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpIPFilteringDNSQuery::Status( TInt aStatus )
+    {
+    return ( iDNSStatus == 0 ? iDNSStatus : aStatus );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPFilteringDNSQuery::RequestCompleted(
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFilteringDNSQuery::RequestCompleted( TInt aStatus )
+    {
+    iMessage.Complete( aStatus );
+    iIPListOwner->RequestCompleted( this );
+    }
+
+// ---------------------------------------------------------------------------
+// From CActive
+// CUpnpIPFilteringDNSQuery::RunL
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFilteringDNSQuery::RunL()
+    {
+    if( iStatus.Int()== KErrNone )
+        {
+        iDNSStatus = KErrNone;
+        switch( iAction )
+            {
+            case EAddAddress:
+                {
+                if( iIPListOwner )
+                    {
+                    if( iIPListOwner->AddAddressL( 
+                        static_cast<TInetAddr>( iAddrDetails().iAddr ) ) >= 0 
+                                                 )
+                        {
+                        iIPListOwner->IPListChange();
+                        }
+                    }
+                break;
+                }
+            case ERemoveAddress:
+                {
+                 if( iIPListOwner )
+                    {
+                    if ( iIPListOwner->RemoveAddressL( 
+                         static_cast<TInetAddr>( iAddrDetails().iAddr ) ) >= 0 
+                                                     )
+                        {
+                        iIPListOwner->IPListChange();    
+                        }
+                    }
+                break;
+                }
+             default:
+                {
+                break;
+                }
+            }
+        iHostResolver.Next( iAddrDetails , iStatus );
+        SetActive();
+        }
+    else
+        {
+        RequestCompleted( Status( iStatus.Int() ) );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From CActive
+// CUpnpIPFilteringDNSQuery::RunError
+// ---------------------------------------------------------------------------
+//
+TInt CUpnpIPFilteringDNSQuery::RunError( TInt aError )
+    {
+    RequestCompleted( Status( aError ) );
+    return KErrNone;
+    }
+    
+// ---------------------------------------------------------------------------
+// From CActive
+// CUpnpIPFilteringDNSQuery::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CUpnpIPFilteringDNSQuery::DoCancel()
+    {
+    iHostResolver.Cancel();
+    iMessage.Complete( KErrCancel );
+    }
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/src/upnpmessagehandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,235 @@
+/** @file
+ * 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:  Message handler
+ *
+ */
+
+// INCLUDE FILES
+#include "upnpmessagehandler.h"
+#define KLogFile _L("UpnpMessageHandler.txt")
+#include "upnpcustomlog.h"
+
+const TVersion KServerSupportedVersion( KMessageHandlerMajorVersionNumber,
+    KMessageHandlerMinorVersionNumber, KMessageHandlerBuildVersionNumber );
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::CUpnpMessageHandler
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandler::CUpnpMessageHandler()
+    {
+    LOG_FUNC_NAME;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::~CUpnpMessageHandler
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandler::~CUpnpMessageHandler()
+    {
+    LOG_FUNC_NAME;
+    iObservers.Close();
+    delete iEngine;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpSymbianServerBase* CUpnpMessageHandler::NewLC()
+    {
+    LOG_FUNC_NAME;
+    CUpnpMessageHandler* messageHandler = new (ELeave) CUpnpMessageHandler();
+    CleanupStack::PushL( messageHandler );
+    messageHandler->ConstructL() ;
+    return messageHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandler::ConstructL()
+    {
+    LOG_FUNC_NAME;
+    BaseConstructL();
+    iEngine = CUpnpMessageHandlerEngine::NewL( *this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::ServerName
+// Return name of the server
+// -----------------------------------------------------------------------------
+//
+const TDesC& CUpnpMessageHandler::ServerName() const
+    {
+    return KMessageHandlerName;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::NewSessionL
+// Create new session.
+// -----------------------------------------------------------------------------
+//
+CSession2* CUpnpMessageHandler::NewSessionL( const RMessage2& /*aMsg*/) const
+    {
+    LOG_FUNC_NAME;
+    return CUpnpMessageHandlerSession::NewL(
+        *const_cast<CUpnpMessageHandler*> ( this ), *iEngine );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::SupportedVersion
+// Gets server supported version.
+// -----------------------------------------------------------------------------
+//
+TVersion CUpnpMessageHandler::SupportedVersion() const
+    {
+    return KServerSupportedVersion;
+    }
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// E32Main entry point.
+// Returns: KErrNone
+// -----------------------------------------------------------------------------
+//
+TInt E32Main()
+    {
+    return CUpnpMessageHandler::StartServer( KMessageHandlerThreadName,
+        CUpnpMessageHandler::NewLC );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::DeviceListUpdateL
+// Update device list.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandler::DeviceListUpdateL()
+    {
+    LOG_FUNC_NAME;
+    // Inform every Observer (every session) that the device list has changed
+    for ( TInt i(0); i < iObservers.Count(); i++ )
+        {
+        iObservers[i]->DeviceListChangeL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::AddObserverL
+// Add observer.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandler::AddObserverL( MMessageHandlerObserver* aObserver )
+    {
+    LOG_FUNC_NAME;
+    iObservers.InsertL( aObserver, iObservers.Count() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::RemoveObserver
+// Remove observer.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandler::RemoveObserver( MMessageHandlerObserver* aObserver )
+    {
+    LOG_FUNC_NAME;
+    LOGS1( "CUpnpMessageHandler::RemoveObserver - Count: %d", iObservers.Count());
+
+    for ( TInt i(0); i < iObservers.Count(); i++ )
+        {
+        if ( iObservers[i] == aObserver )
+            {
+            LOGS1( "CUpnpMessageHandler::RemoveObserver - Removed osb: %d",i);
+            iObservers.Remove( i );
+            iObservers.Compress();
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::RunError
+// RunError is called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpMessageHandler::RunError( TInt aError )
+    {
+    LOG_FUNC_NAME;
+    iStartingError = aError;
+    return CUpnpSymbianServerBase::RunError( aError );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::IsSsdpStarted
+// Set function for iSsdpStarted
+// -----------------------------------------------------------------------------
+//     
+TBool CUpnpMessageHandler::IsSsdpStarted()
+    {
+    return iSsdpStarted;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::GetError
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpMessageHandler::StartingError()
+    {
+    return iStartingError;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::SetStarted
+// Set function for iSsdpStarted
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandler::SetSsdpStarted( TBool aStarted )
+    {
+    iSsdpStarted = aStarted;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::Sessions
+// Returns client sessions
+// -----------------------------------------------------------------------------
+//
+TDblQueIter< CSession2 >& CUpnpMessageHandler::Sessions()
+    {
+    return iSessionIter;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandler::IPListChange
+// Notify all observers
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandler::IPListChange()
+    {
+#ifdef RD_UPNP_REMOTE_ACCESS
+    for(TInt i(0); i < iObservers.Count(); i++)
+        {
+        iObservers[i]->IPListChange();
+        }
+#endif    
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/src/upnpmessagehandlerengine.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,519 @@
+/** @file
+ * 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:  Message handler engine
+ *
+ */
+
+// INCLUDE FILES
+#include <commdb.h>
+#include <commdbconnpref.h>
+#include "upnpcons.h"
+#include "upnpmessagehandlerengine.h"
+#include "upnpssdpserver.h"
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+#include "upnpipfiltering.h"
+#include "upnpipfilteringdnsquery.h"
+#endif
+
+#include "upnpssdphandlerup.h"
+#include "upnpssdphandlerbase.h"
+#include "upnpssdphandlerdown.h"
+#include "upnpconnectionmanagerproxy.h"
+
+#define KLogFile _L("UpnpMessageHandler.txt")
+#include "upnpcustomlog.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandlerEngine* CUpnpMessageHandlerEngine::NewL(
+    MMessageHandlerEngineObserver& aObserver )
+    {
+    // call the default constructor
+    CUpnpMessageHandlerEngine* self = new (ELeave) CUpnpMessageHandlerEngine( aObserver );
+
+    // call the default L constructor when in cleanup stack
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    // returns new instance
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::CUpnpMessageHandlerEngine
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandlerEngine::CUpnpMessageHandlerEngine(
+    MMessageHandlerEngineObserver& aObserver ) :
+    iObserver(aObserver)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::ConstructL()
+    {
+    LOG_FUNC_NAME;
+
+    // create a socket server connection
+    User::LeaveIfError( iSocketServ.Connect() );
+
+    CreateSessionIdPropertyL();
+
+    iSsdpHandlerUp = CUpnpSsdpHandlerUp::NewL( *this );
+    iSsdpHandlerDown = CUpnpSsdpHandlerDown::NewL( *this );
+    iCurrentSsdpHandler = iSsdpHandlerUp;
+
+    // device library stores information about remote and local devices
+    iDeviceLibrary = CUpnpDeviceLibrary::NewL( *this, 0 );
+
+    iConnectionManagerProxy = CUpnpConnectionManagerProxy::NewL( iSocketServ );
+    iConnectionManagerProxy->SubscribeForNetworkEventsL( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::CreateSessionIdPropertyL
+// Create session id property and signal id semaphore
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::CreateSessionIdPropertyL()
+    {
+    // create RProperty used as session id counter
+    TInt err = RProperty::Define( KUPnPUtilsCat, EUPnPUtilsCounter,
+        RProperty::EInt );
+    if ( err != KErrAlreadyExists )
+        {
+        User::LeaveIfError( err );
+        }
+
+    // there are four global widely-used semaphores in the system
+    // first two semaphores are for getting a running session id
+    // first semaphore is an access semaphore
+    // if it's signaled, we can have access to id semaphore
+    // id semaphore holds the current session id
+    //
+    // the second place where these semaphores are used is CUpnpHttpMessage::NewSessionIdL()
+    // 
+    // basically, we want to tell the CUpnpHttpMessage class that the
+    // EUPnPUtilsCounter RProperty is defined and ready to use
+
+    TInt result =
+            iAccessSemaphore.OpenGlobal( KSessionIdAccessSemaphoreName() );
+    if ( result == KErrNotFound )
+        {
+        result = iAccessSemaphore.CreateGlobal(
+            KSessionIdAccessSemaphoreName(), 0 );
+            
+        if ( result != KErrNone )
+            {
+            LOGS( "MESSAGEHANDLER *** Session id access semaphore creation failed" );
+            }
+        }
+    else if ( result != KErrNone )
+        {
+        LOGS( "MESSAGEHANDLER *** Session id access semaphore creation failed" );
+        }
+    User::LeaveIfError( result );
+
+    iAccessSemaphore.Signal();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::~CUpnpMessageHandlerEngine
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandlerEngine::~CUpnpMessageHandlerEngine()
+    {
+    __ASSERT_DEBUG( iCurrentSsdpHandler == iSsdpHandlerUp
+            || iCurrentSsdpHandler == iSsdpHandlerDown,
+            User::Panic( KMessageHandler, EMessageHandlerBadState ) );
+    delete iDeviceLibrary;
+
+    delete iSsdpHandlerUp;
+    delete iSsdpHandlerDown;
+
+    delete iConnectionManagerProxy;
+
+#ifdef RD_UPNP_REMOTE_ACCESS    
+    /*************   IPFiltering    *****************/
+    delete iIPFilterRepository;
+    /************************************************/
+#endif
+
+    // close socket server connection
+    iSocketServ.Close();
+    iAccessSemaphore.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::AdvertiseDeviceL
+// Advertise device
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::AdvertiseDeviceL( TInt aLive,
+    CUpnpDeviceLibraryElement& aElement )
+    {
+    iCurrentSsdpHandler->AdvertiseDeviceL( aLive, aElement );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::DeviceListChangedL
+// Inform observer that device list changed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::DeviceListChangedL()
+    {
+    LOG_FUNC_NAME;
+
+    //Check waiting
+    if ( iCurrentSsdpHandler == iSsdpHandlerUp )
+        {        
+        iObserver.DeviceListUpdateL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::DeviceList
+// Get device list.
+// -----------------------------------------------------------------------------
+//
+RPointerArray<CUpnpDeviceLibraryElement>& CUpnpMessageHandlerEngine::DeviceList()
+    {
+    LOG_FUNC_NAME;
+    // return device list
+    return iDeviceLibrary->DeviceList();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::AddLocalDeviceL
+// Add local device to device library.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpMessageHandlerEngine::AddLocalDeviceL(
+    TUpnpAddLocalDevice &aDevice, TDesC8& aBuffer )
+    {
+    LOG_FUNC_NAME;
+    
+    iDeviceLibrary->AddInfoL( &aDevice, aBuffer, iConnectionManagerProxy->LocalAddress() );
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::AddLocalControlPointL
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpMessageHandlerEngine::AddLocalControlPoint()
+    {
+    return iSsdpHandlerUp->AddLocalControlPoint();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::RemoveLocalControlPointL
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpMessageHandlerEngine::RemoveLocalControlPoint()
+    {
+    return iSsdpHandlerUp->RemoveLocalControlPoint();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::StopFilteringDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::StopFilteringDeviceL( const TDesC8& aUuid )
+    {
+    iDeviceLibrary->StopFilteringDeviceL( aUuid );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::DeviceLibrary
+// Get device library.
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceLibrary* CUpnpMessageHandlerEngine::DeviceLibrary()
+    {
+    LOG_FUNC_NAME;
+    return iDeviceLibrary;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::SsdpEventL
+// Callback function for received ssdp messages.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::SsdpEventL( CUpnpSsdpMessage *aMessage )
+    {
+    LOG_FUNC_NAME;
+
+    // ignore messages with M-SEARCH there are serverd by SSDP Server internally
+    if ( aMessage->IsSsdpMSearch() )
+        {
+        return;
+        }
+    // forward message to device library
+    iDeviceLibrary->AddInfoL( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::SsdpSearchL
+// Do ssdp searches.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::SsdpSearchL( TDesC8& aSearchString,
+    TDesC8& aMX )
+    {
+    LOG_FUNC_NAME;
+    iCurrentSsdpHandler->SsdpSearchL( aSearchString, aMX );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::ActiveIap
+// Returns the iap id (which is got in function above).
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpMessageHandlerEngine::ActiveIap() const
+    {
+    LOG_FUNC_NAME;
+    return iConnectionManagerProxy->ActiveIap();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::RemoveLocalDevice
+// Removes local device from device library.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::RemoveLocalDeviceL( const TDesC8 &aUuid,
+    TBool aSilent )
+    {
+    LOG_FUNC_NAME;
+
+    // forward the request to device library
+    if ( iCurrentSsdpHandler == iSsdpHandlerUp)
+        {
+        if ( !aSilent )
+            {
+            iDeviceLibrary->RemoveL( aUuid );
+            }
+        else
+            {
+            iDeviceLibrary->RemoveSilentL( aUuid );
+            }
+        }
+
+    LOGS( "CUpnpMessageHandlerEngine::RemoveLocalDevice passed");
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::StartSsdp
+// Start SSPD.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpMessageHandlerEngine::StartSsdpL()
+    {
+    LOG_FUNC_NAME;
+    if ( !iCurrentSsdpHandler->IsStarted() )
+        {
+        LOGS( "MESSAGEHANDLER *** Connecting to same access point...");        
+
+        iCurrentSsdpHandler->StartL( iSocketServ );
+
+#ifdef RD_UPNP_REMOTE_ACCESS    
+        /**********IPFiltering*******************/
+        iIPFilterRepository = CUpnpIPFiltering::NewL( iSocketServ,
+                ActiveIap(),
+                iObserver );
+        /****************************************/
+#endif
+
+        return KErrNone;
+        }
+    else
+        {
+        // Ensure all two servers are started
+        iCurrentSsdpHandler->StartL( iSocketServ );
+        return KErrNone;
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::InterfaceDown
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::InterfaceDown()
+    {
+    LOG_FUNC_NAME;
+       
+    iSsdpHandlerUp->Stop();
+    iCurrentSsdpHandler = iSsdpHandlerDown;
+    }
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::AddAddressL
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::AddAddressL( const TInetAddr& aAddress )
+    {
+    User::LeaveIfError( iIPFilterRepository->AddAddressL( aAddress ) );
+    iObserver.IPListChange();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::AddAddressL
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::AddAddressL( const RMessage2& aMessage,
+        const TDesC8& aRemoteName )
+    {
+    CUpnpIPFilteringDNSQuery* query = CUpnpIPFilteringDNSQuery::NewLC( aMessage,
+            aRemoteName );
+    iIPFilterRepository->AddAddressL( query );
+    CleanupStack::Pop( query );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::RemoveAddressL
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::RemoveAddressL( const TInetAddr& aAddress )
+    {
+    if ( iIPFilterRepository->RemoveAddressL( aAddress ) >=0 )
+        {
+        iObserver.IPListChange();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::RemoveAddressL
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::RemoveAddressL( const RMessage2& aMessage,
+        const TDesC8& aRemoteName )
+    {
+    CUpnpIPFilteringDNSQuery* query = CUpnpIPFilteringDNSQuery::NewLC( aMessage,
+            aRemoteName );
+    iIPFilterRepository->RemoveAddressL( query );
+    CleanupStack::Pop( query );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::RemoveAll
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::RemoveAll()
+    {
+    if ( iIPFilterRepository->RemoveAll() >=0 )
+        {
+        iObserver.IPListChange();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::IsIPAllowed
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpMessageHandlerEngine::IsIPAllowed( const TInetAddr& aAddress ) const
+    {
+    return iIPFilterRepository->IsAllowed( aAddress );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::IPFilteringStatus
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::IPFilteringStatus( TInt& aListSize ) const
+    {
+    aListSize = iIPFilterRepository->GetIPFilterList().Size();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceInfo::GetIPFilterList
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CUpnpMessageHandlerEngine::GetIPFilterList()
+    {
+    return iIPFilterRepository->GetIPFilterList();
+    }
+#endif
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::NetworkEventWlanLost
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerEngine::NetworkEvent( CUpnpNetworkEventBase* aEvent )
+    {
+    LOG_FUNC_NAME;
+
+    if ( aEvent->SubscriberError() < KErrNone && aEvent->Type() == EUnknownEvent )
+        {
+        LOGS( "MESSAGEHANDLER *** NetworkEvent error" );
+        return;
+        }
+
+    switch ( aEvent->Type() )
+        {
+        case EWlanLostEvent:
+            {
+            InterfaceDown();
+  
+            TDblQueIter<CSession2>& sessionIter = iObserver.Sessions();
+        
+            sessionIter.SetToFirst();
+            CUpnpMessageHandlerSession *session = 
+                    reinterpret_cast<CUpnpMessageHandlerSession*>( sessionIter++ );
+            while ( session )
+                {
+                session->CancelPendingRequests();
+                session = reinterpret_cast<CUpnpMessageHandlerSession*>( sessionIter++ );
+                }
+            }
+            break;
+
+        case EAddressChangeEvent:
+            {
+            CUpnpNetworkEventAddressChange* networkEvent = 
+                                static_cast< CUpnpNetworkEventAddressChange* >( aEvent );
+  
+            TInetAddr addr = networkEvent->Address();
+
+            TRAPD( error, iCurrentSsdpHandler->AddressChangeL( addr ) );
+            TRAP( error, iDeviceLibrary->RemoveAllDevicesL() );
+
+            if ( error )
+                {
+                // only case this should happen
+                ASSERT( error == KErrNoMemory );
+                }
+            }
+            break;
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/src/upnpmessagehandlersession.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,836 @@
+/** @file
+ * 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:  Message handler engine
+ *
+ */
+
+// INCLUDE FILES
+
+#include <s32mem.h>
+
+#include "upnpmessagehandlersession.h"
+#define KLogFile _L("UpnpMessageHandler.txt")
+#include "upnpcustomlog.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::CUpnpMessageHandlerSession
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandlerSession::CUpnpMessageHandlerSession(
+    CUpnpMessageHandler& aMessageHandler, CUpnpMessageHandlerEngine& aEngine ) :
+    CSession2(), iMessageHandler(aMessageHandler), iEngine(aEngine),
+            iMoreNewDevices(ETrue), iOldId(KErrNotFound), iAddedDevices( 1)
+    {
+    LOG_FUNC_NAME;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::~CUpnpMessageHandlerSession
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandlerSession::~CUpnpMessageHandlerSession()
+    {
+    delete[] iAwaitingUpdateDevices;
+    delete[] iAwaitingUpdateServices;
+
+    iMessageHandler.RemoveObserver( this );
+    iAddedDevices.Reset();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::ServiceL
+// Handle client requests.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::ServiceL( const RMessage2& aMessage )
+    {
+
+    if ( aMessage.Function() != EStartSsdp && aMessage.Function()
+            != ECheckError && !iMessageHandler.IsSsdpStarted() )
+        {
+        aMessage.Complete( KErrServerTerminated );
+        return;
+        }
+
+    switch ( aMessage.Function() )
+        {
+        case EStartSsdp:
+            {
+            aMessage.Complete( EStartSsdpComplete );
+            User::LeaveIfError( EventStartSsdpL() );
+            iMessageHandler.SetSsdpStarted( ETrue );
+            break;
+            }
+        case EAddLocalDevice:
+            {
+            EventAddLocalDeviceL( aMessage );
+            aMessage.Complete( EAddLocalDeviceComplete );
+            break;
+            }
+        case ERemoveLocalDevice:
+            {
+            EventRemoveLocalDeviceL( aMessage, EFalse );
+            aMessage.Complete( ERemoveLocalDeviceComplete );
+            break;
+            }
+        case ERemoveSilentLocalDevice:
+            {
+            LOGS("CUpnpMessageHandlerSession:  case ERemoveSilentLocalDevice");
+            EventRemoveLocalDeviceL( aMessage, ETrue );
+            aMessage.Complete( ERemoveSilentLocalDeviceComplete );
+            LOGS("CUpnpMessageHandlerSession:  case ERemoveSilentLocalDevice passed");
+            break;
+            }
+        case EAddControlPointClient:
+            {
+            EventAddLocalControlPoint( aMessage );
+            aMessage.Complete( EAddControlPointClientComplete );
+            break;
+            }
+        case ERemoveControlPointClient:
+            {
+            EventRemoveLocalControlPoint( aMessage );
+            aMessage.Complete( ERemoveControlPointClientComplete );
+            break;
+            }
+        case EStopFilteringDevice:
+            {
+            EventStopFilteringDeviceL( aMessage );
+            aMessage.Complete( EStopFilteringDeviceComplete );
+            break;
+            }
+        case EGetDeviceListSize:
+            {
+            CopyMessage( (RMessage2&) aMessage );
+            EventGetDeviceListSizeL( aMessage );
+            break;
+            }
+        case EGetDeviceList:
+            {
+            EventGetDeviceListL( aMessage );
+            aMessage.Complete( EGetDeviceListComplete );
+            break;
+            }
+        case ESsdpSearch:
+            {
+            EventSsdpSearchL( aMessage );
+            aMessage.Complete( ESsdpSearchComplete );
+            break;
+            }
+        case EActiveIap:
+            {
+            EventActiveIapL( aMessage );
+            aMessage.Complete( EActiveIapComplete );
+            break;
+            }
+        case ECheckError:
+            {
+            EventCheckErrorL( aMessage );
+            aMessage.Complete( ECheckErrorComplete );
+            break;
+            }
+        case ECancelRequest:
+            CompletePendingRequest();
+            aMessage.Complete( KErrNone );
+            break;
+
+#ifdef RD_UPNP_REMOTE_ACCESS    
+            case EAddFilterAddrByIP:
+                {
+                EventAddFilterAddrByIpL( aMessage );
+                aMessage.Complete( KErrNone );
+                break;
+                }
+            case EAddFilterAddrByHostname:
+                {
+                EventAddFilterAddrByHostnameL( aMessage );
+                break;
+                }
+            case ERemoveFilterAddrByIP:
+                {
+                EventRemoveFilterAddrByIpL( aMessage );
+                aMessage.Complete( KErrNone );
+                break;
+                }
+            case ERemoveFilterAddrByHostname:
+                {
+                EventRemoveFilterAddrByHostnameL( aMessage );
+                break;
+                }
+            case ERemoveAllIPsAddresses:
+                {
+                EventRemoveAllIPsAddressesL( aMessage );
+                aMessage.Complete( KErrNone );
+                break;
+                }
+            case EIsIPAddressAllowed:
+                {
+                aMessage.Complete( EventIsIPAddressAllowedL( aMessage ) );
+                break;
+                }
+            case ESubscribeIPListChanges:
+                {
+                EventSubscriveIPListChanges( const_cast<RMessage2&>( aMessage ) );
+                break;
+                }
+            case EGetIPFilterList:
+                {
+                EventGetIPFilterListL( aMessage );
+                break;
+                }
+            case ECancelIPLIstSubsctiption:
+                {
+                EventCancelIPListSubscription( aMessage );
+                aMessage.Complete( KErrNone );
+                break;
+                }
+#endif    
+        default:
+            PanicClient( aMessage, EMessageHandlerBadRequest );
+            break;
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::PanicClient
+// Panic client.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::PanicClient( const RMessage2 &aMessage,
+    TInt aPanic ) const
+    {
+    LOG_FUNC_NAME;
+    iMessageHandler.PanicClient( aMessage, aPanic );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandlerSession* CUpnpMessageHandlerSession::NewL(
+    CUpnpMessageHandler& aServer, CUpnpMessageHandlerEngine& aEngine )
+    {
+    CUpnpMessageHandlerSession* self = CUpnpMessageHandlerSession::NewLC(
+        aServer, aEngine );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpMessageHandlerSession* CUpnpMessageHandlerSession::NewLC(
+    CUpnpMessageHandler& aServer, CUpnpMessageHandlerEngine& aEngine )
+    {
+    CUpnpMessageHandlerSession* self = new (ELeave) CUpnpMessageHandlerSession(
+            aServer, aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::ConstructL()
+    {
+    //Add session to MessageHandlers count and to the ObserverList
+    iMessageHandler.AddObserverL( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventAddLocalDeviceL
+// Add local device.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventAddLocalDeviceL(
+    const RMessage2 &aMessage )
+    {
+    LOG_FUNC_NAME;
+
+    TUpnpAddLocalDevice device;
+    TPtr8 ptr( reinterpret_cast<TUint8*>(&device), sizeof(device ),
+        sizeof(device ));
+
+    LOGS("\t MessageHandler, added a local device");
+
+    aMessage.ReadL( 0, ptr );
+
+    HBufC8* buffer = HBufC8::NewLC( device.iBufferLength );
+    buffer->Des().SetLength( 0 );
+
+    TPtr8 bufPtr = buffer->Des();
+
+    aMessage.ReadL( 1, bufPtr );
+
+    LOGS("Session::Add");
+
+    iDeviceListSizeRequested = EFalse;
+
+    TPtrC8 uuid = buffer->Left( device.iUuidLength );
+
+    iAddedDevices.AppendL( uuid );
+
+    iEngine.AddLocalDeviceL( device, *buffer );
+
+    CleanupStack::PopAndDestroy( buffer );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventAddLocalControlPointL
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventAddLocalControlPoint( const RMessage2 &/*aMessage*/)
+    {
+    iEngine.AddLocalControlPoint();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::RemoveLocalControlPointL
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventRemoveLocalControlPoint(
+    const RMessage2 &/*aMessage*/)
+    {
+    iEngine.RemoveLocalControlPoint();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerEngine::EventStopFilteringDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventStopFilteringDeviceL(
+    const RMessage2& aMessage )
+    {
+    TInt lenght = aMessage.GetDesLength( 0 );
+    HBufC8* uuids = HBufC8::NewLC( lenght );
+    TPtr8 uuidsPtr = uuids->Des();
+    aMessage.ReadL( 0, uuidsPtr );
+    TLex8 uuidLex(*uuids);
+    uuidLex.Mark();
+    for ( ;; )
+        {
+        if ( uuidLex.Peek() == ';' )
+            {
+            TPtrC8 uidPtr = uuidLex.MarkedToken();
+            iEngine.StopFilteringDeviceL( uidPtr );
+            uuidLex.Inc();
+            uuidLex.Mark();
+            }
+        else if ( uuidLex.Eos() )
+            {
+            TPtrC8 uidPtr = uuidLex.MarkedToken();
+            if ( uidPtr.Length() )
+                {
+                iEngine.StopFilteringDeviceL( uidPtr );
+                }
+            break;
+            }
+        else
+            {
+            uuidLex.Inc();
+            }
+        }
+    CleanupStack::PopAndDestroy( uuids );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventGetDeviceListSizeL
+// Get device list.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventGetDeviceListSizeL(
+    const RMessage2& aMessage )
+    {
+    LOGS( "CUpnpMessageHandlerSession::EventGetDeviceListSizeL");
+
+    TPtr8 ptr( reinterpret_cast<TUint8*>(&iSize), sizeof(iSize ),
+        sizeof(iSize ));
+
+    iDeviceListSizeMessage.ReadL( 0, ptr );
+
+    if ( iSize.iUpdateId >= iOldId && iOldId != KErrNotFound )
+        {
+        LOGS( "CUpnpMessageHandlerSession::GetDeviceListSize OLD=NEW");
+        iDeviceListSizeRequested = ETrue;
+        }
+
+    if ( iSize.iUpdateId == 0 )
+        {
+        iMoreNewDevices = ETrue;
+        }
+
+    if ( !iDeviceListSizeRequested )
+        {
+        LOGS( "CUpnpMessageHandlerSession::GetDeviceListSize OLD>NEW");
+        iDeviceListSizeRequested = ETrue;
+
+        LOGS( "CUpnpMessageHandlerSession::New Devices Found");
+
+        if ( iMoreNewDevices && iDeviceListSizeMessage.Function()
+                == EGetDeviceListSize )
+            {
+
+            delete[] iAwaitingUpdateDevices;
+            iAwaitingUpdateDevices = NULL;
+
+            delete[] iAwaitingUpdateServices;
+            iAwaitingUpdateServices = NULL;
+
+            iEngine.DeviceLibrary()->GetUpdate( iSize.iUpdateId, iAwaitingUpdateDevices,
+                iAwaitingUpdateServices, iSize.iDeviceCount,
+                iSize.iServiceCount );
+            if ( iSize.iDeviceCount > 0 )
+                {
+                iOldId = iSize.iUpdateId;
+
+                iDeviceListSizeMessage.WriteL( 0, ptr );
+                aMessage.Complete( EGetDeviceListSizeComplete );
+                iDeviceListSizeRequested = EFalse;
+                }
+            }
+
+        iMoreNewDevices = EFalse;
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventGetDeviceListL
+// Get device list.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventGetDeviceListL(
+    const RMessage2 &aMessage )
+    {
+    LOGS( "CUpnpMessageHandlerSession::EventGetDeviceListL");
+    if ( !iDeviceListSizeRequested )
+        {
+        TPtr8 devPtr( reinterpret_cast<TUint8*>(iAwaitingUpdateDevices),
+            sizeof(TUpnpDevice)*iSize.iDeviceCount, sizeof(TUpnpDevice)
+                    *iSize.iDeviceCount);
+        TPtr8 servPtr( reinterpret_cast<TUint8*>(iAwaitingUpdateServices),
+            sizeof(TUpnpService)*iSize.iServiceCount, sizeof(TUpnpService)
+                    *iSize.iServiceCount);
+
+        aMessage.WriteL( 0, devPtr );
+        aMessage.WriteL( 1, servPtr );
+
+        delete[] iAwaitingUpdateDevices;
+        iAwaitingUpdateDevices = NULL;
+
+        delete[] iAwaitingUpdateServices;
+        iAwaitingUpdateServices = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventSsdpSearchL
+// SSDP search.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventSsdpSearchL( const RMessage2 &aMessage )
+    {
+    LOGS( "CUpnpMessageHandlerSession::EventSsdpSearchL");
+
+    // getting search string from client.
+    HBufC8* search= NULL;
+    HBufC8* mx= NULL;
+
+    TInt len = aMessage.GetDesLength( 0 );
+    TInt len2 = aMessage.GetDesLength( 1 );
+
+    if ( len > 0 )
+        {
+        search = HBufC8::NewLC( len );
+        search->Des().Zero();
+
+        mx = HBufC8::NewLC( len2 );
+        mx->Des().Zero();
+
+        TPtr8 searchPtr = search->Des();
+
+        aMessage.ReadL( 0, searchPtr );
+        if ( len2 )
+            {
+            TPtr8 mxPtr = mx->Des();
+            aMessage.ReadL( 1, mxPtr );
+            }
+
+        iDeviceListSizeRequested = EFalse;
+
+        iEngine.SsdpSearchL( *search, *mx );
+
+        CleanupStack::PopAndDestroy( mx );
+        CleanupStack::PopAndDestroy( search );
+        }
+    else
+        {
+        LOGS( "CUpnpMessageHandlerSession::EventSsdpSearchL");
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventActiveIapL
+// Activate IAP.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventActiveIapL( const RMessage2 &aMessage ) const
+    {
+    LOGS( "CUpnpMessageHandlerSession::EventActiveIapL");
+    TInt activeIap = iEngine.ActiveIap();
+    TPtr8 ptr( reinterpret_cast<TUint8*>(&activeIap), sizeof(TInt),
+        sizeof(TInt));
+
+    aMessage.WriteL( 0, ptr );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventRemoveLocalDeviceL
+// Remove local device.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventRemoveLocalDeviceL(
+    const RMessage2 &aMessage, TBool aSilent )
+    {
+    LOGS( "CUpnpMessageHandlerSession::EventRemoveLocalDeviceL");
+    TBuf8<KMaxUuidLength> uuid;
+
+    aMessage.ReadL( 0, uuid );
+
+    TInt pos( 0);
+    TInt error( 0);
+
+    error = iAddedDevices.Find( uuid, pos );
+    if ( error == KErrNone )
+        {
+        iAddedDevices.Delete( pos );
+        }
+
+    iDeviceListSizeRequested = EFalse;
+
+    iEngine.RemoveLocalDeviceL( uuid, aSilent );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventStartSsdp
+// Start SSPD.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpMessageHandlerSession::EventStartSsdpL()
+    {
+    LOGS( "CUpnpMessageHandlerSession::EventStartSsdp");
+    return iEngine.StartSsdpL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventIsSsdpStarted
+// Check SSPD.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventCheckErrorL( const RMessage2 &aMessage )
+    {
+    TBool isStarted;
+    isStarted = iMessageHandler.IsSsdpStarted();
+    TInt error = iMessageHandler.StartingError();
+    TPckgBuf<TInt> ptr;
+
+    if ( !isStarted )
+        {
+        ptr = error;
+        aMessage.WriteL( 0, ptr );
+        }
+    else
+        {
+        ptr = 0;
+        aMessage.WriteL( 0, ptr );
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::DeviceListChangeL
+// Device list change.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::DeviceListChangeL()
+    {
+    LOGS( "CUpnpMessageHandlerSession::DeviceListChange");
+    if( iDeviceListSizeRequested && !iDeviceListSizeMessage.IsNull() )
+        {
+        LOGS( "CUpnpMessageHandlerSession::New Devices Found");
+
+        TPtr8 ptr( reinterpret_cast<TUint8*>(&iSize), sizeof(iSize ),
+            sizeof(iSize ));
+
+        iDeviceListSizeMessage.ReadL( 0, ptr );
+
+        delete[] iAwaitingUpdateDevices;
+        iAwaitingUpdateDevices = NULL;
+
+        delete[] iAwaitingUpdateServices;
+        iAwaitingUpdateServices = NULL;
+
+        iEngine.DeviceLibrary()->GetUpdate( iSize.iUpdateId, iAwaitingUpdateDevices,
+            iAwaitingUpdateServices, iSize.iDeviceCount, iSize.iServiceCount );
+
+        iOldId = iSize.iUpdateId;
+
+        iDeviceListSizeMessage.WriteL( 0, ptr );
+        iDeviceListSizeMessage.Complete( EGetDeviceListSizeComplete );
+
+        iDeviceListSizeRequested = EFalse;
+        }
+    else
+        {
+        iMoreNewDevices = ETrue;
+        if ( iOldId != KErrNotFound )
+            {
+            iOldId++;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::CopyMessage
+// Copy message.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::CopyMessage( RMessage2& aMessage )
+    {
+    iDeviceListSizeMessage = aMessage;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::CancelPendingRequest
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::CompletePendingRequest()
+    {
+    LOGS( "CUpnpMessageHandlerSession::CancelPendingRequest");
+    if ( iDeviceListSizeRequested && !iDeviceListSizeMessage.IsNull() )
+        {
+        iDeviceListSizeMessage.Complete( EGetDeviceListSizeComplete );
+
+        iDeviceListSizeRequested = EFalse;
+        }
+    }
+
+#ifdef RD_UPNP_REMOTE_ACCESS
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventAddFilterAddrByIpL
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventAddFilterAddrByIpL( const RMessage2& aMessage )
+    {
+    TInetAddr addr;
+    TPtr8 ptr( reinterpret_cast<TUint8*>(&addr), sizeof( addr ),
+            sizeof( addr ) );
+
+    aMessage.ReadL( 0, ptr );
+
+    iEngine.AddAddressL( addr );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventAddFilterAddrByHostnameL
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//    
+void CUpnpMessageHandlerSession::EventAddFilterAddrByHostnameL( const RMessage2& aMessage )
+    {
+    TInt lenght( aMessage.GetDesLength(0) );
+    HBufC8* hostName = HBufC8::NewLC( lenght );
+    TPtr8 hostNamePtr( hostName->Des() );
+    aMessage.ReadL( 0, hostNamePtr );
+
+    iEngine.AddAddressL( aMessage, *hostName );
+
+    CleanupStack::PopAndDestroy( hostName );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventRemoveFilterAddrByIpL
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventRemoveFilterAddrByIpL( const RMessage2& aMessage )
+    {
+    TInetAddr addr;
+    TPtr8 ptr( reinterpret_cast<TUint8*>(&addr), sizeof( addr ),
+            sizeof( addr ) );
+
+    aMessage.ReadL( 0, ptr );
+
+    iEngine.RemoveAddressL( addr );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventRemoveFilterAddrByHostnameL
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventRemoveFilterAddrByHostnameL( const RMessage2& aMessage )
+    {
+    TInt lenght( aMessage.GetDesLength(0) );
+    HBufC8* hostName = HBufC8::NewLC( lenght );
+    TPtr8 hostNamePtr( hostName->Des() );
+    aMessage.ReadL( 0, hostNamePtr );
+
+    iEngine.RemoveAddressL( aMessage, *hostName );
+
+    CleanupStack::PopAndDestroy( hostName );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventRemoveAllIPsAddressesL
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//    
+void CUpnpMessageHandlerSession::EventRemoveAllIPsAddressesL( const RMessage2& /*aMessage*/)
+    {
+    iEngine.RemoveAll();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventIsIPAddressAllowedL
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//    
+TBool CUpnpMessageHandlerSession::EventIsIPAddressAllowedL( const RMessage2& aMessage)
+    {
+    TInetAddr addr;
+    TPtr8 ptr( reinterpret_cast<TUint8*>(&addr), sizeof( addr ),
+            sizeof( addr ) );
+
+    aMessage.ReadL( 0, ptr );
+
+    return iEngine.IsIPAllowed( addr );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventSubscriveIPListChanges
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventSubscriveIPListChanges( RMessage2& aMessage )
+    {
+
+    TPckgBuf<TInt> clientsSeqNo;
+    TPckgBuf<TInt> listSizeBuff;
+
+    aMessage.Read( 0 , clientsSeqNo );
+
+    if( clientsSeqNo() < iSeqNo )
+        {
+        clientsSeqNo = iSeqNo;
+        iEngine.IPFilteringStatus( listSizeBuff() );
+
+        aMessage.Write(0 , clientsSeqNo );
+        aMessage.Write(1 , listSizeBuff );
+        aMessage.Complete( KErrNone );
+        }
+    else
+        {
+        iIPListSizeMessage = aMessage;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::EventCancelIPListSubscription
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::EventCancelIPListSubscription( const RMessage2& /*aMessage*/)
+    {
+    if( !iIPListSizeMessage.IsNull() )
+        {
+        iIPListSizeMessage.Complete( KErrCancel );
+        }
+    }
+
+void CUpnpMessageHandlerSession::EventGetIPFilterListL( const RMessage2& aMessage )
+    {
+    const TPtrC8 listBuf( iEngine.GetIPFilterList() );
+
+    if( listBuf.Length()> aMessage.GetDesMaxLength( 0 ) )
+        {
+        aMessage.Complete( KErrOverflow );
+        return;
+        }
+
+    aMessage.WriteL( 0 , listBuf );
+    aMessage.Complete( KErrNone );
+
+    }
+#endif   
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::IPListChange
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::IPListChange()
+    {
+#ifdef RD_UPNP_REMOTE_ACCESS
+    TPckgBuf<TInt> currentSeqNo( iSeqNo++ );
+    TPckgBuf<TInt> listSizeBuff;
+
+    if( !iIPListSizeMessage.IsNull())
+        {
+        iEngine.IPFilteringStatus( listSizeBuff() );
+
+        iIPListSizeMessage.Write(0 , currentSeqNo );
+        iIPListSizeMessage.Write(1 , listSizeBuff );
+
+        iIPListSizeMessage.Complete( KErrNone );
+        }
+#endif    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpMessageHandlerSession::CancelPendingRequests
+// Cancel pending request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMessageHandlerSession::CancelPendingRequests()
+    {
+    if ( !iDeviceListSizeMessage.IsNull() )
+        {
+        iDeviceListSizeRequested = EFalse;
+        iDeviceListSizeMessage.Complete( KErrCancel );
+        }
+        
+#ifdef RD_UPNP_REMOTE_ACCESS
+    if ( !iIPListSizeMessage.IsNull() )
+        {
+        iIPListSizeMessage.Complete( KErrCancel );
+        }
+#endif    
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/src/upnpssdphandlerbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+/** @file
+* 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:  
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpssdphandlerbase.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerBase::CUpnpSsdpHandlerBase
+// -----------------------------------------------------------------------------
+// 
+CUpnpSsdpHandlerBase::CUpnpSsdpHandlerBase( MUpnpSsdpServerObserver& aObserver ) 
+       :iSsdpServerObserver( aObserver )
+    
+    {    
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerBase::~CUpnpSsdpHandlerBase
+// -----------------------------------------------------------------------------
+// 
+CUpnpSsdpHandlerBase::~CUpnpSsdpHandlerBase()
+    {
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/src/upnpssdphandlerdown.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,115 @@
+/** @file
+* 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:  
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpssdphandlerdown.h"
+#include "upnpssdpserver.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::CUpnpSsdpHandlerDown
+// -----------------------------------------------------------------------------
+// 
+CUpnpSsdpHandlerDown::CUpnpSsdpHandlerDown( 
+                               MUpnpSsdpServerObserver& aSsdpServerObserver )
+                               : CUpnpSsdpHandlerBase( aSsdpServerObserver )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::CUpnpSsdpHandlerDown
+// -----------------------------------------------------------------------------
+// 
+CUpnpSsdpHandlerDown::~CUpnpSsdpHandlerDown()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::CUpnpSsdpHandlerDown
+// -----------------------------------------------------------------------------
+// 
+CUpnpSsdpHandlerDown* CUpnpSsdpHandlerDown::NewL( 
+                              MUpnpSsdpServerObserver& aSsdpServerObserver )
+    {
+    CUpnpSsdpHandlerDown* self = new ( ELeave ) 
+                                 CUpnpSsdpHandlerDown( aSsdpServerObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::IsStarted
+// -----------------------------------------------------------------------------
+// 
+TBool CUpnpSsdpHandlerDown::IsStarted()
+    {
+    return ETrue;    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::ConstructL
+// -----------------------------------------------------------------------------
+// 
+void CUpnpSsdpHandlerDown::ConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::StartL
+// -----------------------------------------------------------------------------
+// 
+void CUpnpSsdpHandlerDown::StartL( RSocketServ& /*aServ*/ )
+    {    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::Stop
+// -----------------------------------------------------------------------------
+//     
+void CUpnpSsdpHandlerDown::Stop()
+    {    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::AddressChangeL
+// -----------------------------------------------------------------------------
+//     
+void CUpnpSsdpHandlerDown::AddressChangeL( TInetAddr& /*aAddress*/ )
+    {
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::SsdpSearchL
+// -----------------------------------------------------------------------------
+// 
+void CUpnpSsdpHandlerDown::SsdpSearchL( const TDesC8& /*aSearchString*/, TDesC8& /*aMX*/ )
+    {    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerDown::AdvertiseDeviceL
+// -----------------------------------------------------------------------------
+// 
+void CUpnpSsdpHandlerDown::AdvertiseDeviceL( TInt /*aLive*/,  CUpnpDeviceLibraryElement& /*aElement*/ )
+    {    
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/messagehandler/src/upnpssdphandlerup.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,292 @@
+/** @file
+* 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:
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpssdphandlerup.h"
+#include "upnpssdpserver.h"
+#include "upnpmsearchtimer.h"
+
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+#include "upnpmessagehandler.pan"
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::CUpnpSsdpHandlerUp
+// -----------------------------------------------------------------------------
+//
+CUpnpSsdpHandlerUp::CUpnpSsdpHandlerUp(
+                            MUpnpSsdpServerObserver& aSsdpServerObserver )
+                            : CUpnpSsdpHandlerBase( aSsdpServerObserver )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::~CUpnpSsdpHandlerUp
+// -----------------------------------------------------------------------------
+//
+CUpnpSsdpHandlerUp::~CUpnpSsdpHandlerUp()
+   {
+   ClearTimers();
+   delete iSsdpServer;
+   delete iMulticastSsdpServer;
+   }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::CUpnpSsdpHandlerUp
+// -----------------------------------------------------------------------------
+//
+CUpnpSsdpHandlerUp* CUpnpSsdpHandlerUp::NewL(
+                              MUpnpSsdpServerObserver& aSsdpServerObserver )
+    {
+    CUpnpSsdpHandlerUp* self = new ( ELeave )
+                               CUpnpSsdpHandlerUp( aSsdpServerObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpHandlerUp::ConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::StartL
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpHandlerUp::StartL( RSocketServ& aSocketServ )
+    {
+    if ( !iSsdpServer || !iMulticastSsdpServer )
+        {
+        delete iSsdpServer;
+        iSsdpServer = NULL;
+        iSsdpServer = CUpnpSsdpServer::NewL( &iSsdpServerObserver,
+                                             &aSocketServ,
+                                             KDefaultStartPort );
+
+        delete iMulticastSsdpServer;
+        iMulticastSsdpServer = NULL;
+        iMulticastSsdpServer = CUpnpSsdpServer::NewL( &iSsdpServerObserver,
+                                                      &aSocketServ,
+                                                      KDefaultMulticastPort,
+                                                      iSsdpServer );
+        }
+    iSsdpServer->StartL();
+    iMulticastSsdpServer->StartL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::Stop
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpHandlerUp::Stop()
+    {
+    __ASSERT_DEBUG( iSsdpServer && iMulticastSsdpServer,
+        User::Panic( KMessageHandler, EMessageHandlerBadState ) );
+    ClearTimers();
+    iSsdpServer->Stop();
+    iMulticastSsdpServer->Stop();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::AddressChangeL
+// -----------------------------------------------------------------------------
+//     
+void CUpnpSsdpHandlerUp::AddressChangeL( TInetAddr& aAddress )
+    {
+    iSsdpServer->AddressChangedL( aAddress );
+    iMulticastSsdpServer->AddressChangedL( aAddress );  
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::SsdpSearchL
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpHandlerUp::SsdpSearchL( const TDesC8& aSearchString, TDesC8& aMX )
+    {
+    __ASSERT_DEBUG( iSsdpServer && iMulticastSsdpServer,
+        User::Panic( KMessageHandler, EMessageHandlerBadState ) );
+
+    if ( iCPCounter == 0 )
+        {
+        for (TInt i(0); i < iTimers.Count(); i++ )
+            {
+            CUpnpMSearchTimer* timer = iTimers[i];
+            iTimers.Remove( i );
+            delete timer;
+            }
+        return;
+        }
+
+    TBuf8<KMXTimeBuffer> time;
+
+    CUpnpMSearchTimer* timer = CUpnpMSearchTimer::NewLC( this, aSearchString, aMX );
+    iTimers.AppendL( timer );
+    CleanupStack::Pop(timer);
+
+    TInt mx = timer->GetNextValue();
+    TInt t = timer->GetNextValue();
+    if ( mx > 0 )
+        {
+        time.Num(mx);
+        iSsdpServer->SearchL( const_cast<TDesC8&>( aSearchString ), time );
+        }
+    if ( t > 0 )
+        {
+        t = t * KSecond;
+        ( iTimers[( iTimers.Count() - 1 )] )->Start( t );
+        }
+    else
+        {
+        iTimers.Remove( iTimers.Count() - 1 );
+        delete timer;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::AddLocalControlPoint
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpSsdpHandlerUp::AddLocalControlPoint( )
+    {
+    return iCPCounter++;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::RemoveLocalControlPoint
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpSsdpHandlerUp::RemoveLocalControlPoint( )
+    {
+    iCPCounter--;
+    __ASSERT_ALWAYS( iCPCounter >= 0,
+        User::Panic( KMessageHandler, EMessageHandlerRemoveNonExistingCp ) );
+    return iCPCounter;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::AdvertiseDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpHandlerUp::AdvertiseDeviceL( TInt aLive,  CUpnpDeviceLibraryElement& aElement )
+    {
+    LOGSH( 0, "CUpnpMessageHandlerEngine::AdvertiseDeviceL");
+
+    __ASSERT_DEBUG( iSsdpServer && iMulticastSsdpServer,
+        User::Panic( KMessageHandler, EMessageHandlerBadState ) );
+    // forward advertisement requests to ssdp server
+    // depending on the element status, advertise ssdp:alive or ssdp:byebye
+
+    LOGSH( 0, "MESSAGE HANDLER ENGINE ADVERTISING");
+
+    if ( aLive )
+        {
+        iSsdpServer->AdvertiseAliveL( aElement );
+        }
+    else
+        {
+        iSsdpServer->AdvertiseByebyeL( aElement );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::TimerEventL
+// Callback function
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpHandlerUp::TimerEventL( CUpnpNotifyTimer* aTimer )
+    {
+    if ( !(aTimer->iStatus == KErrNone) )
+        {
+        return;
+        }
+
+    TInt i(0);
+    if ( !iCPCounter )
+        {
+        for (; i < iTimers.Count(); i++ )
+            {
+            CUpnpMSearchTimer* timer = iTimers[i];
+            iTimers.Remove( i );
+            delete timer;
+            }
+        return;
+        }
+
+    for (; i < iTimers.Count(); i++ )
+        {
+        if ( iTimers[i] == aTimer )
+            {
+            break;
+            }
+        }
+    if (i < iTimers.Count() )
+        {
+        TBuf8<KMXTimeBuffer> time;
+
+        TInt mx = iTimers[i]->GetNextValue();
+        TInt t = iTimers[i]->GetNextValue();
+        if ( mx > 0 )
+            {
+            time.Num( mx );
+            TPtrC8 ptr = iTimers[i]->GetTarget();
+            iSsdpServer->SearchL(ptr, time);
+            }
+        if ( t > 0 )
+            {
+            t = t * KSecond;
+            ( iTimers[( iTimers.Count() - 1 )])->Start( t );
+            }
+        else
+            {
+            CUpnpMSearchTimer* timer = iTimers[i];
+            iTimers.Remove(i);
+            delete timer;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::ClearTimers
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpHandlerUp::ClearTimers()
+    {
+    for ( TInt i(0); i < iTimers.Count(); i++ )
+        {
+        iTimers[i]->Cancel();
+        }
+    iTimers.ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpHandlerUp::IsStarted
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpSsdpHandlerUp::IsStarted()
+    {
+    return ( iSsdpServer && iMulticastSsdpServer );
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/rom/upnpstack.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,39 @@
+/** @file
+* 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:  IBY file for the UPnP Stack subsystem
+*
+*/
+
+
+#ifndef __UPNPSTACK_IBY__
+#define __UPNPSTACK_IBY__
+
+#ifdef __UPNP_STACK
+file=ABI_DIR\BUILD_DIR\upnpipserversutils.dll   \sys\bin\upnpipserversutils.dll 
+file=ABI_DIR\BUILD_DIR\dlnawebserver.dll    \sys\bin\dlnawebserver.dll 
+file=ABI_DIR\BUILD_DIR\upnpserviceframework.dll \sys\bin\upnpserviceframework.dll 
+file=ABI_DIR\BUILD_DIR\ssdpserver.dll       \sys\bin\ssdpserver.dll 
+file=ABI_DIR\BUILD_DIR\messagehandler.exe   \sys\bin\messagehandler.exe 
+file=ABI_DIR\BUILD_DIR\upnpcontrolpointbase.dll \sys\bin\upnpcontrolpointbase.dll 
+file=ABI_DIR\BUILD_DIR\httptransfer.dll \sys\bin\httptransfer.dll
+file=ABI_DIR\BUILD_DIR\upnpconnectionmanagersession.dll \sys\bin\upnpconnectionmanagersession.dll
+file=ABI_DIR\BUILD_DIR\upnpconnmanager.exe \sys\bin\upnpconnmanager.exe
+
+//Backup registartion
+data=DATAZ_\private\10204162\backup_registration.xml \private\10204162\backup_registration.xml
+#endif // __UPNP_STACK
+
+#endif // __UPNPSTACK_IBY__
+
+//  End of File  
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/rom/upnpstack_stub.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+/** @file
+* 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:  IBY file for stub SIS file for the UPnP Stack subsystem
+*
+*/
+
+
+#ifndef __UPNPSTACK_STUB_IBY__
+#define __UPNPSTACK_STUB_IBY__
+
+#ifdef __UPNP_STACK
+
+data=DATAZ_\system\install\upnpstack.SIS  \system\install\upnpstack.SIS 
+data=DATAZ_\system\install\homemedia.SIS  \system\install\homemedia.SIS 
+
+#endif // __UPNP_STACK
+
+#endif // __UPNPSTACK_STUB_IBY__
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/rom/upnpstack_withRADA.iby	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/** @file
+* 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:  IBY file for the UPnP Stack subsystem
+*
+*/
+
+
+#ifndef __UPNPSTACK_IBY__
+#define __UPNPSTACK_IBY__
+
+#ifdef __UPNP_STACK
+file=ABI_DIR\BUILD_DIR\ipserversutils.dll   \sys\bin\ipserversutils.dll 
+file=ABI_DIR\BUILD_DIR\upnpipserversutils.dll   \sys\bin\upnpipserversutils.dll 
+file=ABI_DIR\BUILD_DIR\dlnawebserver.dll    \sys\bin\dlnawebserver.dll 
+file=ABI_DIR\BUILD_DIR\upnpserviceframework.dll \sys\bin\upnpserviceframework.dll 
+file=ABI_DIR\BUILD_DIR\ssdpserver.dll       \sys\bin\ssdpserver.dll 
+file=ABI_DIR\BUILD_DIR\messagehandler.exe   \sys\bin\messagehandler.exe 
+file=ABI_DIR\BUILD_DIR\upnpcontrolpointbase.dll \sys\bin\upnpcontrolpointbase.dll 
+file=ABI_DIR\BUILD_DIR\controlpointbase.dll \sys\bin\controlpointbase.dll 
+file=ABI_DIR\BUILD_DIR\radasynchandler.exe \sys\bin\radasynchandler.exe
+file=ABI_DIR\BUILD_DIR\radaclient.dll \sys\bin\radaclient.dll
+file=ABI_DIR\BUILD_DIR\httptransfer.dll \sys\bin\httptransfer.dll
+file=ABI_DIR\BUILD_DIR\upnpconnectionmanagersession.dll \sys\bin\upnpconnectionmanagersession.dll
+file=ABI_DIR\BUILD_DIR\upnpconnmanager.exe \sys\bin\upnpconnmanager.exe
+
+data=DATAZ_\system\install\upnpstack.SIS  \system\install\upnpstack.SIS
+data=DATAZ_\private\10282C65\public\RadaSync1\RadaSync1.xml \private\10282C65\public\RadaSync1\RadaSync1.xml
+data=DATAZ_\private\10282C65\public\RadaSync1\RadaSyncService1.xml \private\10282C65\public\RadaSync1\RadaSyncService1.xml
+
+//Backup registartion
+data=DATAZ_\private\10204162\backup_registration.xml \private\10204162\backup_registration.xml
+#endif // __UPNP_STACK
+
+#endif // __UPNPSTACK_IBY__
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/BWINS/UpnpServiceFrameworku.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,262 @@
+EXPORTS
+	?MinValue@CUpnpStateVariable@@QAEHXZ @ 1 NONAME ; int CUpnpStateVariable::MinValue(void)
+	?SoapAction@CUpnpSoapMessage@@QAE?BVTPtrC8@@XZ @ 2 NONAME ; class TPtrC8 const CUpnpSoapMessage::SoapAction(void)
+	?DefaultValue@CUpnpStateVariable@@QAE?BVTPtrC8@@XZ @ 3 NONAME ; class TPtrC8 const CUpnpStateVariable::DefaultValue(void)
+	?ServiceList@CUpnpDevice@@QAEAAV?$RPointerArray@VCUpnpService@@@@XZ @ 4 NONAME ; class RPointerArray<class CUpnpService> & CUpnpDevice::ServiceList(void)
+	?EventingLC@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@ABVTDesC8@@AAVTInetAddr@@0K@Z @ 5 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::EventingLC(class TDesC8 const &, class TInetAddr &, class TDesC8 const &, unsigned long)
+	?DestinationAddr@CUpnpAction@@QBE?AVTInetAddr@@XZ @ 6 NONAME ; class TInetAddr CUpnpAction::DestinationAddr(void) const
+	?SoapResponseL@RUpnpSoapMessageFactory@@SAPAVCUpnpSoapMessage@@PAVCUpnpAction@@@Z @ 7 NONAME ; class CUpnpSoapMessage * RUpnpSoapMessageFactory::SoapResponseL(class CUpnpAction *)
+	?NewLC@CUpnpDispatcher@@SAPAV1@PAVMUpnpDiscoveryObserver@@@Z @ 8 NONAME ; class CUpnpDispatcher * CUpnpDispatcher::NewLC(class MUpnpDiscoveryObserver *)
+	?NewL@CUpnpAction@@SAPAV1@ABVTDesC8@@@Z @ 9 NONAME ; class CUpnpAction * CUpnpAction::NewL(class TDesC8 const &)
+	?StateVariableEvented@CUpnpServiceImplementation@@UAEXABVTDesC8@@@Z @ 10 NONAME ; void CUpnpServiceImplementation::StateVariableEvented(class TDesC8 const &)
+	?StartL@CUpnpSilentDeviceImplementation@@UAEXH@Z @ 11 NONAME ; void CUpnpSilentDeviceImplementation::StartL(int)
+	?SetControlUrl@CUpnpService@@QAEXPAVHBufC8@@@Z @ 12 NONAME ; void CUpnpService::SetControlUrl(class HBufC8 *)
+	?WaitServiceDescriptionCount@CUpnpDevice@@QAEHXZ @ 13 NONAME ; int CUpnpDevice::WaitServiceDescriptionCount(void)
+	?SubcribersAmount@CUpnpServiceImplementation@@QAEHXZ @ 14 NONAME ; int CUpnpServiceImplementation::SubcribersAmount(void)
+	??1CUpnpService@@UAE@XZ @ 15 NONAME ; CUpnpService::~CUpnpService(void)
+	?SetDescriptionPropertyL@CUpnpDeviceImplementationBase@@QAEXABVTDesC8@@0@Z @ 16 NONAME ; void CUpnpDeviceImplementationBase::SetDescriptionPropertyL(class TDesC8 const &, class TDesC8 const &)
+	?DeviceList@CUpnpDevice@@QAEAAV?$RPointerArray@VCUpnpDevice@@@@XZ @ 17 NONAME ; class RPointerArray<class CUpnpDevice> & CUpnpDevice::DeviceList(void)
+	?BaseConstructL@CUpnpServiceImplementation@@IAEXABVTDesC16@@ABVTDesC8@@@Z @ 18 NONAME ; void CUpnpServiceImplementation::BaseConstructL(class TDesC16 const &, class TDesC8 const &)
+	?SetServiceDescriptionUrl@CUpnpService@@QAEXPAVHBufC8@@@Z @ 19 NONAME ; void CUpnpService::SetServiceDescriptionUrl(class HBufC8 *)
+	?SendL@CUpnpServiceImplementation@@IAEXPAVCUpnpAction@@W4TUpnpErrorCode@@@Z @ 20 NONAME ; void CUpnpServiceImplementation::SendL(class CUpnpAction *, enum TUpnpErrorCode)
+	?GetAction@CUpnpService@@QAEHAAPAVCUpnpAction@@ABVTDesC8@@@Z @ 21 NONAME ; int CUpnpService::GetAction(class CUpnpAction * &, class TDesC8 const &)
+	?ControlUrl@CUpnpService@@QAE?BVTPtrC8@@XZ @ 22 NONAME ; class TPtrC8 const CUpnpService::ControlUrl(void)
+	?WaitServiceDescriptionRemoveSessionId@CUpnpDevice@@QAEXH@Z @ 23 NONAME ; void CUpnpDevice::WaitServiceDescriptionRemoveSessionId(int)
+	?Argument@CUpnpAction@@QAEPAVCUpnpArgument@@ABVTDesC8@@@Z @ 24 NONAME ; class CUpnpArgument * CUpnpAction::Argument(class TDesC8 const &)
+	?ResubscribeL@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@ABVTDesC8@@AAVTInetAddr@@0@Z @ 25 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::ResubscribeL(class TDesC8 const &, class TInetAddr &, class TDesC8 const &)
+	?AttachL@CUpnpContentHandlersController@@QAEXABVTDesC8@@AAVCUpnpService@@@Z @ 26 NONAME ; void CUpnpContentHandlersController::AttachL(class TDesC8 const &, class CUpnpService &)
+	?Seq@CUpnpGenaMessage@@QAEABVTDesC8@@XZ @ 27 NONAME ; class TDesC8 const & CUpnpGenaMessage::Seq(void)
+	?SetDeviceNetwork@CUpnpDevice@@QAEXW4TUpnpDeviceNetwork@1@@Z @ 28 NONAME ; void CUpnpDevice::SetDeviceNetwork(enum CUpnpDevice::TUpnpDeviceNetwork)
+	?Type@CUpnpStateVariable@@QAE?AW4TArgumentType@@XZ @ 29 NONAME ; enum TArgumentType CUpnpStateVariable::Type(void)
+	?StopHttpServer@CUpnpDispatcher@@QAEXXZ @ 30 NONAME ; void CUpnpDispatcher::StopHttpServer(void)
+	?SaveL@CUpnpDeviceDescriptionStore@@QAEXXZ @ 31 NONAME ; void CUpnpDeviceDescriptionStore::SaveL(void)
+	??1CUpnpSoapMessage@@UAE@XZ @ 32 NONAME ; CUpnpSoapMessage::~CUpnpSoapMessage(void)
+	?SoapRequestL@RUpnpSoapMessageFactory@@SAPAVCUpnpSoapMessage@@PAVCUpnpAction@@@Z @ 33 NONAME ; class CUpnpSoapMessage * RUpnpSoapMessageFactory::SoapRequestL(class CUpnpAction *)
+	?ConcatWithUrlBaseL@CUpnpDevice@@QAEPAVHBufC8@@ABVTDesC8@@@Z @ 34 NONAME ; class HBufC8 * CUpnpDevice::ConcatWithUrlBaseL(class TDesC8 const &)
+	?UpdateIconL@CUpnpDeviceDescriptionStore@@QAEXABVCUpnpIcon@@@Z @ 35 NONAME ; void CUpnpDeviceDescriptionStore::UpdateIconL(class CUpnpIcon const &)
+	?Sid@CUpnpGenaMessage@@QAEAAVTDesC8@@XZ @ 36 NONAME ; class TDesC8 & CUpnpGenaMessage::Sid(void)
+	?UpdateDevicesL@CUpnpDispatcher@@QAEXH@Z @ 37 NONAME ; void CUpnpDispatcher::UpdateDevicesL(int)
+	?Width@CUpnpIcon@@QBEHXZ @ 38 NONAME ; int CUpnpIcon::Width(void) const
+	?Path@CUpnpService@@QAEABVTDesC8@@XZ @ 39 NONAME ; class TDesC8 const & CUpnpService::Path(void)
+	?IconListL@CUpnpDeviceDescriptionStore@@QAE?AV?$RPointerArray@VCUpnpIcon@@@@XZ @ 40 NONAME ; class RPointerArray<class CUpnpIcon> CUpnpDeviceDescriptionStore::IconListL(void)
+	?SessionId@CUpnpAction@@QBEHXZ @ 41 NONAME ; int CUpnpAction::SessionId(void) const
+	??1CUpnpGenaMessage@@UAE@XZ @ 42 NONAME ; CUpnpGenaMessage::~CUpnpGenaMessage(void)
+	?StopL@CUpnpDeviceImplementation@@UAEXXZ @ 43 NONAME ; void CUpnpDeviceImplementation::StopL(void)
+	?SendL@CUpnpServiceImplementation@@UAEXPAVCUpnpHttpMessage@@@Z @ 44 NONAME ; void CUpnpServiceImplementation::SendL(class CUpnpHttpMessage *)
+	?SetAddress@CUpnpDevice@@QAEXABVTInetAddr@@@Z @ 45 NONAME ; void CUpnpDevice::SetAddress(class TInetAddr const &)
+	?MimeType@CUpnpIcon@@QBE?BVTPtrC8@@XZ @ 46 NONAME ; class TPtrC8 const CUpnpIcon::MimeType(void) const
+	?EventedStateVariables@CUpnpServiceImplementation@@QAEAAV?$RPointerArray@VCUpnpStateVariable@@@@XZ @ 47 NONAME ; class RPointerArray<class CUpnpStateVariable> & CUpnpServiceImplementation::EventedStateVariables(void)
+	?SubscribeResponseL@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@HABVTInetAddr@@ABVTDesC8@@1@Z @ 48 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::SubscribeResponseL(int, class TInetAddr const &, class TDesC8 const &, class TDesC8 const &)
+	?MessageReceivedLD@CUpnpServiceImplementation@@UAEXPAVCUpnpHttpMessage@@@Z @ 49 NONAME ; void CUpnpServiceImplementation::MessageReceivedLD(class CUpnpHttpMessage *)
+	?SubscribeResponseL@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@HABVTInetAddr@@HABVTDesC8@@1@Z @ 50 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::SubscribeResponseL(int, class TInetAddr const &, int, class TDesC8 const &, class TDesC8 const &)
+	?StateVariableList@CUpnpService@@QBE?AV?$RPointerArray@VCUpnpStateVariable@@@@XZ @ 51 NONAME ; class RPointerArray<class CUpnpStateVariable> CUpnpService::StateVariableList(void) const
+	?NewL@CUpnpGenaMessage@@SAPAV1@ABVTInetAddr@@@Z @ 52 NONAME ; class CUpnpGenaMessage * CUpnpGenaMessage::NewL(class TInetAddr const &)
+	?RemoveIconsL@CUpnpDeviceDescriptionStore@@QAEXXZ @ 53 NONAME ; void CUpnpDeviceDescriptionStore::RemoveIconsL(void)
+	?UpdateActionWithOKResponseL@CUpnpContentHandlersController@@QAEXPAVCUpnpSoapMessage@@PAVCUpnpAction@@@Z @ 54 NONAME ; void CUpnpContentHandlersController::UpdateActionWithOKResponseL(class CUpnpSoapMessage *, class CUpnpAction *)
+	?Nt@CUpnpGenaMessage@@QAEAAVTDesC8@@XZ @ 55 NONAME ; class TDesC8 & CUpnpGenaMessage::Nt(void)
+	?RemoveCustomer@CUpnpDispatcher@@QAEXABVMUpnpDispatcherCustomer@@@Z @ 56 NONAME ; void CUpnpDispatcher::RemoveCustomer(class MUpnpDispatcherCustomer const &)
+	?SetExpired@CUpnpDevice@@QAEXH@Z @ 57 NONAME ; void CUpnpDevice::SetExpired(int)
+	?RemoveTagL@CUpnpDeviceDescriptionStore@@QAEXABVTDesC8@@@Z @ 58 NONAME ; void CUpnpDeviceDescriptionStore::RemoveTagL(class TDesC8 const &)
+	?ServiceDescriptionUrl@CUpnpDevice@@QAE?BVTPtrC8@@ABVTDesC8@@@Z @ 59 NONAME ; class TPtrC8 const CUpnpDevice::ServiceDescriptionUrl(class TDesC8 const &)
+	?ParseSilentDeviceImplL@CUpnpContentHandlersController@@QAEPAVCUpnpSilentDeviceImplementation@@ABVTDesC8@@@Z @ 60 NONAME ; class CUpnpSilentDeviceImplementation * CUpnpContentHandlersController::ParseSilentDeviceImplL(class TDesC8 const &)
+	?SubscriptionUrl@CUpnpService@@QAE?BVTPtrC8@@XZ @ 61 NONAME ; class TPtrC8 const CUpnpService::SubscriptionUrl(void)
+	?ServiceId@CUpnpDevice@@QAE?BVTPtrC8@@ABVTDesC8@@@Z @ 62 NONAME ; class TPtrC8 const CUpnpDevice::ServiceId(class TDesC8 const &)
+	?WaitServiceDescriptionL@CUpnpDevice@@QAEXH@Z @ 63 NONAME ; void CUpnpDevice::WaitServiceDescriptionL(int)
+	?SendMessageL@CUpnpDispatcher@@QAEXPAVCUpnpHttpMessage@@AAVMUpnpDispatcherCustomer@@H@Z @ 64 NONAME ; void CUpnpDispatcher::SendMessageL(class CUpnpHttpMessage *, class MUpnpDispatcherCustomer &, int)
+	?SendL@CUpnpServiceImplementation@@QAEXPAVCUpnpSoapMessage@@W4TUpnpErrorCode@@@Z @ 65 NONAME ; void CUpnpServiceImplementation::SendL(class CUpnpSoapMessage *, enum TUpnpErrorCode)
+	?ParseDeviceL@CUpnpContentHandlersController@@QAEXABVTDesC8@@PAVCUpnpDevice@@@Z @ 66 NONAME ; void CUpnpContentHandlersController::ParseDeviceL(class TDesC8 const &, class CUpnpDevice *)
+	?SetValueL@CUpnpStateVariable@@QAEXABVTDesC8@@H@Z @ 67 NONAME ; void CUpnpStateVariable::SetValueL(class TDesC8 const &, int)
+	?InetAddress@CUpnpDeviceDescriptionRequest@@QAEXAAVTInetAddr@@@Z @ 68 NONAME ; void CUpnpDeviceDescriptionRequest::InetAddress(class TInetAddr &)
+	?SendL@CUpnpHttpClientEngine@@QAEXAAVCUpnpHttpTransaction@@@Z @ 69 NONAME ; void CUpnpHttpClientEngine::SendL(class CUpnpHttpTransaction &)
+	?AddIcon@CUpnpDevice@@QAE?AW4TIconAdd@1@H@Z @ 70 NONAME ; enum CUpnpDevice::TIconAdd CUpnpDevice::AddIcon(int)
+	?UnsubscribeL@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@ABVTDesC8@@AAVTInetAddr@@0@Z @ 71 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::UnsubscribeL(class TDesC8 const &, class TInetAddr &, class TDesC8 const &)
+	?SubscribeL@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@ABVTDesC8@@AAVTInetAddr@@0@Z @ 72 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::SubscribeL(class TDesC8 const &, class TInetAddr &, class TDesC8 const &)
+	?ParseSilentDeviceImplL@CUpnpContentHandlersController@@QAEXABVTDesC8@@PAVCUpnpSilentDeviceImplementation@@@Z @ 73 NONAME ; void CUpnpContentHandlersController::ParseSilentDeviceImplL(class TDesC8 const &, class CUpnpSilentDeviceImplementation *)
+	??0CUpnpServiceImplementation@@QAE@AAVCUpnpDevice@@@Z @ 74 NONAME ; CUpnpServiceImplementation::CUpnpServiceImplementation(class CUpnpDevice &)
+	?AddIconL@CUpnpDevice@@QAEXPAVCUpnpIcon@@@Z @ 75 NONAME ; void CUpnpDevice::AddIconL(class CUpnpIcon *)
+	?Value@CUpnpStateVariable@@QAE?BVTPtrC8@@XZ @ 76 NONAME ; class TPtrC8 const CUpnpStateVariable::Value(void)
+	?Error@CUpnpAction@@QBEHXZ @ 77 NONAME ; int CUpnpAction::Error(void) const
+	?AddLocalDeviceL@CUpnpDispatcher@@QAEXABVTDesC8@@00ABVCDesC8Array@@H@Z @ 78 NONAME ; void CUpnpDispatcher::AddLocalDeviceL(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, class CDesC8Array const &, int)
+	?WaitIconL@CUpnpDevice@@QAEXH@Z @ 79 NONAME ; void CUpnpDevice::WaitIconL(int)
+	?SoapResponseL@RUpnpSoapMessageFactory@@SAPAVCUpnpSoapMessage@@PAVCUpnpAction@@W4TUpnpErrorCode@@ABVTDesC8@@@Z @ 80 NONAME ; class CUpnpSoapMessage * RUpnpSoapMessageFactory::SoapResponseL(class CUpnpAction *, enum TUpnpErrorCode, class TDesC8 const &)
+	?SetSubscriptionUrl@CUpnpService@@QAEXPAVHBufC8@@@Z @ 81 NONAME ; void CUpnpService::SetSubscriptionUrl(class HBufC8 *)
+	?Address@CUpnpService@@QAE?AVTInetAddr@@XZ @ 82 NONAME ; class TInetAddr CUpnpService::Address(void)
+	??1CUpnpHttpTransaction@@UAE@XZ @ 83 NONAME ; CUpnpHttpTransaction::~CUpnpHttpTransaction(void)
+	?GetUserAgentL@CUpnpSettings@@SAPAVHBufC8@@XZ @ 84 NONAME ; class HBufC8 * CUpnpSettings::GetUserAgentL(void)
+	?AddCustomer@CUpnpDispatcher@@QAEXABVMUpnpDispatcherCustomer@@@Z @ 85 NONAME ; void CUpnpDispatcher::AddCustomer(class MUpnpDispatcherCustomer const &)
+	?Request@CUpnpHttpTransaction@@QAEPAVCUpnpHttpMessage@@XZ @ 86 NONAME ; class CUpnpHttpMessage * CUpnpHttpTransaction::Request(void)
+	?SetPropertyL@CUpnpDeviceDescriptionStore@@QAEXABVTDesC8@@00@Z @ 87 NONAME ; void CUpnpDeviceDescriptionStore::SetPropertyL(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &)
+	?Step@CUpnpStateVariable@@QAEHXZ @ 88 NONAME ; int CUpnpStateVariable::Step(void)
+	?Address@CUpnpDevice@@UAE?AVTInetAddr@@XZ @ 89 NONAME ; class TInetAddr CUpnpDevice::Address(void)
+	?UrlBase@CUpnpDevice@@QAE?BVTPtrC8@@XZ @ 90 NONAME ; class TPtrC8 const CUpnpDevice::UrlBase(void)
+	?Sender@CUpnpAction@@QAEAAVTInetAddr@@XZ @ 91 NONAME ; class TInetAddr & CUpnpAction::Sender(void)
+	?Depth@CUpnpIcon@@QBEHXZ @ 92 NONAME ; int CUpnpIcon::Depth(void) const
+	??1CUpnpDeviceImplementation@@UAE@XZ @ 93 NONAME ; CUpnpDeviceImplementation::~CUpnpDeviceImplementation(void)
+	?ParseServiceL@CUpnpContentHandlersController@@QAEXABVTDesC8@@PAVCUpnpService@@@Z @ 94 NONAME ; void CUpnpContentHandlersController::ParseServiceL(class TDesC8 const &, class CUpnpService *)
+	?Remote@CUpnpDevice@@QBEHXZ @ 95 NONAME ; int CUpnpDevice::Remote(void) const
+	?Get@CUpnpSettings@@QAEHIAAVTDes16@@@Z @ 96 NONAME ; int CUpnpSettings::Get(unsigned int, class TDes16 &)
+	?ConstructL@CUpnpService@@IAEXABVTDesC8@@0@Z @ 97 NONAME ; void CUpnpService::ConstructL(class TDesC8 const &, class TDesC8 const &)
+	?AddIconL@CUpnpDeviceImplementationBase@@QAEXABVCUpnpIcon@@@Z @ 98 NONAME ; void CUpnpDeviceImplementationBase::AddIconL(class CUpnpIcon const &)
+	?SetUrlL@CUpnpIcon@@QAEXABVTDesC8@@@Z @ 99 NONAME ; void CUpnpIcon::SetUrlL(class TDesC8 const &)
+	?GetAllDevices@CUpnpDevice@@QAEXAAV?$RPointerArray@VCUpnpDevice@@@@@Z @ 100 NONAME ; void CUpnpDevice::GetAllDevices(class RPointerArray<class CUpnpDevice> &)
+	?Address@CUpnpDeviceImplementationBase@@UAE?AVTInetAddr@@XZ @ 101 NONAME ; class TInetAddr CUpnpDeviceImplementationBase::Address(void)
+	?Uri@CUpnpDeviceDescriptionRequest@@QAE?AVTPtrC8@@XZ @ 102 NONAME ; class TPtrC8 CUpnpDeviceDescriptionRequest::Uri(void)
+	?SetStateVariableL@CUpnpServiceImplementation@@QAEXABVTDesC8@@0H@Z @ 103 NONAME ; void CUpnpServiceImplementation::SetStateVariableL(class TDesC8 const &, class TDesC8 const &, int)
+	?NewL@CUpnpDeviceDescriptionStore@@SAPAV1@ABVTDesC16@@@Z @ 104 NONAME ; class CUpnpDeviceDescriptionStore * CUpnpDeviceDescriptionStore::NewL(class TDesC16 const &)
+	?SetNameL@CUpnpStateVariable@@QAEXABVTDesC8@@@Z @ 105 NONAME ; void CUpnpStateVariable::SetNameL(class TDesC8 const &)
+	?GetIapL@CUpnpSettings@@SAHXZ @ 106 NONAME ; int CUpnpSettings::GetIapL(void)
+	?RemoveDescriptionPropertyL@CUpnpDeviceImplementationBase@@QAEXABVTDesC8@@@Z @ 107 NONAME ; void CUpnpDeviceImplementationBase::RemoveDescriptionPropertyL(class TDesC8 const &)
+	?ParseDeviceImplL@CUpnpContentHandlersController@@QAEXABVTDesC8@@PAVCUpnpDeviceImplementation@@@Z @ 108 NONAME ; void CUpnpContentHandlersController::ParseDeviceImplL(class TDesC8 const &, class CUpnpDeviceImplementation *)
+	?StartL@CUpnpDeviceImplementation@@UAEXH@Z @ 109 NONAME ; void CUpnpDeviceImplementation::StartL(int)
+	?SetValueL@CUpnpArgument@@QAEXABVTDesC8@@@Z @ 110 NONAME ; void CUpnpArgument::SetValueL(class TDesC8 const &)
+	?DescriptionUrlAddressL@CUpnpDevice@@QBE?AVTInetAddr@@XZ @ 111 NONAME ; class TInetAddr CUpnpDevice::DescriptionUrlAddressL(void) const
+	?ServiceType@CUpnpSoapMessage@@QAE?BVTPtrC8@@XZ @ 112 NONAME ; class TPtrC8 const CUpnpSoapMessage::ServiceType(void)
+	?Callback@CUpnpGenaMessage@@QAEAAVTDesC8@@XZ @ 113 NONAME ; class TDesC8 & CUpnpGenaMessage::Callback(void)
+	?SetDispatcher@CUpnpServiceImplementation@@QAEXPAVCUpnpDispatcher@@@Z @ 114 NONAME ; void CUpnpServiceImplementation::SetDispatcher(class CUpnpDispatcher *)
+	?AddEventVariable@CUpnpServiceImplementation@@QAEXABVCUpnpStateVariable@@H@Z @ 115 NONAME ; void CUpnpServiceImplementation::AddEventVariable(class CUpnpStateVariable const &, int)
+	?SetDestinationAddr@CUpnpAction@@QAEXABVTInetAddr@@@Z @ 116 NONAME ; void CUpnpAction::SetDestinationAddr(class TInetAddr const &)
+	?ServiceDescriptionUrl@CUpnpService@@QAE?BVTPtrC8@@XZ @ 117 NONAME ; class TPtrC8 const CUpnpService::ServiceDescriptionUrl(void)
+	?Local@CUpnpAction@@QBEHXZ @ 118 NONAME ; int CUpnpAction::Local(void) const
+	?SetPropertyL@CUpnpDeviceDescriptionStore@@QAEXABVTDesC8@@0@Z @ 119 NONAME ; void CUpnpDeviceDescriptionStore::SetPropertyL(class TDesC8 const &, class TDesC8 const &)
+	?Nts@CUpnpGenaMessage@@QAEAAVTDesC8@@XZ @ 120 NONAME ; class TDesC8 & CUpnpGenaMessage::Nts(void)
+	??0CUpnpService@@IAE@AAVCUpnpDevice@@@Z @ 121 NONAME ; CUpnpService::CUpnpService(class CUpnpDevice &)
+	??0CUpnpHttpTransaction@@IAE@PAVCUpnpHttpMessage@@@Z @ 122 NONAME ; CUpnpHttpTransaction::CUpnpHttpTransaction(class CUpnpHttpMessage *)
+	?Set@CUpnpSettings@@QAEHIABVTDesC16@@@Z @ 123 NONAME ; int CUpnpSettings::Set(unsigned int, class TDesC16 const &)
+	?RemoveIconsL@CUpnpDeviceImplementationBase@@QAEXXZ @ 124 NONAME ; void CUpnpDeviceImplementationBase::RemoveIconsL(void)
+	?UpdateActionWithErrorResponseL@CUpnpContentHandlersController@@QAEXPAVCUpnpSoapMessage@@PAVCUpnpAction@@@Z @ 125 NONAME ; void CUpnpContentHandlersController::UpdateActionWithErrorResponseL(class CUpnpSoapMessage *, class CUpnpAction *)
+	?Get@CUpnpSettings@@QAEHIAAH@Z @ 126 NONAME ; int CUpnpSettings::Get(unsigned int, int &)
+	?DeviceNetwork@CUpnpDevice@@QBE?AW4TUpnpDeviceNetwork@1@XZ @ 127 NONAME ; enum CUpnpDevice::TUpnpDeviceNetwork CUpnpDevice::DeviceNetwork(void) const
+	?AddAllowedValueL@CUpnpStateVariable@@QAEXABVTDesC8@@@Z @ 128 NONAME ; void CUpnpStateVariable::AddAllowedValueL(class TDesC8 const &)
+	?SoapResponseL@RUpnpSoapMessageFactory@@SAPAVCUpnpSoapMessage@@PAV2@W4TUpnpErrorCode@@@Z @ 129 NONAME ; class CUpnpSoapMessage * RUpnpSoapMessageFactory::SoapResponseL(class CUpnpSoapMessage *, enum TUpnpErrorCode)
+	?AddTagL@CUpnpDeviceDescriptionStore@@QAE?AVTXmlEngElement@@ABVTDesC8@@@Z @ 130 NONAME ; class TXmlEngElement CUpnpDeviceDescriptionStore::AddTagL(class TDesC8 const &)
+	?SetTypeL@CUpnpStateVariable@@QAEXABVTDesC8@@@Z @ 131 NONAME ; void CUpnpStateVariable::SetTypeL(class TDesC8 const &)
+	??0CUpnpGenaMessage@@AAE@XZ @ 132 NONAME ; CUpnpGenaMessage::CUpnpGenaMessage(void)
+	?StopIPFiltering@CUpnpDispatcher@@QAEXXZ @ 133 NONAME ; void CUpnpDispatcher::StopIPFiltering(void)
+	?StopFilteringL@CUpnpDispatcher@@QAEXABVTDesC8@@@Z @ 134 NONAME ; void CUpnpDispatcher::StopFilteringL(class TDesC8 const &)
+	?AllowedValuesLC@CUpnpStateVariable@@QAEPAVCDesC8Array@@XZ @ 135 NONAME ; class CDesC8Array * CUpnpStateVariable::AllowedValuesLC(void)
+	??1CUpnpIcon@@UAE@XZ @ 136 NONAME ; CUpnpIcon::~CUpnpIcon(void)
+	?ParseDeviceL@CUpnpContentHandlersController@@QAEPAVCUpnpDevice@@ABVTDesC8@@@Z @ 137 NONAME ; class CUpnpDevice * CUpnpContentHandlersController::ParseDeviceL(class TDesC8 const &)
+	?NewL@CUpnpDevice@@SAPAV1@PBVTUpnpDevice@@ABV?$RPointerArray@VTUpnpService@@@@@Z @ 138 NONAME ; class CUpnpDevice * CUpnpDevice::NewL(class TUpnpDevice const *, class RPointerArray<class TUpnpService> const &)
+	?ArgumentList@CUpnpAction@@QAEAAV?$RPointerArray@VCUpnpArgument@@@@XZ @ 139 NONAME ; class RPointerArray<class CUpnpArgument> & CUpnpAction::ArgumentList(void)
+	?Timeout@CUpnpGenaMessage@@QAEAAVTDesC8@@XZ @ 140 NONAME ; class TDesC8 & CUpnpGenaMessage::Timeout(void)
+	?GetDefaultValue@CUpnpStateVariable@@QAEXAAH@Z @ 141 NONAME ; void CUpnpStateVariable::GetDefaultValue(int &)
+	?Name@CUpnpAction@@QAEAAVTDesC8@@XZ @ 142 NONAME ; class TDesC8 & CUpnpAction::Name(void)
+	?Url@CUpnpIcon@@QBE?BVTPtrC8@@XZ @ 143 NONAME ; class TPtrC8 const CUpnpIcon::Url(void) const
+	?SetStateVariableL@CUpnpService@@QAEXABVTDesC8@@0@Z @ 144 NONAME ; void CUpnpService::SetStateVariableL(class TDesC8 const &, class TDesC8 const &)
+	?AddStateVariableL@CUpnpService@@QAEXPAVCUpnpStateVariable@@@Z @ 145 NONAME ; void CUpnpService::AddStateVariableL(class CUpnpStateVariable *)
+	?HttpServerAddress@CUpnpDispatcher@@QAE?AVTInetAddr@@XZ @ 146 NONAME ; class TInetAddr CUpnpDispatcher::HttpServerAddress(void)
+	?StateVariable@CUpnpService@@QAEPAVCUpnpStateVariable@@ABVTDesC8@@@Z @ 147 NONAME ; class CUpnpStateVariable * CUpnpService::StateVariable(class TDesC8 const &)
+	?NewL@CUpnpIcon@@SAPAV1@XZ @ 148 NONAME ; class CUpnpIcon * CUpnpIcon::NewL(void)
+	?SetArgumentL@CUpnpAction@@QAEHABVTDesC8@@0@Z @ 149 NONAME ; int CUpnpAction::SetArgumentL(class TDesC8 const &, class TDesC8 const &)
+	?WaitServiceDescriptionSessionId@CUpnpDevice@@QAEHH@Z @ 150 NONAME ; int CUpnpDevice::WaitServiceDescriptionSessionId(int)
+	?RemoveIconL@CUpnpDeviceImplementationBase@@QAEXABVTDesC8@@@Z @ 151 NONAME ; void CUpnpDeviceImplementationBase::RemoveIconL(class TDesC8 const &)
+	?ResubscribeL@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@ABVTDesC8@@AAVTInetAddr@@00@Z @ 152 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::ResubscribeL(class TDesC8 const &, class TInetAddr &, class TDesC8 const &, class TDesC8 const &)
+	??1CUpnpHttpClientEngine@@UAE@XZ @ 153 NONAME ; CUpnpHttpClientEngine::~CUpnpHttpClientEngine(void)
+	?DescriptionFile@CUpnpDeviceDescriptionStore@@QAEABVTDesC16@@XZ @ 154 NONAME ; class TDesC16 const & CUpnpDeviceDescriptionStore::DescriptionFile(void)
+	?RemoveIconL@CUpnpDeviceDescriptionStore@@QAEXABVTDesC8@@@Z @ 155 NONAME ; void CUpnpDeviceDescriptionStore::RemoveIconL(class TDesC8 const &)
+	?NewL@CUpnpSettings@@SAPAV1@VTUid@@@Z @ 156 NONAME ; class CUpnpSettings * CUpnpSettings::NewL(class TUid)
+	?ServiceIdL@CUpnpDevice@@QAEAAVCDesC8Array@@XZ @ 157 NONAME ; class CDesC8Array & CUpnpDevice::ServiceIdL(void)
+	?DestinationPath@CUpnpAction@@QAEABVTDesC8@@XZ @ 158 NONAME ; class TDesC8 const & CUpnpAction::DestinationPath(void)
+	?SetDestinationPathL@CUpnpAction@@QAEXABVTDesC8@@@Z @ 159 NONAME ; void CUpnpAction::SetDestinationPathL(class TDesC8 const &)
+	?SearchL@CUpnpDispatcher@@QAEXABVTDesC8@@@Z @ 160 NONAME ; void CUpnpDispatcher::SearchL(class TDesC8 const &)
+	?Icons@CUpnpDevice@@QAEAAV?$RPointerArray@VCUpnpIcon@@@@XZ @ 161 NONAME ; class RPointerArray<class CUpnpIcon> & CUpnpDevice::Icons(void)
+	?IsAdded@CUpnpService@@QAEHXZ @ 162 NONAME ; int CUpnpService::IsAdded(void)
+	?MaxValue@CUpnpStateVariable@@QAEHXZ @ 163 NONAME ; int CUpnpStateVariable::MaxValue(void)
+	?DescriptionUrl@CUpnpDevice@@QBEABVTDesC8@@XZ @ 164 NONAME ; class TDesC8 const & CUpnpDevice::DescriptionUrl(void) const
+	?GetIconlistElementL@CUpnpDeviceDescriptionStore@@AAE?AVTXmlEngElement@@XZ @ 165 NONAME ; class TXmlEngElement CUpnpDeviceDescriptionStore::GetIconlistElementL(void)
+	?NewLC@CUpnpGenaMessage@@SAPAV1@ABVTInetAddr@@@Z @ 166 NONAME ; class CUpnpGenaMessage * CUpnpGenaMessage::NewLC(class TInetAddr const &)
+	?ServiceType@CUpnpAction@@QAEAAVTDesC8@@XZ @ 167 NONAME ; class TDesC8 & CUpnpAction::ServiceType(void)
+	?Service@CUpnpAction@@QAEAAVCUpnpService@@XZ @ 168 NONAME ; class CUpnpService & CUpnpAction::Service(void)
+	?AddIconL@CUpnpDeviceDescriptionStore@@QAEXABVCUpnpIcon@@@Z @ 169 NONAME ; void CUpnpDeviceDescriptionStore::AddIconL(class CUpnpIcon const &)
+	?ArgumentValue@CUpnpAction@@QAEABVTDesC8@@ABV2@@Z @ 170 NONAME ; class TDesC8 const & CUpnpAction::ArgumentValue(class TDesC8 const &)
+	?NewL@CUpnpIcon@@SAPAV1@ABVTDesC16@@HHHABVTDesC8@@@Z @ 171 NONAME ; class CUpnpIcon * CUpnpIcon::NewL(class TDesC16 const &, int, int, int, class TDesC8 const &)
+	?DeviceType@CUpnpDevice@@QAE?BVTPtrC8@@XZ @ 172 NONAME ; class TPtrC8 const CUpnpDevice::DeviceType(void)
+	?Name@CUpnpStateVariable@@QAE?BVTPtrC8@@XZ @ 173 NONAME ; class TPtrC8 const CUpnpStateVariable::Name(void)
+	?Type@CUpnpArgument@@QAE?AW4TArgumentType@@XZ @ 174 NONAME ; enum TArgumentType CUpnpArgument::Type(void)
+	?NewL@CUpnpSoapMessage@@SAPAV1@AAVTDesC8@@ABVTInetAddr@@@Z @ 175 NONAME ; class CUpnpSoapMessage * CUpnpSoapMessage::NewL(class TDesC8 &, class TInetAddr const &)
+	?Path@CUpnpServiceImplementation@@UAEABVTDesC8@@XZ @ 176 NONAME ; class TDesC8 const & CUpnpServiceImplementation::Path(void)
+	?CloneL@CUpnpDevice@@QAEPAV1@XZ @ 177 NONAME ; class CUpnpDevice * CUpnpDevice::CloneL(void)
+	?Eventable@CUpnpStateVariable@@QAE?BVTPtrC8@@XZ @ 178 NONAME ; class TPtrC8 const CUpnpStateVariable::Eventable(void)
+	?InternalizeL@CUpnpIcon@@QAEXAAVRReadStream@@@Z @ 179 NONAME ; void CUpnpIcon::InternalizeL(class RReadStream &)
+	?ServiceType@CUpnpService@@QAEABVTDesC8@@XZ @ 180 NONAME ; class TDesC8 const & CUpnpService::ServiceType(void)
+	??1CUpnpAction@@UAE@XZ @ 181 NONAME ; CUpnpAction::~CUpnpAction(void)
+	?GetActionList@CUpnpService@@QAEXAAV?$RPointerArray@VCUpnpAction@@@@@Z @ 182 NONAME ; void CUpnpService::GetActionList(class RPointerArray<class CUpnpAction> &)
+	?NewLC@CUpnpHttpClientEngine@@SAPAV1@AAVMUpnpHttpClientObserver@@H@Z @ 183 NONAME ; class CUpnpHttpClientEngine * CUpnpHttpClientEngine::NewLC(class MUpnpHttpClientObserver &, int)
+	??1CUpnpServiceImplementation@@UAE@XZ @ 184 NONAME ; CUpnpServiceImplementation::~CUpnpServiceImplementation(void)
+	?RelatedStateVariable@CUpnpArgument@@QAEAAVTDesC8@@XZ @ 185 NONAME ; class TDesC8 & CUpnpArgument::RelatedStateVariable(void)
+	?GetIconBufferPtr@CUpnpIcon@@QBEABVTPtr8@@XZ @ 186 NONAME ; class TPtr8 const & CUpnpIcon::GetIconBufferPtr(void) const
+	?GetProperty@CUpnpDevice@@QAE?AVTPtrC8@@ABVTDesC8@@@Z @ 187 NONAME ; class TPtrC8 CUpnpDevice::GetProperty(class TDesC8 const &)
+	?SetEventableL@CUpnpStateVariable@@QAEXABVTDesC8@@@Z @ 188 NONAME ; void CUpnpStateVariable::SetEventableL(class TDesC8 const &)
+	?DescriptionProperty@CUpnpDevice@@QAE?BVTPtrC8@@ABVTDesC8@@@Z @ 189 NONAME ; class TPtrC8 const CUpnpDevice::DescriptionProperty(class TDesC8 const &)
+	?DescriptionUrlPath@CUpnpDevice@@QBE?BVTPtrC8@@XZ @ 190 NONAME ; class TPtrC8 const CUpnpDevice::DescriptionUrlPath(void) const
+	?NewL@CUpnpIcon@@SAPAV1@ABVTDesC16@@ABVTDesC8@@HHH1@Z @ 191 NONAME ; class CUpnpIcon * CUpnpIcon::NewL(class TDesC16 const &, class TDesC8 const &, int, int, int, class TDesC8 const &)
+	??1CUpnpDeviceImplementationBase@@UAE@XZ @ 192 NONAME ; CUpnpDeviceImplementationBase::~CUpnpDeviceImplementationBase(void)
+	?NewL@CUpnpDeviceImplementation@@SAPAV1@ABVTDesC8@@AAVCUpnpDeviceDescriptionStore@@AAVMUpnpDeviceDescriptionProvider@@@Z @ 193 NONAME ; class CUpnpDeviceImplementation * CUpnpDeviceImplementation::NewL(class TDesC8 const &, class CUpnpDeviceDescriptionStore &, class MUpnpDeviceDescriptionProvider &)
+	?SetUrlBaseL@CUpnpDevice@@QAEXABVTDesC8@@@Z @ 194 NONAME ; void CUpnpDevice::SetUrlBaseL(class TDesC8 const &)
+	?Property@CUpnpDeviceDescriptionStore@@QAE?AVTPtrC8@@ABVTDesC8@@@Z @ 195 NONAME ; class TPtrC8 CUpnpDeviceDescriptionStore::Property(class TDesC8 const &)
+	?AddServiceL@CUpnpDevice@@QAE?AW4TServiceAdd@1@HPAVCUpnpService@@@Z @ 196 NONAME ; enum CUpnpDevice::TServiceAdd CUpnpDevice::AddServiceL(int, class CUpnpService *)
+	?Response@CUpnpHttpTransaction@@QAEPAVCUpnpHttpMessage@@XZ @ 197 NONAME ; class CUpnpHttpMessage * CUpnpHttpTransaction::Response(void)
+	?ArgumentType@CUpnpAction@@QAEHABVTDesC8@@@Z @ 198 NONAME ; int CUpnpAction::ArgumentType(class TDesC8 const &)
+	?NewLC@CUpnpAction@@SAPAV1@AAV1@AAVCUpnpService@@@Z @ 199 NONAME ; class CUpnpAction * CUpnpAction::NewLC(class CUpnpAction &, class CUpnpService &)
+	?ToDes8L@CUpnpIcon@@QBEPAVHBufC8@@XZ @ 200 NONAME ; class HBufC8 * CUpnpIcon::ToDes8L(void) const
+	?Height@CUpnpIcon@@QBEHXZ @ 201 NONAME ; int CUpnpIcon::Height(void) const
+	?Alive@CUpnpDevice@@QBEHXZ @ 202 NONAME ; int CUpnpDevice::Alive(void) const
+	?SetVariableMaxEventRate@CUpnpServiceImplementation@@QAEXABVTDesC8@@H@Z @ 203 NONAME ; void CUpnpServiceImplementation::SetVariableMaxEventRate(class TDesC8 const &, int)
+	?Direction@CUpnpArgument@@QBEHXZ @ 204 NONAME ; int CUpnpArgument::Direction(void) const
+	?NewL@CUpnpSilentDeviceImplementation@@SAPAV1@ABVTDesC8@@AAVCUpnpDeviceDescriptionStore@@AAVMUpnpDeviceDescriptionProvider@@@Z @ 205 NONAME ; class CUpnpSilentDeviceImplementation * CUpnpSilentDeviceImplementation::NewL(class TDesC8 const &, class CUpnpDeviceDescriptionStore &, class MUpnpDeviceDescriptionProvider &)
+	?Expired@CUpnpDevice@@QBEHXZ @ 206 NONAME ; int CUpnpDevice::Expired(void) const
+	?UpdateIconL@CUpnpDeviceImplementationBase@@QAEXABVCUpnpIcon@@@Z @ 207 NONAME ; void CUpnpDeviceImplementationBase::UpdateIconL(class CUpnpIcon const &)
+	?StopL@CUpnpDeviceImplementation@@QAEXW4TStopMode@1@@Z @ 208 NONAME ; void CUpnpDeviceImplementation::StopL(enum CUpnpDeviceImplementation::TStopMode)
+	?ServiceTypesL@CUpnpDevice@@QAEAAVCDesC8Array@@XZ @ 209 NONAME ; class CDesC8Array & CUpnpDevice::ServiceTypesL(void)
+	?StopL@CUpnpSilentDeviceImplementation@@UAEXXZ @ 210 NONAME ; void CUpnpSilentDeviceImplementation::StopL(void)
+	?GetFileBufferSizeL@CUpnpSettings@@SAHXZ @ 211 NONAME ; int CUpnpSettings::GetFileBufferSizeL(void)
+	?GetL@CUpnpSettings@@QAEPAVHBufC8@@I@Z @ 212 NONAME ; class HBufC8 * CUpnpSettings::GetL(unsigned int)
+	?StateVariableValue@CUpnpServiceImplementation@@QAE?BVTPtrC8@@ABVTDesC8@@@Z @ 213 NONAME ; class TPtrC8 const CUpnpServiceImplementation::StateVariableValue(class TDesC8 const &)
+	?IsEmbeddDevice@CUpnpDevice@@QAEHXZ @ 214 NONAME ; int CUpnpDevice::IsEmbeddDevice(void)
+	?Property@CUpnpDeviceDescriptionStore@@QAE?AVTPtrC8@@ABVTDesC8@@0@Z @ 215 NONAME ; class TPtrC8 CUpnpDeviceDescriptionStore::Property(class TDesC8 const &, class TDesC8 const &)
+	?SetSender@CUpnpAction@@QAEXABVTInetAddr@@@Z @ 216 NONAME ; void CUpnpAction::SetSender(class TInetAddr const &)
+	?SetBitmapFilename@CUpnpIcon@@QAEXABVTDesC16@@@Z @ 217 NONAME ; void CUpnpIcon::SetBitmapFilename(class TDesC16 const &)
+	?PresentationUrl@CUpnpDevice@@QAE?BVTPtrC8@@XZ @ 218 NONAME ; class TPtrC8 const CUpnpDevice::PresentationUrl(void)
+	?StateVariable@CUpnpServiceImplementation@@QAEPAVCUpnpStateVariable@@ABVTDesC8@@@Z @ 219 NONAME ; class CUpnpStateVariable * CUpnpServiceImplementation::StateVariable(class TDesC8 const &)
+	?RemoveCustomer@CUpnpDispatcher@@QAEXABVMUpnpDispatcherCustomer@@H@Z @ 220 NONAME ; void CUpnpDispatcher::RemoveCustomer(class MUpnpDispatcherCustomer const &, int)
+	?NewL@CUpnpService@@SAPAV1@ABVTDesC8@@0AAVCUpnpDevice@@@Z @ 221 NONAME ; class CUpnpService * CUpnpService::NewL(class TDesC8 const &, class TDesC8 const &, class CUpnpDevice &)
+	?Set@CUpnpSettings@@QAEHIAAH@Z @ 222 NONAME ; int CUpnpSettings::Set(unsigned int, int &)
+	?NewL@CUpnpDispatcher@@SAPAV1@PAVMUpnpDiscoveryObserver@@@Z @ 223 NONAME ; class CUpnpDispatcher * CUpnpDispatcher::NewL(class MUpnpDiscoveryObserver *)
+	??1CUpnpDispatcher@@UAE@XZ @ 224 NONAME ; CUpnpDispatcher::~CUpnpDispatcher(void)
+	?NewL@CUpnpHttpClientEngine@@SAPAV1@AAVMUpnpHttpClientObserver@@H@Z @ 225 NONAME ; class CUpnpHttpClientEngine * CUpnpHttpClientEngine::NewL(class MUpnpHttpClientObserver &, int)
+	?ActionName@CUpnpSoapMessage@@QAE?BVTPtrC8@@XZ @ 226 NONAME ; class TPtrC8 const CUpnpSoapMessage::ActionName(void)
+	?Local@CUpnpDevice@@QBEHXZ @ 227 NONAME ; int CUpnpDevice::Local(void) const
+	?NewL@CUpnpContentHandlersController@@SAPAV1@XZ @ 228 NONAME ; class CUpnpContentHandlersController * CUpnpContentHandlersController::NewL(void)
+	?NewLC@CUpnpDeviceDescriptionStore@@SAPAV1@ABVTDesC16@@@Z @ 229 NONAME ; class CUpnpDeviceDescriptionStore * CUpnpDeviceDescriptionStore::NewLC(class TDesC16 const &)
+	?Value@CUpnpArgument@@QAEAAVTDesC8@@XZ @ 230 NONAME ; class TDesC8 & CUpnpArgument::Value(void)
+	?SetLocal@CUpnpAction@@QAEXH@Z @ 231 NONAME ; void CUpnpAction::SetLocal(int)
+	?SetError@CUpnpAction@@QAEXH@Z @ 232 NONAME ; void CUpnpAction::SetError(int)
+	?BitmapFilename@CUpnpIcon@@QBE?AV?$TBuf@$0BAA@@@XZ @ 233 NONAME ; class TBuf<256> CUpnpIcon::BitmapFilename(void) const
+	?StopIPFiltering@CUpnpDeviceImplementationBase@@QAEXXZ @ 234 NONAME ; void CUpnpDeviceImplementationBase::StopIPFiltering(void)
+	?ParseDeviceImplL@CUpnpContentHandlersController@@QAEPAVCUpnpDeviceImplementation@@ABVTDesC8@@@Z @ 235 NONAME ; class CUpnpDeviceImplementation * CUpnpContentHandlersController::ParseDeviceImplL(class TDesC8 const &)
+	?SetValueL@CUpnpStateVariable@@QAEXHH@Z @ 236 NONAME ; void CUpnpStateVariable::SetValueL(int, int)
+	?GetServerHeaderL@CUpnpSettings@@SAPAVHBufC8@@XZ @ 237 NONAME ; class HBufC8 * CUpnpSettings::GetServerHeaderL(void)
+	?ParseServiceL@CUpnpContentHandlersController@@QAEPAVCUpnpService@@ABVTDesC8@@PAVCUpnpDevice@@@Z @ 238 NONAME ; class CUpnpService * CUpnpContentHandlersController::ParseServiceL(class TDesC8 const &, class CUpnpDevice *)
+	?StartIPFilteringL@CUpnpDispatcher@@QAEXXZ @ 239 NONAME ; void CUpnpDispatcher::StartIPFilteringL(void)
+	?SearchL@CUpnpDispatcher@@QAEXABVTDesC16@@@Z @ 240 NONAME ; void CUpnpDispatcher::SearchL(class TDesC16 const &)
+	?StartIPFilteringL@CUpnpDeviceImplementationBase@@QAEXXZ @ 241 NONAME ; void CUpnpDeviceImplementationBase::StartIPFilteringL(void)
+	?BaseConstructL@CUpnpHttpTransaction@@IAEXXZ @ 242 NONAME ; void CUpnpHttpTransaction::BaseConstructL(void)
+	?UnsubscribeResponseL@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@HABVTInetAddr@@@Z @ 243 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::UnsubscribeResponseL(int, class TInetAddr const &)
+	?DescriptionUrlPort@CUpnpDevice@@QBEHXZ @ 244 NONAME ; int CUpnpDevice::DescriptionUrlPort(void) const
+	?SubscribeL@RUpnpGenaMessageFactory@@SAPAVCUpnpGenaMessage@@ABVTDesC8@@AAVTInetAddr@@00@Z @ 245 NONAME ; class CUpnpGenaMessage * RUpnpGenaMessageFactory::SubscribeL(class TDesC8 const &, class TInetAddr &, class TDesC8 const &, class TDesC8 const &)
+	?NewLC@CUpnpContentHandlersController@@SAPAV1@XZ @ 246 NONAME ; class CUpnpContentHandlersController * CUpnpContentHandlersController::NewLC(void)
+	?CreateActionLC@CUpnpService@@QAEPAVCUpnpAction@@ABVTDesC8@@@Z @ 247 NONAME ; class CUpnpAction * CUpnpService::CreateActionLC(class TDesC8 const &)
+	?AddCustomerL@CUpnpDispatcher@@QAEXABVMUpnpDispatcherCustomer@@H@Z @ 248 NONAME ; void CUpnpDispatcher::AddCustomerL(class MUpnpDispatcherCustomer const &, int)
+	?StartHttpServerL@CUpnpDispatcher@@QAEXHH@Z @ 249 NONAME ; void CUpnpDispatcher::StartHttpServerL(int, int)
+	?SetLocal@CUpnpDevice@@QAEXH@Z @ 250 NONAME ; void CUpnpDevice::SetLocal(int)
+	?SetAlive@CUpnpDevice@@QAEXH@Z @ 251 NONAME ; void CUpnpDevice::SetAlive(int)
+	?Device@CUpnpService@@QAEAAVCUpnpDevice@@XZ @ 252 NONAME ; class CUpnpDevice & CUpnpService::Device(void)
+	??1CUpnpSilentDeviceImplementation@@UAE@XZ @ 253 NONAME ; CUpnpSilentDeviceImplementation::~CUpnpSilentDeviceImplementation(void)
+	?SetL@CUpnpSettings@@QAEHIABVTDesC8@@@Z @ 254 NONAME ; int CUpnpSettings::SetL(unsigned int, class TDesC8 const &)
+	?SoapResponseL@RUpnpSoapMessageFactory@@SAPAVCUpnpSoapMessage@@PAVCUpnpAction@@W4TUpnpErrorCode@@@Z @ 255 NONAME ; class CUpnpSoapMessage * RUpnpSoapMessageFactory::SoapResponseL(class CUpnpAction *, enum TUpnpErrorCode)
+	?Uuid@CUpnpDevice@@QAE?BVTPtrC8@@XZ @ 256 NONAME ; class TPtrC8 const CUpnpDevice::Uuid(void)
+	?Name@CUpnpArgument@@QAEAAVTDesC8@@XZ @ 257 NONAME ; class TDesC8 & CUpnpArgument::Name(void)
+	??1CUpnpDeviceDescription@@UAE@XZ @ 258 NONAME ; CUpnpDeviceDescription::~CUpnpDeviceDescription(void)
+	??0CUpnpDeviceDescription@@QAE@XZ @ 259 NONAME ; CUpnpDeviceDescription::CUpnpDeviceDescription(void)
+	?SetDescriptionUrlL@CUpnpDeviceDescription@@QAEXABVTDesC8@@@Z @ 260 NONAME ; void CUpnpDeviceDescription::SetDescriptionUrlL(class TDesC8 const &)
+
Binary file upnp/upnpstack/serviceframework/data/2000f881.cre has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/data/backup_registration.xml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,4 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+    <proxy_data_manager SID="0x10202BE9" />
+</backup_registration>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/eabi/UpnpServiceFrameworku.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,334 @@
+EXPORTS
+	_ZN11CUpnpAction11ServiceTypeEv @ 1 NONAME
+	_ZN11CUpnpAction12ArgumentListEv @ 2 NONAME
+	_ZN11CUpnpAction12ArgumentTypeERK6TDesC8 @ 3 NONAME
+	_ZN11CUpnpAction12SetArgumentLERK6TDesC8S2_ @ 4 NONAME
+	_ZN11CUpnpAction13ArgumentValueERK6TDesC8 @ 5 NONAME
+	_ZN11CUpnpAction15DestinationPathEv @ 6 NONAME
+	_ZN11CUpnpAction18SetDestinationAddrERK9TInetAddr @ 7 NONAME
+	_ZN11CUpnpAction19SetDestinationPathLERK6TDesC8 @ 8 NONAME
+	_ZN11CUpnpAction4NameEv @ 9 NONAME
+	_ZN11CUpnpAction4NewLERK6TDesC8 @ 10 NONAME
+	_ZN11CUpnpAction5NewLCERS_R12CUpnpService @ 11 NONAME
+	_ZN11CUpnpAction6SenderEv @ 12 NONAME
+	_ZN11CUpnpAction7ServiceEv @ 13 NONAME
+	_ZN11CUpnpAction8ArgumentERK6TDesC8 @ 14 NONAME
+	_ZN11CUpnpAction8SetErrorEi @ 15 NONAME
+	_ZN11CUpnpAction8SetLocalEi @ 16 NONAME
+	_ZN11CUpnpAction9SetSenderERK9TInetAddr @ 17 NONAME
+	_ZN11CUpnpActionD0Ev @ 18 NONAME
+	_ZN11CUpnpActionD1Ev @ 19 NONAME
+	_ZN11CUpnpActionD2Ev @ 20 NONAME
+	_ZN11CUpnpDevice10DeviceListEv @ 21 NONAME
+	_ZN11CUpnpDevice10DeviceTypeEv @ 22 NONAME
+	_ZN11CUpnpDevice10ServiceIdLEv @ 23 NONAME
+	_ZN11CUpnpDevice10SetAddressERK9TInetAddr @ 24 NONAME
+	_ZN11CUpnpDevice10SetExpiredEi @ 25 NONAME
+	_ZN11CUpnpDevice11AddServiceLEiP12CUpnpService @ 26 NONAME
+	_ZN11CUpnpDevice11GetPropertyERK6TDesC8 @ 27 NONAME
+	_ZN11CUpnpDevice11ServiceListEv @ 28 NONAME
+	_ZN11CUpnpDevice11SetUrlBaseLERK6TDesC8 @ 29 NONAME
+	_ZN11CUpnpDevice13GetAllDevicesER13RPointerArrayIS_E @ 30 NONAME
+	_ZN11CUpnpDevice13ServiceTypesLEv @ 31 NONAME
+	_ZN11CUpnpDevice14IsEmbeddDeviceEv @ 32 NONAME
+	_ZN11CUpnpDevice15PresentationUrlEv @ 33 NONAME
+	_ZN11CUpnpDevice16SetDeviceNetworkENS_18TUpnpDeviceNetworkE @ 34 NONAME
+	_ZN11CUpnpDevice18ConcatWithUrlBaseLERK6TDesC8 @ 35 NONAME
+	_ZN11CUpnpDevice19DescriptionPropertyERK6TDesC8 @ 36 NONAME
+	_ZN11CUpnpDevice21ServiceDescriptionUrlERK6TDesC8 @ 37 NONAME
+	_ZN11CUpnpDevice23WaitServiceDescriptionLEi @ 38 NONAME
+	_ZN11CUpnpDevice27WaitServiceDescriptionCountEv @ 39 NONAME
+	_ZN11CUpnpDevice31WaitServiceDescriptionSessionIdEi @ 40 NONAME
+	_ZN11CUpnpDevice37WaitServiceDescriptionRemoveSessionIdEi @ 41 NONAME
+	_ZN11CUpnpDevice4NewLEPK11TUpnpDeviceRK13RPointerArrayI12TUpnpServiceE @ 42 NONAME
+	_ZN11CUpnpDevice4UuidEv @ 43 NONAME
+	_ZN11CUpnpDevice5IconsEv @ 44 NONAME
+	_ZN11CUpnpDevice6CloneLEv @ 45 NONAME
+	_ZN11CUpnpDevice7AddIconEi @ 46 NONAME
+	_ZN11CUpnpDevice7AddressEv @ 47 NONAME
+	_ZN11CUpnpDevice7UrlBaseEv @ 48 NONAME
+	_ZN11CUpnpDevice8AddIconLEP9CUpnpIcon @ 49 NONAME
+	_ZN11CUpnpDevice8SetAliveEi @ 50 NONAME
+	_ZN11CUpnpDevice8SetLocalEi @ 51 NONAME
+	_ZN11CUpnpDevice9ServiceIdERK6TDesC8 @ 52 NONAME
+	_ZN11CUpnpDevice9WaitIconLEi @ 53 NONAME
+	_ZN12CUpnpService10ConstructLERK6TDesC8S2_ @ 54 NONAME
+	_ZN12CUpnpService10ControlUrlEv @ 55 NONAME
+	_ZN12CUpnpService11ServiceTypeEv @ 56 NONAME
+	_ZN12CUpnpService13GetActionListER13RPointerArrayI11CUpnpActionE @ 57 NONAME
+	_ZN12CUpnpService13SetControlUrlEP6HBufC8 @ 58 NONAME
+	_ZN12CUpnpService13StateVariableERK6TDesC8 @ 59 NONAME
+	_ZN12CUpnpService14CreateActionLCERK6TDesC8 @ 60 NONAME
+	_ZN12CUpnpService15SubscriptionUrlEv @ 61 NONAME
+	_ZN12CUpnpService17AddStateVariableLEP18CUpnpStateVariable @ 62 NONAME
+	_ZN12CUpnpService17SetStateVariableLERK6TDesC8S2_ @ 63 NONAME
+	_ZN12CUpnpService18SetSubscriptionUrlEP6HBufC8 @ 64 NONAME
+	_ZN12CUpnpService21ServiceDescriptionUrlEv @ 65 NONAME
+	_ZN12CUpnpService24SetServiceDescriptionUrlEP6HBufC8 @ 66 NONAME
+	_ZN12CUpnpService4NewLERK6TDesC8S2_R11CUpnpDevice @ 67 NONAME
+	_ZN12CUpnpService4PathEv @ 68 NONAME
+	_ZN12CUpnpService6DeviceEv @ 69 NONAME
+	_ZN12CUpnpService7AddressEv @ 70 NONAME
+	_ZN12CUpnpService7IsAddedEv @ 71 NONAME
+	_ZN12CUpnpService9GetActionERP11CUpnpActionRK6TDesC8 @ 72 NONAME
+	_ZN12CUpnpServiceC1ER11CUpnpDevice @ 73 NONAME
+	_ZN12CUpnpServiceC2ER11CUpnpDevice @ 74 NONAME
+	_ZN12CUpnpServiceD0Ev @ 75 NONAME
+	_ZN12CUpnpServiceD1Ev @ 76 NONAME
+	_ZN12CUpnpServiceD2Ev @ 77 NONAME
+	_ZN13CUpnpArgument20RelatedStateVariableEv @ 78 NONAME
+	_ZN13CUpnpArgument4NameEv @ 79 NONAME
+	_ZN13CUpnpArgument4TypeEv @ 80 NONAME
+	_ZN13CUpnpArgument5ValueEv @ 81 NONAME
+	_ZN13CUpnpArgument9SetValueLERK6TDesC8 @ 82 NONAME
+	_ZN13CUpnpSettings13GetUserAgentLEv @ 83 NONAME
+	_ZN13CUpnpSettings16GetServerHeaderLEv @ 84 NONAME
+	_ZN13CUpnpSettings18GetFileBufferSizeLEv @ 85 NONAME
+	_ZN13CUpnpSettings3GetEjR6TDes16 @ 86 NONAME
+	_ZN13CUpnpSettings3GetEjRi @ 87 NONAME
+	_ZN13CUpnpSettings3SetEjRK7TDesC16 @ 88 NONAME
+	_ZN13CUpnpSettings3SetEjRi @ 89 NONAME
+	_ZN13CUpnpSettings4GetLEj @ 90 NONAME
+	_ZN13CUpnpSettings4NewLE4TUid @ 91 NONAME
+	_ZN13CUpnpSettings4SetLEjRK6TDesC8 @ 92 NONAME
+	_ZN13CUpnpSettings7GetIapLEv @ 93 NONAME
+	_ZN15CUpnpDispatcher11AddCustomerERK23MUpnpDispatcherCustomer @ 94 NONAME
+	_ZN15CUpnpDispatcher12AddCustomerLERK23MUpnpDispatcherCustomeri @ 95 NONAME
+	_ZN15CUpnpDispatcher12SendMessageLEP16CUpnpHttpMessageR23MUpnpDispatcherCustomeri @ 96 NONAME
+	_ZN15CUpnpDispatcher14RemoveCustomerERK23MUpnpDispatcherCustomer @ 97 NONAME
+	_ZN15CUpnpDispatcher14RemoveCustomerERK23MUpnpDispatcherCustomeri @ 98 NONAME
+	_ZN15CUpnpDispatcher14StopFilteringLERK6TDesC8 @ 99 NONAME
+	_ZN15CUpnpDispatcher14StopHttpServerEv @ 100 NONAME
+	_ZN15CUpnpDispatcher14UpdateDevicesLEi @ 101 NONAME
+	_ZN15CUpnpDispatcher15AddLocalDeviceLERK6TDesC8S2_S2_RK11CDesC8Arrayi @ 102 NONAME
+	_ZN15CUpnpDispatcher15StopIPFilteringEv @ 103 NONAME
+	_ZN15CUpnpDispatcher16StartHttpServerLEii @ 104 NONAME
+	_ZN15CUpnpDispatcher17HttpServerAddressEv @ 105 NONAME
+	_ZN15CUpnpDispatcher17StartIPFilteringLEv @ 106 NONAME
+	_ZN15CUpnpDispatcher4NewLEP22MUpnpDiscoveryObserver @ 107 NONAME
+	_ZN15CUpnpDispatcher5NewLCEP22MUpnpDiscoveryObserver @ 108 NONAME
+	_ZN15CUpnpDispatcher7SearchLERK6TDesC8 @ 109 NONAME
+	_ZN15CUpnpDispatcher7SearchLERK7TDesC16 @ 110 NONAME
+	_ZN15CUpnpDispatcherD0Ev @ 111 NONAME
+	_ZN15CUpnpDispatcherD1Ev @ 112 NONAME
+	_ZN15CUpnpDispatcherD2Ev @ 113 NONAME
+	_ZN16CUpnpGenaMessage2NtEv @ 114 NONAME
+	_ZN16CUpnpGenaMessage3NtsEv @ 115 NONAME
+	_ZN16CUpnpGenaMessage3SeqEv @ 116 NONAME
+	_ZN16CUpnpGenaMessage3SidEv @ 117 NONAME
+	_ZN16CUpnpGenaMessage4NewLERK9TInetAddr @ 118 NONAME
+	_ZN16CUpnpGenaMessage5NewLCERK9TInetAddr @ 119 NONAME
+	_ZN16CUpnpGenaMessage7TimeoutEv @ 120 NONAME
+	_ZN16CUpnpGenaMessage8CallbackEv @ 121 NONAME
+	_ZN16CUpnpGenaMessageC1Ev @ 122 NONAME
+	_ZN16CUpnpGenaMessageC2Ev @ 123 NONAME
+	_ZN16CUpnpGenaMessageD0Ev @ 124 NONAME
+	_ZN16CUpnpGenaMessageD1Ev @ 125 NONAME
+	_ZN16CUpnpGenaMessageD2Ev @ 126 NONAME
+	_ZN16CUpnpSoapMessage10ActionNameEv @ 127 NONAME
+	_ZN16CUpnpSoapMessage10SoapActionEv @ 128 NONAME
+	_ZN16CUpnpSoapMessage11ServiceTypeEv @ 129 NONAME
+	_ZN16CUpnpSoapMessage4NewLER6TDesC8RK9TInetAddr @ 130 NONAME
+	_ZN16CUpnpSoapMessageD0Ev @ 131 NONAME
+	_ZN16CUpnpSoapMessageD1Ev @ 132 NONAME
+	_ZN16CUpnpSoapMessageD2Ev @ 133 NONAME
+	_ZN18CUpnpStateVariable12DefaultValueEv @ 134 NONAME
+	_ZN18CUpnpStateVariable13SetEventableLERK6TDesC8 @ 135 NONAME
+	_ZN18CUpnpStateVariable15AllowedValuesLCEv @ 136 NONAME
+	_ZN18CUpnpStateVariable15GetDefaultValueERi @ 137 NONAME
+	_ZN18CUpnpStateVariable16AddAllowedValueLERK6TDesC8 @ 138 NONAME
+	_ZN18CUpnpStateVariable4NameEv @ 139 NONAME
+	_ZN18CUpnpStateVariable4StepEv @ 140 NONAME
+	_ZN18CUpnpStateVariable4TypeEv @ 141 NONAME
+	_ZN18CUpnpStateVariable5ValueEv @ 142 NONAME
+	_ZN18CUpnpStateVariable8MaxValueEv @ 143 NONAME
+	_ZN18CUpnpStateVariable8MinValueEv @ 144 NONAME
+	_ZN18CUpnpStateVariable8SetNameLERK6TDesC8 @ 145 NONAME
+	_ZN18CUpnpStateVariable8SetTypeLERK6TDesC8 @ 146 NONAME
+	_ZN18CUpnpStateVariable9EventableEv @ 147 NONAME
+	_ZN18CUpnpStateVariable9SetValueLERK6TDesC8i @ 148 NONAME
+	_ZN18CUpnpStateVariable9SetValueLEii @ 149 NONAME
+	_ZN20CUpnpHttpTransaction14BaseConstructLEv @ 150 NONAME
+	_ZN20CUpnpHttpTransaction7RequestEv @ 151 NONAME
+	_ZN20CUpnpHttpTransaction8ResponseEv @ 152 NONAME
+	_ZN20CUpnpHttpTransactionC2EP16CUpnpHttpMessage @ 153 NONAME
+	_ZN20CUpnpHttpTransactionD0Ev @ 154 NONAME
+	_ZN20CUpnpHttpTransactionD1Ev @ 155 NONAME
+	_ZN20CUpnpHttpTransactionD2Ev @ 156 NONAME
+	_ZN21CUpnpHttpClientEngine4NewLER23MUpnpHttpClientObserveri @ 157 NONAME
+	_ZN21CUpnpHttpClientEngine5NewLCER23MUpnpHttpClientObserveri @ 158 NONAME
+	_ZN21CUpnpHttpClientEngine5SendLER20CUpnpHttpTransaction @ 159 NONAME
+	_ZN23RUpnpGenaMessageFactory10EventingLCERK6TDesC8R9TInetAddrS2_m @ 160 NONAME
+	_ZN23RUpnpGenaMessageFactory10SubscribeLERK6TDesC8R9TInetAddrS2_ @ 161 NONAME
+	_ZN23RUpnpGenaMessageFactory10SubscribeLERK6TDesC8R9TInetAddrS2_S2_ @ 162 NONAME
+	_ZN23RUpnpGenaMessageFactory12ResubscribeLERK6TDesC8R9TInetAddrS2_ @ 163 NONAME
+	_ZN23RUpnpGenaMessageFactory12ResubscribeLERK6TDesC8R9TInetAddrS2_S2_ @ 164 NONAME
+	_ZN23RUpnpGenaMessageFactory12UnsubscribeLERK6TDesC8R9TInetAddrS2_ @ 165 NONAME
+	_ZN23RUpnpGenaMessageFactory18SubscribeResponseLEiRK9TInetAddrRK6TDesC8S5_ @ 166 NONAME
+	_ZN23RUpnpGenaMessageFactory18SubscribeResponseLEiRK9TInetAddriRK6TDesC8S5_ @ 167 NONAME
+	_ZN23RUpnpGenaMessageFactory20UnsubscribeResponseLEiRK9TInetAddr @ 168 NONAME
+	_ZN23RUpnpSoapMessageFactory12SoapRequestLEP11CUpnpAction @ 169 NONAME
+	_ZN23RUpnpSoapMessageFactory13SoapResponseLEP11CUpnpAction @ 170 NONAME
+	_ZN23RUpnpSoapMessageFactory13SoapResponseLEP11CUpnpAction14TUpnpErrorCode @ 171 NONAME
+	_ZN23RUpnpSoapMessageFactory13SoapResponseLEP11CUpnpAction14TUpnpErrorCodeRK6TDesC8 @ 172 NONAME
+	_ZN23RUpnpSoapMessageFactory13SoapResponseLEP16CUpnpSoapMessage14TUpnpErrorCode @ 173 NONAME
+	_ZN25CUpnpDeviceImplementation4NewLERK6TDesC8R27CUpnpDeviceDescriptionStoreR30MUpnpDeviceDescriptionProvider @ 174 NONAME
+	_ZN25CUpnpDeviceImplementation5StopLENS_9TStopModeE @ 175 NONAME
+	_ZN25CUpnpDeviceImplementation5StopLEv @ 176 NONAME
+	_ZN25CUpnpDeviceImplementation6StartLEi @ 177 NONAME
+	_ZN25CUpnpDeviceImplementationD0Ev @ 178 NONAME
+	_ZN25CUpnpDeviceImplementationD1Ev @ 179 NONAME
+	_ZN25CUpnpDeviceImplementationD2Ev @ 180 NONAME
+	_ZN26CUpnpServiceImplementation13SetDispatcherEP15CUpnpDispatcher @ 181 NONAME
+	_ZN26CUpnpServiceImplementation13StateVariableERK6TDesC8 @ 182 NONAME
+	_ZN26CUpnpServiceImplementation14BaseConstructLERK7TDesC16RK6TDesC8 @ 183 NONAME
+	_ZN26CUpnpServiceImplementation16AddEventVariableERK18CUpnpStateVariablei @ 184 NONAME
+	_ZN26CUpnpServiceImplementation16SubcribersAmountEv @ 185 NONAME
+	_ZN26CUpnpServiceImplementation17MessageReceivedLDEP16CUpnpHttpMessage @ 186 NONAME
+	_ZN26CUpnpServiceImplementation17SetStateVariableLERK6TDesC8S2_i @ 187 NONAME
+	_ZN26CUpnpServiceImplementation18StateVariableValueERK6TDesC8 @ 188 NONAME
+	_ZN26CUpnpServiceImplementation20StateVariableEventedERK6TDesC8 @ 189 NONAME
+	_ZN26CUpnpServiceImplementation21EventedStateVariablesEv @ 190 NONAME
+	_ZN26CUpnpServiceImplementation23SetVariableMaxEventRateERK6TDesC8i @ 191 NONAME
+	_ZN26CUpnpServiceImplementation4PathEv @ 192 NONAME
+	_ZN26CUpnpServiceImplementation5SendLEP11CUpnpAction14TUpnpErrorCode @ 193 NONAME
+	_ZN26CUpnpServiceImplementation5SendLEP16CUpnpHttpMessage @ 194 NONAME
+	_ZN26CUpnpServiceImplementation5SendLEP16CUpnpSoapMessage14TUpnpErrorCode @ 195 NONAME
+	_ZN26CUpnpServiceImplementationC2ER11CUpnpDevice @ 196 NONAME
+	_ZN26CUpnpServiceImplementationD0Ev @ 197 NONAME
+	_ZN26CUpnpServiceImplementationD1Ev @ 198 NONAME
+	_ZN26CUpnpServiceImplementationD2Ev @ 199 NONAME
+	_ZN27CUpnpDeviceDescriptionStore10RemoveTagLERK6TDesC8 @ 200 NONAME
+	_ZN27CUpnpDeviceDescriptionStore11RemoveIconLERK6TDesC8 @ 201 NONAME
+	_ZN27CUpnpDeviceDescriptionStore11UpdateIconLERK9CUpnpIcon @ 202 NONAME
+	_ZN27CUpnpDeviceDescriptionStore12RemoveIconsLEv @ 203 NONAME
+	_ZN27CUpnpDeviceDescriptionStore12SetPropertyLERK6TDesC8S2_ @ 204 NONAME
+	_ZN27CUpnpDeviceDescriptionStore12SetPropertyLERK6TDesC8S2_S2_ @ 205 NONAME
+	_ZN27CUpnpDeviceDescriptionStore15DescriptionFileEv @ 206 NONAME
+	_ZN27CUpnpDeviceDescriptionStore19GetIconlistElementLEv @ 207 NONAME
+	_ZN27CUpnpDeviceDescriptionStore4NewLERK7TDesC16 @ 208 NONAME
+	_ZN27CUpnpDeviceDescriptionStore5NewLCERK7TDesC16 @ 209 NONAME
+	_ZN27CUpnpDeviceDescriptionStore5SaveLEv @ 210 NONAME
+	_ZN27CUpnpDeviceDescriptionStore7AddTagLERK6TDesC8 @ 211 NONAME
+	_ZN27CUpnpDeviceDescriptionStore8AddIconLERK9CUpnpIcon @ 212 NONAME
+	_ZN27CUpnpDeviceDescriptionStore8PropertyERK6TDesC8 @ 213 NONAME
+	_ZN27CUpnpDeviceDescriptionStore8PropertyERK6TDesC8S2_ @ 214 NONAME
+	_ZN27CUpnpDeviceDescriptionStore9IconListLEv @ 215 NONAME
+	_ZN29CUpnpDeviceDescriptionRequest11InetAddressER9TInetAddr @ 216 NONAME
+	_ZN29CUpnpDeviceDescriptionRequest3UriEv @ 217 NONAME
+	_ZN29CUpnpDeviceImplementationBase11RemoveIconLERK6TDesC8 @ 218 NONAME
+	_ZN29CUpnpDeviceImplementationBase11UpdateIconLERK9CUpnpIcon @ 219 NONAME
+	_ZN29CUpnpDeviceImplementationBase12RemoveIconsLEv @ 220 NONAME
+	_ZN29CUpnpDeviceImplementationBase15StopIPFilteringEv @ 221 NONAME
+	_ZN29CUpnpDeviceImplementationBase17StartIPFilteringLEv @ 222 NONAME
+	_ZN29CUpnpDeviceImplementationBase23SetDescriptionPropertyLERK6TDesC8S2_ @ 223 NONAME
+	_ZN29CUpnpDeviceImplementationBase26RemoveDescriptionPropertyLERK6TDesC8 @ 224 NONAME
+	_ZN29CUpnpDeviceImplementationBase7AddressEv @ 225 NONAME
+	_ZN29CUpnpDeviceImplementationBase8AddIconLERK9CUpnpIcon @ 226 NONAME
+	_ZN29CUpnpDeviceImplementationBaseD0Ev @ 227 NONAME
+	_ZN29CUpnpDeviceImplementationBaseD1Ev @ 228 NONAME
+	_ZN29CUpnpDeviceImplementationBaseD2Ev @ 229 NONAME
+	_ZN30CUpnpContentHandlersController12ParseDeviceLERK6TDesC8 @ 230 NONAME
+	_ZN30CUpnpContentHandlersController12ParseDeviceLERK6TDesC8P11CUpnpDevice @ 231 NONAME
+	_ZN30CUpnpContentHandlersController13ParseServiceLERK6TDesC8P11CUpnpDevice @ 232 NONAME
+	_ZN30CUpnpContentHandlersController13ParseServiceLERK6TDesC8P12CUpnpService @ 233 NONAME
+	_ZN30CUpnpContentHandlersController16ParseDeviceImplLERK6TDesC8 @ 234 NONAME
+	_ZN30CUpnpContentHandlersController16ParseDeviceImplLERK6TDesC8P25CUpnpDeviceImplementation @ 235 NONAME
+	_ZN30CUpnpContentHandlersController22ParseSilentDeviceImplLERK6TDesC8 @ 236 NONAME
+	_ZN30CUpnpContentHandlersController22ParseSilentDeviceImplLERK6TDesC8P31CUpnpSilentDeviceImplementation @ 237 NONAME
+	_ZN30CUpnpContentHandlersController27UpdateActionWithOKResponseLEP16CUpnpSoapMessageP11CUpnpAction @ 238 NONAME
+	_ZN30CUpnpContentHandlersController30UpdateActionWithErrorResponseLEP16CUpnpSoapMessageP11CUpnpAction @ 239 NONAME
+	_ZN30CUpnpContentHandlersController4NewLEv @ 240 NONAME
+	_ZN30CUpnpContentHandlersController5NewLCEv @ 241 NONAME
+	_ZN30CUpnpContentHandlersController7AttachLERK6TDesC8R12CUpnpService @ 242 NONAME
+	_ZN31CUpnpSilentDeviceImplementation4NewLERK6TDesC8R27CUpnpDeviceDescriptionStoreR30MUpnpDeviceDescriptionProvider @ 243 NONAME
+	_ZN31CUpnpSilentDeviceImplementation5StopLEv @ 244 NONAME
+	_ZN31CUpnpSilentDeviceImplementation6StartLEi @ 245 NONAME
+	_ZN31CUpnpSilentDeviceImplementationD0Ev @ 246 NONAME
+	_ZN31CUpnpSilentDeviceImplementationD1Ev @ 247 NONAME
+	_ZN31CUpnpSilentDeviceImplementationD2Ev @ 248 NONAME
+	_ZN9CUpnpIcon12InternalizeLER11RReadStream @ 249 NONAME
+	_ZN9CUpnpIcon17SetBitmapFilenameERK7TDesC16 @ 250 NONAME
+	_ZN9CUpnpIcon4NewLERK7TDesC16RK6TDesC8iiiS5_ @ 251 NONAME
+	_ZN9CUpnpIcon4NewLERK7TDesC16iiiRK6TDesC8 @ 252 NONAME
+	_ZN9CUpnpIcon4NewLEv @ 253 NONAME
+	_ZN9CUpnpIcon7SetUrlLERK6TDesC8 @ 254 NONAME
+	_ZN9CUpnpIconD0Ev @ 255 NONAME
+	_ZN9CUpnpIconD1Ev @ 256 NONAME
+	_ZN9CUpnpIconD2Ev @ 257 NONAME
+	_ZNK11CUpnpAction15DestinationAddrEv @ 258 NONAME
+	_ZNK11CUpnpAction5ErrorEv @ 259 NONAME
+	_ZNK11CUpnpAction5LocalEv @ 260 NONAME
+	_ZNK11CUpnpAction9SessionIdEv @ 261 NONAME
+	_ZNK11CUpnpDevice13DeviceNetworkEv @ 262 NONAME
+	_ZNK11CUpnpDevice14DescriptionUrlEv @ 263 NONAME
+	_ZNK11CUpnpDevice18DescriptionUrlPathEv @ 264 NONAME
+	_ZNK11CUpnpDevice18DescriptionUrlPortEv @ 265 NONAME
+	_ZNK11CUpnpDevice22DescriptionUrlAddressLEv @ 266 NONAME
+	_ZNK11CUpnpDevice5AliveEv @ 267 NONAME
+	_ZNK11CUpnpDevice5LocalEv @ 268 NONAME
+	_ZNK11CUpnpDevice6RemoteEv @ 269 NONAME
+	_ZNK11CUpnpDevice7ExpiredEv @ 270 NONAME
+	_ZNK12CUpnpService17StateVariableListEv @ 271 NONAME
+	_ZNK13CUpnpArgument9DirectionEv @ 272 NONAME
+	_ZNK9CUpnpIcon14BitmapFilenameEv @ 273 NONAME
+	_ZNK9CUpnpIcon16GetIconBufferPtrEv @ 274 NONAME
+	_ZNK9CUpnpIcon3UrlEv @ 275 NONAME
+	_ZNK9CUpnpIcon5DepthEv @ 276 NONAME
+	_ZNK9CUpnpIcon5WidthEv @ 277 NONAME
+	_ZNK9CUpnpIcon6HeightEv @ 278 NONAME
+	_ZNK9CUpnpIcon7ToDes8LEv @ 279 NONAME
+	_ZNK9CUpnpIcon8MimeTypeEv @ 280 NONAME
+	_ZTI11CUpnpAction @ 281 NONAME ; #<TI>#
+	_ZTI11CUpnpDevice @ 282 NONAME ; #<TI>#
+	_ZTI12CUpnpService @ 283 NONAME ; #<TI>#
+	_ZTI13CUpnpArgument @ 284 NONAME ; #<TI>#
+	_ZTI13CUpnpSettings @ 285 NONAME ; #<TI>#
+	_ZTI15CUpnpDispatcher @ 286 NONAME ; #<TI>#
+	_ZTI16CUpnpGenaMessage @ 287 NONAME ; #<TI>#
+	_ZTI16CUpnpSoapMessage @ 288 NONAME ; #<TI>#
+	_ZTI18CUpnpStateVariable @ 289 NONAME ; #<TI>#
+	_ZTI20CUpnpHttpTransaction @ 290 NONAME ; #<TI>#
+	_ZTI21CUpnpDispatcherEngine @ 291 NONAME ; #<TI>#
+	_ZTI22CUpnpDispatcherRequest @ 292 NONAME ; #<TI>#
+	_ZTI22CUpnpSubscriberLibrary @ 293 NONAME ; #<TI>#
+	_ZTI24CUpnpDescriptionProperty @ 294 NONAME ; #<TI>#
+	_ZTI25CUpnpDeviceImplementation @ 295 NONAME ; #<TI>#
+	_ZTI26CUpnpServiceImplementation @ 296 NONAME ; #<TI>#
+	_ZTI27CUpnpDeviceDescriptionStore @ 297 NONAME ; #<TI>#
+	_ZTI29CUpnpDeviceImplementationBase @ 298 NONAME ; #<TI>#
+	_ZTI29CUpnpSubscriberLibraryElement @ 299 NONAME ; #<TI>#
+	_ZTI31CUpnpSilentDeviceImplementation @ 300 NONAME ; #<TI>#
+	_ZTI9CUpnpIcon @ 301 NONAME ; #<TI>#
+	_ZTV11CUpnpAction @ 302 NONAME ; #<VT>#
+	_ZTV11CUpnpDevice @ 303 NONAME ; #<VT>#
+	_ZTV12CUpnpService @ 304 NONAME ; #<VT>#
+	_ZTV13CUpnpArgument @ 305 NONAME ; #<VT>#
+	_ZTV13CUpnpSettings @ 306 NONAME ; #<VT>#
+	_ZTV15CUpnpDispatcher @ 307 NONAME ; #<VT>#
+	_ZTV16CUpnpGenaMessage @ 308 NONAME ; #<VT>#
+	_ZTV16CUpnpSoapMessage @ 309 NONAME ; #<VT>#
+	_ZTV18CUpnpStateVariable @ 310 NONAME ; #<VT>#
+	_ZTV20CUpnpHttpTransaction @ 311 NONAME ; #<VT>#
+	_ZTV21CUpnpDispatcherEngine @ 312 NONAME ; #<VT>#
+	_ZTV22CUpnpDispatcherRequest @ 313 NONAME ; #<VT>#
+	_ZTV22CUpnpSubscriberLibrary @ 314 NONAME ; #<VT>#
+	_ZTV24CUpnpDescriptionProperty @ 315 NONAME ; #<VT>#
+	_ZTV25CUpnpDeviceImplementation @ 316 NONAME ; #<VT>#
+	_ZTV26CUpnpServiceImplementation @ 317 NONAME ; #<VT>#
+	_ZTV27CUpnpDeviceDescriptionStore @ 318 NONAME ; #<VT>#
+	_ZTV29CUpnpDeviceImplementationBase @ 319 NONAME ; #<VT>#
+	_ZTV29CUpnpSubscriberLibraryElement @ 320 NONAME ; #<VT>#
+	_ZTV31CUpnpSilentDeviceImplementation @ 321 NONAME ; #<VT>#
+	_ZTV9CUpnpIcon @ 322 NONAME ; #<VT>#
+	_ZThn84_N26CUpnpServiceImplementation17MessageReceivedLDEP16CUpnpHttpMessage @ 323 NONAME ; #<thunk>#
+	_ZThn84_N26CUpnpServiceImplementation4PathEv @ 324 NONAME ; #<thunk>#
+	_ZN22CUpnpDeviceDescription18SetDescriptionUrlLERK6TDesC8 @ 325 NONAME
+	_ZN22CUpnpDeviceDescriptionC1Ev @ 326 NONAME
+	_ZN22CUpnpDeviceDescriptionC2Ev @ 327 NONAME
+	_ZN22CUpnpDeviceDescriptionD0Ev @ 328 NONAME
+	_ZN22CUpnpDeviceDescriptionD1Ev @ 329 NONAME
+	_ZN22CUpnpDeviceDescriptionD2Ev @ 330 NONAME
+	_ZTI22CUpnpDeviceDescription @ 331 NONAME ; #<TI>#
+	_ZTV22CUpnpDeviceDescription @ 332 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,49 @@
+/** @file
+* 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:  Build info for the ServiceFramework component
+*  Version     : %version: bh1mrt#37 %
+*
+*/
+
+#include "../../upnputils/inc/upnpcompvariant.hrh"
+
+PRJ_EXPORTS
+
+../inc/upnphttpclientengine.h               |../../inc/upnphttpclientengine.h
+../inc/upnphttpmessagesenderowner.h         |../../inc/upnphttpmessagesenderowner.h
+../inc/upnphttptransaction.h                |../../inc/upnphttptransaction.h
+../inc/upnpsoapmessagefactory.h             |../../../inc/upnpsoapmessagefactory.h
+../inc/upnpsoapmessage.h                    |../../inc/upnpsoapmessage.h
+../inc/upnpgenamessage.h                    |../../inc/upnpgenamessage.h
+../inc/upnpgenamessagefactory.h             |../../inc/upnpgenamessagefactory.h
+../inc/upnpdevicecontenthandler.h           |../../inc/upnpdevicecontenthandler.h
+../inc/upnpcontenthandlerscontroller.h      |../../inc/upnpcontenthandlerscontroller.h
+../inc/upnpsoapparser.h                     |../../inc/upnpsoapparser.h
+../inc/upnpsilentdeviceimplementation.h     |../../inc/upnpsilentdeviceimplementation.h
+
+#if defined(__HN_31__) || defined(__HN_32__)
+../data/2000f881.cre             /epoc32/winscw/c/private/10202be9/persists/2000f881.cre
+../data/backup_registration.xml  /epoc32/data/z/private/2000F883/backup_registration.xml
+../data/backup_registration.xml  /epoc32/release/winscw/udeb/z/private/2000F883/backup_registration.xml
+../data/backup_registration.xml  /epoc32/release/winscw/urel/z/private/2000F883/backup_registration.xml
+#else
+../data/backup_registration.xml  /epoc32/data/z/private/10204162/backup_registration.xml
+../data/backup_registration.xml  /epoc32/release/winscw/udeb/z/private/10204162/backup_registration.xml
+../data/backup_registration.xml  /epoc32/release/winscw/urel/z/private/10204162/backup_registration.xml
+#endif
+
+PRJ_MMPFILES
+upnpserviceframework.mmp
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/group/upnpserviceframework.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,156 @@
+/** @file
+* Copyright (c) 2002-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: 
+*  This is the project specification file for Upnp.
+*
+*/
+
+#include "../../../inc/upnpcompvariant.hrh"
+
+TARGETTYPE        dll
+#if defined(__HN_31__) || defined(__HN_32__)
+TARGET            hnserviceframework.dll
+UID               0x1000008d 0x2000F883
+#else
+TARGET            upnpserviceframework.dll
+UID               0x1000008d 0x2001B2B8
+#endif
+
+CAPABILITY        CAP_GENERAL_DLL
+VENDORID          VID_DEFAULT
+
+SOURCEPATH        ../src
+
+SOURCE            upnpservice.cpp
+SOURCE            upnpserviceimplementation.cpp
+SOURCE            upnpaction.cpp
+SOURCE            upnpargument.cpp
+SOURCE            upnpdevice.cpp
+SOURCE            upnpdeviceimplementationbase.cpp
+SOURCE            upnpdeviceimplementation.cpp
+SOURCE            upnpsilentdeviceimplementation.cpp
+SOURCE            upnpstatevariable.cpp
+SOURCE            upnpsubscriberlibrary.cpp
+SOURCE            upnpsubscriberlibraryelement.cpp
+SOURCE            upnpsoapmessage.cpp
+SOURCE            upnpsoapmessagefactory.cpp
+SOURCE            upnpgenamessage.cpp
+SOURCE            upnpgenamessagefactory.cpp
+SOURCE            upnpicon.cpp
+SOURCE            upnpdispatcher.cpp
+SOURCE            upnpdispatcherengine.cpp
+SOURCE            upnpdispatchersession.cpp
+SOURCE            upnpdispatcherrequest.cpp
+SOURCE            upnpsettings.cpp
+SOURCE            upnpdescriptionproperty.cpp
+SOURCE            upnpdevicecontenthandler.cpp
+SOURCE            upnpdevicedescriptionstore.cpp
+SOURCE            upnpcontenthandler.cpp
+SOURCE            upnpiconcontenthandler.cpp
+SOURCE            upnpscpdcontenthandler.cpp
+SOURCE            upnpactionlistcontenthandler.cpp
+SOURCE            upnpactioncontenthandler.cpp
+SOURCE            upnpactionnamecontenthandler.cpp
+SOURCE            upnpargumentlistcontenthandler.cpp
+SOURCE            upnpargumentcontenthandler.cpp
+SOURCE            upnpservicestatetablecontenthandler.cpp
+SOURCE            upnpstatevariablecontenthandler.cpp
+SOURCE            upnpallowedvaluerangecontenthandler.cpp
+SOURCE            upnpallowedvaluelistcontenthandler.cpp
+SOURCE            upnpignorecontenthandler.cpp
+SOURCE            upnpcontenthandlerscontroller.cpp
+SOURCE            upnpservicecontenthandler.cpp
+SOURCE            upnpdevicetagcontenthandler.cpp
+SOURCE            upnpiconlistcontenthandler.cpp
+SOURCE            upnpdevicelistcontenthandler.cpp
+SOURCE            upnpservicelistcontenthandler.cpp
+SOURCE            upnpservicetagcontenthandler.cpp
+SOURCE            upnppropertysetcontenthandler.cpp
+SOURCE            upnpsingletagcontenthandler.cpp
+SOURCE            upnpsoapcontenthandler.cpp
+SOURCE            upnpbodyofsoapcontenthandler.cpp
+SOURCE            upnperrorcodeseekercontenthandler.cpp
+SOURCE            upnpsoapparser.cpp
+SOURCE            upnprootcontenthandler.cpp
+SOURCE            upnphttpclientengine.cpp
+SOURCE            upnphttpmessagesender.cpp
+SOURCE            upnphttptransaction.cpp
+SOURCE            upnphttpinitialeventtransaction.cpp 
+SOURCE            upnphttpnonmoderatedeventtransaction.cpp
+SOURCE            upnphttpmoderatedeventtransaction.cpp
+SOURCE            upnpinitialeventqueuemanager.cpp
+SOURCE            upnpnonmoderatedeventqueuemanager.cpp
+SOURCE            upnpmoderatedeventqueuemanager.cpp
+SOURCE            upnpeventqueuemanagerbase.cpp
+SOURCE            upnpeventcontroller.cpp
+SOURCE            upnphttpservertransactionhandler.cpp
+SOURCE            upnphttpservertransactiondescription.cpp
+SOURCE            upnpdevicedescriptionrequest.cpp
+SOURCE		  upnpdevicedescription.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   ../../../inc
+SYSTEMINCLUDE   ../../inc
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../messagehandler/inc
+USERINCLUDE     ../../upnputils/inc
+USERINCLUDE     ../../dlnawebserver/inc
+
+LIBRARY           euser.lib
+LIBRARY           efsrv.lib
+LIBRARY           bafl.lib
+LIBRARY           insock.lib
+LIBRARY           esock.lib
+LIBRARY           commdb.lib
+LIBRARY           ecom.lib
+LIBRARY           http.lib
+
+// UPnP
+#if defined(__HN_31__) || defined(__HN_32__)
+LIBRARY           hndlnawebserver.lib
+LIBRARY           hnipserversutils.lib
+#else
+LIBRARY           dlnawebserver.lib
+LIBRARY           upnpipserversutils.lib
+LIBRARY           upnpconnectionmanagersession.lib
+#endif
+
+//LibXml2
+#if defined(__HN_31__)
+LIBRARY           wsstarxmlengineutils.lib
+LIBRARY           wsstarxmlenginedom.lib
+#else
+LIBRARY           xmlengineutils.lib
+LIBRARY           xmlenginedom.lib
+#endif
+LIBRARY           xmlframework.lib
+
+LIBRARY           inetprotutil.lib
+LIBRARY           estlib.lib
+//central repository
+LIBRARY           centralrepository.lib
+
+LIBRARY           flogger.lib
+LIBRARY           estor.lib
+DEFFILE           UpnpServiceFramework
+
+//end of file
+
+VERSION 10.1
+
+paged
+
+SMPSAFE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpactioncontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,106 @@
+/** @file
+* 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:  Declares the CUpnpActionContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPACTIONCONTENTHANDLER_H__
+#define __UPNPACTIONCONTENTHANDLER_H__
+
+#include <babitflags.h>
+#include "upnpcontenthandler.h"
+
+class CUpnpAction;
+
+using namespace Xml;
+
+/**
+ *  This class handles action subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS( CUpnpActionContentHandler ) : public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpActionContentHandler class
+     */
+    static CUpnpActionContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpAction& aResultAction );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpActionContentHandler class
+     */
+    static CUpnpActionContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpAction& aResultAction );
+
+    /**
+     * Destructor of CUpnpActionContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpActionContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     * This method is a callback to indicate the end of the element has been reached.
+     * @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     * This method is a callback that sends the content of the element.
+     * @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpActionContentHandler( CUpnpContentHandlersController& aController,
+            CUpnpAction& aResultAction );
+
+    /**
+     * 2nd phase constructor
+     * @since Series60 3.2     
+     */
+    void ConstructL();
+
+private:
+    CUpnpAction& iResultAction;
+    TBitFlags8 iFoundTags;
+    };
+
+#endif //__UPNPACTIONCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpactionlistcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,99 @@
+/** @file
+* 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:  Declares the CUpnpActionListContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPACTIONLISTCONTENTHANDLER_H__
+#define __UPNPACTIONLISTCONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpService;
+
+using namespace Xml;
+
+/**
+ *  This class handles action list subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS( CUpnpActionListContentHandler ) : public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpActionListContentHandler class
+     */
+    static CUpnpActionListContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aResultService );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpActionListContentHandler class
+     */
+    static CUpnpActionListContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aResultService );
+
+    /**
+     * Destructor of CUpnpActionListContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpActionListContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     This method is a callback to indicate the end of the element has been reached.
+     @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     This method is a callback that sends the content of the element.
+     @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpActionListContentHandler( CUpnpContentHandlersController& aController,
+            CUpnpService& aResultService );
+
+private:
+    CUpnpService& iResultService;
+
+    };
+
+#endif //__UPNPACTIONLISTCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpactionnamecontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,102 @@
+/** @file
+* 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:  Declares the CUpnpActionNameContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPACTIONNAMECONTENTHANDLER_H__
+#define __UPNPACTIONNAMECONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpAction;
+template<> class RPointerArray<CUpnpAction>;
+
+/**
+ *  This class handles action name subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+class CUpnpService;
+
+using namespace Xml;
+
+NONSHARABLE_CLASS( CUpnpActionNameContentHandler ) : public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpActionNameContentHandler class
+     */
+    static CUpnpActionNameContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpAction& aResultAction );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpActionNameContentHandler class
+     */
+    static CUpnpActionNameContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpAction& aResultAction );
+
+    /**
+     * Destructor of CUpnpActionNameContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpActionNameContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     This method is a callback to indicate the end of the element has been reached.
+     @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     This method is a callback that sends the content of the element.
+     @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpActionNameContentHandler( CUpnpContentHandlersController& aController,
+            CUpnpAction& aResultAction );
+
+private:
+    CUpnpAction& iResultAction;
+
+    };
+
+#endif //__UPNPACTIONNAMECONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpallowedvaluelistcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,101 @@
+/** @file
+* 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:  Declares the CUpnpAllowedValueListContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPALLOWEDVALUELISTCONTENTHANDLER_H__
+#define __UPNPALLOWEDVALUELISTCONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpStateVariable;
+
+using namespace Xml;
+
+/**
+ *  This class handles allowedvaluelist subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS( CUpnpAllowedValueListContentHandler ) : public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpAllowedValueListContentHandler class
+     */
+    static CUpnpAllowedValueListContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpStateVariable& aResultAction );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpAllowedValueListContentHandler class
+     */
+    static CUpnpAllowedValueListContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpStateVariable& aResultAction );
+
+    /**
+     * Destructor of CUpnpAllowedValueListContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpAllowedValueListContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     This method is a callback to indicate the end of the element has been reached.
+     @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     This method is a callback that sends the content of the element.
+     @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpAllowedValueListContentHandler( 
+        CUpnpContentHandlersController& aController,
+        CUpnpStateVariable& aResultAction );
+
+private:
+    CUpnpStateVariable& iResultStateVariable;
+    TBool iIsInsideAllowedValue;
+
+    };
+
+#endif //__UPNPALLOWEDVALUELISTCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpallowedvaluerangecontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,113 @@
+/** @file
+* 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:  Declares the CUpnpAllowedValueRangeContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPALLOWEDVALUERANGECONTENTHANDLER_H__
+#define __UPNPALLOWEDVALUERANGECONTENTHANDLER_H__
+
+#include <babitflags.h>
+#include "upnpcontenthandler.h"
+
+class CUpnpStateVariable;
+
+using namespace Xml;
+
+/**
+ *  This class handles allowedvaluerange subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent 
+ *  implementation of MContentHandler interface. It is designed to be 
+ *  used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS( CUpnpAllowedValueRangeContentHandler ) : 
+    public CUpnpContentHandler
+    {
+protected:
+    enum TState
+        {
+        EInitial,
+        EMinimum,
+        EMaximum,
+        EStep
+        };
+
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpAllowedValueRangeContentHandler class
+     */
+    static CUpnpAllowedValueRangeContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpStateVariable& aResultAction );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpAllowedValueRangeContentHandler class
+     */
+    static CUpnpAllowedValueRangeContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpStateVariable& aResultAction );
+
+    /**
+     * Destructor of CUpnpAllowedValueRangeContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpAllowedValueRangeContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     * This method is a callback to indicate the end of the element has been reached.
+     * @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     * This method is a callback that sends the content of the element.
+     * @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpAllowedValueRangeContentHandler( CUpnpContentHandlersController& aController,
+            CUpnpStateVariable& aResultAction );
+
+private:
+    CUpnpStateVariable& iResultStateVariable;
+    TState iCurrentState;
+    TBitFlags8 iFoundTags;
+
+    };
+
+#endif //__UPNPALLOWEDVALUERANGECONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpargumentcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,111 @@
+/** @file
+* 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:  Declares the CUpnpArgumentContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPARGUMENTCONTENTHANDLER_H__
+#define __UPNPARGUMENTCONTENTHANDLER_H__
+
+#include <babitflags.h>
+#include "upnpcontenthandler.h"
+
+class CUpnpArgument;
+
+using namespace Xml;
+
+/**
+ *  This class handles argument subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS( CUpnpArgumentContentHandler ) : public CUpnpContentHandler
+    {
+protected:
+    enum TState
+        {
+        EInitial,
+        EName,
+        EDirection,
+        ERelatedStateVariable
+        };
+
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpArgumentContentHandler class
+     */
+    static CUpnpArgumentContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpArgument& aResultAction );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpArgumentContentHandler class
+     */
+    static CUpnpArgumentContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpArgument& aResultAction );
+
+    /**
+     * Destructor of CUpnpArgumentContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpArgumentContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     * This method is a callback to indicate the end of the element has been reached.
+     * @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     * This method is a callback that sends the content of the element.
+     * @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpArgumentContentHandler( CUpnpContentHandlersController& aController,
+            CUpnpArgument& aResultAction );
+
+private:
+    CUpnpArgument& iResultArgument;
+    TState iCurrentState;
+    TBitFlags8 iFoundTags;
+
+    };
+
+#endif //__UPNPARGUMENTCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpargumentlistcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,101 @@
+/** @file
+* 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:  Declares the CUpnpArgumentListContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPARGUMENTLISTCONTENTHANDLER_H__
+#define __UPNPARGUMENTLISTCONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpService;
+class CUpnpAction;
+
+using namespace Xml;
+
+/**
+ *  This class handles argument list subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS(CUpnpArgumentListContentHandler) : public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpArgumentListContentHandler class
+     */
+    static CUpnpArgumentListContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aResultService, CUpnpAction& aResultAction );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpArgumentListContentHandler class
+     */
+    static CUpnpArgumentListContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aResultService, CUpnpAction& aResultAction );
+
+    /**
+     * Destructor of CUpnpArgumentListContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpArgumentListContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     This method is a callback to indicate the end of the element has been reached.
+     @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     This method is a callback that sends the content of the element.
+     @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpArgumentListContentHandler( CUpnpContentHandlersController& aController,
+            CUpnpService& aResultService, CUpnpAction& aResultAction );
+
+private:
+    CUpnpService& iResultService;
+    CUpnpAction& iResultAction;
+
+    };
+
+#endif //__UPNPARGUMENTLISTCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpbasecontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,219 @@
+/** @file
+* 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:  Declares the CUpnpBaseContentHandler class
+*
+*/
+
+
+#ifndef __UPNPBASECONTENTHANDLER_H__
+#define __UPNPBASECONTENTHANDLER_H__
+
+#include "upnperrors.h"
+#include "upnpcommonupnplits.h"
+
+#include <Xml/ContentHandler.h>
+#include <Xml/DocumentParameters.h>
+#include <f32file.h>
+#include <CStack.h>
+
+#include <Xml/Parser.h>
+#include <Xml/ParserFeature.h>
+#include <Xml/MatchData.h>
+
+// CLASS DECLARATION
+
+/**
+*  This class implements the interface MContentHandler required by a client of the xml framework
+*  It is designed to be used by xml parser that generates events using callback methods   
+*
+*  @since Series60 2.6
+*/
+
+// for upnpcontenthandlers
+_LIT8(KUpnpRoot,                    "root");
+_LIT8(KUpnpIconList,                "iconList");
+_LIT8(KUpnpUpc,                     "UPC");
+_LIT8(KUpnpInmpro3,                 "INMPR03");
+_LIT8(KUpnpScpd,                    "scpd");
+_LIT8(KUpnpActionList,              "actionList");
+_LIT8(KUpnpArgument,                "argument");
+_LIT8(KUpnpArgumentList,            "argumentList");
+_LIT8(KUpnpServiceStateTable,       "serviceStateTable");
+_LIT8(KUpnpName,                    "name");
+_LIT8(KUpnpIn,                      "in");
+_LIT8(KUpnpDirection,               "direction");
+_LIT8(KUpnpRelatedStateVariable,    "relatedStateVariable");
+_LIT8(KUpnpDataType,                "dataType");
+_LIT8(KUpnpAllowedValue,            "allowedValue");
+_LIT8(KUpnpDefaultValue,            "defaultValue");
+_LIT8(KUpnpValue,                   "value");
+_LIT8(KUpnpMinimum,                 "minimum");
+_LIT8(KUpnpMaximum,                 "maximum");
+_LIT8(KUpnpStep,                    "step");
+
+using namespace Xml;
+
+
+class CUpnpBaseContentHandler : public CBase, public MContentHandler
+{        
+public:
+   	/**    
+   	* Destructor    
+    */	
+	virtual ~CUpnpBaseContentHandler();
+	
+	/**    
+   	* Removes all elements from the stack   
+    */	
+    void ClearResultsL();
+
+public:	// from MContentHandler
+
+    /**
+    * This method is a callback to indicate the start of the document.
+    * @param				aDocParam Specifies the various parameters of the document.
+    * @arg				aDocParam.iCharacterSetName The character encoding of the document.
+    * @param				aErrorCode is the error code. 
+    * 					If this is not KErrNone then special action may be required.
+    */
+	virtual void OnStartDocumentL(const RDocumentParameters& aDocParam, TInt aErrorCode);
+
+    /**
+    * This method is a callback to indicate the end of the document.
+    * @param				aErrorCode is the error code. 
+    * 				If this is not KErrNone then special action may be required.
+    */
+    virtual void OnEndDocumentL(TInt aErrorCode);
+       
+    /**
+    * This method is a notification of the beginning of the scope of a prefix-URI Namespace mapping.
+    * This method is always called before the corresponding OnStartElementL method.
+    * @param				aPrefix is the Namespace prefix being declared.
+    * @param				aUri is the Namespace URI the prefix is mapped to.
+    * @param				aErrorCode is the error code.
+    * 				If this is not KErrNone then special action may be required.
+    */
+    virtual void OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, 
+    								   TInt aErrorCode);
+    /**
+    * This method is a notification of the end of the scope of a prefix-URI mapping.
+    * This method is called after the corresponding DoEndElementL method.
+    * @param				aPrefix is the Namespace prefix that was mapped.
+    * @param				aErrorCode is the error code.
+    * 				If this is not KErrNone then special action may be required.
+    */
+    virtual void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
+
+    /**
+    * This method is a notification of ignorable whitespace in element content.
+    * @param				aBytes are the ignored bytes from the document being parsed.
+    * @param				aErrorCode is the error code.
+    * 				If this is not KErrNone then special action may be required.
+    */
+    virtual void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
+
+    /**
+    * This method is a notification of a skipped entity. If the parser encounters an 
+    * external entity it does not need to expand it - it can return the entity as aName 
+    * for the client to deal with.
+    * @param				aName is the name of the skipped entity.
+    * @param				aErrorCode is the error code.
+    * 				If this is not KErrNone then special action may be required.
+    */
+    virtual void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
+
+    /**
+    This method is a receive notification of a processing instruction.
+    * @param				aTarget is the processing instruction target.
+    * @param				aData is the processing instruction data. If empty none was supplied.
+    * @param				aErrorCode is the error code.
+    * 				If this is not KErrNone then special action may be required.
+    */
+    virtual void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, 
+    									  TInt aErrorCode);
+    /**
+    * This method indicates an error has occurred.
+    * @param				aError is the error code
+    */
+    virtual void OnError(TInt aErrorCode);
+
+    /**
+    * This method obtains the interface matching the specified uid.
+    * @return				0 if no interface matching the uid is found.
+    * 				Otherwise, the this pointer cast to that interface.
+    * @param				aUid the uid identifying the required interface.
+    */
+    virtual TAny* GetExtendedInterface(const TInt32 aUid);
+    
+        /**    
+   	* Removes all elements from the stack if parsing failed
+    */
+	virtual void ClearStack();
+	    
+protected:
+    
+    /**    
+   	* Default C++ constructor    
+    */
+    CUpnpBaseContentHandler();    
+    
+    /**    
+   	* 2nd phase constructor dedicated to future, inherited class      
+    */
+    void BaseConstructL();    
+    
+    /**    
+   	* Gets an object most recently pushed onto the stack   
+    * @return    		
+    */
+    CBase* GetElementL();	
+    
+    /**
+    * This method shows whether parsing of a xml document is finished
+    * @since Series60 3.2 
+    * @return TBool    
+    */	
+    virtual TBool IsReady() = 0;        
+    
+    /**
+    * Sets a flag to indicate that parsing of the xml document has thrown an error
+    * @since Series60 3.2     
+    */	
+    virtual void SetError() = 0; 
+    
+    /**
+    * Sets a flag to indicate that parsing of the xml document has finished
+    * @since Series60 3.2     
+    */	   
+    virtual void SetFinish() = 0;
+   
+   /**
+    * Get content value.
+    * @since Series60 3.2
+    */
+    HBufC8* GetContentL();
+
+protected:
+			
+	CStack<CBase, EFalse> *iStack;
+	HBufC8* iContent;	
+	CParser* iParser;
+	TBuf8<KMaxInfoSize> iInfo;
+	HBufC8* iBodyTag1;
+	HBufC8* iBodyTag2;
+	TBool iChunk;			
+
+};
+
+#endif //__UPNPBASECONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpbodyofsoapcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,114 @@
+/** @file
+* 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:  Declares the CUpnpBodyOfSoapContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPBODYOFSOAPCONTENTHANDLER_H__
+#define __UPNPBODYOFSOAPCONTENTHANDLER_H__
+
+#include <e32def.h>
+#include "upnppropertysetcontenthandler.h"
+
+using namespace Xml;
+
+/**
+*  This class handles body subtree of soap messages
+*  It extends CUpnpContentHandler class
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser
+*
+*/
+NONSHARABLE_CLASS( CUpnpBodyOfSoapContentHandler ) : public CUpnpPropertysetContentHandler
+{
+public:
+
+    /**
+    * Two-phased constructor
+    * @return instance of CUpnpBodyOfSoapContentHandler class
+    */
+    static CUpnpBodyOfSoapContentHandler* NewL(
+            CUpnpContentHandlersController& aController,
+            RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments );
+
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @return instance of CUpnpBodyOfSoapContentHandler class
+    */
+    static CUpnpBodyOfSoapContentHandler* NewLC(
+            CUpnpContentHandlersController& aController,
+            RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments );
+
+    /**
+    * Destructor of CUpnpBodyOfSoapContentHandler class
+    *
+    */
+    virtual ~CUpnpBodyOfSoapContentHandler();
+
+public:	// from CUpnpContentHandler
+
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement,
+                                  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+    /**
+     * Returns value if class is interested in tags all namespaces
+     *
+     * @return ETrue when the class is interested in tags in all namespaces
+     */
+    virtual TBool InterestedInAllNamespaces();
+
+protected:
+
+    /**
+    * Default C++ constructor
+    */
+    CUpnpBodyOfSoapContentHandler( CUpnpContentHandlersController& aController,
+        RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments );
+
+    /**
+     * Second phase constructor
+     */
+    void ConstructL();
+
+private:
+    /**
+     * Returns true if content handler is in inside argument state
+     */
+    TBool InsideOfArgument();
+
+private:
+
+    TBool iIsInsideOfAction;
+
+};
+
+#endif //__UPNPBODYOFSOAPCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,122 @@
+/** @file
+* 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:  Declares the CUpnpContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPCONTENTHANDLER_H__
+#define __UPNPCONTENTHANDLER_H__
+
+#include <xml/contenthandler.h>
+#include <babitflags.h>
+    
+class CUpnpContentHandlersController;
+
+/**
+ * Abstract base class for all upnp content handlers used by CUpnpController.
+ * It uses events similar to Xml::MContentHandler, but excludes not used events
+ * and parameters.
+ *
+ */
+    
+using namespace Xml;
+
+NONSHARABLE_CLASS(CUpnpContentHandler) : public CBase
+    {
+public:
+
+    //parsing type
+    enum TParseType 
+        {
+        EDevice,
+        EDeviceImpl,
+        ESilentDeviceImpl
+        };
+        
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement,
+            const RAttributeArray& aAttributes ) = 0;
+
+    /**
+     * This method is a callback to indicate the end of the element has been reached.
+     * @param				aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement ) = 0;
+
+    /**
+     * This method is a callback that sends the content of the element.
+     * @param				aBytes is the raw content data for the element. 
+     * The client is responsible for converting the data to the 
+     * required character set if necessary.
+     * In some instances the content may be binary and must not be converted.
+     */
+    virtual void OnContentL( const TDesC8& aBytes ) = 0;
+
+    /**
+     * Returns value if class is interested in tags all namespaces 
+     * 
+     * @return ETrue when the class is interested in tags in all namespaces 
+     */
+    virtual TBool InterestedInAllNamespaces();
+    
+     /**
+     * Reset internal state
+     */
+    virtual void ResetState();
+protected:
+
+    /**
+     * Set controller's current content handler to IgnoreContentHandler object
+     * 
+     **/
+    void SetIgnoreHandlerL();
+
+    /**
+     * Returns ETrue if tag on aPosition has been already found.
+     * If not set that now it is found and return EFalse.
+     * @param              aPosition position of tag in iFoundTags
+     * @param              aFoundTags flags with found tags set
+     * @return             ETrue is found, EFalse otherwise
+     */
+    template<class T>
+    inline TBool IsTagRepeated( TInt aPosition, TBitFlagsT<T>& aFoundTags );
+
+    /**
+     * Leaves if tag on aPosition has been already found.
+     * If not just set that now it is found.
+     * @param              aPosition position of tag in iFoundTags
+     * @param              aFoundTags flags with found tags set
+     */
+    template<class T>
+    inline void RepeatedTagCheckL( TInt aPosition, TBitFlagsT<T>& aFoundTags );
+
+    /**
+     * Constructor 
+     * 
+     * @param aController reference to controller of the object
+     */
+    CUpnpContentHandler( CUpnpContentHandlersController& aController );
+
+protected:
+    CUpnpContentHandlersController& iController;
+
+    };
+
+#include "upnpcontenthandler.inl"
+#endif //__UPNPCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpcontenthandler.inl	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+/** @file
+* 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:  Defines inline funtions for CUpnpContentHandler class
+ *
+*/
+
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandler::IsTagRepeatedL
+// Returns ETrue if tag on aPosition has been already found.
+// If not just set that now it is found.
+// -----------------------------------------------------------------------------
+//
+template <class T> inline TBool CUpnpContentHandler::IsTagRepeated(
+    TInt aPosition, TBitFlagsT<T>& aFoundTags )
+    {
+    if ( aFoundTags.IsSet( aPosition ) )
+        {
+        return ETrue;
+        }
+    aFoundTags.Set( aPosition );
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandler::RepeatedTagCheckL
+// Leaves if tag on aPosition has been already found.
+// If not just set that now it is found.
+// -----------------------------------------------------------------------------
+//
+template <class T> inline void CUpnpContentHandler::RepeatedTagCheckL(
+    TInt aPosition, TBitFlagsT<T>& aFoundTags )
+    {
+    if ( IsTagRepeated( aPosition, aFoundTags ) )
+        {
+        User::Leave( KErrArgument ); //maxOccurents=1
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpcontenthandlerscontroller.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,400 @@
+/** @file
+* 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:  Declares the CUpnpContentHandlersController class
+ *
+*/
+
+
+#ifndef __UPNPCONTENTHANDLERSCONTROLLER_H__
+#define __UPNPCONTENTHANDLERSCONTROLLER_H__
+
+#include <xml/parser.h>
+#include <xml/contenthandler.h>
+#include <cstack.h>
+#include "upnpsoapparser.h"
+
+// CLASS DECLARATION
+class CUpnpDevice;
+class CUpnpDeviceImplementation;
+class CUpnpSilentDeviceImplementation;
+class CUpnpService;
+class CUpnpContentHandler;
+class CUpnpDescriptionProperty;
+class CUpnpAction;
+class CUpnpSoapMessage;
+
+/**
+ *  This class implements the interface MContentHandler required by a client of the xml framework
+ *  It is designed to be used by xml parser that generates events using callback methods
+ *
+ *  @since Series60 2.6
+ */
+
+using namespace Xml;
+
+NONSHARABLE_CLASS( CUpnpContentHandlersController ) :
+    public CBase, public MContentHandler
+    {
+public:
+    /**
+     * Destructor
+     */
+    virtual ~CUpnpContentHandlersController();
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2
+     * @return instance of CUpnpContentHandlersController class
+     */
+    IMPORT_C static CUpnpContentHandlersController* NewL();
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2
+     * @return instance of CUpnpContentHandlersController class
+     */
+    IMPORT_C static CUpnpContentHandlersController* NewLC();
+
+    /**
+    * For internal use. Update all necessary information from a SOAP-message
+    * that should be OK answer (e.g. received by Http 200 OK message).
+    * @param aMessage SOAP response message
+    * @param aAction an action to update
+    */
+    IMPORT_C void UpdateActionWithOKResponseL( CUpnpSoapMessage* aMessage,
+        CUpnpAction* aAction );
+
+    /**
+     * For internal use. Update all necessary information from a SOAP-message
+     * that should contain SOAP error (fault) message (eg. received by http
+     * 500 InternalServerError message.
+     * @param aMessage SOAP response message
+     * @param aAction an action to update
+     */
+    IMPORT_C void UpdateActionWithErrorResponseL( CUpnpSoapMessage* aMessage,
+            CUpnpAction* aAction );
+
+    /**
+    * For internal use. Attaches the information contained in a GENA buffer
+    * to this service. In practice, this means handling of received
+    * GENA messages.
+    * @since Series60 3.2
+    * @param aGenaNotify gena notify body to be attached,
+    * @param aService service which gena will be atached to
+    */
+    IMPORT_C void AttachL( const TDesC8& aGenaNotify, CUpnpService& aService );
+
+    /**
+     * Parses an xml document and returns object of CUpnpService class
+     * It is used for the first time the xml document is parsed
+     * @since Series60 3.2
+     * @param aDescription xml content
+     * @param aParentDevice parent device
+     * @return instance of CUpnpService class
+     */
+    IMPORT_C CUpnpService* ParseServiceL( const TDesC8& aDescription,
+        CUpnpDevice* aParentDevice );
+
+    /**
+    * Parses an xml document
+    * It is used in case when CUpnpService object already exists
+    * @since Series60 3.2
+    * @param aDescription xml content
+    * @param aService service pointer [in-out param]
+    */
+    IMPORT_C void ParseServiceL( const TDesC8& aDescription, CUpnpService* aService );
+
+    /**
+    * Parses an xml document and returns instance of CUpnpDevice class
+    * It is used for the first time the device xml document is parsed
+    * @since Series60 3.2
+    * @param aDescription xml content
+    * @return instance of CUpnpDevice class
+    */
+    IMPORT_C CUpnpDevice* ParseDeviceL( const TDesC8& aDescription );
+
+    /**
+    * Parses an xml document and returns instance of CUpnpDevice class
+    * It is used in case when CUpnpDevice object already exists and update of device
+    * xml is required
+    * @since Series60 3.2
+    * @param aDescription xml content
+    * @param aDevice pointer [in-out param]
+    */
+    IMPORT_C void ParseDeviceL( const TDesC8& aDescription, CUpnpDevice* aDevice );
+
+    /**
+    * Parses an xml document and returns instance of CUpnpDeviceImplementation class
+    * It is used for the first time the device xml document is parsed
+    * @since Series60 3.2
+    * @param aDescription xml content
+    * @return instance of CUpnpDeviceImplementation class
+    */
+    IMPORT_C CUpnpDeviceImplementation* ParseDeviceImplL( const TDesC8& aDescription );
+
+    /**
+    * Parses an xml document and returns instance of CUpnpDeviceImplementation class
+    * It is used in case when CUpnpDeviceImplementation object already exists and
+    * update of device xml is required
+    * @since Series60 3.2
+    * @param aDescription xml content
+    * @param aDevice pointer [in-out param]
+    */
+    IMPORT_C void ParseDeviceImplL( const TDesC8& aDescription,
+        CUpnpDeviceImplementation* aDeviceImpl );
+
+    /**
+    * Parses an xml document and returns instance of CUpnpSilentDeviceImplementation class
+    * It is used for the first time the device xml document is parsed
+    * @since Series60 3.2
+    * @param aDescription xml content
+    * @return instance of CUpnpDeviceImplementation class
+    */
+    IMPORT_C CUpnpSilentDeviceImplementation* ParseSilentDeviceImplL( const TDesC8& aDescription );
+
+    /**
+    * Parses an xml document and returns instance of CUpnpSilentDeviceImplementation class
+    * It is used in case when CUpnpDeviceImplementation object already exists and
+    * update of device xml is required
+    * @since Series60 3.2
+    * @param aDescription xml content
+    * @param aDevice pointer [in-out param]
+    */
+    IMPORT_C void ParseSilentDeviceImplL( const TDesC8& aDescription,
+        CUpnpSilentDeviceImplementation* aDeviceImpl );
+
+    /**
+    * Update action with all necessary information from
+    * a SOAP request message.
+    * @since Series60 3.2
+    * @param aMessage SOAP request message
+    * @param aAction - an action to update
+    */
+    void UpdateActionWithRequestL( CUpnpSoapMessage* aMessage, CUpnpAction* aAction );
+
+    /**
+    * Parses a xml document and returns set objects of CUpnpDescriptionProperties
+    * It is used to parse action messages (soap)
+    * @pre description property array should be leave safe
+    * (there will be PopAndDestroy called on it in case of leave)
+    */
+    void ParseSoapL(
+            const TDesC8& aDescription,
+            RPointerArray<CUpnpDescriptionProperty>& aParsedValues );
+
+    /**
+     * Sets ContentHandler argument as a current content handler, so it will
+     * receive parsing events. Previous content handler will be push on stack
+     * that it could be againt current content handler after calling of
+     * SetPreviousContentHandler.
+     * @since Series60 3.2
+     * @param aNewContentHandler content handler that will receive all parsing events
+     *   untill current content handler will be changed
+     */
+    void SetCurrentContentHandlerL( CUpnpContentHandler* aNewContentHandler );
+
+    /**
+     * Deletes current content handler, and sets previous content handler to become current
+     * contetnt handler, and receive all sax parsing events.
+     * @since Series60 3.2
+     */
+    void SetPreviousContentHandler();
+
+private: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate the start of the document.
+     * @param				aDocParam Specifies the various parameters of the document.
+     * @arg				aDocParam.iCharacterSetName The character encoding of the document.
+     * @param				aErrorCode is the error code.
+     * 					If this is not KErrNone then special action may be required.
+     */
+    virtual void OnStartDocumentL( const RDocumentParameters& aDocParam,
+        TInt aErrorCode );
+
+    /**
+     * This method is a callback to indicate the end of the document.
+     * @param				aErrorCode is the error code.
+     * 				If this is not KErrNone then special action may be required.
+     */
+    virtual void OnEndDocumentL( TInt aErrorCode );
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param              aElement is a handle to the element's details.
+     * @param              aAttributes contains the attributes for the element.
+     * @param              aErrorCode is the error code.
+     *                If this is not KErrNone then special action may be required.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement,
+        const RAttributeArray& aAttributes, TInt aErrorCode );
+
+    /**
+     * This method is a callback to indicate the end of the element has been reached.
+     * @param              aElement is a handle to the element's details.
+     * @param              aErrorCode is the error code.
+     *                If this is not KErrNone then special action may be required.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement, TInt aErrorCode );
+
+    /**
+     * This method is a callback that sends the content of the element.
+     * Not all the content may be returned in one go. The data may be sent in chunks.
+     * This method just append chunk to chunks previously received. When we get all
+     * chunks ChunksMergingEndL method pass merged chunks to current content handler.
+     * @param              aBytes is the raw content data for the element.
+     *                 The client is responsible for converting the data to the
+     *                 required character set if necessary.
+     *                 In some instances the content may be binary and must not be converted.
+     * @param              aErrorCode is the error code.
+     *                If this is not KErrNone then special action may be required.
+     */
+    virtual void OnContentL( const TDesC8& aBytes, TInt aErrorCode );
+
+    /**
+     * This method is a notification of the beginning of the scope of a prefix-URI Namespace mapping.
+     * This method is always called before the corresponding OnStartElementL method.
+     * @param				aPrefix is the Namespace prefix being declared.
+     * @param				aUri is the Namespace URI the prefix is mapped to.
+     * @param				aErrorCode is the error code.
+     * 				If this is not KErrNone then special action may be required.
+     */
+    virtual void OnStartPrefixMappingL( const RString& aPrefix,
+        const RString& aUri, TInt aErrorCode );
+
+    /**
+     * This method is a notification of the end of the scope of a prefix-URI mapping.
+     * This method is called after the corresponding DoEndElementL method.
+     * @param				aPrefix is the Namespace prefix that was mapped.
+     * @param				aErrorCode is the error code.
+     * 				If this is not KErrNone then special action may be required.
+     */
+    virtual void OnEndPrefixMappingL( const RString& aPrefix, TInt aErrorCode );
+
+    /**
+     * This method is a notification of ignorable whitespace in element content.
+     * @param				aBytes are the ignored bytes from the document being parsed.
+     * @param				aErrorCode is the error code.
+     * 				If this is not KErrNone then special action may be required.
+     */
+    virtual void OnIgnorableWhiteSpaceL( const TDesC8& aBytes, TInt aErrorCode );
+
+    /**
+     * This method is a notification of a skipped entity. If the parser encounters an
+     * external entity it does not need to expand it - it can return the entity as aName
+     * for the client to deal with.
+     * @param				aName is the name of the skipped entity.
+     * @param				aErrorCode is the error code.
+     * 				If this is not KErrNone then special action may be required.
+     */
+    virtual void OnSkippedEntityL( const RString& aName, TInt aErrorCode );
+
+    /**
+     This method is a receive notification of a processing instruction.
+     * @param				aTarget is the processing instruction target.
+     * @param				aData is the processing instruction data. If empty none was supplied.
+     * @param				aErrorCode is the error code.
+     * 				If this is not KErrNone then special action may be required.
+     */
+    virtual void OnProcessingInstructionL( const TDesC8& aTarget,
+        const TDesC8& aData, TInt aErrorCode );
+
+    /**
+     * This method indicates an error has occurred.
+     * @param				aError is the error code
+     */
+    virtual void OnError( TInt aErrorCode );
+
+    /**
+     * This method obtains the interface matching the specified uid.
+     * @return				0 if no interface matching the uid is found.
+     * 				Otherwise, the this pointer cast to that interface.
+     * @param				aUid the uid identifying the required interface.
+     */
+    virtual TAny* GetExtendedInterface( const TInt32 aUid );
+    
+    /**
+     * This method removes forbidden characters from description     
+     * @param				aDescription to be modified
+     */
+    void RemoveForbiddenCharacters( TDes8& aDescription );
+
+private:
+
+    /**
+     * Default C++ constructor
+     */
+    CUpnpContentHandlersController();
+
+    /**
+     * 2nd phase constructor
+     */
+    void ConstructL();
+
+    /**
+    * Parses a xml document and returns set objects of CUpnpDescriptionProperties
+    * It is used to parse event notification
+    * @pre description property array should be leave safe
+    * (there will be PopAndDestroy called on it in case of leave)
+    */
+    void ParseGenaL(
+            const TDesC8& aDescription,
+            RPointerArray<CUpnpDescriptionProperty>& aParsedValues );
+
+    /**
+    * Parses a xml document by passed content handler
+    * there is a guarantee that aHandlerToUse will be deleted in case of leave
+    * @param aDescription description in xml
+    * @param aHandlerToUse content handler that will be used to parsing
+    * @pre: iStack is empty
+    * @post: iStack is empty
+    */
+    void ParseXmlL( const TDesC8& aDescription, CUpnpContentHandler* aHandlerToUse );
+
+    /**
+     * Method that is called when all chunks that contain current content
+     * were received, so we can pass merged content to current content handler
+     * as an argument of OnContentL method
+     */
+    void ChunksMergingEndL();
+
+    /**
+    * Common code for CUpnpDevice, and CUpnpDeviceImplementation objects
+    */
+    template<class T>
+    T* DoParseDeviceL( const TDesC8& aDescription, T* aDevice );
+
+private:
+    CUpnpContentHandler* iCurrentContentHandler;
+    //must always be equals to iStack.Head() kept here for performance and clarity reasons
+
+    CParser* iParser;
+    CStack<CUpnpContentHandler, ETrue>* iStack;
+    RBuf8 iContent;
+    TPtrC8 iCorrectUri;
+
+    /**
+     * The flag contains information if OnStartDocumentL were invoked
+     * It isn't invoked f.e if xml document is empty
+     */
+    TBool iDocStarted;
+
+    /**
+     * Object responsible for soap parsing logic
+     */
+    TUpnpSoapParser iSoapParser;
+
+    };
+
+#endif //__UPNPCONTENTHANDLERSCONTROLLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpdevicecontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,202 @@
+/** @file
+* 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:  Declares the CUpnpDeviceContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPDEVICECONTENTHANDLER_H__
+#define __UPNPDEVICECONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpDevice;
+class CUpnpDeviceImplementation;
+class CUpnpSilentDeviceImplementation;
+
+using namespace Xml;
+
+/**
+*  This class handles xml device descriptions
+*  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser
+*
+*  @since Series60 2.6
+*/
+NONSHARABLE_CLASS( CUpnpDeviceContentHandler ) : public CUpnpContentHandler
+{               
+public:
+
+    /**
+    * Two-phased constructor that will parse CUpnpDevice object. If aResultDevice 
+    * is NULL the result object will be created during the parsing, and will be 
+    * owned by this CUpnpDeviceContentHandler.
+    * Otherwise result will be parsed to existing aResultDevice object
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceContentHandler class
+    */  
+    static CUpnpDeviceContentHandler* NewL( CUpnpContentHandlersController& aController, 
+        CUpnpDevice* aResultDevice );
+    
+    /**
+    * Two-phased constructor that will parse CUpnpDevice object. If aResultDevice 
+    * is NULL the result object will be created during the parsing, and will be 
+    * owned by this CUpnpDeviceContentHandler.
+    * Otherwise result will be parsed to existing aResultDevice object.
+    * Leaves the object on the CleanupStack
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceContentHandler class
+    */  
+    static CUpnpDeviceContentHandler* NewLC( CUpnpContentHandlersController& aController, 
+        CUpnpDevice* aResultDevice );
+
+    /**
+    * Two-phased constructor that will parse CUpnpDeviceImplementation object. If 
+    * aResultDeviceImpl is NULL the result object will be created during the parsing, 
+    * and will be owned by this CUpnpDeviceContentHandler.
+    * Otherwise result will be parsed to existing aResultDevice object.
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceContentHandler class
+    */  
+    static CUpnpDeviceContentHandler* NewL( CUpnpContentHandlersController& aController, 
+        CUpnpDeviceImplementation* aResultDeviceImpl );
+    
+    /**
+    * Two-phased constructor that will parse CUpnpDeviceImplementation object. If 
+    * aResultDeviceImpl is NULL the result object will be created during the parsing, 
+    * and will be owned by this CUpnpDeviceContentHandler.
+    * Otherwise result will be parsed to existing aResultDevice object.
+    * Leaves the object on the CleanupStack
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceContentHandler class
+    */  
+    static CUpnpDeviceContentHandler* NewLC( CUpnpContentHandlersController& aController, 
+        CUpnpDeviceImplementation* aResultDeviceImpl );  
+        
+        
+    /**
+    * Two-phased constructor that will parse CUpnpSilentDeviceImplementation object. If 
+    * aResultDeviceImpl is NULL the result object will be created during the parsing, 
+    * and will be owned by this CUpnpDeviceContentHandler.
+    * Otherwise result will be parsed to existing aResultDevice object.
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceContentHandler class
+    */  
+    static CUpnpDeviceContentHandler* NewL( CUpnpContentHandlersController& aController, 
+        CUpnpSilentDeviceImplementation* aResultSilentDeviceImpl );
+    
+    /**
+    * Two-phased constructor that will parse CUpnpSilentDeviceImplementation object. If 
+    * aResultDeviceImpl is NULL the result object will be created during the parsing, 
+    * and will be owned by this CUpnpDeviceContentHandler.
+    * Otherwise result will be parsed to existing aResultDevice object.
+    * Leaves the object on the CleanupStack
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceContentHandler class
+    */  
+    static CUpnpDeviceContentHandler* NewLC( CUpnpContentHandlersController& aController, 
+        CUpnpSilentDeviceImplementation* aResultSilentDeviceImpl );    
+    
+    /**
+    * Destructor of CUpnpDeviceContentHandler class
+    * @since Series60 3.2     
+    */	
+    virtual ~CUpnpDeviceContentHandler();
+    
+    /**
+    * Returns parsed CUpnpDevice object, and pass ownership of it to the caller.
+    * One shouldn't call this method if CUpnpDeviceContentHandler dosn't have
+    * ownership CUpnpDevice object.
+    * @see GetResultDevice( CUpnpDevice*& aResultDevice )
+    * 
+    * @param aResultDevice result
+    */
+    void GetResultDevice( CUpnpDevice*& aResultDevice );
+
+    /**
+    * Returns parsed CUpnpDeviceImplamentation object, and pass ownership of it to the caller.
+    * One shouldn't call this method if CUpnpDeviceContentHandler dosn't have
+    * ownership CUpnpDeviceImplementation object.
+    * @see GetResultDevice( CUpnpDevice*& aResultDevice )
+    * 
+    * @param aResultDeviceImpl result
+    */
+    void GetResultDevice( CUpnpDeviceImplementation*& aResultDeviceImpl );
+    
+    /**
+    * Returns parsed CUpnpSilentDeviceImplamentation object, and pass ownership of it to the caller.
+    * One shouldn't call this method if CUpnpDeviceContentHandler dosn't have
+    * ownership CUpnpSilentDeviceImplementation object.
+    * @see GetResultDevice( CUpnpDevice*& aResultDevice )
+    * 
+    * @param aResultDeviceImpl result
+    */
+    void GetResultDevice( CUpnpSilentDeviceImplementation*& aResultSilentDeviceImpl );
+    
+public:	// from CUpnpContentHandler
+    
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+    
+    /**
+     * This method is a callback to indicate the end of the element has been reached.
+     * @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     * This method is a callback that sends the content of the element.
+     * @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+    
+protected:
+
+    /**
+    * Default C++ constructor 
+    * @since Series60 3.2     
+    */  
+    CUpnpDeviceContentHandler( CUpnpContentHandlersController& aController,
+        CUpnpDevice* aResultDevice );
+
+    /**
+    * Default C++ constructor 
+    * @since Series60 3.2     
+    */  
+    CUpnpDeviceContentHandler( CUpnpContentHandlersController& aController, 
+        CUpnpDeviceImplementation* aResultDeviceImpl );
+        
+    /**
+    * Default C++ constructor 
+    * @since Series60 3.2     
+    */  
+    CUpnpDeviceContentHandler( CUpnpContentHandlersController& aController, 
+        CUpnpSilentDeviceImplementation* aResultSilentDeviceImpl );
+	
+private:
+    CUpnpDevice* iResultDevice;
+    CUpnpDeviceImplementation* iResultDeviceImpl;
+    CUpnpSilentDeviceImplementation* iResultSilentDeviceImpl;
+    TBool iIsDeviceOwned;
+    TParseType iParseType;
+    
+};
+
+#endif //__UPNPDEVICECONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpdevicelistcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,101 @@
+/** @file
+* 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:  Declares the CUpnpDeviceListContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPDEVICELISTCONTENTHANDLER_H__
+#define __UPNPDEVICELISTCONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpDevice;
+
+using namespace Xml;
+
+/**
+*  This class handles device list subtree of device descriptions
+*  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+*
+*  @since Series60 2.6
+*/
+NONSHARABLE_CLASS( CUpnpDeviceListContentHandler ) : public CUpnpContentHandler
+{               
+public:
+    
+    /**
+    * Two-phased constructor
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceListContentHandler class
+    */	
+    static CUpnpDeviceListContentHandler* NewL(
+            CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+            TParseType aParseType );
+    
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceListContentHandler class
+    */	
+    static CUpnpDeviceListContentHandler* NewLC( 
+            CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+            TParseType aParseType );
+    
+    /**
+    * Destructor of CUpnpDeviceListContentHandler class
+    * @since Series60 3.2     
+    */	
+    virtual ~CUpnpDeviceListContentHandler();
+    
+public:	// from CUpnpContentHandler
+    
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+    							  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+    
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+    virtual void OnContentL( const TDesC8& aBytes );
+    
+protected:
+    
+    /**
+    * Default C++ constructor 
+    * @since Series60 3.2     
+    */	
+	CUpnpDeviceListContentHandler( CUpnpContentHandlersController& aController, 
+        CUpnpDevice& aResultDevice, TParseType aParseType );
+	
+private:
+    CUpnpDevice& iResultDevice;
+    TParseType iParseType;
+    
+};
+
+#endif //__UPNPDEVICELISTCONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpdeviceliterals.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,57 @@
+/** @file
+* 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:  Declares string definitions for device xml
+*
+*/
+
+
+#ifndef UPNPDEVICELITERALS_H_
+#define UPNPDEVICELITERALS_H_
+
+_LIT8( KUpnpDeviceRoot,                  "root" );
+_LIT8( KUpnpDevice,                      "device" );
+#ifndef UPNPSERVICELITERALS_H_
+_LIT8( KUpnpSpecVersion,                 "specVersion" );
+#endif
+_LIT8( KUpnpURLBase,                     "URLBase" );
+_LIT8( KUpnpDeviceType,                  "deviceType" );
+_LIT8( KUpnpFriendlyName,                "friendlyName" );
+_LIT8( KUpnpManufacturer,                "manufacturer" );
+_LIT8( KUpnpManufacturerURL,             "manufacturerURL" );
+_LIT8( KUpnpModelDescription,            "modelDescription" );
+_LIT8( KUpnpModelName,                   "modelName" );
+_LIT8( KUpnpModelNumber,                 "modelNumber" );
+_LIT8( KUpnpModelURL,                    "modelURL" );
+_LIT8( KUpnpSerialNumber,                "serialNumber" );
+_LIT8( KUpnpUDN,                         "UDN" );
+_LIT8( KUpnpUPC,                         "UPC" );
+_LIT8( KUpnpIconList,                    "iconList" );
+_LIT8( KUpnpIcon,                        "icon" );
+_LIT8( KUpnpMimetype,                    "mimetype" );
+_LIT8( KUpnpWidth,                       "width" );
+_LIT8( KUpnpHeight,                      "height" );
+_LIT8( KUpnpDepth,                       "depth" );
+_LIT8( KUpnpUrl,                         "url" );
+_LIT8( KUpnpServiceList,                 "serviceList" );
+_LIT8( KUpnpService,                     "service" );
+_LIT8( KUpnpServiceType,                 "serviceType" );
+_LIT8( KUpnpServiceId,                   "serviceId" );
+_LIT8( KUpnpSCPDURL,                     "SCPDURL" );
+_LIT8( KUpnpControlURL,                  "controlURL" );
+_LIT8( KUpnpEventSubURL,                 "eventSubURL" );
+_LIT8( KUpnpDeviceList,                  "deviceList" );
+_LIT8( KUpnpPresentationURL,             "presentationURL" );
+_LIT8( KDeviceNamespaceUri,              "urn:schemas-upnp-org:device-1-0" );
+
+#endif /*UPNPDEVICELITERALS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpdevicetagcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,126 @@
+/** @file
+* 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:  Declares the CUpnpDeviceTagContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPDEVICETAGCONTENTHANDLER_H__
+#define __UPNPDEVICETAGCONTENTHANDLER_H__
+
+#include <babitflags.h>
+
+#include "upnpcontenthandler.h"
+
+class CUpnpDevice;
+
+using namespace Xml;
+
+/**
+*  This class handles device subtree of xml device descriptions
+*  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+*
+*  @since Series60 2.6
+*/
+NONSHARABLE_CLASS( CUpnpDeviceTagContentHandler ) : public CUpnpContentHandler
+{
+protected: 
+    enum TState
+        { 
+        EInitial,
+        EDeviceType, 
+        EDeviceProperty,
+        EUDN
+        };      
+        
+public:
+    
+    /**
+    * Two-phased constructor
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceTagContentHandler class
+    */	
+    static CUpnpDeviceTagContentHandler* NewL(
+            CUpnpContentHandlersController& aController,
+            CUpnpDevice& aResultDevice, TParseType aParseType );
+    
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @since Series60 3.2 
+    * @return instance of CUpnpDeviceTagContentHandler class
+    */	
+    static CUpnpDeviceTagContentHandler* NewLC( 
+            CUpnpContentHandlersController& aController,
+            CUpnpDevice& aResultDevice, TParseType aParseType );
+    
+    /**
+    * Destructor of CUpnpDeviceTagContentHandler class
+    * @since Series60 3.2     
+    */	
+    virtual ~CUpnpDeviceTagContentHandler();
+    
+public:	// from CUpnpContentHandler
+    
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+    							  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+     virtual void OnContentL( const TDesC8& aBytes );    
+     
+     virtual TBool InterestedInAllNamespaces();
+     
+protected:
+
+    /**
+    * Default C++ constructor 
+    * @since Series60 3.2     
+    */	
+	CUpnpDeviceTagContentHandler( CUpnpContentHandlersController& aController, 
+	        CUpnpDevice& aResultStateVariable, TParseType aParseType );
+	
+	/**
+    * Helper function that do necessary operation when device property is found
+    *
+    * @param aFlagPosition  position of tag in iFoungTags
+    * @param.aPropertyName  name of property to process
+    **/
+    void ProcessDevicePropertyL( TInt aFlagPosition, const TDesC8& aPropertyName );
+    
+private:
+    CUpnpDevice& iResultDevice;
+    TState iCurrentState;
+    TBitFlags16 iFoundTags;
+    TPtrC8 iCurrentDevicePropertyName;
+    TParseType iParseType;
+    HBufC8* iNameWithPrefix;
+    
+};
+
+#endif //__UPNPDEVICETAGCONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpdispatcher.pan	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+/** @file
+* 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 __DISPATCHER_PAN__
+#define __DISPATCHER_PAN__
+
+/** Panic Category */
+_LIT(KDispatcher, "Dispatcher");
+
+/** Dispatcher panic codes */
+enum TDispatcherPanics 
+    {
+    ECSAsyncBasicUi = 1,
+	ECSAsyncProgram,
+	EMessageHandlerBadState
+    };
+
+#endif // __DISPATCHER_PAN__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpdispatcherengine.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,407 @@
+/** @file
+* 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:  Message dispacther engine
+*
+*/
+
+
+#ifndef C_CUPNPDISPATCHERENGINE_H
+#define C_CUPNPDISPATCHERENGINE_H
+
+// INCLUDES
+#include <e32base.h>
+#include "upnpdispatchersession.h"
+#include "upnpdevice.h"
+#include "upnphttpserver.h"
+
+// FORWARD DECLARATIONS
+class CUpnpDispatcherRequest;
+class MDispatcherEngineObserver;
+class CUpnpHttpServerSession;
+
+// CLASS DECLARATION
+
+/**
+@brief A message dispatcher unit cooperating with Message Handler
+
+This class represents a logical unit between UPnP devices / control points
+and Message Handler. Message Handler is a Symbian Server - thus, dispatcher
+follows the same client/server framework and is a client that opens a session
+to Message Handler. This is not done by class CUpnpDispatcherEngine;
+the class RUpnpDispatcherSession represents the client interface.
+
+Using AddCustomer/RemoveCustomer functions it is possible to set the active
+services. Dispatcher is able to forward messages to its customers.
+
+Also SendMessage function is very essential part of the dispatcher.
+ */
+class CUpnpDispatcherEngine : public CActive, public MUpnpHttpServerObserver
+    {
+public:
+    /**
+    * Create a CUpnpDispatcherEngine object using two phase construction,
+    *and return a pointer to the created object.
+    *
+    * A session with Message Handler is initiated during the construction.
+    *
+    * @param aObserver
+    * @return a pointer to the created instance of CUpnpDispatcherEngine
+    */
+    static CUpnpDispatcherEngine* NewL( MDispatcherEngineObserver& aObserver );
+
+    /**
+    * Create a CUpnpDispatcherEngine object using two phase construction,
+    * and return a pointer to the created object
+    *
+    * A session with Message Handler is initiated during the construction.
+    *
+    * @param aObserver
+    * @return a pointer to the created instance of CUpnpDispatcherEngine
+    */
+    static CUpnpDispatcherEngine* NewLC( MDispatcherEngineObserver& aObserver );
+
+    /**
+    * Destroy the object and release all memory objects
+    */
+    virtual ~CUpnpDispatcherEngine();
+
+private:
+    /**
+    * CUpnpDispatcherEngine
+    *
+    * @discussion Perform the first phase of two phase construction
+    * @param aParent the object to be used to handle updates from the server
+    * @param aObserver
+    */
+    CUpnpDispatcherEngine( MDispatcherEngineObserver& aObserver );
+
+    /**
+    * ConstructL performs the second phase construction of a CUpnpDispatcherEngine
+    * object
+    */
+    void ConstructL();
+
+    /**
+    * Creates http server
+    */    
+    void ConstructHttpL();
+
+public:
+
+    /**
+    * Send a message. This function pushes the message to the Message Handler.
+    * @param aMessage The message to be sent.
+    */
+    void SendMessageL( CUpnpHttpMessage* aMessage );
+
+    /**
+    * Add a customer to the customer list of this dispatcher. In practice,
+    * means that messages start being forwarded to that customer.
+    * @param aCustomer The customer to be added.
+    */
+    void AddCustomer( const MUpnpDispatcherCustomer& aCustomer );
+
+    /**
+    * Remove a customer from the customer list of this dispatcher. In practice,
+    * means that messages stop being forwarded to that customer.
+    * @param aCustomer The customer to be removed.
+    */
+    void RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer );
+
+    /**
+    *Starts http server
+    *@since Series60
+    *@param aRegister determines if starting error in message handler process will be checked
+    *@param aPort starts server on fixed port    
+    */
+    void StartHttpServerL( TBool aRegister, const TInt aPort );
+
+    /**
+    *Stops http server
+    *@since Series60
+    */
+
+    void StopHttpServer();
+
+public: // from CActive
+
+    /**
+    * Active object RunL, pending request completed.
+    */
+    void RunL();
+
+    /**
+    * Active object RunL, pending request completed.
+    * @param aError code from RunL.
+    * @result KErrNone.
+    */
+    TInt RunError( TInt aError );
+
+    /**
+    * Active object DoCancel, cancel pending requests.
+    */
+    void DoCancel();
+
+public:
+
+    // Enum that is used when finding out last request
+    enum TDispatcherRequest
+    {
+    EUnknown = -1,
+    ENewDevices,
+    EDeviceList
+    };
+
+
+    /**
+    * Return the MAC addess of this CUpnpDispatcherEngine's HTTP server.
+    * @result Buffer that will contain the MAC address.
+    */
+    const HBufC8* MacAddressL();
+
+    /**
+    * Removes a device from Message Handler's device library,
+    * which has an UUID of aUuid.
+    * @param aUuid UUID of device that is to be removed.
+    * @result None.
+    */
+    void RemoveLocalDeviceL( const TDesC8& aUuid, TBool aSilent );
+
+    /**
+    * Return the IP addess of this CUpnpDispatcherEngine's HTTP server.
+    * @result TInetAddr that will contain the IP address of the server.
+    */
+    TInetAddr HttpServerAddress();
+
+    /**
+    * Callback from HTTP server that a HTTP message has been received.
+    * @param aMessage Received message.
+    * @result None.
+    */
+    void HttpEventLD( CUpnpHttpMessage* aMessage );
+
+    /**
+    * Sends a SSDP search for aString
+    * @param aString Search message we want to send
+    * @result None.
+    */
+    void SsdpSearchL( const TDesC8& aString );
+
+    /**
+    * Sends a SSDP uuids that should not be filtered
+    * @param aString Uuids
+    */
+    void SsdpStopFilteringL( const TDesC8& aString );
+
+    /**
+    * Adds a local device to Message Handler's device library with
+    * given information.
+    * @param aUuid UUID of the device
+    * @param aDeviceType Device type of the device
+    * @param aDescriptionPath URL to this device's desctiption
+    * @param aServices List of services provided by this device.
+    * @param aIsRootDevice ETrue, if this device is UPnP root device, \
+    *       EFalse otherwise.
+    * @result None.
+    */
+    void AddLocalDeviceL( const TDesC8& aUuid,
+                          const TDesC8& aDeviceType,
+                          const TDesC8& aDescriptionPath,
+                          const CDesC8Array& aServices,
+                          const TBool aIsRootDevice );
+
+     /**
+    * Add control point client to message handler.
+    */
+    void AddControlPointClientL( );
+
+     /**
+    * Add control point client to message handler.
+    */
+    void RemoveControlPointClientL( );
+
+    /**
+    * This requests Message Handler for new device list.
+    * @param aUpdateId Dispatcher's last known update id.
+    */
+    void UpdateDevicesL( TInt aUpdateId );
+
+    /**
+    * Returns a list of new devices found on last query.
+    * @return List of CUpnpDevice's.
+    */
+    const RPointerArray<CUpnpDevice>& NewDevices() const;
+
+    /**
+    * Clears the list of newly found devices.
+    * @result None.
+    */
+    void RemoveDevices();
+
+    /**
+    * Deletes current request from list of requests.
+    * @result KErrNone, if successful. KErrNotFound if no requests
+    *       in list.
+    */
+    TInt RemoveHandledRequest();
+
+    /**
+    * Cancels current pending request, if there is a need to send
+    * for example a SSDP search.
+    * @result None.
+    */
+    void StopRequestL();
+  
+    /**
+    * This function sets handle to transaction creator interface.
+    * @since Series60 5.0 
+    * @param aTransactionCreator pointer to object implementing MUpnpHttpServerTransactionCreator
+    *     interface.
+    **/
+    void SetTransactionCreator( MUpnpHttpServerTransactionCreator* aTransactionCreator );
+
+private:
+    /**
+    * Makes a request for devices to Message Handler.
+    * @return ENewDevices, if request is made for new devices,
+    * returns EDeviceList, if request is made for new devices list size.
+    */
+    TDispatcherRequest GetDevicesL();
+
+    /**
+    * Function gets called when new devices are found.
+    * @return Last update id.
+    */
+    TInt DevicesReceivedL();
+
+    /**
+    * Sets the Dispatcher to handle next request and remove
+    * the old one.
+    */
+    void HandlePendingRequestL();
+
+    /**
+    *Check if start was succesfull
+    *@sience Series60 5.0
+    *@param aRegister
+    */
+    void CheckErrorL( TBool aRegister );
+
+private:
+
+    /*! @var iHttpServerSession Pointer to this dispatcher's HTTP server session*/
+    CUpnpHttpServerSession* iHttpServerSession;
+
+    /*! @var iSession the message handler session */
+    RUpnpDispatcherSession                  iSession;
+
+    /*! @var iCustomers list of dispatcher customers */
+    RPointerArray<MUpnpDispatcherCustomer>  iCustomers;
+
+    /*! @var iNewDevices List of new devices that were found on this query */
+    RPointerArray<CUpnpDevice>              iNewDevices;
+
+    /*! @var iAddLocalDevice Struct of TInt's that will \
+        inform what is the length of each value in the data buffer */
+    TUpnpAddLocalDevice                     iAddLocalDevice;
+
+    /*! @var iAddLocalPtr Pointer to buffer that will contain device \
+       information. */
+    TPtr8                   iAddLocalPtr;
+
+    /*! @var iAddLocalBuffer Buffer that holds the information about \
+        device to be added to Message Handler's device library. */
+    HBufC8*                 iAddLocalBuffer;
+
+    enum TGetDeviceListState
+    {
+        EGetListSize = 0,
+        EGetList,
+        EListReceived,
+        EOtherOperation,
+        ENoOperation,
+    };
+
+    /*! @var iDeviceGet Current state of DispatcherEngine. */
+    TGetDeviceListState                    iDeviceGetState;
+
+    /*! @var iSize Structure that holds information \
+        about number of new services and devices. */
+    TUpnpGetDeviceListSize                 iSize;
+
+    /*! @var iDevs Pointer to list of new devices. */
+    TUpnpDevice*                           iDevs;
+
+    /*! @var iServs Pointer to list of new services. */
+    TUpnpService*                          iServs;
+
+    /*! @var iOldUpdateId Last known update id of this CUpnpDispatcher. */
+    TInt                                   iOldUpdateId;
+
+    /*! @var iObserver Reference to this CUpnpDispatcherEngine's parent for \
+        callbacks. */
+    MDispatcherEngineObserver&             iObserver;
+
+    /*! @var iPendingRequests List of requests to Message Handler that \
+        ahve not yet been sent. */
+    RPointerArray<CUpnpDispatcherRequest>  iPendingRequests;
+
+    /*! @var iActiveRequest Request that is currently active \
+        to Message Handler. */
+    CUpnpDispatcherRequest*                iActiveRequest;
+
+    /*! @var iSearch Buffer that holds a search string that will be \
+        sent as SSDP message. */
+    HBufC8*                                iSearch;
+
+    /*! @var iGetDevPtr Pointer that is used to receive new devices \
+        from Message Handler. */
+    TPtr8                                  iGetDevPtr;
+
+    /*! @var iGetServPtr Pointer that is used to receive new services \
+        from Message Handler. */
+    TPtr8                                  iGetServPtr;
+
+    /*! @var iRemoveUuid Pointer to list of new services. */
+    HBufC8*                                iRemoveUuid;
+
+    /*! @var iRemoveUuidPtr Buffer that is used to hold UUID of the \
+        device that needs to be removed from Message Handler's device \
+        library. */
+    TPtrC8                                 iRemoveUuidPtr;
+
+    /* @var Handle counts for logging */
+    TInt                iProcessHandlesInStart;
+    //
+    TInt                iThreadHandlesInStart;
+    //
+    TInt                iReqsInStart;
+    //
+    TInt                iProcessHandlesInEnd;
+    //
+
+    TInt                iThreadHandlesInEnd;
+    //
+    TInt                iReqsInEnd;
+
+    HBufC8* iMXString;
+
+    HBufC8* iUuids;
+
+    TBool iIsSessionOpen;
+    };
+
+#endif // C_CUPNPDISPATCHERENGINE_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpdispatcherrequest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,128 @@
+/** @file
+* 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:  Declares CUpnpdispacherrequset class
+*
+*/
+
+#ifndef C_CUPNPDISPATCHERREQUEST_H
+#define C_CUPNPDISPATCHERREQUEST_H
+
+// INCLUDES
+#include <e32base.h>
+#include "upnpmhcommon.h"
+
+// FORWARD DECLARATIONS
+class CDesC8ArrayFlat;
+
+// CONSTANTS
+
+// CLASS DECLARATION
+
+/** 
+@brief A class that represents single request to the Message Handler
+
+This class represents a logical unit between UPnP devices / control points and
+Message Handler. CUpnpDispatcherRequest wraps different requests, 
+so they can be queued as in array.
+*/
+
+class CUpnpDispatcherRequest: public CBase
+{
+public:
+
+    /**
+    * Create a CUpnpDispatcherRequest object using two phase construction, 
+    * and return a pointer to the created object
+    *
+    * A session with Message Handler is initiated during the construction.
+    *
+    * @param aRequest from client using dispatcher request
+    * @result a pointer to the created instance of CUpnpDispatcherRequest
+    */
+    static CUpnpDispatcherRequest* NewLC( TMessageHandlerRqst aRequest ) ;
+
+    /**
+    * Destroy the object and release all memory objects
+    */
+    virtual ~CUpnpDispatcherRequest();
+
+private:
+    /**
+    * @function CUpnpDispatcherRequest
+    *
+    * @discussion Perform the first phase of two phase construction
+    * @param aRequest from client using dispatcher request
+    */
+    CUpnpDispatcherRequest( TMessageHandlerRqst aRequest );
+
+    /**
+     * Second phase of construction
+     */
+    void ConstructL();
+    
+public:
+
+
+    /**
+    * Returns a reference to given request's argument list. 
+    * @since Series60 2.6
+    * @return Reference to given request's argument list.
+    */    
+    CDesC8ArrayFlat& Arguments();
+    
+    /**
+    * Adds a argument to argument list.
+    * @since Series60 2.6
+    * @param aArgument Argument to add.
+    */
+    void AddArgumentL(const TDesC8& aArgument);
+
+    /**
+    * When trying to make request on adding device, this function 
+    * is used for storing service list to request.
+    * @since Series60 2.6
+    * @param aArgument Array of arguments to add.
+    */
+    void AddServices(CDesC8ArrayFlat* aArgument);
+
+    /**
+    * Returns the list of services on this request.
+    * @since Series60 2.6
+    * @return Reference to given request's argument list.
+    */  
+    CDesC8ArrayFlat& Services();
+
+    /**
+    * Returns request type.
+    * @since Series60 2.6
+    * @return Returns request type.
+    */  
+    TMessageHandlerRqst Request();
+
+private:    
+
+    /*! @var iRequest Type of request. */
+    TMessageHandlerRqst     iRequest;
+
+    /*! @var iArguments Array that contains arguments of this request. */
+    CDesC8ArrayFlat*       iArguments;
+
+    /*! @var iServices Array that contains services if adding local device. */
+    CDesC8ArrayFlat*        iServices;
+
+};
+
+#endif // C_CUPNPDISPATCHERREQUEST_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpdispatchersession.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,155 @@
+/** @file
+ * 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:  Declares RUpnpDispatcherSession class
+ *
+ */
+
+#ifndef C_RUPNPDISPATCHERSESSION_H
+#define C_RUPNPDISPATCHERSESSION_H
+
+// INCLUDES
+#include "upnpsessionbase.h"
+#include "upnpcommonstructs.h"
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DECLARATION
+
+/**
+ @brief Client-side interface to Message Handler
+
+ This class provides the client-side interface to the message handler session
+ */
+class RUpnpDispatcherSession : public RUpnpSessionBase
+    {
+public:
+
+    /**
+     * Construct the object
+     */
+    RUpnpDispatcherSession();
+
+    /**
+     * Establish connection with server
+     */
+    TInt Connect();
+
+    /**
+     * Requests Message Handler to start SSDP server. This server uses
+     * aIap as Internet Access Point. This way all servers are bound to
+     * same interface. 
+     */
+    void RequestStartSsdpL() const;
+
+    /**
+     * Requests Message Handler to get state SSDP server. This server uses
+     */
+    void RequestCheckError( TInt& aIsStarted );
+
+    /**
+     * Requests Message Handler to tell what IAP number it is using
+     * and returns it to client.
+     * @param aStatus The TRequestStatus variable of the dispatcher
+     * @param aIap Reference to TInt that will hold the correct IAP
+     * value after call finishes.
+     */
+    void RequestActiveIap( TRequestStatus& aStatus, TInt& aIap );
+
+    /**
+     * Asks Message Handler to send SSDP search with given string as SSDP
+     * ST -header.
+     * @param aStatus The TRequestStatus variable of the dispatcher
+     * @param aSearch value of ST -header.
+     * @param aMX values
+     */
+    void RequestSsdpSearch( TRequestStatus& aStatus, TDesC8& aSearch,
+        TDesC8& aMX );
+
+    /**
+     * Request the Message Handler to add a local device to the network. 
+     * @param aStatus The TRequestStatus variable of the dispatcher
+     * @param aDevice Structure containing buffer indexes to parse the buffer
+     * @param aBuffer A buffer containing the actual data about the device
+     */
+    void RequestAddLocalDevice( TRequestStatus& aStatus,
+        TUpnpAddLocalDevice& aDevice, TPtr8& aBuffer );
+
+    /**
+     * Request the Message Handler to remove a local device. 
+     * @param aStatus The TRequestStatus variable of the dispatcher
+     * @param aUuid UUID of the device that will be removed from 
+     * device library.
+     */
+    void RequestRemoveLocalDevice( TRequestStatus& aStatus,
+        const TDesC8& aUuid );
+
+    /**
+     * Request the Message Handler to remove silent a local device. 
+     * @param aStatus The TRequestStatus variable of the dispatcher
+     * @param aUuid UUID of the device that will be removed from 
+     * device library.
+     */
+    void RequestRemoveSilentLocalDevice( TRequestStatus& aStatus,
+        const TDesC8& aUuid );
+
+    /**
+     * Request the Message Handler to add a local control point client. 
+     */
+    void RequestAddControlPoint( TRequestStatus& aStatus );
+
+    /**
+     * Request the Message Handler to remove a local control point client. 
+     */
+    void RequestRemoveControlPoint( TRequestStatus& aStatus );
+
+    /**
+     * Request the Message Handler to get device list size. 
+     * @param aUuids Uuids of devices that should not be filtered.
+     */
+    void RequestStopFiltering( const TDesC8& aUuids );
+
+    /**
+     * Request the Message Handler to get device list size. 
+     * @param aStatus The TRequestStatus variable of the dispatcher
+     * @param aSize Reference to structure that will contain numbers of
+     * new devices and services.
+     */
+    void RequestGetDeviceListSize( TRequestStatus& aStatus,
+        TUpnpGetDeviceListSize& aSize );
+
+    /**
+     * Request the Message Handler to get device list. 
+     * @param aStatus The TRequestStatus variable of the dispatcher
+     * @param aDevPtr Pointer to buffer that will be used to store
+     * information about new devices.
+     * @param aServPtr Pointer to buffer that will be used to store
+     * information about new services.
+     */
+    void RequestGetDeviceList( TRequestStatus& aStatus, TPtr8& aDevPtr,
+        TPtr8& aServPtr ) const;
+
+    /**
+     * Request stop
+     */
+    void RequestStop();
+
+private:
+
+    /**Pointer for first parameter */
+    TPtr8 iParameter0;
+    };
+
+#endif // C_RUPNPDISPATCHERSESSION_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnperrorcodeseekercontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,142 @@
+/** @file
+* 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:  Declares the CUpnpErrorCodeSeekerContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPERRORCODESEEKERCONTENTHANDLER_H__
+#define __UPNPERRORCODESEEKERCONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+using namespace Xml;
+
+/**
+*  This class handles soap xml subtree starting with fault element.
+*  The only data we're interested in this subtree is upnp errorCode
+*  Rest of subtree is ignored
+*  <s:Fault>
+*  <faultcode>s:Client</faultcode>
+*  <faultstring>UPnPError</faultstring>
+*  <detail>
+*  <UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
+*  <errorCode>error code</errorCode>
+*  <errorDescription>error string</errorDescription>
+*  </UPnPError>
+*  </detail>
+*  </s:Fault>
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser
+*
+*/
+NONSHARABLE_CLASS( CUpnpErrorCodeSeekerContentHandler ) : public CUpnpContentHandler
+{
+public:
+
+    /**
+    * Two-phased constructor
+    * @param aControler controler of parsing process
+    * @param aErrorValue out parameter where error value found will be stored
+    * @return instance of CUpnpErrorCodeSeekerContentHandler class
+    */
+    static CUpnpErrorCodeSeekerContentHandler* NewL(
+            CUpnpContentHandlersController& aController,
+            RBuf8& aErrorValue );
+
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @param aControler controler of parsing process
+    * @param aErrorValue out parameter where error value found will be stored
+    * @return instance of CUpnpErrorCodeSeekerContentHandler class
+    */
+    static CUpnpErrorCodeSeekerContentHandler* NewLC(
+            CUpnpContentHandlersController& aController,
+            RBuf8& aErrorValue );
+
+    /**
+    * Destructor of CUpnpErrorCodeSeekerContentHandler class
+    *
+    */
+    virtual ~CUpnpErrorCodeSeekerContentHandler();
+
+public:	// from CUpnpContentHandler
+
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement,
+                                  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+    /**
+     * Returns value if class is interested in tags all namespaces
+     *
+     * @return ETrue when the class is interested in tags in all namespaces
+     */
+    virtual TBool InterestedInAllNamespaces();
+
+protected:
+
+    /**
+    * Default C++ constructor
+    */
+    CUpnpErrorCodeSeekerContentHandler( CUpnpContentHandlersController& aController,
+        RBuf8& aErrorCode );
+
+
+    /**
+     * Set next state of parsing. If we're interested in particular subtree
+     * state will be handeled by this class, otherwise by ignore handler
+     * @param aFoundTagName name of currently analyzed tag
+     */
+    void SetNextStateL( const TDesC8& aFoundTagName );
+
+    /**
+     * Set previous state of parsing. When particular tag is ended
+     * state of parsind process should be updated.
+     */
+    void SetPreviousState();
+
+    /**
+     * Set particular next state of parsing. If we're interested in particular subtree
+     * state will be handeled by this class, otherwise by ignore handler.
+     * @param aNextAcceptedState next state that should be set if current tag is correct
+     * @param aFoundTagName name of currently analyzed tag
+     */
+    void SetParticularNextStateL(
+        const TDesC8& aNextAcceptedState, const TDesC8& aFoundTagName );
+
+private:
+
+    RBuf8& iErrorValue;
+
+    TPtrC8 iCurrentState;
+
+};
+
+#endif //__UPNPERRORCODESEEKERCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpeventcontroller.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,239 @@
+/** @file
+* 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:  Encapsulates http client for eventing
+*
+*/
+
+
+
+#ifndef C_CUPNPEVENTCONTROLLER_H
+#define C_CUPNPEVENTCONTROLLER_H
+
+// INCLUDES
+#include <e32cmn.h>
+#include <e32std.h>
+#include <e32base.h>
+
+#include "upnphttpclientengine.h"
+#include "upnphttptransaction.h"
+#include "upnpsubscriberlibraryelement.h"
+#include "upnpserviceimplementation.h"
+#include "upnpsubscriberlibraryobserver.h"
+
+
+// FORWARD DECLARATION
+class CUpnpEventQueueManagerBase;
+class CUpnpStateVariable;
+class CUpnpSubscriberLibrary;
+
+_LIT8(KGenaPropertyStart, 
+    "<e:property><");
+_LIT8(KGenaPropertyEnd,
+    "></e:property>");
+_LIT8(KGenaPropertysetEnd,
+    "</e:propertyset>");
+_LIT8(KOpenBracket, "<");
+_LIT8(KCloseBracket, ">");
+_LIT8(KGenaXml,
+    "<?xml version=\"1.0\" encoding=\"utf-8\"?>");
+_LIT8(KGenaPropertysetStart,
+    "<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">"); 
+_LIT8( KYes, "yes" );
+
+
+static const TInt KMessageTimeout = 5000000;//5 sec
+const TInt KMaxEventRate = 5000000;
+
+
+// CLASS DECLARATION
+/**
+*  An interface to Subscriber Library.
+*  
+*  @since Series60 2.6
+*/
+class MTransactionObserver
+    {
+
+public:
+    /**
+    * A virtual function to be implemented in derived classes.
+    * It is called after completed transaction
+    * @param aComletedTransaction just completed transaction
+    * @since Series60 3.2
+    */
+    virtual void TransactionCompletedL(  CUpnpHttpTransaction* aCompletedTranscation  ) = 0;
+
+    };
+
+
+
+/**
+*  This class handles event releated issues
+*  
+*
+*  @since Series60 3.2
+*/
+NONSHARABLE_CLASS( CUpnpEventController ): public CBase, 
+                                           public MUpnpHttpClientObserver,
+                                           public MUpnpSubscriberLibraryObserver
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpEventController();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpEventController* NewL( CUpnpServiceImplementation& aServiceImpl );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpEventController* NewLC( CUpnpServiceImplementation& aServiceImpl );
+
+public:
+    /**
+    * Sends inital event
+    */
+    void SendInitialNotification( );
+    
+    /**
+    * Sends non-modereted event
+    */
+    void SendNonModeratedNotification( );
+    
+    /**
+    * Sends moderated event
+    */    
+    void SendModeratedNotification();
+    
+    /**
+    * Sends message using httpclient
+    * @param aTransaction encapsulated httpmessage with event 
+    */    
+    void SendTransactionL( CUpnpHttpTransaction* aTranscation );
+    
+    /**
+    * Handle subscribe/resubscribe messages
+    * @param aMessage http request
+    */    
+    void SubscribeL( CUpnpGenaMessage* aMessage );
+
+    /**
+    * Handle unsubscribe messages
+    * @param aMessage http request
+    */    
+    void UnSubscribeL( CUpnpGenaMessage* aMessage );
+    
+    /**
+    * Handle unsubscribe messages
+    * @return TInt number of subscribers
+    */    
+    TInt SubscribersAmount();
+    
+
+/*from MUpnpHttpClientObserver*/
+public:
+    /**
+    * Imlements completed transaction handling
+    * @param comleted transaction
+    */    
+    void ClientResponseRecivedLD( CUpnpHttpTransaction& aEndedTransaction );
+    
+/*from MUpnpSubscriberLibraryObserver*/
+public:
+    
+    /**
+    * 
+    * @return all evented state variables
+    */    
+    RPointerArray<CUpnpStateVariable>& EventedStateVariables();
+    
+    /**
+    * Resume processing after removing subscriber 
+    * @param aSubscriber just removed subscriber
+    * @param removed subscriber position in SubscriberLibrary
+    */    
+    void SubscriberRemoved( CUpnpSubscriberLibraryElement* aSubscriber ,TInt aPos );
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpEventController( CUpnpServiceImplementation& aServiceImpl );
+
+    /**
+     * Constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+
+private:
+    /*
+    * Cancel all pending transaction related wih particular subscriber
+    * @param aSid SID uniqe subscriber id
+    */
+    void CancelInvalidSessions( const TDesC8& aSid );
+
+    /*
+    * Checks if unsubscribe message has all header
+    * @param aMessage message to be checked
+    * return validation status
+    */   
+    TUpnpErrorCode CheckHeaders( CUpnpGenaMessage* aMessage );
+    
+    /*
+    * Generates a SID number for given, new subscriber
+    * @param aSubscriber new subscriber
+    */   
+    void GenerateSidL( CUpnpSubscriberLibraryElement* aSubscriber );
+    
+    /*
+    * Creates timeout header
+    * @param aTimeout timeout value
+    * @return header descriptor "Second-'aTimeout'"
+    */   
+    HBufC8* TimerHeaderLC( const TDesC8& aTimeout );
+    
+private:
+    
+    /** Http engine*/
+    CUpnpHttpClientEngine* iHttpEngine;                         //owned
+    
+    /** Store all pending transaction*/
+    RPointerArray<CUpnpHttpTransaction> iPendingTransactions;   //owned
+    
+    
+    CUpnpServiceImplementation& iServiceImpl;                   //not owned
+    
+    /**Non-moderated event queue manager */
+    CUpnpEventQueueManagerBase* iNonModQueue;                   //owned
+    
+    /**Moderated event queue manager */
+    CUpnpEventQueueManagerBase* iModQueue;                      //owned
+    
+    /**Initial event queue manager */
+    CUpnpEventQueueManagerBase* iInitialEventQueue;             //owned
+    
+    /**Store information about subscribers*/
+    CUpnpSubscriberLibrary* iSubscriberLibrary;                 //owned
+    };
+
+#endif // C_CUPNPEVENTCONTROLLER_H
+//end of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpeventqueuemanagerbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,182 @@
+/** @file
+* 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:  Base class for event queue manager
+*
+*/
+
+
+#ifndef C_CUPNPEVENTQUEUEMANAGERBASE_H
+#define C_CUPNPEVENTQUEUEMANAGERBASE_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+#include "upnphttptransaction.h"
+#include "upnpserviceimplementation.h"
+#include "upnpeventcontroller.h"
+#include "upnpsubscriberlibrary.h"
+
+
+const TInt KFirstSubscriberInQueue(0);
+
+
+// CLASS DECLARATION
+/**
+ *  UpnpNonModeratedEventQueueManager
+ * 
+ */
+NONSHARABLE_CLASS( CUpnpEventQueueManagerBase ): public CBase, public MTransactionObserver
+    {
+public:
+    // Constructors and destructor
+
+    /**
+    * Destructor.
+    */
+    ~CUpnpEventQueueManagerBase();
+
+    /**
+    * Two-phased constructor
+    * @param aServiceImpl
+    * @param aEventController 
+    * $param aSubscriberLibrary 
+    */
+    static CUpnpEventQueueManagerBase * NewL( CUpnpServiceImplementation& aServiceImpl,
+                                              CUpnpEventController& aEventController,
+                                              CUpnpSubscriberLibrary* aSubscriberLibrary );
+
+    /**
+    * Two-phased constructor.
+    * @param aServiceImpl
+    * @param aEventController 
+    * $param aSubscriberLibrary 
+    */
+    static CUpnpEventQueueManagerBase * NewLC( CUpnpServiceImplementation& aServiceImpl,
+                                               CUpnpEventController& aEventController,
+                                               CUpnpSubscriberLibrary* aSubscriberLibrary );
+    
+public:
+    /*
+    * Trigers event sending,
+    * has to be implemented in delivered class
+    */
+    virtual void SendEvent() = 0;
+    
+    void UpdateQueue( TInt aPos );
+    
+    
+/** from MTransactionObserver*/
+public:  
+ 
+    void TransactionCompletedL(  CUpnpHttpTransaction* aCompletedTranscation  );
+    
+    
+protected:    
+
+    /*
+    * Finishes processing of the event sending queue
+    */
+    void SendingCompleted();
+    
+    /*
+    * Sends the event to the next subscriber
+    */
+    void SendToNextL();
+    
+    /*
+    * Prepares event message and sends it to given subscriber
+    * @param aSubscriberNo subscriber's position on SubscribersLibrary list
+    */
+    void PrepareTransactionAndStartSendingL( TInt aSubscriberNo );
+
+    /*
+    * Removes subscriber form the SubscriberLibrary,
+    * recognize it by SID releated with event message
+    * @param aCompletedTransaction unsuccesfully completed transaction
+    */
+    void RemoveInvalidSubscriber( CUpnpHttpTransaction* aCompletedTransacation );
+                                  
+    /*
+    * Creates xml message with all evented variables
+    * @aparam aVariableList list with evented variables
+    */
+    HBufC8* CreateEventL( const RPointerArray<CUpnpStateVariable>& aVariableList );
+       
+    /*
+    * Adds single variable to message body
+    * @param aBufer message is appended to given buffer
+    * @param aVariable variable which will be added to buffer
+    */
+    void AddVariableToEventBody( TDes8& aBuffer , CUpnpStateVariable * aVariable );
+    
+    /*
+    * Clears evented variable list
+    */
+    void ClearVariables();
+    
+    /*
+    * Creates event specyfic message,
+    * has to be implemented in delivered class
+    */
+    virtual TInt FillEventBodyL ( TDes8& aEvent,     
+                          const RPointerArray<CUpnpStateVariable>& aVariableList ) = 0;
+    
+    /*
+    * Encapsulates event message into http transaction
+    * has to be implemented in delivered class
+    */                     
+    virtual CUpnpHttpTransaction* CreateTransactionL( CUpnpHttpMessage* aMessage ) = 0;                         
+
+protected:
+
+    /**
+    * Constructor for performing 1st stage construction
+    * @param aServiceImpl
+    * @param aEventController 
+    * $param aSubscriberLibrary 
+    */
+    CUpnpEventQueueManagerBase ( CUpnpServiceImplementation& iServiceImpl,
+                                 CUpnpEventController& iEventController,
+                                 CUpnpSubscriberLibrary* aSubscriberLibrary );
+    
+    /**
+    * Constructor for performing 2st stage construction
+    */
+    void BaseConstructL();
+
+protected:
+    
+    /*Points the currently proccesed subscriber */
+    TInt iCurrentSubscriberIndex;               //owned
+    
+    /*Current event message*/
+    HBufC8* iBody;                              // owned
+    
+    /*Status flag */
+    TBool iIsSending;
+    
+    /*Status flag*/
+    TBool iNewValuesWaitingToBeSend;            //owned
+
+    
+    CUpnpServiceImplementation& iServiceImpl;   //not owned
+    
+    CUpnpEventController& iEventController;     //not owned
+    
+    CUpnpSubscriberLibrary* iSubscriberLibrary; //not owned
+    };
+
+#endif // C_CUPNPEVENTQUEUEMANAGERBASE_H
+//end of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpgenamessage.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,140 @@
+/** @file
+* 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:  Declares the CUpnpGenaMessage class. 
+*
+*/
+
+
+#ifndef C_CUPNPGENAMESSAGE_H
+#define C_CUPNPGENAMESSAGE_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnphttpmessage.h"
+#include "upnphttpheader.h"
+#include "upnpcons.h"
+
+// CONSTANTS
+/*
+_LIT8( KNoHeader, "NoHeader" );
+_LIT8( KDefaultHostPort, "80" );
+_LIT8( KSidPrefix,"uuid:" );
+_LIT8( KTimeoutPrefix,"Second-" );
+*/
+static const TInt KMaxGenaMessageLength = 20480;
+
+// CLASS DECLARATION
+
+/**
+*  GENA-Message class. Used in sending and handling GENA-messages.
+*
+*  @since Series60 2.6
+*/
+class CUpnpGenaMessage : public CUpnpHttpMessage
+{
+public: // Constructors and destructor
+    
+    // Enumeration for GENA-message types:
+    enum TGenaMessageType 
+        {   
+        EGenaSubscription = 1,
+        EGenaResubscription,
+        EGenaUnsubscription,
+        EGenaEventing,
+        EGenaSubscriptionResponse,
+        EGenaResubscriptionResponse,
+        EGenaUnsubscriptionResponse,
+        EGenaEventingResponse
+        };
+    
+    /**
+    * Two-phased constructor.
+    * @param aAddr the address
+    */
+    IMPORT_C static CUpnpGenaMessage* NewL( const TInetAddr& aAddr );
+    
+    /**
+    * Two-phased constructor.
+    * @param aAddr the address
+    */
+    IMPORT_C static CUpnpGenaMessage* NewLC( const TInetAddr& aAddr );
+    
+    /**
+    * Virtual Destructor.
+    */
+    IMPORT_C virtual ~CUpnpGenaMessage();        
+    
+public: // New functions
+
+    /**
+    * Returns CALLBACK-header of GENA-message.
+    * @since Series60 2.6
+    * @return CALLBACK header of GENA message or NULL
+    */
+    IMPORT_C TDesC8& Callback();
+    
+    /**
+    * Returns NT-header of GENA-message.
+    * @since Series60 2.6
+    * @return NT header of GENA message or NULL
+    */
+    IMPORT_C TDesC8& Nt();
+    
+    /**
+    * Returns TIMEOUT-header of GENA-message.
+    * @since Series60 2.6
+    * @return TIMEOUT header of GENA message or NULL
+    */
+    IMPORT_C TDesC8& Timeout();
+    
+    /**
+    * Returns SID-header of GENA-message.
+    * @since Series60 2.6
+    * @return SID header of GENA message or NULL
+    */
+    IMPORT_C TDesC8& Sid();
+    
+    /**
+    * Returns NTS-header of GENA-message.
+    * @since Series60 2.6
+    * @return NTS header of GENA message or NULL
+    */
+    IMPORT_C TDesC8& Nts();
+    
+    /**
+    * Returns SEQ-header of GENA-message.
+    * @since Series60 2.6
+    * @return SEQ header of GENA message or NULL
+    */
+    IMPORT_C const TDesC8& Seq();
+
+private:
+    
+    /**
+    * C++ default constructor.
+    */
+    IMPORT_C CUpnpGenaMessage(); 
+    
+    /**
+    * Second phase construct.
+    **/     
+    void ConstructL(TInetAddr aSender);    
+   
+};
+
+#endif // C_CUPNPGENAMESSAGE_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpgenamessagefactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,166 @@
+/** @file
+* 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:  Declares the RUpnpGenaMessageFactory class. 
+*
+*/
+
+
+#ifndef C_RUPNPGENAMESSAGEFACTORY_H
+#define C_RUPNPGENAMESSAGEFACTORY_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include "upnpgenamessage.h"
+
+// CLASS DECLARATION
+
+/**
+*  @brief Gena Message Factory.
+*  
+*  Used to create standard GENA-messages.
+*
+*  @since Series60 2.6
+*/
+class RUpnpGenaMessageFactory
+{
+public: // New functions
+
+    /**
+    * Constructor function; Creates subscription message with following 
+    * parameters.
+    * @since Series60 2.6
+    * @param aPath Publisher path.
+    * @param aHost Publisher host and port.
+    * @param aCallback Callback address.
+    */
+    IMPORT_C static CUpnpGenaMessage* SubscribeL( const TDesC8& aPath,
+                                                  TInetAddr& aHost,
+                                                  const TDesC8& aCallback );
+        
+    /**
+    * Constructor function; Creates subscription message with following 
+    * parameters.
+    * @since Series60 2.6
+    * @param aPath Publisher path.
+    * @param aHost Publisher host and port.
+    * @param aCallback Callback address.
+    * @param aTimeout Requested subscription timeout.
+    */
+    IMPORT_C static CUpnpGenaMessage* SubscribeL( const TDesC8& aPath,
+                                                  TInetAddr& aHost,
+                                                  const TDesC8& aCallback,
+                                                  const TDesC8& aTimeout );
+
+    /**
+    * Constructor function; Creates resubscription message with following
+    * parameters.
+    * @since Series60 2.6
+    * @param aPath Publisher path.
+    * @param aHost Publisher host and port.
+    * @param aSid Subscription id.
+    */
+    IMPORT_C static CUpnpGenaMessage* ResubscribeL( const TDesC8& aPath,
+                                                    TInetAddr& aHost,
+                                                    const TDesC8& aSid );
+
+    /**
+    * Constructor function; Creates resubscription message with following 
+    * parameters.
+    * @since Series60 2.6
+    * @param aPath Publisher path.
+    * @param aHost Publisher host and port.
+    * @param aSid Subscription id.
+    * @param aTimeout Requested subscription timeout.
+    */
+    IMPORT_C static CUpnpGenaMessage* ResubscribeL( const TDesC8& aPath,
+                                                    TInetAddr& aHost,
+                                                    const TDesC8& aSid,
+                                                    const TDesC8& aTimeout );
+
+    /**
+    * Constructor function; Creates unsubscription message with following 
+    * parameters.
+    * @since Series60 2.6
+    * @param aPath Publisher path.
+    * @param aHost Publisher host and port.
+    * @param aSid Subscription id.
+    */
+    IMPORT_C static CUpnpGenaMessage* UnsubscribeL( const TDesC8& aPath,
+                                                    TInetAddr& aHost,
+                                                    const TDesC8& aSid );
+
+    /**
+    * Constructor function; Creates  subscription response message with
+    * following parameters.
+    * @since Series60 2.6
+    * @param aSessionId Sennion id to respond.
+    * @param aDestination Destination address.
+    * @param aSid Subscription id.
+    * @param aTimeout Timeout defined by the Service. Integer or Infinite.
+    * @return Response which is ready to send.
+    */
+    IMPORT_C static CUpnpGenaMessage* SubscribeResponseL( TInt aSessionId,
+                                                          const TInetAddr& aDestination,
+                                                          const TDesC8& aSid,
+                                                          const TDesC8& aTimeout );
+
+    /**
+    * Constructor function; Creates  subscription response message with 
+    * following parameters.
+    * @since Series60 2.6
+    * @param aSessionId Sennion id to respond.
+    * @param aDestination Destination address.
+    * @param aTimeStamp ETrue appends date-header to the message.
+    * @param aSid Subscription id.
+    * @param aTimeout Timeout defined by the Service. Integer or Infinite.
+    * @return Response which is ready to send.
+    */
+    IMPORT_C static CUpnpGenaMessage* SubscribeResponseL(
+                                                 TInt aSessionId,
+                                                 const TInetAddr& aDestination,
+                                                 TBool aTimeStamp,
+                                                 const TDesC8& aSid,
+                                                 const TDesC8& aTimeout );
+
+    /**
+    * Constructor function; Creates  unsubscription response message with
+    * following parameters.
+    * @since Series60 2.6
+    * @param aSessionId Sennion id to respond.
+    * @param aDestination Destination address.
+    */
+    IMPORT_C static CUpnpGenaMessage* UnsubscribeResponseL(
+                                                         TInt aSessionId,
+                                                         const TInetAddr& aDestination );
+
+    /**
+    * Constructor function; Creates a event message header with following 
+    * parameters.
+    * @since Series60 2.6
+    * @param aPath Publisher path.
+    * @param aHost Publisher host and port.
+    * @param aSid Subscription ID.
+    * @param aSeq Sequence key.
+    * @return Event-message without body. Attach body using SetBodyL-function.
+    */
+    IMPORT_C static CUpnpGenaMessage* EventingLC( const TDesC8& aPath,
+                                                  TInetAddr& aHost,
+                                                  const TDesC8& aSid,
+                                                  TUint32 aSeq );
+};
+
+#endif // C_RUPNPGENAMESSAGEFACTORY_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttpclientengine.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,113 @@
+/** @file
+* 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:  Declares the CUpnpHttpClientEngine class
+*
+*/
+
+
+#ifndef __UPNPHTTPCLIENTENGINE_H__
+#define __UPNPHTTPCLIENTENGINE_H__
+
+// INCLUDES
+#include <http/rhttpsession.h>
+#include <es_sock.h>
+#include "upnphttpmessagesenderowner.h"
+#include "upnpconnectionmanagerproxy.h"
+
+// FORWARD DECLARATIONS
+class CUpnpHttpTransaction;
+class CUpnpHttpMessageSender;
+
+// CLASS DECLARATION
+
+/**
+* MUpnpHttpClientObserver
+* CUpnpHttpClientEngine passes end of transaction event with this interface.
+* An instance of this class must be provided for construction of CUpnpHttpClientEngine.
+*/
+class MUpnpHttpClientObserver
+    {
+    public:
+        virtual void ClientResponseRecivedLD( CUpnpHttpTransaction& aEndedTransaction ) = 0;
+    };
+
+/**
+* CUpnpHTTPClientEngine
+* Provides simple interface to HTTP Client API.
+*/
+NONSHARABLE_CLASS( CUpnpHttpClientEngine ): public CBase, public MUpnpHttpMessageSenderOwner
+    {
+    public:
+        /**
+        * Create a CUpnpHttpClientEngine object.
+        * @param  iObserver:
+        * @return A pointer to the created instance of CWebClientEngine
+        */
+        IMPORT_C static CUpnpHttpClientEngine* NewL(
+            MUpnpHttpClientObserver& aObserver, TInt aActiveIap );
+
+        /**
+        * Create a CUpnpHttpClientEngine object and leave it on cleanup stack.
+        * @param  iObserver:
+        * @return A pointer to the created instance of CWebClientEngine
+        */
+        IMPORT_C static CUpnpHttpClientEngine* NewLC(
+            MUpnpHttpClientObserver& aObserver, TInt aActiveIap );
+
+        /**
+        * Destroy the object
+        */
+        IMPORT_C ~CUpnpHttpClientEngine();
+
+        IMPORT_C void SendL( CUpnpHttpTransaction& aTransaction );
+        
+        /*IMPORT_C*/ void Cancel( CUpnpHttpTransaction& aTransaction );
+private:
+        TInt Find( CUpnpHttpTransaction& aTransaction );
+
+
+private://from MUpnpHttpMessageSenderOwner
+
+        /*
+         * Destroyes sender and removes it from senders list.
+         */
+        virtual void SenderFinishedLD( CUpnpHttpMessageSender* aSenderToRelease );
+
+private:
+
+        /**
+        * Perform the second phase construction of a CWebClientEngine object.
+        */
+        void ConstructL( TInt aActiveIap );
+
+        /**
+        * Perform the first phase of two phase construction.
+        * @param iObserver:
+        */
+        CUpnpHttpClientEngine( MUpnpHttpClientObserver& iObserver );
+
+    private: 
+        RHTTPSession            	iSession;
+        MUpnpHttpClientObserver&    iObserver;
+
+        RSocketServ iSocketServ;
+        CUpnpConnectionManagerProxy* iConnectionManagerProxy;
+
+        RPointerArray<CUpnpHttpMessageSender> iSenders;
+    };
+
+#endif // __UPNPHTTPCLIENTENGINE_H__
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttpinitialeventtransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,68 @@
+/** @file
+* 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:  Implements algoritms for nonmodereted events
+*
+*/
+
+
+#ifndef C_CUPNPHTTPINITIALEVENTTRANSACTION_H
+#define C_CUPNPHTTPINITIALEVENTTRANSACTION_H
+
+// INCLUDES
+
+#include "upnphttptransaction.h"
+
+// CLASS DECLARATION
+
+/**
+*  CUpnpHttpInitialEventTransaction
+* 
+*/
+NONSHARABLE_CLASS( CUpnpHttpInitialEventTransaction ): public CUpnpHttpTransaction
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpHttpInitialEventTransaction();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpHttpInitialEventTransaction* NewL( CUpnpHttpMessage* aRequest );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpHttpInitialEventTransaction* NewLC( CUpnpHttpMessage* aRequest );
+    
+    /*
+    * Pure virtual method that let child classes to process
+    * response in their own specific way.
+    */
+    void ProcessResponseL();
+        
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpHttpInitialEventTransaction( CUpnpHttpMessage* aRequest );
+
+    };
+
+#endif // C_CUPNPHTTPINITIALEVENTTRANSACTION_H
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttpmessagesender.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,248 @@
+/** @file
+* 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:  Declares the CUpnpHttpMessageSender class
+ *
+*/
+
+
+#ifndef __UPNPHTTPMESSAGESENDER_H__
+#define __UPNPHTTPMESSAGESENDER_H__
+
+#include <http.h>
+#include <upnpnotifytimer.h>
+
+class MUpnpHttpMessageSenderOwner;
+class CUpnpHttpTransaction;
+
+/**
+ *  Class that manage sending process of a single transaction (
+ *  request http message and response http message).
+ *
+ */
+NONSHARABLE_CLASS( CUpnpHttpMessageSender ) : public CBase,
+                                              public MHTTPTransactionCallback,
+                                              public MHTTPDataSupplier,
+                                              public MUpnpNotifyTimerObserver
+    {
+public:
+    /**
+     * Two-phased constructor. Create a CUpnpHttpMessageSender object.
+     * @param aUpnpTransaction unsent upnp transaction object
+     * @param aSession opened http session that will be used to send the message
+     * @param aOwner object that should be notified when sender finish its job
+     *                  and issue destruction of this (sender) object
+     * @return A pointer to the created instance of CUpnpHttpMessageSender
+     */
+    static CUpnpHttpMessageSender* NewL( CUpnpHttpTransaction& aUpnpTransaction,
+                                         RHTTPSession aSession,
+                                         MUpnpHttpMessageSenderOwner& aOwner
+                                         );
+
+    /**
+     * Two-phased constructor. Create a CUpnpHttpMessageSender object.
+     * @param aUpnpTransaction unsent upnp transaction object
+     * @param aSession opened http session that will be used to send the message
+     * @param aOwner object that should be notified when sender finish its job
+     *                  and issue destruction of this (sender) object
+     * @return A pointer to the created instance of CUpnpHttpMessageSender
+     */
+    static CUpnpHttpMessageSender* NewLC( CUpnpHttpTransaction& aUpnpTransaction,
+                                          RHTTPSession aSession,
+                                          MUpnpHttpMessageSenderOwner& aOwner
+                                          );
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpHttpMessageSender();
+
+    /**
+     * Start a new HTTP transaction maintained by the object. It will start
+     * asynchronous sending of request message.
+     */
+    void StartTransactionL();
+
+    /**
+     * Returns upnp transaction object that is maintained by the object.
+     * @return upnp transaction object that is maintained by the object
+     */
+    CUpnpHttpTransaction& UpnpTransaction();
+    
+    
+    void CancelTransaction();
+
+private:    //from MHTTPTransactionCallback
+    /**
+     * Called by framework to notify about transaction events.
+     * @param aTransaction: Transaction, where the event occured.
+     * @param aEvent:       Occured event.
+     */
+    virtual void MHFRunL( RHTTPTransaction aTransaction, const THTTPEvent& aEvent );
+
+    /**
+     * Called by framework when *leave* occurs in handling of transaction event.
+     * @param aError:       The leave code that occured.
+     * @param aTransaction: The transaction that was being processed when leave occured.
+     * @param aEvent:       The event that was being processed when leave occured.
+     * @return KErrNone,    if the error was handled. Otherwise the value of aError, or
+     *                      some other error value. Returning error value causes causes
+     *                      HTTP-CORE 6 panic.
+     */
+    virtual TInt MHFRunError( TInt aError,
+            RHTTPTransaction aTransaction,
+            const THTTPEvent& aEvent );
+
+private:    //from MHTTPDataSupplier
+    /*
+     * Methods from MHTTPDataSupplier are used to supply body of request from
+     * our UpnpMessage to Symian RHTTPRequest
+     */
+    virtual TBool GetNextDataPart( TPtrC8& aDataChunk );
+
+    virtual void ReleaseData();
+
+    virtual TInt OverallDataSize();
+
+    virtual TInt Reset();
+
+private:    //from MNotifyTimerObserver
+    /**
+     * From MNotifyTimerObserver Function which indicate that message is timeout.
+     * @since Series ?XX ?SeriesXX_version
+     * @param aTimer Timer.
+     */
+    virtual void TimerEventL( CUpnpNotifyTimer* aTimer );
+
+private:
+    /**
+     * Constructor
+     * @param aUpnpTransaction unsent upnp transaction object
+     * @param aSession opened http session that will be used to send the message
+     * @param aOwner object that should be notified when sender finish its job
+     *                  and issue destruction of this (sender) object
+     */
+    CUpnpHttpMessageSender( CUpnpHttpTransaction& aUpnpTransaction,
+                            RHTTPSession aSession,
+                            MUpnpHttpMessageSenderOwner& aOwner
+                            );
+                                                        
+    /**
+     * Second phase constructor
+     */
+    void ConstructL();
+
+    /**
+     * Opens RHTTPTransaction with request method and uri, subscribe
+     * for transaction's events
+     */
+    void PrepareRequestTransactionL();
+
+    /**
+     * Sets http headers from UpnpHttpTransaction to RHTTPTransaction
+     */
+    void PrepareRequestHeadersL();
+
+    /**
+     * Copies http headers from RHTTPTransaction to UpnpHttpTransaction
+     */
+    void CopyResponseHeadersL();
+
+    /**
+     * Sets http message body from UpnpHttpTransaction to RHTTPTransaction
+     */
+    void PrepareRequestBody();
+
+    /**
+     * Starts timer of request sending with TcpTimeout value.
+     */
+    void StartRequestTimer();
+
+    /**
+     * Called when transaction succeeded.
+     * Closes RHTTPTransaction, and forward result message to observer.
+     */
+    void TransactionSucceeded();
+
+    /**
+     * Do NOT use this method directly, but via TransactionFailed
+     */
+    void DoTransactionFailedL( TInt aStatus, TInt aError );
+    
+    /**
+     * Do NOT use this method directly, but via TransactionSucceded
+     */
+    void DoTransactionSucceededL();
+    
+    /**
+     * Called in case of every fail of transaction.
+     * Closes RHTTPTransaction, creates error message (408 timeout), and forward it
+     * to observer.
+     */
+    void TransactionFailed( TInt aStatus, TInt aError = 0 );
+
+    /**
+     * Called when transaction got another part of body data.
+     * Data is concatenated to iBody and when the last part of body is received
+     * request message is created witin transaction.
+     */
+    void GotResponseBodyDataL( MHTTPDataSupplier& aResponseBodySupplier );
+
+    /**
+     * Helper method that allocate descriptor object with destination uri of message
+     * passed as a parameter.
+     */
+    static HBufC8* DestinationUriL( CUpnpHttpMessage* aMessage );
+
+private:
+    /**
+     * Represents UPnP transaction
+     */
+    CUpnpHttpTransaction& iUpnpTransaction;
+
+    /**
+     * Timer of transaction
+     */
+    CUpnpNotifyTimer* iTimer;
+
+    /**
+     * Represents HTTP Transaction used to realize UPnP transaction
+     */
+    RHTTPTransaction iTransaction;
+
+    /**
+     * Error number to be sent if transaction failed
+     */    
+    TInt iCurrentErrorNumber;
+    
+    /**
+     * Represents HTTP Session object
+     */
+    RHTTPSession iSession;
+
+    /**
+     * Body of received message
+     */
+    HBufC8* iBody;
+
+    /*
+     * Owner of an instance.
+     */
+    MUpnpHttpMessageSenderOwner& iOwner;
+
+    };
+
+#endif /*__UPNPHTTPMESSAGESENDER_H__*/
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttpmessagesenderowner.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+/** @file
+* 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:  Declares the MUpnpHttpMessageSenderOwner interface
+ *
+*/
+
+
+#ifndef __UPNPHTTPMESSAGESENDEROWNER_H__
+#define __UPNPHTTPMESSAGESENDEROWNER_H__
+
+class CUpnpHttpMessageSender;
+
+/**
+* MUpnpHttpMessageSenderOwner
+* Interface that let sender owner to receive information that sender
+* isn't needed any more.
+*/
+class MUpnpHttpMessageSenderOwner
+    {
+    public:
+        /*
+         * Sender has finished it's task and can be destroyed.
+         */
+        virtual void SenderFinishedLD( CUpnpHttpMessageSender* aSenderToRelease ) = 0;
+    };
+
+#endif /*__UPNPHTTPMESSAGESENDEROWNER_H__*/
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttpmoderatedeventtransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,76 @@
+/** @file
+* 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:  Implements transaction for moderated events
+*
+*/
+
+#ifndef C_CUPNPHTTPMODERATEDEVENTTRANSACTION_H
+#define C_CUPNPHTTPMODERATEDEVENTTRANSACTION_H
+
+
+// INCLUDES
+#include "upnphttptransaction.h"
+#include "upnpnonmoderatedeventqueuemanager.h"
+
+// CLASS DECLARATION
+
+/**
+ *  CUpnpHttpModeratedEventTransaction
+ * 
+ */
+NONSHARABLE_CLASS( CUpnpHttpModeratedEventTransaction ): public CUpnpHttpTransaction
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpHttpModeratedEventTransaction();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpHttpModeratedEventTransaction* NewL( CUpnpHttpMessage* aRequest, 
+                                                     MTransactionObserver& aObserver );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpHttpModeratedEventTransaction* NewLC( CUpnpHttpMessage* aRequest, 
+                                                      MTransactionObserver& aObserver);
+    
+    /*
+     * Pure virtual method that let child classes to process
+     * response in their own specific way.
+     */
+    void ProcessResponseL();
+    
+            
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpHttpModeratedEventTransaction( CUpnpHttpMessage* aRequest, 
+                                        MTransactionObserver& aObserver );
+
+
+private:
+    
+    MTransactionObserver& iObserver;//not owned
+    };
+
+#endif // C_CUPNPHTTPMODERATEDEVENTTRANSACTION_H
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttpnonmoderatedeventtransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,73 @@
+/** @file
+* 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:  Implements algoritms for nonmodereted events
+*
+*/
+
+
+#ifndef C_CUPNPHTTPNONMODERATEDEVENTTRANSACTION_H
+#define C_CUPNPHTTPNONMODERATEDEVENTTRANSACTION_H
+
+// INCLUDES
+#include "upnpnonmoderatedeventqueuemanager.h"
+
+// CLASS DECLARATION
+
+/**
+ *  CUpnpHttpNonModeratedEventTransaction
+ * 
+ */
+NONSHARABLE_CLASS( CUpnpHttpNonModeratedEventTransaction ): public CUpnpHttpTransaction
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpHttpNonModeratedEventTransaction();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpHttpNonModeratedEventTransaction* NewL( CUpnpHttpMessage* aRequest, MTransactionObserver& aObserver );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpHttpNonModeratedEventTransaction* NewLC( CUpnpHttpMessage* aRequest, MTransactionObserver& aObserver);
+    
+    /*
+     * Pure virtual method that let child classes to process
+     * response in their own specific way.
+     */
+    void ProcessResponseL();
+    
+            
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpHttpNonModeratedEventTransaction( CUpnpHttpMessage* aRequest, MTransactionObserver& aObserver );
+
+
+private:
+    
+    MTransactionObserver& iObserver;//not owned
+    
+    };
+
+#endif // C_CUPNPHTTPNONMODERATEDEVENTTRANSACTION_H
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttpservertransactiondescription.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,74 @@
+/** @file
+* 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:  CUpnpHttpServerTransactionDescription declaration.
+*
+*/
+
+#ifndef UPNPHTTPFILESERVETRANSACTION_H_
+#define UPNPHTTPFILESERVETRANSACTION_H_
+
+// INCLUDES
+#include "upnphttpservertransaction.h"
+
+// FORWARD DECLARATION
+class CUpnpHttpServerTransactionHandler;
+class TInetAddr;
+
+/**
+ *  Transaction serving desciptions and icons. 
+ *  
+ */
+NONSHARABLE_CLASS( CUpnpHttpServerTransactionDescription ): public CUpnpHttpServerTransaction
+    {
+public:
+    /**
+     * 2 phase constructor
+     */
+    static CUpnpHttpServerTransactionDescription* NewL( 
+    		CUpnpHttpServerTransactionHandler& aClientContext, const TInetAddr& aSender, const TDesC8& aUri );
+        
+    ~CUpnpHttpServerTransactionDescription();
+    
+    /**
+     * Base class callback implementation
+     */        
+    virtual void OnCallbackL( TUpnpHttpServerEvent aEvent );  
+
+
+
+protected:
+
+    void ConstructL( const TInetAddr& aSender, const TDesC8& aSenderUri );
+	
+    CUpnpHttpServerTransactionDescription( CUpnpHttpServerTransactionHandler& aClientContext );
+    
+private:
+    void DoCallbackL( TUpnpHttpServerEvent aEvent );
+    
+    TInt DecodeUri();
+
+private:
+    // Sender Uri.
+    HBufC8* iSenderUri;
+    // Sender address.
+    TInetAddr iSender;
+    
+    
+    RBuf8 iDecodedUri;
+    
+    CUpnpHttpServerTransactionHandler& iClientContext;
+        
+    };
+
+#endif /* UPNPHTTPFILESERVETRANSACTION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttpservertransactionhandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,118 @@
+/** @file
+* 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:  CUpnpHttpServerTransactionHandler declaration.
+*
+*/
+
+#ifndef UPNPDLNAFILTER_H
+#define UPNPDLNAFILTER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <f32file.h> 
+#include "upnphttpservertransactioncreator.h"
+
+// FORWARD DECLARATION
+class CUpnpHttpMessage;
+class CUpnpDeviceImplementationBase;
+class TInetAddr;
+
+// CLASS DECLARATION
+
+/**
+ *  Creates http server transactions and provides methods 
+ *  for resolving source file by request URL
+ *  Served files are: device and service description xml's and icons.
+ *  
+ */
+NONSHARABLE_CLASS( CUpnpHttpServerTransactionHandler ) : public CBase,
+        public MUpnpHttpServerTransactionCreator
+    {
+public:
+    // Public Constructors and destructor
+
+    enum TDescriptionType 
+        {
+        EDevice,
+        EService,
+        EIcon,
+        ENotFound
+        };
+    
+    /**
+     * Destructor.
+     */
+    ~CUpnpHttpServerTransactionHandler();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpHttpServerTransactionHandler* NewL( CUpnpDeviceImplementationBase& aDevice );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpHttpServerTransactionHandler* NewLC( CUpnpDeviceImplementationBase& aDevice );
+
+    /**
+     * Checks correctness of path to, requested in HTTP message, file and 
+     *  changes its format to be compliant with Symbian's file system.
+     * @since Series60 2.6
+     * @param aMsg HTTP message containing file request.
+     * @param aPathWithNewMethod reference which is filled with formated path 
+     *  to requested file.
+     **/
+    void FormatPathL( const TDesC8& aUri, TDes& aPathWithNewMethod );
+            
+    /**
+     * Opens file depending on specified uri and IP address
+     *
+     * @since Series60 MCL
+     * @param aFile File to open
+     * @param aUri request uri
+     * @param aInetAdress requestor IP address
+     * @return error code
+     */
+    TInt GetFileL( RFile& aFile,
+            const TDesC8& aUri, const TInetAddr& aInetAdress );
+
+private:  // from MUpnpHttpServerTransactionCreator
+
+    virtual void NewTransactionL( const TDesC8& aMethod, const TDesC8& aUri, 
+        const TInetAddr& aSender, CUpnpHttpServerTransaction*& aResultTrans );
+
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpHttpServerTransactionHandler( CUpnpDeviceImplementationBase& aDevice );
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+    
+    TDescriptionType MatchType( const TDesC8& aUri );
+   
+private:
+    CUpnpDeviceImplementationBase& iDevice;
+    
+    };
+
+#endif // UPNPDLNAFILTER_H
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnphttptransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,83 @@
+/** @file
+* 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:  Declares the CUpnpHttpTransaction class
+*
+*/
+
+
+#ifndef __UPNPHTTPTRANSACTION_H__
+#define __UPNPHTTPTRANSACTION_H__
+
+#include <e32base.h>
+
+class CUpnpHttpMessage;
+
+/**
+ * Abstract base class for every upnp transaction.
+ * Transaction encapsulates request and response message.
+ * Client constructs instance of transaction with request, and sends it
+ * by client engine. When response comes engine writes it to response message
+ * and transaction can process it by implementing ProcessResponseL method.
+ */
+class CUpnpHttpTransaction : public CBase
+    {
+    public:
+        IMPORT_C ~CUpnpHttpTransaction();
+
+        /*
+         * Returns request message of transaction.
+         *
+         * @return request message of transaction
+         */
+        IMPORT_C CUpnpHttpMessage* Request();
+
+        /*
+         * Returns response message of transaction.
+         *
+         * @return response message of transaction
+         */
+        IMPORT_C CUpnpHttpMessage* Response();
+
+        /*
+         * Pure virtual method that let child classes to process
+         * response in their own specific way.
+         */
+        virtual void ProcessResponseL() = 0;
+
+        /*
+         * Creates ok response for the request
+         *
+         * @param aResponseBody response body to set in response message
+         */
+        void CreateOkResponseL( const TDesC8& aResponseBody );
+
+        /*
+         * Creates response for the request
+         *
+         */      
+        void CreateFaultResponseL( const TDesC8& aResponseBody, TInt aStatus, TInt aError );
+
+    protected:
+        IMPORT_C CUpnpHttpTransaction( CUpnpHttpMessage* aRequest );
+        IMPORT_C void BaseConstructL();
+
+    private://owned
+        CUpnpHttpMessage* iHttpRequest;
+        CUpnpHttpMessage* iHttpResponse;
+    };
+
+#endif /*__UPNPHTTPTRANSACTION_H__*/
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpiconcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,121 @@
+/** @file
+* 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:  Declares the CUpnpIconContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPICONCONTENTHANDLER_H__
+#define __UPNPICONCONTENTHANDLER_H__
+
+#include <babitflags.h>
+
+#include "upnpcontenthandler.h"
+
+class CUpnpIcon;
+
+using namespace Xml;
+
+/**
+*  This class handles icon subtree of service descriptions
+*  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+*
+*  @since Series60 2.6
+*/
+NONSHARABLE_CLASS( CUpnpIconContentHandler ) : public CUpnpContentHandler
+{
+protected: 
+    enum TState
+        { 
+        EInitial,
+        EMimeType, 
+        EWidth, 
+        EHeight,
+        EDepth,
+        EUrl
+        };
+        
+public:
+    
+    /**
+    * Two-phased constructor
+    * @since Series60 3.2 
+    * @return instance of CUpnpIconContentHandler class
+    */	
+    static CUpnpIconContentHandler* NewL(
+            CUpnpContentHandlersController& aController, CUpnpIcon& aResultIcon );
+    
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @since Series60 3.2 
+    * @return instance of CUpnpIconContentHandler class
+    */	
+    static CUpnpIconContentHandler* NewLC( 
+            CUpnpContentHandlersController& aController, CUpnpIcon& aResultIcon );
+    
+    /**
+    * Destructor of CUpnpIconContentHandler class
+    * @since Series60 3.2     
+    */	
+    virtual ~CUpnpIconContentHandler();
+    
+public:	// from CUpnpContentHandler
+    
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+                                 const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+     virtual void OnContentL( const TDesC8& aBytes );    
+    
+protected:
+    
+    /**
+    * Default C++ constructor 
+    * @since Series60 3.2     
+    */	
+	CUpnpIconContentHandler( CUpnpContentHandlersController& aController, 
+	        CUpnpIcon& aResultIcon );
+	
+	/**
+	* Parses and returns int value stored in descriptor, or leaves with KErrArgument
+	* if parsing failes.
+	* @param              aToParse descriptor to parse
+    * @return             parsed value as int
+	*/
+	TInt ParseIntL( const TDesC8& aToParse );
+	
+private:
+    CUpnpIcon& iResultIcon;
+    TState iCurrentState;
+    TBitFlags8 iFoundTags;
+    
+};
+
+#endif //__UPNPICONCONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpiconlistcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,100 @@
+/** @file
+* 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:  Declares the CUpnpIconListContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPICONLISTCONTENTHANDLER_H__
+#define __UPNPICONLISTCONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpDevice;
+
+using namespace Xml;
+
+/**
+*  This class handles icon list subtree of device descriptions
+*  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+*
+*  @since Series60 2.6
+*/
+NONSHARABLE_CLASS( CUpnpIconListContentHandler ) : public CUpnpContentHandler
+{               
+public:
+    
+    /**
+    * Two-phased constructor
+    * @since Series60 3.2 
+    * @return instance of CUpnpIconListContentHandler class
+    */	
+    static CUpnpIconListContentHandler* NewL(
+            CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice );
+    
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @since Series60 3.2 
+    * @return instance of CUpnpIconListContentHandler class
+    */	
+    static CUpnpIconListContentHandler* NewLC( 
+            CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice );
+    
+    /**
+    * Destructor of CUpnpIconListContentHandler class
+    * @since Series60 3.2     
+    */	
+    virtual ~CUpnpIconListContentHandler();
+    
+public:	// from CUpnpContentHandler
+    
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+    
+    /**
+    * This method is a callback that sends the content of the element.
+    * aErrorCode should be KErrNone, and that aBytes should contains complete
+    * content (one chunk).
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+    virtual void OnContentL( const TDesC8& aBytes );
+    
+protected:
+    
+    /**
+    * Default C++ constructor 
+    * @since Series60 3.2     
+    */	
+	CUpnpIconListContentHandler( CUpnpContentHandlersController& aController, 
+	                                CUpnpDevice& aResultDevice );
+	
+private:
+    CUpnpDevice& iResultDevice;
+    
+};
+
+#endif //__UPNPICONLISTCONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpignorecontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/** @file
+* 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:  Declares the CUpnpIgnoreContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPIGNORECONTENTHANDLER_H__
+#define __UPNPIGNORECONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpContentHandlersController;
+
+/**
+ *  Dummy implementation of MContentHandler (by derivation from CUpnpContentHandler) - ignore all subtree.
+ * After correct use of it (correct methods calls series) it's ready to be reused again.
+ * It is designed to be used by upnp controler that delegates to it events from xml sax parser
+ *
+ */
+
+NONSHARABLE_CLASS(CUpnpIgnoreContentHandler) : public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpOldServiceContentHandler class
+     */
+    static CUpnpIgnoreContentHandler* NewL( 
+        CUpnpContentHandlersController& aController );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpOldServiceContentHandler class
+     */
+    static CUpnpIgnoreContentHandler* NewLC( 
+        CUpnpContentHandlersController& aController );
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     This method is a callback to indicate the end of the element has been reached.
+     @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     This method is a callback that sends the content of the element.
+     @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+private:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpIgnoreContentHandler( CUpnpContentHandlersController& aController );
+
+private:
+    TUint iOpenedTagCounter;
+
+    };
+
+#endif //__UPNPIGNORECONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpinitialeventqueuemanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+/** @file
+* 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:  Implements algoritms for modereted events
+*
+*/
+
+
+#ifndef C_CUPNPINITIALEVENTQUEUEMANAGER_H
+#define C_CUPNPINITIALEVENTQUEUEMANAGER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+#include "upnphttptransaction.h"
+#include "upnpserviceimplementation.h"
+#include "upnpeventcontroller.h"
+#include "upnpeventqueuemanagerbase.h"
+#include "upnpsubscriberlibrary.h"
+
+
+// CLASS DECLARATION
+
+/**
+*  Implements algoritms for serving nonmoderated events
+* 
+*/
+NONSHARABLE_CLASS( CUpnpInitialEventQueueManager ): public CUpnpEventQueueManagerBase
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpInitialEventQueueManager();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpInitialEventQueueManager* NewL( CUpnpServiceImplementation& aServiceImpl,
+                                                     CUpnpEventController& aEventController,
+                                                     CUpnpSubscriberLibrary* aSubscriberLibrary );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpInitialEventQueueManager* NewLC( CUpnpServiceImplementation& aServiceImpl,
+                                                      CUpnpEventController& aEventController,
+                                                      CUpnpSubscriberLibrary* aSubscriberLibrary );
+    
+   
+
+private:    
+    
+    /*algoritm implemetation*/
+    void SendEvent();
+        
+    /**
+    * algoritm implemetation
+    * @param aEvent buffer for message body
+    * @param aVariableList list of evented variables
+    * @return number of evented variables
+    */
+    TInt CUpnpInitialEventQueueManager::FillEventBodyL( 
+                                             TDes8& aEvent, 
+                                             const RPointerArray<CUpnpStateVariable>& aVariableList );
+    /**
+    * Creates event message
+    * @param aMessage will be encapsulete into http transaction
+    * @return Http transcaction with event message
+    */
+    CUpnpHttpTransaction* CreateTransactionL( CUpnpHttpMessage* aMessage );                                                      
+    
+    /**
+    * 
+    */
+    void SendEventL();
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpInitialEventQueueManager( CUpnpServiceImplementation& iServiceImpl,
+                                        CUpnpEventController& iEventController,
+                                        CUpnpSubscriberLibrary* aSubscriberLibrary );
+    
+    /**
+    * Constructor for performing 2st stage construction
+    */
+    void ConstructL();
+
+private:
+    
+    };
+
+#endif// C_CUPNPINITIALEVENTQUEUEMANAGER_H
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpmoderatedeventqueuemanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,129 @@
+/** @file
+* 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:  Implements algoritms for modereted events
+*
+*/
+
+
+#ifndef C_UPNPMODERATEDEVENTQUEUEMANAGER_H
+#define C_UPNPMODERATEDEVENTQUEUEMANAGER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+#include "upnphttptransaction.h"
+#include "upnpserviceimplementation.h"
+#include "upnpeventcontroller.h"
+#include "upnpeventqueuemanagerbase.h"
+
+#include "upnpsubscriberlibrary.h"
+
+
+class CUpnpNotifyTimer;
+// CLASS DECLARATION
+
+/**
+*  Implements algoritms for serving moderated events
+* 
+*/
+NONSHARABLE_CLASS( CUpnpModeratedEventQueueManager ): public CUpnpEventQueueManagerBase, 
+                                                      public MUpnpNotifyTimerObserver
+    {
+public:
+    // Constructors and destructor
+
+    /**
+    * Destructor.
+    */
+    ~CUpnpModeratedEventQueueManager();
+
+    /**
+    * Two-phased constructor.
+    */
+    static CUpnpModeratedEventQueueManager* NewL( CUpnpServiceImplementation& aServiceImpl,
+                                                  CUpnpEventController& aEventController,
+                                                  CUpnpSubscriberLibrary* aSubscriberLibrary );
+
+    /**
+    * Two-phased constructor.
+    */
+    static CUpnpModeratedEventQueueManager* NewLC( CUpnpServiceImplementation& aServiceImpl,
+                                                   CUpnpEventController& aEventController,
+                                                   CUpnpSubscriberLibrary* aSubscriberLibrary );
+       
+/*from MUpnpNotifyTimerObserver*/
+public:
+    /**
+    * Handles expired messages
+    */
+    void TimerEventL( CUpnpNotifyTimer* aTimer );     
+    
+
+private:    
+    /**
+    * Dalays message sending
+    */ 
+    void WaitBeforeSending();
+
+    /**
+    * Initiates sending process
+    */
+    void StartSendingEventL();
+    
+private:
+    
+    /**
+    * algoritm implemetation
+    */
+    void SendEvent();
+    
+    /**
+    * algoritm implemetation
+    * @param aEvent buffer for message body
+    * @param aVariableList list of evented variables
+    * @return number of evented variables
+    */
+    TInt FillEventBodyL( TDes8& aEvent, const RPointerArray<CUpnpStateVariable>& aVariableList );
+    
+    /**
+    * Creates event message
+    * @param aMessage will be encapsulete into http transaction
+    * @return Http transcaction with event message
+    */
+    CUpnpHttpTransaction* CreateTransactionL( CUpnpHttpMessage* aMessage ); 
+    
+    
+private:
+
+    /**
+    * Constructor for performing 1st stage construction
+    */
+    CUpnpModeratedEventQueueManager( CUpnpServiceImplementation& iServiceImpl,
+                                     CUpnpEventController& iEventController,
+                                     CUpnpSubscriberLibrary* aSubscriberLibrary );
+    /**
+    * Constructor for performing 2st stage construction
+    */    
+    void ConstructL();
+
+private:
+    
+    /*Dalayes message sending*/
+    CUpnpNotifyTimer* iModerationTimer; //owned
+    
+    };
+
+#endif // C_UPNPMODERATEDEVENTQUEUEMANAGER_H
+//end of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpnonmoderatedeventqueuemanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,109 @@
+/** @file
+* 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:  Implements algoritms for modereted events
+*
+*/
+
+
+#ifndef C_CUPNPNONMODERATEDEVENTQUEUEMANAGER_H
+#define C_CUPNPNONMODERATEDEVENTQUEUEMANAGER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+#include "upnphttptransaction.h"
+#include "upnpserviceimplementation.h"
+#include "upnpeventcontroller.h"
+#include "upnpeventqueuemanagerbase.h"
+#include "upnpsubscriberlibrary.h"
+
+
+// CLASS DECLARATION
+
+/**
+*  Implements algoritms for serving nonmoderated events
+* 
+*/
+NONSHARABLE_CLASS( CUpnpNonModeratedEventQueueManager ): public CUpnpEventQueueManagerBase
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpNonModeratedEventQueueManager();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpNonModeratedEventQueueManager* NewL( CUpnpServiceImplementation& aServiceImpl,
+                                                     CUpnpEventController& aEventController,
+                                                     CUpnpSubscriberLibrary* aSubscriberLibrary );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpNonModeratedEventQueueManager* NewLC( CUpnpServiceImplementation& aServiceImpl,
+                                                      CUpnpEventController& aEventController,
+                                                      CUpnpSubscriberLibrary* aSubscriberLibrary );
+                                                      
+private:    
+
+    /**
+    * algoritm implemetation
+    */
+    void SendEvent();
+    
+    /**
+    * algoritm implemetation
+    * @param aEvent buffer for message body
+    * @param aVariableList list of evented variables
+    * @return number of evented variables
+    */
+    TInt FillEventBodyL( TDes8& aEvent, const RPointerArray<CUpnpStateVariable>& aVariableList );
+    
+    /**
+    * Creates event message
+    * @param aMessage will be encapsulete into http transaction
+    * @return Http transcaction with event message
+    */
+    CUpnpHttpTransaction* CreateTransactionL( CUpnpHttpMessage* aMessage );                                                      
+    
+    /**
+    * 
+    */
+    void SendEventL();
+    
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CUpnpNonModeratedEventQueueManager( CUpnpServiceImplementation& iServiceImpl,
+                                        CUpnpEventController& iEventController,
+                                        CUpnpSubscriberLibrary* aSubscriberLibrary );
+
+    /**
+    * Constructor for performing 2st stage construction
+    */
+    void ConstructL();
+
+private:
+    
+    };
+
+#endif // C_CUPNPNONMODERATEDEVENTQUEUEMANAGER_H
+//end of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnppropertysetcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,118 @@
+/** @file
+* 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:  Declares the CUpnpPropertysetContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPPROPERTYSETCONTENTHANDLER_H__
+#define __UPNPPROPERTYSETCONTENTHANDLER_H__
+
+#include <e32def.h>
+#include <e32std.h>
+#include "upnpcontenthandler.h"
+
+_LIT8( KUpnpPropertyset,                   "propertyset" );
+_LIT8( KUpnpProperty,                      "property" );
+_LIT8( KEventNamespaceUri,                 "urn:schemas-upnp-org:event-1-0" );
+
+class CUpnpDescriptionProperty;
+
+using namespace Xml;
+
+/**
+*  This class handles xml tree in notify (gena) message
+*  It extends CUpnpContentHandler class
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser
+*
+*/
+NONSHARABLE_CLASS( CUpnpPropertysetContentHandler ) : public CUpnpContentHandler
+{
+public:
+
+    /**
+    * Two-phased constructor
+    * @return instance of CUpnpPropertysetContentHandler class
+    */
+    static CUpnpPropertysetContentHandler* NewL(
+            CUpnpContentHandlersController& aController,
+            RPointerArray<CUpnpDescriptionProperty>& aResultPropertyset );
+
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @return instance of CUpnpPropertysetContentHandler class
+    */
+    static CUpnpPropertysetContentHandler* NewLC(
+            CUpnpContentHandlersController& aController,
+            RPointerArray<CUpnpDescriptionProperty>& aResultPropertyset );
+
+    /**
+    * Destructor of CUpnpPropertysetContentHandler class
+    *
+    */
+    virtual ~CUpnpPropertysetContentHandler();
+
+public:	// from CUpnpContentHandler
+
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement,
+                                  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+    * Default C++ constructor
+    */
+    CUpnpPropertysetContentHandler( CUpnpContentHandlersController& aController,
+        RPointerArray<CUpnpDescriptionProperty>& aResultPropertyset );
+
+    /**
+     * Second phase constructor
+     */
+    void ConstructL();
+
+protected:
+    void StoreCurrentPropertyL();
+
+    //owned
+    RBuf8 iCurrentPropertyKey;
+    //owned
+    RBuf8 iCurrentPropertyValue;
+
+    //not owned
+    RPointerArray<CUpnpDescriptionProperty>& iResultPropertyset;
+
+private:
+    TBool iIsInsidePropertyset;
+
+};
+
+#endif //__UPNPPROPERTYSETCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnprootcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,114 @@
+/** @file
+* 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:  Declares the CUpnpRootContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPROOTCONTENTHANDLER_H__
+#define __UPNPROOTCONTENTHANDLER_H__
+
+#include <babitflags.h>
+
+#include "upnpcontenthandler.h"
+
+/**
+*  This class handles root tag of xml device descriptions
+*  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser
+*
+*  @since Series60 2.6
+*/
+class CUpnpDevice;
+
+using namespace Xml;
+
+NONSHARABLE_CLASS( CUpnpRootContentHandler ) : public CUpnpContentHandler
+{
+protected: 
+    enum TState
+        { 
+        EInitial,
+        EURLBase
+        //ESpecVersion not used now
+        };
+public:
+
+    /**
+    * Two-phased constructor
+    * @since Series60 3.2 
+    * @return instance of CUpnpRootContentHandler class
+    */  
+    static CUpnpRootContentHandler* NewL(
+            CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+            TParseType aParseType );
+    
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @since Series60 3.2 
+    * @return instance of CUpnpRootContentHandler class
+    */  
+    static CUpnpRootContentHandler* NewLC( 
+            CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+            TParseType aParseType );
+    
+    /**
+    * Destructor of CUpnpRootContentHandler class
+    * @since Series60 3.2     
+    */	
+    virtual ~CUpnpRootContentHandler();
+    
+public:	// from MContentHandler
+    
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+    							  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+    
+    /**
+    * This method is a callback that sends the content of the element.
+    * aErrorCode should be KErrNone, and that aBytes should contains complete
+    * content (one chunk).
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+     virtual void OnContentL( const TDesC8& aBytes ); 
+    
+protected:
+
+    /**
+    * Default C++ constructor 
+    * @since Series60 3.2     
+    */  
+    CUpnpRootContentHandler( CUpnpContentHandlersController& aController, 
+        CUpnpDevice& aResultDevice, TParseType aParseType );
+
+private:
+    CUpnpDevice& iResultDevice;
+    TState iCurrentState;
+    TBitFlags8 iFoundTags;
+    TParseType iParseType;
+    
+};
+
+#endif //__UPNPROOTCONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpscpdcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,100 @@
+/** @file
+* 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:  Declares the CUpnpScpdContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPSCPDCONTENTHANDLER_H__
+#define __UPNPSCPDCONTENTHANDLER_H__
+
+#include <babitflags.h>
+#include "upnpcontenthandler.h"
+
+class CUpnpService;
+
+using namespace Xml;
+
+/**
+ *  This class handles xml service scpd subtree descriptions.
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 3.2
+ */
+NONSHARABLE_CLASS( CUpnpScpdContentHandler ) : public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpScpdContentHandler class
+     */
+    static CUpnpScpdContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aResultService );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpScpdContentHandler class
+     */
+    static CUpnpScpdContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aResultService );
+
+    /**
+     * Destructor of CUpnpScpdContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpScpdContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     * This method is a callback to indicate the end of the element has been reached.
+     * @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     * This method is a callback that sends the content of the element.
+     * @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpScpdContentHandler( CUpnpContentHandlersController& aController, 
+        CUpnpService& aResultService );
+
+private:
+    CUpnpService& iResultService;
+    TBitFlags8 iFoundTags;
+    };
+
+#endif //__UPNPSCPDCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpservicecontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,134 @@
+/** @file
+* 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:  Declares the CUpnpServiceContentHandler class
+*
+*/
+
+
+#ifndef __UPNPSERVICECONTENTHANDLER_H__
+#define __UPNPSERVICECONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+/**
+ *  This class handles xml service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser
+ *
+ *  @since Series60 2.6
+ */
+class CUpnpDevice;
+class CUpnpService;
+
+using namespace Xml;
+
+NONSHARABLE_CLASS(CUpnpServiceContentHandler) : public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpServiceContentHandler class
+     */
+    static CUpnpServiceContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpDevice* aParentDevice );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpServiceContentHandler class
+     */
+    static CUpnpServiceContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpDevice* aParentDevice );
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpServiceContentHandler class
+     */
+    static CUpnpServiceContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aNotOwnedResultService );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpServiceContentHandler class
+     */
+    static CUpnpServiceContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aNotOwnedResultService );
+
+    /**
+     * Destructor of CUpnpServiceContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpServiceContentHandler();
+
+    /**
+     * Returns parsed CUpnpService object, and pass ownership of it to the caller.
+     * One shouldn't call this method if CUpnpServiceContentHandler dosn't have
+     * ownership CUpnpService object.
+     */
+    CUpnpService* ResultService();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     This method is a callback to indicate the end of the element has been reached.
+     @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     This method is a callback that sends the content of the element.
+     @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+    
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpServiceContentHandler( CUpnpContentHandlersController& aController, 
+        CUpnpDevice* aParentDevice );
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpServiceContentHandler( CUpnpContentHandlersController& aController, 
+        CUpnpService& aNotOwnedResultService );
+
+private:
+    CUpnpDevice* iParentDevice; //not owned
+    CUpnpService* iResultService;
+    TBool iIsServiceOwned;
+
+    };
+
+#endif //__UPNPSERVICECONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpservicelistcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,94 @@
+/** @file
+* 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:  Declares the CUpnpServiceListContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPSERVICELISTCONTENTHANDLER_H__
+#define __UPNPSERVICELISTCONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpDevice;
+
+using namespace Xml;
+
+/**
+*  This class handles service list subtree of device descriptions
+*  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+*
+*/
+NONSHARABLE_CLASS( CUpnpServiceListContentHandler ) : public CUpnpContentHandler
+{               
+public:
+    
+    /**
+    * Two-phased constructor
+    * @return instance of CUpnpServiceListContentHandler class
+    */	
+    static CUpnpServiceListContentHandler* NewL(
+            CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice );
+    
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack 
+    * @return instance of CUpnpServiceListContentHandler class
+    */	
+    static CUpnpServiceListContentHandler* NewLC( 
+            CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice );
+    
+    /**
+    * Destructor of CUpnpServiceListContentHandler class
+    *   
+    */	
+    virtual ~CUpnpServiceListContentHandler();
+    
+public:	// from CUpnpContentHandler
+    
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+                                  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+    
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+    virtual void OnContentL( const TDesC8& aBytes );
+    
+protected:
+    
+    /**
+    * Default C++ constructor
+    */	
+	CUpnpServiceListContentHandler( CUpnpContentHandlersController& aController, 
+	                                CUpnpDevice& aResultDevice );
+	
+private:
+    CUpnpDevice& iResultDevice;
+    
+};
+
+#endif //__UPNPSERVICELISTCONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpserviceliterals.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,48 @@
+/** @file
+* 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:  Declares string definitions for service xml
+*
+*/
+
+
+#ifndef UPNPSERVICELITERALS_H_
+#define UPNPSERVICELITERALS_H_
+
+_LIT8( KUpnpScpd,                    "scpd" );
+_LIT8( KUpnpSpecVersion,             "specVersion" );
+_LIT8( KUpnpActionList,              "actionList" );
+_LIT8( KUpnpAction,                  "action" );
+_LIT8( KUpnpName,                    "name" );
+_LIT8( KUpnpArgumentList,            "argumentList" );
+_LIT8( KUpnpArgument,                "argument" );
+_LIT8( KUpnpDirection,               "direction" );
+_LIT8( KUpnpRelatedStateVariable,    "relatedStateVariable" );
+_LIT8( KUpnpIn,                      "in" );
+_LIT8( KUpnpOut,                     "out" );
+_LIT8( KUpnpRetval,                  "retval" );
+_LIT8( KUpnpServiceStateTable,       "serviceStateTable" );
+_LIT8( KUpnpStateVariable,           "stateVariable" );
+_LIT8( KUpnpDataType,                "dataType" );
+_LIT8( KUpnpDefaultValue,            "defaultValue" );
+_LIT8( KUpnpSendEvents,              "sendEvents" );
+_LIT8( KYes,                         "yes" );
+_LIT8( KUpnpAllowedValueList,        "allowedValueList" );
+_LIT8( KUpnpAllowedValue,            "allowedValue" );
+_LIT8( KUpnpAllowedValueRange,       "allowedValueRange" );
+_LIT8( KUpnpMinimum,                 "minimum" );
+_LIT8( KUpnpMaximum,                 "maximum" );
+_LIT8( KUpnpStep,                    "step" );
+_LIT8( KServiceNamespaceUri,         "urn:schemas-upnp-org:service-1-0" );
+
+#endif /*UPNPSERVICELITERALS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpservicestatetablecontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,112 @@
+/** @file
+* 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:  Declares the CUpnpServiceStateTableContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPSERVICESTATETABLECONTENTHANDLER_H__
+#define __UPNPSERVICESTATETABLECONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+class CUpnpService;
+class CUpnpStateVariable;
+
+using namespace Xml;
+
+/**
+ *  This class handles service state table subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of 
+ *  MContentHandler interface.
+ *  It is designed to be used by upnp controler that delegates to it events from 
+ *  xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS(CUpnpServiceStateTableContentHandler) : 
+    public CUpnpContentHandler
+    {
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpServiceStateTableContentHandler class
+     */
+    static CUpnpServiceStateTableContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aResultService );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpServiceStateTableContentHandler class
+     */
+    static CUpnpServiceStateTableContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpService& aResultService );
+
+    /**
+     * Destructor of CUpnpServiceStateTableContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpServiceStateTableContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     This method is a callback to indicate the end of the element has been reached.
+     @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     This method is a callback that sends the content of the element.
+     @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpServiceStateTableContentHandler( CUpnpContentHandlersController& aController,
+            CUpnpService& aResultService );
+
+    /**
+     * Parse attributes, and set correct eventable values to aResultStateVariable.
+     * @param aResultStateVariable result to change eventable values in
+     * @param aAttributes attributes we analyze
+     */
+    void ParseAttributesL( CUpnpStateVariable& aResultStateVariable,
+            const RAttributeArray& aAttributes );
+
+private:
+    CUpnpService& iResultService;
+    TBool iStateVariableFound;
+
+    };
+
+#endif //__UPNPSERVICESTATETABLECONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpservicetagcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,121 @@
+/** @file
+* 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:  Declares the CUpnpServiceTagContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPSERVICETAGCONTENTHANDLER_H__
+#define __UPNPSERVICETAGCONTENTHANDLER_H__
+
+#include <babitflags.h>
+
+#include "upnpcontenthandler.h"
+
+class CUpnpService;
+
+using namespace Xml;
+
+/**
+*  This class handles icon subtree of service descriptions
+*  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+*
+*/
+NONSHARABLE_CLASS( CUpnpServiceTagContentHandler ) : public CUpnpContentHandler
+{
+protected: 
+    enum TState
+        { 
+        EInitial,
+        EServiceType,
+        EServiceId, 
+        ESCPDURL,
+        EControlURL,
+        EEventSubURL
+        };
+        
+public:
+    
+    /**
+    * Two-phased constructor
+    * @return instance of CUpnpServiceTagContentHandler class
+    */	
+    static CUpnpServiceTagContentHandler* NewL(
+            CUpnpContentHandlersController& aController, CUpnpService& aResultService );
+    
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @return instance of CUpnpServiceTagContentHandler class
+    */	
+    static CUpnpServiceTagContentHandler* NewLC( 
+            CUpnpContentHandlersController& aController, CUpnpService& aResultService );
+    
+    /**
+    * Destructor of CUpnpServiceTagContentHandler class
+    */	
+    virtual ~CUpnpServiceTagContentHandler();
+    
+public:	// from CUpnpContentHandler
+    
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+                                  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+     virtual void OnContentL( const TDesC8& aBytes );    
+    
+protected:
+    
+    /**
+    * Default C++ constructor 
+    */	
+	CUpnpServiceTagContentHandler( CUpnpContentHandlersController& aController, 
+	        CUpnpService& aResultService );
+
+    /**
+    * Process content of serviceType tag.
+    * @param aBytes  text content of tag 
+    **/
+	void ProcessServiceTypeContentL( const TDesC8& aBytes );
+
+    /**
+    * Do necessary operation when specyfic tag inside service tag have been found
+    * @param aFlagPosition  position of tag in iFoungTags
+    * @param aStateToSet    state indicate that specific tag have been found
+    **/
+    void ProcessInternalTagL( TInt aFlagPosition, TState aStateToSet );
+	
+private:
+    CUpnpService& iResultService;
+    TState iCurrentState;
+    TBitFlags8 iFoundTags;
+    
+};
+
+#endif //__UPNPSERVICETAGCONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsilentdeviceimplcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+/** @file
+* 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:  Declares the CUpnpSilentDeviceImplContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPSILENTDEVICEIMPLCONTENTHANDLER_H__
+#define __UPNPSILENTDEVICEIMPLCONTENTHANDLER_H__
+
+#include "upnpdevicecontenthandler.h"
+
+/**
+*  This class handles xml device descriptions
+*  It extends CUpnpDeviceContentHandler class, thus it is subsequent implementation of MContentHandler interface
+*  It is designed to be used by xml parser that generates events using callback methods   
+*
+*  @since Series60 2.6
+*/
+
+
+class CUpnpSilentDeviceImplContentHandler: public CUpnpDeviceContentHandler
+{
+public:
+    
+    /**    
+    * Two phased constructor   
+    * @return a pointer to the created instance of CUpnpSilentDeviceImplContentHandler
+    */
+    static CUpnpSilentDeviceImplContentHandler* NewLC( );
+    
+    /**    
+    * Creates instance of CUpnpDevice class   
+    * @return a pointer to the created instance of CUpnpDevice
+    */                
+    virtual CUpnpDevice* CreateDeviceL();
+    
+    /**    
+    * Destructor of CUpnpSilentDeviceImplContentHandler class      
+    */  
+    virtual ~CUpnpSilentDeviceImplContentHandler();
+        
+private:
+    
+    /**    
+    * Deafult C++ constructor
+    */  
+    CUpnpSilentDeviceImplContentHandler();        
+        
+};
+
+
+#endif __UPNPSILENTDEVICEIMPLCONTENTHANDLER_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsilentdeviceimplementation.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+/** @file
+* 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:  Declares the CUpnpSilentDeviceImplementation class
+*
+*/
+
+
+#ifndef C_CUPNPSILENTDEVICEIMPLEMENTATION_H
+#define C_CUPNPSILENTDEVICEIMPLEMENTATION_H
+
+
+// INCLUDES
+#include <e32std.h>
+#include <badesca.h>
+#include "upnpdeviceimplementationbase.h"
+
+
+//FORWARD DECLARATIONS
+class MUpnpDeviceDescriptionProvider;
+
+/**
+ *  CUpnpSilentDeviceImplementation
+ *
+ *  Prior using the CUpnpDevice class, client application has to create the network
+ *  connection. If connection is not up and running, the
+ *  CUpnpDispatcherEngine class construction will fail.
+ *  See UPnP Interface Design document for instuctions.
+ *
+ *  @since Series60 3.2
+ */
+class CUpnpSilentDeviceImplementation : public CUpnpDeviceImplementationBase
+    {
+public:
+
+    /**
+     * Two-phased constructor.
+     * The most important operations invoked inside this method:
+     * 1. Start Upnp Stack (if not started yet)
+     * 2. Parse device description to DOM for further updating purpose.
+     *
+     * @since Series60 3.2
+     * @param aFilename File to create device from, name include full path.
+     * @return A new CUpnpDevice instance.
+     */
+    IMPORT_C static CUpnpSilentDeviceImplementation* NewL( 
+            const TDesC8& aUri, 
+            CUpnpDeviceDescriptionStore& aDescriptionStore,
+            MUpnpDeviceDescriptionProvider& aProvider );
+
+    /**
+     * Called after the device is constructed.
+     * The most important operations invoked inside this method:
+     * 1. Start the HTTP server.
+     * 2. Generate the UUID (if missing in the device description)
+     * 3. Save the device description to the file.
+     * 
+     * @since Series60 3.2
+     * @return none
+     */
+    IMPORT_C virtual void StartL( const TInt aPort = KRandomPort );
+
+    /**
+     * Stops the device.
+     * @since Series60 3.2
+     */
+    IMPORT_C virtual void StopL();
+
+    /**
+     * C++ default constructor.
+     */
+    CUpnpSilentDeviceImplementation();
+
+    /**
+     * Destructor.
+     */
+    IMPORT_C virtual ~CUpnpSilentDeviceImplementation();
+
+private:
+
+    /**
+     * Symbian 2nd phase constructor can leave
+     * @since Series60 3.2
+     * @param aFilename File to create device from
+     */
+    void ConstructL( const TDesC8& aUri, 
+                     CUpnpDeviceDescriptionStore& aDescriptionStore,
+                     MUpnpDeviceDescriptionProvider& aProvider );
+
+    /**
+     * Internal: Stops device and HTTP server
+     * @since Series60 3.2
+     */
+    void StopDeviceL();
+
+    };
+
+#endif  // C_CUPNPSILENTDEVICEIMPLEMENTATION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsingletagcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,124 @@
+/** @file
+* 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:  Declares the CUpnpSingleTagContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPSINGLETAGCONTENTHANDLER_H__
+#define __UPNPSINGLETAGCONTENTHANDLER_H__
+
+#include "upnpcontenthandler.h"
+
+using namespace Xml;
+
+/**
+*  This class handles single tag of xml subtree. It stores name of tag, and value found inside
+*  in descriptors passed to it. It allows only single level values and ignores any tag inside.
+*  <acceptedtag>
+*  acceptedValue<ignoredtag1 \><ignoredtag2>ignoredValue (inside ignoredtag)</ignoredtag2>
+*  </acceptedtag>
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser
+*
+*/
+NONSHARABLE_CLASS( CUpnpSingleTagContentHandler ) : public CUpnpContentHandler
+{
+public:
+
+    /**
+    * Two-phased constructor
+    * @param aControler controler of parsing process
+    * @param aTagName out parameter where name of found tag will be stored
+    * @param aValue out patameter where value found inside tag will be stored
+    * @return instance of CUpnpSingleTagContentHandler class
+    */
+    static CUpnpSingleTagContentHandler* NewL(
+            CUpnpContentHandlersController& aController,
+            RBuf8& aTagName, RBuf8& aValue );
+
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @param aControler controler of parsing process
+    * @param aTagName out parameter where name of found tag will be stored
+    * @param aValue out patameter where value found inside tag will be stored
+    * @return instance of CUpnpSingleTagContentHandler class
+    */
+    static CUpnpSingleTagContentHandler* NewLC(
+            CUpnpContentHandlersController& aController,
+            RBuf8& aTagName, RBuf8& aValue );
+
+    /**
+    * Destructor of CUpnpSingleTagContentHandler class
+    *
+    */
+    virtual ~CUpnpSingleTagContentHandler();
+
+public:	// from CUpnpContentHandler
+
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement,
+                                  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+    /**
+     * Returns value if class is interested in tags all namespaces
+     *
+     * @return ETrue when the class is interested in tags in all namespaces
+     */
+    virtual TBool InterestedInAllNamespaces();
+
+protected:
+
+    /**
+    * Default C++ constructor
+    */
+    CUpnpSingleTagContentHandler( CUpnpContentHandlersController& aController,
+        RBuf8& aTagName, RBuf8& aValue );
+
+public:
+    /**
+     * Copy bytes from aSrc to aDest, and realloc aDest if its length is too less.
+     * @param aDest descriptor to make copy to
+     * @param aSrc data to copy
+     */
+    static void SafeCopyL( RBuf8& aDest, const TDesC8& aSrc );
+
+private:
+
+    //not owned
+    RBuf8& iTagName;
+    //not owned
+    RBuf8& iValue;
+
+    TBool iIsInsideOfTag;
+
+};
+
+#endif //__UPNPSINGLETAGCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsoapcontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+/** @file
+* 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:  Declares the CUpnpSoapContentHandler class
+*
+*/
+
+
+
+#ifndef __UPNPSOAPCONTENTHANDLER_H__
+#define __UPNPSOAPCONTENTHANDLER_H__
+
+#include <e32def.h>
+#include "upnpcontenthandler.h"
+#include "upnpdescriptionproperty.h"
+#include "upnpsoapliterals.h"
+
+using namespace Xml;
+
+/**
+*  This class handles xml tree in action (soap) messages (requests/responses)
+*  It extends CUpnpContentHandler class
+*  It is designed to be used by upnp controler that delegates to it events from xml sax parser
+*
+*/
+NONSHARABLE_CLASS( CUpnpSoapContentHandler ) : public CUpnpContentHandler
+{
+public:
+
+    /**
+    * Two-phased constructor
+    * @return instance of CUpnpSoapContentHandler class
+    */
+    static CUpnpSoapContentHandler* NewL(
+            CUpnpContentHandlersController& aController,
+            RPointerArray<CUpnpDescriptionProperty>& aParsedValues );
+
+    /**
+    * Two-phased constructor. Leaves the object on CleanupStack
+    * @return instance of CUpnpSoapContentHandler class
+    */
+    static CUpnpSoapContentHandler* NewLC(
+            CUpnpContentHandlersController& aController,
+            RPointerArray<CUpnpDescriptionProperty>& aParsedValues );
+
+    /**
+    * Destructor of CUpnpSoapContentHandler class
+    *
+    */
+    virtual ~CUpnpSoapContentHandler();
+
+public:	// from CUpnpContentHandler
+
+    /**
+    * This method is a callback to indicate an element has been parsed.
+    * @param				aElement is a handle to the element's details.
+    * @param				aAttributes contains the attributes for the element.
+    */
+    virtual void OnStartElementL( const RTagInfo& aElement,
+                                  const RAttributeArray& aAttributes );
+
+    /**
+    * This method is a callback to indicate the end of the element has been reached.
+    * @param              aElement is a handle to the element's details.
+    */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+    * This method is a callback that sends the content of the element.
+    * @param              aBytes is the raw content data for the element in one chunk
+    */
+    virtual void OnContentL( const TDesC8& aBytes );
+    
+    /**
+    * This method clears iIsInsideEnvelope flag
+    */
+    virtual void ResetState();
+
+protected:
+
+    /**
+    * Default C++ constructor
+    */
+    CUpnpSoapContentHandler( CUpnpContentHandlersController& aController,
+        RPointerArray<CUpnpDescriptionProperty>& aParsedValues );
+
+    /**
+     * Second phase constructor
+     */
+    void ConstructL();
+
+private:
+
+    RPointerArray<CUpnpDescriptionProperty>& iParsedValues;
+
+    TBool iIsInsideEnvelope;
+
+};
+
+#endif //__UPNPSOAPCONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsoapliterals.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+/** @file
+* 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:  Declares string definitions for service xml
+*
+*/
+
+
+#ifndef UPNPSOAPLITERALS_H_
+#define UPNPSOAPLITERALS_H_
+
+_LIT8( KSoapNamespaceUri,              "http://schemas.xmlsoap.org/soap/envelope/" );
+_LIT8( KUpnpControlNamespaceUri,       "urn:schemas-upnp-org:control-1-0" );
+_LIT8( KUpnpSoapEnvelope,                  "Envelope" );
+_LIT8( KUpnpSoapBody,                      "Body" );
+_LIT8( KUpnpSoapFault,                     "Fault" );
+_LIT8( KUpnpSoapDetail,                    "detail" );
+_LIT8( KUpnpSoapError,                     "UPnPError" );
+_LIT8( KUpnpSoapErrorCode,                 "errorCode" );
+
+#endif /*UPNPSOAPLITERALS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsoapmessage.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,93 @@
+/** @file
+* 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:  Declares the CUpnpSoapMessage class
+*
+*/
+
+
+#ifndef C_CUPNPSOAPMESSAGE_H
+#define C_CUPNPSOAPMESSAGE_H
+
+// INCLUDES
+
+//#include <e32base.h>
+//#include <in_sock.h>
+#include "upnphttpmessage.h"
+#include "upnphttpheader.h"
+#include "upnperrors.h"
+
+// CLASS DECLARATION
+
+/**
+*  SOAP-Message class.
+*  Used in sending and handling SOAP messages.
+*
+*  @since Series60 2.6
+*/
+class CUpnpSoapMessage : public CUpnpHttpMessage
+{
+public: // Constructors and destructor
+    
+    /**
+    * Two-phased constructor.
+    * @param aBuffer Buffer which contains the message.
+    * @param aAddr Target IP address.
+    */
+    IMPORT_C static CUpnpSoapMessage* NewL( TDesC8& aBuffer, const TInetAddr& aAddr );
+    
+    /**
+    * Destructor.
+    */
+    IMPORT_C ~CUpnpSoapMessage();
+    
+public: // New functions
+
+    /**
+    * Returns SOAPACTION header
+    * @since Series60 2.6
+    * @return SOAPACTION header or NULL
+    */
+    IMPORT_C const TPtrC8 SoapAction();
+
+    /**
+    * Returns service type
+    * @since Series60 2.6
+    * @return service type or NULL
+    */
+    IMPORT_C const TPtrC8 ServiceType();
+
+    /**
+    * Returns action name
+    * @since Series60 2.6
+    * @return action name or NULL
+    */
+    IMPORT_C const TPtrC8 ActionName();
+
+private: // Constructor
+
+    /**
+    * C++ default constructor.
+    */
+    CUpnpSoapMessage();
+        
+    /**
+    * Second phase construct.
+    * @param aSender
+    **/     
+    void ConstructL(TInetAddr aSender);    
+};
+
+#endif // C_CUPNPSOAPMESSAGE_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsoapmessagefactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,91 @@
+/** @file
+* 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:  Declares the RUpnpSoapMessageFactory class
+*
+*/
+
+
+#ifndef C_RUPNPSOAPMESSAGEFACTORY_H
+#define C_RUPNPSOAPMESSAGEFACTORY_H
+
+//  INCLUDES
+
+//#include <e32base.h>
+#include "upnphttpmessage.h"
+#include "upnperrors.h"
+
+// FORWARD DECLARATIONS
+
+class CUpnpSoapMessage;
+class CUpnpAction;
+
+// CLASS DECLARATION
+
+/**
+*  SSDP Message Factory. Used to create standard SSDP messages.
+*
+*  @since Series60 2.6
+*/
+class RUpnpSoapMessageFactory
+{
+public: // New functions
+    
+    /**
+    * SOAP request
+    * @since Series60 2.6
+    * @param aAction the action requested
+    */
+    IMPORT_C static CUpnpSoapMessage* SoapRequestL( CUpnpAction* aAction );
+    
+    /**
+    * SOAP response
+    * @since Series60 2.6
+    * @param aAction the action response
+    * @param aCode the error code
+    */
+    IMPORT_C static CUpnpSoapMessage* SoapResponseL( CUpnpAction* aAction, 
+                             TUpnpErrorCode aCode );
+    
+    /**
+    * SOAP response
+    * @since Series60 2.6
+    * @param aAction the action response
+    * @param aCode the error code
+    * @param aDescription the error code description
+    */
+    IMPORT_C static CUpnpSoapMessage* SoapResponseL( CUpnpAction* aAction, 
+                             TUpnpErrorCode aCode, 
+                             const TDesC8& aDescription);
+                                 
+    /**
+    * SOAP response
+    * @since Series60 2.6
+    * @param aAction the action response
+    */
+    IMPORT_C static CUpnpSoapMessage* SoapResponseL( CUpnpAction* aAction );
+    
+    /**
+    * SOAP response
+    * @since Series60 2.6
+    * @param aMessage the message response
+    * @param aCode the error code response
+    */
+    IMPORT_C static CUpnpSoapMessage* SoapResponseL( CUpnpSoapMessage* aMessage, 
+                             TUpnpErrorCode aCode );
+       
+};
+
+#endif  // C_RUPNPSOAPMESSAGEFACTORY_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsoapparser.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,111 @@
+/** @file
+* 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:  Declares the TUpnpSoapParser class
+ *
+*/
+
+
+#ifndef __UPNPSOAPPARSER_H__
+#define __UPNPSOAPPARSER_H__
+
+// CLASS DECLARATION
+class CUpnpContentHandlersController;
+class CUpnpAction;
+class CUpnpDescriptionProperty;
+class CUpnpSoapMessage;
+
+#include <e32def.h>
+#include "upnpdescriptionproperty.h"
+
+/**
+ * Class is responsible for parsing soap messages logic
+ * with usage of CUpnpControllersContentHandler
+ */
+class TUpnpSoapParser
+    {
+public:
+
+    /**
+     * Constructor
+     * @param iParsingControler controler that will be used to invoke soap parsing
+     */
+    TUpnpSoapParser( CUpnpContentHandlersController& aParsingController );
+
+    /**
+    * For internal use. Update all necessary information from a SOAP-message
+    * that should be OK answer (e.g. received by Http 200 OK message).
+    * @param aMessage SOAP response message
+    * @param aAction an action to update
+    */
+    void UpdateActionWithOKResponseL( CUpnpSoapMessage* aMessage,
+        CUpnpAction* aAction );
+
+    /**
+     * For internal use. Update all necessary information from a SOAP-message
+     * that should contain SOAP error (fault) message (eg. received by http
+     * 500 InternalServerError message.
+     * @param aMessage SOAP response message
+     * @param aAction an action to update
+     */
+    void UpdateActionWithErrorResponseL( CUpnpSoapMessage* aMessage,
+            CUpnpAction* aAction );
+
+    /**
+    * Update action with all necessary information from
+    * a SOAP request message.
+    * @since Series60 3.2
+    * @param aMessage SOAP request message
+    * @param aAction - an action to update
+    */
+    void UpdateActionWithRequestL( CUpnpSoapMessage* aMessage, CUpnpAction* aAction );
+
+private:
+    /**
+     * Process parsed description property passed as an argument, and the rest of parsed
+     * properties and update action arguments with them.
+     * @param aProperties arguments list (first with action name is ignored)
+     * @param aAction an action to update
+     */
+    void ProcessActionArgumentsL(
+        RPointerArray<CUpnpDescriptionProperty>& aProperties, CUpnpAction* aAction );
+
+    /**
+     * Update all action arguments with previously parsed properties.
+     * @param aProperties arguments list (first with action name is ignored)
+     * @param aAction an action to update
+     */
+    void UpdateActionArgumentsL(
+        RPointerArray<CUpnpDescriptionProperty>& aProperty, CUpnpAction* aAction );
+
+    /**
+     * Update action error value from parsed description property
+     * @param aPropert parsed property
+     * @param aAction an action to update
+     */
+    void UpdateActionFaultL( CUpnpDescriptionProperty* aProperty, CUpnpAction* aAction );
+
+    /**
+     * Common code used by 3 particular update soap action methods
+     *
+     */
+    void UpdateActionL( CUpnpSoapMessage* aMessage,
+        CUpnpAction* aAction, RPointerArray<CUpnpDescriptionProperty>& aParsedValues );
+
+private:
+    //not owned
+    CUpnpContentHandlersController& iParsingController;
+
+    };
+
+#endif //__UPNPSOAPPARSER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpstatevariablecontenthandler.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,111 @@
+/** @file
+* 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:  Declares the CUpnpStateVariableContentHandler class
+ *
+*/
+
+
+#ifndef __UPNPSTATEVARIABLECONTENTHANDLER_H__
+#define __UPNPSTATEVARIABLECONTENTHANDLER_H__
+
+#include <babitflags.h>
+#include "upnpcontenthandler.h"
+
+class CUpnpStateVariable;
+
+using namespace Xml;
+
+/**
+ *  This class handles state variable subtree of service descriptions
+ *  It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface
+ *  It is designed to be used by upnp controler that delegates to it events from xml sax parser   
+ *
+ *  @since Series60 2.6
+ */
+NONSHARABLE_CLASS( CUpnpStateVariableContentHandler ) : public CUpnpContentHandler
+    {
+protected:
+    enum TState
+        {
+        EInitial,
+        EName,
+        EDataType,
+        EDefaultValue
+        };
+
+public:
+
+    /**
+     * Two-phased constructor
+     * @since Series60 3.2 
+     * @return instance of CUpnpStateVariableContentHandler class
+     */
+    static CUpnpStateVariableContentHandler* NewL(
+            CUpnpContentHandlersController& aController, 
+            CUpnpStateVariable& aResultStateVariable );
+
+    /**
+     * Two-phased constructor. Leaves the object on CleanupStack
+     * @since Series60 3.2 
+     * @return instance of CUpnpStateVariableContentHandler class
+     */
+    static CUpnpStateVariableContentHandler* NewLC(
+            CUpnpContentHandlersController& aController, 
+            CUpnpStateVariable& aResultStateVariable );
+
+    /**
+     * Destructor of CUpnpStateVariableContentHandler class
+     * @since Series60 3.2     
+     */
+    virtual ~CUpnpStateVariableContentHandler();
+
+public: // from MContentHandler
+
+    /**
+     * This method is a callback to indicate an element has been parsed.
+     * @param				aElement is a handle to the element's details.
+     * @param				aAttributes contains the attributes for the element.
+     */
+    virtual void OnStartElementL( const RTagInfo& aElement, 
+        const RAttributeArray& aAttributes );
+
+    /**
+     * This method is a callback to indicate the end of the element has been reached.
+     * @param              aElement is a handle to the element's details.
+     */
+    virtual void OnEndElementL( const RTagInfo& aElement );
+
+    /**
+     * This method is a callback that sends the content of the element.
+     * @param              aBytes is the raw content data for the element in one chunk
+     */
+    virtual void OnContentL( const TDesC8& aBytes );
+
+protected:
+
+    /**
+     * Default C++ constructor 
+     * @since Series60 3.2     
+     */
+    CUpnpStateVariableContentHandler( CUpnpContentHandlersController& aController,
+            CUpnpStateVariable& aResultStateVariable );
+
+private:
+    CUpnpStateVariable& iResultStateVariable;
+    TState iCurrentState;
+    TBitFlags8 iFoundTags;
+
+    };
+
+#endif //__UPNPSTATEVARIABLECONTENTHANDLER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsubscriberlibrary.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,134 @@
+/** @file
+* 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:  Implementation of the Classes CUpnpSubscriberLibrary
+*                          MUpnpSubscriberLibraryObserver
+*
+*/
+
+
+#ifndef C_CUPNPSUBSCRIBERLIBRARY_H
+#define C_CUPNPSUBSCRIBERLIBRARY_H
+
+// INCLUDES
+
+//#include "upnpsubscriberlibraryelement.h"
+
+#include "upnptimeoutelement.h"
+#include "upnperrors.h"
+
+
+// FORWARD DECLARATIONS
+
+class CUpnpGenaMessage;
+class CUpnpStateVariable;
+class MUpnpSubscriberLibraryObserver;
+class CUpnpSubscriberLibraryElement;
+// CLASS DECLARATION
+
+/**
+*  The Subscriber Library main class. 
+*  This class contains an array of subscriber library elements 
+*  (of type CUpnpSubscriberLibraryElement). This list is maintained up-to-date 
+*  by received subsription GENA messages. Every element in the library has 
+*  a timeout. If subscription isn't renewed, it is removed from the library 
+*  after subscription timeout is expired. A subsriber is also removed, 
+*  if it send a unsubsription message.
+*
+*  @since Series60 2.6
+*/
+class CUpnpSubscriberLibrary : public CBase, public MUpnpTimeoutElementParent
+{
+public: // Constructors and destructor
+
+    /** 
+    * Two-phased constructor.
+    * @param aObserver
+    * @return The new instance.
+    */
+    static CUpnpSubscriberLibrary* NewL( MUpnpSubscriberLibraryObserver& aObserver );
+    
+    /** 
+    * Destructor.
+    */
+    virtual ~CUpnpSubscriberLibrary();
+    
+public: // New functions
+
+    /**
+    * Adds a new subscriber or renews an existing.
+    * @since Series60 2.6
+    * @param aMessage GENA-message.
+    * @param aElement CUpnpSubscriberLibraryElement.
+    * @return TUpnpErrorCode.
+    */
+    TUpnpErrorCode AddInfoL( CUpnpGenaMessage* aMessage, 
+                      CUpnpSubscriberLibraryElement** aElement );
+    
+    /**
+    * Find SID
+    * @since Series60 2.6
+    * @param aSid SID of an subscriber
+    * @return Index number. If SID isn't found KErrNotFound is returned.
+    */
+    TInt Find( const TDesC8& aSid );
+    
+    /**
+    * Returns subscriber library.
+    * @since Series60 2.6
+    * @return Array of subscriber library elements.
+    */
+    RPointerArray<CUpnpSubscriberLibraryElement> SubscriberLibrary() const;
+    
+    /**
+    * Remove subscriber
+    * @since Series60 2.6
+    * @param aSid SID of an subscriber to be removed.
+    * @return EHttpOk if succeed, EPreconditionFailed if not.
+    */
+    TUpnpErrorCode Remove( const TDesC8& aSid );
+    
+public: // From MUpnpTimeoutElementParent
+    
+    /**
+    * Timeout callback function
+    * @since Series60 2.6
+    * @param aElement The element whose timeout has ran out
+    */
+    void TimeoutExpiredL( CUpnpTimeoutElement* aElement );
+    
+private: // Constructors
+
+    /**
+    * C++ default constructor.
+    * @param aObserver Observer.
+    */
+    CUpnpSubscriberLibrary( MUpnpSubscriberLibraryObserver& aObserver );
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL();
+    
+private: 
+
+    // Subscribe library observer, not owned
+    MUpnpSubscriberLibraryObserver&         iObserver;
+
+    // List of subscriber library elements, owned
+    RPointerArray<CUpnpSubscriberLibraryElement>    iElementArray;
+};
+
+#endif  // C_CUPNPSUBSCRIBERLIBRARY_H
+
+//End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/inc/upnpsubscriberlibraryelement.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,221 @@
+/** @file
+* 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:  Declares the CUpnpSubscriberLibraryElement class
+*
+*/
+
+
+#ifndef C_CUPNPSUBSCRIBERLIBRARYELEMENT_H
+#define C_CUPNPSUBSCRIBERLIBRARYELEMENT_H
+
+// INCLUDES
+
+//#include <e32std.h>
+#include <in_sock.h>
+#include "upnptimeoutelement.h"
+#include "upnperrors.h"
+
+// FORWARD DECLARATIONS
+
+class CUpnpGenaMessage;
+
+// CONSTANTS
+
+_LIT8( KDefaultTimeout, "300" );
+const TUint KMaxRenewTimeout = 2100;
+const TUint KDefaultTimeoutValue = 300;
+// 2^31-1 // to avoid warning!
+const TUint32 KMaxSeq = 2146583647; 
+const TUint32 KMinSeq = 1;
+
+// CLASS DECLARATION
+
+/**
+*  A class which is used to hold subscriber information.
+*  This class is used by CUpnpSubscriberLibrary to keep a list 
+*  of service subscribers.
+*
+*  @since Series60 2.6
+*/
+class CUpnpSubscriberLibraryElement : public CUpnpTimeoutElement
+{
+public: // Constructors and destructor
+    
+    /** 
+    * Two-phased constructor.
+    * @param aParent
+    * @return The new instance.
+    */
+    static CUpnpSubscriberLibraryElement* NewL( MUpnpTimeoutElementParent& aParent );
+    
+    /** 
+    * Destructor.
+    */
+    virtual ~CUpnpSubscriberLibraryElement();
+        
+public: // New functions
+
+    /**
+    * Adds a new subscriber. For a new subscriber, SEQ defaults to zero.
+    * @since Series60 2.6
+    * @param aMessage A valid subscribe message.
+    * @return EHttpOk or error.
+    */
+    TUpnpErrorCode AddSubscriberL(CUpnpGenaMessage* aMessage);
+
+    /**
+    * Renews subscription.
+    * @since Series60 2.6
+    * @param aMessage A valid subscription renewal message.
+    * @return EHttpOk or error.
+    */
+    TUpnpErrorCode RenewSubscriberL(CUpnpGenaMessage* aMessage);
+        
+public: // New functions
+
+    /**
+    * Get SID header
+    * @since Series60 2.6
+    * @return Subscriber ID
+    */
+    TDesC8& Sid();
+
+    /**
+    * Get callback address
+    * @since Series60 2.6
+    * @return Callback Address
+    */
+    TInetAddr& CallbackAddress();
+        
+    /**
+    * Get callback path
+    * @since Series60 2.6
+    * @return Callback path
+    */
+    TDesC8& CallbackPath();
+
+    /**
+    * Get SEQ header
+    * @since Series60 2.6
+    * @return Sequence key
+    */
+    TUint32 Seq() const;
+
+    /**
+    * Get timeout
+    * @since Series60 2.6
+    * @return Subscription expiring timeout
+    */
+    TDesC8& Timeout();
+    
+    /**
+    * Icreases SEQ by 1. If maximum is reached, resets to 1.
+    * @since Series60 2.6
+    */
+    void IncreaseSeq();
+     
+    /**
+    * Set Subscriber ID.
+    * @since Series60 2.6
+    * @param aSid UUID.
+    */
+    void SetSidL( const TDesC8& aSid );
+
+    /**
+    * Setter for Callback Address.
+    * @since Series60 2.6
+    * @param aIp IPv4
+    * @param aPort Port
+    */
+    void SetCallbackAddress( const TDesC8& aIp, 
+                                      const TDesC8& aPort );
+
+    /**
+    * Set Callback path.
+    * @since Series60 2.6
+    * @param aCallbackPath Callback path
+    */
+    void SetCallbackPathL( const TDesC8& aCallbackPath );
+
+    /**
+    * Set Sequence key.
+    * @since Series60 2.6
+    * @param aSeq
+    */
+    void SetSeq( TUint32 aSeq );
+
+    /**
+    * Set Subscription expiring timeout.
+    * @since Series60 2.6
+    * @param aTimeout
+    */
+    void SetTimeoutL( const TDesC8& aTimeout );
+    
+    void SetSessId(TInt aSessId);
+    
+    TInt SessId();
+        
+private: // Constructors
+
+    /**
+    * C++ default constructor.
+    */
+    CUpnpSubscriberLibraryElement( MUpnpTimeoutElementParent& aParent );
+       
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL();
+        
+private: // New functions
+
+    /**
+    * Sets subscription info.
+    * @since Series60 2.6
+    * @param aSid
+    * @param aCallbackIp
+    * @param aCallbackPort
+    * @param aCallbackPath
+    * @param aTimeout
+    */
+    void AddInfoL( const TDesC8& aSid, 
+                            const TDesC8& aCallbackIp, 
+                            const TDesC8& aCallbackPort, 
+                            const TDesC8& aCallbackPath, 
+                            const TDesC8& aTimeout );
+        
+private: 
+
+    // SID buffer, owned
+    HBufC8* iSid;
+
+    // Callback address, owned
+    TInetAddr iCallbackAddress;
+
+    // Callbck path, owned
+    HBufC8* iCallbackPath;
+
+    // SEQ buffer, owned
+    TUint32 iSeq;
+
+    // Timeout buffer, owned
+    HBufC8* iTimeout;
+    
+    //SessionId
+    TInt iSessId;
+};
+
+#endif //   C_CUPNPSUBSCRIBERLIBRARYELEMENT_H
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,407 @@
+/** @file
+ * 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:  CUpnpAction
+ *
+ */
+
+// INCLUDE FILES
+#include "upnpaction.h"
+#include "upnpargument.h"
+#include "upnpstring.h"
+#include "upnpsoapmessage.h"
+#include "upnpservice.h"
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::CUpnpAction
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+
+CUpnpAction::CUpnpAction( CUpnpService& aParentService ) :
+    iParentService( aParentService )
+    {
+    iError = KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpAction::ConstructL( CUpnpAction& aAction )
+    {
+    RPointerArray<CUpnpArgument>& argumentList = aAction.ArgumentList();
+
+    for ( TInt index = 0; index < argumentList.Count(); index++ )
+        {
+        CUpnpArgument* arg = CUpnpArgument::NewL( *argumentList[index],
+            iParentService );
+        CleanupStack::PushL( arg );
+        iArguments.AppendL( arg );
+        CleanupStack::Pop( arg );
+        }
+
+    iName = aAction.Name().AllocL();
+    iDestinationPath = HBufC8::NewL( 0 );
+
+    iSessionId = CUpnpHttpMessage::NewSessionIdL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpAction* CUpnpAction::NewLC( CUpnpAction& aAction,
+    CUpnpService& aParentService )
+    {
+    CUpnpAction* self = new (ELeave) CUpnpAction( aParentService );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aAction );
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::~CUpnpAction
+// Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpAction::~CUpnpAction()
+    {
+    iArguments.ResetAndDestroy();
+    iArguments.Close();
+
+    delete iName;
+    delete iDestinationPath;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::SetArgumentL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpAction::SetArgumentL( const TDesC8& aName,
+    const TDesC8& aValue )
+    {
+    for ( TInt i = 0; i < iArguments.Count(); i++ )
+        {
+        CUpnpArgument* arg = iArguments[i];
+
+        if ( aName.Compare( arg->Name() ) == 0 )
+            {
+            arg->SetValueL( aValue );
+            return KErrNone;
+            }
+        }
+    return KErrBadName;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::ArgumentValue
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpAction::ArgumentValue( const TDesC8& aName )
+    {
+    for ( TInt i = 0; i < iArguments.Count(); i++ )
+        {
+        CUpnpArgument* arg = iArguments[i];
+
+        if ( aName.Compare( arg->Name() ) == 0 )
+            {
+            return arg->Value();
+            }
+        }
+    return KNullDesC8();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::Argument
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpArgument* CUpnpAction::Argument( const TDesC8& aName )
+    {
+    for ( TInt i = 0; i < iArguments.Count(); i++ )
+        {
+        CUpnpArgument* arg = iArguments[i];
+
+        if ( aName.Compare( arg->Name() ) == 0 )
+            {
+            return arg;
+            }
+        }
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::SetDestinationPathL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpAction::SetDestinationPathL( const TDesC8& aDestination )
+    {
+    delete iDestinationPath;
+    iDestinationPath = NULL;
+    iDestinationPath = aDestination.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::DestinationPath
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpAction::DestinationPath()
+    {
+    return *iDestinationPath;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::SetSender
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpAction::SetSender( const TInetAddr & aSender )
+    {
+    iSender = aSender;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::Sender
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr& CUpnpAction::Sender()
+    {
+    return iSender;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::Name
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpAction::Name()
+    {
+    return *iName;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::ArgumentList
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RPointerArray<CUpnpArgument>& CUpnpAction::ArgumentList()
+    {
+    return iArguments;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::DestinationAddr
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr CUpnpAction::DestinationAddr() const
+    {
+    return iDestinationAddr;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::ArgumentType
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpAction::ArgumentType( const TDesC8 &aArgumentName )
+    {
+    for ( TInt i = 0; i < iArguments.Count(); i++ )
+        {
+        CUpnpArgument* arg = iArguments[i];
+
+        if ( aArgumentName.Compare( arg->Name() ) == 0 )
+            {
+            return arg->Type();
+            }
+        }
+
+    return EUndefined;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::ServiceType
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpAction::ServiceType()
+    {
+    return const_cast<TDesC8&>( iParentService.ServiceType() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::SessionId
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpAction::SessionId() const
+    {
+    return iSessionId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::SessionId
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpAction::SetSessionId( TInt aId )
+    {
+    iSessionId = aId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::SetDestinationAddr
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpAction::SetDestinationAddr( const TInetAddr & aAddr )
+    {
+    iDestinationAddr = aAddr;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::Error
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpAction::Error() const
+    {
+    return iError;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::Service
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpService& CUpnpAction::Service()
+    {
+    return iParentService;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::SetError
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpAction::SetError( TInt aError )
+    {
+    iError = aError;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::Local
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpAction::Local() const
+    {
+    return iLocal;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::SetLocal
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpAction::SetLocal( TBool aLocal )
+    {
+    iLocal = aLocal;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::NewL
+// for TESTS only
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpAction* CUpnpAction::NewL( const TDesC8& aActionName )
+    {
+    CUpnpAction* self = new (ELeave) CUpnpAction();
+    CleanupStack::PushL( self );
+    self->SetNameL( aActionName );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::NewL
+// -----------------------------------------------------------------------------
+//
+CUpnpAction* CUpnpAction::NewL( CUpnpService& aParentService )
+    {
+    CUpnpAction* self = new (ELeave) CUpnpAction( aParentService );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::NewL
+// -----------------------------------------------------------------------------
+//
+void CUpnpAction::SetNameL( const TDesC8& aName )
+    {
+    HBufC8* tmp = aName.AllocL();
+    delete iName;
+    iName = tmp;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::NewL
+// -----------------------------------------------------------------------------
+//
+void CUpnpAction::AddArgumentL( CUpnpArgument& aAction )
+    {
+    iArguments.AppendL( &aAction );
+    }
+
+// -----------------------------------------------------------------------------
+// ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpAction::ConstructL()
+    {
+    iSessionId = CUpnpHttpMessage::NewSessionIdL();
+    iDestinationPath = HBufC8::NewL( 0 );
+    iName = HBufC8::NewL( 0 );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAction::CUpnpAction
+// for TESTS only. Object isn't completely valid. 
+// -----------------------------------------------------------------------------
+//
+CUpnpAction::CUpnpAction() 
+: iParentService(*(CUpnpService*)1)//tests only iParentService shouldn't be used
+    {
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpactioncontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,138 @@
+/** @file
+* 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 the CUpnpActionContentHandler class
+ *
+*/
+
+
+#include "upnpactioncontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpactionnamecontenthandler.h"
+#include "upnpargumentlistcontenthandler.h"
+#include "upnpaction.h"
+#include "upnpserviceliterals.h"
+
+enum TFlagsPositions
+    {
+    EName = 0,
+    EArgumentList 
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpActionContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpActionContentHandler* CUpnpActionContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpAction& aResultAction )
+    {
+    CUpnpActionContentHandler* actionContentHandler = 
+        CUpnpActionContentHandler::NewLC( aController, aResultAction );
+    CleanupStack::Pop( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpActionContentHandler* CUpnpActionContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpAction& aResultAction )
+    {
+    CUpnpActionContentHandler* actionContentHandler = 
+        new (ELeave) CUpnpActionContentHandler( aController, aResultAction );
+    CleanupStack::PushL( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionContentHandler::~CUpnpActionContentHandler
+// Destructor of CUpnpActionContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpActionContentHandler::~CUpnpActionContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionContentHandler::CUpnpActionContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpActionContentHandler::CUpnpActionContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpAction& aResultAction ) :
+    CUpnpContentHandler( aController ), iResultAction( aResultAction )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionContentHandler::OnStartElementL( const RTagInfo& aElement,
+    const RAttributeArray& /*aAttributes*/ )
+    {
+    const TDesC8& elementName( aElement.LocalName().DesC() );
+    if ( elementName.Compare( KUpnpArgumentList ) == 0 )
+        {
+        RepeatedTagCheckL( EArgumentList, iFoundTags );
+        iController.SetCurrentContentHandlerL( 
+            CUpnpArgumentListContentHandler::NewL(
+                iController, iResultAction.Service(), iResultAction ) );
+        }
+    else
+        if ( elementName.Compare( KUpnpName ) == 0 )
+            {
+            RepeatedTagCheckL( EName, iFoundTags );
+            iController.SetCurrentContentHandlerL( 
+                CUpnpActionNameContentHandler::NewL( iController, iResultAction ) );
+            }
+        else
+            {
+            iController.SetCurrentContentHandlerL( 
+                CUpnpIgnoreContentHandler::NewL( iController ) );
+            }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare( KUpnpAction ) == 0 );
+    if ( iFoundTags.IsClear( EName ) )
+        {
+        User::Leave( KErrArgument ); //required
+        }
+    iController.SetPreviousContentHandler();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionContentHandler::OnContentL( const TDesC8& /*aBytes*/ )
+    {
+    //User::Leave( KErrArgument ) 
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpactionlistcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,123 @@
+/** @file
+* 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 the CUpnpActionListContentHandler class
+ *
+*/
+
+
+#include "upnpactionlistcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpactioncontenthandler.h"
+#include "upnpaction.h"
+#include "upnpservice.h"
+#include "upnpserviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpActionListContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpActionListContentHandler* CUpnpActionListContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService )
+    {
+    CUpnpActionListContentHandler* actionListContentHandler = 
+        CUpnpActionListContentHandler::NewLC( aController, aResultService );
+    CleanupStack::Pop( actionListContentHandler );
+    return actionListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionListContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpActionListContentHandler* CUpnpActionListContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService )
+    {
+    CUpnpActionListContentHandler* actionListContentHandler = 
+        new (ELeave) CUpnpActionListContentHandler( aController, aResultService );
+    CleanupStack::PushL( actionListContentHandler );
+    return actionListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionListContentHandler::~CUpnpActionListContentHandler
+// Destructor of CUpnpActionListContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpActionListContentHandler::~CUpnpActionListContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionListContentHandler::CUpnpActionListContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpActionListContentHandler::CUpnpActionListContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService ) :
+    CUpnpContentHandler( aController ), iResultService( aResultService )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionListContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionListContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/ )
+    {
+    const TDesC8& elementName( aElement.LocalName().DesC() );
+    if ( elementName.Compare( KUpnpAction ) == 0 )
+        {
+        CUpnpAction* action = CUpnpAction::NewL( iResultService );
+        CleanupStack::PushL( action );
+        iResultService.AddActionL( *action );
+        CleanupStack::Pop( action );
+        iController.SetCurrentContentHandlerL( 
+            CUpnpActionContentHandler::NewL( iController, *action ) );
+        }
+    else
+        {
+        iController.SetCurrentContentHandlerL( 
+            CUpnpIgnoreContentHandler::NewL( iController ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionListContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionListContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare( KUpnpActionList ) == 0 );
+    iController.SetPreviousContentHandler();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionListContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionListContentHandler::OnContentL( const TDesC8& /*aBytes*/ )
+    {
+    //User::Leave( KErrArgument ) 
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpactionnamecontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,110 @@
+/** @file
+* 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 the CUpnpActionNameContentHandler class
+ *
+*/
+
+
+#include "upnpactionnamecontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpaction.h"
+#include "upnpserviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpActionNameContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpActionNameContentHandler* CUpnpActionNameContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpAction& aResultAction )
+    {
+    CUpnpActionNameContentHandler* actionContentHandler = 
+        CUpnpActionNameContentHandler::NewLC( aController, aResultAction );
+    CleanupStack::Pop( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionNameContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpActionNameContentHandler* CUpnpActionNameContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpAction& aResultAction )
+    {
+    CUpnpActionNameContentHandler* actionContentHandler = 
+        new (ELeave) CUpnpActionNameContentHandler( aController, aResultAction );
+    CleanupStack::PushL( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionNameContentHandler::~CUpnpActionNameContentHandler
+// Destructor of CUpnpActionNameContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpActionNameContentHandler::~CUpnpActionNameContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionNameContentHandler::CUpnpActionNameContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpActionNameContentHandler::CUpnpActionNameContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpAction& aResultAction ) :
+    CUpnpContentHandler( aController ), iResultAction( aResultAction )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionNameContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionNameContentHandler::OnStartElementL(
+    const RTagInfo& /*aElement*/, const RAttributeArray& /*aAttributes*/ )
+    {
+    //User::Leave( KErrArgument )  not checked now
+    iController.SetCurrentContentHandlerL( 
+        CUpnpIgnoreContentHandler::NewL( iController ) );
+    //<ElementType name="name" dt:type="string" content="textOnly" />
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionNameContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionNameContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare( KUpnpName ) == 0 );
+    iController.SetPreviousContentHandler();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpActionNameContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// Not all the content may be returned in one go. The data may be sent in chunks.
+// When an OnEndElementL is received this means there is no more content to be sent. 
+// -----------------------------------------------------------------------------
+//
+void CUpnpActionNameContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    iResultAction.SetNameL( aBytes );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpallowedvaluelistcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,147 @@
+/** @file
+* 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 the CUpnpActionContentHandler class
+ *
+*/
+
+
+#include "upnpallowedvaluelistcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpstatevariable.h"
+#include "upnpserviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueListContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpAllowedValueListContentHandler* CUpnpAllowedValueListContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable )
+    {
+    CUpnpAllowedValueListContentHandler* actionContentHandler = 
+        CUpnpAllowedValueListContentHandler::NewLC( aController, aResultStateVariable );
+    CleanupStack::Pop( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueListContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpAllowedValueListContentHandler* CUpnpAllowedValueListContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable )
+    {
+    CUpnpAllowedValueListContentHandler* actionContentHandler = 
+        new (ELeave) CUpnpAllowedValueListContentHandler(aController, 
+            aResultStateVariable);
+    CleanupStack::PushL( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueListContentHandler::~CUpnpAllowedValueListContentHandler
+// Destructor of CUpnpAllowedValueListContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpAllowedValueListContentHandler::~CUpnpAllowedValueListContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueListContentHandler::CUpnpAllowedValueListContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpAllowedValueListContentHandler::CUpnpAllowedValueListContentHandler(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable ) :
+    CUpnpContentHandler( aController ),
+            iResultStateVariable( aResultStateVariable ),
+            iIsInsideAllowedValue( EFalse )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueListContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpAllowedValueListContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/ )
+    {
+    if ( !iIsInsideAllowedValue )
+        {
+        const TDesC8& elementName( aElement.LocalName().DesC() );
+        if ( elementName.Compare( KUpnpAllowedValue ) == 0 )
+            {
+            iIsInsideAllowedValue = ETrue;
+            }
+        else
+            {
+            iController.SetCurrentContentHandlerL( 
+                CUpnpIgnoreContentHandler::NewL( iController ) );
+            }
+        }
+    else
+        {
+        iController.SetCurrentContentHandlerL( 
+            CUpnpIgnoreContentHandler::NewL( iController ) );
+        //User::Leave( KErrArgument ) //content="textOnly" not checked now
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueListContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpAllowedValueListContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    if ( iIsInsideAllowedValue )
+        {
+        ASSERT( aElement.LocalName().DesC().Compare(KUpnpAllowedValue) == 0 );
+        iIsInsideAllowedValue = EFalse;
+        }
+    else
+        {
+        ASSERT(aElement.LocalName().DesC().Compare(KUpnpAllowedValueList)==0);
+        iController.SetPreviousContentHandler();
+
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueListContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpAllowedValueListContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    if ( iIsInsideAllowedValue )
+        {
+        iResultStateVariable.AddAllowedValueL( aBytes );
+        }
+    else
+        {
+        //User::Leave( KErrArgument )
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpallowedvaluerangecontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,182 @@
+/** @file
+* 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 the CUpnpActionContentHandler class
+ *
+*/
+
+
+#include "upnpallowedvaluerangecontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpstatevariable.h"
+#include "upnpserviceliterals.h"
+
+//const TUint8 KReqiuredTagsBoundary( 3 ) 
+const TUint8 KReqiuredTagsBoundary( 0 );    
+enum TFlagsPositions
+    {
+    EMinimumPos = 0,
+    EMaximumPos,
+    EStepPos //optional
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueRangeContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpAllowedValueRangeContentHandler* CUpnpAllowedValueRangeContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable )
+    {
+    CUpnpAllowedValueRangeContentHandler* actionContentHandler = 
+        CUpnpAllowedValueRangeContentHandler::NewLC( aController, aResultStateVariable );
+    CleanupStack::Pop( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueRangeContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpAllowedValueRangeContentHandler* CUpnpAllowedValueRangeContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable )
+    {
+    CUpnpAllowedValueRangeContentHandler* actionContentHandler = 
+        new (ELeave) CUpnpAllowedValueRangeContentHandler( aController, 
+            aResultStateVariable );
+    CleanupStack::PushL( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueRangeContentHandler::~CUpnpAllowedValueRangeContentHandler
+// Destructor of CUpnpAllowedValueRangeContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpAllowedValueRangeContentHandler::~CUpnpAllowedValueRangeContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueRangeContentHandler::CUpnpAllowedValueRangeContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpAllowedValueRangeContentHandler::CUpnpAllowedValueRangeContentHandler(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable ) :
+        CUpnpContentHandler( aController ),
+        iResultStateVariable( aResultStateVariable ),
+        iCurrentState( EInitial )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueRangeContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpAllowedValueRangeContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/ )
+    {
+    if ( iCurrentState == EInitial )
+        {
+        const TDesC8& elementName( aElement.LocalName().DesC() );
+        if ( elementName.Compare(KUpnpMinimum) == 0 )
+            {
+            RepeatedTagCheckL( EMinimumPos, iFoundTags );
+            iCurrentState = EMinimum;
+            }
+        else if ( elementName.Compare(KUpnpMaximum) == 0 )
+            {
+            RepeatedTagCheckL( EMaximumPos, iFoundTags );
+            iCurrentState = EMaximum;
+            }
+        else if ( elementName.Compare(KUpnpStep) == 0 )
+            {
+            RepeatedTagCheckL( EStepPos, iFoundTags );
+            iCurrentState = EStep;
+            }
+        else
+            {
+            iController.SetCurrentContentHandlerL( 
+                    CUpnpIgnoreContentHandler::NewL( iController ) 
+                                        );
+            }
+        }
+    else
+        {
+        iController.SetCurrentContentHandlerL( 
+            CUpnpIgnoreContentHandler::NewL( iController ) );
+        //User::Leave( KErrArgument ) //content="textOnly"  not checked now
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueRangeContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpAllowedValueRangeContentHandler::OnEndElementL(
+    const RTagInfo& aElement )
+    {
+    switch ( iCurrentState )
+        {
+        case EInitial:
+            ASSERT(aElement.LocalName().DesC().Compare(KUpnpAllowedValueRange)==0);
+            if ( (iFoundTags.iFlags & KReqiuredTagsBoundary)
+                    == KReqiuredTagsBoundary )
+                {
+                iController.SetPreviousContentHandler();
+                }
+            else
+                {
+                User::Leave( KErrArgument ); //required tag not found
+                }
+            break;
+        default:
+            iCurrentState = EInitial;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpAllowedValueRangeContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpAllowedValueRangeContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    switch ( iCurrentState )
+        {
+        case EMinimum:
+            iResultStateVariable.SetRangeMinL( aBytes );
+            break;
+        case EMaximum:
+            iResultStateVariable.SetRangeMaxL( aBytes );
+            break;
+        case EStep:
+            iResultStateVariable.SetRangeStepL( aBytes );
+            break;
+        default:
+            //User::Leave( KErrArgument ) 
+            break;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpargument.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,465 @@
+/** @file
+* 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:  Defines the CUpnpargument class
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32base.h>
+#include "upnpargument.h"
+#include "upnpservice.h"
+#include "upnpstring.h"
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+// logs
+#include "f32file.h" 
+#include "s32file.h"
+
+
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::CUpnpArgument
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpArgument::CUpnpArgument( CUpnpService& aParentService )
+: iParentService( aParentService )
+{
+    
+}
+
+void CUpnpArgument::ConstructL()
+    {
+    iName = HBufC8::NewL(0);
+    iValue = HBufC8::NewL(0);
+    iRelatedStateVariable = HBufC8::NewL(0);
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//.
+void CUpnpArgument::ConstructL( CUpnpArgument& aArgument )
+{
+    
+    
+    iName = aArgument.Name().AllocL();
+    
+    iValue = HBufC8::NewL(0);
+    
+    iDirection = aArgument.Direction();
+    
+    iRelatedStateVariable = aArgument.RelatedStateVariable().AllocL();
+    
+    
+    CUpnpStateVariable* var = iParentService.StateVariable( *iRelatedStateVariable );
+    
+    if ( var )
+    {
+        iType = var->Type();
+    }
+    else 
+    {
+        iType = EUndefined;
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpArgument* CUpnpArgument::NewL( CUpnpService& aParentService )
+        {
+        CUpnpArgument* self = new(ELeave) CUpnpArgument(aParentService);
+        self->ConstructL();
+        return self;
+        }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpArgument* CUpnpArgument::NewL( CUpnpArgument& aArgument, 
+                                             CUpnpService& aParentService )
+{
+    CUpnpArgument* self = new (ELeave) CUpnpArgument( aParentService );
+    CleanupStack::PushL( self );
+    self->ConstructL( aArgument );
+    CleanupStack::Pop( self );
+    
+    return self;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::~CUpnpArgument
+// Destructor
+// -----------------------------------------------------------------------------
+// 
+CUpnpArgument::~CUpnpArgument()
+{
+    delete iName;
+    delete iValue;
+    delete iRelatedStateVariable;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::Name
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpArgument::Name()
+{
+    return *iName;
+}
+
+void CUpnpArgument::SetNameL(const TDesC8& aName)
+    {
+    HBufC8* tmp = aName.AllocL();
+    delete iName;
+    iName = tmp;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpArgument::SetValueL
+// If the value is inproper, the method leaves with EInvalidArgs,
+// which is the internal upnp error code used by UPnP Stack
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpArgument::SetValueL( const TDesC8& aValue )
+{
+    LOGS("CUpnpArgument::SetValueL(TDesC8&) [Name/Value]");
+
+
+    // Dates, times, URIs and UUIDs are not validated to save process time.
+    // These must be validated if used in actual service,
+    // which uses these arguments.
+    TArgumentType type = Type();
+    LOGS1( "type: %i", type );
+    TLex8 lex(aValue);
+    switch ( type )
+    {
+        
+        case EUi1:
+        {
+            TUint8 tryVal;
+            CheckErrorL( ( lex.Val(tryVal, EDecimal) ), aValue );
+            break;
+        }
+        case EUi2:
+        {
+            TUint16 tryVal;
+            CheckErrorL ( lex.Val(tryVal, EDecimal), aValue );
+            break;
+        }
+        case EUi4:
+        {
+            TUint32 tryVal;
+            CheckErrorL( lex.Val(tryVal, EDecimal), aValue );
+            break;
+        }
+        case EI1:
+        {
+            TInt8 tryVal;
+            CheckErrorL( lex.Val(tryVal), aValue );
+            break;
+        }
+        case EI2:
+        {
+            TInt16 tryVal;
+            CheckErrorL( lex.Val(tryVal), aValue );
+            break;
+        }
+        case EI4:
+        {
+            TInt32 tryVal;
+            CheckErrorL( lex.Val(tryVal), aValue );
+            break;
+        }
+        case EInt:
+        {
+            TInt64 tryVal;
+            CheckErrorL( lex.Val(tryVal), aValue );
+            break;
+        }
+        case ER4:
+        {
+            TReal32 tryVal;
+            CheckErrorL( lex.Val(tryVal), aValue );
+            break;
+        }
+        case ER8:       
+        case EFloat:
+        case ENumber:
+        {
+            TReal64 tryVal;
+            CheckErrorL( ( lex.Val(tryVal) ), aValue );
+            break;
+        }
+        case EFixed144:
+        {
+            TReal64 tryVal;            
+            switch ( lex.Val(tryVal) )
+            {
+                case KErrOverflow:
+                {
+                    // sizeof argument
+                    User::Leave(EInvalidArgs);
+                    break;
+                }
+                case KErrGeneral:
+                {
+                    // bad argument
+                    User::Leave(EInvalidArgs);
+                    break;
+                }
+                default:
+                {
+
+                    TInt left = aValue.Find(UpnpString::KDot8);                    
+                    TInt right;
+                    //only decimal part exists
+                    if ( left == KErrNotFound )
+                    {
+                        left = aValue.Length();
+                        right = left;
+                        //occurances of minus are not counted as a seprate digit positions
+                        TInt minus = aValue.Find(UpnpString::KMinus);
+                        
+                        if (minus > KErrNone)
+                        {
+                        left --;
+                        }
+                        else if(minus == KErrNone)
+                        {
+                        	left--;                        	
+                        	if(aValue.Find(UpnpString::KMinus)>=KErrNone)
+                        	{
+                        		left--;
+                        	}                        	
+                        }
+                    }                  
+                    else //fractional part exists
+                    {
+                    	right = left+1;                    	
+                    	if(tryVal<0)
+						{
+							left--;
+						}	
+                    	
+                    	if (aValue.Mid(right).Find(UpnpString::KMinus) >= KErrNone)
+                    	{
+                    		right++;	
+                    	}                    
+                    }
+                                        	
+					//checking decimal digits
+                    if ( left > KMaxFixed144Left )
+                    {
+                        User::Leave(EInvalidArgs);
+                    }
+					//checking fractal digits
+                    right = (aValue.Length() - right );
+                    if ( right > KMaxFixed144Right )
+                    {
+                        User::Leave(EInvalidArgs);
+                    }
+
+                    // NULL value, if AllocL leaves then the pointer is invalid
+                    DeleteAndNullValue();
+                    iValue = aValue.AllocL();
+                }
+            }
+            break;
+        }
+        case EBinBase64:
+        {
+            // NULL value, if AllocL leaves then the pointer is invalid
+            DeleteAndNullValue();
+            iValue = aValue.AllocL();
+
+            break;
+        }
+        case EBinHex:
+        {
+            TInt64 tryVal;
+            CheckErrorL( lex.Val(tryVal, EHex), aValue );
+            break;
+        }
+        case EChar:
+        {
+            // just one character allowed
+            if (aValue.Length() > 1)
+            {
+                User::Leave(EInvalidArgs);
+            }
+            // NULL value, if AllocL leaves then the pointer is invalid
+            DeleteAndNullValue();
+            iValue = aValue.AllocL();
+            
+            break;
+        }
+        case EDate:         
+        case EDateTime:     
+        case EDateTimeTz:   
+        case ETime:         
+        case ETimeTz:       
+        case EUri:          
+        case EUuid:         
+        case EString:
+        {
+            // NULL value, if AllocL leaves then the pointer is invalid
+            DeleteAndNullValue();
+            iValue = aValue.AllocL();
+            
+            break;
+        }
+        default:
+        {
+            // unknown
+            // must be tolerant
+            // NULL value, if AllocL leaves then the pointer is invalid
+            DeleteAndNullValue();
+            iValue = aValue.AllocL();
+            
+            break;
+        }
+    }
+
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::Value
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpArgument::Value()
+{
+    LOGS("CUpnpArgument::Value() [Name/Value]");
+    return *iValue;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::RelatedStateVariable
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpArgument::RelatedStateVariable()
+{
+    return *iRelatedStateVariable;
+}
+
+void CUpnpArgument::SetRelatedStateVarL(const TDesC8& aRelatedStateVar)
+    {
+    HBufC8* tmp = aRelatedStateVar.AllocL();
+    delete iRelatedStateVariable;
+    iRelatedStateVariable = tmp;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpArgument::Direction
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpArgument::Direction() const
+{
+    return iDirection;
+}
+
+void CUpnpArgument::SetDirectionL( TInt aDirection )
+    {
+    iDirection = aDirection;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::Type
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TArgumentType CUpnpArgument::Type()
+{
+    CUpnpStateVariable* var = iParentService.StateVariable( *iRelatedStateVariable );
+    if( var )
+    {
+        return var->Type();
+    }
+    else
+    {
+        return EUnknown;
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::DeleteAndNullValue
+// Delete and NULL iValue.
+// -----------------------------------------------------------------------------
+//
+void CUpnpArgument::DeleteAndNullValue()
+{
+    delete iValue;
+    iValue = NULL;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpArgument::CheckErrorL
+// Checks the error code for the SetValue method and leaves if needed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpArgument::CheckErrorL(TInt aError, const TDesC8& aValue)
+{
+    switch ( aError )
+    {
+        case KErrOverflow:
+        {
+        // sizeof argument
+            User::Leave(EInvalidArgs);
+            break;
+        }
+        case KErrGeneral:
+        {
+            // bad argument
+            User::Leave(EInvalidArgs);
+            break;
+        }
+        default:
+        {
+        // NULL value, if AllocL leaves then the pointer is invalid
+            DeleteAndNullValue();
+            iValue = aValue.AllocL();
+        }
+    }                       
+}
+    
+void CUpnpArgument::SetType(TInt aType)
+    {
+    iType = aType;
+    }
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpargumentcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,197 @@
+/** @file
+* 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 the CUpnpArgumentContentHandler class
+ *
+*/
+
+
+#include "upnpargumentcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpargument.h"
+#include "upnpserviceliterals.h"
+
+//const TUint8 KReqiuredTagsBoundary(7) //first three bits when
+//relatedStateVariable, and direction is required
+const TUint8 KReqiuredTagsBoundary(1);
+enum TFlagsPositions
+    {
+    ENamePos = 0,
+    EDirectionPos,
+    ERelatedStateVariablePos    //reqired, but optional for now
+//    ERetvalPos 
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpArgumentContentHandler* CUpnpArgumentContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpArgument& aResultArgument )
+    {
+	CUpnpArgumentContentHandler* argumentContentHandler = 
+        CUpnpArgumentContentHandler::NewLC( aController, aResultArgument );
+    CleanupStack::Pop( argumentContentHandler );
+	return argumentContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpArgumentContentHandler* CUpnpArgumentContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpArgument& aResultArgument )
+    {
+    CUpnpArgumentContentHandler* argumentContentHandler = 
+        new (ELeave) CUpnpArgumentContentHandler( aController, aResultArgument );
+	CleanupStack::PushL( argumentContentHandler );	
+	return argumentContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentContentHandler::~CUpnpArgumentContentHandler
+// Destructor of CUpnpArgumentContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpArgumentContentHandler::~CUpnpArgumentContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentContentHandler::CUpnpArgumentContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpArgumentContentHandler::CUpnpArgumentContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpArgument& aResultArgument ) :
+    CUpnpContentHandler( aController ), iResultArgument( aResultArgument ),
+            iCurrentState( EInitial )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpArgumentContentHandler::OnStartElementL( const RTagInfo& aElement,
+    const RAttributeArray& /*aAttributes*/ )
+    {
+    if ( iCurrentState == EInitial )
+        {
+        const TDesC8& elementName( aElement.LocalName().DesC() );
+        if ( elementName.Compare( KUpnpName ) == 0 )
+            {
+            RepeatedTagCheckL( ENamePos, iFoundTags );
+            iCurrentState = EName;
+            }
+        else if ( elementName.Compare(KUpnpDirection) == 0 )
+            {
+            RepeatedTagCheckL( EDirectionPos, iFoundTags );
+            iCurrentState = EDirection;
+            }
+        else if ( elementName.Compare(KUpnpRelatedStateVariable) == 0 )
+            {
+            RepeatedTagCheckL( ERelatedStateVariablePos, iFoundTags );
+            iCurrentState = ERelatedStateVariable;
+            }
+//        else if ( elementName.Compare(KUpnpRetval) == 0 ) 
+//            {
+//            RepeatedTagCheckL( ERetvalPos, iFoundTags )
+//            iController.SetCurrentContentHandlerL(    
+//                    CUpnpRetvalContentHandler::NewL( iController ) 
+//                                        )
+//            }        
+                    else
+                        {
+                        iController.SetCurrentContentHandlerL( 
+                            CUpnpIgnoreContentHandler::NewL( iController ) );
+                        }
+        }
+    else
+        {
+        iController.SetCurrentContentHandlerL( 
+            CUpnpIgnoreContentHandler::NewL( iController ) );
+        //User::Leave( KErrArgument ) 
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpArgumentContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    switch ( iCurrentState )
+        {
+        case EInitial:
+            ASSERT( aElement.LocalName().DesC().Compare(KUpnpArgument) == 0 );
+            if ( ( iFoundTags.iFlags & KReqiuredTagsBoundary ) == 
+                                                        KReqiuredTagsBoundary )
+                {
+                iController.SetPreviousContentHandler();
+                }
+            else
+                {
+                User::Leave( KErrArgument ); //required tag not found
+                }
+            break;
+        default:
+            iCurrentState = EInitial;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpArgumentContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    switch ( iCurrentState )
+        {
+        case EName:
+            iResultArgument.SetNameL( aBytes );
+            break;
+        case EDirection:
+            if ( aBytes.Compare( KUpnpIn ) == 0 )
+                {
+                iResultArgument.SetDirectionL( EIn );
+                }
+            else //if ( aBytes.Compare( KUpnpOut ) == 0 )
+                {
+                iResultArgument.SetDirectionL( EOut );
+                }
+//            else
+//                {
+//                User::Leave( KErrArgument )  
+//                }
+                
+            break;
+        case ERelatedStateVariable:
+            iResultArgument.SetRelatedStateVarL( aBytes );
+            break;
+        default:
+            ASSERT( EInitial == iCurrentState );
+            //User::Leave( KErrArgument ) 
+            break;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpargumentlistcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,130 @@
+/** @file
+* 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 the CUpnpArgumentListContentHandler class
+ *
+*/
+
+
+#include "upnpargumentlistcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpargumentcontenthandler.h"
+#include "upnpservice.h"
+#include "upnpaction.h"
+#include "upnpargument.h"
+#include "upnpserviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentListContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpArgumentListContentHandler* CUpnpArgumentListContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService,
+    CUpnpAction& aResultAction )
+    {
+    CUpnpArgumentListContentHandler* argumentListContentHandler = 
+        CUpnpArgumentListContentHandler::NewLC( aController, aResultService, 
+                                               aResultAction );
+    CleanupStack::Pop( argumentListContentHandler );                                               
+    return argumentListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentListContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpArgumentListContentHandler* CUpnpArgumentListContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService,
+    CUpnpAction& aResultAction )
+    {
+    CUpnpArgumentListContentHandler* argumentListContentHandler = 
+        new (ELeave) CUpnpArgumentListContentHandler(aController, aResultService, 
+            aResultAction);
+    CleanupStack::PushL( argumentListContentHandler );
+    return argumentListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentListContentHandler::~CUpnpArgumentListContentHandler
+// Destructor of CUpnpArgumentListContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpArgumentListContentHandler::~CUpnpArgumentListContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentListContentHandler::CUpnpArgumentListContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpArgumentListContentHandler::CUpnpArgumentListContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService,
+    CUpnpAction& aResultAction ) :
+    CUpnpContentHandler( aController ), iResultService( aResultService ),
+            iResultAction( aResultAction )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentListContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpArgumentListContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/ )
+    {
+    TPtrC8 elementName(aElement.LocalName().DesC() );
+    if ( elementName.Compare( KUpnpArgument ) == 0 )
+        {
+        CUpnpArgument* argument = CUpnpArgument::NewL( iResultService );
+        CleanupStack::PushL( argument );
+        iResultAction.AddArgumentL( *argument );
+        CleanupStack::Pop( argument );
+        iController.SetCurrentContentHandlerL( 
+            CUpnpArgumentContentHandler::NewL( iController, *argument ) );
+        }
+    else
+        {
+        iController.SetCurrentContentHandlerL( 
+            CUpnpIgnoreContentHandler::NewL( iController ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentListContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpArgumentListContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare( KUpnpArgumentList ) == 0 );
+    iController.SetPreviousContentHandler();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpArgumentListContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpArgumentListContentHandler::OnContentL( const TDesC8& /*aBytes*/ )
+    {
+    //User::Leave( KErrArgument ) 
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpbodyofsoapcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,192 @@
+/** @file
+* 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 the CUpnpBodyOfSoapContentHandler class
+ *
+*/
+
+
+#include "upnpbodyofsoapcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpsoapliterals.h"
+#include "upnpsingletagcontenthandler.h"
+#include "upnperrorcodeseekercontenthandler.h"
+#include "upnpdescriptionproperty.h"
+
+_LIT8( KUpnpActionName, "ActionName" );
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpBodyOfSoapContentHandler* CUpnpBodyOfSoapContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments )
+    {
+    CUpnpBodyOfSoapContentHandler* soapContentHandler =
+        CUpnpBodyOfSoapContentHandler::NewLC( aController, aResultSetOfArguments );
+    CleanupStack::Pop( soapContentHandler );
+    return soapContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpBodyOfSoapContentHandler* CUpnpBodyOfSoapContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments)
+    {
+    CUpnpBodyOfSoapContentHandler* soapContentHandler =
+        new (ELeave) CUpnpBodyOfSoapContentHandler( aController, aResultSetOfArguments );
+    CleanupStack::PushL( soapContentHandler );
+    soapContentHandler->ConstructL();
+    return soapContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::~CUpnpBodyOfSoapContentHandler
+// Destructor of CUpnpBodyOfSoapContentHandler class
+// -----------------------------------------------------------------------------
+//
+CUpnpBodyOfSoapContentHandler::~CUpnpBodyOfSoapContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::CUpnpBodyOfSoapContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpBodyOfSoapContentHandler::CUpnpBodyOfSoapContentHandler(
+    CUpnpContentHandlersController& aController,
+                RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments) :
+    CUpnpPropertysetContentHandler( aController, aResultSetOfArguments )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpBodyOfSoapContentHandler::ConstructL()
+    {
+    CUpnpPropertysetContentHandler::ConstructL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpBodyOfSoapContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+    {
+    const TDesC8& elementName( aElement.LocalName().DesC() );
+
+    if ( iIsInsideOfAction )
+        {
+        if ( InsideOfArgument() )   
+            {
+            SetIgnoreHandlerL();
+            }
+        else
+            {
+            CUpnpSingleTagContentHandler::SafeCopyL( iCurrentPropertyKey,
+                elementName);
+            }
+        }
+    else
+        {
+        if ( elementName == KUpnpSoapFault ) 
+            {
+            iResultPropertyset.ResetAndDestroy();
+            iCurrentPropertyKey = KUpnpSoapFault;
+            iController.SetCurrentContentHandlerL(
+                CUpnpErrorCodeSeekerContentHandler::NewL( iController, iCurrentPropertyValue )
+            );
+            }
+        else
+            {
+            //we're assuming that now is 'actionName'/'actionName'Response tag
+            //we're also ignoring namespaces
+            //these both things could be changed if we want to have stricter parser
+            StoreCurrentPropertyL();
+            iCurrentPropertyKey = KUpnpActionName;
+            CUpnpSingleTagContentHandler::SafeCopyL( iCurrentPropertyValue, elementName );
+            StoreCurrentPropertyL();
+            iIsInsideOfAction = ETrue;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpBodyOfSoapContentHandler::OnEndElementL( const RTagInfo& /*aElement*/ )
+    {
+    if ( iIsInsideOfAction )
+        {
+        if ( !InsideOfArgument() )
+            {
+            iIsInsideOfAction = EFalse;
+            }
+        StoreCurrentPropertyL();
+        }
+    else
+        {
+        StoreCurrentPropertyL();
+        iController.SetPreviousContentHandler();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpBodyOfSoapContentHandler::OnContentL( const TDesC8& aBytes)
+    {
+    if ( iIsInsideOfAction && InsideOfArgument() )
+        {
+        CUpnpSingleTagContentHandler::SafeCopyL( iCurrentPropertyValue, aBytes );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::InterestedInAllNamespaces
+// We are interested in tags from all possible namespaces
+// Specific namespace we can check in event callback functions (On...Element)
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpBodyOfSoapContentHandler::InterestedInAllNamespaces()
+    {
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpBodyOfSoapContentHandler::InsideOfArgument
+// Returns true if content handler is in inside argument state
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpBodyOfSoapContentHandler::InsideOfArgument()
+    {
+    return (iCurrentPropertyKey.Length() > 0);
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+/** @file
+* 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 the CUpnpContentHandler class
+ *
+*/
+
+
+#include "upnpcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandler::CUpnpContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpContentHandler::CUpnpContentHandler(
+    CUpnpContentHandlersController& aController ) :
+    iController( aController )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandler::InterestedInAllNamespaces
+// Returns value if class is interested in tags all namespaces
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpContentHandler::InterestedInAllNamespaces()
+    {
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandler::SetIgnoreHandlerL
+// Set controller's current content handler to IgnoreContentHandler object
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandler::SetIgnoreHandlerL()
+    {
+    iController.SetCurrentContentHandlerL( 
+        CUpnpIgnoreContentHandler::NewL( iController ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandler::ResetState
+// Resets internal state
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandler::ResetState()
+    {
+    // no implementation required in base class    
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpcontenthandlerscontroller.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,645 @@
+/** @file
+* 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:  CUpnpContentHandlersController
+ *
+*/
+
+
+#include "upnpcontenthandlerscontroller.h"
+
+#include <xml/parser.h>
+#include <xml/xmlparsererrors.h>
+#include <xml/matchdata.h>
+
+#include "upnpstring.h"
+#include "upnpservice.h"
+#include "upnpdevice.h"
+#include "upnpdeviceimplementation.h"
+#include "upnpsilentdeviceimplementation.h"
+
+#include "upnpserviceliterals.h"
+#include "upnpdeviceliterals.h"
+
+#include "upnpcontenthandler.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpsoapcontenthandler.h"
+#include "upnppropertysetcontenthandler.h"
+#include "upnpservicecontenthandler.h"
+#include "upnpdevicecontenthandler.h"
+
+using namespace Xml;
+
+// CONSTANTS
+const TUint KUtfLowMax = 0x1F;
+const TUint KUtfHighMin = 0x7F;
+const TUint KUtfHighMax = 0xA0;
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::~CUpnpContentHandlersController
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpContentHandlersController::~CUpnpContentHandlersController()
+    {
+    delete iParser;
+    ASSERT( NULL == iStack || iStack->IsEmpty() );
+    delete iStack;
+    
+    iContent.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpContentHandlersController* CUpnpContentHandlersController::NewL()
+    {
+    CUpnpContentHandlersController* controller =
+        CUpnpContentHandlersController::NewLC();    
+    CleanupStack::Pop( controller );
+    return controller;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::NewLC
+// Two-phased constructor. Leaves the object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpContentHandlersController* CUpnpContentHandlersController::NewLC()
+    {
+    CUpnpContentHandlersController* controller =
+        new (ELeave) CUpnpContentHandlersController();
+    CleanupStack::PushL( controller );
+    controller->ConstructL();
+    return controller;
+    }
+
+// -----------------------------------------------------------------------------
+// CleanupResetAndDestroy
+// Releases array, and object keapt in it.
+// Used as method passed to TCleanupItem object.
+// -----------------------------------------------------------------------------
+//
+LOCAL_C void CleanupResetAndDestroy(TAny* aRPointerArray)
+    {
+    reinterpret_cast<RPointerArray<CUpnpDescriptionProperty>* >(aRPointerArray)
+        ->ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::UpdateActionWithOKResponseL
+// For internal use. Update all necessary information from a SOAP-message
+// that should be OK answer (e.g. received by Http 200 OK message).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpContentHandlersController::UpdateActionWithOKResponseL(
+    CUpnpSoapMessage* aMessage, CUpnpAction* aAction )
+    {
+    iSoapParser.UpdateActionWithOKResponseL( aMessage, aAction );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::UpdateActionWithErrorResponseL
+// For internal use. Update all necessary information from a SOAP-message
+// that should contain SOAP error (fault) message (eg. received by http
+// 500 InternalServerError message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpContentHandlersController::UpdateActionWithErrorResponseL(
+    CUpnpSoapMessage* aMessage, CUpnpAction* aAction )
+    {
+    iSoapParser.UpdateActionWithErrorResponseL( aMessage, aAction );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::UpdateActionWithRequestL
+// Update action with all necessary information from
+// a SOAP request message.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::UpdateActionWithRequestL(
+    CUpnpSoapMessage* aMessage, CUpnpAction* aAction )
+    {
+    iSoapParser.UpdateActionWithRequestL( aMessage, aAction );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::AttachL
+// For internal use. Attaches the information contained in a GENA buffer
+// to this service. In practice, this means handling of received GENA messages.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpContentHandlersController::AttachL( const TDesC8& aGenaNotify,
+                                                       CUpnpService& aService )
+    {
+    RPointerArray<CUpnpDescriptionProperty> parsedValues;
+    CleanupStack::PushL( TCleanupItem( CleanupResetAndDestroy, &parsedValues ) );
+
+    TRAPD( parseError, ParseGenaL( aGenaNotify, parsedValues ) );
+    if ( KErrNone != parseError )
+        {
+        User::Leave( KErrGeneral );
+        }
+    for ( TInt i(0); i < parsedValues.Count(); ++i )
+        {
+        CUpnpDescriptionProperty* property = parsedValues[i];
+        aService.SetStateVariableL( property->Name(), UpnpString::Trim( property->Value()) );
+        }
+    CleanupStack::PopAndDestroy( &parsedValues );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseSoapL
+// Parses a xml document and returns set objects of CUpnpDescriptionProperties
+// It is used to parse action messages (soap)
+// @pre description property array should be leave safe
+// (there will be PopAndDestroy called on it in case of leave)
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::ParseSoapL(
+        const TDesC8& aDescription,
+        RPointerArray<CUpnpDescriptionProperty>& aParsedValues )
+    {
+    CUpnpSoapContentHandler* soapCH =
+        CUpnpSoapContentHandler::NewL( *this, aParsedValues );
+    iCorrectUri.Set( KSoapNamespaceUri );
+    ParseXmlL( aDescription, soapCH );
+    delete soapCH;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseParseDescriptionPropertiesL
+// Parses a xml document and returns set objects of CUpnpDescriptionProperties
+// It is used to parse event notification
+// @pre description property array should be leave safe
+// (there will be PopAndDestroy called on it in case of leave)
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::ParseGenaL(
+        const TDesC8& aDescription,
+        RPointerArray<CUpnpDescriptionProperty>& aParsedValues )
+    {
+    CUpnpPropertysetContentHandler* propsetCH =
+        CUpnpPropertysetContentHandler::NewL( *this, aParsedValues );
+    iCorrectUri.Set( KEventNamespaceUri );
+    ParseXmlL( aDescription, propsetCH );
+    delete propsetCH;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseServiceL
+// Parses a xml document and returns object of CUpnpService class
+// It is used for the first time the xml document is parsed
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpService* CUpnpContentHandlersController::ParseServiceL(
+        const TDesC8& aDescription, CUpnpDevice* aParentDevice )
+    {
+    CUpnpServiceContentHandler* serviceCH =
+        CUpnpServiceContentHandler::NewL( *this, aParentDevice );
+    iCorrectUri.Set( KServiceNamespaceUri );
+    ParseXmlL( aDescription, serviceCH );
+    CUpnpService* result = serviceCH->ResultService();
+    delete serviceCH;
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseServiceL
+// Parses an xml document
+// It is used in case when CUpnpService object already exists
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpContentHandlersController::ParseServiceL(
+        const TDesC8& aDescription, CUpnpService* aService )
+    {
+    CUpnpServiceContentHandler* serviceCH =
+        CUpnpServiceContentHandler::NewL( *this, *aService );
+    iCorrectUri.Set( KServiceNamespaceUri );
+    ParseXmlL(aDescription, serviceCH);
+    delete serviceCH;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseDeviceL
+// Parses an xml document and returns instance of CUpnpDevice class
+// It is used for the first time the device xml document is parsed
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDevice* CUpnpContentHandlersController::ParseDeviceL(
+    const TDesC8& aDescription )
+    {
+    return DoParseDeviceL( aDescription, (CUpnpDevice*)NULL );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseDeviceL
+// Parses an xml document and returns instance of CUpnpDevice class
+// It is used in case when CUpnpDevice object already exists and update of
+// device xml is required
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpContentHandlersController::ParseDeviceL(
+    const TDesC8& aDescription, CUpnpDevice* aDevice )
+    {
+    ASSERT( NULL != aDevice );
+    DoParseDeviceL( aDescription, aDevice );
+    }
+
+template<class T> T* CUpnpContentHandlersController::DoParseDeviceL(
+    const TDesC8& aDescription, T* aDevice )
+    {
+    CUpnpDeviceContentHandler* deviceCH = CUpnpDeviceContentHandler::NewL(
+        *this, aDevice );
+    iCorrectUri.Set( KDeviceNamespaceUri );
+    ParseXmlL( aDescription, deviceCH );
+    T* result(NULL);
+    if ( !aDevice )
+        {
+        deviceCH->GetResultDevice( result );
+        }
+    delete deviceCH;
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseDeviceImplL
+// Parses an xml document and returns instance of CUpnpDevice class
+// It is used for the first time the device xml document is parsed
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceImplementation* CUpnpContentHandlersController::ParseDeviceImplL(
+    const TDesC8& aDescription )
+    {
+    return DoParseDeviceL( aDescription, (CUpnpDeviceImplementation*)NULL );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseDeviceImplL
+// Parses an xml document and returns instance of CUpnpDevice class
+// It is used in case when CUpnpDeviceImplementation object already exists and
+// update of device xml is required
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpContentHandlersController::ParseDeviceImplL(
+    const TDesC8& aDescription, CUpnpDeviceImplementation* aDeviceImpl )
+    {
+    ASSERT( NULL != aDeviceImpl );
+    DoParseDeviceL( aDescription, aDeviceImpl );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseSilentDeviceImplL
+// Parses an xml document and returns instance of CUpnpDevice class
+// It is used for the first time the device xml document is parsed
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSilentDeviceImplementation* CUpnpContentHandlersController::ParseSilentDeviceImplL(
+    const TDesC8& aDescription )
+    {
+    return DoParseDeviceL( aDescription, (CUpnpSilentDeviceImplementation*)NULL );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseSilentDeviceImplL
+// Parses an xml document and returns instance of CUpnpDevice class
+// It is used in case when CUpnpSilentDeviceImplementation object already exists and
+// update of device xml is required
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpContentHandlersController::ParseSilentDeviceImplL(
+    const TDesC8& aDescription, CUpnpSilentDeviceImplementation* aDeviceImpl )
+    {
+    ASSERT( NULL != aDeviceImpl );
+    DoParseDeviceL( aDescription, aDeviceImpl );
+    }
+
+// -----------------------------------------------------------------------------
+// ReleaseHandlersOnStack
+// Releases all handlers that are on CStack<CUpnpContentHandler, ETrue> object
+// Used as method passed to TCleanupItem object.
+// -----------------------------------------------------------------------------
+//
+LOCAL_C void ReleaseHandlersOnStack(TAny* aStack)
+    {
+    reinterpret_cast<CStack<CUpnpContentHandler, ETrue>*>(aStack)->Clear();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ParseXmlL
+// Parses a xml document by passed content handler,
+// there is a guarantee that aHandlerToUse will be deleted in case of leave
+// precondition: iStack is empty
+// postcondition: iStack is empty
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::ParseXmlL( const TDesC8& aDescription,
+    CUpnpContentHandler* aHandlerToUse )
+    {
+    ASSERT( iStack->IsEmpty() );
+    iCurrentContentHandler = aHandlerToUse;
+    iStack->PushL( aHandlerToUse );
+    CleanupStack::PushL( TCleanupItem( ReleaseHandlersOnStack, iStack ) );
+    iDocStarted = EFalse;
+    TRAPD( parseError, Xml::ParseL( *iParser, aDescription ) );
+    if ( EXmlSyntax == parseError || EXmlInvalidToken == parseError ) 
+        {
+        while ( iStack->Count() > 1 )
+            {
+            delete iStack->Pop();
+            }
+        aHandlerToUse->ResetState();
+        iCurrentContentHandler = aHandlerToUse;   
+        iDocStarted = EFalse;
+        RBuf8 fixedDes;
+        fixedDes.CreateL( aDescription );
+        CleanupClosePushL( fixedDes );                
+        RemoveForbiddenCharacters( fixedDes );        
+        TRAP( parseError, Xml::ParseL( *iParser, fixedDes ) );
+        CleanupStack::PopAndDestroy( &fixedDes );
+        }
+    
+    if ( EXmlJunkAfterDocElement != parseError ) 
+        {
+        User::LeaveIfError( parseError );
+        }
+    else
+        {
+        //EXmlJunkAfterDocElement must not be ignored when root isn't complete
+        if ( !iDocStarted || iStack->Count() != 1 )
+            {
+            User::Leave( KErrArgument );     //no valid root element were found
+            }
+        }
+    ASSERT( iStack->Count() == 1 );
+    ASSERT( iStack->Head() == iCurrentContentHandler && iCurrentContentHandler == aHandlerToUse );
+    iStack->Pop();
+    CleanupStack::Pop( iStack );
+    ASSERT( iStack->IsEmpty() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::RemoveForbiddenCharacters
+// Removes forbidden characters
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::RemoveForbiddenCharacters( TDes8& aDescription )
+    {    
+    for( TInt i=0; i<aDescription.Length(); i++ )
+        {
+        if ( ( aDescription[i] <= KUtfLowMax ) ||
+            ( aDescription[i] >= KUtfHighMin && aDescription[i] <= KUtfHighMax ) )
+            {
+            aDescription.Delete( i, 1 );
+            i--;
+            }
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::CUpnpContentHandlersController
+// Default C++ constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpContentHandlersController::CUpnpContentHandlersController()
+    : iSoapParser( *this )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ConstructL
+// 2nd phase constructor, dedicated to be used by inherited classs
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::ConstructL()
+    {
+    _LIT8( KXmlMimeType, "text/xml" );
+    _LIT8( KLibxml2, "libxml2" );
+    CMatchData *matchData = CMatchData::NewL();
+    CleanupStack::PushL( matchData );
+    matchData->SetMimeTypeL( KXmlMimeType );
+    matchData->SetVariantL( KLibxml2 );
+    iParser = CParser::NewL( *matchData, *this );
+    CleanupStack::PopAndDestroy( matchData );
+    iStack = new (ELeave) CStack<CUpnpContentHandler,ETrue>();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnStartDocumentL
+// This method is a callback to indicate the start of the document.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnStartDocumentL(
+    const RDocumentParameters& /*aDocParam*/, TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    iDocStarted = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnEndDocumentL
+// This method is a callback to indicate the end of the document.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnEndDocumentL( TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& aAttributes,
+    TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    ChunksMergingEndL();
+    if ( iCurrentContentHandler->InterestedInAllNamespaces()
+            || aElement.Uri().DesC().Compare( iCorrectUri ) == 0 )
+        {
+        iCurrentContentHandler->OnStartElementL( aElement, aAttributes );
+        }
+    else
+        {
+        SetCurrentContentHandlerL( CUpnpIgnoreContentHandler::NewL( *this ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnEndElementL( const RTagInfo& aElement,
+    TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    ChunksMergingEndL();
+    iCurrentContentHandler->OnEndElementL( aElement );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnContentL
+// This method is a callback that sends the content of the element.
+// Not all the content may be returned in one go. The data may be sent in chunks.
+// This method just append chunk to chunks previously received. When we get all
+// chunks ChunksMergingEndL method pass merged chunks to current content handler.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnContentL( const TDesC8& aBytes,
+    TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    const TInt newLength = iContent.Length() + aBytes.Length();
+    if ( iContent.MaxLength() < newLength )
+        {
+        iContent.ReAllocL( newLength );
+        }
+    iContent.Append( aBytes );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::ChunksMergingEndL
+// Method that is called when all chunks that contain current content
+// were received, so we can pass merged content to current content handler
+// as an argument of OnContentL method
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::ChunksMergingEndL()
+    {
+    if ( iContent.Length() > 0 )
+        {
+        TLex8 lex(iContent);
+        lex.SkipSpace();
+        if ( !lex.Eos() ) 
+            {
+            iCurrentContentHandler->OnContentL( iContent );
+            }
+        iContent.Zero();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnStartPrefixMappingL
+// This method is a notification of the beginning of the scope of a prefix-URI Namespace mapping.
+// This method is always called before the corresponding OnStartElementL method.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnStartPrefixMappingL(
+    const RString& /*aPrefix*/, const RString& /*aUri*/, TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnEndPrefixMappingL
+// This method is a notification of the end of the scope of a prefix-URI mapping.
+// This method is called after the corresponding DoEndElementL method.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnEndPrefixMappingL(
+    const RString& /*aPrefix*/, TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnIgnorableWhiteSpaceL
+// This method is a notification of ignorable whitespace in element content.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnIgnorableWhiteSpaceL(
+    const TDesC8& /*aBytes*/, TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnSkippedEntityL
+// This method is a notification of a skipped entity. If the parser encounters an
+// external entity it does not need to expand it - it can return the entity as aName
+// for the client to deal with.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnSkippedEntityL(
+    const RString& /*aName*/, TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnProcessingInstructionL
+// This method is a receive notification of a processing instruction.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnProcessingInstructionL(
+    const TDesC8& /*aTarget*/, const TDesC8& /*aData*/, TInt aErrorCode )
+    {
+    User::LeaveIfError( aErrorCode );
+    ChunksMergingEndL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::OnError
+// This method indicates an error has occurred.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::OnError( TInt /*aErrorCode*/)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::GetExtendedInterface
+// This method obtains the interface matching the specified uid.
+// -----------------------------------------------------------------------------
+//
+TAny* CUpnpContentHandlersController::GetExtendedInterface( const TInt32 /*aUid*/)
+    {
+    return 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::SetCurrentContentHandlerL
+// Sets ContentHandler argument as a current content handler, so it will
+// receive parsing events. Previous content handler will be push on stack
+// that it could be againt current content handler after calling of
+// SetPreviousContentHandler.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::SetCurrentContentHandlerL(
+    CUpnpContentHandler* aNewContentHandler )
+    {
+    ASSERT( NULL != aNewContentHandler );
+    iStack->PushL( aNewContentHandler );
+    iCurrentContentHandler = aNewContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandlersController::SetPreviousContentHandler
+// Deletes current content handler, and set previous content handler as current
+// contetnt handler.
+// -----------------------------------------------------------------------------
+//
+void CUpnpContentHandlersController::SetPreviousContentHandler()
+    {
+    ASSERT( iStack->Count() > 1 );
+    delete iStack->Pop();
+    iCurrentContentHandler = iStack->Head();
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdescriptionproperty.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,121 @@
+/** @file
+* 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:  Defines the CUpnpDescriptionProperty class
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpdescriptionproperty.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDescriptionProperty::CUpnpDescriptionProperty
+// Default C++ constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpDescriptionProperty::CUpnpDescriptionProperty()
+    {         
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDescriptionProperty::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpDescriptionProperty* CUpnpDescriptionProperty::NewL( const TDesC8& aName , const TDesC8& aValue )
+    {
+    CUpnpDescriptionProperty* self = new ( ELeave ) CUpnpDescriptionProperty();
+    CleanupStack::PushL( self );
+    self->ConstructL( aName, aValue );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDescriptionProperty::ConstructL
+// 2nd phase constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpDescriptionProperty::ConstructL( const TDesC8& aName , const TDesC8& aValue )
+    {
+    iName = aName.AllocL();
+    if ( &aValue )
+        {
+        iValue = aValue.AllocL();
+        iValue->Des().TrimAll();        
+        }
+    else
+        {
+        iValue = HBufC8::NewMaxL(0);            
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDescriptionProperty::CUpnpDescriptionProperty
+// Destructor of CUpnpDescriptionProperty class
+// -----------------------------------------------------------------------------
+//
+CUpnpDescriptionProperty::~CUpnpDescriptionProperty()
+    {
+    delete iName;
+    delete iValue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDescriptionProperty::SetNameL
+// Setter for property name 
+// -----------------------------------------------------------------------------
+//	
+void CUpnpDescriptionProperty::SetNameL( const TDesC8& aName)
+    {     
+    HBufC8* tmp = aName.AllocL();
+    delete iName;
+    iName = tmp;
+    }	
+
+// -----------------------------------------------------------------------------
+// CUpnpDescriptionProperty::SetValueL
+// Setter for property value
+// -----------------------------------------------------------------------------
+//        
+void CUpnpDescriptionProperty::SetValueL(const TDesC8& aValue)
+    {     
+    HBufC8* tmp = aValue.AllocL();
+    delete iValue;
+    iValue = tmp;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDescriptionProperty::Name
+// Getter for property name 
+// -----------------------------------------------------------------------------
+//
+const TDesC8& CUpnpDescriptionProperty::Name()
+    {
+    return *iName;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDescriptionProperty::Value
+// Getter for property value 
+// -----------------------------------------------------------------------------
+//    
+const TDesC8& CUpnpDescriptionProperty::Value()
+    {
+    return *iValue;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdevice.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1098 @@
+/** @file
+* 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:  Defines the CUpnpDevice class
+*
+*/
+
+
+
+// INCLUDE FILES
+
+#include <e32math.h>
+
+#include "upnpfileutils.h"
+#include "upnpicon.h"
+#include "upnpdevice.h"
+#include "upnpcommonstructs.h"
+#include "upnpstring.h"
+#include "upnpdispatcher.h"
+#include "upnpcons.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcustomlog.h"
+#include "upnpserviceimplementation.h"
+#include "upnpdevicecontenthandler.h"
+
+#define KLogFile _L("UPnPStack.txt")
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetUuidL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::SetUuidL( const TDesC8& aUUID )
+    {
+    HBufC8* tmp = aUUID.AllocL();
+    delete iUUID;
+    iUUID = tmp;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::AddDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::AddDeviceL( CUpnpDevice* device )
+    {
+    device->SetRootDevice( EFalse );
+    iDeviceList.AppendL( device );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::CUpnpDevice
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice::CUpnpDevice() :
+    iExpired(ETrue), iNetworkType(EHomeNetwork), iIsRootDevice(ETrue)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::ConstructL( const TUpnpDevice* aDevice,
+    const RPointerArray<TUpnpService>& aServices )
+    {
+    Init();
+
+    if ( aDevice )
+        {
+        iUUID = aDevice->iUUID.AllocL();
+        iDeviceType = aDevice->iDeviceType.AllocL();
+        iDescriptionURL = aDevice->iDescriptionURL.AllocL();
+        iDomain = aDevice->iDomain.AllocL();
+        iExpired = aDevice->iExpired;
+        iAlive = aDevice->iAlive;
+
+        if ( aDevice->iLocal )
+            {
+            iNetworkType = ELocalDevice;
+            }
+        else if ( aDevice->iRemote )
+            {
+            iNetworkType = ERemoteDevice;
+            }
+        else
+            {
+            iNetworkType = EHomeNetwork;
+            }
+
+        iServiceTypes = new (ELeave) CDesC8ArrayFlat( aServices.Count()
+                == 0 ? 1 : aServices.Count() );
+
+        for ( TInt i = 0; i < aServices.Count(); i++ )
+            {
+            iServiceTypes->AppendL( aServices[i]->iServiceType );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDevice* CUpnpDevice::NewL( const TUpnpDevice* aDevice,
+        const RPointerArray<TUpnpService> & aServices
+)
+    {
+    CUpnpDevice* self = new (ELeave) CUpnpDevice();
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aDevice, aServices );
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::~CUpnpDevice
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpDevice::~CUpnpDevice()
+    {
+    iServiceDescriptionSessionIds.Reset();
+    iServiceDescriptionSessionIds.Close();
+
+    if ( iServiceTypes )
+        {
+        iServiceTypes->Reset();
+        delete iServiceTypes;
+        }
+    if ( iServicesId )
+        {
+        iServicesId->Reset();
+        delete iServicesId;
+        }
+
+    delete iUUID;
+    delete iDeviceType;
+    delete iDescriptionURL;
+    delete iDomain;
+
+    CleanupServiceArray();
+
+    // destroy embedded devices
+    iDeviceList.ResetAndDestroy();
+    iDeviceList.Close();
+
+    delete iClockSeq;
+
+    iIcons.ResetAndDestroy();
+    iIcons.Close();
+
+    iServiceDescriptionSessionIds.Reset();
+    iServiceDescriptionSessionIds.Close();
+    iIconSessionIds.Reset();
+    iIconSessionIds.Close();
+
+    delete iUrlBase;
+
+    iProperties.ResetAndDestroy();
+    iProperties.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::Init
+// Initialisation.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::Init()
+    {
+    iAddress = TInetAddr( INET_ADDR( 0,0,0,0 ), 0 );
+    iIconReceiveState = EAllIconsAdded;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::CleanupServiceArray
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::CleanupServiceArray()
+    {
+    for ( TInt i = iServiceList.Count() - 1; i >= 0; --i )
+        {
+        delete iServiceList[ i ];
+        iServiceList[ i ] = NULL;
+        }
+    iServiceList.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DescriptionUrl
+// Return description URL.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpDevice::DescriptionUrl() const
+    {
+    if ( iDescriptionURL )
+        {
+        return *iDescriptionURL;
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetDescriptionUrlL
+// Return description URL.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::SetDescriptionUrlL( const TDesC8& aDescriptionUrl )
+    {
+    HBufC8* tmp = aDescriptionUrl.AllocL();
+    delete iDescriptionURL;
+    iDescriptionURL = tmp;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetAlive
+// Set alive.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::SetAlive( TBool aAlive )
+    {
+    iAlive = aAlive;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::Expired
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDevice::Expired() const
+    {
+    return iExpired;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetExpired
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::SetExpired( TBool aExpired )
+    {
+    iExpired = aExpired;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DeviceType
+// Return device type.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpDevice::DeviceType()
+    {
+    if ( iDeviceType )
+        {
+        return TPtrC8( iDeviceType->Des() );
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::Uuid
+// Return UUID.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpDevice::Uuid()
+    {
+    if ( iUUID )
+        {
+        return TPtrC8( iUUID->Des() );
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::Alive
+// Return iAlive.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDevice::Alive() const
+    {
+    return iAlive;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DescriptionUrlAddressL
+// Return description URL address.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr CUpnpDevice::DescriptionUrlAddressL() const
+    {
+    if ( iAddress == TInetAddr( INET_ADDR( 0,0,0,0 ), 0) )
+        {
+
+        const TDesC8& url = DescriptionUrl();
+
+        if ( url.Length()> KHttp().Length() )
+            {
+            TPtrC8 addrAndPath = url.Right( url.Length() - KHttp().Length() );
+
+            TInt index = addrAndPath.Find( KSepar() );
+
+            if ( index == KErrNotFound )
+                {
+                index = addrAndPath.Find( KSlash8() );
+                }
+
+            if ( index == KErrNotFound )
+                {
+                return TInetAddr( INET_ADDR( 0,0,0,0 ), 0 );
+                }
+
+            TPtrC8 addr = addrAndPath.Left( index );
+
+            TInetAddr address;
+
+            HBufC* addrBuf = HBufC::NewLC(addr.Length());
+            addrBuf->Des().Copy(addr);
+            address.Input(*addrBuf);
+            CleanupStack::PopAndDestroy(addrBuf);
+
+            return address;
+            }
+
+        return TInetAddr(INET_ADDR( 0,0,0,0 ), 0 );
+        }
+
+    return iAddress;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DescriptionUrlPath
+// Return description URL path.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpDevice::DescriptionUrlPath() const
+    {
+
+    const TDesC8& url = DescriptionUrl();
+
+    if ( url.Length()> KHttp().Length() )
+        {
+        TPtrC8 addrAndPath = url.Right( url.Length() - KHttp().Length() );
+
+        TInt index = addrAndPath.Find( KSlash8() );
+
+        if ( index != KErrNotFound )
+            {
+            TPtrC8 addr = addrAndPath.Right( addrAndPath.Length() - index );
+            return addr;
+            }
+        }
+    return TPtrC8( KNullDesC8 );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DescriptionUrlPort
+// Retrun description URL port.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpDevice::DescriptionUrlPort() const
+    {
+    if ( iAddress != TInetAddr( INET_ADDR( 0,0,0,0 ), 0) )
+        {
+        return iAddress.Port();
+        }
+
+    const TDesC8& url = DescriptionUrl();
+
+    if ( url.Length()> KHttp().Length() )
+        {
+        TPtrC8 addrAndPath = url.Right( url.Length() - KHttp().Length() );
+
+        TInt separIndex = addrAndPath.Find( KSepar() );
+
+        if ( separIndex == KErrNotFound )
+            {
+            return KDefaultDescriptionUrlPort;
+            }
+
+        TInt slashIndex = addrAndPath.Find( KSlash8() );
+
+        if ( slashIndex != KErrNotFound )
+            {
+            TPtrC8 port = addrAndPath.Mid(
+                    separIndex + 1, slashIndex - separIndex
+            );
+
+            TLex8 lex( port );
+            TInt prt;
+            TInt err = lex.Val( prt );
+            if( KErrNone != err )
+                {
+                return KErrNotFound;
+                }
+
+            return prt;
+            }
+        else
+            {
+            TPtrC8 port = addrAndPath.Right(
+                    addrAndPath.Length() - ( separIndex + 1 )
+            );
+
+            TLex8 lex( port );
+            TInt prt;
+            TInt err = lex.Val( prt );
+            if( KErrNone != err )
+                {
+                return KErrNotFound;
+                }
+
+            return prt;
+            }
+        }
+
+    return KDefaultDescriptionUrlPort;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::ServiceTypesL
+// Return service types.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CDesC8Array& CUpnpDevice::ServiceTypesL()
+    {
+    if ( !iServiceTypes )
+        {
+        iServiceTypes = new (ELeave) CDesC8ArrayFlat( 2 );
+        }
+    return *iServiceTypes;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::FriendlyName
+// Return friendly name.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpDevice::DescriptionProperty( const TDesC8& aPropertyName )
+    {
+    TInt index = 0;
+
+    while ( index < iProperties.Count() )
+        {
+        CUpnpDescriptionProperty* var = iProperties[index];
+
+        if ( aPropertyName.Compare( var->Name() ) == KErrNone )
+            {
+            return var->Value();
+            }
+
+        index++;
+        }
+
+    return KNullDesC8();
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::ServiceId
+// Return service ID.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpDevice::ServiceId( const TDesC8 &aServiceType )
+    {
+    //return Content( KServiceId(), aServiceType );
+    for( TInt i(0); i < iServiceTypes->Count(); i++)
+        {
+        TInt pos =(*iServiceTypes)[i].Find( aServiceType );
+        if( pos != KErrNotFound )
+        return TPtrC8( ( *iServicesId )[i] );
+
+        }
+
+    return TPtrC8( (TUint8*)"", 0);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::ServiceDescriptionUrl
+// Return service description URL.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpDevice::ServiceDescriptionUrl( const TDesC8 &aServiceType )
+    {
+
+    for (TInt i=0;i<iServiceList.Count();i++)
+        {
+        if (!iServiceList[i]->ServiceType().Compare(aServiceType))
+            {
+            return iServiceList[i]->ServiceDescriptionUrl();
+            }
+        }
+    return TPtrC8( (TUint8*)"", 0 );;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::ServiceList
+// Return service list.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RPointerArray<CUpnpService>& CUpnpDevice::ServiceList()
+    {
+    return iServiceList;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DeviceList
+// Return service list.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RPointerArray<CUpnpDevice>& CUpnpDevice::DeviceList()
+    {
+    return iDeviceList;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DeviceList
+// Return service list.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::GetAllDevices( RPointerArray<CUpnpDevice>& aDevices )
+    {
+
+    for (TInt i = 0; i < iDeviceList.Count(); i++ )
+        {
+        aDevices.Append( iDeviceList[i] );
+        iDeviceList[i]->GetAllDevices(aDevices);
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::AttachService
+// Attach to service.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::AttachServiceL( CUpnpService *aService )
+    {
+    if ( aService )
+        {
+        if ( !aService->IsAdded() )
+            {
+            TInt servCount = aService->Device().ServiceList().Count();
+            CUpnpService* service= NULL;
+            TInt i(0);
+
+            do
+                {
+                service = aService->Device().ServiceList()[i];
+                i++;
+                } while ( service->IsAdded() );
+
+            aService->SetServiceTypeL( service->ServiceType() );
+            aService->SetPathL( service->Path() );
+
+            aService->SetControlUrl( ConcatWithUrlBaseL( service->ControlUrl() ) );
+            aService->SetSubscriptionUrl( ConcatWithUrlBaseL( service->SubscriptionUrl() ) );
+            aService->SetServiceDescriptionUrl( service->ServiceDescriptionUrl().AllocL() );
+
+            ServiceList().Remove( i-1 );
+            ServiceList().Insert( aService, i-1 );
+            delete service;
+            }
+
+        aService->Added();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DetachService
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::DetachService( CUpnpService *aService )
+    {
+    for ( TInt i = ServiceList().Count() - 1; i >= 0; --i )
+        {
+        if ( ServiceList()[ i ] == aService )
+            {
+            ServiceList().Remove( i );
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::WaitServiceDescriptionL
+// Wait service description.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::WaitServiceDescriptionL( TInt aSessionId )
+    {
+    User::LeaveIfError( iServiceDescriptionSessionIds.Append( aSessionId ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::WaitServiceDescriptionCount
+// Wait service description count.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpDevice::WaitServiceDescriptionCount()
+    {
+    return iServiceDescriptionSessionIds.Count();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::WaitServiceDescriptionSessionId
+// Wait service description session ID.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpDevice::WaitServiceDescriptionSessionId(TInt aIndex)
+    {
+    if(iServiceDescriptionSessionIds.Count()> aIndex)
+        {
+        return iServiceDescriptionSessionIds[aIndex];
+        }
+    return KErrGeneral;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::WaitServiceDescriptionRemoveSessionId
+// Wait service description remove session ID.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::WaitServiceDescriptionRemoveSessionId( TInt aIndex )
+    {
+    if(iServiceDescriptionSessionIds.Count()> aIndex)
+        {
+        iServiceDescriptionSessionIds.Remove(aIndex);
+        iServiceDescriptionSessionIds.Compress();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::AddServiceL
+// Add service.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDevice::TServiceAdd CUpnpDevice::AddServiceL(
+        TInt aSessionId,
+        CUpnpService* aService )
+    {
+    TInt idx = iServiceDescriptionSessionIds.Find( aSessionId );
+    if ( idx != KErrNotFound )
+        { // received Service Description for service of this device
+        iServiceDescriptionSessionIds[idx] = KErrNotFound;
+
+        AttachServiceL(aService);
+
+        TInt count = iServiceDescriptionSessionIds.Count();
+        TInt i;
+        for ( i = 0; i < count && iServiceDescriptionSessionIds[i] == KErrNotFound; i++ )
+            {
+            }
+
+        // We have retrieved all services only when i == iServices.Count().
+        //      is there some reason why this was ( i == count )
+        if ( i == iServiceList.Count() ) 
+
+            { // All Service Descriptions for this device arrived  
+            iServiceDescriptionSessionIds.Reset();
+            iServiceDescriptionReceiveState = EAllServicesAdded;
+            return EAllServicesAdded;
+            }
+        else
+            {
+            return EServiceAdded;
+            }
+        }
+    return ENotServiceAdded;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::WaitIconL
+// Wait icon.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::WaitIconL( TInt aSessionId )
+    {
+    User::LeaveIfError( iIconSessionIds.Append( aSessionId ) );
+    iIconReceiveState = ENotIconAdded;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::AddIcon
+// Add icon.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDevice::TIconAdd CUpnpDevice::AddIcon( TInt aSessionId )
+    {
+    TInt idx = iIconSessionIds.Find( aSessionId );
+    if ( idx != KErrNotFound )
+        { // received Icon Description for service of this device
+        iIconSessionIds[idx] = -1;
+
+        TInt count = iIconSessionIds.Count();
+        TInt i;
+        for (i = 0; i < count && iIconSessionIds[i] == -1; i++ )
+            {
+            }
+
+        if ( i == count ) 
+
+            { // All Icon Descriptions for this device arrived 
+            iIconSessionIds.Reset();
+            iIconReceiveState = EAllIconsAdded;
+            return EAllIconsAdded;
+            }
+        else
+            {
+            return EIconAdded;
+            }
+        }
+    return ENotIconAdded;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::Address
+// Return IP address.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr CUpnpDevice::Address()
+    {
+    return iAddress;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetAddress
+// Set IP address.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::SetAddress( const TInetAddr& aAddr )
+    {
+    iAddress = aAddr;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::Icons
+// Return iIcons.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RPointerArray<CUpnpIcon>& CUpnpDevice::Icons()
+    {
+    return iIcons;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::Local
+// Return iLocal.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDevice::Local() const
+    {
+    return iNetworkType == ELocalDevice;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetLocal
+// Set local.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::SetLocal( TBool aLocal )
+    {
+    if(aLocal)
+        {
+        iNetworkType = ELocalDevice;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::Local
+// Return iLocal.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDevice::Remote() const
+    {
+    return iNetworkType == ERemoteDevice;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::DeviceNetwork
+// Get device network type.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDevice::TUpnpDeviceNetwork CUpnpDevice::DeviceNetwork() const
+    {
+    return iNetworkType;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetDeviceNetwork
+// Set device network type.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::SetDeviceNetwork( CUpnpDevice::TUpnpDeviceNetwork aNetworkType )
+    {
+    iNetworkType = aNetworkType;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::RemoveIpAddress
+// Removes IP address in front of the url leaving only path to file.
+//  (12.34.56.78/folder/file.ext -> /folder/file )
+// -----------------------------------------------------------------------------
+//
+TPtrC8 CUpnpDevice::RemoveIpAddress( const TDesC8 &aAddress )
+    {
+    if ( aAddress.Length() > KHttp().Length() )
+        {
+        if ( aAddress.Left( KHttp().Length() ) == KHttp() )
+            {
+            TPtrC8 newContent = aAddress.Mid( KHttp().Length() );
+
+            TInt slashIndex = newContent.Find( UpnpString::KSlash() );
+
+            if ( slashIndex != KErrNotFound )
+                {
+                return newContent.Mid( slashIndex );
+                }
+            }
+        }
+    return TPtrC8( aAddress );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::ChangeIconSessionId
+// This function is used for removing old icon request session id from list
+// and adding a new one.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpDevice::ChangeIconSessionIdL( const TInt aOldSessionId,
+    const TInt aNewSessionId )
+    {
+
+    // remove old sessionid from list
+    TInt idx = iIconSessionIds.Find( aOldSessionId );
+    if ( idx != KErrNotFound )
+        {
+        iIconSessionIds.Remove( idx );
+        }
+
+    // add new to list
+    User::LeaveIfError( iIconSessionIds.Append( aNewSessionId ) );
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::CheckIconSessionIdExist
+// Checking if given session id is listed in this device's iconSessionId list.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpDevice::CheckIconSessionIdExist( const TInt aSessionId )
+    {
+    return iIconSessionIds.Find( aSessionId );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::GetUrlBase
+// Return URLBase content.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpDevice::UrlBase()
+    {
+    if( iUrlBase )
+        {
+        return iUrlBase->Des();
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::PresentationUrl
+// Return presentation URL.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpDevice::PresentationUrl()
+    {
+    TInt index = 0;
+
+    while ( index < iProperties.Count() )
+        {
+        CUpnpDescriptionProperty* var = iProperties[index];
+
+        if ( KPresentationUrl().Compare( var->Name() ) == KErrNone )
+            {
+            return var->Value();
+            }
+
+        index++;
+        }
+
+    return KNullDesC8();//return Content( KPresentationUrl() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::PresentationUrl
+// Return presentation URL.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::SetUrlBaseL(const TDesC8& aUrlBase)
+    {
+    if( iUrlBase )
+        {
+        delete iUrlBase;
+        iUrlBase = NULL;
+        }
+    iUrlBase = aUrlBase.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::ConcatWithUrlBase
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* CUpnpDevice::ConcatWithUrlBaseL(const TDesC8& aUrl)
+    {
+    TPtrC8 baseUrl( UrlBase() );
+
+    if( baseUrl.Length() == 0 ||
+            aUrl.Length() == 0 ||
+            aUrl.Find( KHttp ) == 0 ||
+            ( aUrl[0] == KSlash8()[0] && !( baseUrl.Find( KHttp ) == 0 ) ) )
+
+        {
+        return aUrl.AllocL();
+        }
+
+    HBufC8* result( NULL );
+    TBool slashInBase( baseUrl[baseUrl.Length() - 1] == KSlash8()[0] );
+    TBool slashInUrl( aUrl[0] == KSlash8()[0] );
+    TInt length( 0 );
+
+    if( slashInBase && slashInUrl )
+        {
+        length = baseUrl.Length() + aUrl.Length() - 1;
+        result = HBufC8::NewL( length );
+        TPtr8 resultPtr( result->Des() );
+        resultPtr.Append( baseUrl.Left( baseUrl.Length() - 1 ));
+        }
+    else if( slashInBase != slashInUrl )
+        {
+        length = baseUrl.Length() + aUrl.Length();
+        result = HBufC8::NewL( length );
+        TPtr8 resultPtr( result->Des() );
+        resultPtr.Append( baseUrl );
+        }
+    else
+        {
+        length = baseUrl.Length() + aUrl.Length() + 1;
+        result = HBufC8::NewL( length );
+        TPtr8 resultPtr( result->Des() );
+        resultPtr.Append( baseUrl );
+        resultPtr.Append( '/' );
+        }
+
+    result->Des().Append( aUrl );
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetTypeL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::SetTypeL( const TDesC8& aType )
+    {
+    HBufC8* tmp = aType.AllocL();
+    delete iDeviceType;
+    iDeviceType = tmp;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::AddDevicePropertyL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::AddDevicePropertyL(
+    CUpnpDescriptionProperty* aDeviceProperty )
+    {
+    iProperties.AppendL( aDeviceProperty );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::SetRootDevice
+// -----------------------------------------------------------------------------
+//
+void CUpnpDevice::SetRootDevice( TBool aIsRoot )
+    {
+    iIsRootDevice = aIsRoot;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::GetProperty
+// Get information from device description.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtrC8 CUpnpDevice::GetProperty(const TDesC8& aProperty)
+    {
+    TInt index = 0;
+
+    while ( index < iProperties.Count() )
+        {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        if ( aProperty.Compare( var->Name() ) == KErrNone )
+            {
+            return var->Value();
+            }
+
+        index++;
+        }
+
+    return KNullDesC8();
+    //return Content( aProperty );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::AddIconL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDevice::AddIconL( CUpnpIcon* aIcon)
+    {
+    if( aIcon )
+    iIcons.AppendL( aIcon);
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::ServiceIdL
+// Get information about service IDs.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CDesC8Array& CUpnpDevice::ServiceIdL()
+    {
+    if ( !iServicesId )
+        {
+        iServicesId = new (ELeave) CDesC8ArrayFlat( 2 );
+        }
+    return *iServicesId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::IsEmbeddDevice
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDevice::IsEmbeddDevice()
+    {
+    return !(iIsRootDevice);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDevice::CloneL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDevice* CUpnpDevice::CloneL()
+    {
+    CUpnpDevice* device = new (ELeave) CUpnpDevice();
+    CleanupStack::PushL( device );
+    Init();
+    if(!this->iUUID || !this->iDeviceType || !this->iDescriptionURL)
+        {
+        CleanupStack::PopAndDestroy(device);
+        User::Leave(KErrGeneral);
+        }
+
+    device->SetUuidL( *this->iUUID );
+    device->SetTypeL( *this->iDeviceType);
+    device->SetDescriptionUrlL( *this->iDescriptionURL );
+    device->SetDeviceNetwork( this->iNetworkType );
+    device->SetAddress( this->iAddress );
+    device->SetAlive( this->iAlive );
+    device->SetExpired( this->iExpired );
+
+    CleanupStack::Pop( device );
+    return device;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdevicecontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,331 @@
+/** @file
+* 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 the CUpnpDeviceContentHandler class
+ *
+*/
+
+
+#include "upnpdevicecontenthandler.h"
+#include "upnpdevice.h"
+#include "upnpdeviceimplementation.h"
+#include "upnpsilentdeviceimplementation.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnprootcontenthandler.h"
+#include "upnpdeviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::NewL
+// Two-phased constructor that will parse CUpnpDevice object. If aResultDevice 
+// is NULL the result object will be created during the parsing, and will be 
+// owned by this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDevice object
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler* CUpnpDeviceContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpDevice* aResultDevice )
+    {
+    CUpnpDeviceContentHandler* deviceContentHandler = 
+        CUpnpDeviceContentHandler::NewLC( aController, aResultDevice );
+    CleanupStack::Pop( deviceContentHandler );
+    return deviceContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::NewLC
+// Two-phased constructor that will parse CUpnpDevice object. If aResultDevice 
+// is NULL the result object will be created during the parsing, and will be 
+// owned by this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDevice object.
+// Leaves the object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler* CUpnpDeviceContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpDevice* aResultDevice )
+    {
+    CUpnpDeviceContentHandler* deviceContentHandler = 
+        new (ELeave) CUpnpDeviceContentHandler( aController, aResultDevice );
+    CleanupStack::PushL( deviceContentHandler );
+    return deviceContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::NewL
+// Two-phased constructor that will parse CUpnpDeviceImplementation object. If 
+// aResultDeviceImpl is NULL the result object will be created during the parsing, 
+// and will be owned by this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDevice object.
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler* CUpnpDeviceContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    CUpnpDeviceImplementation* aResultDeviceImpl )
+    {
+    CUpnpDeviceContentHandler* deviceContentHandler = 
+        CUpnpDeviceContentHandler::NewLC( aController, aResultDeviceImpl );
+    CleanupStack::Pop( deviceContentHandler );
+    return deviceContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::NewLC
+// Two-phased constructor that will parse CUpnpDeviceImplementation object. If 
+// aResultDeviceImpl is NULL the result object will be created during the parsing, 
+// and will be owned by this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDevice object.
+// Leaves the object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler* CUpnpDeviceContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    CUpnpDeviceImplementation* aResultDeviceImpl )
+    {
+    CUpnpDeviceContentHandler* deviceContentHandler = 
+        new (ELeave) CUpnpDeviceContentHandler( aController, aResultDeviceImpl );
+    CleanupStack::PushL( deviceContentHandler );
+    return deviceContentHandler;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::NewL
+// Two-phased constructor that will parse CUpnpSilentDeviceImplementation object. If 
+// aResultSilentDeviceImpl is NULL the result object will be created during the parsing, 
+// and will be owned by this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDevice object.
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler* CUpnpDeviceContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    CUpnpSilentDeviceImplementation* aResultSilentDeviceImpl )
+    {
+    CUpnpDeviceContentHandler* deviceContentHandler = 
+        CUpnpDeviceContentHandler::NewLC( aController, aResultSilentDeviceImpl );
+    CleanupStack::Pop( deviceContentHandler );
+    return deviceContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::NewLC
+// Two-phased constructor that will parse CUpnpSilentDeviceImplementation object. If 
+// aResultDeviceImpl is NULL the result object will be created during the parsing, 
+// and will be owned by this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDevice object.
+// Leaves the object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler* CUpnpDeviceContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    CUpnpSilentDeviceImplementation* aResultSilentDeviceImpl )
+    {
+    CUpnpDeviceContentHandler* deviceContentHandler = 
+        new (ELeave) CUpnpDeviceContentHandler( aController, aResultSilentDeviceImpl );
+    CleanupStack::PushL( deviceContentHandler );
+    return deviceContentHandler;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::~CUpnpDeviceContentHandler
+// Destructor of CUpnpDeviceContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler::~CUpnpDeviceContentHandler()
+    {
+    if ( iIsDeviceOwned )
+        {
+        ASSERT( ( EDevice == iParseType && NULL == iResultDeviceImpl && NULL == iResultSilentDeviceImpl ) ||
+                ( EDeviceImpl == iParseType && NULL == iResultDevice && NULL == iResultSilentDeviceImpl ) ||  
+               ( ESilentDeviceImpl == iParseType && NULL == iResultDevice && NULL == iResultDeviceImpl ) );
+        //check if object is in legal state (class invariants)
+        delete iResultDevice;
+        delete iResultDeviceImpl;
+        delete iResultSilentDeviceImpl;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::CUpnpDeviceContentHandler
+// Constructor that will parse CUpnpDevice object. If aResultDevice is NULL
+// the result object will be created during the parsing, and will be owned by
+// this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDevice object
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler::CUpnpDeviceContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpDevice* aResultDevice ) :
+    CUpnpContentHandler( aController ), iResultDevice( aResultDevice ),
+            iIsDeviceOwned( NULL == aResultDevice), iParseType( EDevice )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::CUpnpDeviceContentHandler
+// Constructor that will parse CUpnpDeviceImplementation object. 
+// If aResultDeviceImpl is NULL the result object will be created during the 
+// parsing, and will be owned by this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDeviceImpl object
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler::CUpnpDeviceContentHandler(
+    CUpnpContentHandlersController& aController,
+    CUpnpDeviceImplementation* aResultDeviceImpl ) :
+    CUpnpContentHandler( aController ), iResultDeviceImpl( aResultDeviceImpl ),
+            iIsDeviceOwned( NULL == aResultDeviceImpl),
+            iParseType( EDeviceImpl )
+    {
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::CUpnpDeviceContentHandler
+// Constructor that will parse CUpnpSilentDeviceImplementation object. 
+// If aResultSilentDeviceImpl is NULL the result object will be created during the 
+// parsing, and will be owned by this CUpnpDeviceContentHandler.
+// Otherwise result will be parsed to existing aResultDeviceImpl object
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceContentHandler::CUpnpDeviceContentHandler(
+    CUpnpContentHandlersController& aController,
+    CUpnpSilentDeviceImplementation* aResultSilentDeviceImpl ) :
+    CUpnpContentHandler( aController ), iResultSilentDeviceImpl( aResultSilentDeviceImpl ),
+            iIsDeviceOwned( NULL == aResultSilentDeviceImpl ),
+            iParseType( ESilentDeviceImpl )
+    {
+    }    
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceContentHandler::OnStartElementL( const RTagInfo& aElement,
+    const RAttributeArray& /*aAttributes*/)
+    {
+    if ( aElement.LocalName().DesC().Compare( KUpnpDeviceRoot )==0 )
+        {
+        CUpnpRootContentHandler* rootCH = NULL;
+        if ( iIsDeviceOwned )
+            {
+            switch ( iParseType )
+                {
+                case EDeviceImpl:
+                    delete iResultDeviceImpl;
+                    iResultDeviceImpl = NULL;
+                    iResultDeviceImpl = new (ELeave) CUpnpDeviceImplementation();
+                    break;
+                case ESilentDeviceImpl:
+                    delete iResultSilentDeviceImpl;
+                    iResultSilentDeviceImpl = NULL;
+                    iResultSilentDeviceImpl = new (ELeave) CUpnpSilentDeviceImplementation();
+                    break;
+                case EDevice:
+                    delete iResultDevice;
+                    iResultDevice = NULL;
+                    iResultDevice = new (ELeave) CUpnpDevice();
+                    break;
+                default:
+                    _LIT( KPanicString, "CUpnpDeviceContentHandler::OnStartElementL" );
+                    User::Panic( KPanicString, 1 );  
+                }
+            }
+        if ( iParseType == EDeviceImpl )
+            {
+            rootCH = CUpnpRootContentHandler::NewL( iController,
+                *iResultDeviceImpl, EDeviceImpl );
+            }
+        else if ( iParseType == ESilentDeviceImpl )    
+            {
+            rootCH = CUpnpRootContentHandler::NewL( iController,
+                *iResultSilentDeviceImpl, ESilentDeviceImpl );
+            }
+        else
+            {
+            rootCH = CUpnpRootContentHandler::NewL( iController,
+                *iResultDevice, EDevice );
+            }
+        iController.SetCurrentContentHandlerL( rootCH );
+        }
+    else
+        {
+        User::Leave( KErrArgument ); //wrong root node
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceContentHandler::OnEndElementL( const RTagInfo& /*aElement*/)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceContentHandler::OnContentL( const TDesC8& /*aBytes*/)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::GetResultDevice
+// Returns parsed CUpnpDevice object, and pass ownership to the caller.
+// One shouldn't call this method if CUpnpDeviceContentHandler doesn't have
+// ownership CUpnpDevice object.
+// @see GetResultDevice( CUpnpDeviceImplementation*& aResultDeviceImpl )
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceContentHandler::GetResultDevice( CUpnpDevice*& aResultDevice )
+    {
+    ASSERT( iIsDeviceOwned && iParseType==EDevice );
+    aResultDevice = iResultDevice;
+    iIsDeviceOwned = EFalse;
+    iResultDevice = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::GetResultDevice
+// Returns parsed CUpnpDeviceImplementation object, and pass ownership to the caller.
+// One shouldn't call this method if CUpnpDeviceContentHandler doesn't have
+// ownership CUpnpDeviceImplementation object.
+// @see GetResultDevice( CUpnpDevice*& aResultDeviceImpl )
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceContentHandler::GetResultDevice(
+    CUpnpDeviceImplementation*& aResultDeviceImpl )
+    {
+    ASSERT( iIsDeviceOwned && iParseType==EDeviceImpl );
+    aResultDeviceImpl = iResultDeviceImpl;
+    iIsDeviceOwned = EFalse;
+    iResultDeviceImpl = NULL;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceContentHandler::GetResultDevice
+// Returns parsed CUpnpSilentDeviceImplementation object, and pass ownership to the caller.
+// One shouldn't call this method if CUpnpDeviceContentHandler doesn't have
+// ownership CUpnpSilentDeviceImplementation object.
+// @see GetResultDevice( CUpnpDevice*& aResultSilentDeviceImpl )
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceContentHandler::GetResultDevice(
+    CUpnpSilentDeviceImplementation*& aResultSilentDeviceImpl )
+    {
+    ASSERT( iIsDeviceOwned && iParseType==ESilentDeviceImpl );
+    aResultSilentDeviceImpl = iResultSilentDeviceImpl;
+    iIsDeviceOwned = EFalse;
+    iResultSilentDeviceImpl = NULL;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdevicedescription.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,48 @@
+/** @file
+* 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:  Defines the CUpnpDeviceDescription class
+*
+*/
+
+
+#include "upnpdevicedescription.h"
+
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceDescription::~CUpnpDeviceDescription
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceDescription::~CUpnpDeviceDescription()
+{
+	
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceDescription::CUpnpDeviceDescription
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceDescription::CUpnpDeviceDescription()
+{
+	
+}
+
+EXPORT_C void CUpnpDeviceDescription::SetDescriptionUrlL( const TDesC8& aDescriptionUrl)
+{
+    HBufC8* tmp = aDescriptionUrl.AllocL();
+    delete iDescriptionURL;
+    iDescriptionURL = tmp;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdevicedescriptionrequest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,67 @@
+/** @file
+* Copyright (c) 2005-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:  Declaration of MUpnpSubscriberLibraryObserver
+*
+*/
+
+#include "upnpdevicedescriptionrequest.h"
+
+CUpnpDeviceDescriptionRequest::CUpnpDeviceDescriptionRequest( const TInetAddr& aInetAddress ):
+    iAddress( aInetAddress )
+    {    
+    }
+
+CUpnpDeviceDescriptionRequest* CUpnpDeviceDescriptionRequest::NewL( const TDesC8& aUri,
+                                                                   const TInetAddr& aInetAddress )
+    {
+    CUpnpDeviceDescriptionRequest* self = CUpnpDeviceDescriptionRequest::NewLC( aUri,
+                                                                                aInetAddress );
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+CUpnpDeviceDescriptionRequest* CUpnpDeviceDescriptionRequest::NewLC( const TDesC8& aUri,
+                                                                  const TInetAddr& aInetAddress )
+    {
+    CUpnpDeviceDescriptionRequest* self = new (ELeave) CUpnpDeviceDescriptionRequest( 
+                                                                        aInetAddress );
+    CleanupStack::PushL(self);
+    self->ConstructL( aUri );
+    return self;
+    }
+
+void CUpnpDeviceDescriptionRequest::ConstructL( const TDesC8& aUri )
+    {
+    iUri.CreateL( aUri );
+    }
+
+
+CUpnpDeviceDescriptionRequest::~CUpnpDeviceDescriptionRequest()
+    {
+    iUri.Close();
+    }
+
+
+EXPORT_C void CUpnpDeviceDescriptionRequest::InetAddress( TInetAddr& aInetAddress )
+    {
+    aInetAddress = iAddress;
+    }
+
+EXPORT_C TPtrC8 CUpnpDeviceDescriptionRequest::Uri()
+    {
+    return iUri;
+    }
+   
+
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdevicedescriptionstore.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,504 @@
+/** @file
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies  this distribution, and is available 
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  UPnP Device Description Store
+*
+*/
+
+
+#include <upnpdominterface.h>
+
+#include <upnpdevicedescriptionstore.h>
+#include <upnpcommonupnplits.h>
+#include "upnpfileutils.h"
+#include "upnpicon.h"
+#include "upnpdevice.h"
+#include "upnpcontenthandlerscontroller.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::NewL()
+// Two phased constructor
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceDescriptionStore *CUpnpDeviceDescriptionStore::NewL(
+    const TDesC& aFilename )
+    {
+    CUpnpDeviceDescriptionStore* self = CUpnpDeviceDescriptionStore::NewLC( aFilename );    
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::NewLC()
+// Two phased constructor, leaves the object onto the CleanupStack
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceDescriptionStore* CUpnpDeviceDescriptionStore::NewLC(
+    const TDesC& aFilename )
+    {
+    CUpnpDeviceDescriptionStore* self = new (ELeave) CUpnpDeviceDescriptionStore();
+    CleanupStack::PushL( self );
+    self->ConstructL( aFilename );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::~CUpnpDeviceDescriptionStore()
+// Destructor of CUpnpDeviceDescriptionStore class
+// ---------------------------------------------------------------------------
+//
+CUpnpDeviceDescriptionStore::~CUpnpDeviceDescriptionStore()
+    {
+    iFileName.Close();
+    iDescription.Close();
+    iParser.Close();
+    iDOMImpl.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::DescriptionFile()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TDesC& CUpnpDeviceDescriptionStore::DescriptionFile()
+    {
+    return iFileName;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::SetPropertyL()
+// Sets some property value in an emmbedded device.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceDescriptionStore::SetPropertyL( const TDesC8& aName,
+    const TDesC8& aValue, const TDesC8& aUuid )
+    {
+    TXmlEngElement root = iDescription.DocumentElement();
+    TXmlEngElement local;
+    TXmlEngElement property;
+    RArray<TXmlEngElement> elementList;
+
+    TRAPD( error, UpnpDomInterface::GetElementListL( root, elementList, KUdn ) );
+
+    for ( TInt i( 0); i < elementList.Count() ; i++ )
+        {
+        if ( !elementList[ i ].Value().Compare( aUuid ) )
+            {
+            elementList.Close();
+
+            TRAP( error, UpnpDomInterface::GetElementListL( root,
+                elementList, aName ) );
+
+            if ( elementList.Count() && i < elementList.Count() )
+                {
+                property = elementList[ i ];
+                elementList.Close();
+                if ( !error )
+                    {
+                    property.SetValueL( aValue );
+                    return;
+                    }
+                }
+            else
+                {
+                User::Leave( KErrNotFound );
+                }
+            }
+        }
+
+    elementList.Close();
+    User::Leave( KErrNotFound );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::RemoveTagL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceDescriptionStore::RemoveTagL( const TDesC8& aTagName )
+    {
+    TXmlEngElement root = iDescription.DocumentElement();
+    TXmlEngElement element;
+    TBool elementFound = EFalse;
+
+    elementFound = UpnpDomInterface::GetElementL( root, element, aTagName );
+    if ( elementFound )
+        {
+        UpnpDomInterface::DeleteElement( element );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::AddTagL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TXmlEngElement CUpnpDeviceDescriptionStore::AddTagL( const TDesC8& aTagName )
+    {
+    TXmlEngElement root = iDescription.DocumentElement();
+    TXmlEngElement level1;
+    TXmlEngElement level2;
+    TBool elementFound = EFalse;
+
+    elementFound = UpnpDomInterface::GetElementL( root, level1, KDevice );
+    if ( elementFound )
+        {
+        elementFound = UpnpDomInterface::GetElementL( level1, level2,
+            aTagName );
+        if ( !elementFound )
+            {
+            level2 = level1.AddNewElementL( aTagName );
+            }
+        }
+    return level2;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::AddIconL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceDescriptionStore::AddIconL( const CUpnpIcon& aIcon )
+    {
+    TXmlEngElement root = iDescription.DocumentElement();
+    TXmlEngElement propertyref;
+    TXmlEngElement property;
+    TXmlEngElement propertyiconlist;
+    TXmlEngElement url;
+    RArray<TXmlEngElement> IconList;
+
+    TRAPD( error, UpnpDomInterface::GetElementL( root, property, KDevice ) );
+    if ( !error && property.NotNull() )
+        {
+        TRAPD( error, UpnpDomInterface::GetElementL( property,
+            propertyiconlist, KIconList ) );
+        if ( !error && propertyiconlist.NotNull() )
+            {
+            TRAPD( error, UpnpDomInterface::GetElementListL(
+                propertyiconlist, IconList, KIcon ) );
+            if ( !error && IconList.Count() != 0 )
+                {
+                AddIconElementL( propertyiconlist, aIcon.MimeType(),
+                    aIcon.WidthTPtrC8(), aIcon.HeightTPtrC8(),
+                    aIcon.DepthTPtrC8(), aIcon.Url() );
+                }
+            User::LeaveIfError( error );
+            }
+        else
+            {
+            propertyref = property.AddNewElementL( KIconList );
+            AddIconElementL( propertyref, aIcon.MimeType(),
+                aIcon.WidthTPtrC8(), aIcon.HeightTPtrC8(),
+                aIcon.DepthTPtrC8(), aIcon.Url() );
+            }
+        User::LeaveIfError( error );
+        }
+    User::LeaveIfError( error );
+
+    IconList.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::UpdateIconL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceDescriptionStore::UpdateIconL( const CUpnpIcon& aIcon )
+    {
+    TXmlEngElement propertyiconlist = GetIconlistElementL();
+    TXmlEngElement url;
+    RArray<TXmlEngElement> IconList;
+
+    TRAPD( error, UpnpDomInterface::GetElementListL( propertyiconlist,
+        IconList, KIcon ) );
+    if ( !error && IconList.Count() != 0 )
+        {
+        for ( TInt i=0; i<IconList.Count(); i++ )
+            {
+            TRAPD( error, UpnpDomInterface::GetElementL( IconList[ i ], url,
+                KUrl ) );
+            if ( !error && url.NotNull() )
+                {
+                if ( !url.Value().Compare( aIcon.Url() ) )
+                    {
+                    IconList[i].Remove();
+                    AddIconElementL( propertyiconlist, aIcon.MimeType(),
+                        aIcon.WidthTPtrC8(), aIcon.HeightTPtrC8(),
+                        aIcon.DepthTPtrC8(), aIcon.Url() );
+                    }
+                }
+            }
+        User::LeaveIfError( error );
+        }
+    IconList.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::RemoveIconL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceDescriptionStore::RemoveIconL( const TDesC8& aUrl )
+    {
+    TXmlEngElement propertyiconlist = GetIconlistElementL();
+    TXmlEngElement url;
+    RArray<TXmlEngElement> IconList;
+
+    TRAPD( error, UpnpDomInterface::GetElementListL( propertyiconlist,
+        IconList, KIcon ) );
+    if ( !error && IconList.Count()!=0 )
+        {
+        for ( TInt i=0; i<IconList.Count(); i++ )
+            {
+            TRAPD( error, UpnpDomInterface::GetElementL( IconList[ i ], url,
+                KUrl ) );
+            if ( !error && url.NotNull() )
+                {
+                if ( !url.Value().Compare( aUrl ) )
+                    {
+                    if ( IconList.Count() == 1 )
+                        {
+                        propertyiconlist.Remove();
+                        }
+                    else
+                        {
+                        IconList[i].Remove();
+                        }
+                    }
+                }
+            }
+        User::LeaveIfError( error );
+        }
+    IconList.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::RemoveIconsL()
+// ---------------------------------------------------------------------------
+//  
+EXPORT_C void CUpnpDeviceDescriptionStore::RemoveIconsL()
+    {
+    TXmlEngElement propertyiconlist = GetIconlistElementL();
+    if ( propertyiconlist.NotNull() )
+        {
+        propertyiconlist.Remove();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::GetIconlistElementL()
+// Gets iconlist element
+// ---------------------------------------------------------------------------
+//    
+EXPORT_C TXmlEngElement CUpnpDeviceDescriptionStore::GetIconlistElementL()
+    {
+    TXmlEngElement root = iDescription.DocumentElement();
+    TXmlEngElement property;
+    TXmlEngElement propertyiconlist;
+
+    TRAPD( error, UpnpDomInterface::GetElementL( root, property, KDevice ) );
+    if ( !error && property.NotNull() )
+        {
+        TRAPD( error, UpnpDomInterface::GetElementL( property,
+            propertyiconlist, KIconList ) );
+        if ( !error && propertyiconlist.NotNull() )
+            {
+            return propertyiconlist;
+            }
+        User::LeaveIfError( error );
+        }
+    User::LeaveIfError( error );
+
+    return NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::Property()
+// Gets some property value from an embedded device.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC8 CUpnpDeviceDescriptionStore::Property( const TDesC8& aName,
+    const TDesC8& aUuid )
+    {
+    TXmlEngElement root = iDescription.DocumentElement();
+    TXmlEngElement local;
+    TXmlEngElement property;
+    RArray<TXmlEngElement> elementList;
+    TPtrC8 urn = KNullDesC8();
+
+    TRAPD( error, UpnpDomInterface::GetElementListL( root, elementList, KUdn ) );
+
+    for ( TInt i( 0); i < elementList.Count() ; i++ )
+        {
+        if ( !elementList[ i ].Value().Compare( aUuid ) )
+            {
+            elementList.Close();
+
+            TRAP( error, UpnpDomInterface::GetElementListL( root,
+                elementList, aName ) );
+
+            if ( elementList.Count() )
+                {
+                property = elementList[ i ];
+
+                if ( !error && property.Value().Length() )
+                    {
+                    urn.Set( property.Value() );
+                    break;
+                    }
+                }
+            }
+        }
+    elementList.Close();
+    return urn;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::SetPropertyL()
+// Sets some property value in a root device.
+// ---------------------------------------------------------------------------
+//   
+EXPORT_C void CUpnpDeviceDescriptionStore::SetPropertyL( const TDesC8& aName,
+    const TDesC8& aValue )
+    {
+    TXmlEngElement root = iDescription.DocumentElement();
+    TXmlEngElement level1;
+
+    UpnpDomInterface::GetElementL( root, level1, aName );
+
+    if ( level1.NotNull() )
+        {
+        level1.SetValueL( aValue );
+        }
+
+    else if ( !level1.NotNull() )
+        {
+        level1 = AddTagL( aName );
+
+        if ( level1.NotNull() )
+            {
+            level1.SetValueL( aValue );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::Property()
+// Gets some property value from a root device.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC8 CUpnpDeviceDescriptionStore::Property( const TDesC8& aName )
+    {
+    TXmlEngElement root = iDescription.DocumentElement();
+    TXmlEngElement property;
+    TPtrC8 urn = KNullDesC8();
+
+    TRAPD( error, UpnpDomInterface::GetElementL( root, property, aName ) );
+
+    if ( !error && property.NotNull() && property.Value().Length() )
+        {
+        urn.Set( property.Value() );
+        }
+
+    return urn;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::SaveL()
+// Saves device description file path
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceDescriptionStore::SaveL()
+    {
+    if ( UpnpFileUtil::CheckDiskSpaceShortL( EDriveC, KMinSpaceToWriteDescription ) )
+        {
+        User::Leave( KErrDiskFull );
+        }
+    iDescription.SaveL( iFileName );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::IconListL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RPointerArray< CUpnpIcon > CUpnpDeviceDescriptionStore::IconListL()
+    {
+    RPointerArray< CUpnpIcon > iconList;
+
+    HBufC8* descr = UpnpFileUtil::ReadFileL( iFileName );
+    CleanupStack::PushL( descr );
+    
+    CUpnpContentHandlersController* controller = CUpnpContentHandlersController::NewLC();
+    CUpnpDevice* device = controller->ParseDeviceL( *descr );
+    CleanupStack::PopAndDestroy( controller );
+    CleanupStack::PushL( device );
+
+    for ( TInt i = 0; i < device->Icons().Count(); i++ )
+        {
+        iconList.AppendL( device->Icons()[ i ] );
+        }
+    device->Icons().Reset();
+    
+    CleanupStack::PopAndDestroy( device );
+    CleanupStack::PopAndDestroy( descr );
+    
+    return iconList;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::CUpnpDeviceDescriptionStore()
+// Default C++ constructor
+// ---------------------------------------------------------------------------
+//
+CUpnpDeviceDescriptionStore::CUpnpDeviceDescriptionStore()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::ConstructL()
+// 2nd phase constructor
+// ---------------------------------------------------------------------------
+//
+void CUpnpDeviceDescriptionStore::ConstructL( const TDesC& aFileName )
+    {
+    iFileName.CreateL( aFileName );
+
+    HBufC8* descr = UpnpFileUtil::ReadFileL( aFileName );
+    CleanupStack::PushL( descr );
+
+    iDOMImpl.OpenL();
+    User::LeaveIfError( iParser.Open( iDOMImpl ) );
+    iDescription = iParser.ParseL( *descr );
+    CleanupStack::PopAndDestroy( descr );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpDeviceDescriptionStore::AddIconElementL()
+// Adds icon element
+// ---------------------------------------------------------------------------
+//    
+void CUpnpDeviceDescriptionStore::AddIconElementL(
+    TXmlEngElement& aPropertyIcon, const TDesC8& aMimeType,
+    const TDesC8& aWidth, const TDesC8& aHeight, const TDesC8& aDepth,
+    const TDesC8& aUrl )
+    {
+    TXmlEngElement propertyIcon = aPropertyIcon.AddNewElementL( KIcon );
+    TXmlEngElement propertyref = propertyIcon.AddNewElementL( KMimeType );
+    propertyref.SetTextL( aMimeType );
+    propertyref = propertyIcon.AddNewElementL( KWidth );
+    propertyref.SetTextL( aWidth );
+    propertyref = propertyIcon.AddNewElementL( KHeight );
+    propertyref.SetTextL( aHeight );
+    propertyref = propertyIcon.AddNewElementL( KDepth );
+    propertyref.SetTextL( aDepth );
+    propertyref = propertyIcon.AddNewElementL( KUrl );
+    propertyref.SetTextL( aUrl );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdeviceimplementation.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,169 @@
+/** @file
+* 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:  Defines the CUpnpDeviceImplementation class
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32math.h>
+#include <xmlengdom.h> 
+
+#include <upnpdevicedescriptionstore.h>
+#include "upnpfileutils.h"
+#include "upnpcustomlog.h"
+#include "upnpdeviceimplementation.h"
+#include "upnpdispatcher.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpdevicedescriptionprovider.h"
+
+
+static const TInt KMaxDeviceDescriptionLenght(20480);
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceImplementation* CUpnpDeviceImplementation::NewL( 
+        const TDesC8& aUri, 
+        CUpnpDeviceDescriptionStore& aDescriptionStore,
+        MUpnpDeviceDescriptionProvider& aProvider )
+    {
+    LOGS("CUpnpDevice:: CUpnpDevice::NewL( const TDesC& aFilename, TInt aIapId, TInt aHandle )" );
+
+    HBufC8* descr = UpnpFileUtil::ReadFileL( aDescriptionStore.DescriptionFile() );
+    if ( descr->Length()> KMaxDeviceDescriptionLenght )
+        {
+        delete descr;
+        User::Leave( KErrTooBig );
+        }
+    CleanupStack::PushL( descr );
+
+    CUpnpContentHandlersController* controller = CUpnpContentHandlersController::NewLC();
+
+    CUpnpDeviceImplementation* deviceImpl = controller->ParseDeviceImplL( *descr );
+    CleanupStack::PushL( deviceImpl );
+    deviceImpl->ConstructL( aUri, aDescriptionStore, aProvider );
+    CleanupStack::Pop( deviceImpl );
+
+    CleanupStack::PopAndDestroy( controller );
+    CleanupStack::PopAndDestroy( descr );
+
+    return deviceImpl;
+    }
+           
+CUpnpDeviceImplementation::CUpnpDeviceImplementation()
+    {
+    }
+
+EXPORT_C CUpnpDeviceImplementation::~CUpnpDeviceImplementation()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementation::ConstructL( const TDesC8& aDeviceDescriptioUri,
+                                        CUpnpDeviceDescriptionStore& aDescriptionStore,
+                                        MUpnpDeviceDescriptionProvider& aProvider )
+    {
+    BaseConstructL( aDeviceDescriptioUri, aDescriptionStore, aProvider  );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::StartL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementation::StartL( const TInt aPort )
+    {   
+    StartHttpServerL( aPort );
+    AddLocalDeviceL();
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::StopL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementation::StopL()
+    {
+    StopL( EStopNormal );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::StopL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementation::StopL( TStopMode aMode )
+    {
+    if ( ( aMode == EStopNormal  ) || ( aMode == EStopSilent ) )
+        {
+        StopDeviceL( aMode );
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::StopDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementation::StopDeviceL( TStopMode aMode )
+    {
+    SaveDescriptionStoreL();
+    
+    if( aMode == EStopSilent )
+        {
+        RemoveLocalDeviceL( Uuid(), ETrue );    
+        }
+    else 
+        {
+        RemoveLocalDeviceL( Uuid(), EFalse );    
+        }
+    StopHttpServer();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::AddLocalDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementation::AddLocalDeviceL()
+    {
+    GenerateUdnsL(this);
+    SaveDescriptionStoreL();
+    
+    const TPtrC8 uuid = Uuid();
+    const TPtrC8 device = DeviceType();
+    const TDesC8& url = DescriptionUrl();
+
+    iDispatcher->AddLocalDeviceL( uuid, device, url, ServiceTypesL(), iIsRootDevice );
+
+    delete iPath;
+    iPath = NULL;
+    iPath = DescriptionUrl().AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::RemoveLocalDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementation::RemoveLocalDeviceL( const TDesC8& aUuid, TBool aSilent )
+    {
+    iDispatcher->RemoveLocalDeviceL( aUuid, aSilent );
+    }
+
+// End of File
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdeviceimplementationbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,521 @@
+/** @file
+* 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:  Defines the CUpnpDeviceImplementationBase class
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32math.h>
+#include <xmlengdom.h> 
+
+#include "upnpfileutils.h"
+#include "upnpicon.h"
+#include "upnpdeviceimplementationbase.h"
+#include "upnpcommonstructs.h"
+#include "upnpstring.h"
+#include "upnpdispatcher.h"
+#include "upnpcons.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcustomlog.h"
+#include "upnpserviceimplementation.h"
+#include <upnpdevicedescriptionstore.h>
+#include "upnphttpservertransactionhandler.h"
+
+
+#ifdef _DEBUG
+#define KLogFile _L("UPnPStack.txt")
+#endif
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::BaseConstructL( const TDesC8& aDeviceDescriptioUri,
+                                            CUpnpDeviceDescriptionStore& aDescriptionStore,
+                                            MUpnpDeviceDescriptionProvider& aProvider )
+    {
+    iDescriptionProvider = &aProvider;
+    iDescriptionStore = &aDescriptionStore;
+    
+    iPath = DeviceType().AllocL();
+
+    SetDescriptionUrlL( aDeviceDescriptioUri );
+
+    CreateDispatcherL();
+    RegisterEmbeddedDevices();
+
+    iIsRootDevice = ETrue;
+
+    Init();
+    
+    iServerTransactionHandler = CUpnpHttpServerTransactionHandler::NewL( *this );
+    iDispatcher->SetTransactionCreator( iServerTransactionHandler );    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::RegisterEmbeddedDevices
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::RegisterEmbeddedDevices()
+    {
+    RPointerArray<CUpnpDevice> devices;
+    GetAllDevices(devices);
+    for (TInt i = 0; i < iDeviceList.Count(); i++ )
+    {
+        ((CUpnpDeviceImplementationBase*) iDeviceList[i])->SetDispatcher(iDispatcher);
+    }
+
+    devices.Reset();
+    devices.Close();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::~CUpnpDeviceImplementationBase
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceImplementationBase::~CUpnpDeviceImplementationBase()
+    {
+    for ( TInt i = ServiceList().Count();  i > 0; i-- )
+        {
+        if ( ServiceList()[i-1]->IsComplete() )
+            {
+            ServiceList().Remove( i-1 );
+            }
+        }
+    if ( iIsRootDevice )
+        {
+        delete iDispatcher;
+        }
+    delete iPath;        
+    delete iServerTransactionHandler;    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::CUpnpDeviceImplementationBase
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceImplementationBase::CUpnpDeviceImplementationBase()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::SetDescriptionPropertyL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementationBase::SetDescriptionPropertyL( const TDesC8& aPropertyName, 
+                                                                  const TDesC8& aPropertyValue )
+    {
+    TInt index = 0;
+
+    while ( index < iProperties.Count() )
+        {
+        CUpnpDescriptionProperty* var = iProperties[index];
+
+        if ( aPropertyName.Compare( var->Name() ) == KErrNone )
+            {
+            var->SetValueL( aPropertyValue );
+            iDescriptionStore->SetPropertyL( aPropertyName, aPropertyValue );
+            return;
+            }
+
+        index++;
+        }
+    
+    CUpnpDescriptionProperty* newProperty = CUpnpDescriptionProperty::NewL( aPropertyName,
+                                                                            aPropertyValue );
+    CleanupStack::PushL( newProperty );        
+    iProperties.AppendL( newProperty );
+    CleanupStack::Pop( newProperty );
+    iDescriptionStore->SetPropertyL( aPropertyName, aPropertyValue );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::RemoveDescriptionPropertyL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementationBase::RemoveDescriptionPropertyL( 
+                                                      const TDesC8& aPropertyName )
+    {
+    TInt index = 0;
+
+    while ( index < iProperties.Count() )
+        {
+        if ( aPropertyName.Compare( iProperties[index]->Name() ) == KErrNone )
+            {
+            iDescriptionStore->RemoveTagL( aPropertyName );    
+            delete iProperties[index];
+            iProperties.Remove( index );
+            return;
+            }
+        index++;
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::RemoveIconL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementationBase::RemoveIconL( const TDesC8& aUrl )
+    {    
+    iDescriptionStore->RemoveIconL( aUrl );
+    
+    TInt amount = iIcons.Count();
+    
+    for(TInt i = 0; i < amount; i++)
+        {
+        if(!aUrl.Compare(iIcons[i]->Url()))
+            {
+            delete iIcons[i];
+            iIcons.Remove(i);
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::RemoveIconsL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementationBase::RemoveIconsL()
+    {    
+    iDescriptionStore->RemoveIconsL();
+    TInt amount = iIcons.Count();
+    
+    for(TInt i = amount - 1; i >= 0; i--)
+        {
+        delete iIcons[i];
+        iIcons.Remove(i);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::AddIconL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementationBase::AddIconL( const CUpnpIcon& aIcon )
+    {    
+    iDescriptionStore->AddIconL( aIcon );
+    iIcons.Append( &aIcon );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::UpdateIconL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceImplementationBase::UpdateIconL( const CUpnpIcon& aIcon )
+    {    
+    iDescriptionStore->UpdateIconL( aIcon );
+    TInt amount = iIcons.Count();
+    
+    for(TInt i = 0; i < amount; i++)
+        {
+        if(!aIcon.Url().Compare(iIcons[i]->Url()))
+            {
+            delete iIcons[i];
+            iIcons.Remove(i);
+            iIcons.Insert(&aIcon, i);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::SaveDescriptionStoreL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::SaveDescriptionStoreL()
+    {
+    iDescriptionStore->SaveL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::StartHttpServerL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::StartHttpServerL( const TInt aPort )
+    {
+    if ( iIsRootDevice ) 
+        {
+    	iDispatcher->StartHttpServerL( ETrue , aPort );
+        }   
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::Dispatcher
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcher* CUpnpDeviceImplementationBase::Dispatcher()
+    {
+    return iDispatcher;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::StopHttpServer
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::StopHttpServer()
+    {
+    iDispatcher->StopHttpServer();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::CreateDispatcherL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::CreateDispatcherL()
+    {
+    iDispatcher = CUpnpDispatcher::NewL( NULL );
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpDeviceImplementationBase::GenerateUuidL
+//  Generates Universally Unique Identifier using good algorithm
+//
+//  UUID  =  Universally Unique Identifier
+//  128 bit UUID (HEX)
+//  
+//  01234567   - 0123       - 0123                  - 0123       - 012345678901
+//  <time_low> - <time_mid> - <time_high & version> - 
+//  <clock_seq & reserved><clock_seq_low> - <node> 
+//  8"-"4"-"4"-"4"-"12
+//  (other items were commented in a header).
+// -----------------------------------------------------------------------------
+HBufC8* CUpnpDeviceImplementationBase::GenerateUuidL()
+    {    
+    const TInt smallBlockSize = 4;
+    const TInt largeBlockSize = 8;    
+    
+    //Reserves enough space for the UUID (128bits)
+    HBufC8* uuid = HBufC8::NewLC( UpnpString::KMaxUuidLength );  
+    
+    // setting time
+    TTime timex;
+    timex.UniversalTime();
+    
+    HBufC8* currTime = HBufC8::NewLC( largeBlockSize );
+    
+    TInt timeMaskHi = 0x0FFFFFFF;
+    TInt timeMaskVer = 0x10000000;
+    
+    TInt joinMask = 0x8000;
+    TInt rndTimeMask = 0xBFFF;
+    TInt bitChange = 0x0000FFFF;
+    
+    //Returns a 64bit interpretation of the current time
+    TInt64 timeValue = timex.Int64();
+
+    TInt32 timeValLow = I64LOW(timeValue);
+    TInt32 timeValHi = I64HIGH(timeValue);
+
+    //Joining the Time and Version Elements    
+    timeValHi = timeValHi & timeMaskHi;
+    timeValHi = timeValHi | timeMaskVer;
+    
+    currTime->Des().Format( KMask8, timeValHi );
+    
+    // larger buffer required ... +1
+    HBufC8* timeLow = HBufC8::NewLC( largeBlockSize + 1 );
+    HBufC8* timeMid = HBufC8::NewLC( smallBlockSize + 1 );
+    HBufC8* timeHi  = HBufC8::NewLC( smallBlockSize + 1 );
+    
+    //Dividing Time element to the wanted parts. 
+    timeLow->Des().Format( KMask8, timeValLow );
+    
+    timeMid->Des().Append( currTime->Des().Right(smallBlockSize) );
+    timeHi->Des().Append( currTime->Des().Left(smallBlockSize) );
+    
+    if ( iClockSeq == NULL )
+        {
+        //Clock Sequence creation ( random time plus variant )
+        iClockSeq = HBufC8::NewL( smallBlockSize + 1 );
+        iClockSeq->Des().Zero();
+        
+        TInt64 seed = timex.Int64();
+        TUint32 rndTimeTInt = Math::Rand( seed );
+        rndTimeTInt = rndTimeTInt & bitChange;
+        rndTimeTInt = rndTimeTInt >> 2; 
+        rndTimeTInt = rndTimeTInt | joinMask;
+        rndTimeTInt = rndTimeTInt & rndTimeMask;
+        
+        iClockSeq->Des().Num( (TUint16) rndTimeTInt,EHex );
+        HBufC8* buf = iClockSeq->Des().Right( smallBlockSize ).AllocL();
+        
+        delete iClockSeq;
+        iClockSeq = buf;
+        }
+    else if ( iTimeValue>timeValue )
+        {
+        TInt rndTimeTInt;  
+        if ( UpnpString::StringToInt( iClockSeq->Des(),&rndTimeTInt ) == KErrNone )
+            {
+            rndTimeTInt++;
+            iClockSeq->Des().Num( (TUint16) rndTimeTInt,EHex );
+            HBufC8* buf = iClockSeq->Des().Right(smallBlockSize).AllocL();
+            delete iClockSeq;
+            iClockSeq = buf;
+            }
+        }
+    
+    //reading the NodeAddress. 
+    iTimeValue = timeValue;
+    
+    // setting UUID 
+    uuid->Des().Zero();
+    uuid->Des().Append( KUuid() );
+    uuid->Des().Append( timeLow->Des() );
+    uuid->Des().Append( KLine );
+    uuid->Des().Append( timeMid->Des() );
+    uuid->Des().Append( KLine );
+    uuid->Des().Append( timeHi->Des() );
+    uuid->Des().Append( KLine );
+    uuid->Des().Append( iClockSeq->Des() );
+    uuid->Des().Append( KLine );
+    
+    HBufC8* mac=NULL;
+    TRAPD(err, mac = const_cast<HBufC8*>( iDispatcher->MacAddressL() ));
+    if(!err)
+        {    
+        // Calculate remaining lenght, MAC can be corrupted and too long for Append
+        TInt freeLen = UpnpString::KMaxUuidLength - uuid->Length();
+        // If less free lenght than mac lenght, Append only what fits
+        if ( freeLen < mac->Length() )
+            {
+            uuid->Des().Append( mac->Des().Left( freeLen ) );
+            }
+        // Mac fits, Append all
+        else
+            {
+            uuid->Des().Append( mac->Des() );        
+            }
+        }
+    else
+        {
+        TInt freeLen = UpnpString::KMaxUuidLength - uuid->Length();
+        for(TInt i = 0; i < freeLen; i++)
+            {
+            TUint32 r = Math::Random();
+            const TUint32 KOneHexFromInt32Mask = 0x0000000f;
+            r &= KOneHexFromInt32Mask;
+            TBuf<1> d;
+            d.Num(r,EHex);
+            uuid->Des().Append(d);
+            }
+        }
+    
+    delete mac;
+    mac = NULL;
+    
+    // PopAndDestroy: timeLow, timeMid, timeHi, currTime;
+    CleanupStack::PopAndDestroy( 4 );
+    
+    CleanupStack::Pop( uuid );
+    return uuid;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::GenerateUDNs
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::GenerateUdnsL( CUpnpDeviceImplementationBase* aDevice )
+    {
+    
+    if ( aDevice->Uuid().Length() <= 0 )
+        {
+        HBufC8* udnPtr = aDevice->GenerateUuidL();    
+        CleanupStack::PushL( udnPtr );
+
+        aDevice->iDescriptionStore->SetPropertyL( KUdn, *udnPtr );
+        
+        TPtrC8 uuid(*udnPtr);    
+        if ( !uuid.Find( UpnpSSDP::KUPnPUuid() ) )
+            {
+            uuid.Set( uuid.Mid( UpnpSSDP::KUPnPUuid().Size() ) );         
+            }                                   
+        aDevice->SetUuidL( uuid );
+        CleanupStack::PopAndDestroy( udnPtr );                        
+        }
+              
+     RPointerArray<CUpnpDevice>& devices = aDevice->DeviceList();
+    
+     for ( TInt i(0); i< devices.Count(); i++ )
+        {
+        GenerateUdnsL( (CUpnpDeviceImplementationBase*) devices[i] );
+        }
+    }
+    
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::AttachServiceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::AttachServiceL( CUpnpService *aService )
+    {
+    CUpnpDevice::AttachServiceL( aService );
+    if ( iDispatcher )
+        {
+        ((CUpnpServiceImplementation*) aService)->SetDispatcher( iDispatcher );
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::Address
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr CUpnpDeviceImplementationBase::Address()
+    {
+    iAddress = iDispatcher->HttpServerAddress();
+    return iAddress;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::SetDispatcher
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceImplementationBase::SetDispatcher( CUpnpDispatcher* aDispatcher )
+    {
+    iDispatcher = aDispatcher;    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::DescritptionProvider
+// -----------------------------------------------------------------------------
+//
+MUpnpDeviceDescriptionProvider& CUpnpDeviceImplementationBase::DescritptionProvider()
+    {
+    return *iDescriptionProvider;
+    }
+
+
+EXPORT_C void CUpnpDeviceImplementationBase::StartIPFilteringL()
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    iDispatcher->StartIPFilteringL();
+    #endif
+    }
+    
+EXPORT_C void CUpnpDeviceImplementationBase::StopIPFiltering()
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    iDispatcher->StopIPFiltering();
+    #endif
+    }
+// End of File
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdevicelistcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,142 @@
+/** @file
+* 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 the CUpnpDeviceListContentHandler class
+ *
+*/
+
+
+#include "upnpdevicelistcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpdevicetagcontenthandler.h"
+#include "upnpdevice.h"
+#include "upnpdeviceimplementation.h"
+#include "upnpsilentdeviceimplementation.h"
+#include "upnpdeviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceListContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceListContentHandler* CUpnpDeviceListContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType )
+    {
+    CUpnpDeviceListContentHandler* deviceListContentHandler = 
+        CUpnpDeviceListContentHandler::NewLC( aController, aResultDevice,
+        		                              aParseType );
+    CleanupStack::Pop( deviceListContentHandler );        		                              
+    return deviceListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceListContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceListContentHandler* CUpnpDeviceListContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType )
+    {
+    CUpnpDeviceListContentHandler* deviceListContentHandler = 
+        new (ELeave) CUpnpDeviceListContentHandler( aController, aResultDevice,
+        		aParseType );
+    CleanupStack::PushL( deviceListContentHandler );
+    return deviceListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceListContentHandler::~CUpnpDeviceListContentHandler
+// Destructor of CUpnpDeviceListContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceListContentHandler::~CUpnpDeviceListContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceListContentHandler::CUpnpDeviceListContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceListContentHandler::CUpnpDeviceListContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType ) :
+    CUpnpContentHandler( aController ), iResultDevice( aResultDevice ),
+    iParseType( aParseType )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceListContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceListContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+    {
+    if ( aElement.LocalName().DesC().Compare( KUpnpDevice ) == 0 )
+        {
+        CUpnpDevice* device( NULL );
+        
+        switch ( iParseType )
+            {
+            case EDeviceImpl:
+                device = new (ELeave) CUpnpDeviceImplementation();
+                break;
+            case ESilentDeviceImpl:
+                device = new (ELeave) CUpnpSilentDeviceImplementation();
+                break;
+            case EDevice:
+        	    device = new (ELeave) CUpnpDevice();
+                break;
+            default:
+				_LIT( KPanicString, "CUpnpDeviceListContentHandler::OnStartElementL" );
+                User::Panic( KPanicString, 1 );  
+                }
+                
+        CleanupStack::PushL( device );
+        iResultDevice.AddDeviceL( device );
+        CleanupStack::Pop( device );
+        iController.SetCurrentContentHandlerL( CUpnpDeviceTagContentHandler::NewL(
+            iController, *device, iParseType ) );
+        }
+    else
+        {
+        SetIgnoreHandlerL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceListContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceListContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare(KUpnpDeviceList) == 0 );
+    iController.SetPreviousContentHandler();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceListContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceListContentHandler::OnContentL( const TDesC8& /*aBytes*/ )
+    {
+    //User::Leave( KErrArgument )    
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdevicetagcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,318 @@
+/** @file
+* 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 the CUpnpDeviceTagContentHandler class
+ *
+*/
+
+
+#include "upnpdevicetagcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpiconlistcontenthandler.h"
+#include "upnpdevicelistcontenthandler.h"
+#include "upnpservicelistcontenthandler.h"
+#include "upnpdevice.h"
+#include "upnpdescriptionproperty.h"
+#include "upnpdeviceliterals.h"
+
+//const TUint16 KReqiuredTagsBoundary(31)  //first five bits
+const TUint16 KReqiuredTagsBoundary(3); //we take first two bits as reqired
+enum TFlagsPositions
+    {
+    EDeviceTypePos = 0,
+    EUDNPos,
+    EFriendlyNamePos,
+    EManufacturerPos,
+    EModelNamePos,
+    EManufacturerURLPos, //optional
+    EModelDescriptionPos, //optional
+    EModelNumberPos, //optional
+    EModelURLPos, //optional
+    ESerialNumberPos, //optional
+    EUPCPos, //optional
+    EIconListPos, //optional
+    EServiceListPos, //optional
+    EDeviceListPos, //optional
+    EPresentationURLPos //optional
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceTagContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceTagContentHandler* CUpnpDeviceTagContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType )
+    {
+    CUpnpDeviceTagContentHandler* deviceTagContentHandler = 
+        CUpnpDeviceTagContentHandler::NewLC( aController, aResultDevice, 
+                                             aParseType );
+    CleanupStack::Pop( deviceTagContentHandler );
+    return deviceTagContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceTagContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceTagContentHandler* CUpnpDeviceTagContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType )
+    {
+    CUpnpDeviceTagContentHandler* deviceTagContentHandler = 
+        new (ELeave) CUpnpDeviceTagContentHandler( aController, aResultDevice,
+                aParseType );
+    CleanupStack::PushL( deviceTagContentHandler );
+    return deviceTagContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceTagContentHandler::~CUpnpDeviceTagContentHandler
+// Destructor of CUpnpDeviceTagContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceTagContentHandler::~CUpnpDeviceTagContentHandler()
+    {
+    delete iNameWithPrefix;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceTagContentHandler::CUpnpDeviceTagContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceTagContentHandler::CUpnpDeviceTagContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType ) :
+    CUpnpContentHandler( aController ), iResultDevice( aResultDevice ),
+            iCurrentState( EInitial ), iParseType( aParseType )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceTagContentHandler::ProcessDevicePropertyL
+// Helper function that do necessary operation when device property is found.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceTagContentHandler::ProcessDevicePropertyL(
+    TInt aFlagPosition, const TDesC8& aPropertyName )
+    {
+    if ( IsTagRepeated( aFlagPosition, iFoundTags ) )
+        {
+        SetIgnoreHandlerL();
+        }
+    else
+        {
+        iCurrentState = EDeviceProperty;
+        iCurrentDevicePropertyName.Set( aPropertyName );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceTagContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceTagContentHandler::OnStartElementL( const RTagInfo& aElement,
+    const RAttributeArray& /*aAttributes*/)
+    {
+    if ( EInitial == iCurrentState )
+        {
+        const TDesC8& elementName( aElement.LocalName().DesC() );
+        if ( elementName.Compare( KUpnpDeviceType ) == 0 )
+            {
+            if ( IsTagRepeated( EDeviceTypePos, iFoundTags ) )
+                {
+                SetIgnoreHandlerL();
+                }
+            else
+                {
+                iCurrentState = EDeviceType;
+                }
+            }
+        else if ( elementName.Compare( KUpnpFriendlyName ) == 0 )
+            {
+            ProcessDevicePropertyL( EFriendlyNamePos, KUpnpFriendlyName );
+            }
+        else if ( elementName.Compare( KUpnpManufacturer ) == 0 )
+            {
+            ProcessDevicePropertyL( EManufacturerPos, KUpnpManufacturer );
+            }
+        else if ( elementName.Compare( KUpnpManufacturerURL ) == 0 )
+            {
+            ProcessDevicePropertyL( EManufacturerURLPos, KUpnpManufacturerURL );
+            }
+        else if ( elementName.Compare( KUpnpModelDescription ) == 0 )
+            {
+            ProcessDevicePropertyL( EModelDescriptionPos, KUpnpModelDescription );
+            }
+        else if ( elementName.Compare( KUpnpModelName ) == 0 )
+            {
+            ProcessDevicePropertyL( EModelNamePos, KUpnpModelName );
+            }
+        else if ( elementName.Compare( KUpnpModelNumber ) == 0 )
+            {
+            ProcessDevicePropertyL( EModelNumberPos, KUpnpModelNumber );
+            }
+        else if ( elementName.Compare( KUpnpModelURL ) == 0 )
+            {
+            ProcessDevicePropertyL( EModelURLPos, KUpnpModelURL );
+            }
+        else if ( elementName.Compare( KUpnpSerialNumber ) == 0 )
+            {
+            ProcessDevicePropertyL( ESerialNumberPos, KUpnpSerialNumber );
+            }
+        else if ( elementName.Compare( KUpnpUDN ) == 0 )
+            {
+            RepeatedTagCheckL( EUDNPos, iFoundTags );
+            iCurrentState = EUDN;
+            }
+        else if ( elementName.Compare( KUpnpUPC ) == 0 )
+            {
+            ProcessDevicePropertyL( EUPCPos, KUpnpUPC );
+            }
+        else if ( elementName.Compare( KUpnpPresentationURL ) == 0 )
+            {
+            ProcessDevicePropertyL( EPresentationURLPos, KUpnpPresentationURL );
+            }
+        else if ( elementName.Compare( KUpnpIconList ) == 0 )
+            {
+            if ( IsTagRepeated( EIconListPos, iFoundTags ) )
+                {
+                SetIgnoreHandlerL();
+                }
+            else
+                {
+                iController.SetCurrentContentHandlerL( 
+                    CUpnpIconListContentHandler::NewL( iController, iResultDevice ) );
+                }
+            }
+        else if ( elementName.Compare( KUpnpServiceList ) == 0 )
+            {
+            if ( IsTagRepeated( EServiceListPos, iFoundTags ) )
+                {
+                SetIgnoreHandlerL();
+                }
+            else
+                {
+                iController.SetCurrentContentHandlerL( 
+                    CUpnpServiceListContentHandler::NewL( iController, iResultDevice ) );
+                }
+            }
+        else if ( elementName.Compare( KUpnpDeviceList ) == 0 )
+            {
+            if ( IsTagRepeated( EDeviceListPos, iFoundTags ) )
+                {
+                SetIgnoreHandlerL();
+                }
+            else
+                {
+                iController.SetCurrentContentHandlerL( 
+                    CUpnpDeviceListContentHandler::NewL( iController, iResultDevice,
+                    		iParseType ) );
+                }
+            }
+        else
+            {
+            _LIT8(KColon, ":");
+            iCurrentState = EDeviceProperty; //for f.e. dlna:tags
+            delete iNameWithPrefix;
+            iNameWithPrefix = NULL;
+            iNameWithPrefix = HBufC8::NewL( aElement.Prefix().DesC().Length()
+                            + KColon().Length()
+                            + aElement.LocalName().DesC().Length() );
+            iNameWithPrefix->Des().Copy( aElement.Prefix().DesC() );
+            iNameWithPrefix->Des().Append( KColon );
+            iNameWithPrefix->Des().Append( aElement.LocalName().DesC() );
+            iCurrentDevicePropertyName.Set( *iNameWithPrefix );
+            }
+        }
+    else
+        {
+        SetIgnoreHandlerL();
+        //User::Leave( KErrArgument )            //content="textOnly"
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceTagContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceTagContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    switch ( iCurrentState )
+        {
+        case EInitial:
+            ASSERT( aElement.LocalName().DesC().Compare(KUpnpDevice)==0 );
+            if ( (iFoundTags.iFlags & KReqiuredTagsBoundary)
+                    == KReqiuredTagsBoundary )
+                {
+                iController.SetPreviousContentHandler();
+                }
+            else
+                {
+                User::Leave( KErrArgument ); //required tag not found
+                }
+            break;
+        default:
+            iCurrentState = EInitial;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceTagContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceTagContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    switch ( iCurrentState )
+        {
+        case EDeviceProperty:
+            iResultDevice.AddDevicePropertyL( CUpnpDescriptionProperty::NewL(
+                iCurrentDevicePropertyName, aBytes ) );
+            break;
+        case EDeviceType:
+            iResultDevice.SetTypeL( aBytes );
+            break;
+        case EUDN:
+            {
+            _LIT8( KUUID, "uuid:" );
+            if ( aBytes.Find( KUUID() ) == 0 ) //starts with uuid:
+                {
+                iResultDevice.SetUuidL( aBytes.Mid( KUUID().Length() ) );
+                }
+            else
+                {
+                iResultDevice.SetUuidL( aBytes );
+                //User::Leave( KErrArgument )    
+                }
+            break;
+            }
+        default:
+            //User::Leave( KErrArgument )    
+            break;
+        }
+    }
+
+TBool CUpnpDeviceTagContentHandler::InterestedInAllNamespaces()
+    {
+    return ETrue;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdispatcher.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,370 @@
+/** @file
+* 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:  Message dispatcher
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32svr.h>
+#include "upnpdispatcher.pan"
+#include "upnpdispatcher.h"
+#include "upnpdiscoveryobserver.h"
+#include "upnpdispatcherengine.h"
+#include "upnpstring.h"
+#include "upnpsettings.h"
+#include "upnpcustomlog.h"
+
+#ifdef _DEBUG
+#define KLogFile _L("UPnPStack.txt")
+#endif
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::CUpnpDispatcher
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcher::CUpnpDispatcher( MUpnpDiscoveryObserver* aParent)
+    : iParent( aParent )
+{
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcher::ConstructL( )
+    {
+    //  LOGSH(iHandle, "Dispatcher::ConstructL");
+
+    iEngine = CUpnpDispatcherEngine::NewL( *this );
+    iUpdateId = 0;
+
+    iEngine->UpdateDevicesL(iUpdateId);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDispatcher* CUpnpDispatcher::NewL( MUpnpDiscoveryObserver* aParent )
+{
+    CUpnpDispatcher* self = NewLC( aParent );
+    CleanupStack::Pop( self );
+    return( self );
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDispatcher* CUpnpDispatcher::NewLC( MUpnpDiscoveryObserver* aParent )
+{
+    CUpnpDispatcher* self = new (ELeave) CUpnpDispatcher( aParent );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+
+    if( aParent )
+        {
+        self->StartHttpServerL( EFalse , KRandomPort );
+        }
+    return self;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::~CUpnpDispatcher
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDispatcher::~CUpnpDispatcher()
+{
+    delete iEngine;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::DeviceListReceivedL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcher::DeviceListReceivedL(TInt aUpdateId)
+{
+    //LOGSH( iHandle, "Dispatcher DeviceListReceived");
+    UpdateDevicesL(aUpdateId);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::AddCustomer
+// Adds a customer to this Dispatcher.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::AddCustomer( const MUpnpDispatcherCustomer& aCustomer )
+{
+    //LOGSH( iHandle, "Dispatcher AddCustomer");
+    TRAP_IGNORE(AddCustomerL(aCustomer, ETrue ));
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::RemoveCustomer
+// Removes a customer from Dispatcher.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer )
+{
+    RemoveCustomer(aCustomer, ETrue);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::AddCustomer
+// Adds a customer to this Dispatcher.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::AddCustomerL( const MUpnpDispatcherCustomer& aCustomer, TBool aIsCP)
+{
+    //LOGSH( iHandle, "Dispatcher AddCustomer");
+    iEngine->AddCustomer( aCustomer );
+    if (aIsCP)
+        {
+        iEngine->AddControlPointClientL( );
+        }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::RemoveCustomer
+// Removes a customer from Dispatcher.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer,
+                                               TBool aIsCP)
+{
+    LOGS1("CUpnpDispatcher::RemoveCustomer 0x%x", &aCustomer);
+    iEngine->RemoveCustomer( aCustomer );
+    if ( aIsCP )
+        {
+        TRAP_IGNORE(iEngine->RemoveControlPointClientL( ));
+        }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::SendMessageL
+// Sends a message using Engine's HTTP server,
+// if device is local (third param), used local sending feature, type of message has to be EAction
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::SendMessageL( CUpnpHttpMessage* aMessage,
+                                             MUpnpDispatcherCustomer& aCustomer ,
+                                             TBool /*aIsLocal*/ )
+{
+    //LOGSH( iHandle, "Dispatcher SendMessageL");
+
+    TPtrC8 path(0,0);
+    if (iParent != NULL)
+        {
+        path.Set(iParent->Path());
+        }
+
+
+    HBufC8* wholePath = HBufC8::NewLC( path.Length()
+                                       + 1
+                                       + aCustomer.Path().Length() );
+    TPtr8 ptr = wholePath->Des();
+    ptr.Append( path );
+    ptr.Append( UpnpString::KSlash() );
+    ptr.Append( aCustomer.Path() );
+
+    if ( aMessage )
+    {
+        aMessage->SetSenderPathL( *wholePath );
+        iEngine->SendMessageL( aMessage );
+    }
+
+    CleanupStack::PopAndDestroy(wholePath);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::UpdateDevicesL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::UpdateDevicesL( TInt aNewId )
+    {
+
+    //LOGSH( iHandle, "Dispatcher UpdateDevicesL");
+    if ( iUpdateId != aNewId )
+        {
+        // Go through the new devices and add them inform
+        // the Control Point of the new devices?
+        const RPointerArray<CUpnpDevice>& newDevices = iEngine->NewDevices();
+        for ( TInt i = 0; i < newDevices.Count(); i++ )
+            {
+            CUpnpDevice* dev = newDevices[i];
+
+            if ( iParent != NULL )
+                {
+
+                if ( dev->Alive() )
+                    {
+                    iParent->DeviceFoundL( *dev );
+                    }
+                else
+                    {
+                    iParent->DeviceLostL( *dev );
+                    }
+                }
+
+            }
+        iEngine->RemoveDevices();
+
+        iUpdateId = aNewId;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::AddLocalDeviceL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::AddLocalDeviceL( const TDesC8& aUuid,
+                                                const TDesC8& aDeviceType,
+                                                const TDesC8& aDescriptionPath,
+                                                const CDesC8Array& aServices,
+                                                const TBool aIsRootDevice )
+{
+    //LOGSH( iHandle, "Dispatcher AddLocalDeviceL");
+    iEngine->AddLocalDeviceL( aUuid, aDeviceType, aDescriptionPath, aServices, aIsRootDevice );
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::RemoveLocalDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcher::RemoveLocalDeviceL( const TDesC8& aUuid, TBool aSilent )
+{
+    //LOGSH( iHandle, "Dispatcher RemoveLocalDeviceL");
+    iEngine->RemoveLocalDeviceL( aUuid, aSilent );
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::SearchL
+// Sends a SSDP search with given string.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::SearchL( const TDesC8& aSearchString )
+{
+    iEngine->SsdpSearchL( aSearchString );
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::StopFilteringL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::StopFilteringL( const TDesC8& aUuids )
+{
+    iEngine->SsdpStopFilteringL( aUuids );
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::SearchL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::SearchL( const TDesC16& aSearchString )
+{
+    //LOGSH( iHandle, "Dispatcher SearchL");
+    HBufC8* buf = UpnpString::FromUnicodeL( aSearchString );
+    SearchL( *buf );
+    delete buf;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::HttpServerAddressL
+// Returns the HTTP servers IP address.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr CUpnpDispatcher::HttpServerAddress()
+    {
+    return iEngine->HttpServerAddress();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::MacAddressL
+// Returns the MAC address of HTTP server.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+const HBufC8* CUpnpDispatcher::MacAddressL()
+{
+    //LOGSH( iHandle, "Dispatcher MacAddressL");
+    return iEngine->MacAddressL();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::SetTransactionCreator
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcher::SetTransactionCreator( 
+          MUpnpHttpServerTransactionCreator* aTransactionCreator )
+    {
+    iEngine->SetTransactionCreator( aTransactionCreator );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::StartHttpServerL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::StartHttpServerL( TBool aRegister , const TInt aPort )
+    {
+    iEngine->StartHttpServerL( aRegister , aPort );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::StopHttpServerL
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDispatcher::StopHttpServer()
+    {
+    iEngine->StopHttpServer();
+    }
+
+EXPORT_C void CUpnpDispatcher::StartIPFilteringL( )
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    iEngine->HttpServer()->StartIPFilteringL();
+    #endif
+    }
+
+EXPORT_C void CUpnpDispatcher::StopIPFiltering( )
+    {
+    #ifdef RD_UPNP_REMOTE_ACCESS
+    iEngine->HttpServer()->StopIPFiltering( );
+    #endif
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdispatcherengine.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1151 @@
+/** @file
+* 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:  Message dispacher engine
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "upnpdispatcherengine.h"
+#include "upnphttpmessagefactory.h"
+#include "upnphttpfileaccess.h"
+#include "upnpdispatcherrequest.h"
+#include "upnpdispatcherengineobserver.h"
+#include "upnpcustomlog.h"
+#include "upnphttpserversession.h"
+#include "upnphttpserverruntime.h"
+#include "upnpsettings.h"
+
+#ifdef _DEBUG
+#define KLogFile _L("UPnPStack.txt")
+#endif
+
+// CONSTANTS
+const TInt KPortBufferLength = 10;
+_LIT8(KMSearchConfig,"1,1,5,5,10");
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::CUpnpDispatcherEngine
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcherEngine::CUpnpDispatcherEngine(
+                                      MDispatcherEngineObserver& aObserver )
+    : CActive( EPriorityStandard ),
+      iAddLocalPtr( NULL, 0 ),
+      iObserver( aObserver ),
+      iGetDevPtr( NULL, 0 ),
+      iGetServPtr( NULL, 0 ),
+      iRemoveUuidPtr( NULL, 0 ),
+      iIsSessionOpen( EFalse )
+    {
+    CActiveScheduler::Add( this );
+    iDeviceGetState = ENoOperation;
+    iAddLocalBuffer = NULL;
+    iRemoveUuid = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::ConstructL()
+    {
+#ifdef _DEBUG
+    iReqsInStart = RThread().RequestCount();
+    RThread().HandleCount( iProcessHandlesInStart, iThreadHandlesInStart );
+#endif // _DEBUG
+
+    User::LeaveIfError( iSession.Connect() );
+    iIsSessionOpen = ETrue;
+    iSession.RequestStartSsdpL();
+
+    iActiveRequest = NULL;
+    iSearch = NULL;
+
+    ConstructHttpL();
+
+    iDeviceGetState = ENoOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::ConstructHttpL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::ConstructHttpL()
+    {
+    TInt iapId = CUpnpSettings::GetIapL();
+    iHttpServerSession = CUpnpHttpServerSession::NewL( iapId, *this );    
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcherEngine* CUpnpDispatcherEngine::NewL(
+        MDispatcherEngineObserver& aObserver )
+    {
+    CUpnpDispatcherEngine* self = NewLC( aObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcherEngine* CUpnpDispatcherEngine::NewLC(
+        MDispatcherEngineObserver& aObserver )
+    {
+    CUpnpDispatcherEngine* self =
+        new ( ELeave ) CUpnpDispatcherEngine( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::~CUpnpDispatcherEngine
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcherEngine::~CUpnpDispatcherEngine()
+    {
+    // If active, calls DoCancel
+    Cancel();
+
+    delete iRemoveUuid;
+    iRemoveUuid = NULL;
+
+    delete iAddLocalBuffer;
+    iAddLocalBuffer = NULL;
+
+    delete iSearch;
+    iSearch = NULL;
+
+    delete iUuids;
+    iUuids = NULL;
+
+    delete [] iDevs;
+    delete [] iServs;
+    
+    iSession.Close();
+    iIsSessionOpen = EFalse;
+    iCustomers.Reset();
+
+    if ( iHttpServerSession )
+        {
+        iHttpServerSession->Stop();
+        delete iHttpServerSession;
+        }
+
+    iPendingRequests.ResetAndDestroy();
+
+    iNewDevices.ResetAndDestroy();
+
+    RemoveHandledRequest();
+
+    delete iMXString;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::AddCustomer
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::AddCustomer( const MUpnpDispatcherCustomer& aCustomer )
+    {
+    // adds a new customer for CUpnpDispatcherEngine
+    if ( iCustomers.Find( &aCustomer ) == KErrNotFound )
+        {
+        iCustomers.Append( &aCustomer );
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::RemoveCustomer
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer )
+    {
+    TInt pos = iCustomers.Find( &aCustomer );
+    if ( pos != KErrNotFound )
+        {
+        LOGS2("CUpnpDispatcherEngine::RemoveCustomer, removing customer 0x%x from position %d", &aCustomer, pos);
+        iCustomers.Remove( pos );
+        iCustomers.Compress();
+        LOGS("CUpnpDispatcherEngine::RemoveCustomer done");
+        }
+    else
+        LOGS1("CUpnpDispatcherEngine::RemoveCustomer, customer 0x%x not found", &aCustomer);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::SendMessageL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::SendMessageL( CUpnpHttpMessage* aMessage )
+    {
+    // Sends a Http message
+    iHttpServerSession->SendMessageL( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::UpdateDevicesL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::UpdateDevicesL( TInt aUpdateId )
+    {
+    // checking if new list size is called.
+    if ( iDeviceGetState != EGetListSize )
+        {
+        if ( IsActive() )
+            {
+            return;
+            }
+
+        // setting information for message handler
+        // iSize contains information about last known
+        // update id. On return, it will contain also
+        // number of new devices and servises.
+
+        if( iSize.iUpdateId > iOldUpdateId )
+            {
+            iDeviceGetState = EGetList;
+            SetActive();
+            iStatus = KRequestPending;
+            TRequestStatus* stat = &iStatus;
+            User::RequestComplete( stat, KErrNone );
+            }
+        else
+            {
+            iSize.iUpdateId = aUpdateId;
+            iOldUpdateId = aUpdateId;
+
+            iStatus = KRequestPending;
+            // connection restoring
+            if(!iIsSessionOpen)
+                {
+                User::LeaveIfError( iSession.Connect() );
+                iIsSessionOpen = ETrue;
+                }
+
+            iSession.RequestGetDeviceListSize( iStatus, iSize );
+            if( !IsActive() )
+                {
+                SetActive();
+                }
+                iDeviceGetState = EGetList;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::GetDevicesL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcherEngine::TDispatcherRequest CUpnpDispatcherEngine::GetDevicesL()
+    {
+    LOG_FUNC_NAME;
+
+    TDispatcherRequest status( ENewDevices );
+    if ( iDevs )
+        {
+        delete [] iDevs;
+        iDevs = NULL;
+        }
+
+    if ( iServs )
+        {
+        delete [] iServs;
+        iServs = NULL;
+        }
+
+    // checking if new devices or services has been found.
+    if ( iSize.iUpdateId > iOldUpdateId )
+        {
+        if( IsActive() )
+            {
+            Cancel();
+            }
+
+        // constructing buffers for getting the information
+        // for new devices and services.
+        // iDevs is an array, that will have number of
+        // devices as we have just received from Message Handler
+        // Same with iServs for services.
+
+        iDevs = new (ELeave) TUpnpDevice[iSize.iDeviceCount];
+        iServs = new (ELeave) TUpnpService[iSize.iServiceCount];
+
+        TPtr8 devPtr( reinterpret_cast<TUint8*>( iDevs ),
+            iSize.iDeviceCount*sizeof( TUpnpDevice ),
+            iSize.iDeviceCount*sizeof( TUpnpDevice ) );
+        TPtr8 servPtr( reinterpret_cast<TUint8*>( iServs ),
+            iSize.iServiceCount*sizeof( TUpnpService ),
+            iSize.iServiceCount*sizeof( TUpnpService ) );
+
+        // setting member pointers to point to strictures that will be
+        // filled with device and service information as call returns.
+        iGetDevPtr.Set(devPtr);
+        iGetServPtr.Set(servPtr);
+
+        // connection restoring
+        if(!iIsSessionOpen)
+            {
+            User::LeaveIfError( iSession.Connect() );
+            iIsSessionOpen = ETrue;
+            }
+
+        iStatus = KRequestPending;
+        iSession.RequestGetDeviceList( iStatus, iGetDevPtr, iGetServPtr );
+        if( !IsActive() )
+            {
+            SetActive();
+            }
+
+        status = ENewDevices;
+        }
+    else
+        {
+        // if no new devices, return the request for Message Handler,
+        // so it can complete message when there will be new devices.
+        UpdateDevicesL(iSize.iUpdateId);
+
+        status = EDeviceList;
+        }
+
+    return status;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::DevicesReceivedL
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpDispatcherEngine::DevicesReceivedL()
+    {
+    if( iDevs && iServs)
+        {
+        TInt servIndex = 0;
+
+        // parsing data to devices and services.
+        for ( TInt i = 0; i < iSize.iDeviceCount; i++ )
+            {
+            RPointerArray<TUpnpService> currServs;
+            CleanupClosePushL( currServs );
+            for ( TInt j = 0; j < iDevs[i].iServiceCount; j++ )
+                {
+                currServs.Append( (const TUpnpService*)&iServs[servIndex+j] );
+                }
+            CleanupStack::Check(&currServs);
+            servIndex += iDevs[i].iServiceCount;
+
+            // creating CUpnpDevice objects from this information.
+
+            CUpnpDevice* device = CUpnpDevice::NewL( &iDevs[i], currServs );
+            CleanupStack::Check(&currServs);
+            device->SetAlive( iDevs[i].iAlive );
+            CleanupStack::Check(&currServs);
+            currServs.Reset();
+            CleanupStack::Pop( &currServs );
+
+            iNewDevices.Append( device );
+            }
+
+        delete[] iDevs;
+        iDevs = NULL;
+
+        delete[] iServs;
+        iServs = NULL;
+
+        iOldUpdateId = iSize.iUpdateId;
+
+        // inform CUpnpDispatcher that new devices and services has been found.
+        iObserver.DeviceListReceivedL(iOldUpdateId);
+        }
+    //The UpdateId should be passed back to the DispatcherEngine
+    //(Through Observer)
+    return iOldUpdateId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::NewDevices
+// -----------------------------------------------------------------------------
+//
+const RPointerArray<CUpnpDevice>& CUpnpDispatcherEngine::NewDevices() const
+    {
+    return iNewDevices;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::RemoveDevices
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::RemoveDevices()
+    {
+    iNewDevices.ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::AddLocalDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::AddLocalDeviceL( const TDesC8& aUuid,
+                                             const TDesC8& aDeviceType,
+                                             const TDesC8& aDescriptionPath,
+                                             const CDesC8Array& aServices,
+                                             const TBool aIsRootDevice )
+    {
+    // checking if client is busy.
+    if ( iDeviceGetState != EOtherOperation &&
+        iDeviceGetState != EListReceived)
+        {
+        if ( IsActive() )
+            {
+            Cancel();
+            }
+
+        TBuf8<KPortBufferLength> port;
+        port.Num( HttpServerAddress().Port() );
+
+        _LIT8( KRootDevice, "r" );
+
+        TInt bufLen = aUuid.Length() +
+            aDeviceType.Length() +
+            aDescriptionPath.Length() +
+            port.Length() + KRootDevice().Length();
+
+        TInt i=0;
+        for ( i = 0; i < aServices.Count(); i++ )
+            {
+            bufLen += aServices[i].Length();
+            }
+
+        if(iAddLocalBuffer)
+            {
+            delete iAddLocalBuffer;
+            iAddLocalBuffer = NULL;
+            }
+
+        // creating a buffer that will hold information about device
+        // that is to be added.
+
+        iAddLocalBuffer = HBufC8::NewL( bufLen );
+        iAddLocalPtr.Set( iAddLocalBuffer->Des() );
+
+        // iAddLocalDevice is a struct, that will hold length of each
+        // data in the buffer. When we have length of each data and
+        // the data buffer, we can parse the data back to separate
+        // buffers on server side.
+
+        iAddLocalDevice.iUuidLength = aUuid.Length();
+        iAddLocalDevice.iDeviceTypeLength = aDeviceType.Length();
+        iAddLocalDevice.iDescriptionUrlLength = aDescriptionPath.Length();
+        iAddLocalDevice.iDomainLength = 0;
+        iAddLocalDevice.iPortNumberLength = port.Length();
+        iAddLocalDevice.iRootDeviceLength = 0;
+
+        iAddLocalPtr.Append( aUuid );
+        iAddLocalPtr.Append( aDeviceType );
+        iAddLocalPtr.Append( aDescriptionPath );
+        iAddLocalPtr.Append( port );
+
+                if ( aIsRootDevice )
+                    {
+                    iAddLocalPtr.Append( KRootDevice() );
+                    iAddLocalDevice.iRootDeviceLength = KRootDevice().Length();
+                    }
+
+        for ( i = 0; i < aServices.Count(); i++ )
+            {
+            iAddLocalDevice.iServiceLength[i] = aServices[i].Length();
+            iAddLocalPtr.Append( aServices[i] );
+            }
+
+        for ( ; i < KMaxServiceCount; i++ )
+            {
+            iAddLocalDevice.iServiceLength[i] = 0;
+            }
+
+        iAddLocalDevice.iBufferLength = iAddLocalPtr.Length();
+
+        // connection restoring
+        if(!iIsSessionOpen)
+            {
+            User::LeaveIfError( iSession.Connect() );
+            iIsSessionOpen = ETrue;
+            }
+
+        iStatus = KRequestPending;
+        iSession.RequestAddLocalDevice( iStatus, iAddLocalDevice,
+            iAddLocalPtr );
+        if( !IsActive() )
+            {
+            SetActive();
+            }
+
+        iDeviceGetState = EOtherOperation;
+        }
+    else
+        {
+        // if client is busy, making a request to request queue.
+        CUpnpDispatcherRequest* request = CUpnpDispatcherRequest::NewLC(
+            EAddLocalDevice );
+
+        request->AddArgumentL( aUuid );
+        request->AddArgumentL( aDeviceType );
+        request->AddArgumentL( aDescriptionPath );
+
+        _LIT8( KRootDevice, "r" );
+
+        if ( aIsRootDevice )
+            {
+            request->AddArgumentL( KRootDevice );
+            }
+        else
+            {
+            request->AddArgumentL( KNullDesC8 );
+            }
+
+        TInt granularity = aServices.Count();
+        if( 0 == granularity )
+            {
+            granularity = 1;
+            }
+        CDesC8ArrayFlat* array = new (ELeave) CDesC8ArrayFlat( granularity );
+
+        CleanupStack::PushL(array);
+
+        for ( TInt k = 0; k < aServices.Count(); k++ )
+            {
+            array->AppendL( aServices[k] );
+            }
+
+        CleanupStack::Pop(array);
+        request->AddServices(array);
+
+        CleanupStack::Pop(request);
+        iPendingRequests.Append(request);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::AddControlPointClientL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::AddControlPointClientL()
+    {
+    // checking if client is busy.
+    if ( iDeviceGetState != EOtherOperation &&
+        iDeviceGetState != EListReceived )
+        {
+        if ( IsActive() )
+            {
+            Cancel();
+            }
+
+        // connection restoring
+        if ( !iIsSessionOpen )
+            {
+            User::LeaveIfError( iSession.Connect() );
+            iIsSessionOpen = ETrue;
+            }
+
+        iStatus = KRequestPending;
+        iSession.RequestAddControlPoint( iStatus );
+
+        if ( !IsActive() )
+            {
+            SetActive();
+            }
+        iDeviceGetState = EOtherOperation;
+        }
+    else
+        {
+        // client is busy, making a request and adding it to queue.
+        CUpnpDispatcherRequest* request =
+            CUpnpDispatcherRequest::NewLC( EAddControlPointClient );
+        iPendingRequests.AppendL( request );
+        CleanupStack::Pop( request );
+        }
+    }
+
+void CUpnpDispatcherEngine::RemoveControlPointClientL()
+    {
+    // checking if client is busy.
+    if ( iDeviceGetState != EOtherOperation &&
+        iDeviceGetState != EListReceived )
+        {
+        if ( IsActive() )
+            {
+            Cancel();
+            }
+
+        // connection restoring
+        if ( !iIsSessionOpen )
+            {
+            User::LeaveIfError( iSession.Connect() );
+            iIsSessionOpen = ETrue;
+            }
+
+        iStatus = KRequestPending;
+        iSession.RequestRemoveControlPoint( iStatus );
+
+        if ( !IsActive() )
+            {
+            SetActive();
+            }
+        iDeviceGetState = EOtherOperation;
+        }
+    else
+        {
+        // client is busy, making a request and adding it to queue.
+        CUpnpDispatcherRequest* request =
+                CUpnpDispatcherRequest::NewLC( ERemoveControlPointClient );
+        iPendingRequests.AppendL( request );
+        CleanupStack::Pop( request );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::SsdpSearchL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::SsdpSearchL( const TDesC8& aString )
+    {
+    if(!iMXString)
+        {
+        TRAPD(err,iMXString = CUpnpSettings::GetMSearchConfigurationL());
+        if(err == KErrNotFound)
+            {
+            iMXString = KMSearchConfig().AllocL();
+            }
+        else
+            {
+            User::LeaveIfError(err);
+            }
+        }
+
+    if( aString.Length() <= 0 )
+        {
+        return;
+        }
+
+    // checking if client is busy.
+    if ( iDeviceGetState != EOtherOperation &&
+        iDeviceGetState != EListReceived )
+        {
+        if ( IsActive() )
+            {
+            Cancel();
+            }
+
+        if( iSearch )
+            {
+            delete iSearch;
+            iSearch = NULL;
+            }
+
+        iSearch = HBufC8::NewL( aString.Length() );
+        iSearch->Des().Zero();
+        iSearch->Des().Append( aString );
+        // connection restoring
+        if(!iIsSessionOpen)
+            {
+            User::LeaveIfError( iSession.Connect() );
+            iIsSessionOpen = ETrue;
+            }
+
+        iStatus = KRequestPending;
+        iSession.RequestSsdpSearch( iStatus, *iSearch, *iMXString );
+
+        if( !IsActive() )
+            {
+            SetActive();
+            }
+
+        iDeviceGetState = EOtherOperation;
+        }
+    else
+        {
+        // client is busy, making a request and adding it to queue.
+        CUpnpDispatcherRequest* request = CUpnpDispatcherRequest::NewLC( ESsdpSearch );
+
+        request->AddArgumentL( aString );
+
+        CleanupStack::Pop(request);
+        iPendingRequests.Append(request);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::SsdpStopFilteringL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::SsdpStopFilteringL( const TDesC8& aString )
+    {
+    if( aString.Length() <= 0 )
+        {
+        return;
+        }
+    if( iUuids )
+        {
+        delete iUuids;
+        iUuids = NULL;
+        }
+    iUuids = HBufC8::NewL( aString.Length() );
+    iUuids->Des().Zero();
+    iUuids->Des().Append( aString );
+    // connection restoring
+    if(!iIsSessionOpen)
+        {
+        User::LeaveIfError( iSession.Connect() );
+        iIsSessionOpen = ETrue;
+        }
+    iSession.RequestStopFiltering( *iUuids );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::HttpEventLD
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::HttpEventLD( CUpnpHttpMessage* aMessage )
+    {
+    if( !aMessage )
+        {
+        return;
+        }
+    CleanupStack::PushL( aMessage );
+
+    HBufC8* customerPath = aMessage->ServicePath().AllocLC();
+    for ( TInt i = 0; i < iCustomers.Count(); i++ )
+        {
+        MUpnpDispatcherCustomer* customer = iCustomers[i];
+        if ( customerPath->CompareF( customer->Path() ) == 0 )
+            {
+            CleanupStack::PopAndDestroy(customerPath);
+            CleanupStack::Pop( aMessage );
+            customer->MessageReceivedLD( aMessage );
+            return;
+            }
+        }
+    CleanupStack::PopAndDestroy(customerPath);
+    
+    if ( aMessage->Type() <= ETransferStart )
+        {
+        CUpnpHttpMessage* reply = RUpnpHttpMessageFactory::HttpResponseErrorL(
+                                                        aMessage->Sender(), EHttpBadRequest );
+        CleanupStack::PushL( reply );
+        reply->SetSessionId( aMessage->SessionId() );
+        SendMessageL( reply );
+        CleanupStack::PopAndDestroy( reply );
+        }
+    CleanupStack::PopAndDestroy( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::HttpServerAddressL
+// -----------------------------------------------------------------------------
+//
+TInetAddr CUpnpDispatcherEngine::HttpServerAddress()
+    {
+    TInetAddr addr;
+    iHttpServerSession->GetAddress( addr );
+    return addr;
+    }
+
+// CUpnpDispatcherEngine::RemoveLocalDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::RemoveLocalDeviceL( const TDesC8& aUuid, TBool aSilent )
+    {
+    // checking if client is busy.
+    if ( iDeviceGetState != EOtherOperation &&
+         iDeviceGetState != EListReceived )
+        {
+        if ( IsActive() )
+            {
+            Cancel();
+            }
+
+        if(iRemoveUuid)
+            {
+            delete iRemoveUuid;
+            iRemoveUuid = NULL;
+            }
+
+        iRemoveUuid = aUuid.AllocL();
+        iRemoveUuidPtr.Set(iRemoveUuid->Des());
+
+        // connection restoring
+        if(!iIsSessionOpen)
+            {
+            User::LeaveIfError( iSession.Connect() );
+            iIsSessionOpen = ETrue;
+            }
+
+        iStatus = KRequestPending;
+
+        if (!aSilent)
+            {
+            iSession.RequestRemoveLocalDevice( iStatus, iRemoveUuidPtr );
+            }
+        else
+            {
+            iSession.RequestRemoveSilentLocalDevice( iStatus, iRemoveUuidPtr );
+            }
+        iDeviceGetState = EOtherOperation;
+
+        if( !IsActive() )
+            {
+            SetActive();
+            }
+        }
+    else
+        {
+        // client is busy, making a request and adding it to queue.
+        CUpnpDispatcherRequest* request = CUpnpDispatcherRequest::NewLC(
+            ERemoveLocalDevice );
+
+        request->AddArgumentL( aUuid );
+
+        // we need to store information if the removal should be silent
+        if ( aSilent )
+            {
+            request->AddArgumentL( KNullDesC8 );
+            }
+
+        CleanupStack::Pop(request);
+        iPendingRequests.Append(request);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::MacAddressL
+// -----------------------------------------------------------------------------
+//
+const HBufC8* CUpnpDispatcherEngine::MacAddressL()
+    {
+    TSockAddr* addr;
+    addr = iHttpServerSession->HWAddressL();
+    CleanupStack::PushL( addr);
+    TInt i = 0;
+    HBufC8* hwAddr = NULL;
+    hwAddr = HBufC8::NewL( 2 * addr->GetUserLen() );
+    hwAddr->Des().Zero();
+
+    for ( i = sizeof(SSockAddr); i < sizeof(SSockAddr) + addr->GetUserLen(); i++ )
+        {
+        hwAddr->Des().AppendNumFixedWidth((*addr)[i], EHex, 2);
+        }
+
+    CleanupStack::PopAndDestroy( addr);
+
+    hwAddr->Des().UpperCase();
+
+    return hwAddr;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::RunL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::RunL()
+    {
+    if ( iStatus.Int() == KErrServerTerminated || iStatus.Int() == KErrCancel )
+        {
+        LOGS("CUpnpDispatcherEngine::RunL, Server terminated or canceled, trying to restart");
+        iSession.Close();
+        iIsSessionOpen = EFalse;
+        return;
+        }
+
+    switch( iDeviceGetState )
+        {
+        case EOtherOperation:
+            if ( iPendingRequests.Count() > 0 )
+                {
+                HandlePendingRequestL();
+                }
+            else
+                {
+                UpdateDevicesL(iOldUpdateId);
+                }
+            break;
+        case EGetListSize:
+            UpdateDevicesL(iOldUpdateId);
+            break;
+        case EGetList:
+            if( GetDevicesL() == EDeviceList)
+                {
+                iDeviceGetState = EGetList;
+                }
+            else
+                {
+                iDeviceGetState = EListReceived;
+                }
+
+            break;
+        case EListReceived:
+            if( iSize.iUpdateId >= iOldUpdateId )
+                {
+                DevicesReceivedL();
+                }
+            if( iPendingRequests.Count() > 0 && !IsActive())
+                {
+                iDeviceGetState = EOtherOperation;
+                //Re-execute RunL to launch HandlePendingRequest
+                SetActive();
+                iStatus = KRequestPending;
+                TRequestStatus* stat = &iStatus;
+                User::RequestComplete( stat, KErrNone );
+                break;
+                }
+            UpdateDevicesL(iOldUpdateId);
+
+            break;
+        default: //NoOperation
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::RunError
+// RunError in case RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpDispatcherEngine::RunError( TInt /*aError*/ )
+    {
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::DoCancel()
+    {
+    TRAP_IGNORE( StopRequestL() );
+
+    if(iDevs)
+        {
+        delete [] iDevs;
+        iDevs = NULL;
+        }
+    if(iServs)
+        {
+        delete [] iServs;
+        iServs = NULL;
+        }
+
+    iDeviceGetState = ENoOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::HandlePendingRequestL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::HandlePendingRequestL()
+    {
+    ASSERT( iPendingRequests.Count() > 0 );
+    RemoveHandledRequest();
+    iActiveRequest = iPendingRequests[0];
+    CDesC8ArrayFlat& arguments = iActiveRequest->Arguments();
+    switch( iActiveRequest->Request() )
+        {
+        case EAddLocalDevice:
+            {
+            if( iDeviceGetState == EOtherOperation )
+                {
+                iDeviceGetState = ENoOperation;
+                }
+
+            if ( arguments[3].Length() > 0 )
+                {
+                AddLocalDeviceL(
+                                arguments[0],
+                                arguments[1],
+                                arguments[2],
+                                iActiveRequest->Services(),
+                        ETrue );
+                }
+            else
+                {
+                AddLocalDeviceL(
+                                arguments[0],
+                                arguments[1],
+                                arguments[2],
+                                iActiveRequest->Services(),
+                                EFalse );
+                }
+
+            }
+            break;
+
+        case ERemoveLocalDevice:
+            {
+
+            if( iDeviceGetState == EOtherOperation )
+                {
+                iDeviceGetState = ENoOperation;
+                }
+
+            // the presence of 2nd argument means the removal should be silent
+            TBool silent = EFalse;
+            if ( arguments.Count() == 2 )
+                {
+                silent = ETrue;
+                }
+            RemoveLocalDeviceL( arguments[0], silent );
+            }
+            break;
+
+        case EAddControlPointClient:
+            {
+            if( iDeviceGetState == EOtherOperation )
+                {
+                iDeviceGetState = ENoOperation;
+                }
+                AddControlPointClientL();
+            }
+            break;
+
+        case ERemoveControlPointClient:
+            {
+            if( iDeviceGetState == EOtherOperation )
+                {
+                iDeviceGetState = ENoOperation;
+                }
+
+            RemoveControlPointClientL();
+            }
+            break;
+
+        case ESsdpSearch:
+            {
+
+            if( iDeviceGetState == EOtherOperation )
+                {
+                iDeviceGetState = ENoOperation;
+                }
+
+            SsdpSearchL( arguments[0] );
+
+            }
+        default:
+            break;
+        }
+    iPendingRequests.Remove( 0 );
+    iPendingRequests.Compress();
+    iDeviceGetState = EOtherOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::RemoveHandledRequest
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpDispatcherEngine::RemoveHandledRequest()
+    {
+    if(iActiveRequest)
+        {
+        // If last message was ssdp search, now it is safe
+        // to delete iSearch also.
+        if( iActiveRequest->Request() == ESsdpSearch )
+            {
+            if( iSearch )
+                {
+                delete iSearch;
+                iSearch = NULL;
+                }
+            }
+        delete iActiveRequest;
+        iActiveRequest = NULL;
+        return KErrNone;
+        }
+    return KErrNotFound;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::StopRequestL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::StopRequestL()
+    {
+    //LOGSH( iHandle, "Disp Request Cancelled");
+
+    if( iDeviceGetState == EGetList )
+        {
+        // connection restoring
+        if(!iIsSessionOpen)
+            {
+            User::LeaveIfError( iSession.Connect() );
+            iIsSessionOpen = ETrue;
+            }
+
+        iDeviceGetState = ENoOperation;
+        iSession.RequestStop();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherEngine::SetTransactionCreator
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::SetTransactionCreator( 
+          MUpnpHttpServerTransactionCreator* aTransactionCreator )
+    {
+    iHttpServerSession->DefaultRuntime().SetCreator( *aTransactionCreator );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::StartHttpServerL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::StartHttpServerL( TBool aRegister , const TInt aPort )
+    {
+    iHttpServerSession->StartL( aPort );    
+    CheckErrorL( aRegister );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::CheckErrorL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::CheckErrorL( TBool /*aRegister*/ )
+    {
+    TInt error = KErrNone;
+    iSession.RequestCheckError(error);
+    User::LeaveIfError(error);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcher::StopHttpServer
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherEngine::StopHttpServer()
+    {
+    iHttpServerSession->Stop();
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdispatcherrequest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,126 @@
+/** @file
+* 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:  Defines CUpnpdispacherrequest class
+*
+*/
+
+
+// INCLUDE FILES
+#include <badesca.h>
+#include "upnpdispatcherrequest.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::CUpnpDispatcherRequest
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcherRequest::CUpnpDispatcherRequest( TMessageHandlerRqst aRequest )
+: iRequest(aRequest)
+    {
+    }
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcherRequest* CUpnpDispatcherRequest::NewLC( TMessageHandlerRqst aRequest )
+    {
+    CUpnpDispatcherRequest* self = new (ELeave) CUpnpDispatcherRequest( aRequest );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::ConstructL
+// Second phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherRequest::ConstructL()
+    {
+    const TInt KDefaultGranurality(8);
+    iArguments = new (ELeave) CDesC8ArrayFlat( KDefaultGranurality );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::~CUpnpDispatcherRequest
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpDispatcherRequest::~CUpnpDispatcherRequest()
+    {
+    delete iArguments;
+    delete iServices;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::AddArgumentL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherRequest::AddArgumentL(const TDesC8& aArgument)
+    {
+    iArguments->AppendL( aArgument );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::AddServices
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDispatcherRequest::AddServices(CDesC8ArrayFlat* aArgument)
+    {
+    delete iServices;
+    iServices = aArgument;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::Arguments
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CDesC8ArrayFlat& CUpnpDispatcherRequest::Arguments()
+    {
+    return *iArguments;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::Services
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CDesC8ArrayFlat& CUpnpDispatcherRequest::Services()
+    {
+    return *iServices;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDispatcherRequest::Request
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TMessageHandlerRqst CUpnpDispatcherRequest::Request()
+    {
+    return iRequest;
+    }
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpdispatchersession.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,239 @@
+/** @file
+ * 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:  Defines RUpnpDispatcherSession class
+ *
+ */
+
+// INCLUDE FILES
+#include <e32math.h>
+#include "upnpmhcommon.h"
+#include "upnpdispatchersession.h"
+
+#ifdef _DEBUG
+#define KLogFile _L("UPnPStack.txt")
+#endif
+#include "upnpcustomlog.h"
+
+// Number of message slots to reserve for this client server session.
+
+#if defined(__HN_31__) || defined(__HN_32__)
+const TUid KServerUid3 =
+    {0x2000F881};
+#else
+const TUid KServerUid3 =
+    {0x10005BCD};
+#endif
+
+#ifdef __WINS__
+static const TUint KServerMinHeapSize = 0x100000; //  4K
+static const TUint KServerMaxHeapSize = 0x1000000; // 16M
+#endif
+
+const TInt KServerMessageSlots = 10; //Number of message slots available per session.
+const TInt KServerRetryCount = 2;
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RUpnpDispatcherSession
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+RUpnpDispatcherSession::RUpnpDispatcherSession() :
+    RUpnpSessionBase(), iParameter0( NULL, 0, 0 )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::Connect
+// Establish connection to server.
+// -----------------------------------------------------------------------------
+//
+TInt RUpnpDispatcherSession::Connect()
+    {
+    return RUpnpSessionBase::Connect( KMessageHandlerName, TVersion(
+        KMessageHandlerMajorVersionNumber, KMessageHandlerMinorVersionNumber,
+        KMessageHandlerBuildVersionNumber ), KServerMessageSlots,
+        KServerRetryCount, KMessageHandlerFilename, KServerUid3 );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestAddLocalDevice
+// Client requests server to add local device.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestAddLocalDevice( TRequestStatus& aStatus,
+    TUpnpAddLocalDevice& aDevice, TPtr8& aBuffer )
+    {
+    LOG_FUNC_NAME;
+    iParameter0.Set( reinterpret_cast<TUint8*>( &aDevice ), sizeof(aDevice ),
+        sizeof(aDevice ) );
+    SendReceive( EAddLocalDevice, TIpcArgs( &iParameter0, &aBuffer ), aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestRemoveLocalDevice
+// Client requests server to remove local device.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestRemoveLocalDevice(
+    TRequestStatus& aStatus, const TDesC8& aUuid )
+    {
+    LOG_FUNC_NAME;
+    iParameter0.Set( (TUint8*)aUuid.Ptr( ), aUuid.Size( ), aUuid.Size( ) );
+    SendReceive( ERemoveLocalDevice, TIpcArgs( &iParameter0 ), aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestRemoveSilentLocalDevice
+// Client requests server to remove local device.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestRemoveSilentLocalDevice(
+    TRequestStatus& aStatus, const TDesC8& aUuid )
+    {
+    LOG_FUNC_NAME;
+    iParameter0.Set( (TUint8*)aUuid.Ptr( ), aUuid.Size( ), aUuid.Size( ) );
+    TIpcArgs ipcArgs;
+    ipcArgs.Set( 0, &iParameter0 );
+    SendReceive( ERemoveSilentLocalDevice, ipcArgs, aStatus );
+    LOGS("RUpnpDispatcherSession::RequestRemoveSilentLocalDevice passed");
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestAddControlPoint
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestAddControlPoint( TRequestStatus& aStatus )
+    {
+    SendReceive( EAddControlPointClient, aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestRemoveControlPoint
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestRemoveControlPoint(
+    TRequestStatus& aStatus )
+    {
+    SendReceive( ERemoveControlPointClient, aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestStopFiltering
+//
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestStopFiltering( const TDesC8& aUuids )
+    {
+    //  Retruned error is ignored
+    SendReceive( EStopFilteringDevice, TIpcArgs( &aUuids ) );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestGetDeviceListSize
+// Client requests server to get device list size.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestGetDeviceListSize(
+    TRequestStatus& aStatus, TUpnpGetDeviceListSize& aSize )
+    {
+    iParameter0.Set( reinterpret_cast<TUint8*>(&aSize), sizeof(aSize ),
+        sizeof(aSize ) );
+    aStatus = KRequestPending;
+    SendReceive( EGetDeviceListSize, TIpcArgs( &iParameter0 ), aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestGetDeviceList
+// Client requests server to get device list.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestGetDeviceList( TRequestStatus& aStatus,
+    TPtr8& devPtr, TPtr8& servPtr ) const
+    {
+    LOG_FUNC_NAME;
+    SendReceive( EGetDeviceList, TIpcArgs( &devPtr, &servPtr ), aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestSsdpSearch
+// Client requests server to start SSDP search.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestSsdpSearch( TRequestStatus& aStatus,
+    TDesC8& aSearch, TDesC8& aMX )
+    {
+    LOG_FUNC_NAME;
+    SendReceive( ESsdpSearch, TIpcArgs( &aSearch, &aMX ), aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestActiveIap
+// Client requests server active IAP.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestActiveIap( TRequestStatus& aStatus,
+    TInt& aIap )
+    {
+    LOG_FUNC_NAME;
+    iParameter0.Set( reinterpret_cast<TUint8*>( &aIap ), sizeof(TInt),
+        sizeof(TInt) );
+    SendReceive( EActiveIap, TIpcArgs( &iParameter0 ), aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestStartSsdp
+// Client requests server to start SSDP.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestStartSsdpL() const
+    {
+    LOG_FUNC_NAME;
+    User::LeaveIfError( SendReceive( EStartSsdp, TIpcArgs() ) );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestCheckError
+// 
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestCheckError( TInt& aError )
+    {
+    TPckgBuf<TInt> pckgTInt;
+    TIpcArgs ipcArgs;
+    pckgTInt = aError;
+    ipcArgs.Set( 0, &pckgTInt );
+
+    SendReceive( ECheckError, ipcArgs );
+
+    aError = pckgTInt( );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpDispatcherSession::RequestStop
+// Client requests server to cancel.
+// -----------------------------------------------------------------------------
+//
+void RUpnpDispatcherSession::RequestStop()
+    {
+    LOG_FUNC_NAME;
+    TInt err = SendReceive( ECancelRequest, TIpcArgs( ) );
+    if ( err != KErrNone )
+        {
+        LOGS("RUpnpDispatcherSession::RequestStop - Request for RMessage Cancel Failed");
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnperrorcodeseekercontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,195 @@
+/** @file
+* 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 the CUpnpErrorCodeSeekerContentHandler class
+ *
+*/
+
+
+#include "upnperrorcodeseekercontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpsingletagcontenthandler.h"
+#include "upnpsoapliterals.h"
+
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpErrorCodeSeekerContentHandler* CUpnpErrorCodeSeekerContentHandler::NewL(
+    CUpnpContentHandlersController& aController, RBuf8& aErrorValue )
+    {
+    CUpnpErrorCodeSeekerContentHandler* seekerContentHandler =
+        CUpnpErrorCodeSeekerContentHandler::NewLC( aController, aErrorValue );
+    CleanupStack::Pop( seekerContentHandler );
+    return seekerContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpErrorCodeSeekerContentHandler* CUpnpErrorCodeSeekerContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, RBuf8& aErrorValue )
+    {
+    CUpnpErrorCodeSeekerContentHandler* seekerContentHandler =
+        new (ELeave) CUpnpErrorCodeSeekerContentHandler( aController, aErrorValue );
+    CleanupStack::PushL( seekerContentHandler );
+    return seekerContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::~CUpnpErrorCodeSeekerContentHandler
+// Destructor of CUpnpErrorCodeSeekerContentHandler class
+// -----------------------------------------------------------------------------
+//
+CUpnpErrorCodeSeekerContentHandler::~CUpnpErrorCodeSeekerContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::CUpnpErrorCodeSeekerContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpErrorCodeSeekerContentHandler::CUpnpErrorCodeSeekerContentHandler(
+    CUpnpContentHandlersController& aController, RBuf8& aErrorValue ) :
+    CUpnpContentHandler( aController ), iErrorValue( aErrorValue )
+    {
+    iErrorValue.Zero();
+    iCurrentState.Set( KUpnpSoapFault );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpErrorCodeSeekerContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+    {
+    SetNextStateL( aElement.LocalName().DesC() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpErrorCodeSeekerContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare( iCurrentState ) == 0 );
+    SetPreviousState();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpErrorCodeSeekerContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    if ( iCurrentState == KUpnpSoapErrorCode )
+        {
+        CUpnpSingleTagContentHandler::SafeCopyL( iErrorValue, aBytes );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::InterestedInAllNamespaces
+// We are interested in tags from all possible namespaces
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpErrorCodeSeekerContentHandler::InterestedInAllNamespaces()
+    {
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::SetNextStateL
+// Set next state of parsing. If we're interested in particular subtree
+// state will be handeled by this class, otherwise by ignore handler
+// -----------------------------------------------------------------------------
+//
+void CUpnpErrorCodeSeekerContentHandler::SetNextStateL(
+    const TDesC8& aFoundTagName )
+    {
+    if ( iCurrentState == KUpnpSoapFault )
+        {
+        SetParticularNextStateL( KUpnpSoapDetail, aFoundTagName );
+        }
+    else if ( iCurrentState == KUpnpSoapDetail )
+        {
+        SetParticularNextStateL( KUpnpSoapError, aFoundTagName );
+        }
+    else if ( iCurrentState == KUpnpSoapError )
+        {
+        SetParticularNextStateL( KUpnpSoapErrorCode, aFoundTagName );
+        }
+    else
+        {
+        SetIgnoreHandlerL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::SetPreviousState()
+// Set previous state of parsing. When particular tag is ended
+// state of parsind process should be updated.
+// -----------------------------------------------------------------------------
+//
+void CUpnpErrorCodeSeekerContentHandler::SetPreviousState()
+    {
+    if ( iCurrentState == KUpnpSoapFault )
+        {
+        iController.SetPreviousContentHandler();
+        }
+    else if ( iCurrentState == KUpnpSoapDetail )
+        {
+        iCurrentState.Set( KUpnpSoapFault );
+        }
+    else if ( iCurrentState == KUpnpSoapError )
+        {
+        iCurrentState.Set( KUpnpSoapDetail );
+        }
+    else if ( iCurrentState == KUpnpSoapErrorCode )
+        {
+        iCurrentState.Set( KUpnpSoapError );
+        }
+    else
+        {
+        ASSERT( EFalse );   //wrong state
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpErrorCodeSeekerContentHandler::SetParticularNextStateL()
+// Set particular next state of parsing. If we're interested in particular subtree
+// state will be handeled by this class, otherwise by ignore handler
+// -----------------------------------------------------------------------------
+//
+void CUpnpErrorCodeSeekerContentHandler::SetParticularNextStateL(
+    const TDesC8& aNextAcceptedState, const TDesC8& aFoundTagName )
+    {
+    if ( aFoundTagName == aNextAcceptedState )
+        {
+        iCurrentState.Set( aNextAcceptedState );
+        }
+    else
+        {
+        SetIgnoreHandlerL();
+        }
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpeventcontroller.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,355 @@
+/** @file
+* 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:  Encapsulates http client for eventing
+*
+*/
+
+
+
+#include <e32base.h>
+
+#include "upnpsettings.h"
+#include "upnpeventcontroller.h"
+#include "upnpgenamessagefactory.h"
+#include "upnphttpmessagefactory.h"
+#include "upnphttpinitialeventtransaction.h"
+#include "upnpnonmoderatedeventqueuemanager.h"
+#include "upnpmoderatedeventqueuemanager.h"
+#include "upnpinitialeventqueuemanager.h"
+#include "upnpdeviceimplementationbase.h"
+#include "upnpcommonupnplits.h"
+
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+  
+  
+// -----------------------------------------------------------------------------
+// CUpnpEventController::CUpnpEventController
+// Default C++ constructor
+// -----------------------------------------------------------------------------
+//  
+CUpnpEventController::CUpnpEventController( CUpnpServiceImplementation& aServiceImpl )
+    :iServiceImpl( aServiceImpl )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::CUpnpEventController
+// Destructor
+// -----------------------------------------------------------------------------
+//  
+CUpnpEventController::~CUpnpEventController()
+    {
+    iPendingTransactions.ResetAndDestroy();
+    delete iModQueue;
+    delete iNonModQueue;
+    delete iInitialEventQueue;
+    delete iSubscriberLibrary;
+    delete iHttpEngine;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::NewLC
+// Two phased constructor
+// -----------------------------------------------------------------------------
+//  
+CUpnpEventController* CUpnpEventController::NewLC( CUpnpServiceImplementation& aServiceImpl )
+    {
+    CUpnpEventController* self = new (ELeave) CUpnpEventController( aServiceImpl );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::NewL
+// Two phased constructor
+// -----------------------------------------------------------------------------
+//  
+CUpnpEventController* CUpnpEventController::NewL( CUpnpServiceImplementation& aServiceImpl )
+    {
+    CUpnpEventController* self=CUpnpEventController::NewLC( aServiceImpl );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::ConstructL
+// Two phased constructor
+// -----------------------------------------------------------------------------
+//  
+void CUpnpEventController::ConstructL()
+    {
+    iSubscriberLibrary = CUpnpSubscriberLibrary::NewL( *this );
+    iHttpEngine = CUpnpHttpClientEngine::NewL( *this, CUpnpSettings::GetIapL() );
+    iNonModQueue = CUpnpNonModeratedEventQueueManager::NewL( iServiceImpl , *this, iSubscriberLibrary );
+    iModQueue =  CUpnpModeratedEventQueueManager::NewL(  iServiceImpl , *this, iSubscriberLibrary );
+    iInitialEventQueue = CUpnpInitialEventQueueManager::NewL(  iServiceImpl , *this, iSubscriberLibrary );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::SendInitialNotification
+// Sends initial event
+// -----------------------------------------------------------------------------
+//  
+void CUpnpEventController::SendInitialNotification( )
+    {
+    iInitialEventQueue->SendEvent();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::SendNonModeratedNotification
+// Sends not-moderated events
+// -----------------------------------------------------------------------------
+//  
+void CUpnpEventController::SendNonModeratedNotification( )
+    {
+    iNonModQueue->SendEvent();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::SendModeratedNotification
+// Sends moderated event
+// -----------------------------------------------------------------------------
+//  
+void CUpnpEventController::SendModeratedNotification(  )
+    {
+    iModQueue->SendEvent();
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpEventController::SendTransactionL
+// Sends event to subscriber
+// -----------------------------------------------------------------------------
+//  
+void  CUpnpEventController::SendTransactionL( CUpnpHttpTransaction* aTransaction )
+    {
+    CleanupStack::PushL( aTransaction );
+    iPendingTransactions.AppendL( aTransaction );
+    CleanupStack::Pop( aTransaction );
+    
+    iHttpEngine->SendL( *aTransaction );
+    }
+ 
+// -----------------------------------------------------------------------------
+// CUpnpEventController::SubscribeL
+// Proccess subscribe message
+// -----------------------------------------------------------------------------
+//  
+void CUpnpEventController::SubscribeL( CUpnpGenaMessage* aMessage )
+    {
+    TInt subscribers = iSubscriberLibrary->SubscriberLibrary().Count();
+        
+    CUpnpSubscriberLibraryElement* subscriber( NULL );
+    TUpnpErrorCode subscriptionState 
+        = iSubscriberLibrary->AddInfoL( aMessage, &subscriber );
+
+    // Responding:
+    if ( subscriber && subscriptionState == EHttpOk )
+        {
+        // for a new subscriber: SID generation
+        if ( subscribers < iSubscriberLibrary->SubscriberLibrary().Count() )
+            {
+            GenerateSidL( subscriber );
+            }
+            
+        HBufC8* timeout( TimerHeaderLC( subscriber->Timeout() ) );
+        
+        CUpnpHttpMessage* messageOut = reinterpret_cast<CUpnpHttpMessage*>(
+                                    RUpnpGenaMessageFactory::SubscribeResponseL(
+                                                    aMessage->SessionId(), 
+                                                    aMessage->Sender(), 
+                                                    subscriber->Sid(), 
+                                                    timeout->Des() )
+                                                                            );
+        CleanupStack::PopAndDestroy( timeout );                    
+        timeout = NULL;
+        CleanupStack::PushL( messageOut );
+
+        iServiceImpl.SendL( messageOut );
+
+        CleanupStack::PopAndDestroy( messageOut );
+        messageOut = NULL;
+        
+            
+        // for a new subscriber: initial event message
+        if ( subscribers < iSubscriberLibrary->SubscriberLibrary().Count() )
+            {
+            SendInitialNotification( );
+            }
+        }
+    else
+        {       
+        CUpnpHttpMessage* messageOut = RUpnpHttpMessageFactory::UpnpResponseErrorL( 
+                                                                aMessage, 
+                                                                subscriptionState 
+                                                                                  );
+        CleanupStack::PushL( messageOut );
+        iServiceImpl.SendL( messageOut );
+        CleanupStack::PopAndDestroy( messageOut );
+        }       
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::UnSubscribeL
+// Proccess unsubscribe message
+// -----------------------------------------------------------------------------
+//  
+void CUpnpEventController::UnSubscribeL( CUpnpGenaMessage* aMessage )
+    {
+    TUpnpErrorCode subscriptionState( CheckHeaders( aMessage ) );
+
+    if ( subscriptionState == EUndefined )
+        {
+        subscriptionState = iSubscriberLibrary->Remove( aMessage->Sid() );
+        } 
+    
+    if ( subscriptionState == EHttpOk )
+        {
+        CUpnpHttpMessage* messageOut = reinterpret_cast<CUpnpHttpMessage*>(
+                RUpnpGenaMessageFactory::UnsubscribeResponseL( aMessage->SessionId(), 
+                                                               aMessage->Sender() ) 
+                                                                           );
+        CleanupStack::PushL( messageOut );        
+        iServiceImpl.SendL( messageOut );
+        CleanupStack::PopAndDestroy( messageOut );   
+        }
+    else
+        {
+        CUpnpHttpMessage* messageOut = RUpnpHttpMessageFactory::UpnpResponseErrorL( 
+                                                                    aMessage,
+                                                                    subscriptionState
+                                                                                   );
+        CleanupStack::PushL( messageOut );
+        iServiceImpl.SendL( messageOut );
+        CleanupStack::PopAndDestroy( messageOut );
+        }
+    } 
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::CancelInvalidSessions
+// Cancels not completed transaction 
+// -----------------------------------------------------------------------------
+// 
+void CUpnpEventController::CancelInvalidSessions( const TDesC8& aSid )
+    {
+    for ( TInt i(0) ; i < iPendingTransactions.Count() ; i++ )
+        {
+        if ( static_cast<CUpnpGenaMessage*>( iPendingTransactions[i]->Request() )->Sid().Compare( aSid ) == 0 )
+            {         
+            iHttpEngine->Cancel( *iPendingTransactions[i] );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::SubscribersAmount
+// Returns number of subscribers 
+// -----------------------------------------------------------------------------
+// 
+TInt CUpnpEventController::SubscribersAmount()
+    {
+    return iSubscriberLibrary->SubscriberLibrary().Count();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::CheckHeader
+// Check if unsubscribe header are comlete 
+// -----------------------------------------------------------------------------
+// 
+TUpnpErrorCode CUpnpEventController::CheckHeaders( CUpnpGenaMessage* aMessage )
+    {
+    TUpnpErrorCode subscriptionState( EUndefined );
+
+    // Errors: Incompatible headers
+    if ( aMessage->Sid().Compare( KNoHeader) != 0 )
+        {
+        if ( aMessage->Nt().Compare( KNoHeader) != 0 )
+            {
+            subscriptionState = EBadRequest;
+            }
+        else if (aMessage->Callback().Compare( KNoHeader ) != 0 )
+            {
+            subscriptionState = EBadRequest;
+            }
+        else
+            {
+            }
+        }
+    return subscriptionState;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::GenerateSidL
+// Genereated uuid for a subscriber 
+// -----------------------------------------------------------------------------
+// 
+void CUpnpEventController::GenerateSidL( CUpnpSubscriberLibraryElement* aSubscriber )
+    {
+    HBufC8* uuid = iServiceImpl.DeviceImpl().GenerateUuidL();
+    CleanupStack::PushL( uuid );
+    aSubscriber->SetSidL( *uuid );
+    CleanupStack::PopAndDestroy( uuid );
+    LOGS("  new subscriber:");
+    }
+// -----------------------------------------------------------------------------
+// CUpnpEventController::SubscribersAmount
+// Returns evented state variables
+// -----------------------------------------------------------------------------
+//    
+RPointerArray<CUpnpStateVariable>& CUpnpEventController::EventedStateVariables()
+    {
+    return iServiceImpl.EventedStateVariables();
+    }
+   
+// -----------------------------------------------------------------------------
+// CUpnpEventController::SubscriberRemoved
+// Resumes processing when subscriber  has been removed
+// -----------------------------------------------------------------------------
+//    
+void CUpnpEventController::SubscriberRemoved( CUpnpSubscriberLibraryElement* aSubscriber , TInt aPos )
+    {
+    CancelInvalidSessions( aSubscriber->Sid() );
+    
+    iNonModQueue->UpdateQueue( aPos );
+    iModQueue->UpdateQueue( aPos );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventController::TimerHeaderLC
+// Creates timeout header
+// -----------------------------------------------------------------------------
+//    
+HBufC8* CUpnpEventController::TimerHeaderLC( const TDesC8& aTimeout )
+    {
+    HBufC8* timeout= HBufC8::NewLC( aTimeout.Length() + KTimeoutPrefix().Length() );
+    timeout->Des().Zero();
+    timeout->Des().Append( KTimeoutPrefix );
+    timeout->Des().Append( aTimeout );
+    return timeout;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpEventController::ClientResponseRecivedLD
+// Handles event response
+// -----------------------------------------------------------------------------
+//          
+void CUpnpEventController::ClientResponseRecivedLD( CUpnpHttpTransaction& aEndedTransaction )
+{
+    TInt idx( iPendingTransactions.Find( &aEndedTransaction ) );
+    ASSERT( idx >= 0 ); //it should never happen that we received transaction that wasn't sent by us
+    iPendingTransactions.Remove( idx );
+    aEndedTransaction.ProcessResponseL();
+    delete ( &aEndedTransaction );
+}
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpeventqueuemanagerbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,257 @@
+/** @file
+* 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:  Base class for event queue manager
+*
+*/
+
+
+#include "upnpeventqueuemanagerbase.h"
+#include "upnpgenamessagefactory.h"
+#include "upnpsubscriberlibraryelement.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcommonstructs.h"
+
+
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::CUpnpEventQueueManagerBase
+// -----------------------------------------------------------------------------
+//
+CUpnpEventQueueManagerBase::CUpnpEventQueueManagerBase( 
+                                CUpnpServiceImplementation& aServiceImpl,
+                                CUpnpEventController& aEventController,
+                                CUpnpSubscriberLibrary* aSubscriberLibrary )
+    :iServiceImpl( aServiceImpl ),
+     iEventController( aEventController ),
+     iSubscriberLibrary( aSubscriberLibrary )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::~CUpnpEventQueueManagerBase
+// -----------------------------------------------------------------------------
+//
+CUpnpEventQueueManagerBase::~CUpnpEventQueueManagerBase ()
+    {
+    delete iBody;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::BaseConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpEventQueueManagerBase::BaseConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::SendingCompleted
+// -----------------------------------------------------------------------------
+//    
+void CUpnpEventQueueManagerBase::SendingCompleted()
+    {
+    iCurrentSubscriberIndex = 0;
+    delete iBody;
+    iBody = NULL;
+    iIsSending = EFalse;
+    if ( iNewValuesWaitingToBeSend )
+        {
+        iNewValuesWaitingToBeSend = EFalse;
+        SendEvent();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::SendToNextL
+// -----------------------------------------------------------------------------
+//    
+void CUpnpEventQueueManagerBase::SendToNextL()
+    {    
+    PrepareTransactionAndStartSendingL( iCurrentSubscriberIndex );
+    }
+ 
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::PrepareTransactionAndStartSendingL
+// -----------------------------------------------------------------------------
+// 
+void CUpnpEventQueueManagerBase::PrepareTransactionAndStartSendingL( TInt aSubscriberNo )
+    {
+    if (  aSubscriberNo >= iSubscriberLibrary->SubscriberLibrary().Count()
+       || aSubscriberNo < 0 )
+        {
+        User::Leave( KErrNotFound );
+        }
+        
+    CUpnpSubscriberLibraryElement* subscriber( NULL );
+    subscriber = iSubscriberLibrary->SubscriberLibrary()[aSubscriberNo];
+    
+    CUpnpHttpMessage* message = reinterpret_cast<CUpnpHttpMessage*>(
+                        RUpnpGenaMessageFactory::EventingLC(
+                          subscriber->CallbackPath(), 
+                          subscriber->CallbackAddress(), 
+                          subscriber->Sid(), 
+                          subscriber->Seq() ) );
+
+    message->SetTcpTimeout( KMessageTimeout );
+    message->SetBodyL( *iBody );        
+
+    CleanupStack::Pop( message ); //ownership passed to "transcation"
+    CUpnpHttpTransaction* transaction = CreateTransactionL( message );
+    
+    iEventController.SendTransactionL( transaction );
+       
+    subscriber->IncreaseSeq();  
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::TransactionCompletedL
+// -----------------------------------------------------------------------------
+//
+void CUpnpEventQueueManagerBase::TransactionCompletedL( 
+                                  CUpnpHttpTransaction* aCompletedTransaction  
+                                                      )
+    {
+    ASSERT( iIsSending );
+    if ( aCompletedTransaction->Response() && 
+        !aCompletedTransaction->Response()->Is2xx() )
+        {
+        if ( aCompletedTransaction->Response()->Is3xx() )
+            {
+            //300 Responses are redirected by Symbian HTTP Client
+            //This can be changed by removing HTTPFilter from HTTPTransaction
+            }
+        else
+            {
+            RemoveInvalidSubscriber( aCompletedTransaction );
+            return;
+            }
+        }
+
+    iCurrentSubscriberIndex++;
+    if ( iCurrentSubscriberIndex >= iSubscriberLibrary->SubscriberLibrary().Count() )
+        {        
+        SendingCompleted();
+        }
+    else 
+        {           
+        SendToNextL();   
+        }
+    } 
+        
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::RemoveInvalidSubscriber
+// -----------------------------------------------------------------------------
+//
+void CUpnpEventQueueManagerBase::RemoveInvalidSubscriber( 
+                                    CUpnpHttpTransaction* aCompletedTransaction )
+    {
+    iSubscriberLibrary->Remove( static_cast<CUpnpGenaMessage*>( 
+                                     aCompletedTransaction->Request() )->Sid() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::UpdateQueue
+// -----------------------------------------------------------------------------
+//
+void CUpnpEventQueueManagerBase::UpdateQueue( TInt aPos )
+    {
+    if( iIsSending )
+        {
+        if ( aPos == iCurrentSubscriberIndex  )
+            {
+            TRAPD( err, SendToNextL() );
+            if ( err )
+                {
+                SendingCompleted();
+                }
+            return;
+            }   
+        
+        if ( aPos < iCurrentSubscriberIndex )
+            {
+            iCurrentSubscriberIndex--;
+            }           
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::CreateEventL
+// -----------------------------------------------------------------------------
+//
+HBufC8* CUpnpEventQueueManagerBase::CreateEventL
+                        ( const RPointerArray<CUpnpStateVariable>& aVariableList )
+    {      
+    HBufC8* body = HBufC8::NewLC( KMaxGenaMessageLength );        
+    TPtr8 bodyPtr = body->Des(); 
+    bodyPtr.Zero();
+    bodyPtr.Append( KGenaXml );
+    bodyPtr.Append( KGenaPropertysetStart );
+    
+    TInt eventableVariableCount = FillEventBodyL( bodyPtr, aVariableList ); 
+    if ( eventableVariableCount > 0 )
+        {        
+        bodyPtr.Append( KGenaPropertysetEnd );
+        CleanupStack::Pop( body );
+        return body;
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( body );
+        return KNullDesC8().AllocL();             
+        }
+    }
+   
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::ClearVariables
+// -----------------------------------------------------------------------------
+//
+void CUpnpEventQueueManagerBase::ClearVariables()
+    {   
+    for ( TInt i = 0; i < iServiceImpl.EventedStateVariables().Count(); i++ )
+        {
+        if ( iServiceImpl.EventedStateVariables()[i]->MaxEventRate() > 0 && 
+            !iServiceImpl.EventedStateVariables()[i]->ReadyForEventing() )
+            {
+            }
+        else
+            {
+            iServiceImpl.EventedStateVariables().Remove( i );
+            i--;
+            }
+        }
+    iServiceImpl.EventedStateVariables().Compress();   
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpEventQueueManagerBase::ClearVariables
+// -----------------------------------------------------------------------------
+//
+void CUpnpEventQueueManagerBase::AddVariableToEventBody( 
+                                            TDes8& aBuffer , 
+                                            CUpnpStateVariable * aVariable )
+    {
+    aBuffer.Append( KGenaPropertyStart );
+    aBuffer.Append( aVariable->Name() );
+    aBuffer.Append( KCloseBracket );
+    aBuffer.Append( aVariable->Value() );
+    aBuffer.Append( KOpenBracket );
+    aBuffer.Append( UpnpString::KSlash() );
+    aBuffer.Append( aVariable->Name() );
+    aBuffer.Append( KGenaPropertyEnd );
+    }
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpgenamessage.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,218 @@
+/** @file
+* 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:  Implements the CUpnpGenaMessage class.
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpgenamessage.h"
+#include "upnphttpheader.h"
+#include "upnpcommonupnplits.h"
+#include "upnplist.h"
+
+using namespace UpnpGENA;
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::CUpnpGenaMessage
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage::CUpnpGenaMessage():CUpnpHttpMessage()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* CUpnpGenaMessage::NewL( const TInetAddr& aAddr )
+{
+    CUpnpGenaMessage* self = CUpnpGenaMessage::NewLC(aAddr);    
+    CleanupStack::Pop(self);    
+    return self;        
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* CUpnpGenaMessage::NewLC( const TInetAddr& aAddr )
+{
+    CUpnpGenaMessage* self = new (ELeave) CUpnpGenaMessage();
+    CleanupStack::PushL(self);
+    self->ConstructL(aAddr);
+    return self;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::~CUpnpGenaMessage
+// Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage::~CUpnpGenaMessage()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpGenaMessage::ConstructL( TInetAddr aSender) 
+{
+    CUpnpHttpMessage::ConstructL(aSender, NewSessionIdL());
+}
+        
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::Nt
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpGenaMessage::Nt()
+{
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+    {
+        if ( hdr->Name().CompareF( UpnpSSDP::KHdrSearchTarget ) == 0 )  
+        {
+            return hdr->Value();
+        }
+        hdr = iHeaderList->Next( hdr );
+    }
+    
+    return (TDesC8&) KNoHeader;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::Nts
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpGenaMessage::Nts()
+{
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+    {
+        if ( hdr->Name().CompareF( UpnpSSDP::KHdrNotificationType ) == 0 )      // NTS
+        {
+            return hdr->Value();
+        }
+        hdr = iHeaderList->Next( hdr );
+    }
+    
+    return (TDesC8&) KNoHeader;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::Sid
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpGenaMessage::Sid()
+{
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+    {
+        if ( hdr->Name().CompareF( UpnpGENA::KSid ) == 0 )
+        {
+            return hdr->Value();
+        }
+        hdr = iHeaderList->Next( hdr );
+    }
+    
+    return (TDesC8&) KNoHeader;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::Timeout
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpGenaMessage::Timeout()
+{
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+    {
+        if ( hdr->Name().CompareF( UpnpGENA::KTimeout) == 0 )
+        {
+            return hdr->Value();
+        }
+        hdr = iHeaderList->Next( hdr );
+    }
+    
+    return (TDesC8&) KNoHeader;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::Callback
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpGenaMessage::Callback()
+{
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+    {
+        if ( hdr->Name().CompareF( KCallback ) == 0 )
+        {
+            return hdr->Value();
+        }
+        hdr = iHeaderList->Next( hdr );
+    }
+    
+    return (TDesC8&) KNoHeader;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpGenaMessage::Seq
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpGenaMessage::Seq()
+{
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+    {
+        if ( hdr->Name().CompareF( KSeq ) == 0 )
+        {
+            return hdr->Value();
+        }
+        hdr = iHeaderList->Next( hdr );
+     }
+    
+    return (TDesC8&) KNoHeader;
+}
+
+//  End of File 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpgenamessagefactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,334 @@
+/** @file
+* 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:  Gena message factory
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpgenamessagefactory.h"
+#include "upnpstring.h"
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+// for "Second-"
+#include "upnpcommonupnplits.h"
+
+// CONSTANTS
+using namespace UpnpGENA;
+using namespace UpnpHTTP;
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::SubscribeL
+// Subscribe to path and host.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::SubscribeL( const TDesC8& aPath,
+                                                                TInetAddr& aHost,
+                                                                const TDesC8& aCallback )
+{
+    LOGS("RUpnpGenaMessageFactory::SubscribeL(TDesC8&, TInetAddr&, TDesC8&)");
+
+    CUpnpGenaMessage* msg = CUpnpGenaMessage::NewLC( aHost );
+                
+    HBufC8* temp = HBufC8::NewLC( KGenaSubscribe().Length() + 
+                                  UpnpString::KSpace().Length() + 
+                                  UpnpString::KSlash().Length() + 
+                                  aPath.Length() + 
+                                  KHttp11().Length() );
+        
+    temp->Des().Zero();
+    temp->Des().Append( KGenaSubscribe );
+    temp->Des().Append( UpnpString::KSpace );
+    if ( aPath.Find( UpnpString::KSlash() ) != 0 )
+    {
+        temp->Des().Append( UpnpString::KSlash() );
+    }
+    temp->Des().Append( aPath );
+    temp->Des().Append( KHttp11 );
+    msg->AddPairL( temp->Des(), KNullDesC8 );
+    CleanupStack::PopAndDestroy( temp );
+
+    HBufC8* host = UpnpString::InetToStringL( aHost );
+    CleanupStack::PushL( host );
+    msg->AddPairL( UpnpSSDP::KHdrHost(), *host );
+    CleanupStack::PopAndDestroy( host );
+
+    msg->AddPairL( KCallback, aCallback );
+    msg->AddPairL( UpnpSSDP::KHdrSearchTarget, KDefaultNt );
+
+    CleanupStack::Pop( msg );
+    return msg;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::SubscribeL
+// Subscribe to path and host using timeout.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::SubscribeL( const TDesC8& aPath,
+                                                                TInetAddr& aHost,
+                                                                const TDesC8& aCallback,
+                                                                const TDesC8& aTimeout )
+{
+    LOGS("RUpnpGenaMessageFactory::SubscribeL(TDesC8&, TInetAddr&, TDesC8&, TDesC8&)");
+    
+    CUpnpGenaMessage* msg = SubscribeL( aPath, aHost, aCallback );
+    CleanupStack::PushL( msg );
+        
+    HBufC8* timeout = HBufC8::NewLC( KTimeoutPrefix().Length() + aTimeout.Length() );
+    timeout->Des().Append( KTimeoutPrefix() );
+    timeout->Des().Append( aTimeout );
+
+    msg->AddPairL( KTimeout, *timeout );
+        
+    CleanupStack::PopAndDestroy( timeout );
+
+    CleanupStack::Pop( msg );
+    return msg;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::UnsubscribeL
+// Unsubscribe from path and host.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::UnsubscribeL( const TDesC8 &aPath,
+                                                                  TInetAddr &aHost,
+                                                                  const TDesC8 &aSid )
+{
+    LOGS("RUpnpGenaMessageFactory::UnsubscribeL(TDesC8&, TInetAddr&, TDesC8&)");
+    
+    CUpnpGenaMessage* msg = CUpnpGenaMessage::NewLC( aHost );
+                
+    HBufC8* temp = HBufC8::NewLC( KGenaUnSubscribe().Length() + 
+                                  UpnpString::KSpace().Length() + 
+                                  UpnpString::KSlash().Length() + 
+                                  aPath.Length() + 
+                                  KHttp11().Length() );
+        
+    temp->Des().Zero();
+    temp->Des().Append( KGenaUnSubscribe );
+    temp->Des().Append( UpnpString::KSpace );
+    if ( aPath.Find( UpnpString::KSlash() ) != 0 )
+    {
+        temp->Des().Append( UpnpString::KSlash() );     
+    }
+    temp->Des().Append( aPath );
+    temp->Des().Append( KHttp11 );
+    msg->AddPairL( temp->Des(), KNullDesC8 );
+    CleanupStack::PopAndDestroy( temp );
+
+    HBufC8* host = UpnpString::InetToStringL( aHost );
+    CleanupStack::PushL( host );
+    msg->AddPairL( UpnpSSDP::KHdrHost(), *host );
+    CleanupStack::PopAndDestroy( host );
+
+    msg->AddPairL( UpnpGENA::KSid(), aSid );
+
+    CleanupStack::Pop( msg );
+        
+    return msg;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::ResubscribeL
+// Resubscribe to path and host with SID.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::ResubscribeL( const TDesC8& aPath,
+                                                                  TInetAddr& aHost,
+                                                                  const TDesC8& aSid )
+    {
+    LOGS("RUpnpGenaMessageFactory::ResubscribeL(TDesC8&, TInetAddr&, TDesC8&)");
+    CUpnpGenaMessage* msg = CUpnpGenaMessage::NewLC( aHost );
+        
+    HBufC8* temp = HBufC8::NewLC( KGenaUnSubscribe().Length() + 
+                                  UpnpString::KSpace().Length() + 
+                                  UpnpString::KSlash().Length() + 
+                                  aPath.Length() + 
+                                  KHttp11().Length() );
+        
+    temp->Des().Zero();
+    temp->Des().Append( KGenaSubscribe );
+    temp->Des().Append( UpnpString::KSpace );
+    if ( aPath.Find( UpnpString::KSlash() ) != 0 )
+    {
+        temp->Des().Append( UpnpString::KSlash() );
+    }
+    temp->Des().Append( aPath );
+    temp->Des().Append( KHttp11 );
+    msg->AddPairL( temp->Des(), KNullDesC8 );
+    CleanupStack::PopAndDestroy( temp );
+
+    HBufC8* host = UpnpString::InetToStringL( aHost );
+    CleanupStack::PushL( host );
+    msg->AddPairL( UpnpSSDP::KHdrHost(), *host );
+    CleanupStack::PopAndDestroy( host );
+
+    msg->AddPairL( UpnpGENA::KSid, aSid );
+
+    CleanupStack::Pop( msg );
+
+    return msg;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::ResubscribeL
+// Resubscribe to path and host with SID using timeout.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::ResubscribeL( const TDesC8& aPath,
+                                                                  TInetAddr& aHost,
+                                                                  const TDesC8& aSid,
+                                                                  const TDesC8& aTimeout )
+{
+    LOGS("RUpnpGenaMessageFactory::ResubscribeL(TDesC8&, TInetAddr&, TDesC8&, TDesC8&)");
+
+    CUpnpGenaMessage* msg = ResubscribeL( aPath, aHost, aSid );
+    CleanupStack::PushL( msg );
+
+    HBufC8* timeout = HBufC8::NewLC( KTimeoutPrefix().Length() + aTimeout.Length() );
+    timeout->Des().Append( KTimeoutPrefix() );
+    timeout->Des().Append( aTimeout );
+
+    msg->AddPairL( KTimeout, *timeout );
+        
+    CleanupStack::PopAndDestroy( timeout );
+
+    CleanupStack::Pop( msg );
+
+return msg;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::SubscribeResponseL
+// Subscribe response.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::SubscribeResponseL( 
+                                                       TInt aSessionId,
+                                                       const TInetAddr& aDestination,
+                                                       const TDesC8& aSid,
+                                                       const TDesC8& aTimeout )
+{
+    LOGS("RUpnpGenaMessageFactory::SubscribeResponseL(TInt, TInetAddr&, TDesC8&, TDesC8&, TDesC8&)");
+    
+    CUpnpGenaMessage* msg = SubscribeResponseL( aSessionId, aDestination,
+                                                (TBool)ETrue, aSid, aTimeout );
+
+    return msg;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::SubscribeResponseL
+// Subscribe response.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::SubscribeResponseL( 
+                                                TInt aSessionId,
+                                                const TInetAddr& aDestination, 
+                                                TBool /*aTimeStamp*/,                                           
+                                                const TDesC8& aSid,
+                                                const TDesC8& aTimeout )
+    {
+    LOGS("RUpnpGenaMessageFactory::SubscribeResponseL(TInt, TInetAddr&, TBool, TDesC8&, TDesC8&, TDesC8&)");
+
+    CUpnpGenaMessage* msg = CUpnpGenaMessage::NewLC( aDestination );
+
+    msg->SetSessionId( aSessionId );
+    msg->AddPairL( KHttp11Ok, KNullDesC8 );
+        
+    msg->AddPairL( UpnpGENA::KSid, aSid );
+    msg->AddPairL( KTimeout, aTimeout );
+
+    CleanupStack::Pop( msg );
+    return msg;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::UnsubscribeResponseL
+// Unsubscribe response.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::UnsubscribeResponseL( 
+                                                 TInt aSessionId, 
+                                                 const TInetAddr& aDestination )
+{
+    LOGS("RUpnpGenaMessageFactory::UnsubscribeResponseL(TInt, TInetAddr&)");
+
+    CUpnpGenaMessage* msg = CUpnpGenaMessage::NewLC( aDestination );
+    msg->SetSessionId( aSessionId );
+    msg->AddPairL( KHttp11Ok, KNullDesC8 );
+
+    CleanupStack::Pop( msg );
+    return msg; 
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpGenaMessageFactory::EventingLC
+// Eventing.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpGenaMessage* RUpnpGenaMessageFactory::EventingLC( const TDesC8& aPath,
+                                                                TInetAddr& aHost,
+                                                                const TDesC8& aSid,
+                                                                TUint32 aSeq )
+{
+    LOGS("RUpnpGenaMessageFactory::EventingLC(TDesC8&, TInetAddr&, TDesC8&, TUint32)");
+
+    CUpnpGenaMessage* msg = CUpnpGenaMessage::NewLC( aHost );
+                
+    HBufC8* temp = HBufC8::NewLC( KMaxHeaderLength );
+        
+    temp->Des().Zero();
+    temp->Des().Append( KGenaNotify );
+    temp->Des().Append( UpnpString::KSpace );
+    
+    if ( aPath.Find( UpnpString::KSlash() ) != 0 )
+    {
+        temp->Des().Append( UpnpString::KSlash() );
+    }
+
+    temp->Des().Append( aPath );
+    temp->Des().Append( UpnpString::KSpace );
+    temp->Des().Append( KHttp11WithoutSpace );
+    msg->AddPairL( temp->Des(), KNullDesC8 );
+    CleanupStack::PopAndDestroy( temp );
+    temp = NULL;
+        
+    HBufC8* host = UpnpString::InetToStringL( aHost );
+    CleanupStack::PushL( host );
+    msg->AddPairL( UpnpSSDP::KHdrHost(), *host );
+    CleanupStack::PopAndDestroy( host );
+
+    msg->AddPairL( UpnpGENA::KContentType, KTextXmlUtf8 );
+    // length automatic by httpmessage
+    msg->AddPairL( UpnpHTTP::KHdrContentLength, KNullDesC8 );
+    msg->AddPairL( UpnpSSDP::KHdrSearchTarget, KDefaultNt );
+    msg->AddPairL( UpnpSSDP::KHdrNotificationType, KDefaultNts );
+    msg->AddPairL( UpnpGENA::KSid, aSid );
+
+    temp = HBufC8::NewLC( UpnpString::KMaxTUintLength );
+    temp->Des().NumUC( aSeq );
+    msg->AddPairL( KSeq, *temp );
+    CleanupStack::PopAndDestroy( temp );
+
+
+    return msg;
+}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnphttpclientengine.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,169 @@
+/** @file
+* 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:  Definition of the CUpnpHttpClientEngine class
+*
+*/
+
+
+// INCLUDE FILES
+#include <http.h>
+#include <commdbconnpref.h>
+#include <upnphttpmessage.h>
+
+#include "upnphttpclientengine.h"
+#include "upnphttpmessagesender.h"
+#include "upnphttptransaction.h"
+
+#ifdef _DEBUG
+#define KLogFile _L("HttpClientEngine.txt")
+#endif
+#include "upnpcustomlog.h"
+
+// ----------------------------------------------------------------------------
+// CUpnpHTTPClientEngine::NewL
+// Creates instance of CUpnpHTTPClientEngine.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpClientEngine* CUpnpHttpClientEngine::NewL(
+    MUpnpHttpClientObserver& aObserver, TInt aActiveIap )
+    {
+    CUpnpHttpClientEngine* self = CUpnpHttpClientEngine::NewLC(aObserver, aActiveIap );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHTTPClientEngine::NewLC
+// Creates instance of CUpnpHTTPClientEngine.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpClientEngine* CUpnpHttpClientEngine::NewLC(
+    MUpnpHttpClientObserver& aObserver, TInt aActiveIap )
+    {
+    CUpnpHttpClientEngine* self = new (ELeave) CUpnpHttpClientEngine( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL( aActiveIap );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHTTPClientEngine::~CUpnpHTTPClientEngine
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpHttpClientEngine::~CUpnpHttpClientEngine()
+    {
+    iSenders.ResetAndDestroy();
+    iSession.Close();
+    delete iConnectionManagerProxy;
+    iSocketServ.Close();
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHTTPClientEngine::SendL
+// Sends request message, client can expect asynchronous response callbacks,
+// and response body in transaction object.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpClientEngine::SendL( CUpnpHttpTransaction& aTransaction )
+    {
+    CUpnpHttpMessageSender* messageSender = CUpnpHttpMessageSender::NewLC(
+        aTransaction, iSession, *this);
+    iSenders.AppendL( messageSender );
+    CleanupStack::Pop( messageSender );
+    messageSender->StartTransactionL();
+    LOGS1H( 0, "SendL ses id: %d", aTransaction.Request()->SessionId() );
+    }
+
+void CUpnpHttpClientEngine::Cancel( CUpnpHttpTransaction& aTransaction )
+    {
+    TInt pos( Find( aTransaction ) );
+    if ( pos != KErrNotFound )
+        {
+        iSenders[ pos ]->CancelTransaction();
+        LOGSH( 0, "Cancel ses" );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHTTPClientEngine::ConstructL
+// Second phase construction.Openes session and starts connection of active IAP.
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpClientEngine::ConstructL( TInt aActiveIap )
+    {
+    iSession.OpenL();	// Open default protocol ("HTTP/TCP")
+
+    TCommDbConnPref pref;
+    pref.SetIapId( aActiveIap );
+    pref.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
+
+    User::LeaveIfError( iSocketServ.Connect() );
+    iConnectionManagerProxy = CUpnpConnectionManagerProxy::NewL( iSocketServ );
+    User::LeaveIfError( iConnectionManagerProxy->EnsureStart() );
+
+    RStringPool strP = iSession.StringPool();
+    RHTTPConnectionInfo connInfo = iSession.ConnectionInfo();
+    connInfo.SetPropertyL (
+        strP.StringF(HTTP::EHttpSocketServ,RHTTPSession::GetTable() ),
+        THTTPHdrVal (iSocketServ.Handle())
+        );
+    TInt connPtr = reinterpret_cast<TInt>( &iConnectionManagerProxy->ConnectionL() );
+    connInfo.SetPropertyL (
+        strP.StringF(HTTP::EHttpSocketConnection, RHTTPSession::GetTable() ),
+        THTTPHdrVal (connPtr)
+        );
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHTTPClientEngine::CUpnpHTTPClientEngine
+// First phase constructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpHttpClientEngine::CUpnpHttpClientEngine( MUpnpHttpClientObserver& aObserver )
+:   iObserver( aObserver )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHTTPClientEngine::SenderFinishedLD
+// Callback method indicatind that sender finished its job.
+// Methods notifies observer about response, and destroyes sender.
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpClientEngine::SenderFinishedLD( CUpnpHttpMessageSender* aSenderToRelease )
+    {
+    TInt index = iSenders.Find( aSenderToRelease );
+    ASSERT( KErrNotFound != index );
+    LOGS1H( 0, "CUpnpHTTPClientEngine::RemoveSender: %d", index );
+    iObserver.ClientResponseRecivedLD( aSenderToRelease->UpnpTransaction() );
+    iSenders.Remove( index );
+    delete aSenderToRelease;
+    }
+
+TInt CUpnpHttpClientEngine::Find( CUpnpHttpTransaction& aTransaction )
+    {
+    for ( TInt i(0) ; i < iSenders.Count() ; i++ )
+        {
+        if ( &aTransaction  == &( iSenders[i]->UpnpTransaction() ) )
+            {
+            return i;
+            }
+        }
+
+    return KErrNotFound;
+    }
+
+//end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnphttpinitialeventtransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,78 @@
+/** @file
+* 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:  Implements transactions for initial events
+*
+*/
+
+
+#include "upnphttpinitialeventtransaction.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpInitialEventTransaction::CUpnpHttpInitialEventTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpInitialEventTransaction::CUpnpHttpInitialEventTransaction( 
+                                                    CUpnpHttpMessage* aRequest )
+    : CUpnpHttpTransaction( aRequest )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpInitialEventTransaction::~CUpnpHttpInitialEventTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpInitialEventTransaction::~CUpnpHttpInitialEventTransaction()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpInitialEventTransaction::NewLC
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpInitialEventTransaction* CUpnpHttpInitialEventTransaction::NewLC( 
+                                                    CUpnpHttpMessage* aRequest )
+    {
+    CleanupStack::PushL( aRequest );
+    CUpnpHttpInitialEventTransaction* self = 
+                      new (ELeave) CUpnpHttpInitialEventTransaction( aRequest );
+    CleanupStack::Pop( aRequest );
+    CleanupStack::PushL( self );
+    self->BaseConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpInitialEventTransaction::NewL
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpInitialEventTransaction* CUpnpHttpInitialEventTransaction::NewL( 
+                                                    CUpnpHttpMessage* aRequest )
+    {
+    CUpnpHttpInitialEventTransaction* self=
+            CUpnpHttpInitialEventTransaction::NewLC( aRequest );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpInitialEventTransaction::ProcessResponseL
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpInitialEventTransaction::ProcessResponseL()
+    {
+    //we don't care about the initial event response - at least for now
+    }
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnphttpmessagesender.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,486 @@
+/** @file
+* 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:  Definition of the CUpnpHttpMessageSender class
+*
+*/
+
+
+#include <upnphttpmessage.h>
+#include <upnplist.h>
+#include <upnpcons.h>
+#include <upnpstring.h>
+
+#include "upnphttpmessagesender.h"
+#include "upnphttpmessagesenderowner.h"
+#include "upnphttptransaction.h"
+
+#ifdef _DEBUG
+#define KLogFile _L("HttpClientEngine.txt")
+#endif
+#include "upnpcustomlog.h"
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpHttpMessageSender* CUpnpHttpMessageSender::NewL( CUpnpHttpTransaction& aUpnpTransaction,
+    RHTTPSession aSession, MUpnpHttpMessageSenderOwner& aOwner )
+    {
+    CUpnpHttpMessageSender* self = CUpnpHttpMessageSender::NewLC( aUpnpTransaction,
+                                                                  aSession, aOwner );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpHttpMessageSender* CUpnpHttpMessageSender::NewLC( CUpnpHttpTransaction& aUpnpTransaction,
+    RHTTPSession aSession, MUpnpHttpMessageSenderOwner& aOwner )
+    {
+    CUpnpHttpMessageSender* self = new (ELeave) CUpnpHttpMessageSender( aUpnpTransaction,
+                                                                        aSession, aOwner );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::CUpnpHttpMessageSender
+// Constructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpHttpMessageSender::CUpnpHttpMessageSender( CUpnpHttpTransaction& aUpnpTransaction,
+    RHTTPSession aSession, MUpnpHttpMessageSenderOwner& aOwner ) :
+    iUpnpTransaction( aUpnpTransaction ),
+    iSession( aSession ),
+    iOwner( aOwner )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::ConstructL
+// Constructor of CUpnpHttpMessageSender
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::ConstructL()
+    {
+    iTimer = CUpnpNotifyTimer::NewL( this );
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::~CUpnpHttpMessageSender
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CUpnpHttpMessageSender::~CUpnpHttpMessageSender()
+    {
+    delete iBody;
+    delete iTimer;
+    iTransaction.Close();
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::UpnpTransaction
+// Returns upnp transaction object that is maintained by the object.
+// ----------------------------------------------------------------------------
+//
+CUpnpHttpTransaction& CUpnpHttpMessageSender::UpnpTransaction()
+    {
+    return iUpnpTransaction;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::StartTransactionL
+// Start a new HTTP transaction maintained by the object. It will start
+// asynchronous sending of request message.
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::StartTransactionL()
+    {
+    ASSERT( !iTimer->IsActive() && NULL == iBody ); //check if this method is called only once
+    LOG_FUNC_NAME;
+
+    PrepareRequestTransactionL();
+    PrepareRequestHeadersL();
+    PrepareRequestBody();
+    StartRequestTimer();
+    iTransaction.SubmitL();
+
+    ASSERT( iTimer->IsActive() );   //timer is set
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::PrepareRequestTransactionL
+// Opens RHTTPTransaction with request method and uri, subscribe
+// for transaction's events
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::PrepareRequestTransactionL()
+    {
+    HBufC8* uri = DestinationUriL( iUpnpTransaction.Request() );
+    CleanupStack::PushL( uri );
+    TUriParser8 uriParser;
+    uriParser.Parse( *uri );
+    RStringF method = iSession.StringPool().OpenFStringL( iUpnpTransaction.Request()->Method() );
+    CleanupClosePushL( method );
+    iTransaction = iSession.OpenTransactionL( uriParser, *this, method );
+    CleanupStack::PopAndDestroy( &method );
+    //synchronize ids of both transactions
+    iUpnpTransaction.Request()->SetSessionId( iTransaction.Id() );
+    CleanupStack::PopAndDestroy( uri );
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::PrepareRequestHeadersL
+// Sets http headers from UpnpHttpTransaction to RHTTPTransaction
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::PrepareRequestHeadersL()
+    {
+    RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
+    hdr.RemoveAllFields();
+    CUpnpHttpHeaderList& headerList =  *(iUpnpTransaction.Request()->HeaderList());
+    CUpnpHttpHeader* upnphdr = headerList.First();
+    upnphdr = headerList.Next(upnphdr);    // first header is a method
+    while ( upnphdr )
+        {
+        RStringF valStr = iSession.StringPool().OpenFStringL( upnphdr->Value() );
+        CleanupClosePushL( valStr );
+        RStringF namStr = iSession.StringPool().OpenFStringL( upnphdr->Name() );
+        CleanupClosePushL( namStr );
+
+        hdr.SetFieldL( namStr, THTTPHdrVal( valStr ) );
+        upnphdr = headerList.Next(upnphdr);
+
+        CleanupStack::PopAndDestroy( &namStr );
+        CleanupStack::PopAndDestroy( &valStr );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::CopyResponseHeadersL
+// Copies http headers from RHTTPTransaction to UpnpHttpTransaction
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::CopyResponseHeadersL()
+    {
+    CUpnpHttpMessage* msg = iUpnpTransaction.Response();
+    RStringPool strPool = iSession.StringPool();
+    RHTTPHeaders headers = iTransaction.Response().GetHeaderCollection();
+
+    THTTPHdrFieldIter iter = headers.Fields();
+    while ( !iter.AtEnd() )
+        {
+        RStringTokenF fieldName = iter();
+        RStringF fieldNameStr = strPool.StringF( fieldName );
+        const TDesC8& fieldNameDesC = fieldNameStr.DesC();
+
+        TPtrC8 rawFieldData;
+        if ( headers.GetRawField( fieldNameStr, rawFieldData ) == KErrNone )
+            {
+            msg->AddPairL( fieldNameDesC, rawFieldData );
+            }
+
+        ++iter;
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::PrepareRequestBodyL
+// Sets http message body from UpnpHttpTransaction to RHTTPTransaction
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::PrepareRequestBody()
+    {
+    if ( iUpnpTransaction.Request()->Method().Compare( KHttpPost ) == 0 
+       || ( iUpnpTransaction.Request()->Method().Compare( UpnpGENA::KGenaNotify ) == 0 ) )
+        {
+        iTransaction.Request().SetBody( *this );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::StartRequestTimer
+// Starts timer of request sending with TcpTimeout value.
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::StartRequestTimer()
+    {
+    iTimer->After( iUpnpTransaction.Request()->TcpTimeout(), EFalse );
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::TimerEventL
+// From MNotifyTimerObserver function which indicate that request timeout
+// expired, so transaction failed.
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::TimerEventL( CUpnpNotifyTimer* /*aTimer*/ )
+    {
+    LOG_FUNC_NAME;
+    TransactionFailed( EHttpRequestTimeout );
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::MHFRunL
+// Called by Symbian OS HTTP client framework to notify about transaction events.
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::MHFRunL( RHTTPTransaction aTransaction, const THTTPEvent& aEvent )
+    {
+    ASSERT( aTransaction == iTransaction );
+    switch ( aEvent.iStatus )
+        {
+        case THTTPEvent::EGotResponseHeaders:
+            {
+            LOGS1( "THTTPEvent::EGotResponseHeaders trans id: %d",
+                aTransaction.Id() );
+            }
+            break;
+        case THTTPEvent::EGotResponseBodyData:
+            {
+            GotResponseBodyDataL( *(aTransaction.Response().Body()) );
+            }
+            break;
+        case THTTPEvent::EResponseComplete:
+            {
+            LOGS( "THTTPEvent::EResponseComplete");
+            // Indicates that header & body of response is completely received.
+            }
+            break;
+        //note: there is a guarantee that THTTPEvent::ESucceeded XOR THTTPEvent::EFailed
+        //event will be provided, and it will be the last event for a transaction
+        //so ESucceeded and EFailed are the only legal states
+        //in which we can call TransactionSucceeded/TransactionFailed
+        case THTTPEvent::ESucceeded:
+            {
+            LOGS( "THTTPEvent::ESucceeded");
+            TransactionSucceeded();
+            }
+            break;
+        case THTTPEvent::EFailed:
+            {
+            LOGS( "THTTPEvent::EFailed");
+            if ( KErrNone != iCurrentErrorNumber )
+                {
+                TransactionFailed( EHttpRequestTimeout, iCurrentErrorNumber );
+                }
+            else
+                {
+                TransactionFailed( aTransaction.Response().StatusCode() );
+                }
+            }
+            break;
+        default:
+            // There are more events in THTTPEvent, but they are not usually
+            // needed. However, event status smaller than zero should be handled
+            // correctly since it's error.
+            {
+            LOGS1( "Other THTTPEvent::%d", aEvent.iStatus );
+            if ( aEvent.iStatus < 0 )
+                {
+                iCurrentErrorNumber = aEvent.iStatus;
+                }
+            }
+            break;
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::MHFRunError
+// Called by Symbian OS HTTP client framework when *leave* occurs in handling
+// of transaction event
+// ----------------------------------------------------------------------------
+//
+TInt CUpnpHttpMessageSender::MHFRunError( TInt aError,
+                          RHTTPTransaction /*aTransaction*/,
+                          const THTTPEvent& /*aEvent*/ )
+    {
+    LOGS1( "Run error %d", aError );
+    //in case of serious errors we are receiving here we have to notify
+    //error immediatly (we probably won't receive THTTPEvent::EFailed)
+    TransactionFailed( EHttpRequestTimeout, aError );
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHTTPMessageSender::TransactionSucceededL
+// Called when transaction succeeded.
+// Closes RHTTPTransaction, and forward result message to observer.
+// -----------------------------------------------------------------------------
+void CUpnpHttpMessageSender::TransactionSucceeded()
+    {
+    //there is nothing we can do about error during notification upper layer
+    //except retry (risky), or ignore
+    TRAP_IGNORE( DoTransactionSucceededL() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::TransactionFailedL
+// Called in case of every fail of transaction.
+// Closes RHTTPTransaction, creates error message with given status, and forward it
+// to observer.
+// -----------------------------------------------------------------------------
+void CUpnpHttpMessageSender::TransactionFailed( TInt aStatus, TInt aError )
+    {
+    //see comment in TransactionSucceeded
+    TRAP_IGNORE( DoTransactionFailedL( aStatus, aError ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHTTPMessageSender::DoTransactionSucceededL
+// Internal, leaving code to notify that transaction succeeded
+// Do NOT use this method directly, but via TransactionSucceded
+// -----------------------------------------------------------------------------
+void CUpnpHttpMessageSender::DoTransactionSucceededL()
+    {
+    LOG_FUNC_NAME;
+    iTimer->Cancel();
+    iUpnpTransaction.CreateOkResponseL( iBody ? *iBody : KNullDesC8() );
+    CopyResponseHeadersL(); //to copy SID from service subscription http response 
+    iTransaction.Close();
+    delete iBody;
+    iBody = NULL;
+    iOwner.SenderFinishedLD( this );    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHTTPMessageSender::DoTransactionFailedL
+// Internal, leaving code to notify that transaction failed
+// Do NOT use this method directly, but via TransactionFailed
+// -----------------------------------------------------------------------------
+void CUpnpHttpMessageSender::DoTransactionFailedL( TInt aStatus, TInt aError )
+    {
+    LOG_FUNC_NAME;
+    iTimer->Cancel();
+    iTransaction.Close();
+    if ( KErrNone != aError ) //in case of internal symbian error colected body isn't meaningful
+        {
+        delete iBody;
+        iBody = NULL;
+        }    
+    iUpnpTransaction.CreateFaultResponseL( iBody ? *iBody : KNullDesC8(),
+                                               aStatus, 
+                                               aError );
+    delete iBody;
+    iBody = NULL;
+    iOwner.SenderFinishedLD( this );    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::GotResponseBodyDataL
+// Called when transaction got another part of body data.
+// Data is concatenated to iBody and when the last part of body is received
+// request message is created witin transaction.
+// -----------------------------------------------------------------------------
+void CUpnpHttpMessageSender::GotResponseBodyDataL(
+    MHTTPDataSupplier& aResponseBodySupplier )
+    {
+    LOG_FUNC_NAME;
+
+    TPtrC8 dataChunk;
+    aResponseBodySupplier.GetNextDataPart( dataChunk );
+    
+    if (!iBody)
+        {
+        iBody = dataChunk.AllocL();
+        }
+    else
+        {
+        iBody = iBody->ReAllocL( iBody->Length() + dataChunk.Length() );
+        iBody->Des().Append( dataChunk );
+        }
+
+    aResponseBodySupplier.ReleaseData();    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHTTPMessageSender::DestinationUriL
+// Helper method that allocate descriptor object with destination uri of message
+// passed as a parameter.
+// -----------------------------------------------------------------------------
+HBufC8* CUpnpHttpMessageSender::DestinationUriL( CUpnpHttpMessage* aMessage )
+    {
+    TInetAddr add( aMessage->Receiver() );
+    HBufC8* address = UpnpString::InetToStringL( add );
+    CleanupStack::PushL( address );
+    TPtrC8 path( aMessage->SenderPathFromHeader() ) ;
+    HBufC8* uriBuf = HBufC8::NewL(
+        UpnpHTTP::KHTTPUrl().Length() + address->Length() + path.Length() );
+    TPtr8 uri( uriBuf->Des() );
+    uri.Append( UpnpHTTP::KHTTPUrl );
+    uri.Append( *address );
+    uri.Append( path );
+    CleanupStack::PopAndDestroy( address );
+    return uriBuf;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::GetNextDataPart
+// Method from MHTTPDataSupplier used to supply body of request from
+// our UpnpMessage to Symian RHTTPRequest
+// -----------------------------------------------------------------------------
+TBool CUpnpHttpMessageSender::GetNextDataPart( TPtrC8& aDataChunk )
+    {
+    aDataChunk.Set( iUpnpTransaction.Request()->Body() );
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::ReleaseData()
+// Method from from MHTTPDataSupplier to supply body of request from
+// our UpnpMessage to Symian RHTTPRequest
+// -----------------------------------------------------------------------------
+void CUpnpHttpMessageSender::ReleaseData()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::OverallDataSize
+// Method from MHTTPDataSupplier used to supply body of request from
+// our UpnpMessage to Symian RHTTPRequest
+// -----------------------------------------------------------------------------
+TInt CUpnpHttpMessageSender::OverallDataSize()
+    {
+    return iUpnpTransaction.Request()->Body().Length();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::Reset
+// Method from MHTTPDataSupplier used to supply body of request from
+// our UpnpMessage to Symian RHTTPRequest
+// -----------------------------------------------------------------------------
+TInt CUpnpHttpMessageSender::Reset()
+    {
+    return KErrNone;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpMessageSender::CancelTransaction
+// Cancels transaction
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpMessageSender::CancelTransaction()
+    {
+    LOG_FUNC_NAME;
+    iTransaction.Cancel();
+    iTimer->Cancel();
+    TransactionFailed( EHttpRequestTimeout );//no need to wait, notify timeout
+    }
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnphttpmoderatedeventtransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,80 @@
+/** @file
+* 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:  Implements transactions for moderated events
+*
+*/
+
+
+#include "upnphttpmoderatedeventtransaction.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpModeratedEventTransaction::CUpnpHttpModeratedEventTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpModeratedEventTransaction::CUpnpHttpModeratedEventTransaction( 
+                                                    CUpnpHttpMessage* aRequest,
+                                                    MTransactionObserver& aObserver )
+    :CUpnpHttpTransaction( aRequest ), iObserver( aObserver )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpModeratedEventTransaction::~CUpnpHttpModeratedEventTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpModeratedEventTransaction::~CUpnpHttpModeratedEventTransaction()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpModeratedEventTransaction::NewLC
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpModeratedEventTransaction* CUpnpHttpModeratedEventTransaction::NewLC( 
+                                            CUpnpHttpMessage* aRequest ,
+                                            MTransactionObserver& aObserver )
+    {
+    CleanupStack::PushL( aRequest );
+    CUpnpHttpModeratedEventTransaction* self = 
+        new (ELeave) CUpnpHttpModeratedEventTransaction( aRequest, aObserver );
+    CleanupStack::Pop( aRequest );
+    CleanupStack::PushL( self );
+    self->BaseConstructL();
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpModeratedEventTransaction::NewL
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpModeratedEventTransaction* 
+CUpnpHttpModeratedEventTransaction::NewL( CUpnpHttpMessage* aRequest,
+                                          MTransactionObserver& aObserver )
+    {
+    CUpnpHttpModeratedEventTransaction* self=
+            CUpnpHttpModeratedEventTransaction::NewLC( aRequest, aObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpModeratedEventTransaction::ProcessResponseL
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpModeratedEventTransaction::ProcessResponseL()
+    {
+    iObserver.TransactionCompletedL( this );
+    }
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnphttpnonmoderatedeventtransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,80 @@
+/** @file
+* 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:  Implements transactions for moderated events
+*
+*/
+
+
+#include "upnphttpnonmoderatedeventtransaction.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpNonModeratedEventTransaction::CUpnpHttpNonModeratedEventTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpNonModeratedEventTransaction::CUpnpHttpNonModeratedEventTransaction( 
+                                                    CUpnpHttpMessage* aRequest,
+                                                    MTransactionObserver& aObserver )
+    :CUpnpHttpTransaction( aRequest ), iObserver( aObserver )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpNonModeratedEventTransaction::~CUpnpHttpNonModeratedEventTransaction
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpNonModeratedEventTransaction::~CUpnpHttpNonModeratedEventTransaction()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpNonModeratedEventTransaction::NewLC
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpNonModeratedEventTransaction* CUpnpHttpNonModeratedEventTransaction::NewLC( 
+                                                    CUpnpHttpMessage* aRequest,
+                                                    MTransactionObserver& aObserver )
+    {
+    CleanupStack::PushL( aRequest );
+    CUpnpHttpNonModeratedEventTransaction* self = 
+        new (ELeave) CUpnpHttpNonModeratedEventTransaction( aRequest, aObserver );
+    CleanupStack::Pop( aRequest );
+    CleanupStack::PushL( self );
+    self->BaseConstructL();
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpNonModeratedEventTransaction::NewL
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpNonModeratedEventTransaction* CUpnpHttpNonModeratedEventTransaction::NewL( 
+                                                    CUpnpHttpMessage* aRequest,
+                                                    MTransactionObserver& aObserver )
+    {
+    CUpnpHttpNonModeratedEventTransaction* self=
+            CUpnpHttpNonModeratedEventTransaction::NewLC( aRequest, aObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpNonModeratedEventTransaction::ProcessResponseL
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpNonModeratedEventTransaction::ProcessResponseL()
+    {
+    iObserver.TransactionCompletedL( this );
+    }
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnphttpservertransactiondescription.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,145 @@
+/** @file
+ * 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:  CUpnpHttpServerTransactionDescription implementation.
+ *
+ */
+#include <uri8.h> 
+#include "upnphttpservertransactiondescription.h"
+#include "upnphttpservertransactionhandler.h"
+#include "upnperrors.h"
+#include "upnphttpmessage.h"
+#include "upnpstring.h"
+
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransactionDescription::NewL
+// 
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpServerTransactionDescription* CUpnpHttpServerTransactionDescription::NewL( 
+        CUpnpHttpServerTransactionHandler& aClientContext, const TInetAddr& aSender,
+        const TDesC8& aUri )
+    {
+    CUpnpHttpServerTransactionDescription* self = 
+        new (ELeave) CUpnpHttpServerTransactionDescription( aClientContext );
+    CleanupStack::PushL( self );
+    self->ConstructL( aSender, aUri );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransactionDescription::CUpnpHttpServerTransactionDescription
+// 
+// ---------------------------------------------------------------------------
+//
+CUpnpHttpServerTransactionDescription::CUpnpHttpServerTransactionDescription( 
+        CUpnpHttpServerTransactionHandler& aClientContext )
+    : iClientContext( aClientContext )    
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransactionDescription::ConstructL
+// 
+// ---------------------------------------------------------------------------
+//
+void CUpnpHttpServerTransactionDescription::ConstructL( 
+	const TInetAddr& aSender, const TDesC8& aUri )
+    {
+    iSender = aSender;
+    iSenderUri = aUri.AllocL();	
+    iDecodedUri.CreateL( aUri );
+    }
+        
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransactionDescription::~CUpnpHttpServerTransactionDescription
+// 
+// ---------------------------------------------------------------------------
+//    
+CUpnpHttpServerTransactionDescription::~CUpnpHttpServerTransactionDescription()
+    {
+    delete iSenderUri;
+    iDecodedUri.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransactionDescription::OnCallbackL
+// 
+// ---------------------------------------------------------------------------
+//    
+void CUpnpHttpServerTransactionDescription::OnCallbackL( TUpnpHttpServerEvent aEvent )
+    {
+    TRAPD( err, DoCallbackL(aEvent) );
+    if ( err )
+        {
+        SetHttpCode( err );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpHttpServerTransactionDescription::OnCallbackL
+// 
+// ---------------------------------------------------------------------------
+//    
+void CUpnpHttpServerTransactionDescription::DoCallbackL( TUpnpHttpServerEvent aEvent )
+    {
+    switch ( aEvent )
+        {
+        case EOnRequestStart:
+            {            
+            TInt error = DecodeUri();      
+            if ( error )
+                {
+                SetHttpCode( error );
+                }
+            else
+                {
+                RFile file;                                                
+                TInt error = iClientContext.GetFileL( file, *iSenderUri, iSender );
+                if ( error )
+                    {
+                    SetHttpCode( error );
+                    }
+                else
+                    {
+                    SetDataSourceL( file );
+                    }
+                }    
+            }
+            break;
+        case EOnComplete:
+            break;  
+        case EOnResponseStart:
+            break;
+        default:
+            break;
+        }            
+    }
+
+
+TInt CUpnpHttpServerTransactionDescription::DecodeUri( )
+    {       
+    TInt error = KErrNone;
+    UpnpString::ReplaceHttpCharacters( iDecodedUri );    
+    TUriParser8 up;
+    TInt parseError = up.Parse( iDecodedUri );
+    if ( parseError )
+        {
+        error = -EHttpBadRequest;
+        }    
+    return error;
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnphttpservertransactionhandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,201 @@
+/** @file
+ * 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:  CUpnpHttpServerTransactionHandler implementation.
+ *
+ */
+// INCLUDES
+#include <bautils.h> 
+
+#include "upnphttpservertransactionhandler.h"
+#include "upnpstring.h"
+#include "upnphttpmessage.h"
+#include "upnpicon.h"
+
+#include "upnphttpservertransactiondescription.h"
+#include "upnpdevicedescriptionrequest.h"
+#include "upnpdevicedescriptionprovider.h"
+#include "upnpdeviceimplementationbase.h"
+
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerTransactionHandler::CUpnpHttpServerTransactionHandler
+// C++ default constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerTransactionHandler::CUpnpHttpServerTransactionHandler(
+        CUpnpDeviceImplementationBase& aDevice ) :
+    iDevice( aDevice )
+
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerTransactionHandler::~CUpnpHttpServerTransactionHandler
+// C++ default destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerTransactionHandler::~CUpnpHttpServerTransactionHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerTransactionHandler::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerTransactionHandler* CUpnpHttpServerTransactionHandler::NewLC(
+        CUpnpDeviceImplementationBase& aDevice )
+    {
+    CUpnpHttpServerTransactionHandler* self =
+            new ( ELeave ) CUpnpHttpServerTransactionHandler( aDevice );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerTransactionHandler::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerTransactionHandler* CUpnpHttpServerTransactionHandler::NewL(
+        CUpnpDeviceImplementationBase& aDevice )
+    {
+    CUpnpHttpServerTransactionHandler* self =
+            CUpnpHttpServerTransactionHandler::NewLC( aDevice );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpServerTransactionHandler::ConstructL
+// EPOC default constructor for performing 2nd stage construction.
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServerTransactionHandler::ConstructL()
+    {   
+    }
+
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpServerTransactionHandler::NewTransactionL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpServerTransactionHandler::NewTransactionL( 
+    const TDesC8& aMethod, const TDesC8& aUri, 
+    const TInetAddr& aSender, CUpnpHttpServerTransaction*& aResultTrans )
+    {
+    _LIT8( KGet, "GET" );
+    _LIT8( KHead, "HEAD" );
+    if ( (aMethod.CompareF(KGet)==0) || (aMethod.CompareF(KHead)==0) )
+        {
+        aResultTrans = CUpnpHttpServerTransactionDescription::NewL( *this, aSender, aUri );
+        }
+    else
+        {
+        User::Leave( KErrGeneral );//bad request
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpServerTransactionHandler::GetFileL
+//
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpServerTransactionHandler::GetFileL( RFile& aFile,
+        const TDesC8& aUri, const TInetAddr& aInetAdress )
+    {
+    
+    CUpnpDeviceDescriptionRequest* request = CUpnpDeviceDescriptionRequest::NewL( aUri, aInetAdress );    
+    TInt error = KErrNone;
+    
+    switch ( MatchType( aUri ) )
+        {
+        case EDevice:
+            error = iDevice.DescritptionProvider().OnDeviceDescription( *request );
+            break;        
+        case EService:
+            error = iDevice.DescritptionProvider().OnServiceDescription( *request );
+            break;        
+        case EIcon:
+            error = iDevice.DescritptionProvider().OnIcon( *request );
+            break;        
+        default:
+            error = -EHttpNotFound;            
+            break;
+        }
+    delete request;
+    request = NULL;
+    
+    if( KErrNone == error )
+        {
+        if ( KErrNone != iDevice.DescritptionProvider().GetFile( aUri, aFile ) )
+            {
+            error = -EHttpNotFound;
+            }
+        }
+    else
+        {
+        error = -EHttpNotFound;
+        }
+    
+    return error;
+    }
+
+// -----------------------------------------------------------------------------
+//  CUpnpHttpServerTransactionHandler::MatchType
+//
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpServerTransactionHandler::TDescriptionType 
+              CUpnpHttpServerTransactionHandler::MatchType( const TDesC8& aUri )
+    {
+    if ( aUri.CompareF( iDevice.DescriptionUrl() ) == 0 )
+        {
+        return EDevice;
+        }
+
+    //1st check if url is service url
+    RPointerArray<CUpnpService> servList =
+                 iDevice.ServiceList();
+    TInt count = servList.Count();
+    for( TInt index = 0; index < count; index++ )
+        {
+        if( servList[ index ]->ServiceDescriptionUrl().CompareF( aUri ) == 0 )
+            {
+            return EService;
+            }
+        }
+    //next check icon list
+    RPointerArray<CUpnpIcon> iconList =
+                 iDevice.Icons();
+    count = iconList.Count();
+    for( TInt index2 = 0; index2 < count; index2++ )
+        {
+        if( iconList[ index2 ]->Url().CompareF( aUri ) == 0 )
+            {
+            return EIcon;
+            }
+        }
+    return ENotFound;
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnphttptransaction.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,108 @@
+/** @file
+* 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:  Definition of the CUpnpHttpTransaction class
+*
+*/
+
+
+#include <upnphttpmessage.h>
+#include <upnpcons.h>
+#include <upnphttpmessagefactory.h>
+
+#include "upnphttptransaction.h"
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpTransaction::BaseConstructL
+// Second phase constructor intended to use by child classes.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpTransaction::BaseConstructL()
+    {
+    iHttpRequest->AddPairL( UpnpHTTP::KConnection, UpnpHTTP::KClose );
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpTransaction::CUpnpHttpTransaction
+// Constructs object of transaction and takes ownership of request object
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpTransaction::CUpnpHttpTransaction( CUpnpHttpMessage* aRequest ):
+    iHttpRequest( aRequest )
+    {
+    ASSERT( NULL != aRequest );
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpTransaction::~CUpnpHttpTransaction
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpTransaction::~CUpnpHttpTransaction()
+    {
+    delete iHttpRequest;
+    delete iHttpResponse;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpTransaction::Request
+// Returns request message of transaction
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* CUpnpHttpTransaction::Request()
+    {
+    return iHttpRequest;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpTransaction::Response
+// Returns response message of transaction
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* CUpnpHttpTransaction::Response()
+    {
+    return iHttpResponse;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpTransaction::CreateOkResponseL
+// Creates ok response for the request
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpTransaction::CreateOkResponseL( const TDesC8& aResponseBody )
+    {
+    ASSERT( NULL == iHttpResponse );    //only one ok response is allowed
+    iHttpResponse = RUpnpHttpMessageFactory::HttpResponseOkL( iHttpRequest );
+    iHttpResponse->SetBodyL( aResponseBody );
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpHttpTransaction::CreateFaultResponseL
+// Creates timeout response for the request
+// ----------------------------------------------------------------------------
+//
+void CUpnpHttpTransaction::CreateFaultResponseL( const TDesC8& aResponseBody, 
+                                                 TInt aStatus, 
+                                                 TInt aError )
+    {
+    delete iHttpResponse;
+    iHttpResponse = NULL;
+    iHttpResponse = RUpnpHttpMessageFactory::HttpResponseErrorL(
+        iHttpRequest, aStatus );
+    iHttpResponse->SetInternalError( aError );
+    iHttpResponse->SetBodyL( aResponseBody );
+    }
+
+
+//end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpicon.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,606 @@
+/** @file
+* 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:  Declares CUpnpIcon class
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "upnpicon.h"
+#include "upnpstring.h"
+#include "upnpargument.h"
+#include "upnpserviceimplementation.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::CUpnpIcon
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpIcon::CUpnpIcon():iSendBufferPtr(0,0)
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::ConstructL( )
+{
+    iFilename.Zero();
+    
+    iSendBuffer = ToDes8L();
+    iSendBufferPtr.Set(iSendBuffer->Des());
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::ConstructL(const TDesC16& aPath, const TDesC8& aUrl, const TInt aWidth, const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType)
+{
+    iFilename.Zero();
+    SetBitmapFilename(aPath);
+    SetUrlL(aUrl);
+    SetWidthL(aWidth);
+    SetHeightL(aHeight);
+    SetDepthL(aDepth);
+    SetMimeTypeL(aMimeType);
+    
+    iSendBuffer = ToDes8L();
+    iSendBufferPtr.Set(iSendBuffer->Des());
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::ConstructL(const TDesC16& aPath, const TInt aWidth, const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType)
+{
+    iFilename.Zero();
+    SetBitmapFilename(aPath);
+    SetWidthL(aWidth);
+    SetHeightL(aHeight);
+    SetDepthL(aDepth);
+    SetMimeTypeL(aMimeType);
+    
+    iSendBuffer = ToDes8L();
+    iSendBufferPtr.Set(iSendBuffer->Des());
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpIcon* CUpnpIcon::NewL(  )
+{
+    CUpnpIcon* self = new (ELeave) CUpnpIcon();
+    CleanupStack::PushL( self );
+    self->ConstructL(  );
+    CleanupStack::Pop( self );
+    return self;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpIcon* CUpnpIcon::NewL(const TDesC16& aPath, const TDesC8& aUrl, const TInt aWidth, const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType)
+{
+    CUpnpIcon* self = new (ELeave) CUpnpIcon();
+    CleanupStack::PushL( self );
+    self->ConstructL( aPath, aUrl, aWidth, aHeight, aDepth, aMimeType  );
+    CleanupStack::Pop( self );
+    return self;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpIcon* CUpnpIcon::NewL(const TDesC16& aPath, const TInt aWidth, const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType)
+{
+    CUpnpIcon* self = new (ELeave) CUpnpIcon();
+    CleanupStack::PushL( self );
+    self->ConstructL( aPath, aWidth, aHeight, aDepth, aMimeType  );
+    CleanupStack::Pop( self );
+    return self;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::~CUpnpIcon
+// Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpIcon::~CUpnpIcon()
+{
+    iProperties.ResetAndDestroy();
+    iProperties.Close();
+    
+    if(iSendBuffer)
+    {
+        delete iSendBuffer;
+    }
+    //TRAP_IGNORE( DeleteIconFromFsL());
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::Url
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpIcon::Url() const
+{
+    TInt index = 0;
+    
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KUrl().Compare( var->Name() ) == KErrNone )
+        {
+            return var->Value();
+        }
+        
+        index++;
+    }
+    
+    return KNullDesC8();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::SetUrlL
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpIcon::SetUrlL(const TDesC8& aUrl)
+{
+    TInt index = 0;
+     
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KUrl().Compare( var->Name() ) == KErrNone )
+        {
+            var->SetValueL(aUrl);
+            return;
+        }
+        
+        index++;
+    }
+    CUpnpDescriptionProperty* prop = CUpnpDescriptionProperty::NewL(KUrl, aUrl);
+    iProperties.AppendL(prop);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::GetIconBufferPtr
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtr8& CUpnpIcon::GetIconBufferPtr() const
+{
+	return iSendBufferPtr;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::BitmapFilename
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TFileName CUpnpIcon::BitmapFilename() const
+{
+    return iFilename;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::SetBitmapFilename
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpIcon::SetBitmapFilename( const TDesC& aName )
+{
+    iFilename.Zero();
+    iFilename.Append( aName );  
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::Width
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpIcon::Width() const
+{
+    TInt index = 0;
+    
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KWidth().Compare( var->Name() ) == KErrNone )
+        {
+            TLex8 val(var->Value());
+            TInt ret(0);
+            TInt err = val.Val( ret );
+            if(err == KErrNone)
+                return ret;
+            else
+                return err;
+        }
+        
+        index++;
+    }
+    
+    return KErrNotFound;    
+}
+
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::WidthTPtrC8
+//
+// -----------------------------------------------------------------------------
+//
+TPtrC8 CUpnpIcon::WidthTPtrC8() const
+{
+    TInt index = 0;
+    
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KWidth().Compare( var->Name() ) == KErrNone )
+        {
+            return var->Value();
+        }
+        
+        index++;
+    }
+    
+     return KNullDesC8();    
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::SetWidthL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::SetWidthL(TInt aWidth) 
+{
+    TInt index = 0;
+    TBuf8<KMaxNumberPropertySize> nbuf;
+    nbuf.Num(aWidth);
+     
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KWidth().Compare( var->Name() ) == KErrNone )
+        {
+            var->SetValueL(nbuf);
+            return;
+        }
+        
+        index++;
+    }
+    CUpnpDescriptionProperty* prop = CUpnpDescriptionProperty::NewL(KWidth, nbuf);
+    iProperties.AppendL(prop);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::Depth
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpIcon::Depth() const
+{
+    TInt index = 0;
+    
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KDepth().Compare( var->Name() ) == KErrNone )
+        {
+            TLex8 val(var->Value());
+            TInt ret(0);
+            TInt err = val.Val( ret );
+            if(err == KErrNone)
+                return ret;
+            else
+                return err;
+        }
+        
+        index++;
+    }
+    
+    return KErrNotFound;    
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::DepthTPtrC8
+//
+// -----------------------------------------------------------------------------
+//
+TPtrC8 CUpnpIcon::DepthTPtrC8() const
+{
+    TInt index = 0;
+    
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KDepth().Compare( var->Name() ) == KErrNone )
+        {
+            return var->Value();
+        }
+        
+        index++;
+    }
+    
+     return KNullDesC8();   
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::SetDepthL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::SetDepthL(TInt aDepth) 
+{
+    TInt index = 0;
+    TBuf8<KMaxNumberPropertySize> nbuf;
+    nbuf.Num(aDepth);
+     
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KDepth().Compare( var->Name() ) == KErrNone )
+        {
+            var->SetValueL(nbuf);
+            return;
+        }
+        
+        index++;
+    }
+    CUpnpDescriptionProperty* prop = CUpnpDescriptionProperty::NewL(KDepth, nbuf);
+    iProperties.AppendL(prop);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::Height
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpIcon::Height() const
+{
+    TInt index = 0;
+    
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KHeight().Compare( var->Name() ) == KErrNone )
+        {
+            TLex8 val(var->Value());
+            TInt ret(0);
+            TInt err = val.Val( ret );
+            if(err == KErrNone)
+                return ret;
+            else
+                return err;
+        }
+        
+        index++;
+    }
+    
+    return KErrNotFound;    
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::HeightTPtrC8
+//
+// -----------------------------------------------------------------------------
+//
+TPtrC8 CUpnpIcon::HeightTPtrC8() const
+{
+    TInt index = 0;
+    
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KHeight().Compare( var->Name() ) == KErrNone )
+        {
+            return var->Value();
+        }
+        
+        index++;
+    }
+    
+     return KNullDesC8();   
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::SetHeightL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::SetHeightL(TInt aHeight)
+{
+    TInt index = 0;
+    TBuf8<KMaxNumberPropertySize> nbuf;
+    nbuf.Num(aHeight);
+     
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KHeight().Compare( var->Name() ) == KErrNone )
+        {
+            var->SetValueL(nbuf);
+            return;
+        }
+        
+        index++;
+    }
+    CUpnpDescriptionProperty* prop = CUpnpDescriptionProperty::NewL(KHeight, nbuf);
+    iProperties.AppendL(prop);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::MimeType
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpIcon::MimeType() const
+{
+    TInt index = 0;
+    
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KMimeType().Compare( var->Name() ) == KErrNone )
+        {
+            return var->Value();
+        }
+        
+        index++;
+    }
+    
+    return KNullDesC8();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::SetMimeTypeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::SetMimeTypeL(const TDesC8& aMimeType)
+{
+
+    TInt index = 0;
+     
+    while ( index < iProperties.Count() )
+    {
+        CUpnpDescriptionProperty* var = iProperties[index];
+        
+        if ( KMimeType().Compare( var->Name() ) == KErrNone )
+        {
+            var->SetValueL(aMimeType);
+            return;
+        }
+        
+        index++;
+    }
+    CUpnpDescriptionProperty* prop = CUpnpDescriptionProperty::NewL(KMimeType, aMimeType);
+    iProperties.AppendL(prop);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::DeleteIconFromFsL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::DeleteIconFromFsL()
+{
+    RFs fs;
+    User::LeaveIfError( fs.Connect() );
+    fs.Delete(iFilename);
+    fs.Close();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::AddPropertyL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpIcon::AddPropertyL( CUpnpDescriptionProperty* aProperty )
+    {
+    iProperties.AppendL( aProperty);
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpIcon::ExternalizeL
+//
+// -----------------------------------------------------------------------------
+//    
+void CUpnpIcon::ExternalizeL( RWriteStream& aStream ) const  
+{	
+    aStream << BitmapFilename();
+    aStream << Url();
+    aStream.WriteInt8L(Width());
+    aStream.WriteInt8L(Height());
+    aStream.WriteInt8L(Depth());
+    aStream << MimeType();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpIcon::InternalizeL
+//
+// -----------------------------------------------------------------------------
+//      
+EXPORT_C  void CUpnpIcon::InternalizeL( RReadStream& aStream ) 
+{
+    SetBitmapFilename(HBufC16::NewLC( aStream, KMaxFileName)->Des());
+    SetUrlL(HBufC8::NewLC( aStream, KMaxFileName)->Des());
+    SetWidthL(aStream.ReadInt8L());
+    SetHeightL(aStream.ReadInt8L());
+    SetDepthL(aStream.ReadInt8L());
+    SetMimeTypeL(HBufC8::NewLC( aStream, KMaxMimeTypeSize)->Des());
+    
+    CleanupStack::PopAndDestroy(3);
+}
+   
+// -----------------------------------------------------------------------------
+// CUpnpIcon::ToDes8L
+//
+// -----------------------------------------------------------------------------
+//     
+EXPORT_C HBufC8* CUpnpIcon::ToDes8L() const
+{
+ // serialize object
+    CBufFlat* buf = CBufFlat::NewL(KDefBuffer);
+    CleanupStack::PushL(buf);
+    RBufWriteStream stream(*buf); 
+    CleanupClosePushL(stream);
+    
+    stream << *this;
+    
+    // create heap descriptor
+    HBufC8* hbuf = HBufC8::NewLC(buf->Size());
+    TPtr8 ptr(hbuf->Des());
+    buf->Read(0, ptr, buf->Size());
+    
+    // clean up
+    CleanupStack::Pop(hbuf);
+    CleanupStack::PopAndDestroy(&stream);
+    CleanupStack::PopAndDestroy(buf);
+    
+    return hbuf;
+    	
+}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpiconcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,205 @@
+/** @file
+* 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 the CUpnpIconContentHandler class
+ *
+*/
+
+
+#include "upnpiconcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpicon.h"
+#include "upnpdeviceliterals.h"
+
+//const TUint8 KReqiuredTagsBoundary(31) //first five bits
+enum TFlagsPositions
+    {
+    EMimetypePos = 0,
+    EWidthPos,
+    EHeightPos,
+    EDepthPos,
+    EUrlPos //all required
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpIconContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpIconContentHandler* CUpnpIconContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpIcon& aResultIcon )
+    {
+    CUpnpIconContentHandler* iconContentHandler = 
+        CUpnpIconContentHandler::NewLC( aController, aResultIcon );
+    CleanupStack::Pop( iconContentHandler );
+    return iconContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpIconContentHandler* CUpnpIconContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpIcon& aResultIcon )
+    {
+    CUpnpIconContentHandler* iconContentHandler = 
+        new (ELeave) CUpnpIconContentHandler( aController, aResultIcon );
+    CleanupStack::PushL( iconContentHandler );
+    return iconContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconContentHandler::~CUpnpIconContentHandler
+// Destructor of CUpnpIconContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpIconContentHandler::~CUpnpIconContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconContentHandler::CUpnpIconContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpIconContentHandler::CUpnpIconContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpIcon& aResultIcon ) :
+    CUpnpContentHandler( aController ), iResultIcon( aResultIcon ),
+            iCurrentState( EInitial )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIconContentHandler::OnStartElementL( const RTagInfo& aElement,
+    const RAttributeArray& /*aAttributes*/)
+    {
+    if ( EInitial == iCurrentState  )
+        {
+        const TDesC8& elementName(aElement.LocalName().DesC() );
+        if ( elementName.Compare( KUpnpMimetype ) == 0 )
+            {
+            //            RepeatedTagCheckL( EMimetypePos, iFoundTags ) NIY
+            iCurrentState = EMimeType;
+            }
+        else if ( elementName.Compare( KUpnpWidth ) == 0 )
+            {
+            //            RepeatedTagCheckL( EWidthPos, iFoundTags )    NIY
+            iCurrentState = EWidth;
+            }
+        else if ( elementName.Compare( KUpnpHeight ) == 0 )
+            {
+            //            RepeatedTagCheckL( EHeightPos, iFoundTags )   NIY
+            iCurrentState = EHeight;
+            }
+        else if ( elementName.Compare( KUpnpDepth ) == 0 )
+            {
+            //            RepeatedTagCheckL( EDepthPos, iFoundTags )    NIY
+            iCurrentState = EDepth;
+            }
+        else if ( elementName.Compare( KUpnpUrl ) == 0 )
+            {
+            //            RepeatedTagCheckL( EUrlPos, iFoundTags )      NIY
+            iCurrentState = EUrl;
+            }
+        else
+            {
+            SetIgnoreHandlerL();
+            }
+        }
+    else
+        {
+        //User::Leave( KErrArgument )    
+        SetIgnoreHandlerL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIconContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    switch ( iCurrentState )
+        {
+        case EInitial:
+            ASSERT( aElement.LocalName().DesC().Compare( KUpnpIcon )==0 );
+            //if ( (iFoundTags.iFlags & KReqiuredTagsBoundary) == KReqiuredTagsBoundary )
+            //{
+            iController.SetPreviousContentHandler();
+            //}
+            //else
+            //{
+            //User::Leave( KErrArgument )    //required tag not found
+            //}
+            break;
+        default:
+            iCurrentState = EInitial;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIconContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    switch ( iCurrentState )
+        {
+        case EMimeType:
+            iResultIcon.SetMimeTypeL( aBytes );
+            break;
+        case EWidth:
+            iResultIcon.SetWidthL( ParseIntL( aBytes ) );
+            break;
+        case EHeight:
+            iResultIcon.SetHeightL( ParseIntL( aBytes ) );
+            break;
+        case EDepth:
+            iResultIcon.SetDepthL( ParseIntL( aBytes ) );
+            break;
+        case EUrl:
+            iResultIcon.SetUrlL( aBytes );
+            break;
+        default:
+            ASSERT( EInitial == iCurrentState );
+            //User::Leave(KErrArgument) 
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconContentHandler::ParseIntL
+// Parses and returns int value stored in descriptor, or leaves with KErrArgument
+// if parsing failes.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpIconContentHandler::ParseIntL( const TDesC8& aToParse )
+    {
+    TLex8 val(aToParse);
+    TInt ret(0);
+    TInt err = val.Val( ret );
+    //    if ( err )
+    //        {
+    //        User::Leave( KErrArgument ) no error checking for now
+    //        }
+    return ret;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpiconlistcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,121 @@
+/** @file
+* 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 the CUpnpIconListContentHandler class
+ *
+*/
+
+
+#include "upnpiconlistcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpiconcontenthandler.h"
+#include "upnpicon.h"
+#include "upnpdevice.h"
+#include "upnpdeviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpIconListContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpIconListContentHandler* CUpnpIconListContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice )
+    {
+    CUpnpIconListContentHandler* iconListContentHandler = 
+        CUpnpIconListContentHandler::NewLC( aController, aResultDevice );
+    CleanupStack::Pop( iconListContentHandler );
+    return iconListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconListContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpIconListContentHandler* CUpnpIconListContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice )
+    {
+    CUpnpIconListContentHandler* iconListContentHandler = 
+        new (ELeave) CUpnpIconListContentHandler( aController, aResultDevice );
+    CleanupStack::PushL( iconListContentHandler );
+    return iconListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconListContentHandler::~CUpnpIconListContentHandler
+// Destructor of CUpnpIconListContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpIconListContentHandler::~CUpnpIconListContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconListContentHandler::CUpnpIconListContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpIconListContentHandler::CUpnpIconListContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice ) :
+    CUpnpContentHandler( aController ), iResultDevice( aResultDevice )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconListContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIconListContentHandler::OnStartElementL( const RTagInfo& aElement,
+    const RAttributeArray& /*aAttributes*/)
+    {
+    if ( aElement.LocalName().DesC().Compare( KUpnpIcon ) == 0 )
+        {
+        CUpnpIcon* icon = CUpnpIcon::NewL();
+        CleanupStack::PushL( icon );
+        iResultDevice.AddIconL( icon );
+        CleanupStack::Pop( icon );
+
+        iController.SetCurrentContentHandlerL( CUpnpIconContentHandler::NewL(
+            iController, *icon ) );
+        }
+    else
+        {
+        SetIgnoreHandlerL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconListContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIconListContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare( KUpnpIconList ) == 0 );
+    iController.SetPreviousContentHandler();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIconListContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpIconListContentHandler::OnContentL( const TDesC8& /*aBytes*/)
+    {
+    //User::Leave( KErrArgument )    
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpignorecontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,96 @@
+/** @file
+* 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 the CUpnpIgnoreContentHandler class
+ *
+*/
+
+
+#include "upnpignorecontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpIgnoreContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpIgnoreContentHandler* CUpnpIgnoreContentHandler::NewL(
+    CUpnpContentHandlersController& aController )
+    {
+    CUpnpIgnoreContentHandler* dummyContentHandler = 
+        CUpnpIgnoreContentHandler::NewLC( aController );
+    CleanupStack::Pop( dummyContentHandler );
+    return dummyContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIgnoreContentHandler::NewLC
+// Two-phased constructor. Leaves the object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpIgnoreContentHandler* CUpnpIgnoreContentHandler::NewLC(
+    CUpnpContentHandlersController& aController )
+    {
+    CUpnpIgnoreContentHandler* dummyContentHandler = 
+        new (ELeave) CUpnpIgnoreContentHandler( aController );
+    CleanupStack::PushL( dummyContentHandler );
+    return dummyContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIgnoreContentHandler::OnStartElementL( const RTagInfo& /*aElement*/, 
+    const RAttributeArray& /*aAttributes*/ )
+    {
+    ++iOpenedTagCounter;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIgnoreContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIgnoreContentHandler::OnEndElementL( const RTagInfo& /*aElement*/ )
+    {
+    ASSERT( iOpenedTagCounter > 0 );
+    --iOpenedTagCounter;
+    if ( iOpenedTagCounter == 0 )
+        {
+        iController.SetPreviousContentHandler();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpIgnoreContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpIgnoreContentHandler::OnContentL( const TDesC8& /*aBytes*/ )
+    {
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpIgnoreContentHandler::CUpnpIgnoreContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpIgnoreContentHandler::CUpnpIgnoreContentHandler(
+    CUpnpContentHandlersController& aController ) :
+    CUpnpContentHandler( aController ), iOpenedTagCounter( 1 )
+    {
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpinitialeventqueuemanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,160 @@
+/** @file
+* 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:  Implements algoritms for initial events
+*
+*/
+
+
+#include "upnpinitialeventqueuemanager.h"
+#include "upnpgenamessagefactory.h"
+#include "upnphttpinitialeventtransaction.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcommonstructs.h"
+
+
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::CUpnpInitialEventQueueManager
+// -----------------------------------------------------------------------------
+//
+CUpnpInitialEventQueueManager::CUpnpInitialEventQueueManager( 
+                                            CUpnpServiceImplementation& aServiceImpl,
+                                            CUpnpEventController& aEventController,
+                                            CUpnpSubscriberLibrary* aSubscriberLibrary
+                                                             )
+    :CUpnpEventQueueManagerBase( aServiceImpl, aEventController, aSubscriberLibrary )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::~CUpnpInitialEventQueueManager
+// -----------------------------------------------------------------------------
+//
+CUpnpInitialEventQueueManager::~CUpnpInitialEventQueueManager()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::NewLC
+// -----------------------------------------------------------------------------
+//
+CUpnpInitialEventQueueManager* CUpnpInitialEventQueueManager::NewLC( 
+                                           CUpnpServiceImplementation& aServiceImpl,
+                                           CUpnpEventController& aEventController,
+                                           CUpnpSubscriberLibrary* aSubscriberLibrary 
+                                                                    )
+    {
+    CUpnpInitialEventQueueManager* self = 
+        new (ELeave) CUpnpInitialEventQueueManager( aServiceImpl, 
+                                                    aEventController, 
+                                                    aSubscriberLibrary );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::NewL
+// -----------------------------------------------------------------------------
+//    
+CUpnpInitialEventQueueManager* CUpnpInitialEventQueueManager::NewL( 
+                                          CUpnpServiceImplementation& aServiceImpl,
+                                          CUpnpEventController& aEventController,
+                                          CUpnpSubscriberLibrary* aSubscriberLibrary 
+                                                                   )
+    {
+    CUpnpInitialEventQueueManager* self= CUpnpInitialEventQueueManager::NewLC( 
+                                                            aServiceImpl, 
+                                                            aEventController, 
+                                                            aSubscriberLibrary 
+                                                                              );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpInitialEventQueueManager::ConstructL()
+    {
+    BaseConstructL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::SendEvent
+// -----------------------------------------------------------------------------
+//
+void CUpnpInitialEventQueueManager::SendEvent()
+    {
+    TRAP_IGNORE( SendEventL() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::SendEventL
+// -----------------------------------------------------------------------------
+//   
+void CUpnpInitialEventQueueManager::SendEventL()
+    {
+    // Initial event is sent to subscriber which is last on the list
+    // it has been just added into it
+    //
+    TInt lastSubscriberIndex( iSubscriberLibrary->SubscriberLibrary().Count() - 1 );
+    
+    if ( iBody )
+        {
+        delete iBody;
+        iBody =NULL;
+        }
+         
+    iBody = CreateEventL( iServiceImpl.StateVariableList() );
+    
+    PrepareTransactionAndStartSendingL( lastSubscriberIndex );   
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::CreateTransactionL
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpTransaction* CUpnpInitialEventQueueManager::CreateTransactionL( CUpnpHttpMessage* aMessage )
+    {
+    return CUpnpHttpInitialEventTransaction::NewL( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpInitialEventQueueManager::FillEventBody
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpInitialEventQueueManager::FillEventBodyL( TDes8& aEvent, 
+                                              const RPointerArray<CUpnpStateVariable>& aVariableList 
+                                                   )
+    {
+    TInt eventableVariableCount(0);        
+    for ( TInt i = 0; i < aVariableList.Count(); i++ )
+        {
+        if (   aVariableList[i]->Eventable().CompareF( KYes() ) == 0 
+            && aVariableList[i]->ReadyForEventing() )
+            {                            
+            AddVariableToEventBody( aEvent , aVariableList[i] );
+        
+            eventableVariableCount++;
+            }  
+        }
+    return eventableVariableCount;
+    }
+//end if file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpmoderatedeventqueuemanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,213 @@
+/** @file
+* 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:  Implements algoritms for modereted events
+*
+*/
+
+
+#include "upnpmoderatedeventqueuemanager.h"
+#include "upnpgenamessagefactory.h"
+#include "upnpsubscriberlibraryelement.h"
+#include "upnphttpmoderatedeventtransaction.h"
+#include "upnpnotifytimer.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::CUpnpModeratedEventQueueManager
+// -----------------------------------------------------------------------------
+//
+CUpnpModeratedEventQueueManager::CUpnpModeratedEventQueueManager( 
+                                        CUpnpServiceImplementation& aServiceImpl,
+                                        CUpnpEventController& aEventController,
+                                        CUpnpSubscriberLibrary* aSubscriberLibrary
+                                                                )
+    :CUpnpEventQueueManagerBase( aServiceImpl, aEventController , aSubscriberLibrary )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::~CUpnpModeratedEventQueueManager
+// -----------------------------------------------------------------------------
+//
+CUpnpModeratedEventQueueManager::~CUpnpModeratedEventQueueManager()
+    {
+    delete iModerationTimer;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::CUpnpModeratedEventQueueManager
+// -----------------------------------------------------------------------------
+//
+CUpnpModeratedEventQueueManager* CUpnpModeratedEventQueueManager::NewLC( 
+                                        CUpnpServiceImplementation& aServiceImpl,
+                                        CUpnpEventController& aEventController,
+                                        CUpnpSubscriberLibrary* aSubscriberLibrary 
+                                                                        )
+    {
+    CUpnpModeratedEventQueueManager* self = 
+        new (ELeave) CUpnpModeratedEventQueueManager( aServiceImpl, 
+                                                      aEventController, 
+                                                      aSubscriberLibrary 
+                                                     );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::NewL
+// -----------------------------------------------------------------------------
+//
+CUpnpModeratedEventQueueManager* CUpnpModeratedEventQueueManager::NewL( 
+                                       CUpnpServiceImplementation& aServiceImpl,
+                                       CUpnpEventController& aEventController,
+                                       CUpnpSubscriberLibrary* aSubscriberLibrary 
+                                                                       )
+    {
+    CUpnpModeratedEventQueueManager* self=
+            CUpnpModeratedEventQueueManager::NewLC( aServiceImpl, 
+                                                    aEventController, 
+                                                    aSubscriberLibrary );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpModeratedEventQueueManager::ConstructL()
+    {
+    BaseConstructL();
+    iModerationTimer = CUpnpNotifyTimer::NewL( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::StartSendingEventL
+// -----------------------------------------------------------------------------
+//    
+void CUpnpModeratedEventQueueManager::StartSendingEventL()
+    {
+    if ( !iSubscriberLibrary->SubscriberLibrary().Count() )
+        {
+        return;
+        }
+    
+    if ( iIsSending ) 
+        {
+        iNewValuesWaitingToBeSend = ETrue;
+        return;
+        }
+    
+    iIsSending = ETrue;
+     
+    iCurrentSubscriberIndex = 0;
+    for ( TInt i = 0; i < iServiceImpl.EventedStateVariables().Count(); i++ )
+        {
+        if ( iServiceImpl.EventedStateVariables()[i]->MaxEventRate() > 0 )
+            {
+            iServiceImpl.EventedStateVariables()[i]->EventTick();
+            }
+        }    
+
+    delete iBody;
+    iBody = NULL;
+      
+    iBody = CreateEventL( iServiceImpl.StateVariableList() );
+    ClearVariables();
+        
+    PrepareTransactionAndStartSendingL( KFirstSubscriberInQueue );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::SendEvent
+// -----------------------------------------------------------------------------
+//
+void CUpnpModeratedEventQueueManager::SendEvent()
+    {
+    if ( ! iSubscriberLibrary->SubscriberLibrary().Count() )
+        {
+        return;
+        }
+    
+    iModerationTimer->Cancel();
+    iModerationTimer->After( KMaxEventRate ); 
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::CreateTransactionL
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpTransaction* CUpnpModeratedEventQueueManager::CreateTransactionL( CUpnpHttpMessage* aMessage )
+    {
+    return CUpnpHttpModeratedEventTransaction::NewL( aMessage, *this );
+    }
+ 
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::WaitBeforeSending
+// -----------------------------------------------------------------------------
+//
+void CUpnpModeratedEventQueueManager::WaitBeforeSending()
+    {
+    iModerationTimer->Cancel();
+    iModerationTimer->After( KMaxEventRate );   
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::FillEventBodyL
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpModeratedEventQueueManager::FillEventBodyL( TDes8& aEvent, 
+                                                 const RPointerArray<CUpnpStateVariable>& aVariableList 
+                                                     )
+    {
+    TInt eventableVariableCount(0);        
+    for ( TInt i = 0; i < aVariableList.Count(); i++ )
+        {
+        if (   aVariableList[i]->Eventable().CompareF( KYes() ) == 0 
+            && aVariableList[i]->ReadyForEventing() 
+            && aVariableList[i]->IsModerated()  )
+            {                            
+            AddVariableToEventBody( aEvent , aVariableList[i] );
+                                              
+            iServiceImpl.StateVariableEvented( aVariableList[i]->Name() );        
+            eventableVariableCount++;
+            }  
+        }
+    return eventableVariableCount;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpModeratedEventQueueManager::TimerEventL
+// -----------------------------------------------------------------------------
+//
+void CUpnpModeratedEventQueueManager::TimerEventL( CUpnpNotifyTimer* /*aTimer*/ )
+    {
+    if ( iModerationTimer->iStatus.Int() == KErrNone )
+        {
+        if ( !iIsSending )  
+            {
+            TRAPD( err ,StartSendingEventL() );
+            if( err )
+                {
+                SendingCompleted();
+                }
+            }
+        else
+            {
+            WaitBeforeSending();
+            }
+        }
+    }
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpnonmoderatedeventqueuemanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,180 @@
+/** @file
+* 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:  Implements algoritms for nonmodereted events
+*
+*/
+
+
+#include "upnpnonmoderatedeventqueuemanager.h"
+#include "upnpgenamessagefactory.h"
+#include "upnphttpnonmoderatedeventtransaction.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcommonstructs.h"
+
+
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::CUpnpNonModeratedEventQueueManager
+// -----------------------------------------------------------------------------
+//
+CUpnpNonModeratedEventQueueManager::CUpnpNonModeratedEventQueueManager( 
+                                                     CUpnpServiceImplementation& aServiceImpl,
+                                                     CUpnpEventController& aEventController,
+                                                     CUpnpSubscriberLibrary* aSubscriberLibrary
+                                                                       )
+    :CUpnpEventQueueManagerBase( aServiceImpl, aEventController , aSubscriberLibrary )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::~CUpnpNonModeratedEventQueueManager
+// -----------------------------------------------------------------------------
+//
+CUpnpNonModeratedEventQueueManager::~CUpnpNonModeratedEventQueueManager()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::NewLC
+// -----------------------------------------------------------------------------
+//
+CUpnpNonModeratedEventQueueManager* CUpnpNonModeratedEventQueueManager::NewLC( 
+                                           CUpnpServiceImplementation& aServiceImpl,
+                                           CUpnpEventController& aEventController,
+                                           CUpnpSubscriberLibrary* aSubscriberLibrary 
+                                                                              )
+    {
+    CUpnpNonModeratedEventQueueManager* self = 
+                 new (ELeave) CUpnpNonModeratedEventQueueManager( aServiceImpl, 
+                                                                  aEventController, 
+                                                                  aSubscriberLibrary );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::NewL
+// -----------------------------------------------------------------------------
+//    
+CUpnpNonModeratedEventQueueManager* CUpnpNonModeratedEventQueueManager::NewL( 
+                                            CUpnpServiceImplementation& aServiceImpl,
+                                            CUpnpEventController& aEventController,
+                                            CUpnpSubscriberLibrary* aSubscriberLibrary 
+                                                                            )
+    {
+    CUpnpNonModeratedEventQueueManager* self= CUpnpNonModeratedEventQueueManager::NewLC( 
+                                                            aServiceImpl, 
+                                                            aEventController, 
+                                                            aSubscriberLibrary );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpNonModeratedEventQueueManager::ConstructL()
+    {
+    BaseConstructL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::SendEvent
+// -----------------------------------------------------------------------------
+//
+void CUpnpNonModeratedEventQueueManager::SendEvent()
+    {
+    TRAPD( err, SendEventL() );
+    if( err )
+        {
+        SendingCompleted();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::SendEventL
+// -----------------------------------------------------------------------------
+//   
+void CUpnpNonModeratedEventQueueManager::SendEventL()
+    {
+    if ( ! iSubscriberLibrary->SubscriberLibrary().Count() )
+        {
+        return;
+        }
+     
+    if ( iIsSending ) 
+        {
+        iNewValuesWaitingToBeSend = ETrue;
+        return;
+        }
+    
+    iIsSending = ETrue;
+     
+    iCurrentSubscriberIndex = 0;
+    for ( TInt i = 0; i < iServiceImpl.EventedStateVariables().Count(); i++ )
+        {
+        if ( iServiceImpl.EventedStateVariables()[i]->MaxEventRate() > 0 )
+            {
+            iServiceImpl.EventedStateVariables()[i]->EventTick();
+            }
+        }
+            
+    delete iBody;
+    iBody =NULL;
+         
+    iBody = CreateEventL( iServiceImpl.StateVariableList() );
+        
+    PrepareTransactionAndStartSendingL( KFirstSubscriberInQueue );
+    }
+
+   
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::CreateTranscationL
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpTransaction* CUpnpNonModeratedEventQueueManager::CreateTransactionL( CUpnpHttpMessage* aMessage )
+    {
+    return CUpnpHttpNonModeratedEventTransaction::NewL( aMessage, *this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNonModeratedEventQueueManager::FillEventBodyL
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpNonModeratedEventQueueManager::FillEventBodyL( TDes8& aEvent, 
+                                                   const RPointerArray<CUpnpStateVariable>& aVariableList 
+                                                       )
+    {
+    TInt eventableVariableCount(0);        
+    for ( TInt i = 0; i < aVariableList.Count(); i++ )
+        {
+        if (   aVariableList[i]->Eventable().CompareF( KYes() ) == 0 
+            && aVariableList[i]->ReadyForEventing() 
+            &&!aVariableList[i]->IsModerated() )
+            {                            
+            AddVariableToEventBody( aEvent , aVariableList[i] );
+                                              
+            iServiceImpl.StateVariableEvented( aVariableList[i]->Name() );        
+            eventableVariableCount++;
+            }  
+        }
+    return eventableVariableCount;
+    }
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnppropertysetcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,171 @@
+/** @file
+* 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 the CUpnpPropertysetContentHandler class
+ *
+*/
+
+
+#include "upnppropertysetcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpdescriptionproperty.h"
+#include "upnpsingletagcontenthandler.h"
+
+const TInt KDefaultPropertyLength( 32 );
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpPropertysetContentHandler* CUpnpPropertysetContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    RPointerArray<CUpnpDescriptionProperty>& aResultPropertyset )
+    {
+    CUpnpPropertysetContentHandler* propertysetContentHandler =
+        CUpnpPropertysetContentHandler::NewLC( aController, aResultPropertyset );
+    CleanupStack::Pop( propertysetContentHandler );
+    return propertysetContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpPropertysetContentHandler* CUpnpPropertysetContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    RPointerArray<CUpnpDescriptionProperty>& aResultPropertyset )
+    {
+    CUpnpPropertysetContentHandler* propertysetContentHandler =
+        new (ELeave) CUpnpPropertysetContentHandler( aController, aResultPropertyset );
+    CleanupStack::PushL( propertysetContentHandler );
+    propertysetContentHandler->ConstructL();
+    return propertysetContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::~CUpnpPropertysetContentHandler
+// Destructor of CUpnpPropertysetContentHandler class
+// -----------------------------------------------------------------------------
+//
+CUpnpPropertysetContentHandler::~CUpnpPropertysetContentHandler()
+    {
+    iCurrentPropertyKey.Close();
+    iCurrentPropertyValue.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::CUpnpPropertysetContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpPropertysetContentHandler::CUpnpPropertysetContentHandler(
+    CUpnpContentHandlersController& aController,
+    RPointerArray<CUpnpDescriptionProperty>& aResultPropertyset ) :
+    CUpnpContentHandler( aController ), iResultPropertyset( aResultPropertyset )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CUpnpPropertysetContentHandler::ConstructL()
+    {
+    iCurrentPropertyKey.CreateL( KDefaultPropertyLength );
+    iCurrentPropertyValue.CreateL( KDefaultPropertyLength );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpPropertysetContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+    {
+    if ( iIsInsidePropertyset )
+        {
+        if ( aElement.LocalName().DesC().Compare( KUpnpProperty ) == 0 )
+            {
+            StoreCurrentPropertyL();
+            iController.SetCurrentContentHandlerL( CUpnpSingleTagContentHandler::NewL(
+                iController, iCurrentPropertyKey, iCurrentPropertyValue ) );
+            }
+        else
+            {
+            SetIgnoreHandlerL();
+            }
+        }
+    else
+        {
+        if ( aElement.LocalName().DesC().Compare( KUpnpPropertyset ) == 0 )
+            {
+            iIsInsidePropertyset = ETrue;
+            }
+        else
+            {
+            User::Leave( KErrArgument ); //wrong root node
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpPropertysetContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    if ( iIsInsidePropertyset )
+        {
+        ASSERT( aElement.LocalName().DesC().Compare(KUpnpPropertyset) == 0 );
+        iIsInsidePropertyset = EFalse;
+        StoreCurrentPropertyL();
+        }
+    else
+        {
+        ASSERT( EFalse );   
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpPropertysetContentHandler::OnContentL( const TDesC8& /*aBytes*/)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpPropertysetContentHandler::StoreCurrentPropertyL
+// Store parsed current property values in result set, and reset its values.
+// -----------------------------------------------------------------------------
+//
+void CUpnpPropertysetContentHandler::StoreCurrentPropertyL()
+    {
+    if ( iCurrentPropertyKey.Length() > 0 )
+        {
+        CUpnpDescriptionProperty* currentProperty =
+            CUpnpDescriptionProperty::NewL( iCurrentPropertyKey, iCurrentPropertyValue );
+        CleanupStack::PushL( currentProperty );
+        iResultPropertyset.AppendL( currentProperty );
+        CleanupStack::Pop( currentProperty );
+        iCurrentPropertyKey.Zero();
+        iCurrentPropertyValue.Zero();
+        }
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnprootcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,167 @@
+/** @file
+* 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 the CUpnpRootContentHandler class
+ *
+*/
+
+
+#include "upnprootcontenthandler.h"
+#include "upnpdevice.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpdevicetagcontenthandler.h"
+#include "upnpdeviceliterals.h"
+
+const TUint8 KReqiuredTagsBoundary(1); //first bit    //specVersion ignored now
+enum TFlagsPositions
+    {
+    EDevicePos = 0,
+    //ESpecVersion, required but ignored for now...
+    EURLBasePos //optional
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpRootContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpRootContentHandler* CUpnpRootContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType )
+    {
+    CUpnpRootContentHandler* rootContentHandler = 
+        CUpnpRootContentHandler::NewLC( aController, aResultDevice, aParseType );
+    CleanupStack::Pop( rootContentHandler );
+    return rootContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRootContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpRootContentHandler* CUpnpRootContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType )
+    {
+    CUpnpRootContentHandler* rootContentHandler = 
+        new (ELeave) CUpnpRootContentHandler( aController, aResultDevice,
+                aParseType );
+    CleanupStack::PushL( rootContentHandler );
+    return rootContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRootContentHandler::~CUpnpRootContentHandler
+// Destructor of CUpnpRootContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpRootContentHandler::~CUpnpRootContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRootContentHandler::CUpnpRootContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpRootContentHandler::CUpnpRootContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice,
+    TParseType aParseType ) :
+    CUpnpContentHandler( aController ), iResultDevice( aResultDevice ),
+            iCurrentState( EInitial ), iParseType( aParseType )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRootContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpRootContentHandler::OnStartElementL( const RTagInfo& aElement,
+    const RAttributeArray& /*aAttributes*/)
+    {
+    if ( EInitial == iCurrentState )
+        {
+        if ( aElement.LocalName().DesC().Compare( KUpnpDevice )==0 )
+            {
+            RepeatedTagCheckL( EDevicePos, iFoundTags );
+            iController.SetCurrentContentHandlerL( CUpnpDeviceTagContentHandler::NewL(
+                iController, iResultDevice, iParseType ) );
+            }
+        else
+            if ( aElement.LocalName().DesC().Compare( KUpnpURLBase )==0 )
+                {
+                //RepeatedTagCheckL( EURLBasePos, iFoundTags )  NIY
+                iCurrentState = EURLBase;
+                }
+            else
+                {
+                SetIgnoreHandlerL();
+                }
+        }
+    else
+        {
+        ASSERT( EURLBase == iCurrentState );
+        //User::Leave(KErrArgument)  //content="textonly"
+        SetIgnoreHandlerL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRootContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpRootContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    switch ( iCurrentState )
+        {
+        case EInitial:
+            ASSERT( aElement.LocalName().DesC().Compare( KUpnpDeviceRoot ) == 0 );
+            if ( (iFoundTags.iFlags & KReqiuredTagsBoundary)
+                    == KReqiuredTagsBoundary )
+                {
+                iController.SetPreviousContentHandler();
+                }
+            else
+                {
+                User::Leave( KErrArgument ); //required tag not found
+                }
+            break;
+        default:
+            iCurrentState = EInitial;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpRootContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpRootContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    switch ( iCurrentState )
+        {
+        case EURLBase:
+            iResultDevice.SetUrlBaseL( aBytes );
+            break;
+        default:
+            //User::Leave(KErrArgument)  
+            break;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpscpdcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,154 @@
+/** @file
+* 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 the CUpnpScpdContentHandler class
+ *
+*/
+
+
+#include "upnpscpdcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpactionlistcontenthandler.h"
+#include "upnpservicestatetablecontenthandler.h"
+#include "upnpservice.h"
+#include "upnpserviceliterals.h"
+
+//const TUint8 KReqiuredTagsBoundary(1) //first bit (no missing specVersion checking)
+const TUint8 KReqiuredTagsBoundary(0);  //no required tag checking for now
+enum TFlagsPositions
+    {
+    EServiceStateTable = 0,
+    //ESpecVersion,           //no missing/repeated specVersion checking
+    EActionList //optional
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpScpdContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpScpdContentHandler* CUpnpScpdContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService )
+    {
+    CUpnpScpdContentHandler* scpdContentHandler = 
+        CUpnpScpdContentHandler::NewLC( aController, aResultService );
+    CleanupStack::Pop( scpdContentHandler );
+    return scpdContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpScpdContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpScpdContentHandler* CUpnpScpdContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService )
+    {
+    CUpnpScpdContentHandler* scpdContentHandler = 
+        new (ELeave) CUpnpScpdContentHandler( aController, aResultService );
+    CleanupStack::PushL( scpdContentHandler );
+    return scpdContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpScpdContentHandler::~CUpnpScpdContentHandler
+// Destructor of CUpnpScpdContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpScpdContentHandler::~CUpnpScpdContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpScpdContentHandler::CUpnpScpdContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpScpdContentHandler::CUpnpScpdContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService ) :
+    CUpnpContentHandler( aController ), iResultService( aResultService )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpScpdContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpScpdContentHandler::OnStartElementL( const RTagInfo& aElement,
+    const RAttributeArray& /*aAttributes*/ )
+    {
+    TPtrC8 elementName(aElement.LocalName().DesC() );
+    if ( elementName.Compare( KUpnpActionList ) == 0 )
+        {
+        RepeatedTagCheckL( EActionList, iFoundTags );
+        iController.SetCurrentContentHandlerL( CUpnpActionListContentHandler::NewL(
+            iController, iResultService ) );
+        }
+    else
+        if ( elementName.Compare( KUpnpServiceStateTable ) == 0 )
+            {
+        RepeatedTagCheckL( EServiceStateTable, iFoundTags );
+            iController.SetCurrentContentHandlerL( 
+                CUpnpServiceStateTableContentHandler::NewL(
+                    iController, iResultService ) );
+            }
+        //not checked by current version
+        //    else if ( elementName.Compare(KUpnpSpecVersion) == 0 )
+        //        {
+        //        RepeatedTagCheckL( ESpecVersion, iFoundTags )
+        //        iController.SetCurrentContentHandlerL( 
+        //                CUpnpSpecVersionContentHandler::NewL( iController ) 
+        //                                    )
+        //        }
+        else
+            {
+            iController.SetCurrentContentHandlerL( 
+                CUpnpIgnoreContentHandler::NewL( iController ) );
+            }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpScpdContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// 
+// -----------------------------------------------------------------------------
+//
+void CUpnpScpdContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare(KUpnpScpd) == 0 );
+    if ( ( iFoundTags.iFlags & KReqiuredTagsBoundary ) == KReqiuredTagsBoundary )
+        {
+        iResultService.SetArgumentTypes();
+        iController.SetPreviousContentHandler();
+        }
+    else
+        {
+        User::Leave( KErrArgument ); //required tag not found
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpScpdContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpScpdContentHandler::OnContentL( const TDesC8& /*aBytes*/ )
+    {
+    //User::Leave( KErrArgument ) 
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpservice.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,453 @@
+/** @file
+* 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:  Implements the CUpnpService class
+*
+*/
+
+
+//  INCLUDE FILES
+#include "upnpcommonstructs.h"
+#include "upnpstring.h"
+
+#include "upnphttpmessage.h"
+#include "upnphttpmessagefactory.h"
+#include "upnpserviceimplementation.h"
+#include "upnpgenamessage.h"
+#include "upnpdevice.h"
+#include "upnpservice.h"
+#include "upnpfileutils.h"
+#include "upnpargument.h"
+
+//for sax
+
+#include "upnpcontenthandlerscontroller.h"
+
+using namespace UpnpFileUtil;
+
+static const TInt KMaxServiceDescriptionLength( 51200 );
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+CUpnpService* CUpnpService::NewL( CUpnpDevice* aDevice )
+    {
+    CUpnpService* self = new (ELeave) CUpnpService( *aDevice );
+    return self;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::AddAction
+// Add new action to action list
+// -----------------------------------------------------------------------------
+//        
+void CUpnpService::AddActionL( CUpnpAction& aAction )
+    {
+    iActions.AppendL( &aAction );
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::CUpnpService
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpService::CUpnpService( CUpnpDevice& aDevice )
+: iParentDevice( aDevice )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpService::ConstructL( const TDesC8& aDescription,
+        const TDesC8& /*aServiceType*/)
+    {
+    if ( aDescription.Length() > KMaxServiceDescriptionLength )
+        {
+        User::Leave( KErrTooBig );
+        }
+    CUpnpContentHandlersController* controller = 
+        CUpnpContentHandlersController::NewLC();
+    controller->ParseServiceL( aDescription, this );
+    CleanupStack::PopAndDestroy( controller );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpService* CUpnpService::NewL( const TDesC8& aDescription,
+        const TDesC8& aServiceType,
+        CUpnpDevice& aDevice )
+    {
+    CUpnpService* self = new (ELeave) CUpnpService( aDevice );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aDescription, aServiceType );
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::~CUpnpService
+// Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpService::~CUpnpService()
+    {
+    iActions.ResetAndDestroy();
+    iActions.Close();
+    iStateVariables.ResetAndDestroy();
+    iStateVariables.Close();
+
+    delete iType;
+    delete iPath;
+    delete iSubscriptionUrl;
+    delete iControlUrl;
+    delete iUrl;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::CreateActionLC
+// Creating an action by Control Point
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpAction* CUpnpService::CreateActionLC( const TDesC8& aActionName )
+    {
+    TInt index( 0 );
+
+    while ( index < iActions.Count() )
+        {
+        CUpnpAction& action = *iActions[index];
+
+        if ( aActionName.Compare( action.Name() ) == KErrNone )
+            {
+            CUpnpAction* act = CUpnpAction::NewLC( action, *this );
+
+            act->SetDestinationAddr( iParentDevice.Address() );
+            act->SetDestinationPathL( ControlUrl() );
+
+            return act;
+            }
+
+        index++;
+        }
+
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::GetActionList
+// Build a list of actions provided by the CUpnpService.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpService::GetActionList( RPointerArray<CUpnpAction>& aActionList )
+    {
+    aActionList = iActions;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::GetAction
+// Returns an Action with the given name
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C TBool CUpnpService::GetAction( CUpnpAction*& aAction, 
+    const TDesC8& aActionName )
+    {
+    TBool result = EFalse;
+    aAction = NULL;
+
+    for ( TInt i=0; i<iActions.Count(); i++ )
+        {
+        if ( iActions[i]->Name().Compare( aActionName ) == 0 )
+            {
+            result = ETrue;
+            aAction = iActions[i];
+            break;
+            }
+        }
+
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::StateVariableList
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RPointerArray<CUpnpStateVariable> CUpnpService::StateVariableList() const
+    {
+    return iStateVariables;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::AddStateVariableL
+// Add new state to state list
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpService::AddStateVariableL( CUpnpStateVariable* aStateVariable )
+    {
+    iStateVariables.AppendL( aStateVariable );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::SetStateVariableL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpService::SetStateVariableL( const TDesC8& aName,
+        const TDesC8& aValue )
+    {
+
+    TInt i( 0 );
+
+    for ( i=0; i < iStateVariables.Count() &&
+            iStateVariables[i]->Name() != aName; i++ )
+        {
+        }
+
+    if ( i != iStateVariables.Count() )
+        { 
+        iStateVariables[i]->SetValueL( aValue );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::StateVariable
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpStateVariable* CUpnpService::StateVariable( const TDesC8& aName )
+    {
+    TInt index = 0;
+
+    while ( index < iStateVariables.Count() )
+        {
+        CUpnpStateVariable* var = iStateVariables[index];
+
+        if ( aName.Compare( var->Name() ) == KErrNone )
+            {
+            return var;
+            }
+
+        index++;
+        }
+
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::ServiceType
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpService::ServiceType()
+    {
+    if (iType)
+        {
+        return *iType;
+        }
+    else
+        {
+        return KNullDesC8;
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::SetServiceTypeL
+// Get service type of this (local or remote) service
+// -----------------------------------------------------------------------------
+//
+void CUpnpService::SetServiceTypeL( const TDesC8& aServiceType )
+    {
+    HBufC8* tmp = aServiceType.AllocL();
+    delete iType;
+    iType = tmp;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::Path
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpService::Path()
+    {
+    return *iPath;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::SetPathL
+// Get message dispatching path. For internal use only
+// -----------------------------------------------------------------------------
+//
+void CUpnpService::SetPathL( const TDesC8& aPath )
+    {
+    HBufC8* tmp = aPath.AllocL();
+    delete iPath;
+    iPath = tmp;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::Address
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr CUpnpService::Address()
+    {
+    return iParentDevice.Address();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::SubscriptionUrl
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpService::SubscriptionUrl()
+    {
+    if ( iSubscriptionUrl )
+        {
+        return *iSubscriptionUrl;
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::SetSubscriptionUrl
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpService::SetSubscriptionUrl( HBufC8* aUrl )
+    {
+    iSubscriptionUrl = aUrl;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::ControlUrl
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpService::ControlUrl()
+    {
+    if (iControlUrl)
+        {
+        return *iControlUrl;
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::SetControlUrl
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpService::SetControlUrl( HBufC8* aUrl )
+    {
+    iControlUrl = aUrl;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::SetServiceUrl
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpService::SetServiceDescriptionUrl( HBufC8* aUrl )
+    {
+    iUrl = aUrl;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::ControlUrl
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpService::ServiceDescriptionUrl()
+    {
+    if ( iUrl )
+        {
+        return *iUrl;
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::Device
+// Gets parent device
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDevice& CUpnpService::Device()
+    {
+    return iParentDevice;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::SetArgumentTypes
+// Sets argument types 
+// -----------------------------------------------------------------------------
+//
+void CUpnpService::SetArgumentTypes()
+    {
+    for ( TInt actionIndex(0); actionIndex < iActions.Count() ; actionIndex++ )
+        {
+        CUpnpAction* action = iActions[ actionIndex ];
+        TInt actCount = action->ArgumentList().Count();
+        for ( TInt argumentIndex(0); argumentIndex < actCount; argumentIndex++ )
+            {
+            CUpnpArgument* argument = action->ArgumentList()[ argumentIndex ];
+            CUpnpStateVariable* stateVariable =
+                    StateVariable( argument->RelatedStateVariable() );
+            if ( stateVariable )
+                {
+                argument->SetType( stateVariable->Type() );
+                }
+            else
+                argument->SetType( EUnknown );
+            }
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::Added
+// Set true value
+// -----------------------------------------------------------------------------
+//
+void CUpnpService::Added()
+    {
+    iIsAdded = ETrue;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::IsAdded
+// Get boolean value if added
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C TBool CUpnpService::IsAdded()
+    {
+    return iIsAdded;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpService::IsComplete
+// Get boolean value if complete
+// -----------------------------------------------------------------------------
+// 
+TBool CUpnpService::IsComplete()
+    {
+    return iComplete;
+    }
+//  End of File 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpservicecontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,182 @@
+/** @file
+* 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:  Implements the CUpnpBaseContentHandler class
+*
+*/
+
+
+#include "upnpservicecontenthandler.h"
+#include "upnpservice.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpscpdcontenthandler.h"
+#include "upnpserviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceContentHandler* CUpnpServiceContentHandler::NewL(
+        CUpnpContentHandlersController& aController, CUpnpDevice* aParentDevice )
+    {
+    CUpnpServiceContentHandler* serviceContentHandler =
+        CUpnpServiceContentHandler::NewLC( aController, aParentDevice );
+    CleanupStack::Pop( serviceContentHandler );
+    return serviceContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+CUpnpServiceContentHandler* CUpnpServiceContentHandler::NewLC(
+        CUpnpContentHandlersController& aController, CUpnpDevice* aParentDevice )
+    {
+    CUpnpServiceContentHandler* serviceContentHandler =
+        new (ELeave) CUpnpServiceContentHandler( aController, aParentDevice );
+    CleanupStack::PushL( serviceContentHandler );
+    return serviceContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceContentHandler* CUpnpServiceContentHandler::NewL(
+        CUpnpContentHandlersController& aController,
+        CUpnpService& aNotOwnedResultService )
+    {
+    CUpnpServiceContentHandler* serviceContentHandler =
+        CUpnpServiceContentHandler::NewLC( aController, aNotOwnedResultService );
+    CleanupStack::Pop( serviceContentHandler );
+    return serviceContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceContentHandler* CUpnpServiceContentHandler::NewLC(
+        CUpnpContentHandlersController& aController,
+        CUpnpService& aNotOwnedResultService )
+    {
+    CUpnpServiceContentHandler* serviceContentHandler = 
+        new (ELeave) CUpnpServiceContentHandler(aController, 
+            aNotOwnedResultService);
+    CleanupStack::PushL( serviceContentHandler );
+    return serviceContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::~CUpnpServiceContentHandler
+// Destructor of CUpnpServiceContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceContentHandler::~CUpnpServiceContentHandler()
+    {
+    if ( iIsServiceOwned )
+        {
+        delete iResultService;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::CUpnpServiceContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceContentHandler::CUpnpServiceContentHandler(
+        CUpnpContentHandlersController& aController, CUpnpDevice* aParentDevice ) :
+        CUpnpContentHandler(aController), iParentDevice(aParentDevice),
+        iIsServiceOwned(ETrue)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::CUpnpServiceContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceContentHandler::CUpnpServiceContentHandler(
+        CUpnpContentHandlersController& aController,
+        CUpnpService& aNotOwnedResultService ) :
+        CUpnpContentHandler(aController),
+        iResultService( &aNotOwnedResultService ), iIsServiceOwned( EFalse )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -------------------------------------------------------- ---------------------
+//
+void CUpnpServiceContentHandler::OnStartElementL( const RTagInfo& aElement,
+        const RAttributeArray& /*aAttributes*/ )
+    {
+    if ( aElement.LocalName().DesC().Compare( KUpnpScpd ) == 0 )
+        {
+        if ( iIsServiceOwned )
+            {
+            delete iResultService;
+            iResultService = NULL;
+            iResultService = CUpnpService::NewL( iParentDevice );
+            iParentDevice = NULL;
+            }
+        iController.SetCurrentContentHandlerL( CUpnpScpdContentHandler::NewL(
+                        iController, *iResultService ) );
+        }
+    else
+        {
+        User::Leave( KErrArgument ); //wrong root node
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceContentHandler::OnEndElementL( 
+    const RTagInfo& /*aElement*/ )
+    {
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceContentHandler::OnContentL( const TDesC8& /*aBytes*/ )
+    {
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpServiceContentHandler::ResultService()
+// Returns parsed CUpnpService object, and pass ownership to the caller.
+// One shouldn't call this method if CUpnpServiceContentHandler dosn't have
+// ownership CUpnpService object.
+// -----------------------------------------------------------------------------
+//
+CUpnpService* CUpnpServiceContentHandler::ResultService()
+    {
+    ASSERT( iIsServiceOwned );
+    CUpnpService* result = iResultService;
+    iIsServiceOwned= EFalse;
+    iResultService = NULL;
+    return result;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpserviceimplementation.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,517 @@
+/** @file
+* 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:  CUpnpServiceImplementation
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <e32def.h>
+#include <e32math.h>
+#include <f32file.h>
+#include <s32file.h>
+#include "upnpserviceimplementation.h"
+#include "upnphttpmessage.h"
+#include "upnpsoapmessage.h"
+#include "upnpsoapmessagefactory.h"
+#include "upnpgenamessage.h"
+#include "upnpgenamessagefactory.h"
+#include "upnpstring.h"
+#include "upnpcommonupnplits.h"
+#include "upnphttpmessagefactory.h"
+#include "upnpdevice.h"
+#include "upnpdeviceimplementationbase.h"
+#include "upnpcommonstructs.h"
+#include "upnplist.h"
+#include "upnpfileutils.h"
+#include "upnpdispatcher.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpeventcontroller.h"
+#include "upnpsoapparser.h"
+
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpService::SetDispatcher
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::SetDispatcher( CUpnpDispatcher* aDispatcher )
+    {
+    if(iDispatcher)
+        {
+        iDispatcher->RemoveCustomer(*this, EFalse);
+        }
+
+    iDispatcher = aDispatcher;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::SendL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::SendL( CUpnpHttpMessage *aMessage )
+    {
+    if ( iDispatcher )
+        {
+        iDispatcher->SendMessageL( aMessage, *this );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpService::Path
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpServiceImplementation::Path()
+    {
+    return *iPath;
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::CUpnpServiceImplementation
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpServiceImplementation::CUpnpServiceImplementation( CUpnpDevice& aDevice )
+: CUpnpService(aDevice)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::~CUpnpServiceImplementation
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpServiceImplementation::~CUpnpServiceImplementation()
+    {
+    DeviceImpl().DetachService( this );
+    iEventedVariables.Reset();
+    delete iEventController;
+    delete iSaxController;
+    delete iSoapParser;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::BaseConstructL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::BaseConstructL( const TDesC& aFileName,
+        const TDesC8& aServiceType )
+    {
+    //subscriber library initialization
+    LOGS("CUpnpServiceImplementation::BaseConstructL");
+
+    HBufC8* descr = UpnpFileUtil::ReadFileL( aFileName );
+    CleanupStack::PushL(descr);
+    // File ready
+
+    this->ConstructL( *descr, aServiceType );
+
+    CleanupStack::PopAndDestroy(descr);
+
+    iEventController = CUpnpEventController::NewL( *this );
+
+    // from device
+    DeviceImpl().AttachServiceL( this );
+    iComplete = ETrue;
+    iDispatcher->AddCustomerL( *this, EFalse );
+
+    iSaxController = CUpnpContentHandlersController::NewL();
+    iSoapParser = new (ELeave) TUpnpSoapParser( *iSaxController );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::MessageReceivedLD
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::MessageReceivedLD( CUpnpHttpMessage* aMessage )
+    {
+    LOGS("CUpnpServiceImplementation::MessageReceivedL(CUpnpHttpMessage*)");
+
+    if ( !aMessage )
+        {
+        return;
+        }
+
+    CleanupStack::PushL( aMessage );
+    if ( aMessage->IsSoap() )
+        {
+        // checking content type of action. Checking that content type exists.
+        TPtrC8 tempHeaderValue = aMessage->GetHeaderValue( UpnpGENA::KContentType() );
+        TPtrC8 headerValue;
+        TInt posOfSemicolon = tempHeaderValue.Find( UpnpString::KSemiColon() );
+
+        // checking if content type contains semicolon
+        if ( posOfSemicolon != KErrNotFound )
+            {
+            tempHeaderValue.Set( tempHeaderValue.Left( posOfSemicolon ) );
+            TPtrC8 trimmed( UpnpString::Trim( tempHeaderValue, EFalse ) );
+            headerValue.Set( trimmed );
+            }
+        else
+            {
+            headerValue.Set( tempHeaderValue );
+            }
+
+        if ( headerValue.CompareC( UpnpGENA::KDefaultContentType ) != 0 )
+            {
+            // content type of action is not text/xml. Invalid action.
+            CUpnpHttpMessage* messageOut
+            = RUpnpHttpMessageFactory::HttpResponseErrorL(aMessage,
+                    EHttpUnsupportedMediaType
+            );
+            CleanupStack::PushL( messageOut );
+            SendL( messageOut );
+            CleanupStack::PopAndDestroy( messageOut );
+            CleanupStack::PopAndDestroy( aMessage );
+            return;
+            }
+
+        TRAPD( err, HandleActionL( reinterpret_cast<CUpnpSoapMessage*>( aMessage ) ) );
+        if ( err )
+            {
+            SendL( reinterpret_cast<CUpnpSoapMessage*>( aMessage ),
+                    MapGenericErrorToUpnp( err ) );
+            }
+        }
+    else if ( aMessage->IsGena() )
+        {
+        TRAPD( err, HandleActionL( reinterpret_cast<CUpnpGenaMessage*>( aMessage ) ) );
+        if ( err )
+            {
+            // send proper errormessage
+            CUpnpHttpMessage* messageOut
+            = RUpnpHttpMessageFactory::UpnpResponseErrorL(aMessage,
+                    EActionFailed
+            );
+            CleanupStack::PushL( messageOut );
+            SendL( messageOut );
+            CleanupStack::PopAndDestroy( messageOut );
+            }
+        }
+    else
+        {
+        //should never happen        
+        LOGS1( "CUpnpServiceImplementation::MessageReceivedLD msg type %d", aMessage->Type() );
+        ASSERT( EFalse );       
+        }
+    CleanupStack::PopAndDestroy( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::MapGenericErrorToUpnp
+// -----------------------------------------------------------------------------
+//
+TUpnpErrorCode CUpnpServiceImplementation::MapGenericErrorToUpnp( TInt aError )
+    {
+    if ( aError == KErrArgument )
+        {
+        return EInvalidArgs;
+        }
+    else
+        {
+        return EActionFailed;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::HandleActionL
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceImplementation::HandleActionL(CUpnpGenaMessage* aMessage)
+    {
+    LOGS("CUpnpServiceImplementation::HandleActionL(CUpnpGenaMessage*)");
+
+    if ( !aMessage )
+        {
+        return;
+        }
+
+    TPtrC8 method = aMessage->Method();
+
+    if (method.Compare(UpnpGENA::KGenaSubscribe) == 0)
+        {
+        // Subscription or renewing:
+        iEventController->SubscribeL( aMessage );
+        }
+    else if (method.Compare(UpnpGENA::KGenaUnSubscribe) == 0)
+        {
+        // UnSubscription:
+        iEventController->UnSubscribeL( aMessage );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::HandleActionL
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceImplementation::HandleActionL( CUpnpSoapMessage* aMessage )
+    {
+    LOGS("CUpnpServiceImplementation::HandleActionL(CUpnpSoapMessage*)");
+    if ( !aMessage )
+        {
+        return;
+        }
+
+    // parse SOAP to CUpnpAction
+    CUpnpAction* action = CreateActionLC( aMessage->ActionName() );
+
+    if ( !action )
+        {
+        // send errormessage
+        SendL( aMessage, EInvalidAction );
+        }
+    else
+        {
+        iSoapParser->UpdateActionWithRequestL( aMessage, action );
+        TInt actionError( action->Error() );
+        if ( ( EUpnpOk == actionError ) || ( EHttp200Ok == actionError ) )
+            {
+            CleanupStack::Pop( action );
+            // a valid action received
+            ActionReceivedLD( action );
+            }
+        else
+            {
+            TUpnpErrorCode upnpError;
+            // error
+            if ( actionError < 0 ) //is generic symbian error
+
+                {
+                upnpError = MapGenericErrorToUpnp( actionError );
+                }
+            else
+                {
+                upnpError = (TUpnpErrorCode) actionError;
+                }
+            SendL( aMessage, upnpError );
+            CleanupStack::PopAndDestroy( action );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::SendL
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::SendL( CUpnpAction* aAction,
+        TUpnpErrorCode aError)
+    {
+    LOGS1("CUpnpServiceImplementation::SendL(CUpnpAction*, TUpnpErrorCode: %d)", aError);
+
+    CUpnpHttpMessage* msg( NULL );
+    if ( EHttpOk == aError )
+        {
+        msg = reinterpret_cast<CUpnpHttpMessage*>
+        (RUpnpSoapMessageFactory::SoapResponseL( aAction ));
+        }
+    else
+        {
+        LOGS1("Error: %i", aError);
+        msg = reinterpret_cast<CUpnpHttpMessage*>
+        (RUpnpSoapMessageFactory::SoapResponseL( aAction, aError ));
+        }
+    CleanupStack::PushL( msg );
+    SendL( msg );
+    CleanupStack::PopAndDestroy( msg );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::SendL
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::SendL(CUpnpSoapMessage* aMessage,
+        TUpnpErrorCode aError)
+    {
+    LOGS1("CUpnpServiceImplementation::SendL(CUpnpSoapMessage*, TUpnpErrorCode: %d)", aError);
+
+    CUpnpHttpMessage* msg = reinterpret_cast<CUpnpHttpMessage*>(
+            RUpnpSoapMessageFactory::SoapResponseL(aMessage, aError));
+    CleanupStack::PushL(msg);
+    SendL(msg);
+    CleanupStack::PopAndDestroy(msg);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::SetStateVariableL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::SetStateVariableL( const TDesC8& aName,
+        const TDesC8& aValue,
+        TBool aIsModerated )
+    {
+    LOGS("CUpnpServiceImplementation::SetStateVariableL");
+    TInt totalDesLength(0);
+    totalDesLength = KGenaXml().Length() + KGenaPropertysetStart().Length()+
+    KGenaPropertysetEnd().Length();
+    for ( TInt i(0);i<iStateVariables.Count();i++ )
+        {
+        if ( iStateVariables[i]->Eventable().CompareF(KYes) == 0 )
+            {
+            totalDesLength+=KGenaPropertyStart().Length();
+            totalDesLength+=iStateVariables[i]->Name().Length();
+            totalDesLength+=KCloseBracket().Length();
+            if ( aName.Compare( iStateVariables[i]->Name() ) == 0 )
+                {
+                totalDesLength+=aValue.Length();
+                }
+            else
+                {
+                totalDesLength+=iStateVariables[i]->Value().Length();
+                }
+            totalDesLength+=KOpenBracket().Length();
+            totalDesLength+=( UpnpString::KSlash )().Length();
+            totalDesLength+=iStateVariables[i]->Name().Length();
+            totalDesLength+=KGenaPropertyEnd().Length();
+            }
+        }
+    if (totalDesLength<KMaxGenaMessageLength)
+        {
+        CUpnpStateVariable* variable = StateVariable( aName );
+        if( !variable )
+            {
+            User::Leave( KErrBadHandle );
+            }
+
+        variable->SetValueL( aValue, aIsModerated );
+        }
+    else
+        {
+        iEventController->SendModeratedNotification();
+        }
+    }
+ 
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::StateVariableValue
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpServiceImplementation::StateVariableValue(
+        const TDesC8& aVariableName )
+    {
+    CUpnpStateVariable* variable = StateVariable(aVariableName);
+    if (variable)
+        {
+        return variable->Value();
+        }
+    return KNullDesC8();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::StateVariable
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpStateVariable* CUpnpServiceImplementation::StateVariable(
+        const TDesC8& aVariableName )
+    {
+    CUpnpStateVariable* variable = NULL;
+    variable = CUpnpService::StateVariable(aVariableName);
+    if (variable)
+        {
+        variable->SetParentImplementation(*this);
+        }
+    return variable;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::AddEventVariable
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::AddEventVariable
+(const CUpnpStateVariable& aVariable,
+        TBool aIsModerated )
+    {
+    LOGS("CUpnpServiceImplementation::AddEventVariable");
+
+    if (iEventedVariables.Find(&aVariable) == KErrNotFound)
+        {
+        iEventedVariables.Append(&aVariable);
+        }
+    if (aIsModerated)
+        {
+        iEventController->SendModeratedNotification();
+        }
+    else
+        {
+        iEventController->SendNonModeratedNotification();
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::SetVariableMaxEventRate
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::SetVariableMaxEventRate
+(const TDesC8& aVariable, TInt aMaxRate)
+
+    {
+    LOGS("CUpnpServiceImplementation::SetVariableMaxEventRate");
+
+    for(TInt i = 0; i < iEventedVariables.Count(); i++)
+        {
+        if(iEventedVariables[i]->Name().Compare(aVariable)==0)
+            {
+            iEventedVariables[i]->SetMaxEventRate(aMaxRate, KMaxEventRate);
+            }
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::StateVariableEvented
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpServiceImplementation::StateVariableEvented(
+        const TDesC8& /*aVariableName*/)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::SubcribersAmount
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpServiceImplementation::SubcribersAmount()
+    {
+    return iEventController->SubscribersAmount();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::DeviceImpl
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceImplementationBase& CUpnpServiceImplementation::DeviceImpl()
+    {
+    return (CUpnpDeviceImplementationBase&) Device();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceImplementation::EventedStateVariables
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RPointerArray<CUpnpStateVariable>&
+CUpnpServiceImplementation::EventedStateVariables()
+    {
+    return iEventedVariables;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpservicelistcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,118 @@
+/** @file
+* 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 the CUpnpServiceListContentHandler class
+ *
+*/
+
+
+#include "upnpservicelistcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpservicetagcontenthandler.h"
+#include "upnpservice.h"
+#include "upnpdevice.h"
+#include "upnpdeviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceListContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceListContentHandler* CUpnpServiceListContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice )
+    {
+    CUpnpServiceListContentHandler* serviceListContentHandler = 
+        CUpnpServiceListContentHandler::NewLC( aController, aResultDevice );
+    CleanupStack::Pop( serviceListContentHandler );
+    return serviceListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceListContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceListContentHandler* CUpnpServiceListContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice )
+    {
+    CUpnpServiceListContentHandler* serviceListContentHandler = 
+        new (ELeave) CUpnpServiceListContentHandler( aController, aResultDevice );
+    CleanupStack::PushL( serviceListContentHandler );
+    return serviceListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceListContentHandler::~CUpnpServiceListContentHandler
+// Destructor of CUpnpServiceListContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceListContentHandler::~CUpnpServiceListContentHandler( )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceListContentHandler::CUpnpServiceListContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceListContentHandler::CUpnpServiceListContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpDevice& aResultDevice ) :
+    CUpnpContentHandler( aController ), iResultDevice( aResultDevice )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceListContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceListContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+    {
+    if ( aElement.LocalName().DesC().Compare( KUpnpService ) == 0 )
+        {
+        CUpnpService* service = CUpnpService::NewL( &iResultDevice );
+        CleanupStack::PushL( service );
+        iResultDevice.ServiceList().AppendL( service );
+        CleanupStack::Pop( service );
+        iController.SetCurrentContentHandlerL( CUpnpServiceTagContentHandler::NewL(
+            iController, *service ) );
+        }
+    else
+        {
+        SetIgnoreHandlerL( );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceListContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceListContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare( KUpnpServiceList ) == 0 );
+    iController.SetPreviousContentHandler();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceListContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceListContentHandler::OnContentL( const TDesC8& /*aBytes*/)
+    {
+    //User::Leave( KErrArgument )    
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpservicestatetablecontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,157 @@
+/** @file
+* 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 the CUpnpActionListContentHandler class
+ *
+*/
+
+
+#include "upnpservicestatetablecontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpstatevariablecontenthandler.h"
+#include "upnpservice.h"
+#include "upnpstatevariable.h"
+#include "upnpserviceliterals.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceStateTableContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceStateTableContentHandler* CUpnpServiceStateTableContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService )
+    {
+    CUpnpServiceStateTableContentHandler* actionListContentHandler = 
+        CUpnpServiceStateTableContentHandler::NewLC( aController, aResultService );
+    CleanupStack::Pop( actionListContentHandler );
+    return actionListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceStateTableContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceStateTableContentHandler* CUpnpServiceStateTableContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService )
+    {
+    CUpnpServiceStateTableContentHandler* actionListContentHandler =
+        new (ELeave) CUpnpServiceStateTableContentHandler(aController, 
+            aResultService);
+    CleanupStack::PushL( actionListContentHandler );
+    return actionListContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceStateTableContentHandler::~CUpnpServiceStateTableContentHandler
+// Destructor of CUpnpServiceStateTableContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceStateTableContentHandler::~CUpnpServiceStateTableContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceStateTableContentHandler::CUpnpServiceStateTableContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceStateTableContentHandler::CUpnpServiceStateTableContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService ) :
+    CUpnpContentHandler(aController), iResultService(aResultService)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceStateTableContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceStateTableContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& aAttributes )
+    {
+    if ( aElement.LocalName().DesC().Compare(KUpnpStateVariable) == 0 )
+        {
+        iStateVariableFound = ETrue;
+        CUpnpStateVariable* stateVariable = CUpnpStateVariable::NewL();
+        CleanupStack::PushL( stateVariable );
+        iResultService.AddStateVariableL( stateVariable );
+        CleanupStack::Pop( stateVariable );
+        ParseAttributesL( *stateVariable, aAttributes );
+        iController.SetCurrentContentHandlerL( 
+            CUpnpStateVariableContentHandler::NewL( iController, *stateVariable ) );
+        }
+    else
+        {
+        iController.SetCurrentContentHandlerL( 
+            CUpnpIgnoreContentHandler::NewL( iController ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceStateTableContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceStateTableContentHandler::OnEndElementL(
+    const RTagInfo& aElement )
+    {
+    ASSERT( aElement.LocalName().DesC().Compare(KUpnpServiceStateTable) == 0 );
+    //if ( iStateVariableFound )
+        //{
+        iController.SetPreviousContentHandler();
+        //}
+    //else
+        //{
+        //User::Leave( KErrArgument ) //required but not checked now 
+        //}
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceStateTableContentHandler::ParseAttributesL
+// Parse attributes, and set correct eventable values to aResultStateVariable.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceStateTableContentHandler::ParseAttributesL(
+    CUpnpStateVariable& aResultStateVariable,
+    const RAttributeArray& aAttributes )
+    {
+    TBool sendEventsNotFound(ETrue);
+    for ( TInt index=0; index<aAttributes.Count(); ++index )
+        {
+        if ( !aAttributes[index].Attribute().LocalName().DesC().Compare( KUpnpSendEvents ) )
+            {
+            aResultStateVariable.SetEventableL( aAttributes[index].Value().DesC() );
+            sendEventsNotFound = EFalse;
+            }
+        }
+    if ( sendEventsNotFound )
+        {
+        aResultStateVariable.SetEventableL( KYes );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceStateTableContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceStateTableContentHandler::OnContentL( const TDesC8& /*aBytes*/ )
+    {
+    //User::Leave( KErrArgument ) 
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpservicetagcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,245 @@
+/** @file
+* 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 the CUpnpServiceTagContentHandler class
+ *
+*/
+
+
+#include "upnpservicetagcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpservice.h"
+#include "upnpdevice.h"
+#include "upnpdeviceliterals.h"
+
+//const TUint8 KReqiuredTagsBoundary(31) //first five bits
+enum TFlagsPositions
+    {
+    EServiceTypePos = 0,
+    EServiceIdPos,
+    ESCPDURLPos,
+    EControlURLPos,
+    EEventSubURLPos //all required
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceTagContentHandler* CUpnpServiceTagContentHandler::NewL(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService )
+    {
+    CUpnpServiceTagContentHandler* serviceTagContentHandler = 
+        CUpnpServiceTagContentHandler::NewLC( aController, aResultService );
+    CleanupStack::Pop( serviceTagContentHandler );
+    return serviceTagContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceTagContentHandler* CUpnpServiceTagContentHandler::NewLC(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService )
+    {
+    CUpnpServiceTagContentHandler* serviceTagContentHandler = 
+        new (ELeave) CUpnpServiceTagContentHandler( aController, aResultService );
+    CleanupStack::PushL( serviceTagContentHandler );
+    return serviceTagContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::~CUpnpServiceTagContentHandler
+// Destructor of CUpnpServiceTagContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceTagContentHandler::~CUpnpServiceTagContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::CUpnpServiceTagContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpServiceTagContentHandler::CUpnpServiceTagContentHandler(
+    CUpnpContentHandlersController& aController, CUpnpService& aResultService ) :
+    CUpnpContentHandler( aController ), iResultService( aResultService ),
+            iCurrentState( EInitial )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::ProcessInternalTagL
+// Do necessary operation when specyfic tag inside service tag have been found.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceTagContentHandler::ProcessInternalTagL( TInt aFlagPosition,
+    TState aStateToSet )
+    {
+    if ( IsTagRepeated( aFlagPosition, iFoundTags ) )
+        {
+        SetIgnoreHandlerL();
+        }
+    else
+        {
+        iCurrentState = aStateToSet;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceTagContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+    {
+    if ( EInitial == iCurrentState )
+        {
+        const TDesC8& elementName(aElement.LocalName().DesC() );
+        if ( elementName.Compare( KUpnpServiceType ) == 0 )
+            {
+            ProcessInternalTagL( EServiceTypePos, EServiceType );
+            }
+        else if ( elementName.Compare( KUpnpServiceId ) == 0 )
+            {
+            ProcessInternalTagL( EServiceIdPos, EServiceId );
+            }
+        else if ( elementName.Compare( KUpnpSCPDURL ) == 0 )
+            {
+            ProcessInternalTagL( ESCPDURLPos, ESCPDURL );
+            }
+        else if ( elementName.Compare( KUpnpControlURL ) == 0 )
+            {
+            ProcessInternalTagL( EControlURLPos, EControlURL );
+            }
+        else if ( elementName.Compare( KUpnpEventSubURL ) == 0 )
+            {
+            ProcessInternalTagL( EEventSubURLPos, EEventSubURL );
+            }
+        else
+            {
+            SetIgnoreHandlerL();
+            }
+        }
+    else
+        {
+        //User::Leave( KErrArgument )    //textOnly
+        SetIgnoreHandlerL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceTagContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    switch ( iCurrentState )
+        {
+        case EInitial:
+            ASSERT( aElement.LocalName().DesC().Compare( KUpnpService ) == 0 );
+            //if ( (iFoundTags.iFlags & KReqiuredTagsBoundary) == KReqiuredTagsBoundary )
+            //{     //nothing required for now
+            iController.SetPreviousContentHandler();
+            //}
+            //else
+            //{
+            //User::Leave( KErrArgument )    //required tag not found
+            //}
+            break;
+        default:
+            iCurrentState = EInitial;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceTagContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    switch ( iCurrentState )
+        {
+        case EServiceType:
+            ProcessServiceTypeContentL( aBytes );
+            break;
+        case EServiceId:
+            iResultService.Device().ServiceIdL().AppendL( aBytes );
+            break;
+        case ESCPDURL:
+            iResultService.SetServiceDescriptionUrl( aBytes.AllocL() );
+            break;
+        case EControlURL:
+            iResultService.SetControlUrl( aBytes.AllocL() );
+            break;
+        case EEventSubURL:
+            iResultService.SetSubscriptionUrl( aBytes.AllocL() );
+            break;
+        default:
+            ASSERT( EInitial == iCurrentState );
+            //User::Leave(KErrArgument) //eltOnly
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpServiceTagContentHandler::ProcessServiceTypeContentL
+// Process content of serviceType tag.
+// -----------------------------------------------------------------------------
+//
+void CUpnpServiceTagContentHandler::ProcessServiceTypeContentL(
+    const TDesC8& aBytes )
+    {
+    
+
+    //iResultService.SetServiceTypeL( aBytes )
+    //iResultService.SetPathL( aBytes )
+
+    TInt index = aBytes.Find( UpnpSSDP::KUPnPServiceSchema() );
+    TPtrC8 serviceType( KNullDesC8() );
+
+    // if service type conforms UPnP service schema
+    if ( index != KErrNotFound )
+        {
+        serviceType.Set( aBytes.Mid( index + UpnpSSDP::KUPnPServiceSchema().Length() ) );
+        }
+    else
+        {
+        serviceType.Set( aBytes );
+        }
+
+    TInt typeEnd = serviceType.Find( UpnpString::KColon() );
+    if ( typeEnd > KErrNotFound )
+        {
+        HBufC8* temp = serviceType.AllocLC();
+        TPtr8 ptr = temp->Des();
+        ptr.Delete( typeEnd, 1 );
+        iResultService.SetPathL( ptr );
+        CleanupStack::PopAndDestroy( temp );
+        }
+    else
+        {
+        iResultService.SetPathL( serviceType );
+        }
+
+    iResultService.SetServiceTypeL( serviceType );
+    iResultService.Device().ServiceTypesL().AppendL( serviceType );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsettings.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,246 @@
+/** @file
+* 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:  CUpnpSettings
+ *
+*/
+
+
+// INCLUDE FILES
+#include "upnpsettings.h"
+#include <centralrepository.h>
+#include "upnpstring.h"
+#include "upnpcompvariant.hrh"
+#include <f32file.h> 
+
+const TInt KBufferGranularity = 256;
+// =========================== MEMBER FUNCTIONS ===============================
+// ----------------------------------------------------------------------------
+// CUpnpSettings::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CUpnpSettings::ConstructL(TUid aRepositoryUid)
+{
+    iRepository = CRepository::NewL(aRepositoryUid);       
+}
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSettings* CUpnpSettings::NewL(TUid aRepositoryUid)
+{
+    CUpnpSettings* self = new (ELeave) CUpnpSettings();
+    CleanupStack::PushL(self);
+    self->ConstructL(aRepositoryUid);
+    CleanupStack::Pop();
+    return self;
+}
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::CUpnpSettings
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CUpnpSettings::~CUpnpSettings()
+{
+    delete iRepository;
+}
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::Set
+// See upnpsettings.h
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSettings::Set(TUint aId, TInt& aValue)
+{  
+    if ((aId == KUPnPStackFileBufferSize)&&(aValue<0))
+        return KErrArgument;
+    else  
+        return iRepository->Set(aId, aValue);       
+}
+
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::Get
+// See upnpsettings.h
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSettings::Get(TUint aId, TInt& aValue)
+{
+    return iRepository->Get(aId, aValue);
+}
+    
+
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::Set
+// See upnpsettings.h
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSettings::SetL(TUint aId, const TDesC8& aValue)
+{
+    HBufC* data = UpnpString::ToUnicodeL(aValue);
+    TPtr dataPtr(data->Des());
+    TInt err = iRepository->Set(aId, dataPtr);
+    delete data;
+    return err;
+}    
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::Set
+// See upnpsettings.h
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSettings::Set(TUint aId, const TDesC& aValue)
+{
+    return iRepository->Set(aId, aValue);
+}
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::Get
+// See upnpsettings.h
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSettings::Get(TUint aId, TDes& aValue)
+{
+    return iRepository->Get(aId, aValue);
+}    
+// ----------------------------------------------------------------------------
+// CUpnpSettings::Get
+// See upnpsettings.h
+// ---------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* CUpnpSettings::GetL(TUint aId)
+    {
+    TInt len(0);
+    HBufC* buf(0);
+    TInt err(KErrNotFound);
+            
+    do //until the buffer is large enough
+        {
+        len += KBufferGranularity;
+        delete buf; // first time it is Null
+        buf = HBufC::NewL(len);
+        TPtr bufPtr(buf->Des());
+        err = iRepository->Get(aId, bufPtr);
+        } while(err == KErrOverflow );
+        
+    // handle error
+    if(err)
+        {
+        delete buf;
+        User::Leave(err);
+        }
+        
+    // convert to UTF-8
+    CleanupStack::PushL(buf);       
+    HBufC8* buf8 = UpnpString::FromUnicodeL(*buf);
+    CleanupStack::PopAndDestroy(buf);
+    return buf8;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::GetUserAgentL
+// See upnpsettings.h
+// ---------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* CUpnpSettings::GetUserAgentL()
+    {       
+    #if defined(__HN_31__) || defined(__HN_32__)
+    CUpnpSettings* usc = CUpnpSettings::NewL( KHnCRUidUPnPStack );
+    #else
+    CUpnpSettings* usc = CUpnpSettings::NewL( KCRUidUPnPStack );
+    #endif
+    CleanupStack::PushL(usc);
+    HBufC8* tmp = usc->GetL(CUpnpSettings::KUPnPStackCustomizedUserAgent);  
+    CleanupStack::PopAndDestroy(usc);  
+    return tmp;
+    }
+
+
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::Get
+// See upnpsettings.h
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSettings::GetIapL()
+{
+    TInt noIap = 0;     
+    #if defined(__HN_31__) || defined(__HN_32__)
+    CUpnpSettings* usc = CUpnpSettings::NewL( KHnCRUidUPnPStack );
+    #else
+    CUpnpSettings* usc = CUpnpSettings::NewL( KCRUidUPnPStack );
+    #endif
+    CleanupStack::PushL(usc);
+    usc->Get(CUpnpSettings::KUPnPStackIapId, noIap);  
+    CleanupStack::PopAndDestroy(usc);  
+    return noIap;
+}
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::GetFileBufferSizeL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSettings::GetFileBufferSizeL()
+    {
+    TInt size = 0;  
+    #if defined(__HN_31__) || defined(__HN_32__)
+    CUpnpSettings* usc = CUpnpSettings::NewL( KHnCRUidUPnPStack );
+    #else
+    CUpnpSettings* usc = CUpnpSettings::NewL( KCRUidUPnPStack );
+    #endif
+    CleanupStack::PushL(usc);
+    User::LeaveIfError(usc->Get(CUpnpSettings::KUPnPStackFileBufferSize, size));  
+    CleanupStack::PopAndDestroy(usc);  
+    return size;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::GetServerHeaderL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* CUpnpSettings::GetServerHeaderL()
+{
+    #if defined(__HN_31__) || defined(__HN_32__)
+    CUpnpSettings* usc = CUpnpSettings::NewL( KHnCRUidUPnPStack );
+    #else
+    CUpnpSettings* usc = CUpnpSettings::NewL( KCRUidUPnPStack );
+    #endif
+    CleanupStack::PushL(usc);
+    HBufC8* tmp = usc->GetL(CUpnpSettings::KUPnPStackCustomizedServerHeader);  
+    CleanupStack::PopAndDestroy(usc);  
+    return tmp;
+}
+
+// ----------------------------------------------------------------------------
+// CUpnpSettings::GetServerHeaderL
+// ---------------------------------------------------------------------------
+//
+HBufC8* CUpnpSettings::GetMSearchConfigurationL()
+{
+    #if defined(__HN_31__) || defined(__HN_32__)
+    CUpnpSettings* usc = CUpnpSettings::NewL( KHnCRUidUPnPStack );
+    #else
+    CUpnpSettings* usc = CUpnpSettings::NewL( KCRUidUPnPStack );
+    #endif
+    CleanupStack::PushL(usc);
+    HBufC8* tmp = usc->GetL(CUpnpSettings::KUPnPStackMSearchConfig);  
+    CleanupStack::PopAndDestroy(usc);  
+    return tmp;
+}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsilentdeviceimplementation.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,109 @@
+/** @file
+* 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:  Defines the CUpnpSilentDeviceImplementation class
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32math.h>
+#include <xmlengdom.h> 
+
+#include <upnpdevicedescriptionstore.h>
+#include "upnpfileutils.h"
+#include "upnpcustomlog.h"
+#include "upnpsilentdeviceimplementation.h"
+#include "upnpsilentdeviceimplcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpSilentDeviceImplementation::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSilentDeviceImplementation* CUpnpSilentDeviceImplementation::NewL(
+                            const TDesC8& aUri, 
+                            CUpnpDeviceDescriptionStore& aDescriptionStore,
+                            MUpnpDeviceDescriptionProvider& aProvider )
+    {
+    LOGS("CUpnpSilentDeviceImplementation::NewL( const TDesC& aFilename )" );
+
+    HBufC8* descr = UpnpFileUtil::ReadFileL( aDescriptionStore.DescriptionFile() );
+    CleanupStack::PushL( descr );
+
+    CUpnpContentHandlersController* controller =  CUpnpContentHandlersController::NewLC( );
+
+    CUpnpSilentDeviceImplementation* deviceImpl = controller->ParseSilentDeviceImplL( *descr );
+
+    CleanupStack::PushL( deviceImpl );
+    deviceImpl->ConstructL( aUri, aDescriptionStore, aProvider );
+    CleanupStack::Pop( deviceImpl );
+
+    CleanupStack::PopAndDestroy( controller );
+    CleanupStack::PopAndDestroy( descr );
+
+    return deviceImpl;
+    }
+    
+CUpnpSilentDeviceImplementation::CUpnpSilentDeviceImplementation()
+    {
+    }
+
+EXPORT_C CUpnpSilentDeviceImplementation::~CUpnpSilentDeviceImplementation()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementation::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpSilentDeviceImplementation::ConstructL(         
+        const TDesC8& aUri, 
+        CUpnpDeviceDescriptionStore& aDescriptionStore,
+        MUpnpDeviceDescriptionProvider& aProvider )
+    {
+    BaseConstructL( aUri, aDescriptionStore, aProvider );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceImplementationBase::StartL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSilentDeviceImplementation::StartL( const TInt aPort )
+    {   
+    StartHttpServerL( aPort );
+    GenerateUdnsL( this );
+    SaveDescriptionStoreL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSilentDeviceImplementation ::StopL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSilentDeviceImplementation::StopL()
+    {
+    StopDeviceL();
+    }
+        
+// -----------------------------------------------------------------------------
+// CUpnpSilentDeviceImplementation::StopDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpSilentDeviceImplementation::StopDeviceL()
+    {
+    SaveDescriptionStoreL();
+    StopHttpServer();
+    }   
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsingletagcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,149 @@
+/** @file
+* 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 the CUpnpSingleTagContentHandler class
+ *
+*/
+
+
+#include "upnpsingletagcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpSingleTagContentHandler* CUpnpSingleTagContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    RBuf8& aTagName, RBuf8& aValue )
+    {
+    CUpnpSingleTagContentHandler* singleTagContentHandler =
+        CUpnpSingleTagContentHandler::NewLC( aController, aTagName, aValue );
+    CleanupStack::Pop( singleTagContentHandler );
+    return singleTagContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpSingleTagContentHandler* CUpnpSingleTagContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    RBuf8& aTagName, RBuf8& aValue )
+    {
+    CUpnpSingleTagContentHandler* singleTagContentHandler =
+        new (ELeave) CUpnpSingleTagContentHandler( aController, aTagName, aValue );
+    CleanupStack::PushL( singleTagContentHandler );
+    return singleTagContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::~CUpnpSingleTagContentHandler
+// Destructor of CUpnpSingleTagContentHandler class
+// -----------------------------------------------------------------------------
+//
+CUpnpSingleTagContentHandler::~CUpnpSingleTagContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::CUpnpSingleTagContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpSingleTagContentHandler::CUpnpSingleTagContentHandler(
+    CUpnpContentHandlersController& aController,
+    RBuf8& aTagName, RBuf8& aValue ) :
+    CUpnpContentHandler( aController ), iTagName( aTagName ), iValue( aValue )
+    {
+    iTagName.Zero();
+    iValue.Zero();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSingleTagContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+    {
+    if ( iIsInsideOfTag )
+        {
+        SetIgnoreHandlerL();
+        }
+    else
+        {
+        SafeCopyL( iTagName, aElement.LocalName().DesC() );
+        iIsInsideOfTag = ETrue;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSingleTagContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    if ( iIsInsideOfTag )
+        {
+        ASSERT( aElement.LocalName().DesC().Compare( iTagName ) == 0 );
+        iIsInsideOfTag = EFalse;
+        }
+    else
+        {
+        iController.SetPreviousContentHandler();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSingleTagContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    if ( iIsInsideOfTag )
+        {
+        SafeCopyL( iValue, aBytes );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::InterestedInAllNamespaces
+// We are interested in tags from all possible namespaces
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpSingleTagContentHandler::InterestedInAllNamespaces()
+    {
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSingleTagContentHandler::SafeCopyL
+// Copy bytes from aSrc to aDest, and realloc aDest if its length is too less.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSingleTagContentHandler::SafeCopyL( RBuf8& aDest, const TDesC8& aSrc )
+    {
+    if ( aDest.MaxLength() < aSrc.Length() )
+        {
+        aDest.ReAllocL( aSrc.Length() );
+        }
+    aDest.Copy( aSrc );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsoapcontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,143 @@
+/** @file
+* 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 the CUpnpSoapContentHandler class
+ *
+*/
+
+
+#include "upnpsoapcontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpbodyofsoapcontenthandler.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpSoapContentHandler* CUpnpSoapContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    RPointerArray<CUpnpDescriptionProperty>& aParsedValues )
+    {
+    CUpnpSoapContentHandler* soapContentHandler =
+        CUpnpSoapContentHandler::NewLC( aController, aParsedValues );
+    CleanupStack::Pop( soapContentHandler );
+    return soapContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpSoapContentHandler* CUpnpSoapContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    RPointerArray<CUpnpDescriptionProperty>& aParsedValues )
+    {
+    CUpnpSoapContentHandler* soapContentHandler =
+        new (ELeave) CUpnpSoapContentHandler( aController, aParsedValues );
+    CleanupStack::PushL( soapContentHandler );
+    return soapContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapContentHandler::~CUpnpSoapContentHandler
+// Destructor of CUpnpSoapContentHandler class
+// -----------------------------------------------------------------------------
+//
+CUpnpSoapContentHandler::~CUpnpSoapContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapContentHandler::CUpnpSoapContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpSoapContentHandler::CUpnpSoapContentHandler(
+    CUpnpContentHandlersController& aController,
+    RPointerArray<CUpnpDescriptionProperty>& aParsedValues ) :
+    CUpnpContentHandler( aController ), iParsedValues( aParsedValues )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSoapContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/)
+    {
+    if ( iIsInsideEnvelope )
+        {
+        if ( aElement.LocalName().DesC().Compare( KUpnpSoapBody ) == 0 )
+            {
+            iController.SetCurrentContentHandlerL( CUpnpBodyOfSoapContentHandler::NewL(
+                iController, iParsedValues ) );
+            }
+        else
+            {
+            SetIgnoreHandlerL();
+            }
+        }
+    else
+        {
+        if ( aElement.LocalName().DesC().Compare( KUpnpSoapEnvelope ) == 0 )
+            {
+            iIsInsideEnvelope = ETrue;
+            }
+        else
+            {
+            User::Leave( KErrArgument ); //wrong root node
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSoapContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    if ( iIsInsideEnvelope )
+        {
+        ASSERT( aElement.LocalName().DesC().Compare(KUpnpSoapEnvelope) == 0 );
+        iIsInsideEnvelope = EFalse;
+        }
+    else
+        {
+        ASSERT( EFalse );   //we should never be here
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSoapContentHandler::OnContentL( const TDesC8& /*aBytes*/)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapContentHandler::ClearEnvelopeFlag
+// Clears envleope flag
+// -----------------------------------------------------------------------------
+//
+void CUpnpSoapContentHandler::ResetState()
+    {
+    iIsInsideEnvelope = EFalse;
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsoapmessage.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,153 @@
+/** @file
+* 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:  Represents SOAP message
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpsoapmessage.h"
+#include "upnpstring.h"
+#include "upnplist.h"
+
+// CONSTANTS
+_LIT8(KCross, "#");
+_LIT8(KService, ":service:");
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapMessage::CUpnpSoapMessage
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpSoapMessage::CUpnpSoapMessage():CUpnpHttpMessage()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSoapMessage* CUpnpSoapMessage::NewL( TDesC8& aBuffer, 
+                                                   const TInetAddr& aAddr)
+{
+    
+    CUpnpSoapMessage* self = new (ELeave) CUpnpSoapMessage();
+    CleanupStack::PushL(self);
+    self->ConstructL(aAddr);
+    self->ParseL(aBuffer);
+    CleanupStack::Pop(self);
+        
+    return self;
+}
+
+// Destructor
+EXPORT_C CUpnpSoapMessage::~CUpnpSoapMessage()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapMessage::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSoapMessage::ConstructL( TInetAddr aSender) 
+{
+    CUpnpHttpMessage::ConstructL(aSender, NewSessionIdL());
+}
+    
+// -----------------------------------------------------------------------------
+// CUpnpSoapMessage::SoapAction
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpSoapMessage::SoapAction()
+{
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+    {
+        if ( hdr->Name().CompareF( KSoapAction() ) == 0 )
+        {
+            return hdr->Value();
+        }
+        
+        hdr = iHeaderList->Next( hdr );
+    }
+    
+    return KNullDesC8();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapMessage::ActionName
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpSoapMessage::ActionName()
+{
+    const TPtrC8 soap = SoapAction();
+    
+    if (soap.Length() > 0)
+    {
+        TInt crossIndex = soap.Find( KCross() );
+        
+        if ( 0 <= crossIndex )
+        {
+            return soap.Mid(crossIndex + 1, soap.Length() - (crossIndex + 2));
+        }
+    }
+    // If soap is zero or KCross is not found, return KNullDesC8
+    return KNullDesC8();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSoapMessage::ServiceType
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpSoapMessage::ServiceType()
+{
+    const TPtrC8 soap = SoapAction();
+    
+    if (soap.Length() > 0)
+    {
+        TInt servStart = soap.Find(KService());
+        
+        TInt servEnd = soap.Find(KCross());
+        if( ( servStart < 0 ) ||
+            ( servEnd   < 0 ) )
+        {
+            return KNullDesC8();
+        }
+
+        servStart += KService().Length();
+        
+        TInt length = (servEnd - servStart);
+        
+        return soap.Mid(servStart, length);
+    }
+    
+    return KNullDesC8();
+}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsoapmessagefactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,497 @@
+/** @file
+* 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:  Produces SOAP messages
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "upnpsoapmessagefactory.h"
+#include "upnphttpmessagefactory.h"
+#include "upnpsoapmessage.h"
+#include "upnpaction.h"
+#include "upnpargument.h"
+#include "upnperrors.h"
+#include "upnpserviceimplementation.h"
+#include "upnpdevice.h"
+#include "upnpstring.h"
+#include "upnpcommonupnplits.h"
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+#include "upnplist.h"
+#include "upnpcons.h"
+
+// CONSTANTS
+_LIT8(KSoapEnvelopeStart, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n<s:Body>\n<u:");
+_LIT8(KSoapServiceNsStart, " xmlns:u=\"urn:schemas-upnp-org:service:");
+_LIT8(KSoapServiceNsEnd, "\">\n");
+_LIT8(KActionNameEnd, "</u:");
+_LIT8(KSoapEnvelopeEnd, ">\n</s:Body>\n</s:Envelope>");
+_LIT8(KSoapActionStart, "\"urn:schemas-upnp-org:service:");
+_LIT8(KCrash, "#");
+_LIT8(KOpenBracket, "<");
+_LIT8(KCloseBracket, ">");
+_LIT8(KLinefeed, "\n");
+_LIT8(KResponse, "Response");
+
+_LIT(KSoapErrorStart, 
+     "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n<s:Body>\n<s:Fault>\n<faultcode>s:Client</faultcode>\n<faultstring>UPnPError</faultstring>\n<detail>\n<UPnPError xmlns=\"urn:schemas-upnp-org:control-1-0\">\n<errorCode>");
+
+_LIT(KSoapErrorBetween,
+     "</errorCode>\n<errorDescription>");
+_LIT(KSoapErrorEnd,
+     "</errorDescription>\n</UPnPError>\n</detail>\n</s:Fault>\n</s:Body>\n</s:Envelope>");
+
+static const TInt KTagCharsLength = 7;
+static const TInt KExtraCharsLength = 2;
+static const TInt KMaxErrorCodeLength = 20;
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// RUpnpSoapMessageFactory::SoapRequest
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSoapMessage* RUpnpSoapMessageFactory::SoapRequestL(CUpnpAction* aAction)
+    {
+    LOGS("RUpnpSoapMessageFactory::SoapRequest(CUpnpAction*)");
+    
+    if (aAction == NULL)
+    {
+        return NULL;
+    }
+    const TDesC8& actName = aAction->Name();
+    HBufC8* servTypeB = NULL;
+    TInt posS(KErrNotFound);
+    TInt posD(KErrNotFound);
+    
+    const TDesC8& servType = aAction->ServiceType();
+    TInt serviceVersion(KErrNotFound);
+    if(servType.Length())
+        {
+        posS = servType.LocateReverse(':');
+        if (posS != KErrNotFound)
+            {
+            TLex8 number(servType.Right(servType.Length() - posS - 1));
+            if(number.Val(serviceVersion) != KErrNone)
+                {
+                serviceVersion = KErrNotFound;
+                }
+            }
+        }
+    
+    const TDesC8& devType = aAction->Service().Device().DeviceType();
+    TInt deviceVersion(KErrNotFound);
+    
+    if(devType.Length())
+        {
+        posD = devType.LocateReverse(':');
+        if (posD != KErrNotFound)
+            {
+            TLex8 number(devType.Right(devType.Length() - posD - 1));
+            if(number.Val(deviceVersion) != KErrNone)
+                {
+                deviceVersion = KErrNotFound;
+                }
+            }
+        }    
+    
+    if(deviceVersion != KErrNotFound && serviceVersion != KErrNotFound)
+        {
+        if(deviceVersion < serviceVersion)
+            {
+            servTypeB = HBufC8::NewLC(servType.Length() + devType.Length() - posD);
+            TPtr8 buf = servTypeB->Des();
+            buf.Append(servType.Left(posS + 1));
+            buf.Append(devType.Right(devType.Length() - posD - 1));
+            }
+        else
+            {
+            servTypeB = servType.AllocLC();
+            }           
+        }
+    else
+        {
+        servTypeB = servType.AllocLC();
+        }
+    
+    RPointerArray<CUpnpArgument>& args = aAction->ArgumentList();
+    
+    TInt argLength = 0;
+    
+    TInt i=0;
+    for(i=0; i<args.Count(); i++)
+    {
+        argLength += KTagCharsLength; 
+        argLength += args[i]->Name().Length() * 2;
+        argLength += args[i]->Value().Length();
+    }
+    
+    argLength += KSoapEnvelopeStart().Length();
+    argLength += KSoapServiceNsStart().Length();
+    argLength += KSoapServiceNsEnd().Length();
+    argLength += KActionNameEnd().Length();
+    argLength += KSoapEnvelopeEnd().Length();
+    
+    argLength += actName.Length()*2;
+    argLength += servTypeB->Length();
+    
+    HBufC8* buffer = HBufC8::NewLC(argLength);
+    TPtr8 ptr = buffer->Des();
+    
+    ptr.Append(KSoapEnvelopeStart());
+    ptr.Append(actName);
+    ptr.Append(KSoapServiceNsStart());
+    ptr.Append(*servTypeB);
+    ptr.Append(KSoapServiceNsEnd());
+    
+    for (i=0; i<args.Count(); i++)
+    {
+        if (args[i]->Direction() == EIn)
+        {
+            const TDesC8& name = args[i]->Name();
+            const TDesC8& value = args[i]->Value();
+            
+            ptr.Append(KOpenBracket());
+            ptr.Append(name);
+            ptr.Append(KCloseBracket());
+            ptr.Append(value);
+            ptr.Append(KOpenBracket());
+            ptr.Append(UpnpString::KSlash());
+            ptr.Append(name);
+            ptr.Append(KCloseBracket());
+            ptr.Append(KLinefeed());
+            
+        }
+    }
+    ptr.Append(KActionNameEnd());
+    ptr.Append(actName);
+    ptr.Append(KSoapEnvelopeEnd());
+    
+    
+    CUpnpSoapMessage* self = NULL;
+    
+    TInetAddr dest = aAction->DestinationAddr();
+    dest.SetFamily(KAfInet);
+    
+    TPtrC8 destPath = aAction->DestinationPath();
+    if (destPath.Length() > KHttp().Length() && 
+        destPath.Left( KHttp().Length() ) == KHttp())
+    {
+        self = static_cast<CUpnpSoapMessage*>(RUpnpHttpMessageFactory::HttpPostL(
+            destPath));
+    }
+    else if (destPath.Find(UpnpString::KSlash()) != 0)
+    {
+        HBufC8* longPath = HBufC8::NewLC(destPath.Length() +1);
+        longPath->Des().Append(UpnpString::KSlash());
+        longPath->Des().Append(destPath);
+        self = static_cast<CUpnpSoapMessage*>(RUpnpHttpMessageFactory::HttpPostL(
+                                                        dest, *longPath));
+        
+        CleanupStack::PopAndDestroy( longPath );
+    }
+    else
+    {
+        self = static_cast<CUpnpSoapMessage*>(RUpnpHttpMessageFactory::HttpPostL(
+                                                        dest, destPath));
+    }
+    
+    CleanupStack::PushL(self);
+    CUpnpHttpHeaderList* hdrList=self->HeaderList();
+    
+    CUpnpHttpHeader* hdr = hdrList->First();
+    
+    
+    while ( hdr )
+    {
+     TBool flag = EFalse;
+        if(hdr->Name().Length() == UpnpSSDP::KHdrHost().Length())
+        {
+            if (hdr->Name().FindC(UpnpSSDP::KHdrHost()) == 0)
+            {
+				CUpnpHttpHeader* temp = hdr;
+				hdr = hdrList->Next(hdr);
+				flag = ETrue;
+				hdrList->Remove(temp);
+                delete temp;
+				
+            }
+        }
+		if(!flag)
+			hdr = hdrList->Next(hdr);
+    }
+    
+    HBufC8* host = UpnpString::InetToStringL( self->Sender() );
+    CleanupStack::PushL( host );
+    self->AddPairL( UpnpSSDP::KHdrHost(), *host );
+    CleanupStack::PopAndDestroy( host );
+    
+    self->SetSessionId(aAction->SessionId());
+    self->SetBodyL(*buffer);
+    self->AddPairL(UpnpHTTP::KHdrContentType(), UpnpGENA::KTextXmlUtf8());
+    
+    
+    HBufC8* soapAction = HBufC8::NewLC(
+                   KSoapActionStart().Length() + 
+                   aAction->Name().Length() + 
+                   servTypeB->Length() + 
+                   KExtraCharsLength);
+    
+    TPtr8 soapPtr = soapAction->Des();
+    
+    // soapPtr = "urn:schemas-upnp-org:service:
+    soapPtr.Append(KSoapActionStart());
+    // soapPtr = "urn:schemas-upnp-org:service:serviceType:v
+    soapPtr.Append(*servTypeB);
+    // soapPtr = "urn:schemas-upnp-org:service:serviceType:v#
+    soapPtr.Append(KCrash());
+    // soapPtr = "urn:schemas-upnp-org:service:serviceType:v#actionName
+    soapPtr.Append(aAction->Name());
+    // soapPtr = "urn:schemas-upnp-org:service:serviceType:v#actionName"
+    soapPtr.Append(UpnpString::KInvComma());
+    
+    self->AddPairL(KSoapAction(), soapPtr);
+    
+    self->SetLocal(aAction->Local());
+    CleanupStack::PopAndDestroy(soapAction);
+    CleanupStack::Pop(self);
+    CleanupStack::PopAndDestroy(buffer);
+    
+    CleanupStack::PopAndDestroy(servTypeB);
+    
+    return self;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpSoapMessageFactory::SoapResponseL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSoapMessage* RUpnpSoapMessageFactory::SoapResponseL(CUpnpAction* aAction)
+{
+    LOGS("RUpnpSoapMessageFactory::SoapResponseL(CUpnpAction*)");
+    if (aAction == NULL)
+    {
+        return NULL;
+    }
+    const TDesC8& actName = aAction->Name();
+    const TDesC8& servType = aAction->ServiceType();
+    
+    RPointerArray<CUpnpArgument>& args = aAction->ArgumentList();
+    
+    TInt argLength = 0;
+    
+    TInt i=0;
+    for(i=0; i<args.Count(); i++)
+    {
+        argLength += KTagCharsLength;
+        
+        argLength += args[i]->Name().Length() * 2;
+        argLength += args[i]->Value().Length();
+    }
+    
+    argLength += (2 * KResponse().Length()); 
+    
+    argLength += KSoapEnvelopeStart().Length();
+    argLength += KSoapServiceNsStart().Length();
+    argLength += KSoapServiceNsEnd().Length();
+    argLength += KActionNameEnd().Length();
+    argLength += KSoapEnvelopeEnd().Length();
+    
+    argLength += actName.Length() * 2;
+    argLength += servType.Length();
+    
+    HBufC8* buffer = HBufC8::NewLC(argLength);
+    TPtr8 ptr = buffer->Des();
+    
+    ptr.Append(KSoapEnvelopeStart());
+    ptr.Append(actName);
+    ptr.Append(KResponse());
+    ptr.Append(KSoapServiceNsStart());
+    ptr.Append(servType);
+    ptr.Append(KSoapServiceNsEnd());
+    
+    for (i=0; i<args.Count(); i++)
+    {
+        if (args[i]->Direction() == EOut)
+        {
+            TDesC8& name = args[i]->Name();
+            TDesC8& value = args[i]->Value();
+            
+            ptr.Append(KOpenBracket());
+            ptr.Append(name);
+            ptr.Append(KCloseBracket());
+            ptr.Append(value);
+            ptr.Append(KOpenBracket());
+            ptr.Append(UpnpString::KSlash());
+            ptr.Append(name);
+            ptr.Append(KCloseBracket());
+            ptr.Append(KLinefeed());
+            
+        }
+    }
+    ptr.Append(KActionNameEnd());
+    ptr.Append(actName);
+    ptr.Append(KResponse());
+    ptr.Append(KSoapEnvelopeEnd());
+    
+    CUpnpSoapMessage* self = static_cast<CUpnpSoapMessage*>(
+                    RUpnpHttpMessageFactory::HttpResponseOkL(aAction->Sender()));
+    CleanupStack::PushL(self);
+    
+    self->SetSessionId(aAction->SessionId());
+    
+    self->SetBodyL(*buffer);
+    
+    self->AddPairL(UpnpHTTP::KHdrContentType(), UpnpGENA::KTextXmlUtf8());
+
+    self->AddPairL(UpnpHTTP::KHdrExtWithoutColon(), KNullDesC8);
+    
+    self->SetLocal(aAction->Local());
+      
+    CleanupStack::Pop(self);
+    CleanupStack::PopAndDestroy(buffer);
+    
+    return self;
+}
+
+// -----------------------------------------------------------------------------
+// RUpnpSoapMessageFactory::SoapResponseL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSoapMessage* RUpnpSoapMessageFactory::SoapResponseL( CUpnpAction* aAction, TUpnpErrorCode aCode)
+{
+    LOGS("RUpnpSoapMessageFactory::SoapResponseL(CUpnpAction*, TUpnpErrorCode)");
+    
+    HBufC8* errorString = CUpnpSoapMessage::UpnpErrorL(aCode);
+    CleanupStack::PushL(errorString);
+    CUpnpSoapMessage* self = RUpnpSoapMessageFactory::SoapResponseL(aAction, aCode, *errorString);       
+    CleanupStack::PopAndDestroy(errorString);    
+    return self;   
+}
+
+EXPORT_C CUpnpSoapMessage* RUpnpSoapMessageFactory::SoapResponseL( CUpnpAction* aAction, 
+                                                                   TUpnpErrorCode aCode, 
+                                                                   const TDesC8& aDescription)
+{
+    LOGS("RUpnpSoapMessageFactory::SoapResponseL(CUpnpAction*, TUpnpErrorCode,TDesC8&)");
+    
+    if (aAction == NULL)
+    {
+        return NULL;
+    }
+    TBuf8<KMaxErrorCodeLength> errorCode;
+    TInt code = aCode;
+    errorCode.Num(code);
+    
+    TInt length = 0;
+    length += KSoapErrorStart().Length();
+    length += KSoapErrorBetween().Length();
+    length += KSoapErrorEnd().Length();
+    length += errorCode.Length();
+    
+    length += aDescription.Length();
+    
+    HBufC8* buffer = HBufC8::NewL(length);
+    TPtr8 ptr = buffer->Des();
+    
+    ptr.Append(KSoapErrorStart());
+    ptr.Append(errorCode);
+    ptr.Append(KSoapErrorBetween());
+    ptr.Append(aDescription);
+    ptr.Append(KSoapErrorEnd());
+    
+    CleanupStack::PushL(buffer);
+    
+    CUpnpSoapMessage* self = static_cast<CUpnpSoapMessage*>(
+        RUpnpHttpMessageFactory::HttpResponseErrorL(aAction->Sender(), 500));
+    
+    CleanupStack::PushL(self);
+    self->SetSessionId(aAction->SessionId());
+    
+    self->SetBodyL(*buffer);
+    self->AddPairL(UpnpHTTP::KHdrContentType(), UpnpGENA::KTextXmlUtf8());
+    self->AddPairL(UpnpHTTP::KHdrExtWithoutColon(), KNullDesC8);
+    
+    self->SetLocal(aAction->Local());
+
+        CleanupStack::Pop(self);
+    CleanupStack::PopAndDestroy(buffer);
+    
+    return self;
+}
+                                                           
+// -----------------------------------------------------------------------------
+// RUpnpSoapMessageFactory::SoapResponseL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSoapMessage* RUpnpSoapMessageFactory::SoapResponseL( 
+                                            CUpnpSoapMessage* aMessage,
+                                            TUpnpErrorCode aCode )
+{
+    if (aMessage == NULL)
+    {
+        return NULL;
+    }
+    TBuf8<KMaxErrorCodeLength> errorCode;
+    TInt code = aCode;
+    errorCode.Num(code);
+    
+    TInt length = 0;
+    length += KSoapErrorStart().Length();
+    length += KSoapErrorBetween().Length();
+    length += KSoapErrorEnd().Length();
+    length += errorCode.Length();
+    
+    HBufC8* errorString = CUpnpSoapMessage::UpnpErrorL(aCode);
+    CleanupStack::PushL(errorString);
+    
+    length += errorString->Length();
+    
+    HBufC8* buffer = HBufC8::NewLC(length);
+    TPtr8 ptr = buffer->Des();
+    
+    ptr.Append(KSoapErrorStart());
+    ptr.Append(errorCode);
+    ptr.Append(KSoapErrorBetween());
+    ptr.Append(*errorString);
+    ptr.Append(KSoapErrorEnd());
+    
+    CUpnpSoapMessage* self = static_cast<CUpnpSoapMessage*>(
+            RUpnpHttpMessageFactory::HttpResponseErrorL(aMessage->Sender(), 500));
+    
+    self->SetSessionId(aMessage->SessionId());
+    
+    self->SetBodyL(*buffer);
+    self->AddPairL(UpnpHTTP::KHdrContentType(), UpnpGENA::KTextXmlUtf8());
+    self->AddPairL(UpnpHTTP::KHdrExtWithoutColon(), KNullDesC8);
+
+    self->SetLocal(aMessage->Local());
+  
+    CleanupStack::PopAndDestroy(2);
+    
+    return self;
+}
+
+//  End of File 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsoapparser.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,196 @@
+/** @file
+* 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:  TUpnpSoapParser
+ *
+*/
+
+
+#include "upnpsoapparser.h"
+
+#include "upnpsoapmessage.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpaction.h"
+#include "upnpsoapliterals.h"
+
+// -----------------------------------------------------------------------------
+// C++ constructor
+// -----------------------------------------------------------------------------
+//
+TUpnpSoapParser::TUpnpSoapParser(
+    CUpnpContentHandlersController& aParsingController )
+    : iParsingController( aParsingController )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CleanupResetAndDestroy
+// Releases array, and object keapt in it.
+// Used as method passed to TCleanupItem object.
+// -----------------------------------------------------------------------------
+//
+LOCAL_C void CleanupResetAndDestroy(TAny* aRPointerArray)
+    {
+    reinterpret_cast<RPointerArray<CUpnpDescriptionProperty>* >(aRPointerArray)
+        ->ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpSoapParser::UpdateActionWithOKResponseL
+// For internal use. Update all necessary information from a SOAP-message
+// that should be OK answer (e.g. received by Http 200 OK message).
+// -----------------------------------------------------------------------------
+//
+void TUpnpSoapParser::UpdateActionWithOKResponseL( CUpnpSoapMessage* aMessage,
+    CUpnpAction* aAction )
+    {
+    if ( NULL == aMessage )
+        {
+        return;
+        }
+    RPointerArray<CUpnpDescriptionProperty> parsedValues;
+    CleanupStack::PushL( TCleanupItem( CleanupResetAndDestroy, &parsedValues ) );
+
+    UpdateActionL( aMessage, aAction, parsedValues );
+    if ( parsedValues[0]->Name() == KUpnpSoapFault )
+        {
+        UpdateActionFaultL( parsedValues[0], aAction );
+        }
+    else
+        {
+        ProcessActionArgumentsL( parsedValues, aAction );
+        }
+    CleanupStack::PopAndDestroy( &parsedValues );
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpSoapParser::UpdateActionWithErrorResponseL
+// For internal use. Update all necessary information from a SOAP-message
+// that should contain SOAP error (fault) message (eg. received by http
+// 500 InternalServerError message.
+// -----------------------------------------------------------------------------
+//
+void TUpnpSoapParser::UpdateActionWithErrorResponseL(
+    CUpnpSoapMessage* aMessage, CUpnpAction* aAction )
+    {
+    if ( NULL == aMessage )
+        {
+        return;
+        }
+    RPointerArray<CUpnpDescriptionProperty> parsedValues;
+    CleanupStack::PushL( TCleanupItem( CleanupResetAndDestroy, &parsedValues ) );
+
+    UpdateActionL( aMessage, aAction, parsedValues );
+    if ( parsedValues[0]->Name() == KUpnpSoapFault )
+        {
+        UpdateActionFaultL( parsedValues[0], aAction );
+        }
+    else
+        {
+        User::Leave( KErrArgument );
+        }
+    CleanupStack::PopAndDestroy( &parsedValues );
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpSoapParser::UpdateActionWithRequestL
+// Update action with all necessary information from
+// a SOAP request message.
+// -----------------------------------------------------------------------------
+//
+void TUpnpSoapParser::UpdateActionWithRequestL(
+    CUpnpSoapMessage* aMessage, CUpnpAction* aAction )
+    {
+    if ( NULL == aMessage )
+        {
+        return;
+        }
+    RPointerArray<CUpnpDescriptionProperty> parsedArguments;
+    CleanupStack::PushL( TCleanupItem( CleanupResetAndDestroy, &parsedArguments ) );
+
+    UpdateActionL( aMessage, aAction, parsedArguments );
+    ProcessActionArgumentsL( parsedArguments, aAction );
+    CleanupStack::PopAndDestroy( &parsedArguments );
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpSoapParser::UpdateActionL
+// Common code used by 3 particular soap update action methods methods
+// @post if there were no leave aParsedValues has at least 1 object within
+// -----------------------------------------------------------------------------
+//
+void TUpnpSoapParser::UpdateActionL( CUpnpSoapMessage* aMessage,
+    CUpnpAction* aAction, RPointerArray<CUpnpDescriptionProperty>& aParsedValues )
+    {
+    aAction->SetSender( aMessage->Sender() );
+    aAction->SetLocal( aMessage->Local() );
+    aAction->SetSessionId( aMessage->SessionId() );
+
+    iParsingController.ParseSoapL( aMessage->Body(), aParsedValues );
+    if ( aParsedValues.Count() == 0 )    //error of parsing, nothing retrieved
+        {
+        User::Leave( KErrArgument );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpSoapParser::ProcessActionArgumentsL
+// Process parsed description property, and the rest of parsed properties
+// and update action arguments with them.
+// -----------------------------------------------------------------------------
+//
+void TUpnpSoapParser::ProcessActionArgumentsL(
+    RPointerArray<CUpnpDescriptionProperty>& aProperties, CUpnpAction* aAction )
+    {
+    TRAPD( err, UpdateActionArgumentsL( aProperties, aAction ) );
+    if( KErrNone != err )
+        {
+        if ( EInvalidArgs == err )
+            {
+            User::Leave( KErrArgument );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpSoapParser::UpdateActionArgumentsL
+// Update all action arguments with previously parsed properties.
+// -----------------------------------------------------------------------------
+//
+void TUpnpSoapParser::UpdateActionArgumentsL(
+    RPointerArray<CUpnpDescriptionProperty>& aProperties, CUpnpAction* aAction )
+    {
+    aAction->SetError( EHttpOk );
+    for ( TInt i(1); i < aProperties.Count(); ++i )
+        {
+        CUpnpDescriptionProperty* property = aProperties[i];
+        aAction->SetArgumentL( property->Name(), property->Value() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpSoapParser::UpdateActionFaultL
+// Update action error value from parsed description property
+// -----------------------------------------------------------------------------
+//
+void TUpnpSoapParser::UpdateActionFaultL(
+    CUpnpDescriptionProperty* aProperty, CUpnpAction* aAction )
+    {
+    TLex8 code( aProperty->Value() );
+    TInt errNumber( aAction->Error() );
+    TInt parseErr = code.Val( errNumber );
+    aAction->SetError( errNumber );
+    User::LeaveIfError( parseErr );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpstatevariable.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,581 @@
+/** @file
+* 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:  CUpnpStateVariable
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "upnpstatevariable.h"
+#include "upnpstring.h"
+#include "upnpargument.h"
+#include "upnpserviceimplementation.h"
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+
+// logs
+#include "f32file.h" 
+#include "s32file.h"
+
+// CONSTANTS
+_LIT8(KUi1, "ui1");
+_LIT8(KUi2, "ui2");
+_LIT8(KUi4, "ui4");
+_LIT8(KI1, "i1");
+_LIT8(KI2, "i2");
+_LIT8(KI4, "i4");
+_LIT8(KInt, "int");
+_LIT8(KR4, "r4");
+_LIT8(KR8, "r8");
+_LIT8(KNumber, "number");
+_LIT8(KFixed144, "fixed.14.4");
+_LIT8(KFloat, "float");
+_LIT8(KChar, "char");
+_LIT8(KString, "string");
+_LIT8(KDate, "date");
+_LIT8(KDateTime, "dateTime");
+_LIT8(KDateTimeTz, "dateTime.tz");
+_LIT8(KTime, "time");
+_LIT8(KTimeTz, "time.tz");
+_LIT8(KBoolean, "boolean");
+_LIT8(KBinBase64, "bin.base64");
+_LIT8(KBinHex, "bin.hex");
+_LIT8(KUri, "uri");
+_LIT8(KUuid, "uuid");
+//_LIT8(KDataType, "dataType");
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::CUpnpStateVariable
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpStateVariable::CUpnpStateVariable()
+{
+
+}
+
+
+
+void CUpnpStateVariable::ConstructL()
+    {
+    iName = HBufC8::NewL(0);
+    iDataType = HBufC8::NewL(0);
+  //  iDefaultValue = HBufC8::NewL(0);
+    iRangeMin = HBufC8::NewL(0);
+    iRangeMax = HBufC8::NewL(0);
+    iRangeStep = HBufC8::NewL(0);
+    iValue = HBufC8::NewL(0);
+    iEventable = HBufC8::NewL(0);
+    
+    iParent = NULL;
+    iMaxEventRate = 0;
+    iCurrentEventTime = 0; 
+    iReadyForEventing = ETrue;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpStateVariable* CUpnpStateVariable::NewL()
+{
+    CUpnpStateVariable* self = new (ELeave) CUpnpStateVariable();
+    self->ConstructL();
+    return self;
+}
+
+
+// Destructor
+CUpnpStateVariable::~CUpnpStateVariable()
+{
+    delete iName;
+    delete iDataType;
+    delete iDefaultValue;
+    delete iRangeMin;
+    delete iRangeMax;
+    delete iRangeStep;
+    delete iEventable;
+
+    iAllowedValueList.ResetAndDestroy();
+    iAllowedValueList.Close();
+    delete iValue;
+    
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::Name
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpStateVariable::Name()
+{
+    if ( iName )
+    {
+        return *iName;
+    }
+    else
+    {
+        return KNullDesC8();
+    }
+}
+
+// -----------------------------------------------------------------------------
+EXPORT_C void CUpnpStateVariable::SetNameL( const TDesC8& aName)
+    {
+    HBufC8* tmp = aName.AllocL();
+    delete iName;
+    iName = tmp;
+    }
+// CUpnpStateVariable::Value
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpStateVariable::Value()
+{
+    LOGS("CUpnpStateVariable::Value()");
+    
+    if ( iValue )
+    {
+        return *iValue;
+    }
+    else
+    {
+        return KNullDesC8();
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::SetValueL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpStateVariable::SetValueL(const TDesC8& aValue, TBool aIsModerated)
+{
+    LOGS("CUpnpStateVariable::SetValueL(const TDesC8&)");
+    
+    if( iValue )
+    {
+        delete iValue; 
+        iValue = NULL;
+    }
+                
+    iValue = aValue.AllocL();
+    iModerated = aIsModerated;
+    if (iParent)
+    {
+        iParent->AddEventVariable(*this, aIsModerated);
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::SetValueL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpStateVariable::SetValueL(TInt aValue, TBool aIsModerated)
+{
+ //   LOGS("CUpnpStateVariable::SetValueL(TInt)");
+    TBuf8<10> num;
+    num.Num(aValue);
+   
+    SetValueL( num, aIsModerated );
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::Eventable
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpStateVariable::Eventable()
+{
+    if ( iEventable )
+    {
+        return *iEventable;
+    }
+    else
+    {
+        return KNullDesC8();
+    }
+}
+
+EXPORT_C  void CUpnpStateVariable::SetEventableL(const TDesC8& aEventable)
+    {
+    HBufC8* tmp = aEventable.AllocL();
+    delete iEventable;
+    iEventable = tmp;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::GetDefaultValue
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpStateVariable::GetDefaultValue(TInt& aValue)
+{
+    if ( iDefaultValue )
+    {
+        TLex8 lex( *iDefaultValue );
+        TInt err = lex.Val( aValue );
+        
+        // Check conversion result
+        if( err != KErrNone )
+                aValue = err;
+    }
+    else
+    {
+        aValue = KErrNotFound;
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::DefaultValue
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpStateVariable::DefaultValue()
+{
+    if ( iDefaultValue )
+    {
+        return *iDefaultValue;
+    }
+    else
+    {
+        return KNullDesC8();
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::AllowedValuesLC
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CDesC8Array* CUpnpStateVariable::AllowedValuesLC()
+{
+    CDesC8ArrayFlat* values = new (ELeave) CDesC8ArrayFlat(1);
+    CleanupStack::PushL(values);
+    
+    for ( TInt index = 0; index < iAllowedValueList.Count(); index++ )
+    {
+        HBufC8* tmp = iAllowedValueList[index];
+        values->AppendL( *tmp );
+    }
+      
+    return values;
+}
+EXPORT_C void CUpnpStateVariable::AddAllowedValueL( const TDesC8& aAllowedValue )
+    {
+    iAllowedValueList.Append( aAllowedValue.AllocL() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::MaxValue
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpStateVariable::MaxValue()
+{
+    TInt retValue = KErrNotFound;
+    if ( iRangeMax )
+    {
+        TLex8 lex( *iRangeMax );
+        lex.Val( retValue );
+    }
+    return retValue;    
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::MinValue
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpStateVariable::MinValue()
+{
+    TInt retValue = KErrNotFound;
+    if ( iRangeMin )
+    {
+        TLex8 lex( *iRangeMin );
+        lex.Val( retValue );
+    }
+    return retValue; 
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::Step
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpStateVariable::Step()
+{
+    TInt retValue = KErrNotFound;
+    if ( iRangeStep )
+    {
+        TLex8 lex( *iRangeStep );
+        lex.Val( retValue );
+    }
+    return retValue; 
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::Type
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TArgumentType CUpnpStateVariable::Type()
+{
+    if ( iDataType )
+    {
+        const TPtrC8 value = *iDataType;
+        if (value == KUi1())
+        {
+            return EUi1;
+        }
+        else if (value ==KUi2())
+        {
+            return EUi2;
+        }
+        else if (value ==KUi4())
+        {
+            return EUi4;
+        }  
+        else if (value ==KI1())
+        {
+            return EI1;
+        }
+        else if (value ==KI2())
+        {
+            return EI2;
+        }
+        else if (value ==KI4())
+        {
+            return EI4;
+        }
+        else if (value ==KInt())
+        {
+            return EInt;        
+        }
+        else if (value ==KR4())
+        {
+            return ER4;
+        }
+        else if (value ==KR8())
+        {
+            return ER8;
+        }
+        else if (value ==KNumber())
+        {
+            return ENumber;
+        }
+        else if (value ==KFixed144())
+        {
+            return EFixed144;
+        }
+        else if (value ==KFloat())
+        {
+            return EFloat;
+        }
+        else if (value ==KChar())
+        {
+            return EChar;
+        }
+        else if (value ==KString())
+        {
+            return EString;
+        }   
+        else if (value ==KDate())
+        {
+            return EDate;
+        }
+        else if (value ==KDateTime())
+        {
+            return EDateTime;
+        }
+        else if (value ==KDateTimeTz())
+        {
+            return EDateTimeTz;
+        }
+        else if (value ==KTime())
+        {
+            return ETime;
+        }
+        else if (value ==KTimeTz())
+        {
+            return ETimeTz;
+        }
+        else if (value ==KBoolean())
+        {
+            return EBoolean;
+        }
+        else if (value ==KBinBase64())
+        {
+            return EBinBase64;
+        }
+        else if (value ==KBinHex())
+        {
+            return EBinHex;
+        }
+        else if (value ==KUri())
+        {
+            return EUri;
+        }
+        else if (value ==KUuid())
+        {
+            return EUuid;
+        }
+        else
+        {
+        
+        }
+    }
+
+    return EUnknown;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::SetParentImplementation
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpStateVariable::SetParentImplementation(CUpnpServiceImplementation &aParent)
+{
+    iParent = &aParent;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariable::SetParentImplementation
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpStateVariable::IsModerated()
+{
+    return iModerated;
+}
+
+EXPORT_C void CUpnpStateVariable::SetTypeL(const TDesC8& aType)
+    {
+    HBufC8* tmp = aType.AllocL();
+    delete iDataType;
+    iDataType = tmp;
+    }
+
+TBool CUpnpStateVariable::ReadyForEventing()
+{
+    return iReadyForEventing;
+}       
+
+void CUpnpStateVariable::SetMaxEventRate(TInt aMaxRate, TInt aNormalRate)
+{
+    iMaxEventRate = aMaxRate;
+    iReadyForEventing = ETrue;
+    iCurrentEventTime = aMaxRate;
+    iNormalEventRate = aNormalRate;
+}
+
+TInt CUpnpStateVariable::MaxEventRate()
+{
+    return iMaxEventRate;
+}
+
+void CUpnpStateVariable::EventTick()
+{
+    if(iMaxEventRate > 0)
+    {
+        iCurrentEventTime = iCurrentEventTime + iNormalEventRate;
+
+        if(iCurrentEventTime >= iMaxEventRate)
+        {
+                iReadyForEventing = ETrue;
+                iCurrentEventTime = 0;
+
+                iEventTime.UniversalTime();
+        }
+        else
+        {
+                iTime.UniversalTime();
+        
+                TInt64 int64(iMaxEventRate);
+                TInt64 diffTime((iTime.MicroSecondsFrom(iEventTime)).Int64());
+
+                if(diffTime >= int64)
+                {
+                        iReadyForEventing = ETrue;
+                        iCurrentEventTime = 0;
+
+                        iEventTime.UniversalTime();                             
+                }
+                else
+                {
+                        iCurrentEventTime = diffTime;
+                                
+                        iReadyForEventing = EFalse;                             
+                }
+        }
+    }
+}   
+   
+void CUpnpStateVariable::SetDefaultValueL(const TDesC8& aDefaultValue )
+    {
+    HBufC8* tmp = aDefaultValue .AllocL();
+    delete iDefaultValue; 
+    iDefaultValue = tmp;
+    }
+    
+void CUpnpStateVariable::SetRangeMinL(const TDesC8& aRangeMin )
+    {
+    if( &aRangeMin )
+       {
+        HBufC8* tmp = aRangeMin.AllocL();
+        delete iRangeMin; 
+        iRangeMin = tmp;
+       }
+    }
+    
+void CUpnpStateVariable::SetRangeMaxL(const TDesC8& aRangeMax )
+    {
+    if( &aRangeMax )
+       {
+       HBufC8* tmp = aRangeMax.AllocL();
+       delete iRangeMax; 
+       iRangeMax = tmp;
+       }
+    }
+    
+void CUpnpStateVariable::SetRangeStepL(const TDesC8& aRangeStep )
+    {
+    HBufC8* tmp = aRangeStep.AllocL();
+    delete iRangeStep; 
+    iRangeStep = tmp;
+    }
+    
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpstatevariablecontenthandler.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,197 @@
+/** @file
+* 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 the CUpnpActionContentHandler class
+ *
+*/
+
+
+#include "upnpstatevariablecontenthandler.h"
+#include "upnpcontenthandlerscontroller.h"
+#include "upnpignorecontenthandler.h"
+#include "upnpallowedvaluerangecontenthandler.h"
+#include "upnpallowedvaluelistcontenthandler.h"
+#include "upnpstatevariable.h"
+#include "upnpserviceliterals.h"
+
+const TUint8 KReqiuredTagsBoundary(3); //first two bits
+enum TFlagsPositions
+    {
+    ENamePos = 0,
+    EDataTypePos,
+    EDefaultValuePos, //optional
+    EAllowedValuePos //optional, AllowedValueList or AllowedValueRange
+    };
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariableContentHandler::NewL
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpStateVariableContentHandler* CUpnpStateVariableContentHandler::NewL(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable )
+    {
+    CUpnpStateVariableContentHandler* actionContentHandler = 
+        CUpnpStateVariableContentHandler::NewLC( aController, aResultStateVariable );
+    CleanupStack::Pop( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariableContentHandler::NewLC
+// Two-phased constructor. Leaves teh object on the CleanupStack
+// -----------------------------------------------------------------------------
+//
+CUpnpStateVariableContentHandler* CUpnpStateVariableContentHandler::NewLC(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable )
+    {
+    CUpnpStateVariableContentHandler* actionContentHandler = 
+        new (ELeave) CUpnpStateVariableContentHandler( aController, 
+            aResultStateVariable );
+    CleanupStack::PushL( actionContentHandler );
+    return actionContentHandler;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariableContentHandler::~CUpnpStateVariableContentHandler
+// Destructor of CUpnpStateVariableContentHandler class 
+// -----------------------------------------------------------------------------
+//
+CUpnpStateVariableContentHandler::~CUpnpStateVariableContentHandler()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariableContentHandler::CUpnpStateVariableContentHandler
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpStateVariableContentHandler::CUpnpStateVariableContentHandler(
+    CUpnpContentHandlersController& aController,
+    CUpnpStateVariable& aResultStateVariable ) :
+        CUpnpContentHandler( aController ),
+        iResultStateVariable( aResultStateVariable ),
+        iCurrentState( EInitial )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariableContentHandler::OnStartElementL
+// This method is a callback to indicate an element has been parsed.
+// -----------------------------------------------------------------------------
+//
+void CUpnpStateVariableContentHandler::OnStartElementL(
+    const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/ )
+    {
+    if ( iCurrentState == EInitial )
+        {
+        const TDesC8& elementName( aElement.LocalName().DesC() );
+        if ( elementName.Compare( KUpnpName ) == 0 )
+            {
+            RepeatedTagCheckL( ENamePos, iFoundTags );
+            iCurrentState = EName;
+            }
+        else if ( elementName.Compare( KUpnpDataType ) == 0 )
+            {
+            RepeatedTagCheckL( EDataTypePos, iFoundTags );
+            iCurrentState = EDataType;
+            }
+        else if ( elementName.Compare( KUpnpDefaultValue ) == 0 )
+            {
+            RepeatedTagCheckL( EDefaultValuePos, iFoundTags );
+            iCurrentState = EDefaultValue;
+            }
+        else if ( elementName.Compare( KUpnpAllowedValueList ) == 0 )
+            {
+            RepeatedTagCheckL( EAllowedValuePos, iFoundTags );
+            iController.SetCurrentContentHandlerL( 
+                CUpnpAllowedValueListContentHandler::NewL(
+                    iController, iResultStateVariable ) );
+            }
+        else if ( elementName.Compare( KUpnpAllowedValueRange ) == 0 )
+            {
+            RepeatedTagCheckL( EAllowedValuePos, iFoundTags );
+            iController.SetCurrentContentHandlerL( 
+                CUpnpAllowedValueRangeContentHandler::NewL(
+                    iController, iResultStateVariable ) );
+            }
+        else
+            {
+            iController.SetCurrentContentHandlerL( 
+                CUpnpIgnoreContentHandler::NewL( iController ) );
+            }
+        }
+    else
+        {
+        //User::Leave( KErrArgument ) //content="textOnly" not checked now
+        iController.SetCurrentContentHandlerL( 
+            CUpnpIgnoreContentHandler::NewL( iController ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariableContentHandler::OnEndElementL
+// This method is a callback to indicate the end of the element has been reached.
+// -----------------------------------------------------------------------------
+//
+void CUpnpStateVariableContentHandler::OnEndElementL( const RTagInfo& aElement )
+    {
+    switch ( iCurrentState )
+        {
+        case EInitial:
+            ASSERT( aElement.LocalName().DesC().Compare(KUpnpStateVariable)==0 );
+            if ( (iFoundTags.iFlags & KReqiuredTagsBoundary) == 
+                    KReqiuredTagsBoundary )
+                {
+                iController.SetPreviousContentHandler();
+                }
+            else
+                {
+                //User::Leave( KErrArgument ) //required tag not found                    
+                iController.SetPreviousContentHandler();
+                }
+            break;
+        default:
+            iCurrentState = EInitial;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpStateVariableContentHandler::OnContentL
+// This method is a callback that sends the content of the element.
+// aErrorCode must be KErrNone, and that aBytes should contains complete
+// content (one chunk).
+// -----------------------------------------------------------------------------
+//
+void CUpnpStateVariableContentHandler::OnContentL( const TDesC8& aBytes )
+    {
+    switch ( iCurrentState )
+        {
+        case EName:
+            iResultStateVariable.SetNameL( aBytes );
+            break;
+        case EDataType:
+            iResultStateVariable.SetTypeL( aBytes );
+            break;
+        case EDefaultValue:
+            iResultStateVariable.SetDefaultValueL( aBytes );
+            break;
+        default:
+            //User::Leave( KErrArgument ) //eltOnly not checked now
+            break;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsubscriberlibrary.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,252 @@
+/** @file
+* 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:  CUpnpSubscriberLibrary
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "upnpsubscriberlibrary.h"
+#include "upnpgenamessage.h"
+#include "upnpcommonupnplits.h"
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+#include "upnpsubscriberlibraryobserver.h"
+#include "upnpsubscriberlibraryelement.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibrary::CUpnpSubscriberLibrary
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpSubscriberLibrary::CUpnpSubscriberLibrary( 
+                                      MUpnpSubscriberLibraryObserver& aObserver )
+                                            : iObserver( aObserver )
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibrary::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibrary::ConstructL()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibrary::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpSubscriberLibrary* CUpnpSubscriberLibrary::NewL( 
+                                        MUpnpSubscriberLibraryObserver& aObserver )
+{
+    CUpnpSubscriberLibrary* self = new (ELeave) CUpnpSubscriberLibrary( aObserver );
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    
+    return self;
+}
+
+// Destructor
+CUpnpSubscriberLibrary::~CUpnpSubscriberLibrary()
+{
+    iElementArray.ResetAndDestroy();
+    iElementArray.Close();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibrary::SubscriberLibrary
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+RPointerArray<CUpnpSubscriberLibraryElement> 
+                CUpnpSubscriberLibrary::SubscriberLibrary() const
+{
+    return iElementArray;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibrary::AddInfoL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TUpnpErrorCode CUpnpSubscriberLibrary::AddInfoL( 
+                                    CUpnpGenaMessage* aMessage, 
+                                    CUpnpSubscriberLibraryElement** aElement )
+{
+    if ( !aMessage || !aElement )
+    {
+        return EUndefined;
+    }
+    LOGS("CUpnpSubscriberLibrary::AddInfoL");
+    
+
+    if ( (   aMessage->Nt().Compare(KNoHeader) != 0 
+          || aMessage->Callback().Compare(KNoHeader) != 0 )
+          && aMessage->Sid().Compare(KNoHeader) != 0 )
+    {
+        return EBadRequest;              
+    }
+        
+    TInt index = Find( aMessage->Sid() );
+    TUpnpErrorCode error;
+    
+    if ( index != KErrNotFound )
+    {
+        // already a subscriber -> renew
+        CUpnpSubscriberLibraryElement* element = iElementArray[index];
+        *aElement = element;
+        error = element->RenewSubscriberL( aMessage );
+        
+        return error;
+    }
+    else
+    {
+        // not found -> new subscriber
+        CUpnpSubscriberLibraryElement* element = 
+                                CUpnpSubscriberLibraryElement::NewL( *this );
+        CleanupStack::PushL( element );
+        *aElement = element;
+        error = element->AddSubscriberL( aMessage );
+        
+        if ( error == EHttpOk )
+        {
+                User::LeaveIfError(iElementArray.Append( *aElement ));
+                CleanupStack::Pop( element );
+        }
+        else
+        {
+            CleanupStack::PopAndDestroy( element );
+            *aElement = NULL;
+        }
+        
+        return error;
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibrary::Find
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpSubscriberLibrary::Find( const TDesC8& aSid )
+{
+    if ( aSid.Length() > 0 )
+    {
+        for ( TInt i = 0; i < iElementArray.Count(); i++ )
+        {
+            if ( aSid.Compare( iElementArray[i]->Sid() ) == 0 )
+            {
+                return i;
+            }
+        }
+    }
+    return KErrNotFound;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibrary::Remove
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TUpnpErrorCode CUpnpSubscriberLibrary::Remove( const TDesC8& aSid )
+{
+    LOGS("CUpnpSubscriberLibrary::Remove");
+ 
+    
+    TInt result = Find( aSid );
+    
+    if ( result != KErrNotFound )
+    {
+        CUpnpSubscriberLibraryElement* elem = iElementArray[result];
+        
+        iElementArray.Remove( result );
+        iElementArray.GranularCompress();
+        
+        iObserver.SubscriberRemoved( elem , result );
+
+        delete elem;
+        LOGS1("  removed, count: %i", iElementArray.Count());
+        
+        return EHttpOk;
+    }
+    return EPreconditionFailed;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibrary::TimeoutExpiredL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibrary::TimeoutExpiredL( CUpnpTimeoutElement* aElement )
+{
+    
+    if ( !aElement )
+    {
+        return;
+    }
+    CUpnpSubscriberLibraryElement* elem 
+        = static_cast<CUpnpSubscriberLibraryElement*>(aElement);
+    
+    LOGS("CUpnpSubscriberLibrary::TimeoutExpiredL");
+    
+    switch ( elem->Renew() )
+    {
+        case CUpnpTimeoutElement::ERenew:
+        {
+            LOGS("  is \"Infinite\", renewed");
+            
+            elem->SetTimeout( KMaxRenewTimeout );
+        }
+            break;
+            
+        case CUpnpTimeoutElement::EOnce:
+        {       
+            for ( TInt i = 0; i < iElementArray.Count(); i++ )
+            {
+                if ( elem == iElementArray[i] )
+                {
+                    iElementArray.Remove(i);
+                    iElementArray.GranularCompress();
+                    
+                    iObserver.SubscriberRemoved( elem, i );
+                    
+                    LOGS1("  expired, count: %i", iElementArray.Count());
+                    delete elem;
+                }
+            }
+        }
+            break;
+            
+        default:
+            break;
+    }
+}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/serviceframework/src/upnpsubscriberlibraryelement.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,431 @@
+/** @file
+* 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:  CUpnpSubscriberLibraryElement
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <e32base.h>
+#include <uri8.h> 
+#include "upnpsubscriberlibraryelement.h"
+#include "upnpgenamessage.h"
+#include "upnpstring.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcommonstructs.h"
+
+// CONSTANTS
+_LIT8(KCallbackPrefix, "<http://");
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::CUpnpSubscriberLibraryElement
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpSubscriberLibraryElement::CUpnpSubscriberLibraryElement( 
+                                    MUpnpTimeoutElementParent& aParent)
+                : CUpnpTimeoutElement(aParent)
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::ConstructL()
+{
+    BaseConstructL();
+    iSid = HBufC8::NewL(0);
+    iCallbackPath = HBufC8::NewL(0);
+    iTimeout = HBufC8::NewL(0);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpSubscriberLibraryElement* CUpnpSubscriberLibraryElement::NewL(
+                                    MUpnpTimeoutElementParent& aParent )
+{
+    CUpnpSubscriberLibraryElement* self = new (ELeave) 
+                                        CUpnpSubscriberLibraryElement(aParent);
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    
+    return self;
+}
+
+// Destructor
+CUpnpSubscriberLibraryElement::~CUpnpSubscriberLibraryElement()
+{
+    delete iSid;
+    delete iCallbackPath;
+    delete iTimeout;
+    
+    Cancel();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::Sid
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TDesC8& CUpnpSubscriberLibraryElement::Sid()
+{
+    return *iSid;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::CallbackAddress
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInetAddr& CUpnpSubscriberLibraryElement::CallbackAddress()
+{
+    return iCallbackAddress;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::CallbackPath
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TDesC8& CUpnpSubscriberLibraryElement::CallbackPath()
+{
+    return *iCallbackPath;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::Seq
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TUint32 CUpnpSubscriberLibraryElement::Seq() const
+{
+    return iSeq;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::Timeout
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TDesC8& CUpnpSubscriberLibraryElement::Timeout()
+{
+    return *iTimeout;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::AddSubscriberL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TUpnpErrorCode CUpnpSubscriberLibraryElement::AddSubscriberL( 
+                                CUpnpGenaMessage* aMessage)
+    {
+    if (aMessage == NULL)
+        {
+        return EUndefined;
+        }
+    
+    // Errors: Missing or invalid CALLBACK
+    if (aMessage->Callback().Compare(KNoHeader) == 0)
+        {   
+        return EPreconditionFailed;
+        }
+    
+    // Errors: Invalid NT
+    if (aMessage->Nt().Compare(UpnpGENA::KDefaultNt) != 0)
+        {
+        return EPreconditionFailed;
+        }
+    
+    TPtrC8 temp;
+    TPtrC8 sid(KNullDesC8);
+    TPtrC8 timeout;
+    
+    // only 1 address allowed with this method
+    temp.Set( aMessage->Callback() );
+    if ( temp.Find( KCallbackPrefix ) != KErrNotFound 
+         && temp.Length() < KUrlMaxLength )
+        {
+        temp.Set( temp.Mid( temp.Find( KLessThan8 ) + 1 ) );
+        if ( temp.Find( KGreaterThan8 )  != KErrNotFound )
+            {
+            temp.Set( temp.Left( temp.Find( KGreaterThan8 ) ) );
+            }
+        else
+            {
+            return EPreconditionFailed;
+            }
+        }
+    else
+        {
+        return EPreconditionFailed;
+        }
+
+
+    TPtrC8 callbackIp;
+    TPtrC8 callbackPort;
+    TPtrC8 callbackPath;
+    
+    TUriParser8 uriParser;
+    if ( !uriParser.Parse(temp) )
+        {
+        callbackIp.Set( uriParser.Extract( EUriHost ) );
+        if ( callbackIp == KNullDesC8() )
+		    	{
+		    	return EPreconditionFailed;	
+		    	}	
+        callbackPort.Set( uriParser.Extract( EUriPort ) );
+        if ( callbackPort == KNullDesC8() )
+            {
+            callbackPort.Set(KDefaultHostPort);            
+            }        
+        callbackPath.Set( uriParser.Extract( EUriPath ) );       
+        }
+    else
+        {
+        // invalid callback
+        return EPreconditionFailed;
+        }
+    
+    temp.Set(aMessage->Timeout());
+    
+    if (temp.Find(KTimeoutPrefix) != KErrNotFound)
+        {
+        timeout.Set( temp.Mid( temp.Find( KTimeoutPrefix) + 
+                        KTimeoutPrefix().Length() ) );
+        }
+    else
+        {
+        // timeout according to DLNA recommendation: 300 seconds
+        timeout.Set(KDefaultTimeout);
+        }
+    
+    AddInfoL(sid,
+             callbackIp,
+             callbackPort,
+             callbackPath,
+             timeout);
+             
+    return EHttpOk;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::RenewSubscriberL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TUpnpErrorCode CUpnpSubscriberLibraryElement::RenewSubscriberL(
+                                CUpnpGenaMessage* aMessage )
+{
+    TPtrC8 temp;
+    // Errors: Incompatible headers (SID already found)
+    
+    if (aMessage == NULL)
+    {
+        return EUndefined;
+    }
+    
+    if (aMessage->Nt().Compare(KNoHeader) != 0)
+    {
+        return EBadRequest;
+    }
+    else if (aMessage->Callback().Compare(KNoHeader) != 0)
+    {
+        return EBadRequest;
+    }
+    else
+    {
+    }
+    
+    TPtrC8 timeout;
+    temp.Set(aMessage->Timeout());
+    
+    if (temp.Find(KTimeoutPrefix) != KErrNotFound)
+    {
+        timeout.Set( temp.Mid( temp.Find(KTimeoutPrefix) + 
+                        KTimeoutPrefix().Length() ) );
+    }
+    else
+    {
+        // timeout according to DLNA recommendation: 300 seconds
+        timeout.Set(KDefaultTimeout);
+    }
+    
+    SetTimeoutL(timeout);
+    
+    return EHttpOk;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::AddInfoL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::AddInfoL( const TDesC8& aSid,  
+                                                       const TDesC8& aCallbackIp, 
+                                                       const TDesC8& aCallbackPort, 
+                                                       const TDesC8& aCallbackPath, 
+                                                       const TDesC8& aTimeout)
+{
+    // Adding subscriber information
+
+    SetSidL(aSid);
+    SetCallbackAddress(aCallbackIp, aCallbackPort);
+    SetCallbackPathL(aCallbackPath);
+    SetTimeoutL(aTimeout);
+    SetSeq(0);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::SetSidL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::SetSidL(const TDesC8& aSid)
+{
+    delete iSid;
+    iSid = NULL;
+    iSid = aSid.AllocL();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::SetCallbackAddress
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::SetCallbackAddress(const TDesC8& aIp, 
+                                                            const TDesC8& aPort)
+{
+    CUpnpHttpMessage::AddrInput(iCallbackAddress, aIp);
+    
+    TLex8 lex(aPort);
+    TInt port;
+    lex.Val(port);
+    
+    iCallbackAddress.SetPort(port);
+    iCallbackAddress.SetFamily(KAfInet);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::SetCallbackPathL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::SetCallbackPathL( const TDesC8& aCallbackPath)
+{
+    delete iCallbackPath;
+    iCallbackPath = NULL;
+    iCallbackPath = aCallbackPath.AllocL();
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::SetSeq
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::SetSeq(TUint32 aSeq)
+{
+    iSeq = aSeq;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::IncreaseSeq
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::IncreaseSeq()
+{
+    if (iSeq < KMaxSeq)
+    {
+        iSeq++;
+    }
+    else
+    {
+        iSeq = KMinSeq;
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::SetSessId
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::SetSessId(TInt aSessId)
+{
+    iSessId = aSessId;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::SessId
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpSubscriberLibraryElement::SessId()
+{
+    return iSessId;
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpSubscriberLibraryElement::SetTimeoutL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSubscriberLibraryElement::SetTimeoutL(const TDesC8& /*aTimeout*/)
+{
+    
+
+
+        // 7.2.22.1 UPnP devices must send events to all properly subscribed 
+        // UPnP control points.  
+        // The device must enforce a subscription TIMEOUT value of 5 minutes.
+    SetTimeout( KDefaultTimeoutValue );
+    SetRenew(CUpnpTimeoutElement::EOnce);
+    
+    // set text-formed timeout
+    delete iTimeout;
+    iTimeout = NULL;
+    iTimeout = KDefaultTimeout().AllocL();
+
+}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/BWINS/SSDPServeru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,12 @@
+EXPORTS
+	?StartL@CUpnpSsdpServer@@QAEXXZ @ 1 NONAME ; void CUpnpSsdpServer::StartL(void)
+	??1CUpnpSsdpServer@@UAE@XZ @ 2 NONAME ; CUpnpSsdpServer::~CUpnpSsdpServer(void)
+	?AddressChangedL@CUpnpUdpServer@@QAEXAAVTInetAddr@@@Z @ 3 NONAME ; void CUpnpUdpServer::AddressChangedL(class TInetAddr &)
+	?AdvertiseByebyeL@CUpnpSsdpServer@@QAEXAAVCUpnpDeviceLibraryElement@@@Z @ 4 NONAME ; void CUpnpSsdpServer::AdvertiseByebyeL(class CUpnpDeviceLibraryElement &)
+	?Stop@CUpnpSsdpServer@@QAEXXZ @ 5 NONAME ; void CUpnpSsdpServer::Stop(void)
+	?NewL@CUpnpSsdpServer@@SAPAV1@PAVMUpnpSsdpServerObserver@@PAVRSocketServ@@H@Z @ 6 NONAME ; class CUpnpSsdpServer * CUpnpSsdpServer::NewL(class MUpnpSsdpServerObserver *, class RSocketServ *, int)
+	?AdvertiseAliveL@CUpnpSsdpServer@@QAEXAAVCUpnpDeviceLibraryElement@@@Z @ 7 NONAME ; void CUpnpSsdpServer::AdvertiseAliveL(class CUpnpDeviceLibraryElement &)
+	?SearchL@CUpnpSsdpServer@@QAEXAAVTDesC8@@0@Z @ 8 NONAME ; void CUpnpSsdpServer::SearchL(class TDesC8 &, class TDesC8 &)
+	?NewL@CUpnpSsdpServer@@SAPAV1@PAVMUpnpSsdpServerObserver@@PAVRSocketServ@@HPAV1@@Z @ 9 NONAME ; class CUpnpSsdpServer * CUpnpSsdpServer::NewL(class MUpnpSsdpServerObserver *, class RSocketServ *, int, class CUpnpSsdpServer *)
+	?SearchL@CUpnpSsdpServer@@QAEXAAVTDesC8@@@Z @ 10 NONAME ; void CUpnpSsdpServer::SearchL(class TDesC8 &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/eabi/SSDPServeru.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,14 @@
+EXPORTS
+	_ZN14CUpnpUdpServer15AddressChangedLER9TInetAddr @ 1 NONAME
+	_ZN15CUpnpSsdpServer15AdvertiseAliveLER25CUpnpDeviceLibraryElement @ 2 NONAME
+	_ZN15CUpnpSsdpServer16AdvertiseByebyeLER25CUpnpDeviceLibraryElement @ 3 NONAME
+	_ZN15CUpnpSsdpServer4NewLEP23MUpnpSsdpServerObserverP11RSocketServi @ 4 NONAME
+	_ZN15CUpnpSsdpServer4NewLEP23MUpnpSsdpServerObserverP11RSocketServiPS_ @ 5 NONAME
+	_ZN15CUpnpSsdpServer4StopEv @ 6 NONAME
+	_ZN15CUpnpSsdpServer6StartLEv @ 7 NONAME
+	_ZN15CUpnpSsdpServer7SearchLER6TDesC8 @ 8 NONAME
+	_ZN15CUpnpSsdpServer7SearchLER6TDesC8S1_ @ 9 NONAME
+	_ZN15CUpnpSsdpServerD0Ev @ 10 NONAME
+	_ZN15CUpnpSsdpServerD1Ev @ 11 NONAME
+	_ZN15CUpnpSsdpServerD2Ev @ 12 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,26 @@
+/** @file
+* 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:  Build info for the SSDPServer component
+*
+*/
+
+PRJ_EXPORTS
+
+../inc/upnpssdpserver.h	|../../inc/upnpssdpserver.h
+../inc/upnpssdpserverobserver.h	|../../inc/upnpssdpserverobserver.h
+../inc/upnpudpserver.h	|../../inc/upnpudpserver.h
+PRJ_MMPFILES
+ssdpserver.mmp
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/group/ssdpserver.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,71 @@
+/** @file
+* 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:  This is the project specification file for Upnp.
+*
+*/
+
+#include "../../../inc/upnpcompvariant.hrh"
+
+TARGETTYPE      DLL
+#if defined(__HN_31__) || defined(__HN_32__)
+TARGET          hnssdpserver.dll
+UID             0x1000008d 0x2000F885
+#else
+TARGET          ssdpserver.dll
+UID             0x1000008d 0x10204166
+#endif
+
+
+LANG            SC
+CAPABILITY      CAP_GENERAL_DLL
+VENDORID        VID_DEFAULT
+
+
+SOURCEPATH      ../src
+SOURCE          upnpssdpserver.cpp
+SOURCE          upnpudpserver.cpp
+SOURCE          upnpudpsendrequest.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   ../../../inc
+SYSTEMINCLUDE   ../../inc
+USERINCLUDE     ../inc
+
+LIBRARY                    euser.lib 
+LIBRARY                    esock.lib
+LIBRARY                    insock.lib
+
+#if defined(__HN_31__) || defined(__HN_32__)
+LIBRARY                    hnipserversutils.lib
+LIBRARY                    hnserviceframework.lib
+LIBRARY                    hnupnpconnectionmanagersession.lib
+#else
+LIBRARY                    upnpipserversutils.lib
+LIBRARY                    upnpserviceframework.lib
+LIBRARY                    upnpconnectionmanagersession.lib
+#endif
+
+LIBRARY                    bafl.lib
+LIBRARY                    commdb.lib 
+
+LIBRARY                    flogger.lib
+DEFFILE                    SSDPServer
+
+//end of file
+
+VERSION 10.1
+
+paged
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/inc/upnpssdpserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,274 @@
+/** @file
+ * 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:  Declares main application class.
+ *
+ */
+
+#ifndef C_CUPNPSSDPSERVER_H
+#define C_CUPNPSSDPSERVER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <es_sock.h>
+#include <in_sock.h>
+#include "upnpudpserver.h"
+#include "upnpssdpmessagefactory.h"
+#include "upnpssdpserverobserver.h"
+
+// FORWARD DECLARATIONS
+class CUpnpMessageHandler;
+class CUpnpSsdpMessage;
+class CUpnpDeviceLibraryElement;
+
+// CLASS DECLARATION
+
+/**
+ *  CUpnpSsdpServer is used to send and receive SSDP messages.
+ *
+ *  @since Series60 2.0
+ */
+NONSHARABLE_CLASS(CUpnpSsdpServer) : public CUpnpUdpServer,
+        public MUpnpUdpServerObserver
+    {
+public:
+    // Constructors and destructor
+    /**
+     * Two-phased constructor.
+     * @param aSsdpServerObserver Pointer that is used for callbacks.
+     * @param aSocketServ Pointer to used Socket Server.
+     * @param aListeningPort Port that server is listening to.
+     * @return A new CUpnpSsdpServer instance.
+     */
+    IMPORT_C static CUpnpSsdpServer* NewL(
+        MUpnpSsdpServerObserver* aSsdpServerObserver,
+        RSocketServ* aSocketServ, TInt aListeningPort );
+
+    /**
+     * Two-phased constructor.
+     * @param aSsdpServerObserver Pointer that is used for callbacks.
+     * @param aSocketServ Pointer to used Socket Server.
+     * @param aListeningPort Port that server is listening to.
+     * @param aMasterServer Pointer to master server that generates the responses
+     for multicast messages.   
+     * @return A new CUpnpSsdpServer instance.
+     */
+    IMPORT_C static CUpnpSsdpServer* NewL(
+        MUpnpSsdpServerObserver* aSsdpServerObserver,
+        RSocketServ* aSocketServ, TInt aListeningPort,
+        CUpnpSsdpServer* aMasterServer );
+
+    /**
+     * Destructor.
+     */
+    IMPORT_C virtual ~CUpnpSsdpServer();
+
+public:
+    // New functions
+
+    /**
+     * Starts the CUpnpSsdpServer.
+     * @since Series60 2.0
+     * @return None
+     */
+    IMPORT_C void StartL();
+
+    /**
+     * Stops the CUpnpSsdpServer.
+     * @since Series60 2.0
+     * @return None
+     */
+    IMPORT_C void Stop();
+
+public:
+    // public functions for SSDP advertising and searching
+
+    /**
+     * Advertises element aDev in CUpnpDeviceLibrary.
+     * @since Series60 2.0
+     * @param aDev Pointer to advertised device.
+     * @return None
+     */
+    /**
+     Advertises element aDev in CUpnpDeviceLibrary.
+     @param aDev Pointer to advertised device.
+     @return None.
+     */
+    IMPORT_C void AdvertiseAliveL( CUpnpDeviceLibraryElement& aDev );
+
+    /**
+     * Advertises ByeBye for element aDev in CUpnpDeviceLibrary.
+     * @since Series60 2.0
+     * @param aDev Pointer to advertised device.
+     * @return None
+     */
+    /**
+     Advertises ByeBye for element aDev in CUpnpDeviceLibrary.
+     @param aDev Pointer to advertised device.
+     @return None.
+     */
+    IMPORT_C void AdvertiseByebyeL( CUpnpDeviceLibraryElement& aDev );
+
+    /**
+     * Sends a SSDP search, searching for aTarget.
+     * @since Series60 2.0
+     * @param aTarget Search String.
+     * @return None
+     */
+    IMPORT_C void SearchL( TDesC8& aTarget );
+
+    /**
+     * Sends a SSDP search, searching for aTarget.
+     * @since Series60 2.0
+     * @param aTarget Search String.
+     * @param aMaximumWaitTime Value of the MX-header.
+     * @return None
+     */
+    IMPORT_C void SearchL( TDesC8& aTarget, TDesC8& aMaximumWaitTime );
+
+    /**
+     * Master server is receiving messages sent to multicast \
+        * address via this function and generates the response.
+     * @since Series60 2.0
+     * @param aMessage Received message
+     */
+    void MessageFromMulticastL( CUpnpSsdpMessage* aMessage );
+
+private:
+
+    /**
+     * C++ default constructor.
+     */
+    CUpnpSsdpServer( MUpnpSsdpServerObserver* aSsdpServerObserver,
+        RSocketServ* aSocketServ, TInt aListeningPort );
+
+    /**
+     * C++ default constructor.
+     */
+    CUpnpSsdpServer( MUpnpSsdpServerObserver* aSsdpServerObserver,
+        RSocketServ* aSocketServ, TInt aListeningPort,
+        CUpnpSsdpServer* aMasterServer );
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL();
+
+private:
+    // private ssdp:alive functions
+
+    /**
+     * Sends a single alive message to network using given paramaters.
+     * @since Series60 2.0
+     * @param aNt Value of NT header
+     * @param aUsn Value of USN header
+     * @param aLoc Value of LOCATION header
+     */
+    void SendAdvertiseAliveL( TDesC8& aNt, TDesC8& aUsn, TDesC8& aLoc );
+
+    /**
+     * Advertises a device in device library.
+     * @since Series60 2.0
+     * @param aDev Reference to device that is to be advertised.
+     */
+    void SingleDeviceAdvertiseAliveL( CUpnpDeviceLibraryElement& aDev );
+
+private:
+    // private ssdp:byebye functions
+
+    /**
+     * Sends a BYEBYE message to network using given paramaters.
+     * @since Series60 2.0
+     * @param aNt Value of NT header
+     * @param aUsn Value of USN header
+     * @return ?description
+     */
+    void SendAdvertiseByebyeL( TDesC8& aNt, TDesC8& aUsn );
+
+    /**
+     * Sends a single device BYEBYE advertisement
+     * @since Series60 2.0
+     * @param aDev Device to be advertised.
+     */
+    void SingleDeviceAdvertiseByebyeL( CUpnpDeviceLibraryElement& aDev );
+
+private:
+    // private ssdp response generating functions
+
+    /**
+     * Function that is used to determine what kind of response is
+     * required to be sent. 
+     * @since Series60 2.0
+     * @param aMsg Message that contains the search request.
+     */
+    void ResponseL( CUpnpSsdpMessage* aMsg );
+
+    /**
+     * Sends a search response with given parameters.
+     * @since Series60 2.0
+     * @param aDest Address of remote host
+     * @param aSt Value of ST header
+     * @param aUsn Value of USN header
+     * @param aLoc Value of LOCATION header.     
+     */
+    void SendResponseL( TInetAddr& aDest, TDesC8& aSt, TDesC8& aUsn,
+        TDesC8& aLoc );
+
+    /**
+     * Creates a search response to given search message.
+     * This advertises only the device.
+     * @since Series60 2.0
+     * @param aDevice Device that needs to be advertised.
+     * @param aMsg Search request message.
+     * @return ?description
+     */
+    void SingleDeviceResponseL( CUpnpDeviceLibraryElement* aDevice,
+        CUpnpSsdpMessage* aMsg );
+
+    /**
+     * Creates a response to search message aMsg from device aDevice.
+     * This response concerns about aDevices certain service, aServiceType
+     * @since Series60 2.0
+     * @param aDevice Device that sends the response.
+     * @param aServiceType Service that resides in aDevice.
+     * @param aMsg Message that requires the response to be sent (request)
+     */
+    void SingleServiceResponseL( CUpnpDeviceLibraryElement* aDevice,
+        const TDesC8& aServiceType, CUpnpSsdpMessage* aMsg );
+
+private:
+
+    /**
+     * Callback function from CUpnpUdpServer.
+     * @since Series60 2.0
+     * @param aMessage Message that was received thru CUpnpUdpServer.
+     * @return None
+     */
+    void UdpMessageReceivedL( CUdpMessage* aMessage );
+
+private:
+    // Data
+
+    // SSDP server observer
+    MUpnpSsdpServerObserver* iSsdpServerObserver;
+
+    // SSDP master server
+    CUpnpSsdpServer* iMasterServer;
+
+    // value foro SERVER header in SSDP messages
+    HBufC8* iServerDescription;
+
+    };
+
+#endif // C_CUPNPSSDPSERVER_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/inc/upnpssdpserverobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,61 @@
+/** @file
+* 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:  MUpnpSsdpServerObserver
+*
+*/
+
+
+#ifndef C_MUPNPSSDPSERVEROBSERVER_H
+#define C_MUPNPSSDPSERVEROBSERVER_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <badesca.h>
+#include "upnpdevicelibrary.h"
+
+// FORWARD DECLARATIONS
+class CUpnpSsdpMessage;
+class CUpnpDeviceLibraryElement;
+class CTimeoutElementParent;
+
+// CLASS DECLARATION
+
+/**
+*  SSDP server observer.
+*
+*  @since Series60 2.0
+*/
+class MUpnpSsdpServerObserver
+    {
+    public: // New functions
+
+        /**
+        * SSDP event.
+        * @since Series60 2.0
+        * @param aMessage SSDP message
+        */
+        virtual void SsdpEventL( CUpnpSsdpMessage* aMessage ) = 0;
+
+        /**
+        * DeviceList.
+        * @since Series60 2.0
+        * @return RPointerArray
+        */
+        virtual RPointerArray<CUpnpDeviceLibraryElement>& DeviceList() = 0;
+
+    };
+
+#endif  // SSDPSERVEROBSERVER_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/inc/upnpudpsendrequest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,64 @@
+/** @file
+ * Copyright (c) 2005-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:  CUpnpUdpSendRequest is udp message sender
+ *
+ */
+
+#ifndef C_CUPNPUDPSERVERREQUEST_H
+#define C_CUPNPUDPSERVERREQUEST_H
+
+// INCLUDE FILES
+#include <e32std.h>
+
+// CLASS DECLARATION
+/**
+ *  ?one_line_short_description.
+ *  ?other_description_lines
+ *
+ *  @since Series60 2.0
+ */
+NONSHARABLE_CLASS(CUpnpUdpSendRequest) : public CBase
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpUdpSendRequest* NewL( TDesC8& aBuffer, TInetAddr& anAddr );
+
+    /**
+     * C++ default constructor.
+     */
+    CUpnpUdpSendRequest( const TInetAddr& anAddr );
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL( const TDesC8& aBuffer );
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpUdpSendRequest();
+
+public:
+
+    HBufC8* iBuffer;
+    TInetAddr iAddr;
+
+    };
+
+#endif  //C_CUPNPUDPSERVERREQUEST_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/inc/upnpudpserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,360 @@
+/** @file
+ * Copyright (c) 2005-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:  Declares main application class.
+ *
+ */
+
+#ifndef C_CUPNPUDPSERVER_H
+#define C_CUPNPUDPSERVER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <es_sock.h>
+#include <es_enum.h>
+#include <in_sock.h>
+#include <commdbconnpref.h>
+#include "upnpssdpmessage.h"
+#include "upnpmessageobserver.h"
+#include "upnpconnectionmanagerproxy.h"
+
+// FORWARD DECLARATIONS
+class CUpnpHttpMessage;
+class CUpnpUdpSendRequest;
+
+// CONSTANTS
+static const TUint KDefaultStartPort = 2000;
+static const TUint KDefaultMulticastPort = 1900;
+static const TUint32 KDefaultMulticastAddress = INET_ADDR(239,255,255,250);
+static const TUint KAddressLength = 35;
+static const TInt KSendTimerLimit = 10;
+static const TUint KSendingDelay = 15000; //DLNA specyfies that: UPnP network devices must not send more than 10 ssdp:alive messages
+//on a single network interface in any given 200 ms period. So 15ms delay between each message
+//should be sufficient 15ms = 15000 microseconds.
+static const TUint32 KDefaultAutoIPAddress = INET_ADDR(169,254,255,255);
+
+// DATA TYPES
+typedef CUpnpHttpMessage CUdpMessage;
+
+// CLASS DECLARATION
+
+/**
+ *  MUpnpUdpServerObserver is used as interface-class for message delivery
+ *  from CUpnpUdpServer to CUpnpSsdpServer
+ *
+ *  @since Series60 2.0
+ */
+class MUpnpUdpServerObserver
+    {
+public:
+    // New functions
+
+    /**
+     * Notifies udp message reception
+     * @param aMessage UDP message received
+     */
+    virtual void UdpMessageReceivedL( CUdpMessage* aMessage ) = 0;
+
+    };
+
+// CLASS DECLARATION
+
+/**
+ *  CUpnpUdpServer is a base class for CUpnpSsdpServer and it contains all
+ *  "real" methods, as CUpnpSsdpServer contains logical functions.
+ *
+ *  @since Series60 2.0
+ */
+NONSHARABLE_CLASS(CUpnpUdpServer) : public CActive,
+        public MUpnpMessageObserver
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * C++ default constructor.
+     * @param aSocketServ Pointer to SocketServer used.
+     * @param aObserver Pointer to class derived from MUpnpUdpServerObserver.
+     * Used for callbacks.
+     * @param aListeningPort Listening port.
+     * @return A new CUpnpUdpServer instance.
+     */
+    CUpnpUdpServer( RSocketServ* aSocketServ,
+        MUpnpUdpServerObserver* aObserver, TInt aListeningPort );
+
+    /**
+     * Destructor.
+     */
+    ~CUpnpUdpServer();
+
+public:
+    // New functions
+
+    /**
+     * Returns ETrue if udp server stared, EFalse otherwise
+     * @since Series60 3.2
+     * @return stared flag
+     */
+    TBool IsStarted();
+
+    /**
+     * Active Object RunL.
+     * @since Series60 2.0
+     */
+    void RunL();
+
+    /**
+     * Callback for RunL leave situations.
+     * @since Series60 2.0
+     * @param aError contains the error code that caused the RunL leave.
+     * @return KErrNone.
+     */
+    TInt RunError( TInt aError );
+
+    /**
+     * Active Object DoCancel.
+     * @since Series60 2.0
+     */
+    void DoCancel();
+
+    /**
+     * Starts to listen for address.
+     * @since Series60 2.0
+     */
+    void OpenL();
+
+    /**
+     * Closes the server.
+     * @since Series60 2.0
+     */
+    void Close();
+
+    /**
+     * Sets the server ready for receiving.
+     * @since Series60 2.0
+     */
+    void ReceiveL();
+
+    /**
+     * Sends aBuffer to IP address anAddr.
+     * @since Series60 2.0
+     * @param aBuffer Buffer that is to be sent.
+     * @param anAddr Address that aBuffer is to be sent.
+     */
+    void SendL( TDesC8& aBuffer, TInetAddr& anAddr );
+
+    /**
+     * Prepares server for receiving after sending.
+     * @since Series60 2.0
+     */
+    void SendDoneL();
+
+    /**
+     * From MUpnpAddressObserver
+     * This function will be invoke if IP Address of UPnP changes
+     */
+    IMPORT_C void AddressChangedL( TInetAddr& aAddr );
+
+protected:
+
+    // DATA TYPES
+    enum TSsdpValidity
+        {
+        // Message is valid SSDP message.
+        EMessageOk,
+        // Message is missing some essential headers.
+        EHeadersMissing,
+        // Name of method is not "M-SEARCH".
+        EHeaderNotMSearch,
+        // Value of MX header is not numerical.
+        EErrorInMxConversion,
+        // Value of MX header not valid.
+        EInvalidMXValue,
+        // Value of MAN header not valid.
+        EInvalidManHeader,
+        // Value of ST header not valid.
+        EInvalidStHeader,
+        // Value of HOST header not valid.
+        EInvalidHostHeader,
+        // Message is not valid SSDP response.
+        EBadSsdpResponse,
+        // Value of CACHE-CONTROL header not valid.
+        EInvalidCacheControlHeader
+        };
+
+    /**
+     * Checks that given SSDP message is valid.
+     * @since Series60 2.0
+     * @param aMsg Message to validate.
+     * @return Error code. KErrNone, if valid message.
+     */
+    TSsdpValidity ValidateSsdpMessageL( CUpnpSsdpMessage* aMsg );
+
+    /**
+     * Function gets called when message's timer expires.
+     * @since Series60 2.0
+     * @param aMessage Pointer to message that has expired.
+     */
+    void MessageExpiredL( CUpnpHttpMessage* aMessage );
+
+    /**
+     * Function ompares  two line ignoring number of space between elements
+     * @since Series60 2.0
+     * @param aValue current value
+     * @param aPattern pattern value
+     * @return true if equal, else false
+     */
+    TBool CompareLinesL( const TDesC8& aValue, const TDesC8& aPattern );
+
+    /**
+     * Sets socket option which  adds address to multicast group
+     */
+    void JoinMulticastGroupL();
+
+    /**
+     * Sets socket configuration specific to multicast server
+     */
+    void ApplyMulticastSocketSettingsL();
+
+    /**
+     * Sets socket common configuration
+     */
+    void ApplyCommonSocketSettingsL();
+
+    /**
+     * Open socket and starts receiving datagrams
+     */
+    void OpenSocketAndStartReceiveL();
+
+    /**
+     * Refresh IP address and change auto ip status accordingly
+     */
+    void RefreshLocalAddressInfo();
+
+private:
+
+    /**
+     * Function continue procesing queued request or switch to receive mode
+     * @since Series60 3.2
+     */
+    void RestartOrContinueProcessingL();
+
+    /**
+     * Function continue send procesing
+     * @return ETrue if processing restarted
+     * @since Series60 3.2
+     */
+    TBool RestartOrContinueSendProcessingL();
+
+    /**
+     * Function calculates MX value
+     * @return MX value
+     * @since Series60 3.2
+     */
+    TInt CalculateMxValue( const TDesC8& aMxString );
+
+    /**
+     * Function queues response for M-Serach message 
+     * @param Message to be sent after timer elapse
+     * @since Series60 MCL
+     */
+    void AddPendingTimerMessageL( CUpnpSsdpMessage* aMessage );
+
+protected:
+
+    /**
+     * Used from CUpnpSsdpServer to construct the CUpnpUdpServer correctly.
+     * @since Series60 2.0
+     */
+    void UdpConstructL();
+
+    // DATA TYPES
+    enum TState
+        {
+        EClosed,
+        EOpen,
+        EReceiving,
+        ESending,
+        ESendingTimer, // new state introduced to handle delay timer between sending messages
+        ESendDone
+        };
+
+protected:
+
+    // State of CUpnpUdpServer defined as TState
+    TState iState;
+
+    // Random seed that is used for generating random timeouts
+    // for sending SSDP responses.
+    TInt64 iRandomSeed;
+
+    // Address of remote client returned by RSocket::RecvFrom() function
+    TInetAddr iClientAddr;
+
+    // Address of remote host, e.g. destination of message
+    TInetAddr iSenderAddress;
+
+    // Flags of UDP message
+    TUint iMulticastFlags;
+
+    // List of messages that are waiting to be sent.
+    RPointerArray<CUpnpUdpSendRequest> iSendRequestList;
+
+    // Pointer to observer, CUpnpSsdpServer
+    MUpnpUdpServerObserver* iObserver;
+
+    // Pointer to RSocketServer, that is used to bind
+    // sockets
+    RSocketServ* iSocketServ;
+
+    // Socket that is used to receive (and send) SSDP messages.
+    RSocket iSocket;
+
+    // Port number of CUpnpUdpServer
+    TUint iServerPort;
+
+    // Buffer that is used for receiving messages.
+    HBufC8* iMessage;
+
+    // Pointer to receive buffer.
+    TPtr8 iMessagePtr;
+
+    // Buffer that is used for sending
+    HBufC8* iSendMessage;
+
+    // Array that holds list of messages which are waiting
+    // for sending after their timers have expired.
+    CArrayPtrSeg<CUpnpSsdpMessage>* iPendingTimerMessages;
+
+    // IAP ID of the connection
+    TInt iActiveIap;
+
+    // Connection for opened sockets
+    CUpnpConnectionManagerProxy* iConnectionManagerProxy;
+
+    // Timer used to introduce delays to prevent from sending
+    // SSDP messages more often than one in 20ms time period.
+    RTimer iSendTimer;
+
+    // indicate if server is started, socket was opened correctly
+    TBool iIsStarted;
+
+    //Local IP Address of Server
+    TInetAddr iLocalInterfaceAddress;
+    
+    // If the interface goes to AutoIp address
+    TBool iAutoIP;
+    };
+
+#endif // C_CUPNPUDPSERVER_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/src/upnpssdpserver.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1123 @@
+/** @file
+* 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:  CUpnpSsdpServer
+*
+*/
+
+
+// INCLUDE FILES
+#include <in_sock.h>
+#include <upnpsettings.h>
+#include "upnpssdpserver.h"
+#include "upnpcons.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "upnplist.h"
+
+
+using namespace UpnpSSDP;
+using namespace UpnpString;
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::CUpnpSsdpServer
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpSsdpServer::CUpnpSsdpServer( MUpnpSsdpServerObserver* aSsdpServerObserver,
+                          RSocketServ* aSocketServ,
+                          TInt aListeningPort,
+                          CUpnpSsdpServer* aMasterServer )
+   : CUpnpUdpServer( aSocketServ, this, aListeningPort )
+    {
+    iMasterServer=aMasterServer;
+
+    iSsdpServerObserver = aSsdpServerObserver;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::CUpnpSsdpServer
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpSsdpServer::CUpnpSsdpServer( MUpnpSsdpServerObserver* aSsdpServerObserver,
+                          RSocketServ* aSocketServ,
+                          TInt aListeningPort )
+        : CUpnpUdpServer( aSocketServ, this, aListeningPort )
+    {
+    iMasterServer = NULL;
+
+    iSsdpServerObserver = aSsdpServerObserver;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::ConstructL()
+    {
+    UdpConstructL();    
+    iServerDescription =  CUpnpSettings::GetServerHeaderL();    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSsdpServer* CUpnpSsdpServer::NewL( MUpnpSsdpServerObserver*
+                                                         aSsdpServerObserver,
+                                         RSocketServ* aSocketServ,
+                                         TInt aListeningPort )
+    {
+    CUpnpSsdpServer* self = new (ELeave) CUpnpSsdpServer( aSsdpServerObserver,
+                                                  aSocketServ,
+                                                  aListeningPort );
+    
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSsdpServer* CUpnpSsdpServer::NewL( MUpnpSsdpServerObserver* 
+                                                        aSsdpServerObserver,
+                                         RSocketServ* aSocketServ,
+                                         TInt aListeningPort,
+                                         CUpnpSsdpServer* aMasterServer )
+    {
+    CUpnpSsdpServer* self = new (ELeave) CUpnpSsdpServer( aSsdpServerObserver,
+                                                  aSocketServ,
+                                                  aListeningPort,
+                                                  aMasterServer );
+    
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+// 
+EXPORT_C CUpnpSsdpServer::~CUpnpSsdpServer()
+    {
+    delete iServerDescription;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::MessageFromMulticastL
+// Message from multicast.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::MessageFromMulticastL( CUpnpSsdpMessage* aMessage )
+    {
+    UdpMessageReceivedL( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::UdpMessageReceivedL
+// UDP message received.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::UdpMessageReceivedL( CUdpMessage* aMessage )
+    {
+    if ( !aMessage )
+        {
+        return;
+        }
+    CUpnpSsdpMessage* message = ( CUpnpSsdpMessage* ) aMessage;
+   
+       // Unless it's response, check if HOST header has explicitly specified port number - 1900
+       // If not, then add this port
+       if ( !message->IsSsdpResponse() )
+           {
+           TPtrC8 host = message->GetHeaderValue( KHdrHost );
+           
+           // : Not found so port is not specified
+           if( host.Find( UpnpString::KColon() ) == KErrNotFound )
+            {
+            TBuf8<KMaxIntegerLength> defaultPort;
+               defaultPort.Num( KMulticastPort );
+               
+               HBufC8* newHost = HBufC8::NewLC( host.Length() +
+                                       UpnpString::KColon().Length() +
+                                       defaultPort.Length() );
+               
+               newHost->Des().Zero();
+               newHost->Des().Append( host );
+               newHost->Des().Append( UpnpString::KColon() );
+               newHost->Des().Append( defaultPort );
+                   
+               message->AddHostL( *newHost );
+               CleanupStack::PopAndDestroy(newHost);
+            }
+           }
+   
+    if ( iMasterServer )
+        {
+        iMasterServer->MessageFromMulticastL( message );
+        }
+    else
+        {
+        if ( message->IsSsdpMSearch() )
+            {
+            LOGS( "SSDP *** Search received");
+            ResponseL( message );
+            // add additional notification to upper-layer 
+            // used for detection IP address change
+            iSsdpServerObserver->SsdpEventL( message );
+            }
+        else if (message->IsSsdpNotify())
+            {
+            LOGS( "SSDP *** Notify received");
+            iSsdpServerObserver->SsdpEventL( message );
+            }
+        else if (message->IsSsdpResponse())
+            {
+            LOGS( "SSDP *** Response received");
+            iSsdpServerObserver->SsdpEventL( message );
+            }
+        else
+            {
+            LOGS( "SSDP *** UNKNOWN MESSAGE RECEIVED");
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::StartL
+// Start.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpServer::StartL()
+    {
+    LOGS( "SSDP *** StartL");
+    OpenL();    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::StopL
+// Stop.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpServer::Stop()
+    {
+    LOGS( "SSDP *** Stop");
+    Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::AdvertiseAliveL
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpServer::AdvertiseAliveL( CUpnpDeviceLibraryElement& aDev )
+    {
+    LOGS( "SSDP *** AdvertiseAliveL");
+    // advertise this device
+    SingleDeviceAdvertiseAliveL( aDev );
+    SingleDeviceAdvertiseAliveL( aDev );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::AdvertiseByebyeL
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpServer::AdvertiseByebyeL( CUpnpDeviceLibraryElement& aDev )
+    {
+    SingleDeviceAdvertiseByebyeL( aDev );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SearchL
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpServer::SearchL( TDesC8& aTarget )
+    {
+    SearchL(aTarget, (TDesC8&)UpnpSSDP::KDefaultResponseDelay());
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SearchL
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpServer::SearchL( TDesC8& aTarget, TDesC8& aMaximumWaitTime )
+    {
+    CUpnpSsdpMessage* msg = RUpnpSsdpMessageFactory::SearchL( aTarget );
+    CleanupStack::PushL( msg );
+    msg->AddMxL(aMaximumWaitTime);
+    
+    HBufC8* str = HBufC8::NewLC( KMaxSsdpMessageLength );
+    
+    HBufC8* msgStr = ( ( CUpnpSsdpMessage* ) msg )->ToStringL();
+    CleanupStack::PushL( msgStr );
+    
+    str->Des().Append( *msgStr );
+    
+    CleanupStack::PopAndDestroy( msgStr );
+    
+    TInetAddr addr( KDefaultMulticastAddress, KDefaultMulticastPort );
+    
+    SendL( *str, addr );
+    
+    CleanupStack::PopAndDestroy( str );
+    CleanupStack::PopAndDestroy( msg );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SendAdvertiseAliveL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::SendAdvertiseAliveL( TDesC8& aNt, TDesC8& aUsn, TDesC8& aLoc )
+    {
+    TInetAddr addr( KDefaultMulticastAddress, KDefaultMulticastPort );
+    
+    CUpnpSsdpMessage* msg = RUpnpSsdpMessageFactory::AdvertiseAliveL( 
+                                            aLoc, aNt, aUsn, *iServerDescription);
+    CleanupStack::PushL( msg );
+    HBufC8* str = msg->ToStringL();
+    CleanupStack::PushL( str );
+    
+    SendL( *str, addr );
+    
+    CleanupStack::PopAndDestroy( str );
+    str=NULL;
+    
+    CleanupStack::PopAndDestroy( msg );
+    msg=NULL;    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SendAdvertiseByebyeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::SendAdvertiseByebyeL( TDesC8& aNt, TDesC8& aUsn )
+    {
+    TInetAddr addr( KDefaultMulticastAddress, KDefaultMulticastPort );
+    
+    CUpnpSsdpMessage* msg = RUpnpSsdpMessageFactory::AdvertiseByebyeL( aNt, aUsn );
+    CleanupStack::PushL( msg );
+    HBufC8* str = msg->ToStringL();
+    CleanupStack::PushL( str );    
+    
+    SendL( *str, addr );
+    
+    CleanupStack::PopAndDestroy( str );
+    str=NULL;
+    
+    CleanupStack::PopAndDestroy( msg );
+    msg=NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SendResponseL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::SendResponseL( TInetAddr& aDest, 
+                                 TDesC8& aSt, 
+                                 TDesC8& aUsn, 
+                                 TDesC8& aLoc )
+    {
+    CUpnpSsdpMessage* msg = RUpnpSsdpMessageFactory::ResponseL( 
+                                        aSt, aUsn, aLoc, *iServerDescription );
+    CleanupStack::PushL( msg );
+    HBufC8* str = msg->ToStringL();
+    CleanupStack::PushL( str );
+    
+    SendL( *str, aDest );
+    
+    CleanupStack::PopAndDestroy( str );
+    str=NULL;
+    
+    CleanupStack::PopAndDestroy( msg );
+    msg=NULL;    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SingleDeviceAdvertiseAliveL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::SingleDeviceAdvertiseAliveL( CUpnpDeviceLibraryElement& aDev )
+    {
+    HBufC8* nt=NULL;
+    HBufC8* usn=NULL;
+    HBufC8* loc=NULL;
+    
+    loc=HBufC8::NewLC( aDev.DescriptionUrl().Length() );
+    loc->Des().Zero();
+    loc->Des().Append( aDev.DescriptionUrl() );
+    
+    CDesC8Array* services = &aDev.ServiceList();
+    
+    if ( aDev.IsRootDevice() )
+        {
+        
+        nt = HBufC8::NewLC( KUPnPRootDevice().Length() );
+        nt->Des().Zero();
+        nt->Des().Append( KUPnPRootDevice() );
+        
+        usn = HBufC8::NewLC( KUPnPUuid().Length()
+            + aDev.UUID().Length()
+            + KDblColon().Length()
+            + KUPnPRootDevice().Length() );
+
+        usn->Des().Zero();
+        usn->Des().Append( KUPnPUuid() );
+        usn->Des().Append( aDev.UUID() );
+        usn->Des().Append( KDblColon() );
+        usn->Des().Append( KUPnPRootDevice() );
+        
+        SendAdvertiseAliveL( *nt, *usn, *loc );
+        
+        CleanupStack::PopAndDestroy( usn );
+        usn = NULL;
+        
+        CleanupStack::PopAndDestroy( nt );
+        nt = NULL;
+        }
+    
+    nt=HBufC8::NewLC( KUPnPUuid().Length() + aDev.UUID().Length() );
+    nt->Des().Zero();
+    nt->Des().Append( KUPnPUuid() );
+    nt->Des().Append( aDev.UUID() );
+    
+    usn=HBufC8::NewLC( KUPnPUuid().Length() + aDev.UUID().Length() );
+    usn->Des().Zero();
+    usn->Des().Append( KUPnPUuid() );
+    usn->Des().Append( aDev.UUID() );
+    
+    SendAdvertiseAliveL( *nt, *usn, *loc );
+    
+    CleanupStack::PopAndDestroy( usn );
+    usn = NULL;
+    
+    CleanupStack::PopAndDestroy( nt );
+    nt = NULL;
+    
+    nt = HBufC8::NewLC( aDev.DeviceType().Length() );
+
+    nt->Des().Zero();
+    nt->Des().Append( aDev.DeviceType() );
+    
+    usn = HBufC8::NewLC( KUPnPUuid().Length()
+        + aDev.UUID().Length()
+        + KDblColon().Length()
+        + aDev.DeviceType().Length() );
+
+    usn->Des().Zero();
+    usn->Des().Append( KUPnPUuid() );
+    usn->Des().Append( aDev.UUID() );
+    usn->Des().Append( KDblColon() );
+    usn->Des().Append( aDev.DeviceType() );
+    
+    SendAdvertiseAliveL( *nt, *usn, *loc );
+    
+    CleanupStack::PopAndDestroy( usn );
+    usn = NULL;
+    
+    CleanupStack::PopAndDestroy( nt );
+    nt = NULL;
+    
+    if(!services)
+        {
+        return;
+        }
+    
+    TInt NumOfServices = services->Count();
+    
+    TInt i = 0;
+    
+    for( i = 0; i < NumOfServices; i++ )
+        {
+        
+        nt = HBufC8::NewLC( KUPnPServiceSchema().Length()
+            + (*services)[i].Length() );
+
+        nt->Des().Zero();
+        nt->Des().Append( KUPnPServiceSchema() );
+        nt->Des().Append( (*services)[i] );
+        
+        usn=HBufC8::NewLC( KUPnPUuid().Length()
+            + aDev.UUID().Length()
+            + KDblColon().Length()
+            + KUPnPServiceSchema().Length()
+            + (*services)[i].Length() );
+
+        usn->Des().Zero();
+        usn->Des().Append( KUPnPUuid() );
+        usn->Des().Append( aDev.UUID() );
+        usn->Des().Append( KDblColon() );
+        usn->Des().Append( KUPnPServiceSchema() );
+        usn->Des().Append( (*services)[i] );
+        
+        SendAdvertiseAliveL( *nt, *usn, *loc );
+        
+        CleanupStack::PopAndDestroy( usn );
+        usn = NULL;
+        
+        CleanupStack::PopAndDestroy( nt );
+        nt = NULL;
+        }
+    
+    CleanupStack::PopAndDestroy( loc );
+    loc = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SingleDeviceAdvertiseByebyeL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::SingleDeviceAdvertiseByebyeL(CUpnpDeviceLibraryElement& aDev)
+    {
+    HBufC8* nt=NULL;
+    HBufC8* usn=NULL;
+    
+    CDesC8Array* services = &aDev.ServiceList();
+    
+    if (aDev.IsRootDevice())
+        {
+        nt=HBufC8::NewLC(KUPnPRootDevice().Length());
+        nt->Des().Copy(KUPnPRootDevice());
+        
+        usn=HBufC8::NewLC(KUPnPUuid().Length()
+            +aDev.UUID().Length()
+            +UpnpString::KDblColon().Length()
+            +KUPnPRootDevice().Length());
+
+        usn->Des().Zero();
+        usn->Des().Append(KUPnPUuid());
+        usn->Des().Append(aDev.UUID());
+        usn->Des().Append(UpnpString::KDblColon());
+        usn->Des().Append(KUPnPRootDevice());
+        
+        SendAdvertiseByebyeL(*nt, *usn);
+        
+        CleanupStack::PopAndDestroy(usn); 
+        usn=NULL;
+        
+        CleanupStack::PopAndDestroy(nt);
+        nt=NULL;
+        }
+    
+    nt=HBufC8::NewLC(KUPnPUuid().Length()+aDev.UUID().Length());
+    nt->Des().Zero();
+    nt->Des().Append(KUPnPUuid());
+    nt->Des().Append(aDev.UUID());
+    
+    usn=HBufC8::NewLC(KUPnPUuid().Length()+aDev.UUID().Length());
+    usn->Des().Zero();
+    usn->Des().Append(KUPnPUuid());
+    usn->Des().Append(aDev.UUID());
+    
+    
+    SendAdvertiseByebyeL(*nt, *usn);
+    
+    
+    CleanupStack::PopAndDestroy(usn);
+    usn=NULL;
+    
+    CleanupStack::PopAndDestroy(nt);
+    nt=NULL;
+    
+    nt=HBufC8::NewLC(aDev.DeviceType().Length());
+
+    nt->Des().Zero();
+    nt->Des().Append(aDev.DeviceType());    
+    
+    usn=HBufC8::NewLC(KUPnPUuid().Length()
+        +aDev.UUID().Length()
+        +UpnpString::KDblColon().Length()
+        +aDev.DeviceType().Length());
+
+    usn->Des().Zero();
+    usn->Des().Append(KUPnPUuid());
+    usn->Des().Append(aDev.UUID());
+    usn->Des().Append(UpnpString::KDblColon());
+    usn->Des().Append(aDev.DeviceType());
+    
+    
+    SendAdvertiseByebyeL(*nt, *usn);
+    
+    
+    CleanupStack::PopAndDestroy(usn);
+    usn=NULL;
+    
+    CleanupStack::PopAndDestroy(nt); 
+    nt=NULL;
+    
+    TInt i=0;
+    
+    if(!services)
+        {
+        return;
+        }
+    
+    TInt NumOfServices=services->Count();
+    
+    for(i=0; i<NumOfServices; i++)
+        {
+        
+        nt=HBufC8::NewLC(KUPnPServiceSchema().Length()
+            +(*services)[i].Length());
+
+        nt->Des().Zero();
+        nt->Des().Append(KUPnPServiceSchema());
+        nt->Des().Append((*services)[i]);
+        
+        usn=HBufC8::NewLC(KUPnPUuid().Length()
+            +aDev.UUID().Length()
+            +UpnpString::KDblColon().Length()
+            +KUPnPServiceSchema().Length()
+            +(*services)[i].Length());
+
+        usn->Des().Zero();
+        usn->Des().Append(KUPnPUuid());
+        usn->Des().Append(aDev.UUID());
+        usn->Des().Append(UpnpString::KDblColon());
+        usn->Des().Append(KUPnPServiceSchema());
+        usn->Des().Append((*services)[i]);
+        
+        
+        SendAdvertiseByebyeL(*nt, *usn);
+        
+        
+        CleanupStack::PopAndDestroy(usn);
+        usn=NULL;
+        
+        CleanupStack::PopAndDestroy(nt);
+        nt=NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SingleServiceResponseL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::SingleServiceResponseL( CUpnpDeviceLibraryElement* aDevice, 
+                                          const TDesC8& aServiceType, 
+                                          CUpnpSsdpMessage* aMsg )
+    {
+    if ( !aDevice || !aMsg  )
+        {
+        return;
+        }
+    // name buffers
+    HBufC8* nt=NULL;
+    HBufC8* usn=NULL;
+    HBufC8* loc=NULL;
+    
+    // set location buffer to point to the 
+    // service description file of this service
+    // e.g. loc = 192.168.100.2/mediaserver/desc.xml
+    
+    loc=HBufC8::NewLC(aDevice->DescriptionUrl().Length());
+    loc->Des().Zero();
+    loc->Des().Append(aDevice->DescriptionUrl());
+    
+
+    // separate different search targets
+    switch(aMsg->SearchTarget())
+        {
+        case CUpnpSsdpMessage::ESsdpNone:
+            
+            break;
+            
+        case CUpnpSsdpMessage::ESsdpAll:
+            // In case of Ssdp:all search, 
+            // every service should send a device uuid response
+            
+            // 1. service type response
+            /*
+            NT:     urn:schemas-upnp-org:service:serviceType:v
+            USN:     uuid:device-UUID::urn:schemas-upnp-org:service:serviceType:v
+            */
+            
+            // nt = urn:schemas-upnp-org:service:serviceType:v
+             nt = HBufC8::NewLC( KUPnPServiceSchema().Length() +
+                                 aServiceType.Length() );
+            nt->Des().Zero();
+            nt->Des().Append(KUPnPServiceSchema());
+            nt->Des().Append(aServiceType);
+            
+            // usn = uuid:device-UUID::urn:schemas-upnp
+            // -org:service:serviceType:v
+            
+            usn=HBufC8::NewLC(KUPnPUuid().Length()
+                +aDevice->UUID().Length()
+                +UpnpString::KDblColon().Length()
+                +KUPnPServiceSchema().Length()
+                +aServiceType.Length());
+
+            usn->Des().Zero();
+            usn->Des().Append(KUPnPUuid());
+            usn->Des().Append(aDevice->UUID());
+            usn->Des().Append(UpnpString::KDblColon());
+            usn->Des().Append(KUPnPServiceSchema());
+            usn->Des().Append(aServiceType);    
+            
+            // send response to sender
+            SendResponseL(aMsg->Sender() ,*nt, *usn, *loc);
+            
+            CleanupStack::PopAndDestroy(usn);
+            usn=NULL;
+            
+            CleanupStack::PopAndDestroy(nt);
+            nt=NULL;
+            
+            break;
+            
+        case CUpnpSsdpMessage::EUPnPRootDevice:
+            
+            break;
+            
+        case CUpnpSsdpMessage::EDeviceUid:
+            
+            break;
+            
+        case CUpnpSsdpMessage::EDeviceType:
+            
+            break;
+            
+        case CUpnpSsdpMessage::EServiceType:
+            {
+            /*
+            NT:     urn:schemas-upnp-org:service:serviceType:v
+            USN:     uuid:device-UUID::urn:schemas-upnp-
+                         org:service:serviceType:v
+            */
+                
+             // nt = urn:schemas-upnp-org:service:serviceType:v
+             nt = HBufC8::NewLC( KUPnPServiceSchema().Length() + 
+                                    aServiceType.Length());
+
+             nt->Des().Zero();
+             nt->Des().Append(KUPnPServiceSchema());
+             nt->Des().Append(aServiceType);
+            
+            if (aMsg->St().Compare(*nt) == 0)
+                {
+                
+                // usn = uuid:device-UUID::urn:schemas-upnp
+                //       -org:service:serviceType:v
+                usn=HBufC8::NewLC(KUPnPUuid().Length()
+                    +aDevice->UUID().Length()
+                    +UpnpString::KDblColon().Length()
+                    +KUPnPServiceSchema().Length()
+                    +aServiceType.Length());
+
+                usn->Des().Zero();
+                usn->Des().Append(KUPnPUuid());
+                usn->Des().Append(aDevice->UUID());
+                usn->Des().Append(UpnpString::KDblColon());
+                usn->Des().Append(KUPnPServiceSchema());
+                usn->Des().Append(aServiceType);    
+                
+                
+                // send response to sender
+                SendResponseL(aMsg->Sender() ,*nt, *usn, *loc);
+                
+                
+                CleanupStack::PopAndDestroy(usn);
+                usn=NULL;
+                
+                
+                }        
+            
+            CleanupStack::PopAndDestroy(nt);
+            nt=NULL;
+            }
+            break;
+        default:
+            
+            break;
+        }
+        
+        CleanupStack::PopAndDestroy(loc);
+        loc=NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::SingleDeviceResponseL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::SingleDeviceResponseL( CUpnpDeviceLibraryElement* aDevice, 
+                                         CUpnpSsdpMessage* aMsg )
+    {
+    if ( !aDevice || !aMsg )
+        {
+        return;
+        }
+    
+    // name buffers
+    HBufC8* nt=NULL;
+    HBufC8* usn=NULL;
+    HBufC8* loc=NULL;
+    
+    // format location buffer to point 
+    // to the device description file of this device
+    
+    loc=HBufC8::NewLC(aDevice->DescriptionUrl().Length());
+    loc->Des().Zero();
+    loc->Des().Append(aDevice->DescriptionUrl());
+    
+    // separate different search targets
+    switch( aMsg->SearchTarget() )
+        {
+        case CUpnpSsdpMessage::ESsdpNone:
+            
+            
+            break;
+            
+        case CUpnpSsdpMessage::ESsdpAll:
+            // In case of Ssdp:all search, every device should 
+            // send following responses:
+            // 1. if a root device, a root device response
+            // 2. a device uuid response
+            // 3. a device type response
+            
+            //************************
+            // 1. root device response        
+            /*
+            NT:     upnp:rootdevice
+            USN:     uuid:device-UUID::upnp:rootdevice
+            */
+            // if a root device
+            if (aDevice->IsRootDevice())
+                {
+                
+                
+                nt=HBufC8::NewLC(KUPnPRootDevice().Length());
+                nt->Des().Zero();
+                nt->Des().Append(KUPnPRootDevice());
+                
+                // nt = upnp:rootdevice
+                
+                // usn = uuid:device-UUID::upnp:rootdevice
+                
+                usn=HBufC8::NewLC(KUPnPUuid().Length()
+                    +aDevice->UUID().Length()
+                    +UpnpString::KDblColon().Length()
+                    +KUPnPRootDevice().Length());
+
+                usn->Des().Zero();
+                usn->Des().Append(KUPnPUuid());
+                usn->Des().Append(aDevice->UUID());
+                usn->Des().Append(UpnpString::KDblColon());
+                usn->Des().Append(KUPnPRootDevice());
+                
+                // send response to sender
+                SendResponseL(aMsg->Sender(), *nt, *usn, *loc);
+                
+                CleanupStack::PopAndDestroy(usn);
+                usn=NULL;
+                
+                CleanupStack::PopAndDestroy(nt);
+                nt=NULL;
+                }
+            
+            
+            //************************
+            // 2. device uuid response
+            /*
+            NT:     uuid:device-UUID
+            USN:     uuid:device-UUID
+            */
+            
+            nt=HBufC8::NewLC(KUPnPUuid().Length()+aDevice->UUID().Length());
+            nt->Des().Zero();
+            nt->Des().Append(KUPnPUuid());
+            nt->Des().Append(aDevice->UUID());
+            
+            // nt = uuid:device-UUID
+            
+            // usn = uuid:device-UUID
+            
+            usn=HBufC8::NewLC(KUPnPUuid().Length()+aDevice->UUID().Length());
+            usn->Des().Zero();
+            usn->Des().Append(KUPnPUuid());
+            usn->Des().Append(aDevice->UUID());
+            
+            // send response to sender
+            SendResponseL(aMsg->Sender(), *nt, *usn, *loc);
+            
+            CleanupStack::PopAndDestroy(usn);
+            usn=NULL;
+            
+            CleanupStack::PopAndDestroy(nt);
+            nt=NULL;
+            
+            
+            //************************
+            // 3. device type response
+            /*
+            NT:     urn:schemas-upnp-org:device:deviceType:v
+            USN:     uuid:device-UUID::urn:schemas-upnp-org:device:deviceType:v
+            */
+            
+            nt=HBufC8::NewLC(aDevice->DeviceType().Length());
+
+            nt->Des().Zero();
+            nt->Des().Append(aDevice->DeviceType());
+            
+            // nt = urn:schemas-upnp-org:device:deviceType:v
+            
+            // usn = uuid:device-UUID::urn:schemas-upnp-org:device:deviceType:v
+            
+            usn=HBufC8::NewLC(KUPnPUuid().Length()
+                +aDevice->UUID().Length()
+                +UpnpString::KDblColon().Length()
+                +aDevice->DeviceType().Length());
+
+            usn->Des().Zero();
+            usn->Des().Append(KUPnPUuid());
+            usn->Des().Append(aDevice->UUID());
+            usn->Des().Append(UpnpString::KDblColon());
+            usn->Des().Append(aDevice->DeviceType());
+            
+            // send response to sender
+            SendResponseL(aMsg->Sender(), *nt, *usn, *loc);
+            
+            
+            CleanupStack::PopAndDestroy(usn);
+            usn=NULL;
+            
+            CleanupStack::PopAndDestroy(nt);
+            nt=NULL;
+            
+            
+            break;
+            
+        case CUpnpSsdpMessage::EUPnPRootDevice:
+            // if the search is done for only root devices, 
+            // every root device should answer with a root device response
+            
+            //************************
+            // 1. root device response        
+            /*
+            NT:     upnp:rootdevice
+            USN:     uuid:device-UUID::upnp:rootdevice
+            */
+            // if device is a root device
+            if (aDevice->IsRootDevice())
+                {
+                
+                nt=HBufC8::NewLC(KUPnPRootDevice().Length());
+                nt->Des().Zero();
+                nt->Des().Append(KUPnPRootDevice());
+                
+                usn=HBufC8::NewLC(KUPnPUuid().Length()
+                    +aDevice->UUID().Length()
+                    +UpnpString::KDblColon().Length()
+                    +KUPnPRootDevice().Length());
+
+                usn->Des().Zero();
+                usn->Des().Append(KUPnPUuid());
+                usn->Des().Append(aDevice->UUID());
+                usn->Des().Append(UpnpString::KDblColon());
+                usn->Des().Append(KUPnPRootDevice());
+                
+                // send response to sender
+                SendResponseL(aMsg->Sender(), *nt, *usn, *loc);
+                
+                CleanupStack::PopAndDestroy(usn);
+                usn=NULL;
+                
+                CleanupStack::PopAndDestroy(nt); 
+                nt=NULL;
+                }
+            
+            
+            break;
+            
+        case CUpnpSsdpMessage::EDeviceUid:
+            {
+            // if the search is done for only devices with specific uuid,
+            // response if the uuids match
+            
+            //************************
+            // 2. device uuid response
+            /*
+            NT:     uuid:device-UUID
+            USN:     uuid:device-UUID
+            */
+            
+            // nt = uuid:device-UUID
+            nt=HBufC8::NewLC(KUPnPUuid().Length()
+                    +aDevice->UUID().Length());
+
+            nt->Des().Zero();
+            nt->Des().Append(KUPnPUuid());
+            nt->Des().Append(aDevice->UUID());
+            
+            
+            // if device uuids match
+            if (aMsg->St().Compare(*nt) == 0)
+                {
+
+                usn=HBufC8::NewLC(KUPnPUuid().Length()
+                    +aDevice->UUID().Length());
+
+                usn->Des().Zero();
+                usn->Des().Append(KUPnPUuid());
+                usn->Des().Append(aDevice->UUID());
+                
+                // send response to sender
+                SendResponseL(aMsg->Sender(), *nt, *usn, *loc);
+                
+                CleanupStack::PopAndDestroy(usn);
+                usn=NULL;
+                
+                
+                }
+                CleanupStack::PopAndDestroy(nt);
+                nt=NULL;
+            
+            }
+            break;
+            
+        case CUpnpSsdpMessage::EDeviceType:
+            {
+            // if the search is done for only devices of specific type,
+            // response if types match
+            
+            //************************
+            // 3. device type response
+            /*
+            NT:     urn:schemas-upnp-org:device:deviceType:v
+            USN:     uuid:device-UUID::urn:schemas-upnp-org:device:deviceType:v
+            */
+                        
+            // nt = urn:schemas-upnp-org:device:deviceType:v                
+             nt=HBufC8::NewLC(aDevice->DeviceType().Length());
+
+             nt->Des().Zero();
+             nt->Des().Append(aDevice->DeviceType());
+            
+            // if device types match
+            if (aMsg->St().Compare(*nt) == 0)
+                {         
+                
+                // usn = uuid:device-UUID::urn:schemas-upnp-org:device:deviceType:v                
+                usn=HBufC8::NewLC(KUPnPUuid().Length()
+                    +aDevice->UUID().Length()
+                    +KDblColon().Length()
+                    +aDevice->DeviceType().Length());
+
+                usn->Des().Zero();
+                usn->Des().Append(KUPnPUuid());
+                usn->Des().Append(aDevice->UUID());
+                usn->Des().Append(KDblColon());
+                usn->Des().Append(aDevice->DeviceType());
+                
+                // send response to sender
+                SendResponseL(aMsg->Sender(), *nt, *usn, *loc);
+                
+                CleanupStack::PopAndDestroy(usn);
+                usn=NULL;
+                
+                
+                }
+                CleanupStack::PopAndDestroy(nt);
+                nt=NULL;
+
+            
+            }
+            break;
+            
+        case CUpnpSsdpMessage::EServiceType:
+            // devices do not answer if searching services
+            
+            break;
+        default:
+            
+            break;
+        }
+        
+    CleanupStack::PopAndDestroy( loc );
+    loc = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::ResponseL
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpServer::ResponseL(CUpnpSsdpMessage* aMsg)
+    {
+    if ( !aMsg )
+        {
+        return;
+        }
+    
+    // a search message is received
+    // seek for devices and services matching to the search
+    
+    // get device list from message handler
+    RPointerArray<CUpnpDeviceLibraryElement>& devs 
+        = iSsdpServerObserver->DeviceList();
+   
+
+    TInt devCount=0;
+     // get number of devices
+    devCount=devs.Count();
+    
+    TInt j=0;
+    
+    for(j=0;j<devCount;j++)
+        {
+        CUpnpDeviceLibraryElement* dev = (CUpnpDeviceLibraryElement*) devs[j];
+        
+        if (dev->Local())
+            {
+            // for every device
+            // make this device respond if needed
+            SingleDeviceResponseL(dev, aMsg);
+            // get the service list of this device
+            CDesC8Array* services = &dev->ServiceList();
+            // get the first service
+            
+            for(TInt i=0; i<services->Count(); i++)
+                {
+                TPtrC8 serviceType = (*services)[i];
+                SingleServiceResponseL(dev, serviceType, aMsg);
+                }
+            }
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/src/upnpudpsendrequest.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,71 @@
+/** @file
+* 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:  CUpnpUdpSendRequest
+*
+*/
+
+
+// INCLUDE FILES
+#include <in_sock.h>
+#include "upnpudpsendrequest.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpSendRequest::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpUdpSendRequest* CUpnpUdpSendRequest::NewL( TDesC8& aBuffer,
+    TInetAddr& anAddr )
+    {
+    CUpnpUdpSendRequest* self = new (ELeave) CUpnpUdpSendRequest( anAddr );
+    CleanupStack::PushL( self );
+    self->ConstructL( aBuffer );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpSendRequest::CUpnpUdpSendRequest
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpUdpSendRequest::CUpnpUdpSendRequest( const TInetAddr& anAddr )
+    : iAddr( anAddr )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpSendRequest::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpSendRequest::ConstructL( const TDesC8& aBuffer )
+    {
+    iBuffer = aBuffer.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpSendRequest::~CUpnpUdpSendRequest
+// Destructor
+// -----------------------------------------------------------------------------
+// 
+CUpnpUdpSendRequest::~CUpnpUdpSendRequest()
+    {
+    delete iBuffer;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/ssdpserver/src/upnpudpserver.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,936 @@
+/** @file
+* Copyright (c) 2005-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:  CUpnpUdpServer
+*
+*/
+
+
+// INCLUDE FILES
+#include <in_iface.h>
+#include <e32math.h>
+#include <commdb.h>
+
+#include "upnpcons.h"
+#include "upnpudpsendrequest.h"
+#include "upnpudpserver.h"
+#define KLogFile _L("upnpudpserver.txt")
+#include "upnpcustomlog.h"
+#include "upnpstring.h"
+#include "upnplist.h"
+#include "upnpconnectionmanagerproxy.h"
+
+
+// CONSTANTS
+const TUint32 KUdpMessageSize = 2048;
+const TInt KTTLValue = 4;
+const TInt KMicrosecond = 1000000;
+const TInt KMXMaxValue = 120;
+const TInt KInetAddrPrefixMatchLen = 16;
+
+// ============================= LOCAL FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// CleanupArray
+// Used by TCleanupItem to clean a RPointerArray<TPtrC>
+// -----------------------------------------------------------------------------
+//
+void CleanupArray( TAny* aArray )
+    {
+    ( reinterpret_cast<RPointerArray<TPtrC8>*>( aArray ) )->ResetAndDestroy();
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::CUpnpUdpServer
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpUdpServer::CUpnpUdpServer( RSocketServ* aSocketServ,
+                        MUpnpUdpServerObserver* aObserver,
+                        TInt aListeningPort )
+    : CActive( EPriorityHigh ),
+      iMulticastFlags( 0 ),
+      iMessagePtr( NULL, 0,0 ),
+      iIsStarted( EFalse )
+    {
+    LOGS( "SSDP *** CUpnpUdpServer::CUpnpUdpServer");
+
+    CActiveScheduler::Add( this );
+    iSocketServ = aSocketServ;
+    iObserver = aObserver;
+    iServerPort = aListeningPort;
+
+    iRandomSeed = KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::UdpConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::UdpConstructL()
+    {
+    iSendMessage = NULL;
+
+    iPendingTimerMessages = new (ELeave) CArrayPtrSeg<CUpnpSsdpMessage>( 1 );
+
+    // Create local timer
+    User::LeaveIfError( iSendTimer.CreateLocal() );
+
+    iConnectionManagerProxy = CUpnpConnectionManagerProxy::NewL( *iSocketServ );
+    TInt error = iConnectionManagerProxy->EnsureStart();
+
+    if ( error )
+        {
+        LOGS1( "CUpnpTcpServer::ListenL *** Error in attaching RConnection: error: %d",
+            error );
+        // Nothing else to do but leave, connection is not possible and
+        // can't access network
+        User::LeaveIfError( error );
+        }
+
+    iActiveIap = iConnectionManagerProxy->ActiveIap();
+    iLocalInterfaceAddress = iConnectionManagerProxy->LocalAddress();
+
+    RefreshLocalAddressInfo();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::~CUpnpUdpServer()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpUdpServer::~CUpnpUdpServer()
+    {
+    LOGS( "SSDP *** CUpnpUdpServer::~CUpnpUdpServer");
+    Cancel();
+    Close();
+
+    iSendTimer.Close();
+
+    iSendRequestList.ResetAndDestroy();
+    iSendRequestList.Close();
+
+    delete iSendMessage;
+
+    delete iMessage;
+
+    if( iPendingTimerMessages )
+        {
+        // Go through the messages and cancel timers
+        for(TInt i=0; i< iPendingTimerMessages->Count(); i++)
+            {
+            CUpnpSsdpMessage* arrayMsg = iPendingTimerMessages->At( i );
+            if( arrayMsg )
+                {
+                // Cancel the timer in the message
+                arrayMsg->CancelMessageTimeout();
+                }
+            }
+        // Destroy the whole message array
+        iPendingTimerMessages->ResetAndDestroy();
+        delete iPendingTimerMessages;
+        iPendingTimerMessages = NULL;
+        }
+
+    // close network connection
+    delete iConnectionManagerProxy;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::JoinMulticastGroupL
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::JoinMulticastGroupL()
+    {
+    TIp6Mreq mreq;
+    // the ipv4 multicast address that should use
+    TInetAddr addr;
+    addr.SetAddress( KDefaultMulticastAddress );
+    addr.SetFamily( KAfInet );
+    addr.ConvertToV4Mapped();
+
+    mreq.iAddr = addr.Ip6Address();
+    mreq.iInterface = 0;
+    TPckgBuf< TIp6Mreq > opt( mreq );
+
+    LOGS( "SSDP CUpnpUdpServer::JoinMulticastGroupL" );
+    User::LeaveIfError( iSocket.SetOpt( KSoIp6JoinGroup, KSolInetIp, opt ) );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::ApplyMulticastSocketSettingsL
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::ApplyMulticastSocketSettingsL()
+    {
+    LOGS( "SSDP CUpnpUdpServer::ApplyMulticastSocketSettingsL" );
+
+    User::LeaveIfError( iSocket.SetOpt( KSoIp6MulticastLoop, KProtocolInetIp, 0 ) );
+    User::LeaveIfError( iSocket.SetOpt( KSoReuseAddr, KProtocolInetIp, 1 ) );
+
+    JoinMulticastGroupL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::ApplyCommonSocketSettingsL
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::ApplyCommonSocketSettingsL()
+    {
+    LOGS( "SSDP CUpnpUdpServer::ApplyCommonSocketSettingsL Socket TTL" );
+
+    User::LeaveIfError( iSocket.SetOpt( KSoIpTTL, KSolInetIp, KTTLValue ) );
+    User::LeaveIfError( iSocket.SetOpt( KSoIp6MulticastHops, KSolInetIp,
+                                        KTTLValue ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::OpenL
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::OpenL( )
+    {
+    if ( !IsStarted() )
+        {
+        TRAPD( error, OpenSocketAndStartReceiveL() )
+        if ( error )
+            {
+            LOGS1( "SSDP CUpnpUdpServer::OpenL error: %d", error );
+            Close();
+            User::Leave( error );
+            }
+        else
+            {
+            iIsStarted = ETrue;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::OpenSocketAndStartReceiveL
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::OpenSocketAndStartReceiveL( )
+    {
+    LOGS( "SSDP CUpnpUdpServer::OpenSocketAndStartReceiveL");
+    TInt error = iSocket.Open( *iSocketServ, KAfInet,
+        KSockDatagram, KProtocolInetUdp, iConnectionManagerProxy->ConnectionL() );
+    User::LeaveIfError( error );
+
+    User::LeaveIfError( iSocket.SetLocalPort( iServerPort ) );
+    // for multicast start
+    if ( KDefaultMulticastPort == iServerPort )
+        {
+        ApplyMulticastSocketSettingsL();
+        }
+
+    ApplyCommonSocketSettingsL();
+
+    TInetAddr bindAddr;
+    error = iSocket.Bind( bindAddr ) ;
+    if( KErrNone != error && KErrAlreadyExists != error )
+        {
+        LOGS( "SSDP CUpnpUdpServer::OpenSocketAnd.. bind error: %d");
+        User::Leave( error );
+        }
+
+    ReceiveL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::IsStarted
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpUdpServer::IsStarted()
+    {
+    return iIsStarted;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::SendL
+// Send a message.
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::SendL( TDesC8& aBuffer, TInetAddr& anAddr )
+    {
+    LOGS( "SSDP *** CUpnpUdpServer::SendL");
+
+    if ( !IsStarted() )
+        {
+        return;
+        }
+
+    if ( IsActive() && ( iState == ESendingTimer || iState == ESendDone ) )
+        {
+        CUpnpUdpSendRequest* req = CUpnpUdpSendRequest::NewL( aBuffer, anAddr );
+        CleanupStack::PushL( req );
+        iSendRequestList.AppendL( req );
+        CleanupStack::Pop( req );
+        }
+    else
+        {
+        Cancel();
+
+        delete iSendMessage;
+        iSendMessage = NULL;
+        iSendMessage = aBuffer.AllocL();
+
+        iSenderAddress = anAddr;
+        iSenderAddress.SetFamily( KAfInet );
+
+        iSenderAddress.ConvertToV4Mapped();
+
+        iSocket.SendTo( *iSendMessage,
+                        iSenderAddress,
+                        iMulticastFlags,
+                        iStatus );
+
+        iState = ESendingTimer; // in this state when RunL will be called after sending
+                                // message successfuly, the delay timer will start
+        SetActive();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::SendDoneL
+// Sending is done.
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::SendDoneL()
+    {
+    LOGS( "SSDP *** CUpnpUdpServer::SendDoneL");
+
+    delete iSendMessage;
+    iSendMessage = NULL;
+
+    if ( iSendRequestList.Count() > 0 )
+        {
+        CUpnpUdpSendRequest* request = iSendRequestList[0];
+        iSendRequestList.Remove(0);
+        iSendRequestList.Compress();
+        CleanupStack::PushL( request );
+        SendL( *(request->iBuffer), request->iAddr );
+        CleanupStack::PopAndDestroy( request );
+        }
+    else
+        {
+        ReceiveL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::ReceiveL
+// Receive message.
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::ReceiveL()
+    {
+    LOGS( "SSDP *** CUpnpUdpServer::ReceiveL");
+
+    if ( !IsActive() )
+        {
+        // If iMessage is not yet created, do it now.
+        // This pointer will be used until SSDP server is closed down.
+        if ( !iMessage )
+            {
+            iMessage = HBufC8::NewL( KUdpMessageSize );
+            }
+
+        // Set data length to zero for the next RecvFrom
+        iMessage->Des().SetLength( 0 );
+
+        iMessagePtr.Set( (unsigned char*) iMessage->Ptr(), 0, KUdpMessageSize );
+
+        iClientAddr.SetPort( iServerPort );
+
+        iSocket.RecvFrom( iMessagePtr, iClientAddr, iMulticastFlags, iStatus );
+
+        SetActive();
+        iState = EReceiving;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::RunL
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::RunL()
+    {
+
+    if ( iStatus.Int() != KErrNone )
+        {
+        LOGS1( "SSDP *** CUpnpUdpServer::RunL - UDPServer error, error code: %d",
+            iStatus.Int() );
+
+        if ( iStatus.Int() != KErrCancel )
+            {
+            ReceiveL();
+            }
+        else
+            {
+            RestartOrContinueSendProcessingL();
+            }
+        }
+    else
+        {
+        switch ( iState )
+            {
+            case ESendingTimer:                                // Introduce delay between sending messages to prevent from
+                // Introduce delay between sending messages to prevent from
+                iSendTimer.Cancel();               
+                iSendTimer.After( iStatus, KSendingDelay ); // SSDP notification storm.
+                iState = ESendDone;
+                SetActive();
+                break;
+            case EReceiving:
+                {
+                TUint temp = iClientAddr.Address();
+
+                TUint port = iClientAddr.Port();
+
+                TInetAddr addr = TInetAddr( temp, port );
+
+                addr.SetFamily( KAfInet );
+#ifdef _DEBUG
+                TBuf8<KAddressLength> address;
+                CUpnpHttpMessage::AddrOutput(addr, address);
+
+                TBuf<KMaxName> logBuf;
+                    logBuf.Copy( address.Left( logBuf.MaxLength() ) );
+                LOGS1( "SSDP *** CUpnpUdpServer::RunL - Received buffer from: %S",
+                    &logBuf );
+#endif //_DEBUG
+
+                CUpnpSsdpMessage* msg = NULL;
+
+                TRAPD( err, msg = CUpnpSsdpMessage::NewL(
+                    (TDesC8&) iMessagePtr, addr ) );
+                if ( err )
+                    {
+                    delete msg;
+                    msg = NULL;
+                    LOGS( "SSDP *** CUpnpUdpServer::RunL - Ssdp message parse failed. Ingoring message.");
+                    RestartOrContinueProcessingL();
+                    return;
+                    }
+                CleanupStack::PushL(msg);
+                // check that given message is valid.
+                TInt error = ValidateSsdpMessageL( msg );
+                if( error == KErrNone )
+                    {
+
+                    // no error, message is put to receive queue, and it gets
+                    // handled when the timer expires.
+                    // KErrNone used for constant, because it always remains
+                    // the same.
+                    if( msg->IsSsdpMSearch() )
+                        {
+                        CleanupStack::Pop( msg );
+
+                        AddPendingTimerMessageL( msg );
+
+                        // no delete, message in array
+                        msg = NULL;
+                        }
+                    else
+                        {
+                        //checks wether the Source IP is in same network i.e. auto-IP(169.254.X.X) or non-auto-IP range
+
+                        TInetAddr autoIPAddr = TInetAddr( KDefaultAutoIPAddress,
+                                                          KDefaultMulticastPort );
+                        autoIPAddr.SetFamily( KAfInet );
+
+                        if ( iAutoIP && autoIPAddr.Match( addr, KInetAddrPrefixMatchLen ) )
+                            {
+                            LOGS( "SSDP *** MESSAGE_FROM_AUTO_VERIFIED_NETWORK");
+                            iObserver->UdpMessageReceivedL( msg );
+                            }
+                        else if ( !autoIPAddr.Match( addr, KInetAddrPrefixMatchLen ) )
+                            {
+                            LOGS( "SSDP *** MESSAGE_FROM_NON_AUTO_VERIFIED_NETWORK");
+                            iObserver->UdpMessageReceivedL( msg );
+                            }
+
+                        CleanupStack::PopAndDestroy(msg);
+                        }
+                    }
+                else
+                    {
+                    // message not valid, delete it.
+                    LOGS( "SSDP *** CUpnpUdpServer::RunL - Invalid SSDP message. Ingoring message.");
+                    CleanupStack::PopAndDestroy(msg);
+                    }
+
+                RestartOrContinueProcessingL();
+
+                }
+                break;
+            case ESending:
+                delete iSendMessage;
+                iSendMessage = NULL;
+                RestartOrContinueProcessingL();
+                break;
+
+            case ESendDone:
+                SendDoneL();
+                break;
+
+            default:
+                // message not valid, delete it.
+                LOGS( "SSDP *** CUpnpUdpServer::RunL - DEFAULT CASE, NOTHING TO DO!");
+                break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpServer::RunError
+// Active Object RunError called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpUdpServer::RunError( TInt aError )
+    {
+LOGS1( "SSDP *** CUpnpUdpServer::RunError: %d", aError );
+    TRAP_IGNORE( RestartOrContinueProcessingL() );
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::DoCancel
+// Active object DoCancel cancels active request.
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::DoCancel()
+    {
+    iSocket.CancelAll();
+    iSendTimer.Cancel();    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::CloseL
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::Close()
+    {
+    LOGS( "SSDP *** CUpnpUdpServer::Close");
+
+    if ( IsStarted() ) // socket can be not open correctly
+        {
+        Cancel();
+        // for multicast start
+        if(iServerPort == KDefaultMulticastPort)
+            {
+            TIp6Mreq mreq;
+
+            TInetAddr addr;
+            addr.SetAddress( KDefaultMulticastAddress );
+            addr.SetPort(KDefaultMulticastPort);
+            addr.SetFamily(KAfInet);
+            addr.ConvertToV4Mapped();
+            mreq.iAddr = addr.Ip6Address();
+
+            mreq.iInterface = 0;
+            TPckgBuf< TIp6Mreq > opt(mreq);
+            iSocket.SetOpt(KSoIp6LeaveGroup, KSolInetIp, opt);
+            }
+        // for multicast end.
+        }
+    iSocket.Close();
+    iIsStarted = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::ValidateSsdpMessageL
+// Function validates SSDP messages. It checks that correct headers are
+// found etc.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CUpnpUdpServer::TSsdpValidity CUpnpUdpServer::ValidateSsdpMessageL( CUpnpSsdpMessage* aMsg )
+    {
+    CUpnpUdpServer::TSsdpValidity validity = CUpnpUdpServer::EMessageOk;
+
+    // Message is search message
+    if( aMsg->IsSsdpMSearch() )
+        {
+        // checking first line of message
+        CUpnpHttpHeaderList* list=aMsg->HeaderList();
+        CUpnpHttpHeader* header = list->First();
+        if( header )
+            {
+            if(!CompareLinesL(header->Name(),UpnpSSDP::KMethodMSearch()))
+                {
+                // First line of message not "M-SEARCH * HTTP/1.1".
+                // Invalid message.
+               validity = CUpnpUdpServer::EHeaderNotMSearch;
+                }
+            }
+        else
+            {
+            // no headers. Invalid message. no further handling.
+            validity = CUpnpUdpServer::EHeadersMissing;
+            return validity;
+            }
+
+        // no delete, owned by message.
+        header=NULL;
+        // no delete, owned by message.
+        list=NULL;
+
+        TDesC8& mxString = aMsg->GetHeaderValue( UpnpSSDP::KHdrMx() );
+
+        // if no MX header found, not valid message.
+        if( mxString != KNullDesC8() )
+            {
+            // try to parse value to TInt. If possible, then message is valid for MX check.
+            TInt mxValue = 0;
+            TInt errorInConversion = 0;
+            TLex8 lex( mxString );
+            errorInConversion = lex.Val(mxValue);
+            // check that there are no errors in conversion. If error in conversion,
+            // not valid SSDP MX header.
+            if( errorInConversion != KErrNone || lex.Remainder().Length() > 0)
+                {
+                validity = CUpnpUdpServer::EErrorInMxConversion;
+                }
+            else if( mxValue < 0 )
+                {
+                // check that MX value is positive. Negative value not valid.
+                validity = CUpnpUdpServer::EInvalidMXValue;
+                }
+
+            // Checking if MAN header is found.
+            TDesC8& manString = aMsg->GetHeaderValue( UpnpSSDP::KHdrMan() );
+            if( manString != KNullDesC8() )
+                {
+                // MAN header found. Checking that is has valid value.
+                if( manString != UpnpSSDP::KNotificationDiscover() )
+                    {
+                    // MAN header value not "ssdp:discover". Invalid header.
+                    validity = CUpnpUdpServer::EInvalidManHeader;
+                    }
+                }
+            else
+                {
+                // MAN header not found. Invalid message.
+                validity = CUpnpUdpServer::EInvalidManHeader;
+                }
+
+            // Check that ST header is found.
+            TDesC8& stString = aMsg->GetHeaderValue( UpnpSSDP::KHdrSt() );
+            if( stString == KNullDesC8() )
+                {
+                // no ST header found. invalid SSDP search.
+                validity = CUpnpUdpServer::EInvalidStHeader;
+                }
+
+            TDesC8& hostString = aMsg->GetHeaderValue( UpnpSSDP::KHdrHost() );
+            if( hostString != UpnpSSDP::KDefaultHost() )
+                {
+                // HOST header not "239.255.255.250:1900". Invalid message.
+                validity = CUpnpUdpServer::EInvalidHostHeader;
+                }
+            }
+        else
+            {
+            // no MX header.
+            validity = CUpnpUdpServer::EInvalidMXValue;
+            }
+        }
+
+
+    // Message is SSDP response
+    else if( aMsg->IsSsdpResponse() )
+        {
+        // if message is SSDP response, header should
+        // be "HTTP/1.1 200 OK".
+        CUpnpHttpHeaderList* list=aMsg->HeaderList();
+        CUpnpHttpHeader* header = list->First();
+        if( header )
+            {
+            if (!CompareLinesL(header->Name(),UpnpHTTP::KHTTPOk()))
+                {
+                // First line of message not "HTTP/1.1 200 OK".
+                // Invalid message.
+                LOGS( "SSDP *** CUpnpUdpServer::EBadSsdpResponse");
+                validity = CUpnpUdpServer::EBadSsdpResponse;
+                }
+            }
+        else
+            {
+            // no headers. Invalid message. no further handling.
+            LOGS( "SSDP *** CUpnpUdpServer::EHeadersMissing");
+            validity = CUpnpUdpServer::EHeadersMissing;
+            return validity;
+            }
+
+        // no delete, owned by message.
+        header=NULL;
+        // no delete, owned by message.
+        list=NULL;
+
+        TDesC8& cache = aMsg->GetHeaderValue( UpnpSSDP::KHdrCacheControl() );
+        if( cache != KNullDesC8() )
+            {
+            TPtrC8 cachePtr;
+            cachePtr.Set( cache );
+
+            TInt posOfMaxAge = cachePtr.FindC( UpnpSSDP::KSsdpMaxAge() );
+            TInt posOfEqual = cachePtr.FindC( UpnpString::KEqual() );
+            if (posOfMaxAge != KErrNotFound && posOfEqual!= KErrNotFound
+                                            && posOfMaxAge < posOfEqual)
+                {
+                cachePtr.Set( cachePtr.Right((cachePtr.Length()
+                    - UpnpString::KEqual().Length()) - posOfEqual) );
+                }
+
+            TInt cacheValue = 0;
+            TInt errorInConversion = 0;
+            TLex8 lex( cachePtr );
+            lex.SkipSpace();
+            errorInConversion = lex.Val(cacheValue);
+            // check that there are no errors in conversion.
+            // If error in conversion, not valid
+            // SSDP CACHE-CONTROL header.
+            if( errorInConversion < KErrNone )
+                {
+                LOGS( "SSDP *** CUpnpUdpServer::EInvalidCacheControlHeader");
+                validity = CUpnpUdpServer::EInvalidCacheControlHeader;
+                }
+            else if ( cacheValue < 0 )
+                {
+                // check that CACHE-CONTROL value is positive.
+                // Negative value not valid.
+                LOGS( "SSDP *** CUpnpUdpServer::EInvalidCacheControlHeader");
+                validity = CUpnpUdpServer::EInvalidCacheControlHeader;
+                }
+            }
+        else
+            {
+            // no CACHE-CONTROL header. Invalid message.
+            LOGS( "SSDP *** CUpnpUdpServer::EInvalidCacheControlHeader");
+            validity = CUpnpUdpServer::EInvalidCacheControlHeader;
+            }
+
+        }
+
+    return validity;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::CompareLines
+// Compare two line ignoring number of space between elements
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpUdpServer::CompareLinesL(const TDesC8& aValue, const TDesC8& aPattern)
+    {
+    TBool result = EFalse;
+    TPtrC8 value(aValue);
+    TPtrC8 pattern(aPattern);
+    RPointerArray<TPtrC8> values;
+    RPointerArray<TPtrC8> patterns;
+    CleanupStack::PushL( TCleanupItem( CleanupArray, &values ) );
+    CleanupStack::PushL( TCleanupItem( CleanupArray, &patterns ) );
+
+    UpnpString::CutToPiecesL(value,UpnpString::KSpace()[0], values);
+    UpnpString::CutToPiecesL(pattern,UpnpString::KSpace()[0], patterns);
+
+    if (values.Count() == patterns.Count())
+        {
+        result = ETrue;
+        for (TInt i = 0; i < values.Count(); i++)
+            {
+            if (patterns[i]->Compare(*(values[i])) != 0)
+                {
+                result = EFalse;
+                break;
+                }
+            }
+        }
+
+    CleanupStack::PopAndDestroy( &patterns );
+    CleanupStack::PopAndDestroy( &values );
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::RestartOrContinueSendProcessingL()
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpUdpServer::RestartOrContinueSendProcessingL()
+    {
+    if ( iSendRequestList.Count() > 0 )
+        {
+        CUpnpUdpSendRequest* request = iSendRequestList[0];
+        CleanupStack::PushL( request );
+        iSendRequestList.Remove( 0 );
+        iSendRequestList.Compress();
+        SendL( *( request->iBuffer ), request->iAddr );
+        CleanupStack::PopAndDestroy( request );
+        return ETrue;
+        }
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::RestartOrContinueProcessing
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::RestartOrContinueProcessingL()
+    {
+    if ( !RestartOrContinueSendProcessingL() )
+        {
+        ReceiveL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::MessageExpiredL
+// Function gets called when message's timer expires. This means that this
+// message should be sent.
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::MessageExpiredL( CUpnpHttpMessage* aMessage )
+    {
+    LOGS( "SSDP *** CUpnpUdpServer::MessageExpiredL" );
+
+    CUpnpSsdpMessage* msg = static_cast<CUpnpSsdpMessage*>( aMessage );
+
+    // going thru array and removing current message from it.
+    for ( TInt i = 0; i < iPendingTimerMessages->Count(); i++ )
+        {
+        CUpnpSsdpMessage* arrayMsg = iPendingTimerMessages->At( i );
+        if ( arrayMsg == msg )
+            {
+            // Remove message from array and compress array.
+            iPendingTimerMessages->Delete( i );
+            iPendingTimerMessages->Compress();
+            break;
+            }
+        }
+    // Prevents WLan lost MessageHandler panic 
+    // don't remove because if this function leaves msg is destroyed. 
+    // Msg has CActive responsible for RunError as member so it will be destroyed and therefore
+    // CActiveSheduler will cause unhandled exception which is seen as messagehandler panic
+    TRAP_IGNORE( iObserver->UdpMessageReceivedL( msg ) );
+    delete msg; 
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::AddressChangedL()
+// Function gets called when the IP address of server is changed
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpUdpServer::AddressChangedL( TInetAddr& aAddr )
+    {
+    Close();
+    iLocalInterfaceAddress = aAddr;
+    RefreshLocalAddressInfo();
+    OpenL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::UpdateLocalAddressInfoL()
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::RefreshLocalAddressInfo()
+    {
+#ifdef _DEBUG
+    TBuf<KAddressLength> buf;
+    iLocalInterfaceAddress.Output( buf );
+    LOGS1( "SSDP AddressChangedL IP: %S", &buf );
+#endif //_DEBUG
+
+    TInetAddr addr = TInetAddr( KDefaultAutoIPAddress, KDefaultMulticastPort );
+    addr.SetFamily( KAfInet );
+
+    if ( iLocalInterfaceAddress.Match( addr, KInetAddrPrefixMatchLen ) )
+        {
+        iAutoIP = ETrue;
+        LOGS( "SSDP AddressChangedL AUTO_IP" );
+        }
+    else
+        {
+        iAutoIP = EFalse;
+        LOGS( "SSDP AddressChangedL NO_AUTO_IP" );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::CalculateMxValue()
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpUdpServer::CalculateMxValue( const TDesC8& aMxString )
+    {
+    TReal rand = Math::FRand( iRandomSeed );
+
+    TLex8 lex( aMxString );
+    TInt mxValue( 0 );
+
+    TInt lexError = lex.Val( mxValue );
+    if (( lexError != KErrNone ) || ( mxValue > KMXMaxValue )) // if delay in responsing more than 120 sec then it should be decreased until 120 sec
+        {
+        mxValue = KMXMaxValue;
+        }
+
+    // divide by two to ensure that the responses
+    // come before the time expires
+    TReal mx = rand * KMicrosecond * mxValue / 2;
+    return mx;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpUdpServer::AddPendingTimerMessageL()
+// -----------------------------------------------------------------------------
+//
+void CUpnpUdpServer::AddPendingTimerMessageL( CUpnpSsdpMessage* aMessage )
+    {
+    // only 20 messages allowed from one IP
+    const TInt KMaxMessageNumberFromOneIP = 20;
+    
+    TInt cnt = 0;
+    for ( TInt i = 0; i < iPendingTimerMessages->Count(); i++ )
+        {
+        CUpnpSsdpMessage* msg = iPendingTimerMessages->At( i );
+        if ( msg->Sender().Address() == aMessage->Sender().Address() )
+            {
+            if ( ++cnt > KMaxMessageNumberFromOneIP )
+                {
+                delete aMessage;
+                return;
+                }
+            }
+        }
+
+    CleanupStack::PushL( aMessage );
+
+    // parsing value for wait timer
+    TInt mxUse = CalculateMxValue(
+                        aMessage->GetHeaderValue( UpnpSSDP::KHdrMx() ) );
+
+    // set message timeout so when timout occurs, message
+    // get's handled.
+    aMessage->SetMessageTimeoutL( this, mxUse );
+
+    // appending message to array
+    iPendingTimerMessages->AppendL( aMessage );
+
+    CleanupStack::Pop( aMessage );
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/BWINS/upnpconnectionmanagersessionu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,23 @@
+EXPORTS
+	??0CUpnpConnectionManagerNetworkEventProvider@@AAE@AAVMUpnpNetworkEventObserver@@@Z @ 1 NONAME ; CUpnpConnectionManagerNetworkEventProvider::CUpnpConnectionManagerNetworkEventProvider(class MUpnpNetworkEventObserver &)
+	??0TUpnpConnectionManagerNetworkEvent@@QAE@W4TUpnpCmSubRsp@@@Z @ 2 NONAME ; TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent(enum TUpnpCmSubRsp)
+	??0TUpnpConnectionManagerNetworkEvent@@QAE@W4TUpnpCmSubRsp@@VTInetAddr@@@Z @ 3 NONAME ; TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent(enum TUpnpCmSubRsp, class TInetAddr)
+	??0TUpnpConnectionManagerNetworkEvent@@QAE@XZ @ 4 NONAME ; TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent(void)
+	?ActiveIap@CUpnpConnectionManagerProxy@@QAEHXZ @ 5 NONAME ; int CUpnpConnectionManagerProxy::ActiveIap(void)
+	?ConnectionL@CUpnpConnectionManagerProxy@@QAEAAVRConnection@@XZ @ 6 NONAME ; class RConnection & CUpnpConnectionManagerProxy::ConnectionL(void)
+	?EnsureStart@CUpnpConnectionManagerProxy@@QAEHXZ @ 7 NONAME ; int CUpnpConnectionManagerProxy::EnsureStart(void)
+	?GetActiveIapL@CUpnpConnectionManagerProxy@@SAHXZ @ 8 NONAME ; int CUpnpConnectionManagerProxy::GetActiveIapL(void)
+	?Address@CUpnpNetworkEventAddressChange@@QAE?AVTInetAddr@@XZ @ 9 NONAME ; class TInetAddr CUpnpNetworkEventAddressChange::Address(void)
+	?InetAddr@TUpnpConnectionManagerNetworkEvent@@QAE?AVTInetAddr@@XZ @ 10 NONAME ; class TInetAddr TUpnpConnectionManagerNetworkEvent::InetAddr(void)
+	?LocalAddress@CUpnpConnectionManagerProxy@@QAE?AVTInetAddr@@XZ @ 11 NONAME ; class TInetAddr CUpnpConnectionManagerProxy::LocalAddress(void)
+	?NewL@CUpnpConnectionManagerNetworkEventProvider@@SAPAV1@AAVMUpnpNetworkEventObserver@@@Z @ 12 NONAME ; class CUpnpConnectionManagerNetworkEventProvider * CUpnpConnectionManagerNetworkEventProvider::NewL(class MUpnpNetworkEventObserver &)
+	?NewL@CUpnpConnectionManagerProxy@@SAPAV1@AAVRSocketServ@@@Z @ 13 NONAME ; class CUpnpConnectionManagerProxy * CUpnpConnectionManagerProxy::NewL(class RSocketServ &)
+	?NewLC@CUpnpConnectionManagerProxy@@SAPAV1@AAVRSocketServ@@@Z @ 14 NONAME ; class CUpnpConnectionManagerProxy * CUpnpConnectionManagerProxy::NewLC(class RSocketServ &)
+	?SetAddress@TUpnpConnectionManagerNetworkEvent@@QAEXVTInetAddr@@@Z @ 15 NONAME ; void TUpnpConnectionManagerNetworkEvent::SetAddress(class TInetAddr)
+	?SetType@TUpnpConnectionManagerNetworkEvent@@QAEXW4TUpnpCmSubRsp@@@Z @ 16 NONAME ; void TUpnpConnectionManagerNetworkEvent::SetType(enum TUpnpCmSubRsp)
+	?Subscribe@CUpnpConnectionManagerNetworkEventProvider@@QAEXXZ @ 17 NONAME ; void CUpnpConnectionManagerNetworkEventProvider::Subscribe(void)
+	?SubscribeForNetworkEventsL@CUpnpConnectionManagerProxy@@QAEXPAVMUpnpNetworkEventObserver@@@Z @ 18 NONAME ; void CUpnpConnectionManagerProxy::SubscribeForNetworkEventsL(class MUpnpNetworkEventObserver *)
+	?SubscriberError@CUpnpNetworkEventBase@@QAEHXZ @ 19 NONAME ; int CUpnpNetworkEventBase::SubscriberError(void)
+	?Type@CUpnpNetworkEventBase@@QAE?AW4TUpnpCmSubRsp@@XZ @ 20 NONAME ; enum TUpnpCmSubRsp CUpnpNetworkEventBase::Type(void)
+	?Type@TUpnpConnectionManagerNetworkEvent@@QAEAAW4TUpnpCmSubRsp@@XZ @ 21 NONAME ; enum TUpnpCmSubRsp & TUpnpConnectionManagerNetworkEvent::Type(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/eabi/upnpconnectionmanagersessionu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+EXPORTS
+	_ZN27CUpnpConnectionManagerProxy11ConnectionLEv @ 1 NONAME
+	_ZN27CUpnpConnectionManagerProxy11EnsureStartEv @ 2 NONAME
+	_ZN27CUpnpConnectionManagerProxy12LocalAddressEv @ 3 NONAME
+	_ZN27CUpnpConnectionManagerProxy13GetActiveIapLEv @ 4 NONAME
+	_ZN27CUpnpConnectionManagerProxy26SubscribeForNetworkEventsLEP25MUpnpNetworkEventObserver @ 5 NONAME
+	_ZN27CUpnpConnectionManagerProxy4NewLER11RSocketServ @ 6 NONAME
+	_ZN27CUpnpConnectionManagerProxy5NewLCER11RSocketServ @ 7 NONAME
+	_ZN27CUpnpConnectionManagerProxy9ActiveIapEv @ 8 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEvent10SetAddressE9TInetAddr @ 9 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEvent4TypeEv @ 10 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEvent7SetTypeE13TUpnpCmSubRsp @ 11 NONAME
+	_ZN21CUpnpNetworkEventBase15SubscriberErrorEv @ 12 NONAME
+	_ZN21CUpnpNetworkEventBase4TypeEv @ 13 NONAME
+	_ZN30CUpnpNetworkEventAddressChange7AddressEv @ 14 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEvent8InetAddrEv @ 15 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEventC1E13TUpnpCmSubRsp @ 16 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEventC1E13TUpnpCmSubRsp9TInetAddr @ 17 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEventC1Ev @ 18 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEventC2E13TUpnpCmSubRsp @ 19 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEventC2E13TUpnpCmSubRsp9TInetAddr @ 20 NONAME
+	_ZN34TUpnpConnectionManagerNetworkEventC2Ev @ 21 NONAME
+	_ZN42CUpnpConnectionManagerNetworkEventProvider4NewLER25MUpnpNetworkEventObserver @ 22 NONAME
+	_ZN42CUpnpConnectionManagerNetworkEventProvider9SubscribeEv @ 23 NONAME
+	_ZN42CUpnpConnectionManagerNetworkEventProviderC1ER25MUpnpNetworkEventObserver @ 24 NONAME
+	_ZN42CUpnpConnectionManagerNetworkEventProviderC2ER25MUpnpNetworkEventObserver @ 25 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,28 @@
+/** @file
+* 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:  Build information file for project upnpconnectionmanagersession
+*
+*/
+
+
+#include "../../upnputils/inc/upnpcompvariant.hrh"
+
+PRJ_EXPORTS
+../inc/upnpconnectionmanagerproxy.h                |../../../inc/upnpconnectionmanagerproxy.h
+../inc/upnpconnectionmanagersession.h              |../../../inc/upnpconnectionmanagersession.h
+
+PRJ_MMPFILES
+upnpconnectionmanagersession.mmp
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/group/upnpconnectionmanagersession.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,52 @@
+/** @file
+* 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:  Project definition file for project upnpconnectionmanagersession
+*
+*/
+
+
+#include "../../../inc/upnpcompvariant.hrh"
+
+
+CAPABILITY      CAP_GENERAL_DLL
+
+TARGETTYPE      dll
+
+TARGET          upnpconnectionmanagersession.dll
+UID 0x1000008d 0x2001B2BC
+
+VERSION 10.1
+PAGED
+
+SOURCEPATH      ../src
+SOURCE          upnpconnectionmanagersession.cpp
+SOURCE          upnpconnectionmanagerproxy.cpp
+SOURCE          upnpconnectionmanagernetworkevent.cpp
+SOURCE          upnpconnectionmanagernetworkeventprovider.cpp
+SOURCE          upnpnetworkeventbase.cpp
+SOURCE          upnpnetworkeventaddresschange.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   ../../../inc
+SYSTEMINCLUDE   ../../inc
+USERINCLUDE     ../inc
+
+LIBRARY         euser.lib
+LIBRARY	        flogger.lib
+LIBRARY         esock.lib
+LIBRARY         insock.lib 
+LIBRARY         upnpipserversutils.lib
+
+SMPSAFE
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/inc/upnpconnectionmanagerproxy.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,145 @@
+/** @file
+* Copyright (c) 2005-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:  CUpnpConnectionProxy
+*
+*/
+
+#ifndef C_CUPNPCONNECTIONPROXY_H
+#define C_CUPNPCONNECTIONPROXY_H
+
+// INCLUDE FILES
+#include <e32base.h>
+#include <es_sock.h>
+#include <es_enum.h>
+#include <in_sock.h>
+#include "upnpconnectionmanagersession.h"
+
+// CLASS DECLARATION
+
+class CUpnpConnectionManagerNetworkEventProvider;
+class MUpnpNetworkEventObserver;
+
+/**
+ * This class is a client handle to CUpnpConnectionManager.
+ * One should use it rather than RUpnpConnectionManagerSession directly
+ * @since S60 5.0
+ */
+NONSHARABLE_CLASS( CUpnpConnectionManagerProxy ) : public CBase
+    {
+public: // Constructors and destructor
+
+    /**
+     * Two-phased constructor.
+     * @param aSocketServ Pointer to used Socket Server.
+     * @param aIap the IAP ID of the connection.
+     * @since Series60 3.2
+     * @return A new CUpnpConnectionProxy object.
+     */
+    IMPORT_C static CUpnpConnectionManagerProxy* NewL( RSocketServ& aSocketServer );
+
+    /**
+     * Two-phased constructor.
+     * @param aSocketServ Pointer to used Socket Server.
+     * @param aIap the IAP ID of the connection.
+     * @since Series60 3.2
+     * @return A new CUpnpConnectionProxy object.
+     */
+    IMPORT_C static CUpnpConnectionManagerProxy* NewLC( RSocketServ& aSocketServer );
+
+    /**
+     * Destructor.
+     * @since Series60 3.2
+     */
+    virtual ~CUpnpConnectionManagerProxy();
+
+public: // New functions
+
+    /**
+     * After call of this method the caller is sure that
+     * RConnection was started.
+     */
+    IMPORT_C TInt EnsureStart();
+
+    /**
+     * Returns RConnection instance.
+     * Leaves only if ensure start wasn't invoked, and
+     * internal EnsureStart call fail
+     */
+    IMPORT_C RConnection& ConnectionL();
+
+    /**
+     * Returns active connection IAP.
+     */
+    IMPORT_C TInt ActiveIap();
+
+    /**
+     * Returns active connection IP address.
+     */
+    IMPORT_C TInetAddr LocalAddress();
+
+    /**
+     * Subscribes for network events nitifications.
+     */
+    IMPORT_C void SubscribeForNetworkEventsL( MUpnpNetworkEventObserver *aObserver );
+    
+    /**
+     * Static function for querying of active connection IAP
+     * without creating new object (it is created and closed internally)
+     * @return KErrNontFound if connection is not started else active IAP,
+     *         in case of Always ask (IAP=0) IAP selected by user (IAP>0)
+     */
+    IMPORT_C static TInt GetActiveIapL();
+    
+private:
+
+    /**
+     * Constructor.
+     * @since Series60 3.2
+     */
+    CUpnpConnectionManagerProxy();
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     * @param aSocketServ Pointer to used Socket Server.
+     */
+    void ConstructL( RSocketServ& aSocketServer );
+
+    /**
+     * Attaches connection
+     */
+    TInt Attach( TInt aAccessPoint );
+
+    /**
+     * Checks whether EnsureStart has been invoked.
+     */
+    TBool IsStarted();
+
+private: 
+
+    // Connection
+    RConnection iConnection;
+
+    // Session to ConnectionManager in MessageHandler process
+    RUpnpConnectionManagerSession iConnectionManagerSession;
+
+    // Active Iap variable.
+    TInt iActiveIap;
+    
+    // Class used for network event notifications.
+    CUpnpConnectionManagerNetworkEventProvider *iNetworkEventProvider;
+    };
+
+#endif // C_CUPNPCONNECTIONPROXY_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/inc/upnpconnectionmanagersession.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,104 @@
+/** @file
+* 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:  upnpconnectionmanager / client side interface
+*
+*/
+
+#ifndef R_UPNPCONNECTIONMANAGERSESSION_H
+#define R_UPNPCONNECTIONMANAGERSESSION_H
+
+#include "upnpconnectionmanagernetworkevent.h"
+#include "upnpsessionbase.h"
+
+/**
+ * Client session to UPnP Connection Manager
+ *
+ * @lib upnpconnectionmanagersession
+ * 
+ * @since S60 5.0
+ */
+NONSHARABLE_CLASS( RUpnpConnectionManagerSession ) : public RUpnpSessionBase
+    {
+public:
+
+    /**
+     * Constructor.
+     */
+    RUpnpConnectionManagerSession();
+
+    /**
+     * Establish connection with server
+     */
+    TInt Connect();
+
+    /**
+     * Start RConnection if not started, otherwise do nothing
+     *
+     * @param aResult error code
+     */
+    TInt RequestEnsureStartRConnection( TInt& aResult );
+
+    /**
+     * Can be used to check whether RConnection has been started
+     *
+     * @return aResult ETrue if connection has been started
+     */
+    void RequestIsRConnectionStarted( TBool& aResult );
+
+    /**
+     * Get current iap
+     *
+     * @return iap
+     */
+    TInt RequestActiveIap();
+    
+    /**
+     * Get current address
+     *
+     * @return address
+     */
+    TInetAddr RequestLocalAddress();        
+
+    /**
+     * Subscribes to network event
+     *
+     * @param aStatus subscribtion connection
+     * @param aNetworkEvent network event
+     */
+    void RequestSubscribeToNetworkEvents( TRequestStatus& aStatus, 
+                                          TUpnpConnectionManagerNetworkEvent& aNetworkEvent );
+
+    /**
+     * Cancel subscribtion for network event
+     *
+     */
+    void RequestCancelSubscribeToNetworkEvents();
+
+private:
+
+    /**
+     * Pointer for the first parameter
+     */
+    TPtr8       iParameter0;
+    
+    /**
+     * Pointer for the network event 
+     */
+    TPtr8       iNetworkEventParameter;
+    
+    };
+
+#endif // R_UPNPCONNECTIONMANAGERSESSION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/src/upnpconnectionmanagernetworkevent.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,89 @@
+/** @file
+* 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:  upnpconnectionmanager / client side
+ *
+*/
+
+#include "upnpconnectionmanagernetworkevent.h"
+#include "upnpconnmanagercommon.h"
+
+// -----------------------------------------------------------------------------
+// TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent() 
+    : iType( EUnknownEvent )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent
+// C++ constructor
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent( 
+    TUpnpCmSubRsp aType )
+    : iType( aType )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent
+// C++ constructor
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C TUpnpConnectionManagerNetworkEvent::TUpnpConnectionManagerNetworkEvent( 
+    TUpnpCmSubRsp aType, TInetAddr aInetAddr )
+    : iType( aType ), iInetAddr( aInetAddr )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpConnectionManagerNetworkEvent::SetType
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C void TUpnpConnectionManagerNetworkEvent::SetType( TUpnpCmSubRsp aType )
+    {
+    iType = aType;
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpConnectionManagerNetworkEvent::SetAddress
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C void TUpnpConnectionManagerNetworkEvent::SetAddress( TInetAddr aAddress )
+    {
+    iInetAddr = aAddress;	
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpConnectionManagerNetworkEvent::Type
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C TUpnpCmSubRsp& TUpnpConnectionManagerNetworkEvent::Type()
+    {
+    return iType;
+    }
+
+// -----------------------------------------------------------------------------
+// TUpnpConnectionManagerNetworkEvent::InetAddr
+// -----------------------------------------------------------------------------
+//   
+EXPORT_C TInetAddr TUpnpConnectionManagerNetworkEvent::InetAddr()
+    {
+    return iInetAddr;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/src/upnpconnectionmanagernetworkeventprovider.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,204 @@
+/** @file
+* Copyright (c) 2005-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:  CUpnpConnectionManagerProxy
+ *
+*/
+
+// INCLUDE FILES
+#include <upnpconnectionmanagernetworkeventprovider.h>
+#include "upnpconnectionmanagersession.h"
+#include "upnpcustomlog.h"
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::NewL
+// Two-phased constructor.
+//
+// -----------------------------------------------------------------------------
+EXPORT_C CUpnpConnectionManagerNetworkEventProvider* CUpnpConnectionManagerNetworkEventProvider::
+                                    NewL( MUpnpNetworkEventObserver& aObserver )
+    {
+    CUpnpConnectionManagerNetworkEventProvider *self = new ( ELeave )
+                                     CUpnpConnectionManagerNetworkEventProvider( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnectionManagerNetworkEventProvider* CUpnpConnectionManagerNetworkEventProvider::NewL( 
+        RUpnpConnectionManagerSession& aClient,
+        MUpnpNetworkEventObserver& aObserver )
+    {
+    CUpnpConnectionManagerNetworkEventProvider *self = new ( ELeave ) 
+                           CUpnpConnectionManagerNetworkEventProvider( aClient, aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::~CUpnpConnectionManagerNetworkEventProvider
+// C++ destructor
+// -----------------------------------------------------------------------------
+//                                 
+CUpnpConnectionManagerNetworkEventProvider::~CUpnpConnectionManagerNetworkEventProvider()   
+    {
+    Cancel();
+    if ( iSessionOwner && iConnectionManagerSession )
+        {
+        iConnectionManagerSession->Close();
+        delete iConnectionManagerSession;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::CUpnpConnectionManagerNetworkEventProvider
+// C++ constructor
+// -----------------------------------------------------------------------------
+//
+CUpnpConnectionManagerNetworkEventProvider::CUpnpConnectionManagerNetworkEventProvider( 
+    RUpnpConnectionManagerSession& aClient, MUpnpNetworkEventObserver& aObserver )
+    : CActive( CActive::EPriorityStandard ), iConnectionManagerSession( &aClient ), 
+      iNetworkEventObserver( aObserver )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::CUpnpConnectionManagerNetworkEventProvider
+// C++ constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpConnectionManagerNetworkEventProvider::CUpnpConnectionManagerNetworkEventProvider( 
+    MUpnpNetworkEventObserver& aObserver )
+    : CActive( CActive::EPriorityStandard ), iSessionOwner( ETrue ), 
+      iNetworkEventObserver( aObserver )
+    {    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnectionManagerNetworkEventProvider::ConstructL()
+    {
+    if ( iSessionOwner )
+        {
+        iConnectionManagerSession = new (ELeave) RUpnpConnectionManagerSession;
+        User::LeaveIfError( iConnectionManagerSession->Connect() );
+        }
+    CActiveScheduler::Add( this );
+    Subscribe();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::Subscribe
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpConnectionManagerNetworkEventProvider::Subscribe()
+    {
+    if( !IsActive() )
+        {
+        iConnectionManagerSession->RequestSubscribeToNetworkEvents( iStatus, 
+                                                                    iCurrentNetworkEvent );
+        SetActive();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::DispatchResponseNetworkEventL
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnectionManagerNetworkEventProvider::DispatchResponseNetworkEventL()
+    {
+    switch ( iCurrentNetworkEvent.Type() )
+        {
+        case EConnectionClosedEvent:
+                {
+                CUpnpNetworkEventBase* networkEvent =
+                      new (ELeave) CUpnpNetworkEventBase( EConnectionClosedEvent );
+                iNetworkEventObserver.NetworkEvent( networkEvent );
+                delete networkEvent;
+                }
+            break;
+        case EWlanLostEvent:
+                {
+                CUpnpNetworkEventBase* networkEvent = 
+                              new (ELeave) CUpnpNetworkEventBase( EWlanLostEvent );
+                iNetworkEventObserver.NetworkEvent( networkEvent );
+                delete networkEvent;
+                }
+            break;
+        case EAddressChangeEvent:
+                {
+                CUpnpNetworkEventAddressChange* networkEvent = new (ELeave) 
+                    CUpnpNetworkEventAddressChange( iCurrentNetworkEvent.InetAddr() );
+                iNetworkEventObserver.NetworkEvent( networkEvent );
+                delete networkEvent;
+                }
+            break;
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::RunL
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnectionManagerNetworkEventProvider::RunL()
+    {
+    TInt error = iStatus.Int();
+    if ( error >= KErrNone )
+        {
+        TRAP( error, DispatchResponseNetworkEventL(); 
+                     Subscribe() );
+        }
+    if ( error < KErrNone )
+        {
+        CUpnpNetworkEventBase* networkEvent = 
+                       new (ELeave) CUpnpNetworkEventBase( error );
+        iNetworkEventObserver.NetworkEvent( networkEvent );
+        delete networkEvent;
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::RunError
+// -----------------------------------------------------------------------------
+//    
+TInt CUpnpConnectionManagerNetworkEventProvider::RunError( TInt /*aError*/ )
+    {
+    LOG_FUNC_NAME;
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerNetworkEventProvider::DoCancel
+// -----------------------------------------------------------------------------
+//    
+void CUpnpConnectionManagerNetworkEventProvider::DoCancel()
+    {
+    iConnectionManagerSession->RequestCancelSubscribeToNetworkEvents();
+    }
+
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/src/upnpconnectionmanagerproxy.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,228 @@
+/** @file
+* Copyright (c) 2005-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:  CUpnpConnectionManagerProxy
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpconnectionmanagernetworkeventprovider.h"
+#include "upnpconnectionmanagerproxy.h"
+#include "upnpcustomlog.h"
+
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpConnectionManagerProxy* CUpnpConnectionManagerProxy::NewL(
+    RSocketServ &aSocketServer )
+    {
+    CUpnpConnectionManagerProxy* self =
+        CUpnpConnectionManagerProxy::NewLC( aSocketServer );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::NewLC
+// Two-phased constructor, leave object on the cleanup stack.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpConnectionManagerProxy* CUpnpConnectionManagerProxy::NewLC(
+    RSocketServ &aSocketServer )
+    {
+    CUpnpConnectionManagerProxy* self = new( ELeave ) CUpnpConnectionManagerProxy();
+    CleanupStack::PushL( self );
+    self->ConstructL( aSocketServer );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::CUpnpConnectionManagerProxy
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnectionManagerProxy::CUpnpConnectionManagerProxy() : iActiveIap( KErrNotFound )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnectionManagerProxy::ConstructL( RSocketServ& aSocketServer )
+    {
+    User::LeaveIfError( iConnection.Open( aSocketServer ) );
+    User::LeaveIfError( iConnectionManagerSession.Connect() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::~CUpnpConnectionManagerProxy
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnectionManagerProxy::~CUpnpConnectionManagerProxy()
+    {
+    delete iNetworkEventProvider;
+    iConnection.Close();
+    iConnectionManagerSession.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::EnsureStart
+// Calls remote process to ensure that interface is started.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpConnectionManagerProxy::EnsureStart()
+    {
+    TInt error = iConnectionManagerSession.RequestEnsureStartRConnection( iActiveIap );
+    if ( error == KErrNone )
+        {
+        error = Attach( iActiveIap );
+        }
+    else if ( error < KErrNone )
+        {
+        iActiveIap = KErrNotFound;
+        }
+
+    return error;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::IsStarted
+// Checks whether EnsureStart has been invoked.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpConnectionManagerProxy::IsStarted()
+    {
+    TBool result = EFalse;
+    iConnectionManagerSession.RequestIsRConnectionStarted( result );
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::ConnectionL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RConnection& CUpnpConnectionManagerProxy::ConnectionL()
+    {
+    if ( !IsStarted() )
+        {
+        User::LeaveIfError( EnsureStart() );
+        }
+    return iConnection;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::Attach
+// Internal function.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpConnectionManagerProxy::Attach( TInt aAccessPoint )
+    {
+    TUint connNumber;
+    TInt attachError = KErrNotFound;
+    TInt error = iConnection.EnumerateConnections( connNumber );
+
+    if ( error == KErrNone && connNumber > 0 )
+        {
+        TPckgBuf<TConnectionInfo> connInfo;
+
+        for ( TInt i = 1; i <= connNumber; i++ )
+            {
+            error = iConnection.GetConnectionInfo( i, connInfo );
+
+            if ( error == KErrNone && connInfo().iIapId == aAccessPoint )
+                {
+                attachError = iConnection.Attach( connInfo,
+                                                  RConnection::EAttachTypeNormal );
+
+                if ( attachError == KErrNone || attachError == KErrInUse )
+                    {
+                    attachError = KErrNone; //KErrInUse means already attached
+                    break;
+                    }
+                }
+            }
+        }
+
+    return attachError;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::ActiveIap
+// Returns active Iap or KErrNotFound if not connected.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpConnectionManagerProxy::ActiveIap()
+    {
+    if ( iActiveIap == KErrNotFound )
+        {
+        iActiveIap = iConnectionManagerSession.RequestActiveIap();
+        }
+
+    return iActiveIap;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::LocalAddress
+// Returns local address
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr CUpnpConnectionManagerProxy::LocalAddress()
+    {    
+    return iConnectionManagerSession.RequestLocalAddress();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::SubscribeForNetworkEventsL
+// Subscribe for network events.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpConnectionManagerProxy::SubscribeForNetworkEventsL( 
+                                           MUpnpNetworkEventObserver *aObserver )
+    {
+    delete iNetworkEventProvider;
+    iNetworkEventProvider = NULL;
+    if ( aObserver )
+        {
+        iNetworkEventProvider = CUpnpConnectionManagerNetworkEventProvider::NewL( 
+                                                iConnectionManagerSession, *aObserver );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManagerProxy::GetActiveIapL
+// Static function for straightforward way of obtaining IAP from server.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpConnectionManagerProxy::GetActiveIapL()
+    {
+    RSocketServ socketServer;
+    User::LeaveIfError( socketServer.Connect() );
+    CleanupClosePushL( socketServer );    
+    CUpnpConnectionManagerProxy *proxy = CUpnpConnectionManagerProxy::NewLC( socketServer );
+    
+    TInt iap = proxy->ActiveIap();
+        
+    CleanupStack::PopAndDestroy( proxy );
+    CleanupStack::PopAndDestroy( &socketServer );
+    
+    return iap;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/src/upnpconnectionmanagersession.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,153 @@
+/** @file
+* 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:  upnpconnectionmanager / client side
+*
+*/
+
+#include <e32math.h>
+#include "upnpconnmanagercommon.h"
+#include "upnpconnectionmanagersession.h"
+#include "upnpcustomlog.h"
+
+const TInt KServerMessageSlots = 1; //Number of message slots available per session.
+const TInt KServerRetryCount = 2;
+
+// -----------------------------------------------------------------------------
+// RUpnpConnectionManagerSession::RUpnpConnectionManagerSession
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+RUpnpConnectionManagerSession::RUpnpConnectionManagerSession() :
+    RUpnpSessionBase(), iParameter0( NULL, 0, 0 ), iNetworkEventParameter( NULL, 0, 0 )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpConnectionManagerSession::Connect
+// Establish connection to server.
+// -----------------------------------------------------------------------------
+//
+TInt RUpnpConnectionManagerSession::Connect()
+    {
+    return RUpnpSessionBase::Connect( KUpnpConnectionManagerName,
+             TVersion( KUpnpConnectionManagerMajorVersionNumber,
+                       KUpnpConnectionManagerMinorVersionNumber,
+                       KUpnpConnectionManagerBuildVersionNumber ),
+             KServerMessageSlots,
+             KServerRetryCount,
+             KUpnpConnectionManagerFilename,
+             KServerUid3 );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpConnectionManagerSession::RequestEnsureStartRConnection
+// Client requests server to ensure RConnection is started.
+// -----------------------------------------------------------------------------
+//
+TInt RUpnpConnectionManagerSession::RequestEnsureStartRConnection(
+    TInt& aAccessPoint )
+    {
+    LOG_FUNC_NAME;
+    iParameter0.Set( reinterpret_cast<TUint8*>( &aAccessPoint ),
+                     sizeof( TInt ),
+                     sizeof( TInt ) );
+
+    return SendReceive( EEnsureStartRConnection, TIpcArgs( &iParameter0 ) );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpConnectionManagerSession::RequestIsRConnectionStarted
+// Client requests server whether RConnection has been started.
+// -----------------------------------------------------------------------------
+//
+void RUpnpConnectionManagerSession::RequestIsRConnectionStarted(
+    TBool& aResult )
+    {
+    LOG_FUNC_NAME;
+    iParameter0.Set( reinterpret_cast<TUint8*>( &aResult ), 
+                     sizeof( TBool ),
+                     sizeof( TBool ) );
+
+    SendReceive( EIsRConnectionStarted, TIpcArgs( &iParameter0 ) );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpConnectionManagerSession::RequestActiveIap
+// Client requests server for active Iap
+// -----------------------------------------------------------------------------
+//
+TInt RUpnpConnectionManagerSession::RequestActiveIap()
+    {
+    LOG_FUNC_NAME;
+    
+    TInt ret = KErrNotFound;
+    
+    iParameter0.Set( reinterpret_cast<TUint8*>( &ret ), 
+                     sizeof( TInt ),
+                     sizeof( TInt ) );
+
+    SendReceive( ECmActiveIap, TIpcArgs( &iParameter0 ) );
+    
+    return ret;
+    }
+// -----------------------------------------------------------------------------
+// RUpnpConnectionManagerSession::RequestLocalAddress
+// Client requests server for active Iap
+// -----------------------------------------------------------------------------
+//
+TInetAddr RUpnpConnectionManagerSession::RequestLocalAddress()
+    {
+    LOG_FUNC_NAME;
+    
+    TInetAddr address = INET_ADDR( 0,0,0,0 );
+    
+    iParameter0.Set( reinterpret_cast<TUint8*>( &address ), 
+                     sizeof( TInetAddr ),
+                     sizeof( TInetAddr ) );
+
+    SendReceive( ECmGetAddress, TIpcArgs( &iParameter0 ) );
+    
+    return address;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpConnectionManagerSession::RequestSubscribeToNetworkEvents
+// Client requests subscribe to network events.
+// -----------------------------------------------------------------------------
+//    
+void RUpnpConnectionManagerSession::RequestSubscribeToNetworkEvents( TRequestStatus& aStatus,
+                                            TUpnpConnectionManagerNetworkEvent &aNetworkEvent )
+    {
+    LOG_FUNC_NAME;
+
+    iNetworkEventParameter.Set( reinterpret_cast<TUint8*>( &aNetworkEvent ),
+                                sizeof( TUpnpConnectionManagerNetworkEvent ),
+                                sizeof( TUpnpConnectionManagerNetworkEvent ) );
+    SendReceive( EEventSubscribe, TIpcArgs( &iNetworkEventParameter ), aStatus );
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpConnectionManagerSession::RequestCancelSubscribeToNetworkEvents
+// Client requests cancel subscribe to network events.
+// -----------------------------------------------------------------------------
+//  
+void RUpnpConnectionManagerSession::RequestCancelSubscribeToNetworkEvents()
+    {
+    LOG_FUNC_NAME;
+    SendReceive( ECancelEventSubscribe ); //ignoring returned value
+    }
+    
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/src/upnpnetworkeventaddresschange.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+/** @file
+* 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:  
+*
+*/
+
+// Includes
+#include <upnpnetworkeventaddresschange.h>
+
+// -----------------------------------------------------------------------------
+// CUpnpNetworkEventAddressChange::CUpnpNetworkEventAddressChange
+// 
+// -----------------------------------------------------------------------------
+//
+CUpnpNetworkEventAddressChange::CUpnpNetworkEventAddressChange( TInetAddr aAddress )
+    : CUpnpNetworkEventBase( EAddressChangeEvent ), iInetAddr( aAddress )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNetworkEventAddressChange::Address
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr CUpnpNetworkEventAddressChange::Address()
+    {
+    return iInetAddr;
+    }
+    
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnectionmanagersession/src/upnpnetworkeventbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,63 @@
+/** @file
+* 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:  
+*
+*/
+
+// Includes
+#include <upnpnetworkeventbase.h>
+
+
+// -----------------------------------------------------------------------------
+// CUpnpNetworkEventBase::CUpnpNetworkEventBase
+// 
+// -----------------------------------------------------------------------------
+//
+CUpnpNetworkEventBase::CUpnpNetworkEventBase( TInt aError )
+    : iType( EUnknownEvent ), iSubscriberError( aError )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNetworkEventBase::CUpnpNetworkEventBase
+// 
+// -----------------------------------------------------------------------------
+//
+CUpnpNetworkEventBase::CUpnpNetworkEventBase( TUpnpCmSubRsp aType )
+    : iType( aType ), iSubscriberError( KErrNone )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNetworkEventBase::Type
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TUpnpCmSubRsp CUpnpNetworkEventBase::Type()
+    {
+    return iType;
+    }   
+
+// -----------------------------------------------------------------------------
+// CUpnpNetworkEventBase::SubscriberError
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpNetworkEventBase::SubscriberError()
+    {
+    return iSubscriberError;
+    }
+    
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+/** @file
+* 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:  Build info for the connmanager server component
+*
+*/
+
+#include "../../upnputils/inc/upnpcompvariant.hrh"
+
+PRJ_EXPORTS
+
+../inc/upnpconnmanagercommon.h                |../../inc/upnpconnmanagercommon.h
+
+PRJ_MMPFILES
+upnpconnmanager.mmp
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/group/upnpconnmanager.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,65 @@
+/** @file
+* 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: 
+*     This is the project specification file for Upnp.
+*
+*/
+
+#include "../../../inc/upnpcompvariant.hrh"
+
+TARGETTYPE             exe
+
+TARGET                 upnpconnmanager.exe
+UID 0 0x2001B2BB
+
+CAPABILITY             CAP_SERVER
+ 
+VENDORID               VID_DEFAULT
+VERSION 10.1
+PAGED
+
+SOURCEPATH             ../src
+SOURCE                 upnpipeventnotifier.cpp 			
+SOURCE                 upnpconnmanagerengine.cpp
+SOURCE                 upnpconnmanagersession.cpp
+SOURCE                 upnpconnmanager.cpp
+SOURCE                 upnpconninterfacewatcher.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE          ../../../inc
+SYSTEMINCLUDE          ../../inc
+USERINCLUDE            ../inc
+
+#if defined(__HN_31__) || defined(__HN_32__)
+LIBRARY                hnipserversutils.lib
+LIBRARY                hnserviceframework.lib
+#else
+LIBRARY                upnpipserversutils.lib
+LIBRARY                upnpserviceframework.lib
+LIBRARY                upnpconnectionmanagersession.lib
+#endif
+
+LIBRARY                euser.lib
+LIBRARY                esock.lib
+LIBRARY                insock.lib 
+LIBRARY                ecom.lib 
+
+// for the IAP query
+LIBRARY                commdb.lib
+// for logging
+LIBRARY                flogger.lib
+
+SMPSAFE
+//end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/inc/upnpconninterfacewatcher.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,178 @@
+/** @file
+* Copyright (c) 2007-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 UPNPCONNINTERFACEWATCHER_H_
+#define UPNPCONNINTERFACEWATCHER_H_
+
+// INCLUDES
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnpipeventnotifier.h"
+
+const TInt KServiceTypeMaxLength = 128;
+
+// FORWARD DECLARATIONS
+class CUpnpIPEventNotifier;
+
+/**
+ * CUpnpConnInterfaceWatcher observer (callback interface).
+ * @since S60 5.0
+ */
+class MUpnpConnInterfaceWatcherObserver
+    {
+public:
+
+    /**
+     * Invoked when network interface goes down
+     */
+    virtual void WlanNetworkLost() = 0;
+    
+    /**
+     * Invoked when address changes
+     */
+    virtual void InterfaceAddressChange( TInetAddr& aAddr ) = 0;
+    
+    };
+
+/**
+ * Class is responsible for network interface change handling.
+ * @since S60 5.0
+ */
+class CUpnpConnInterfaceWatcher : public CActive, public MUpnpIPEventObserver
+    {
+public:
+
+    /**
+     * A two-phased constructor function
+     */
+    static CUpnpConnInterfaceWatcher* NewL( MUpnpConnInterfaceWatcherObserver& aIfObserver,
+                                            RSocketServ& aSockServ, 
+                                            RConnection& aConnection );
+    /**
+     * Destructor
+     */
+    virtual ~CUpnpConnInterfaceWatcher();
+
+	/**
+     * Returns inet address
+     */
+    const TInetAddr& LocalAddress();
+    
+    /**
+     * Creates and subscribes to CUpnpIPEventNotifier instance
+     */
+    void ListenAddressChangeL( TUint aIapId );
+    
+    /**
+     * Get local ip address
+     * @param aInterfaceIndex reference that will be set to interface index
+     */ 
+
+    TInetAddr LocalIpAddress(TInt& aInterfaceIndex);
+
+    /**
+     * Subscribes to Service Change Notification from RConnection.
+     * This notification completes with KErrCancel when connection
+     * is stopped (by WLan Lost or by calling RConnection::Stop())
+     */
+    void SubscribeForConnectionServiceChangeNotifications();
+
+    /**
+     * Cancels pending subscription
+     */
+    void CancelSubscriptionForConnectionServiceChangeNotifications();
+
+private:
+
+    /**
+     * Constructor.
+     */
+    CUpnpConnInterfaceWatcher( MUpnpConnInterfaceWatcherObserver& aIfObserver, 
+                               RSocketServ& aSockServ, 
+                               RConnection& aConnection );
+
+    /**
+     * Second phase constructors
+     */
+    void ConstructL();
+
+private:
+
+    /**
+     * This function will be invoke if IP Event occurs 
+     * Checks if IP address from used interface was changed since last time    
+     */
+    virtual void IPEventOccursL();
+    
+    /**
+     * Sets local address
+     * @param aNew address
+     */    
+    void SetLocalAddress( const TInetAddr& aAddress );
+    
+private:    // from CActive
+
+    /**
+     * RunL
+     * Active object state machine.
+     * @since Series60 5.0 HN
+     */
+    void RunL();
+    
+    /**
+     * DoCancel
+     * Cancel outstanding request(s) and reset the iActive flag.
+     * @since Series60 5.0 HN
+     */
+    void DoCancel();
+    
+    /**
+     * RunError
+     * RunError in case RunL leaves.
+     * @since Series60 5.0 HN
+     */
+    TInt RunError( TInt aError );
+    
+private:
+
+    /* @var iIfObserver Callback interface */
+    MUpnpConnInterfaceWatcherObserver& iIfObserver;
+
+    /* @var iSockServ Socket server session */
+    RSocketServ& iSockServ;
+       
+    /* @var iIapId IAP identifier */
+    TUint iIapId;
+    
+    /* @var iIPEvent IP events notifier */
+    CUpnpIPEventNotifier* iIPEvent;
+        
+    /* @var iLocalIpAddress local IP address */
+    TInetAddr iLocalIpAddress;
+    
+    /* @var iNewISPId variable used in Service Change Notification */
+    TUint32 iNewISPId;
+
+    /* @var iNewServiceType variable used in Service Change Notification */
+    TBuf< KServiceTypeMaxLength > iNewServiceType;
+    
+    /* @var iConnection RConnection reference */
+    RConnection& iConnection;
+    
+    };
+
+#endif /*UPNPCONNINTERFACEWATCHER_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/inc/upnpconnmanager.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,91 @@
+/** @file
+* 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:  CUpnpConnectionManager
+*
+*/
+
+#ifndef C_CUPNPCONNMANAGER_H
+#define C_CUPNPCONNMANAGER_H
+
+#include <e32base.h>
+#include "upnpconnmanagercommon.h"
+#include <upnpsymbianserverbase.h>
+
+class CUpnpConnManagerEngine;
+
+/**
+ * Connection Manager Server
+ * @since S60 5.0
+ */
+class CUpnpConnectionManager : public CUpnpSymbianServerBase
+    {
+public : // New methods
+    /**
+      * Create a CUpnpConnectionManager object using two phase construction,
+      * and return a pointer to the created object, leaving a pointer to the
+      * object on the cleanup stack
+      * @result pointer to created CUpnpConnectionManager object
+      */
+    static CUpnpSymbianServerBase* NewLC();
+
+    /**
+     * Destroy the object and release all memory objects
+     */
+    ~CUpnpConnectionManager();
+
+private:    // from CUpnpSymbianServerBase
+
+    const TDesC& ServerName() const;
+   
+private: // New methods
+
+    /**
+     * Perform the first phase of two phase construction
+     */
+    CUpnpConnectionManager();
+
+    /**
+     * Perform the second phase construction of a CUpnpConnectionManager object
+     */
+    void ConstructL();
+
+private: // From CUpnpSymbianServer
+
+    /**
+     * Create a time server session, and return a pointer to the created object
+     * @result pointer to new session
+     */
+    CSession2* NewSessionL( const RMessage2& aMessage ) const;
+
+    /**
+     * Returns version that is supported by this server.
+     */
+    virtual TVersion SupportedVersion() const;
+    
+    /**
+     * Process any errors
+     * @param aError the leave code reported.
+     * @result return KErrNone if leave is handled
+     */
+    TInt RunError( TInt aError );
+
+private:
+
+    /* @var iEngine Engine of the server */
+    CUpnpConnManagerEngine* iEngine;
+
+    };
+
+
+#endif // C_CUPNPCONNMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/inc/upnpconnmanagercommon.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+/** @file
+* 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:  Connection manager / common definitions for cliet and server
+*
+*/
+
+#ifndef T_UPNPCONNECTIONMANAGERCOMMON_H
+#define T_UPNPCONNECTIONMANAGERCOMMON_H
+
+#include "upnpcompvariant.hrh"
+#include "upnpconnmanagereventtypes.h"
+#include <in_sock.h> 
+
+// the name of the server, used by client
+_LIT( KUpnpConnectionManagerFilename, "upnpconnmanager" );
+
+//server's name
+_LIT( KUpnpConnectionManagerName, "upnpconnectionmanager" );
+_LIT( KUpnpConnectionManagerThreadName, "upnpconnectionmanager_MainThread" );
+
+const TUid KServerUid3 = { 0x2001B2BB };
+
+// the server version
+// A version must be specified when creating a session with the server
+const TUint KUpnpConnectionManagerMajorVersionNumber = 0;
+const TUint KUpnpConnectionManagerMinorVersionNumber = 1;
+const TUint KUpnpConnectionManagerBuildVersionNumber = 1;
+const TInt KNetworkEventSlot = 0;
+
+#endif  // T_UPNPCONNECTIONMANAGERCOMMON_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/inc/upnpconnmanagerengine.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,220 @@
+/** @file
+* 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:  CUpnpConnManagerEngine
+*
+*/
+
+#ifndef C_CUPNPCONNMANAGERENGINE_H
+#define C_CUPNPCONNMANAGERENGINE_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <es_sock.h>
+#include <commdbconnpref.h>
+
+#include "upnpnotifytimer.h"
+#include "upnpconninterfacewatcher.h"
+
+// FORWARD DECLARATIONS
+class CUpnpConnManagerSession;
+
+/**
+ * Class used to wrap Symbian RConnection class.
+ * Fixes performance problem when RConnection::Start() used symultanously by
+ * two or more processes/threads.
+ * @see CUpnpConnectionManagerProxy for more information.
+ * @since S60 5.0
+ */
+class CUpnpConnManagerEngine : public CBase, public MUpnpNotifyTimerObserver,
+                               public MUpnpConnInterfaceWatcherObserver
+    {
+public:
+
+    /**
+     * A two-phased constructor function
+     * @param aIterator sessions iterator
+     * @result A new instance of CUpnpConnManagerEngine
+     */
+    static CUpnpConnManagerEngine* NewL( TDblQueIter<CSession2>& aIterator );
+
+    /**
+     * Destructor function
+     */
+    virtual ~CUpnpConnManagerEngine();
+
+public:
+
+    /**
+     * After call of this method the caller is sure that
+     * RConnection was started.
+     * @param aAccessPoint id of current accessPoint on which RConnection was started
+     * @return starting error
+     */
+    TInt EnsureStart( TInt& aAccessPoint );
+
+    /**
+     * @since Series60 5.0 HN
+     * @return indicates whether RConnection is started.
+     */
+    TBool IsStarted();
+
+    /**
+     * @since Series60 5.0 HN
+     * @return active iap
+     */
+    TInt ActiveIap();
+    
+    /**
+     * Returns inet address
+     * @since Series60 5.0 HN
+     * @return local IP address
+     */
+    const TInetAddr& LocalAddress();
+    
+    /**
+     * Checks if left any session which called EnsureStart(), 
+     * when not then RConnection is closed
+     * @since Series60 5.0 HN
+     * @param Session wich call this function
+     * @return None
+     */
+    void CheckAndCloseConnection( CUpnpConnManagerSession* aSession );
+    
+private:
+    /**
+     * Default constructor.
+     */
+    CUpnpConnManagerEngine( TDblQueIter<CSession2>& aIterator );
+
+    /**
+     * 2nd phase constructor.
+     */
+    void ConstructL();
+
+    /**
+     * Opens and connects RConnection, subscribes for IP event notyfications 
+     * (for address change) and Connection closed notyfication. In case of error
+     * Leaves.
+     * @since Series60 5.0 HN
+     * @return None
+     */
+    void EnsureStartL();
+
+    /**
+     * Set state that one attempt to start the RConnection
+     * @param aError error code of starting
+     * @param aUSec microsecond for timeout
+     */
+    void SetStartAttemptStatus( TInt aError, TTimeIntervalMicroSeconds32 aUSec );
+
+    /**
+     * Reset state. One will be able to attempt to start RConnection again
+     * @since Series60 5.0 HN
+     * @return None
+     */
+    void ClearStartAttemptStatus();
+    
+    /**
+     * Cancel all subscription to network event
+     * @since Series60 5.0 HN
+     * @return None
+     */
+    void CancelAllSubscription();
+    
+    /**
+     * Notify all clients about wlan lost event
+     * @since Series60 5.0 HN
+     * @return None
+     */                                 
+    void NotifyAllAboutWlanLost();
+            
+    /**
+     * Notify all clients about address change event
+     * @since Series60 5.0 HN
+     * @return None
+     */                                 
+    void NotifyAllAboutAddressChange( TInetAddr& aAddr );
+
+    /**
+     * Notify all clients about connection closed event
+     * @since Series60 5.0 HN
+     * @return None
+     */                                 
+    void NotifyAllAboutConnectionClosed();
+
+    /**
+     * Closes RConnection
+     * @since Series60 5.0 HN
+     * @return None
+     */                                 
+    void CloseConnection();
+
+    /**
+     * Gets Iap from central repository and sets iCommDbConnPref.
+     * @since Series60 5.0 HN
+     * @return None
+     */                                 
+    void SetupConnectionPreferencesL();
+            
+private: // from MUpnpConnInterfaceWatcherObserver    
+        
+    /**
+     * Marks connection interface as not vaild
+     */
+    void WlanNetworkLost();
+
+    /**
+     * Invoked when address changes
+     * @param new address
+     */
+    void InterfaceAddressChange( TInetAddr& aAddr );
+        
+private: // from MUpnpNotifyTimerObserver
+
+    void TimerEventL( CUpnpNotifyTimer* aTimer );
+
+private:
+    // Connection preferences
+    TCommDbConnPref iCommDbConnPref;
+
+    // Connection
+    RConnection iConnection;
+
+    // SocketServer
+    RSocketServ iSocketServ;
+
+    // have we tried to start the interface
+    TInt iStartAttemptDone;
+
+    // error code of starting
+    TInt iCachedStartError;
+
+    // hysteresis timer preventing double asking 
+    // when first attempt fails e.g. when user cancels starting of IAP
+    CUpnpNotifyTimer* iUnsuccesfulStartCacheTimer;
+    
+    // it is needed only for "always ask" case
+    TInt iActiveIap;
+
+    // connection interface watcher
+    CUpnpConnInterfaceWatcher* iIfWatcher;
+    
+    // session iterator
+    TDblQueIter<CSession2>& iSessionIter;
+    
+    };
+
+
+#endif // C_CUPNPCONNMANAGERENGINE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/inc/upnpconnmanagersession.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,139 @@
+/** @file
+* 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:  defines CUpnpConnManagerSession
+*
+*/
+
+#ifndef C_CUPNPCONNMANAGERSESSION_H
+#define C_CUPNPCONNMANAGERSESSION_H
+
+#include <e32base.h>
+#include "upnpconnmanagercommon.h" 
+#include "upnpconnectionmanagernetworkevent.h"
+
+class CUpnpConnectionManager;
+class CUpnpConnManagerEngine;
+
+/**
+ * An instance of class CUpnpConnManagerSession is created for each client
+ * @since S60 5.0
+ */
+class CUpnpConnManagerSession : public CSession2
+    {
+
+public: // New methods
+
+    /**
+     * Create a CUpnpConnManagerSession object using two phase construction,
+     * and return a pointer to the created object
+     * @param aEngine the message handler engine
+     * @result pointer to new session
+     */
+    static CUpnpConnManagerSession* NewL( CUpnpConnManagerEngine& aEngine );
+
+    /**
+     * Create a CUpnpConnManagerSession object using two phase construction,
+     * and return a pointer to the created object
+     * (leaving a pointer to the object on the cleanup stack)
+     * @param anEngine the message handler engine
+     * @result pointer to new session
+     */
+    static CUpnpConnManagerSession* NewLC( CUpnpConnManagerEngine& aEngine );
+
+    /**
+     * Destroy the object and release all memory objects
+     */
+    virtual ~CUpnpConnManagerSession();
+
+public: // From CSession
+
+    /**
+     * Called after a service request from client; from class CSession
+     * @param aMessage message from client (containing requested operation and any data)
+     */
+    void ServiceL( const RMessage2& aMessage );
+            
+    /**
+     * Cancels subscription for network events
+     */ 
+    void CancelSubscription();
+    
+    /**
+     * Called when WLan Lost occurs or someone stops the connection
+     */ 
+    void WLanLostOccuredL();
+    
+    /**
+     * Called when interface IP Address has changed
+     * @param new address
+     */ 
+    void AddressChangeOccuredL( TInetAddr& aAddr );
+    
+    /**
+     * Returns value of iSessionUseConnection variable
+     */ 
+    TBool SessionUseConnection();
+
+    /**
+     * Called when connection was closed by server
+     */ 
+    void ConnectionClosedL();
+
+private: // New methods
+
+    /**
+     * Perform the first phase of two phase construction
+     * @param aServer the message handler server
+     * @param aEngine the message handler engine
+     */
+    CUpnpConnManagerSession( CUpnpConnManagerEngine& aEngine );
+
+    /**
+     * Causes the client thread to panic
+     * @param panic code
+     */
+    void PanicClient( const RMessage2& aMessage, TInt aPanic ) const;
+
+private:
+
+    // Events service functions
+    TInt EventEnsureStartRConnectionL( const RMessage2& aMessage );
+    void EventIsRConnectionStartedL( const RMessage2& aMessage );
+    void EventSubscribeToNetworkEventL( const RMessage2& aMessage );
+    void EventCancelSubscribeToNetworkEvent( );        
+    void EventActiveIapL( const RMessage2& aMessage );               
+    void EventLocalAddressL( const RMessage2& aMessage );
+    
+    // Conpletions of NetworkEvent events
+    void WLanLostCompleteL();
+    void AddressChangeCompleteL();
+    void ConnectionClosedCompleteL();
+
+private:
+
+    /* @var iEngine Reference to the message handler engine */
+    CUpnpConnManagerEngine& iConnEngine;
+    
+    /* @var iSubsriberMessage subscriber's message */
+    RMessage2 iSubscriberMessage;
+    
+    /* @var iLastEvent the last network event */
+    TUpnpConnectionManagerNetworkEvent iLastEvent;
+
+    /* @var iSessionUseConnection Indicates if session called EnsureStart() */
+    TBool iSessionUseConnection;
+    
+    };
+
+#endif // C_CUPNPCONNMANAHERSESSION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/inc/upnpipeventnotifier.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,119 @@
+/** @file
+* 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:  Subscribes for IP events from ipeventnotifier module
+*
+*/
+
+
+
+
+#ifndef C_UPNPIPEVENTNOTIFIER_H
+#define C_UPNPIPEVENTNOTIFIER_H
+
+#include <e32base.h>
+#include <e32property.h>
+#include <in_sock.h>
+
+/**
+ *  Observer class for getting information about IP events
+ *
+ *  @since S60 v3.1
+ */
+class MUpnpIPEventObserver
+    {
+public:
+    /**
+     * This function will be invoke if IPEvent occurs (IPAddressReady)
+     */
+    virtual void IPEventOccursL() = 0;
+    };
+
+
+/**
+ *  Class responsible for subscribe for IP event from ipeventnotifier module.
+ *  We register to get notification about IPEvent::EIPReady 
+ *  for specific interface index 
+ *  (it has to be specific during constrution of this class).
+ *  To see more detail infromation please check:
+ *  \src\common\generic\networking\ipeventnotifier
+ *
+ *  @since S60 v3.1
+ */
+class CUpnpIPEventNotifier : public CActive
+    {
+public:
+
+    /**
+     * Create a CUpnpIPEventNotifier object using two phase construction,
+     * and return a pointer to the created object
+     * @param aInterfaceIndex Interface index
+     * @result pointer to new event notifier
+     */
+    static CUpnpIPEventNotifier* NewL( TInt aInterfaceIndex );
+
+    /**
+     * Destroy the object and release all memory objects
+     */
+    virtual ~CUpnpIPEventNotifier();      
+
+    /**
+     * Subscribes for IP events
+     * @param observer for notification
+     */
+    void Subscribe( MUpnpIPEventObserver* aObserver );
+
+private:
+
+    /**
+     * Simply constructor
+     */
+    CUpnpIPEventNotifier();
+
+    /**
+     * 2nd constructor
+     * @param interface index
+     */
+    void ConstructL( TInt aInterfaceIndex );
+
+private:  // from CActive
+
+    /**
+     * Invoke when asynchronous request will be completed
+     * @since S60 S60 v3.1
+     */
+    void RunL();
+
+    /**
+     * Invoke when asynchronous RunL leaves
+     */
+    TInt RunError( TInt aErr );
+    
+    /**
+     * Invoke for canceling asynchronous request
+     * @since S60 S60 v3.1
+     */    
+    void DoCancel();
+    
+private: 
+
+    /* @var iProperty Property containing current IP address */
+    RProperty iProperty;
+
+    /* @var iObserver Observer which should be informed in case of changes */
+    MUpnpIPEventObserver* iObserver;
+
+    };
+
+
+#endif //  C_UPNPIPEVENTNOTIFIER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/src/upnpconninterfacewatcher.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,312 @@
+/** @file
+* 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: 
+*
+*/
+
+#include "upnpipaddressutils.h"
+#include "upnpipeventnotifier.h"
+#include "upnpconninterfacewatcher.h"
+#include "upnpsettings.h"
+#define KLogFile _L("UPnPConnManager.txt")
+#include "upnpcustomlog.h"
+
+using namespace UpnpIpAddressUtil;
+// ---------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::NewL
+//
+// ---------------------------------------------------------------------------
+//
+CUpnpConnInterfaceWatcher* CUpnpConnInterfaceWatcher::NewL(
+    MUpnpConnInterfaceWatcherObserver& aIfObserver, 
+    RSocketServ& aSockServ,
+    RConnection &aConnection )
+    {
+    CUpnpConnInterfaceWatcher* self = new (ELeave) CUpnpConnInterfaceWatcher( 
+                                            aIfObserver, aSockServ, aConnection );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::CUpnpConnInterfaceWatcher
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CUpnpConnInterfaceWatcher::CUpnpConnInterfaceWatcher(
+    MUpnpConnInterfaceWatcherObserver& aIfObserver, 
+    RSocketServ& aSockServ,
+    RConnection &aConnection ) 
+    : CActive( CActive::EPriorityStandard ),
+      iIfObserver( aIfObserver ),
+      iSockServ( aSockServ ),
+      iConnection( aConnection )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::~CUpnpConnInterfaceWatcher
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CUpnpConnInterfaceWatcher::~CUpnpConnInterfaceWatcher()
+    {
+    Cancel();
+    delete iIPEvent;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnInterfaceWatcher::ConstructL()
+    {
+    LOG_FUNC_NAME;
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::SubscribeForConnectionServiceChangeNotifications
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnInterfaceWatcher::SubscribeForConnectionServiceChangeNotifications()
+    {
+    if ( !IsActive() )
+        {
+        iConnection.ServiceChangeNotification( iNewISPId, iNewServiceType, iStatus );
+        SetActive();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::CancelSubscriptionForConnectionServiceChangeNotifications
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnInterfaceWatcher::CancelSubscriptionForConnectionServiceChangeNotifications()
+    {
+    Cancel();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::ListenAddressChangeL
+// Creates and subscribes to CUpnpIPEventNotifier instance
+// -----------------------------------------------------------------------------
+//  
+void CUpnpConnInterfaceWatcher::ListenAddressChangeL( TUint aIapId )
+    {
+    LOG_FUNC_NAME;
+    iIapId = aIapId;
+    LOGS1("ListenAddressChangeL: Given IAP: %d",iIapId);
+    // get local IP                
+    TInt interfaceIndex; // interface index used for subscribing for IP event
+
+    SetLocalAddress( LocalIpAddress( interfaceIndex ) );
+    
+    delete iIPEvent;
+    iIPEvent = NULL;
+    
+#ifdef _DEBUG
+    LOGS1( "ListenAddressChangeL: interfaceIndex: %d", interfaceIndex );
+    TBuf<50> buf;
+    iLocalIpAddress.Output( buf );
+    LOGS1( "ListenAddressChangeL: IP Addr: %S", &buf );
+#endif //_DEBUG
+    
+    iIPEvent = CUpnpIPEventNotifier::NewL( interfaceIndex );
+    iIPEvent->Subscribe( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::LocalAddress
+// -----------------------------------------------------------------------------
+//  
+const TInetAddr& CUpnpConnInterfaceWatcher::LocalAddress()
+    {
+    return iLocalIpAddress;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::SetLocalAddress
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnInterfaceWatcher::SetLocalAddress( const TInetAddr& aAddress )
+    {
+    iLocalIpAddress.SetAddress( aAddress.Address() );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::IPEventOccursL
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnInterfaceWatcher::IPEventOccursL()
+    {            
+    TInt index;
+
+    TInetAddr ip = LocalIpAddress( index );
+#ifdef _DEBUG
+    TBuf<KMaxName> address;
+    ip.Output(address);       
+    LOGS1H( iHandle, "MH IPEvent: %S", &address );
+    RDebug::Print(_L("CUpnpConnInterfaceWatcher *** IPEventOccursL *** IP Address: %S"), &address );
+#endif //_DEBUG
+           
+    if ( ip.Address() == 0 )
+        {
+        return;
+        }
+           
+    if ( ip.Address() != LocalAddress().Address() )
+        {       
+        SetLocalAddress( ip );
+        iIfObserver.InterfaceAddressChange( iLocalIpAddress );
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::RunL
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnInterfaceWatcher::RunL()
+    {
+    if ( iStatus.Int() == KErrCancel )
+        {
+        iIfObserver.WlanNetworkLost();
+        }
+    else if ( iStatus.Int() >= KErrNone )
+        {
+        SubscribeForConnectionServiceChangeNotifications();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnInterfaceWatcher::DoCancel()
+    {
+    iConnection.CancelServiceChangeNotification();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnInterfaceWatcher::RunError
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpConnInterfaceWatcher::RunError( TInt /*aError*/ )
+    {
+    LOG_FUNC_NAME;
+    return KErrNone;
+    }
+
+TInetAddr CUpnpConnInterfaceWatcher::LocalIpAddress(TInt& aInterfaceIndex)
+    {
+    LOG_FUNC_NAME;
+    
+    RSocket socket;
+    TInt err;
+    TInt index; 
+    TInt autoIfIndex = 0;
+    TBool autoIpFound = EFalse;
+    TBool ipFound = EFalse;
+    TInetAddr localIpAddress;        
+    TInetAddr autoIpAddress;
+    
+    TInt ret= socket.Open( iSockServ, KAfInet, KSockDatagram, KProtocolInetUdp);
+    if ( KErrNone == ret )
+          {
+          err = socket.SetOpt( KSoInetEnumInterfaces, KSolInetIfCtrl );
+           
+          if ( err == KErrNone )
+                {
+                TPckgBuf<TSoInetInterfaceInfo> info;
+                err = socket.GetOpt( KSoInetNextInterface, KSolInetIfCtrl, info );
+                while ( err == KErrNone )
+                    {
+                    TPckgBuf<TSoInetIfQuery> query;
+                    query().iName = info().iName;
+                    err = socket.GetOpt( KSoInetIfQueryByName, KSolInetIfQuery, query );
+                    if ( err == KErrNone )
+                        {
+                        index = query().iIndex;
+                        
+                          //Address should be IPv4, not 0.0.0.0 & not loopback.
+                          if ((info().iAddress.Address() != 0) && !info().iAddress.IsUnspecified() && !info().iAddress.IsLoopback() && query().iZone[1] == iIapId)
+                            {
+                            
+                        #ifdef _DEBUG
+                             LOGS1( "LocalIpAddress: IAP is matched with %d",query().iZone[1] );
+                             TBuf<50> buf;
+                             info().iAddress.Output( buf );
+                             LOGS1( "LocalIpAddress: info().iAddress: %S", &buf );
+                        #endif
+        
+                             if ( info().iAddress.IsLinkLocal() )
+                                 {
+                                 autoIpFound = ETrue;
+                                 autoIpAddress = info().iAddress;
+                                 autoIpAddress.ConvertToV4();
+                                 autoIfIndex = index;
+                                 LOGS("LocalIpAddress: IP is Matched with AutoIP");
+                            #ifdef _DEBUG
+                                 TBuf<50> buf;
+                                 autoIpAddress.Output( buf );
+                                 LOGS1( "LocalIpAddress: Auto IP Addr: %S", &buf );
+                            #endif
+                                 }
+                             // Other than auto IP
+                             else
+                                 {
+                                 ipFound = ETrue;
+                                 localIpAddress = info().iAddress;
+                                 // we're using ipv4 addresses
+                                 localIpAddress.ConvertToV4();
+                                 aInterfaceIndex = index;
+                                 LOGS("LocalIpAddress: IP is Matched with DHCP IP");
+                            #ifdef _DEBUG
+                                 TBuf<50> buf;
+                                 localIpAddress.Output( buf );
+                                 LOGS1( "LocalIpAddress: DHCP IP Addr: %S", &buf );
+                            #endif
+                                 }
+                
+                            }
+                        }
+                    err = socket.GetOpt( KSoInetNextInterface, KSolInetIfCtrl, info );
+                    }
+                }
+          }
+    socket.Close();
+    
+    if ( !ipFound && autoIpFound )
+        {
+        localIpAddress = autoIpAddress;
+        aInterfaceIndex = autoIfIndex;
+        }
+    
+#ifdef _DEBUG
+    TBuf<50> buf;
+    localIpAddress.Output( buf );
+    LOGS1( "LocalIpAddress: IP Addr: %S", &buf );
+#endif
+    
+    return localIpAddress;  
+    
+    }
+
+
+
+
+//End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/src/upnpconnmanager.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,133 @@
+/** @file
+* 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:  class CUpnpConnectionManager
+*
+*/
+
+// INCLUDE FILES
+#include "upnpconnmanager.h"
+#define KLogFile _L("UPnPConnManager.txt")
+#include "upnpcustomlog.h"
+#include "upnpconnmanagerengine.h"
+#include "upnpconnmanagersession.h"
+
+const TVersion KServerSupportedVersion(
+    KUpnpConnectionManagerMajorVersionNumber,
+    KUpnpConnectionManagerMinorVersionNumber,
+    KUpnpConnectionManagerBuildVersionNumber );
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::CUpnpConnectionManager
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnectionManager::CUpnpConnectionManager()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::~CUpnpConnectionManager
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnectionManager::~CUpnpConnectionManager()
+    {
+    delete iEngine;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpSymbianServerBase* CUpnpConnectionManager::NewLC()
+    {
+    LOG_FUNC_NAME;
+    CUpnpConnectionManager* connManager = new (ELeave) CUpnpConnectionManager();
+    CleanupStack::PushL( connManager );
+    connManager->ConstructL() ;
+    return connManager;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnectionManager::ConstructL()
+    {
+    LOG_FUNC_NAME;
+    BaseConstructL();
+    iEngine = CUpnpConnManagerEngine::NewL( iSessionIter );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::NewSessionL
+// Create new session.
+// -----------------------------------------------------------------------------
+//
+CSession2* CUpnpConnectionManager::NewSessionL( const RMessage2& /*aMsg*/ ) const
+    {
+    LOG_FUNC_NAME;
+    return CUpnpConnManagerSession::NewL( *iEngine );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::SupportedVersion
+// Gets server supported version.
+// -----------------------------------------------------------------------------
+//
+TVersion CUpnpConnectionManager::SupportedVersion() const
+    {
+    return KServerSupportedVersion;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::ServerName
+// Gets server supported version.
+// -----------------------------------------------------------------------------
+//
+const TDesC& CUpnpConnectionManager::ServerName() const
+    {
+    return KUpnpConnectionManagerName;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::RunError
+// RunError is called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpConnectionManager::RunError( TInt aError )
+    {
+    LOG_FUNC_NAME;
+    return CUpnpSymbianServerBase::RunError( aError );
+    }
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// E32Main entry point.
+// -----------------------------------------------------------------------------
+//
+TInt E32Main()
+    {
+    return CUpnpConnectionManager::StartServer(
+        KUpnpConnectionManagerThreadName, CUpnpConnectionManager::NewLC );
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/src/upnpconnmanagerengine.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,358 @@
+/** @file
+* 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:  Defines CUpnpConnManagerEngine
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpconnmanagerengine.h"
+#include "upnpsettings.h"
+#include "upnpconnmanagersession.h"
+
+#define KLogFile _L("UPnPConnManager.txt")
+#include "upnpcustomlog.h"
+
+const TTimeIntervalMicroSeconds32 KUnsuccesfulStartCacheTimeout( 2000000 );
+const TTimeIntervalMicroSeconds32 KWlanLostTimeout( 2000000 );
+const TInt KErrWlanLost = KErrNotReady;
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnManagerEngine* CUpnpConnManagerEngine::NewL( TDblQueIter<CSession2>& aIterator )
+    {
+    LOG_FUNC_NAME;
+    CUpnpConnManagerEngine* self = new( ELeave ) CUpnpConnManagerEngine( aIterator );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::CUpnpConnManagerEngine
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnManagerEngine::CUpnpConnManagerEngine( TDblQueIter<CSession2>& aIterator )
+    : iActiveIap( KErrNotFound ), iSessionIter( aIterator )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::ConstructL()
+    {
+    LOG_FUNC_NAME;
+
+    // create a socket server connection
+    User::LeaveIfError( iSocketServ.Connect() );
+
+    iIfWatcher = CUpnpConnInterfaceWatcher::NewL( *this, iSocketServ, iConnection );
+
+    iUnsuccesfulStartCacheTimer = CUpnpNotifyTimer::NewL( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::CUpnpConnManagerEngine
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnManagerEngine::~CUpnpConnManagerEngine()
+    {
+    LOG_FUNC_NAME;
+
+    delete iUnsuccesfulStartCacheTimer;
+    
+    delete iIfWatcher;
+    CancelAllSubscription();
+
+    iConnection.Close();
+    iSocketServ.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::EnsureStart
+// After call of this method the caller is sure that
+// RConnection was started.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpConnManagerEngine::EnsureStart( TInt& aAccessPoint )
+    {
+    TInt startError;
+    if ( !iStartAttemptDone )
+        {
+        TRAP( startError, EnsureStartL() );
+        if( KErrNone != startError )
+            {
+            iConnection.Close();
+            }
+        
+        SetStartAttemptStatus( startError, KUnsuccesfulStartCacheTimeout );        
+        }
+    else
+        {
+        startError = iCachedStartError;
+        }
+    aAccessPoint = iActiveIap;
+    return startError;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::EnsureStartL
+// RConnection starting logic.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::EnsureStartL()
+    {
+    TUint32 activeIap;
+    _LIT( KIAPId, "IAP\\Id" );
+
+    SetupConnectionPreferencesL();
+
+    User::LeaveIfError( iConnection.Open( iSocketServ ) );
+    User::LeaveIfError( iConnection.Start( iCommDbConnPref ) );
+    
+    // because iCommDbConnPref is not updated by Start method
+    // we retrieve active iap here
+    // it is crucial for always ask case when predefined
+    // wlan is chosen from unavailable wlan list
+    User::LeaveIfError( iConnection.GetIntSetting( KIAPId, activeIap ) );
+
+    iIfWatcher->ListenAddressChangeL( activeIap );
+    iIfWatcher->SubscribeForConnectionServiceChangeNotifications();
+    
+    iActiveIap = activeIap;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::SetupConnectionPreferencesL
+// Gets Iap from central repository and sets iCommDbConnPref.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::SetupConnectionPreferencesL()
+    {
+    iCommDbConnPref.SetIapId( CUpnpSettings::GetIapL() );
+    iCommDbConnPref.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
+    iCommDbConnPref.SetBearerSet( ECommDbBearerWLAN );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::IsStarted
+// Indicates whether RConnection was started.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpConnManagerEngine::IsStarted()
+    {
+    return iStartAttemptDone 
+           && ( KErrNone == iCachedStartError ) 
+           && ( iActiveIap > KErrNotFound );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::ActiveIap
+// Returns active iap
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpConnManagerEngine::ActiveIap()
+    {
+    return iActiveIap;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::LocalAddress
+// -----------------------------------------------------------------------------
+//  
+const TInetAddr& CUpnpConnManagerEngine::LocalAddress()
+    {
+    return iIfWatcher->LocalAddress();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::SetStartAttemptStatus
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::SetStartAttemptStatus( TInt aError,
+                                                    TTimeIntervalMicroSeconds32 aUSec )
+    {
+    iStartAttemptDone = ETrue;
+    iCachedStartError = aError;
+
+    if ( iCachedStartError )
+        {
+        // start timer to clean start attempt status after aUSec microseconds
+        iUnsuccesfulStartCacheTimer->Cancel();
+        iUnsuccesfulStartCacheTimer->Start( aUSec );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnectionManager::ClearStartAttemptStatus
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::ClearStartAttemptStatus()
+    {
+    iStartAttemptDone = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::TimerEventL
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::TimerEventL( CUpnpNotifyTimer* /*aTimer*/ )
+    {
+    ClearStartAttemptStatus();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::WlanNetworkLost
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::WlanNetworkLost()
+    {
+    LOG_FUNC_NAME;
+    NotifyAllAboutWlanLost();
+    SetStartAttemptStatus( KErrWlanLost, KWlanLostTimeout );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::NotifyAllAboutWlanLostL
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::NotifyAllAboutWlanLost()
+    {
+    iSessionIter.SetToFirst();
+    CUpnpConnManagerSession* ses = 
+              reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );
+    while ( ses )
+        {
+        TRAP_IGNORE( ses->WLanLostOccuredL() );
+        ses = reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );    
+        }
+    }    
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::InterfaceAddressChange
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::InterfaceAddressChange( TInetAddr& aAddr )
+    {
+    LOG_FUNC_NAME;
+    if ( IsStarted() )
+        {
+        NotifyAllAboutAddressChange( aAddr );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::NotifyAllAboutAddressChangeL
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerEngine::NotifyAllAboutAddressChange( TInetAddr& aAddr )
+    {
+    iSessionIter.SetToFirst();
+    CUpnpConnManagerSession* ses = 
+              reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );
+    while ( ses )
+        {
+        TRAP_IGNORE( ses->AddressChangeOccuredL( aAddr ) );
+        ses = reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );    
+        }
+    }    
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::CancelAllSubscription
+// -----------------------------------------------------------------------------
+//    
+void CUpnpConnManagerEngine::CancelAllSubscription()
+    {
+    iSessionIter.SetToFirst();
+    CUpnpConnManagerSession* ses = 
+              reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );
+    while ( ses )
+        {
+        ses->CancelSubscription();        
+        ses = reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );    
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::CloseConnection
+// -----------------------------------------------------------------------------
+//    
+void CUpnpConnManagerEngine::CloseConnection()
+    {
+    iIfWatcher->CancelSubscriptionForConnectionServiceChangeNotifications();
+    iConnection.Close();
+    iActiveIap = KErrNotFound;
+    
+    ClearStartAttemptStatus();
+    NotifyAllAboutConnectionClosed();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::CheckAndCloseConnection
+// -----------------------------------------------------------------------------
+//    
+void CUpnpConnManagerEngine::CheckAndCloseConnection(
+                                             CUpnpConnManagerSession* aSession )
+    {
+    if ( !IsStarted() )
+        {
+        return;
+        }
+    
+    iSessionIter.SetToFirst();
+    CUpnpConnManagerSession* ses = 
+              reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );
+    while ( ses )
+        {
+        if ( ses != aSession && ses->SessionUseConnection() )
+            {
+            return;
+            }
+        ses = reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );    
+        }
+
+    CloseConnection();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerEngine::NotifyAllAboutConnectionClosed
+// -----------------------------------------------------------------------------
+//    
+void CUpnpConnManagerEngine::NotifyAllAboutConnectionClosed()
+    {
+    iSessionIter.SetToFirst();
+    CUpnpConnManagerSession* ses = 
+              reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );
+    while ( ses )
+        {
+        TRAP_IGNORE( ses->ConnectionClosedL() );
+        ses = reinterpret_cast<CUpnpConnManagerSession*>( iSessionIter++ );    
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/src/upnpconnmanagersession.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,384 @@
+/** @file
+* 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:  Defines the CUpnpConnManagerSession class
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpconnmanagersession.h"
+#include "upnpconnmanagerengine.h"
+#include "upnpconnmanager.h"
+#include <upnpsymbianserverbase.h>
+
+#define KLogFile _L("UPnPConnManager.txt")
+#include "upnpcustomlog.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnManagerSession* CUpnpConnManagerSession::NewL(
+    CUpnpConnManagerEngine& aEngine )
+    {
+    LOG_FUNC_NAME;
+    CUpnpConnManagerSession* self =
+        CUpnpConnManagerSession::NewLC( aEngine );
+    CleanupStack::Pop( self ) ;
+    return self ;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::NewLC
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnManagerSession* CUpnpConnManagerSession::NewLC(
+    CUpnpConnManagerEngine& aEngine )
+    {
+    LOG_FUNC_NAME;
+    CUpnpConnManagerSession* self =
+        new( ELeave ) CUpnpConnManagerSession( aEngine );
+    CleanupStack::PushL( self );
+    return self ;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::CUpnpConnManagerSession
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnManagerSession::CUpnpConnManagerSession( CUpnpConnManagerEngine& aEngine )
+        : CSession2(),
+        iConnEngine( aEngine ),
+        iLastEvent( EUnknownEvent )
+    {
+#ifdef _DEBUG
+    TInt reqsInStart = RThread().RequestCount();
+    TInt processHandlesInStart;
+    TInt threadHandlesInStart;
+    RThread().HandleCount( processHandlesInStart, threadHandlesInStart );
+    LOGS1( "reqsInStart: %d", reqsInStart);
+    LOGS1( "processHandlesInStart: %d", processHandlesInStart );
+    LOGS1( "threadHandlesInStart: %d", threadHandlesInStart );
+#endif // _DEBUG
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::~CUpnpConnManagerSession
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpConnManagerSession::~CUpnpConnManagerSession()
+    {
+    LOG_FUNC_NAME;
+    
+    iConnEngine.CheckAndCloseConnection( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::ServiceL
+// Handle client requests.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::ServiceL( const RMessage2& aMessage )
+    {
+    LOG_FUNC_NAME;
+    TInt err;
+    switch ( aMessage.Function() )
+        {
+        case EEnsureStartRConnection:
+            {
+            err = EventEnsureStartRConnectionL( aMessage );
+            aMessage.Complete( err );
+            break;
+            }
+        case EIsRConnectionStarted:
+            {
+            EventIsRConnectionStartedL( aMessage );
+            aMessage.Complete( KErrNone );
+            break;
+            }
+        case EEventSubscribe:
+            {
+            // subscribe to: 1) wlan lost or 2) address change
+            EventSubscribeToNetworkEventL( aMessage );
+            break;
+            }
+        case ECancelEventSubscribe:
+            {
+            EventCancelSubscribeToNetworkEvent();
+            aMessage.Complete( KErrNone );
+            break;
+            }    
+        case ECmActiveIap:
+            {
+            EventActiveIapL( aMessage );
+            aMessage.Complete( KErrNone );
+            break;
+            }  
+        case ECmGetAddress:
+            {
+            EventLocalAddressL( aMessage );
+            aMessage.Complete( KErrNone );
+            break;
+            }
+            
+        default:
+            PanicClient( aMessage, CUpnpSymbianServerBase::EBadRequest );
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::PanicClient
+// Panic client.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::PanicClient( const RMessage2& aMessage, TInt aPanic ) const
+    {
+    LOG_FUNC_NAME;
+    static_cast<const CUpnpSymbianServerBase*>( Server() )->PanicClient( aMessage, aPanic );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::EventEnsureStartRConnectionL
+// Device list change.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpConnManagerSession::EventEnsureStartRConnectionL( const RMessage2& aMessage )
+    {
+    LOG_FUNC_NAME;
+
+    TInt accessPoint;
+    TInt result = iConnEngine.EnsureStart( accessPoint );
+    TPtr8 ptr( reinterpret_cast<TUint8*>( &accessPoint ), sizeof( TInt ), sizeof( TInt ) );
+    aMessage.WriteL( 0, ptr );
+    
+    iSessionUseConnection = ETrue;
+    
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::EventIsRConnectionStartedL
+// Checks if connection is started
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::EventIsRConnectionStartedL( const RMessage2& aMessage )
+    {
+    LOG_FUNC_NAME;
+
+    TBool result = iConnEngine.IsStarted();
+    TPtr8 ptr( reinterpret_cast<TUint8*>( &result ), sizeof( TBool ),
+               sizeof( TBool ) );
+    aMessage.WriteL( 0, ptr );
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::EventSubscribeToNetworkEventL
+// Subscribes to Wlan lost event
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::EventSubscribeToNetworkEventL( const RMessage2& aMessage )
+    {
+    LOG_FUNC_NAME;
+    if ( !iSubscriberMessage.IsNull() )
+        {
+        aMessage.Complete( KErrServerBusy );
+        return;
+        }
+    else 
+        {
+        iSubscriberMessage = aMessage;
+        }    
+        
+    switch( iLastEvent.Type() )
+        {
+        case EWlanLostEvent: 
+                WLanLostCompleteL();
+            break;
+        case EAddressChangeEvent: 
+                AddressChangeCompleteL();
+            break;
+        default: 
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::EventCancelSubscribeToNetworkEvent
+// Cancel subscription
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::EventCancelSubscribeToNetworkEvent()
+    {
+    LOG_FUNC_NAME;
+    CancelSubscription();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::EventActiveIap
+// Returns active Iap.
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::EventActiveIapL( const RMessage2 &aMessage )
+    {
+    LOG_FUNC_NAME;
+
+    TInt iap = iConnEngine.ActiveIap();
+    TPtr8 ptr( reinterpret_cast<TUint8*>( &iap ), sizeof( TInt ), sizeof( TInt ) );
+
+    aMessage.WriteL( 0, ptr );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::EventLocalAddressL
+// Returns local address
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::EventLocalAddressL( const RMessage2 &aMessage )
+    {
+    LOG_FUNC_NAME;
+
+    TInetAddr localAddress = iConnEngine.LocalAddress();
+    TPtr8 ptr( reinterpret_cast<TUint8*>( &localAddress ), 
+               sizeof( TInetAddr ), 
+               sizeof( TInetAddr ) );
+
+    aMessage.WriteL( 0, ptr );       
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::CancelSubscription
+// Cancel subscription
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::CancelSubscription()
+    {
+    if ( !iSubscriberMessage.IsNull() )
+        {
+        iSubscriberMessage.Complete( KErrCancel );
+        }
+    iLastEvent.SetType( EUnknownEvent );    
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::WLanLostOccured
+// Ends subscription with Wlan lost code
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::WLanLostOccuredL()
+    {
+    iLastEvent.SetType( EWlanLostEvent );
+    if ( !iSubscriberMessage.IsNull() )
+        {
+        WLanLostCompleteL();
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::WLanLostComplete
+// Notify client about WLan lost event
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::WLanLostCompleteL()
+    {
+    TPtr8 ptr( reinterpret_cast<TUint8*>( &iLastEvent ),
+               sizeof( TUpnpConnectionManagerNetworkEvent ),
+               sizeof( TUpnpConnectionManagerNetworkEvent ) );
+               
+    iSubscriberMessage.WriteL( KNetworkEventSlot, ptr );
+    iSubscriberMessage.Complete( KErrNone );
+    iLastEvent.SetType( EUnknownEvent );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::AddressChangeOccuredL
+// Ends subscription with address change code
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::AddressChangeOccuredL( TInetAddr& aAddr )
+    {
+    iLastEvent.SetType( EAddressChangeEvent );
+    iLastEvent.SetAddress( aAddr );
+        
+    if ( !iSubscriberMessage.IsNull() )
+        {
+        AddressChangeCompleteL();
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::AddressChangeCompleteL
+// Notify client about address change event
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::AddressChangeCompleteL()
+    {
+    TPtr8 ptr( reinterpret_cast<TUint8*>( &iLastEvent ),
+               sizeof( TUpnpConnectionManagerNetworkEvent ),
+               sizeof( TUpnpConnectionManagerNetworkEvent ) );
+           
+    iSubscriberMessage.WriteL( KNetworkEventSlot, ptr );
+    iSubscriberMessage.Complete( KErrNone );
+    iLastEvent.SetType( EUnknownEvent );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::SessionUseConnection
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpConnManagerSession::SessionUseConnection()
+    {
+    return iSessionUseConnection;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::ConnectionClosedL
+// Ends subscription with connection close code
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::ConnectionClosedL()
+    {
+    if ( iLastEvent.Type() != EConnectionClosedEvent )
+        {
+        iLastEvent.SetType( EConnectionClosedEvent );
+        
+        if ( !iSubscriberMessage.IsNull() )
+            {
+            ConnectionClosedCompleteL();
+            }    
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpConnManagerSession::ConnectionClosedCompleteL
+// Notify client about connection close event
+// -----------------------------------------------------------------------------
+//
+void CUpnpConnManagerSession::ConnectionClosedCompleteL()
+    {
+    TPtr8 ptr( reinterpret_cast<TUint8*>( &iLastEvent ),
+               sizeof( TUpnpConnectionManagerNetworkEvent ),
+               sizeof( TUpnpConnectionManagerNetworkEvent ) );
+               
+    iSubscriberMessage.WriteL( KNetworkEventSlot, ptr );
+    iSubscriberMessage.Complete( KErrNone );
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnpconnmanager/src/upnpipeventnotifier.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,118 @@
+/** @file
+* 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:  Monitoring of IP Event Notification from ipeventnotifier module
+*
+*/
+
+
+#include "upnpipeventnotifier.h"
+#include <networking/ipeventtypesids.h>
+
+#ifdef _DEBUG
+#define KLogFile _L("UPnPStack.txt")
+#endif
+#include "upnpcustomlog.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+
+// ---------------------------------------------------------------------------
+// CUpnpIPEventNotifier::NewL
+// ---------------------------------------------------------------------------
+//
+CUpnpIPEventNotifier* CUpnpIPEventNotifier::NewL( TInt aInterfaceIndex )
+    {
+    CUpnpIPEventNotifier* self = new (ELeave) CUpnpIPEventNotifier;
+    CleanupStack::PushL( self );
+    self->ConstructL( aInterfaceIndex );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPEventNotifier::CUpnpIPEventNotifier
+// ---------------------------------------------------------------------------
+//
+CUpnpIPEventNotifier::CUpnpIPEventNotifier() : CActive( EPriorityStandard )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPEventNotifier::ConstructL
+// ---------------------------------------------------------------------------
+//    
+void CUpnpIPEventNotifier::ConstructL( TInt aInterfaceIndex )
+    {
+    User::LeaveIfError( iProperty.Attach( TUid::Uid( IPEvent::EIPReady ), 
+                                          aInterfaceIndex ) );
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPEventNotifier::~CUpnpIPEventNotifier
+// ---------------------------------------------------------------------------
+//    
+CUpnpIPEventNotifier::~CUpnpIPEventNotifier()
+    {
+    Cancel();
+    iProperty.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPEventNotifier::DoCancel
+// ---------------------------------------------------------------------------
+//    
+void CUpnpIPEventNotifier::DoCancel()
+    {
+    iProperty.Cancel();
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpIPEventNotifier::Subscribe
+// ---------------------------------------------------------------------------
+//    
+void CUpnpIPEventNotifier::Subscribe( MUpnpIPEventObserver* aObserver )
+    {
+    iObserver = aObserver; 
+	if(!IsActive())
+		{
+		iProperty.Subscribe( iStatus );
+	    SetActive();        
+		}
+    }
+    
+// ---------------------------------------------------------------------------
+// CUpnpIPEventNotifier::RunL
+// ---------------------------------------------------------------------------
+//    
+void CUpnpIPEventNotifier::RunL()
+    {
+    if ( iStatus.Int() == KErrNone ) 
+        {
+        iProperty.Subscribe( iStatus );
+        SetActive();        
+        iObserver->IPEventOccursL();        
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// CUpnpIPEventNotifier::RunError
+// ---------------------------------------------------------------------------
+//  
+TInt CUpnpIPEventNotifier::RunError( TInt /*aErr*/ )
+    {
+    LOG_FUNC_NAME;
+    return KErrNone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/BWINS/httptransferu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,19 @@
+EXPORTS
+	?CancelAll@CHttpTransferBase@@QAEXXZ @ 1 NONAME ; void CHttpTransferBase::CancelAll(void)
+	?CancelTransfer@CHttpTransferBase@@QAEHPAX@Z @ 2 NONAME ; int CHttpTransferBase::CancelTransfer(void *)
+	?DownloadFileL@CHttpDownloader@@QAEXABVTDesC8@@ABVRFile@@PAX@Z @ 3 NONAME ; void CHttpDownloader::DownloadFileL(class TDesC8 const &, class RFile const &, void *)
+	?DownloadFileL@CHttpDownloader@@QAEXABVTDesC8@@ABVTDesC16@@PAX@Z @ 4 NONAME ; void CHttpDownloader::DownloadFileL(class TDesC8 const &, class TDesC16 const &, void *)
+	?GetPropertyL@CHttpTransferBase@@QAEPBVHBufC16@@PAXW4THttpPropertyType@1@@Z @ 5 NONAME ; class HBufC16 const * CHttpTransferBase::GetPropertyL(void *, enum CHttpTransferBase::THttpPropertyType)
+	?InsertFileIntoWaitQueueL@CHttpTransferBase@@QAEXPAXABVRFile@@ABVTDesC8@@@Z @ 6 NONAME ; void CHttpTransferBase::InsertFileIntoWaitQueueL(void *, class RFile const &, class TDesC8 const &)
+	?InsertFileIntoWaitQueueL@CHttpTransferBase@@QAEXPAXABVTDesC16@@ABVTDesC8@@@Z @ 7 NONAME ; void CHttpTransferBase::InsertFileIntoWaitQueueL(void *, class TDesC16 const &, class TDesC8 const &)
+	?MoveToTransferQueueL@CHttpTransferBase@@QAEXPAX@Z @ 8 NONAME ; void CHttpTransferBase::MoveToTransferQueueL(void *)
+	?NewL@CHttpDownloader@@SAPAV1@AAVMHttpTransferObserver@@III@Z @ 9 NONAME ; class CHttpDownloader * CHttpDownloader::NewL(class MHttpTransferObserver &, unsigned int, unsigned int, unsigned int)
+	?NewL@CHttpUploader@@SAPAV1@AAVMHttpTransferObserver@@III@Z @ 10 NONAME ; class CHttpUploader * CHttpUploader::NewL(class MHttpTransferObserver &, unsigned int, unsigned int, unsigned int)
+	?NewLC@CHttpDownloader@@SAPAV1@AAVMHttpTransferObserver@@III@Z @ 11 NONAME ; class CHttpDownloader * CHttpDownloader::NewLC(class MHttpTransferObserver &, unsigned int, unsigned int, unsigned int)
+	?NewLC@CHttpUploader@@SAPAV1@AAVMHttpTransferObserver@@III@Z @ 12 NONAME ; class CHttpUploader * CHttpUploader::NewLC(class MHttpTransferObserver &, unsigned int, unsigned int, unsigned int)
+	?SetHeaderL@CHttpTransferBase@@QAEXPAXABVTDesC8@@1@Z @ 13 NONAME ; void CHttpTransferBase::SetHeaderL(void *, class TDesC8 const &, class TDesC8 const &)
+	?SetPropertyL@CHttpTransferBase@@QAEXPAXW4THttpPropertyType@1@ABVTDesC16@@@Z @ 14 NONAME ; void CHttpTransferBase::SetPropertyL(void *, enum CHttpTransferBase::THttpPropertyType, class TDesC16 const &)
+	?StartTransferL@CHttpTransferBase@@QAEXPAX@Z @ 15 NONAME ; void CHttpTransferBase::StartTransferL(void *)
+	?TrackProgress@CHttpTransferBase@@QAEHPAXH@Z @ 16 NONAME ; int CHttpTransferBase::TrackProgress(void *, int)
+	?UploadFileL@CHttpUploader@@QAEXABVTDesC8@@ABVTDesC16@@PAX@Z @ 17 NONAME ; void CHttpUploader::UploadFileL(class TDesC8 const &, class TDesC16 const &, void *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/eabi/httptransferu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+EXPORTS
+	_ZN13CHttpUploader11UploadFileLERK6TDesC8RK7TDesC16Pv @ 1 NONAME
+	_ZN13CHttpUploader4NewLER21MHttpTransferObserverjjj @ 2 NONAME
+	_ZN13CHttpUploader5NewLCER21MHttpTransferObserverjjj @ 3 NONAME
+	_ZN15CHttpDownloader13DownloadFileLERK6TDesC8RK5RFilePv @ 4 NONAME
+	_ZN15CHttpDownloader13DownloadFileLERK6TDesC8RK7TDesC16Pv @ 5 NONAME
+	_ZN15CHttpDownloader4NewLER21MHttpTransferObserverjjj @ 6 NONAME
+	_ZN15CHttpDownloader5NewLCER21MHttpTransferObserverjjj @ 7 NONAME
+	_ZN17CHttpTransferBase10SetHeaderLEPvRK6TDesC8S3_ @ 8 NONAME
+	_ZN17CHttpTransferBase12GetPropertyLEPvNS_17THttpPropertyTypeE @ 9 NONAME
+	_ZN17CHttpTransferBase12SetPropertyLEPvNS_17THttpPropertyTypeERK7TDesC16 @ 10 NONAME
+	_ZN17CHttpTransferBase13TrackProgressEPvi @ 11 NONAME
+	_ZN17CHttpTransferBase14CancelTransferEPv @ 12 NONAME
+	_ZN17CHttpTransferBase14StartTransferLEPv @ 13 NONAME
+	_ZN17CHttpTransferBase20MoveToTransferQueueLEPv @ 14 NONAME
+	_ZN17CHttpTransferBase24InsertFileIntoWaitQueueLEPvRK7TDesC16RK6TDesC8 @ 15 NONAME
+	_ZN17CHttpTransferBase9CancelAllEv @ 16 NONAME
+	_ZTI13CHttpUploader @ 17 NONAME ; #<TI>#
+	_ZTI15CHttpDownloader @ 18 NONAME ; #<TI>#
+	_ZTI17CHttpTransferBase @ 19 NONAME ; #<TI>#
+	_ZTI18CHttpTransferTimer @ 20 NONAME ; #<TI>#
+	_ZTI19CHttpTransferWorker @ 21 NONAME ; #<TI>#
+	_ZTV13CHttpUploader @ 22 NONAME ; #<VT>#
+	_ZTV15CHttpDownloader @ 23 NONAME ; #<VT>#
+	_ZTV17CHttpTransferBase @ 24 NONAME ; #<VT>#
+	_ZTV18CHttpTransferTimer @ 25 NONAME ; #<VT>#
+	_ZTV19CHttpTransferWorker @ 26 NONAME ; #<VT>#
+	_ZN17CHttpTransferBase24InsertFileIntoWaitQueueLEPvRK5RFileRK6TDesC8 @ 27 NONAME
+	_ZTI16CHttpNotifyTimer @ 28 NONAME ; #<TI>#
+	_ZTV16CHttpNotifyTimer @ 29 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+/** @file
+* 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:  Build file of HttpTransfer
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+httptransfer.mmp
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/group/httptransfer.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,86 @@
+/** @file
+* 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:  Project definition file for HttpTransfer component
+*
+*/
+
+
+// System include files
+#include "../../../inc/upnpcompvariant.hrh"
+
+// Build target
+
+#if defined(__HN_31__) || defined(__HN_32__)
+TARGET          hnhttptransfer.dll
+UID             0x1000008d 0x20011373
+#else
+TARGET          httptransfer.dll
+UID             0x1000008d 0x20009CA0
+#endif
+
+TARGETTYPE      DLL
+CAPABILITY      CAP_GENERAL_DLL
+VENDORID        VID_DEFAULT
+
+TARGETPATH      /sys/bin
+
+// Source files
+SOURCEPATH      ../src
+SOURCE          httpfile.cpp
+SOURCE          httpheader.cpp
+
+SOURCE          httptransferbase.cpp
+SOURCE          httpdownloader.cpp
+SOURCE          httpuploader.cpp
+
+SOURCE          httptransferworker.cpp
+SOURCE          httpdownloadworker.cpp
+SOURCE          httpuploadworker.cpp
+SOURCE          httptransfertimer.cpp
+SOURCE          httpnotifytimer.cpp
+
+// Include directories
+USERINCLUDE     ../../../inc
+USERINCLUDE     ../../inc
+USERINCLUDE     ../inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+// Libraries
+LIBRARY         http.lib
+LIBRARY         euser.lib
+LIBRARY         esock.lib
+LIBRARY         commdb.lib
+LIBRARY         bafl.lib
+LIBRARY         ecom.lib
+LIBRARY         efsrv.lib  // TParse
+LIBRARY         inetprotutil.lib
+LIBRARY         sysutil.lib
+LIBRARY         platformenv.lib // DriveInfo
+#if defined(__HN_31__) || defined(__HN_32__)
+LIBRARY         hnupnpconnectionmanagersession.lib
+#else
+LIBRARY         upnpconnectionmanagersession.lib
+#endif
+
+DEFFILE         httptransfer
+
+
+VERSION 10.1
+
+paged
+
+SMPSAFE
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/inc/httpdownloadworker.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,229 @@
+/** @file
+* 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:  Handles download of a file
+*
+*/
+
+
+#ifndef C_CHTTPDOWNLOADWORKER_H
+#define C_CHTTPDOWNLOADWORKER_H
+
+
+// User include files
+#include "httptransferworker.h"
+#include "httptransferobserver.h"
+#include "httptransferbase.h"
+
+// forward declarations
+class MHttpWorkerObserver;
+
+/**
+ * This class downloads on single file.
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ */
+NONSHARABLE_CLASS ( CHttpDownloadWorker ) : public CHttpTransferWorker, MHttpNotifyTimerObserver
+    {
+public:
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBuffersize Size of the buffer
+     * @param aCallback Call back to workerobserver
+     */
+    static CHttpDownloadWorker* NewL( MHttpTransferObserver& aObserver,
+                                      TUint aIAPId,
+                                      TUint aBufferSize,
+                                      MHttpWorkerObserver& aCallback );
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize Size of the buffer
+     * @param aCallback Call back to workerobserver
+     */
+    static CHttpDownloadWorker* NewLC( MHttpTransferObserver& aObserver,
+                                       TUint aIAPId,
+                                       TUint aBufferSize,
+                                       MHttpWorkerObserver& aCallback );
+
+    /**
+     * Destructor
+     *
+     * @since S60 v3.2
+     */
+    virtual ~CHttpDownloadWorker();
+
+// from base class CHttpTransferWorker
+    
+    /**
+     * From base class CHttpTransferWorker
+     * Stops the transfer of the file
+     *
+     * @since S60 v3.2
+     */
+    void CancelTransfer();
+    
+    /**
+     * From base class CHttpTransferWorker
+     * Starts the processing of a file.
+     * Asynchronous.
+     *
+     * @since S60 v3.2
+     */
+    virtual void StartProcessL();
+
+    /**
+     * From base class CHttpTransferWorker
+     * Called by framework to notify about transaction events.
+     *
+     * @since S60 v3.2
+     * @param aTransaction Transaction, where the event occured.
+     * @param aEvent Occured event.
+     */
+    void MHFRunL( RHTTPTransaction aTransaction,
+                  const THTTPEvent& aEvent );
+
+    /**
+     * From base class CHttpTransferWorker
+     * Called by framework when leave occurs in handling of 
+     * transaction event.
+     *
+     * @since S60 v3.2
+     * @param aError The leave code that occured.
+     * @param aTransaction The transaction that was being processed 
+     * @param aEvent The event that was being processed
+     * @return Error code
+     */
+    TInt MHFRunError( TInt aError, 
+                      RHTTPTransaction aTransaction,
+                      const THTTPEvent& aEvent );
+
+private:
+
+    /**
+     * Deletes partially downloaded file from file system.
+     *
+     * @since S60 v3.2
+     */
+    void DeleteFileL();
+
+    /**
+     * Checks disk space
+     * @param aSize to be written to file
+     * @since S60 v3.2
+     */
+    void CheckDiskSpaceL(TInt aSize);
+    
+    /**
+     * Writes the last part of body into a file
+     *
+     * @since S60 v3.2
+     */
+    void WriteTailIntoFileL();
+
+    /**
+     * Handles the HTTP response data
+     *
+     * @since S60 v3.2
+     * @param aTransaction HTTP transaction
+     */
+    void HandleResponseDataL( RHTTPTransaction aTransaction );
+
+    /**
+     * Sends HTTP GET request
+     *
+     * @since S60 v3.2
+     */
+    void HttpGetL();
+
+    /**
+     * Performs the actions needed when download is finished
+     *
+     * @since @S60 v3.2
+     * @param aTransaction HTTP transaction
+     */
+    void FinishDownload( RHTTPTransaction aTransaction );
+    
+    /**
+     * Default constructor
+     *
+     * @since S60 v3.2
+     * @param aIAPId IAP id
+     * @param aBufferSize Size of the buffer
+     * @param aObserver Transfer observer
+     * @param aCallback Call back for workerobserver
+     */
+    CHttpDownloadWorker( TUint aIAPId,
+                         TUint aBufferSize,
+                         MHttpTransferObserver& aObserver,
+                         MHttpWorkerObserver& aCallback );
+
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     */
+    void ConstructL();
+    
+    /**
+     * Terminates the transfer and informs the client through
+     * TransferComplete.
+     *
+     * @since S60 v3.2
+     * @param aError Error code
+     */
+    void CompleteAndNotifyL( TInt aError );
+    
+    /**
+    * Callback function for timer expirations.
+    * @since Series60 5.0 HN
+    * @param aTimer Timer that has expired.
+    **/
+    void TimerEventL( CHttpNotifyTimer* aTimer );
+    
+private: 
+
+    /**
+     * Size of the downloaded file
+     */ 
+    TInt iFileSizeFromHeader;
+    
+    /**
+     * Amount of transferred bytes
+     */     
+    TInt iBytesTransferred;
+    
+    /**
+     * Response body
+     * Own.
+     */
+    HBufC8* iResponseBody;
+    
+    /**
+    * Timeout timer for current session
+    */
+    CHttpNotifyTimer* iSessionTimer;
+    
+    };
+
+#endif // C_CHTTPDOWNLOADWORKER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/inc/httpfile.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,268 @@
+/** @file
+* 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:  Represents one downloadable file
+*
+*/
+
+
+#ifndef C_CHTTPFILE_H
+#define C_CHTTPFILE_H
+
+
+// System include files
+#include <e32cmn.h>
+#include <e32base.h>
+#include <f32file.h>
+
+// User include files
+#include "httpheader.h"
+
+/**
+ * Class which represents one dowloaded/uploaded file  
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ */
+NONSHARABLE_CLASS ( CHttpFile ) : public CBase
+    {
+public:
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @param aUri Uri of the file
+     * @param aPath Local path of the file
+     * @return Instance of CHttpFile object
+     */
+    static CHttpFile* NewL( TAny* aKey, const TDesC8& aUri,
+                            const TDesC& aPath );
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @param aUri Uri of the file
+     * @param aPath Local path of the file
+     * @return Identifier of the object
+     */
+    static CHttpFile* NewLC( TAny* aKey, const TDesC8& aUri, 
+                             const TDesC& aPath );
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @param aUri Uri of the file
+     * @param aFileHandle Handle to the file
+     * @return Instance of CHttpFile object
+     */
+    static CHttpFile* NewL( TAny* aKey, const TDesC8& aUri,
+                            const RFile& aFileHandle );
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @param aUri Uri of the file
+     * @param aFileHandle Handle to the file
+     * @return Identifier of the object
+     */
+    static CHttpFile* NewLC( TAny* aKey, const TDesC8& aUri, 
+                             const RFile& aFileHandle );
+
+    /**
+     * Virtual destructor
+     *
+     * @since S60 v3.2
+     */
+    ~CHttpFile();
+
+    /**
+     * Setter for the member variable iTrackProgress
+     *
+     * @since S60 v3.2
+     * @param aValue Value of the progress flag
+     * @return Identifier of the object
+     */
+    void TrackProgress( TBool aValue );
+
+    /**
+     * Returns if tracking is set on.
+     *
+     * @since S60 v3.2
+     * @return True if tracking is on, false otherwise
+     */
+    TBool TrackingOn() const;
+    
+    /**
+     * Getter for the member variable iKey
+     *
+     * @since S60 v3.2
+     * @return Identifier of the object
+     */
+    TAny* Key() const;
+
+    /**
+     * Getter for the iUri member variable
+     *
+     * @since S60 v3.2
+     * @return Reference to the Uri
+     */
+    const HBufC8* Uri() const;
+
+    /**
+     * Setter for iUri
+     *
+     * @since S60 v3.2
+     */
+    void SetUriL( const TDesC8& aUri );
+    
+    /**
+     * Getter for the iPath member variable
+     *
+     * @since S60 v3.2
+     * @return Pointer to the path
+     */
+    const HBufC* Path() const;
+
+    /**
+     * Getter for the filehandle
+     *
+     * @since S60 v3.2
+     * @return Handle to the file
+     */
+    RFile FileHandle() const;
+
+    /**
+     * Sets a header
+     *
+     * @since S60 v3.2
+     * @param aFieldName The field name, e.g. 'Accept'
+     * @param aFieldValue The field value. e.g. 'text/plain'
+     */
+    void SetHeaderL( const TDesC8& aFieldName, const TDesC8& aFieldValue );
+
+    /**
+     * Getter for header array
+     *
+     * @since S60 v3.2
+     * @return Array of CHttpHeader objects which are set to this file
+     */
+    RPointerArray<CHttpHeader>& Headers();
+
+    /**
+     * Creates the file in the file system
+     *
+     * @since S60 v3.2
+     */
+    void CreateFileInFileSystemL();
+
+    /**
+     * Deletes the file from the file system
+     *
+     * @since S60 v3.2
+     */
+    void DeleteFileFromFileSystemL();
+    
+    /**
+     * Closes the file
+     */
+    void CloseFile();
+
+private:
+
+    /**
+     * Default constructor
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @return Identifier of the object
+     */
+    CHttpFile( TAny* aKey );
+
+    /**
+     * Default constructor
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @param aFileHandle Handle to the file
+     * @return Identifier of the object
+     */
+    CHttpFile( TAny* aKey, const RFile& aFileHandle );
+
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     * @param aUri Uri of the file
+     * @param aPath Local path of the file
+     */
+    void ConstructL( const TDesC8& aUri, const TDesC& aPath );
+
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     * @param aUri Uri of the file
+     */
+    void ConstructL( const TDesC8& aUri );
+
+private: 
+
+    /**
+     * Indicator if tracking of the progress is switched on
+     */
+    TBool iTrackProgress;
+
+    /**
+     * Identifier of the object
+     * Not own.
+     */
+    TAny* iKey;
+
+    /**
+     * Uri
+     * Own.
+     */
+    HBufC8* iUri;
+
+    /**
+     * Full path on local system
+     * Own.
+     */
+    HBufC* iPath;
+    
+    /**
+     * Array of headers
+     */
+    RPointerArray<CHttpHeader> iHeaderArray;
+    
+    /**
+     * Handle to the file
+     */
+    RFile iFile;
+
+    /**
+     * File server session
+     */
+    RFs iFsSession;
+
+    };
+
+#endif // C_CHTTPFILE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/inc/httpheader.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,101 @@
+/** @file
+* 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:  Represents one header in transferred file
+*
+*/
+
+
+#ifndef C_CHTTPHEADER_H
+#define C_CHTTPHEADER_H
+
+
+// System include files
+#include <e32def.h>
+#include <e32base.h>
+
+/**
+ * Class which represents one header in transferred file
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ */
+NONSHARABLE_CLASS ( CHttpHeader ) : public CBase
+    {
+public:
+    /**
+     * Destructor
+     *
+     * @since S60 v3.2
+     */
+    ~CHttpHeader();
+    
+    /**
+     * Default constructor
+     *
+     * @since S60 v3.2
+     */
+    CHttpHeader();
+    
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aFieldName Name of the header field
+     * @param aFieldValue Value of the header field
+     */
+    static CHttpHeader* NewL( const TDesC8& aFieldName, 
+                              const TDesC8& aFieldValue );
+    
+    /**
+     * Getter for the name of the field
+     *
+     * @since S60 v3.2
+     * @return Name of the field
+     */
+    const TDesC8& FieldName();
+    
+    /**
+     * Getter for the value of the field
+     *
+     * @since S60 v3.2
+     * @return Value of the field
+     */
+    const TDesC8& FieldValue();
+
+private:
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     * @param aFieldName Name of the header field
+     * @param aFieldValue Value of the header field
+     */
+    void ConstructL( const TDesC8& aFieldName, const TDesC8& aFieldValue );
+    
+private:
+
+    /**
+     * Header field name
+     * Own.
+     */
+    HBufC8* iFieldName;
+    
+    /**
+     * Value of the field
+     * Own.
+     */
+    HBufC8* iFieldValue;
+    };
+
+#endif // C_CHTTPHEADER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/inc/httpnotifytimer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,112 @@
+/** @file
+* 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:  Session timeout
+*
+*/
+
+
+#ifndef C_HTTPNOTIFYTIMER_H
+#define C_HTTPNOTIFYTIMER_H
+
+// INCLUDES
+#include <e32base.h>
+
+// CONSTANTS
+static const TInt KSecond = 1000000;
+
+// FORWARD DECLARATIONS
+class CHttpNotifyTimer;
+
+// CLASS DECLARATION
+/**
+* An interface from notifytimer to its customer (service)
+*
+*  @since Series60 5.0 HN
+*/
+class MHttpNotifyTimerObserver
+    {
+    public:
+
+        /**
+        * TimerEventL
+        * A callback function to time updates.
+        * @since Series60 5.0 HN
+        * @param aTimer A pointer containing updated time.
+        * @return None
+        */
+	virtual void TimerEventL( CHttpNotifyTimer* aTimer ) = 0;
+    };
+    
+// CLASS DECLARATION
+/**
+* Wrapper for RTimer classs to notify observer about elaspsed time
+*
+*  @since Series60 5.0 HN
+*/
+class CHttpNotifyTimer : public CActive
+    {
+    protected:
+        /**
+        * Constructor
+        */
+        CHttpNotifyTimer( MHttpNotifyTimerObserver* aObserver );
+    public:
+        static CHttpNotifyTimer* NewL(MHttpNotifyTimerObserver* aObserver);
+        void ConstructL();
+        
+        /**
+        * Destructor.
+        */
+	    ~CHttpNotifyTimer();
+        /**
+        * At
+        * @since Series60 5.0 HN
+        * @param aTime
+        */
+        void AfterSeconds( TInt aIntervalInSeconds );
+       
+        /**
+        * RunL
+        * Active object state machine.
+        * @since Series60 5.0 HN
+        */
+    	void RunL();
+
+        /**
+        * RunError
+        * RunError in case RunL leaves.
+        * @since Series60 5.0 HN
+        */
+        TInt RunError( TInt aError );
+
+        /**
+        * DoCancel
+        * Cancel outstanding request(s) and reset the iActive flag.
+        * @since Series60 5.0 HN
+        */
+    	void DoCancel();
+
+    private: 
+
+        // Interface observer object, owned
+    	MHttpNotifyTimerObserver* iObserver;
+
+        // Timer, owned
+    	RTimer iTimer;
+};
+
+
+#endif // C_HTTPNOTIFYTIMER_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/inc/httptransfertimer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,126 @@
+/** @file
+* 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:  Header file of the class CHttpTransferTimer.
+*
+*/
+
+
+#ifndef C_HTTPTRANSFERTIMER_H
+#define C_HTTPTRANSFERTIMER_H
+
+// system includes
+#include <e32base.h>
+#include <e32cons.h>
+
+// forward declarations
+class MHttpTransferTimerObserver;
+
+/**
+ * This class is a timer that launches new transfers in CHttpUploader
+ * and CHttpDownloader
+ *
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ */
+class CHttpTransferTimer : public CBase,
+                           public MBeating
+    {
+public:
+
+    /**
+     * Static NewL method to construct the timer.
+     *
+     * @since S60 3.2
+     * @param aInterval Timer interval in seconds 
+     * @param aCallback The call back reference 
+     * @return CHttpTransferTimer* timer instance
+     */
+    static CHttpTransferTimer* NewL( 
+                                TInt aInterval,
+                                MHttpTransferTimerObserver* aCallback );
+
+    /**
+     * Destructor
+     *
+     * @since S60 v3.2
+     */
+    virtual ~CHttpTransferTimer();
+
+private:
+
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     */
+    void ConstructL();
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aInterval Interval when call back is called
+     * @param aCallback Callback interface
+     */
+    CHttpTransferTimer( TInt aInterval,
+                        MHttpTransferTimerObserver* aCallback );
+
+private: 
+
+// From base class MBeating
+
+    /**
+     * Called when the beat is in sync.
+     *
+     * @since S60 3.0
+     */
+    void Beat();
+
+    /**
+     * Called when the beat needs to be syncronized.
+     *
+     * @since S60 3.0
+     */
+    void Synchronize() {}
+
+private: 
+    
+    /**
+     * Heartbeat active object
+     * Own.
+     */
+    CHeartbeat* iHeartbeat;
+
+    /**
+     * Call back pointer.
+     * Not own.
+     */
+    MHttpTransferTimerObserver *iCallback;
+
+    /**
+     * Interval in seconds
+     */
+    TInt iInterval;
+    
+    /**
+     * Counter
+     */
+    TInt iCounter;
+     
+    };
+
+#endif // C_HTTPTRANSFERTIMER_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/inc/httptransfertimerobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,41 @@
+/** @file
+* 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:  Base class for downloader / uploader classes
+*
+*/
+
+
+#ifndef C_CHTTPTRANSFERTIMEROBSERVER_H
+#define C_CHTTPTRANSFERTIMEROBSERVER_H
+
+/**
+ * This interface class is used by timer to start next transfer
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ */
+class MHttpTransferTimerObserver 
+    {
+public:
+    /**
+     * Callback to start new transfer
+     *
+     * @since S60 v3.2
+     */
+    virtual void TimerCallback()=0;
+
+    };
+
+#endif //C_CHTTPTRANSFERTIMEROBSERVER_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/inc/httptransferworker.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,328 @@
+/** @file
+* 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:  Base class for download / upload worker classes
+*
+*/
+
+
+#ifndef C_CHTTPTRANSFERWORKER_H
+#define C_CHTTPTRANSFERWORKER_H
+
+
+// System include files
+#include <http/mhttptransactioncallback.h>
+#include <e32def.h>
+#include <e32cmn.h>
+#include <http.h>
+#include <e32base.h>
+#include <es_sock.h>
+#include <stringpool.h>
+
+// User include files
+#include "httptransferobserver.h"
+#include "httpfile.h"
+#include "httptransferbase.h"
+#include "httptransfertimerobserver.h"
+#include "upnpconnectionmanagerproxy.h"
+#include "httpnotifytimer.h"
+
+// Forward declarations
+class MHttpTransactionObserver;
+class CHttpTransferTimer;
+
+const TInt KSessionTimeout = 35; //35 sec
+
+/**
+ * Virtual base class for CHttpDowloadWorker and CHttpUploadWorker.
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ */
+class CHttpTransferWorker : public CBase,
+                            public MHTTPTransactionCallback,
+                            public MHttpTransferTimerObserver
+    {
+public:
+    /**
+     * State machine
+     *
+     * @since S60 v3.2
+     */
+    enum THttpWorkerState
+        {
+        // Waiting for start of the process
+        EHttpWaitingForStart,
+        
+        // HTTP GET sent
+        EHttpGetSent,
+        
+        // HTTP POST sent
+        EHttpPostSent,
+
+        // HTTP GET response received
+        EHttpGetResponseReceived,
+
+        // HTTP transaction finished
+        EHttpTransactionIdle,
+        
+        // HTTP transaction canceled
+        EHttpTransactionCanceled
+        };
+
+public:
+
+    /**
+     * Virtual destructor
+     *
+     * @since S60 v3.2
+     */
+    virtual ~CHttpTransferWorker();
+
+    /**
+     * Connects the HTTP session
+     *
+     * @since S60 v3.2
+     */
+    void ConnectL();
+    
+    /**
+     * Sets file which should be transfered.
+     *
+     * @since S60 v3.2
+     * @param aFile New file
+     */
+    void SetFileL( CHttpFile& aFile );
+    
+    /**
+     * Stops the transfer of the file
+     *
+     * @since S60 v3.2
+     */
+    virtual void CancelTransfer()=0;
+    
+    /**
+     * Starts the processing of a file.
+     * Asynchronous.
+     *
+     * @since S60 v3.2
+     */
+    virtual void StartProcessL();
+    
+    /**
+     * Sets tracking flag of the processed file to the value 
+     * of the aValue attribute.
+     *
+     * @since S60 v3.2
+     * @param aValue New value
+     */
+    void TrackProgress( TBool aValue );
+    
+    /**
+     * Getter for key value of the processed file.
+     *
+     * @since S60 v3.2
+     * @return Value of the aKey attribute of the processed file.
+     */
+    TAny* Key() const;
+    
+    /**
+     * Getter for Uri
+     *
+     * @since S60 v3.2
+     * @return Value of the Uri
+     */
+    const HBufC8* Uri() const;
+    
+    /**
+     * Getter for Path
+     *
+     * @since S60 v3.2
+     * @return Value of the path
+     */
+    const HBufC* Path() const;
+    
+    /**
+     * Returns information if the process is on-going
+     *
+     * @since S60 v3.2
+     * @return True if process is on-going
+     */
+    TBool ProcessOnGoing() const;
+    
+    /**
+     * Returns information if the worker is waiting for start
+     *
+     * @since S60 v3.2
+     * @return True if is waiting
+     */
+    TBool IsWaiting() const;
+    
+    /**
+     * Sets headers
+     *
+     * @since S60 v3.2
+     * @param aHeaders Header
+     * @param aHdrField The field of the header
+     * @param aHdrValue Value of the header
+     */
+    void SetHeaderL( RHTTPHeaders aHeaders, TInt aHdrField, 
+                     const TDesC8& aHdrValue );
+
+    /**
+     * Sets headers
+     *
+     * @since S60 v3.2
+     * @param aHeaders Header
+     * @param aHdrField The field of the header
+     * @param aHdrValue Value of the header
+     */
+    void SetHeaderL( RHTTPHeaders aHeaders,
+                     const TDesC8& aHdrField,
+                     const TDesC8& aHdrValue );
+    
+    /**
+     * Returns a reference to the processed file. Returns NULL if 
+     * the processed file is not set.
+     *
+     * @since S60 v3.2
+     * @return A pointer to the processed file
+     */
+    CHttpFile* ProcessedFile();
+
+// from base class MHTTPTransactionCallback
+
+    /**
+     * Called by framework to notify about transaction events.
+     *
+     * @since S60 v3.2
+     * @param aTransaction Transaction, where the event occured.
+     * @param aEvent Occured event.
+     */
+    virtual void MHFRunL( RHTTPTransaction aTransaction,
+                          const THTTPEvent& aEvent )=0;
+
+    /**
+     * Called by framework when leave occurs in handling of transaction 
+     * event.
+     *
+     * @since S60 v3.2
+     * @param aError The leave code that occured.
+     * @param aTransaction The transaction that was being processed 
+     * @param aEvent The event that was being processed
+     * @return Error code
+     */
+    virtual TInt MHFRunError( TInt aError,
+                              RHTTPTransaction aTransaction,
+                              const THTTPEvent& aEvent )=0;
+
+// from base class MHttpTransferTimerObserver    
+    
+    /**
+     * Call back for the timer
+     *
+     * @since S60 v3.2
+     */
+    void TimerCallback();
+    
+protected:
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     */
+    void ConstructL();
+
+protected: 
+
+    /**
+     * Pointer to the transfer observer
+     * Not own.
+     */
+    MHttpTransferObserver* iObserver;
+
+    /**
+     * HTTP session
+     */
+    RHTTPSession iSession;
+    
+    /**
+     * String pool
+     */
+    RStringPool iStringPool;
+    
+    /**
+     * Connection
+     */
+    CUpnpConnectionManagerProxy *iConnectionManagerProxy;
+    
+    /**
+     * Filename
+     * Own.
+     */
+    HBufC* iFileName;
+    
+    /**
+     * Handle to the file server session
+     */
+    RFs iFsSession;
+    
+    /**
+     * File
+     */
+    RFile iFile;
+
+    /**
+     * File which is being processed.
+     * Own.
+     */
+    CHttpFile* iProcessedFile;
+    
+    
+    /**
+     * State machine
+     */
+    THttpWorkerState iProcessState;
+
+    /**
+     * Buffer size
+     */ 
+    TInt iBufferSize;            
+    
+    /**
+     * Socket server
+     */
+    RSocketServ iSocketServer;
+    
+    /**
+     * A HTTP Transaction. This encapsulates 1 HTTP request and
+     * response. A Transaction is associated with a session, and must be
+     * created using the session's CreateTransactionL method.
+     */
+    RHTTPTransaction iHttpTransaction;
+    
+    /**
+     * Worker observer
+     * Not own.
+     */
+    MHttpWorkerObserver* iCallback;
+
+    /**
+     * Timer.
+     * Own.
+     */
+    CHttpTransferTimer* iTimer;
+
+    };
+
+#endif // C_CHTTPTRANSFERWORKER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/inc/httpuploadworker.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,312 @@
+/** @file
+* 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:  Handles upload of single file
+*
+*/
+
+
+#ifndef C_HTTPUPLOADWORKER_H
+#define C_HTTPUPLOADWORKER_H
+
+// system includes
+#include <escapeutils.h> 
+#include <http/mhttpdatasupplier.h>
+
+// user includes
+#include "httptransferworker.h"
+
+// forward declarations
+class MHttpWorkerObserver;
+
+/**
+ * Handles upload of single file. Used by CHttpUploader.
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ */
+NONSHARABLE_CLASS ( CHttpUploadWorker ) : public CHttpTransferWorker,
+                                          public MHTTPDataSupplier,
+                                          MHttpNotifyTimerObserver
+    {
+public:
+     
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize Size of the buffer
+     * @param aCallback Call back to workerobserver
+     */
+    static CHttpUploadWorker* NewL( MHttpTransferObserver& aObserver,
+                                    TUint aIAPId,
+                                    TUint aBufferSize,
+                                    MHttpWorkerObserver& aCallback );
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize Size of the buffer
+     * @param aCallback Call back to workerobserver
+     */
+    static CHttpUploadWorker* NewLC( MHttpTransferObserver& aObserver,
+                                     TUint aIAPId,
+                                     TUint aBufferSize,
+                                     MHttpWorkerObserver& aCallback );
+
+    /**
+     * Destructor
+     *
+     * @since S60 v3.2
+     */
+    virtual ~CHttpUploadWorker();
+
+// New functions
+
+    /**
+     * Sends a file to some URI through HTTP channel.
+     * The POST HTTP method is used.
+     *
+     * @since S60 v.3.2
+     */
+    void SendL();
+     
+    /**
+     * Invokes the http method.
+     * This actually creates the transaction, sets the headers and body 
+     * and then starts the transaction.
+     *
+     * @since S60 v3.2
+     */
+    void InvokeHttpMethodL();
+
+// from base class CHttpTransferWorker
+
+    /**
+     * Stops the transfer of the file
+     *
+     * @since S60 v3.2
+     */
+    void CancelTransfer();
+    
+    /**
+     * Starts the processing of a file. Asynchronous.
+     *
+     * @since S60 v3.2
+     */
+    virtual void StartProcessL();
+
+// from base class MHTTPTransactionCallback
+
+    /**
+     * Called by framework to notify about transaction events.
+     *
+     * @since S60 v3.2
+     * @param aTransaction Transaction, where the event occured.
+     * @param aEvent Occured event.
+     */
+    virtual void MHFRunL( RHTTPTransaction aTransaction,
+                          const THTTPEvent& aEvent );
+
+    /**
+     * Called by framework when leave occurs in handling of 
+     * transaction event.
+     *
+     * @since S60 v3.2
+     * @param aError The leave code that occured.
+     * @param aTransaction The transaction that was being processed 
+     * @param aEvent The event that was being processed
+     * @return Error code
+     */
+    virtual TInt MHFRunError( TInt aError, 
+                              RHTTPTransaction aTransaction,
+                              const THTTPEvent& aEvent );             
+
+// from base class MHttpDataSupplier
+
+    /**
+     * Obtain a data part from the supplier.  The data is guaranteed
+     * to survive until a call is made to ReleaseData()
+     *
+     * @since S60 v3.2
+     * @param aDataPart - the data part
+     * @return ETrue if this is the last part. EFalse otherwise
+     */   
+    TBool GetNextDataPart( TPtrC8& aDataPart );
+    
+    /**
+     * Release the current data part being held at the data
+     * supplier.  This call indicates to the supplier that the part
+     * is no longer needed, and another one can be supplied, if
+     * appropriate.
+     *
+     * @since S60 v3.2.
+     */   
+    void ReleaseData();
+
+    /**
+     * Obtain the overall size of the data being supplied, if known
+     * to the supplier.  Where a body of data is supplied in several
+     * parts this size will be the sum of all the part sizes. If
+     * the size is not known, KErrNotFound is returned; in this case
+     * the client must use the return code of GetNextDataPart to find
+     * out when the data is complete.
+     *
+     * @since S60 v3.2
+     * @return Return code
+     */       
+    TInt OverallDataSize();
+    
+    /**
+     * Reset the data supplier. This indicates to the data supplier that 
+     * it should return to the first part of the data. This could be used 
+     * in a situation where the data consumer has encountered an error
+     * and needs the data to be supplied afresh. Even if the last part 
+     * has been supplied (i.e. GetNextDataPart has returned ETrue), the 
+     * data supplier should reset to the first part.
+     *
+     * If the supplier cannot reset it should return an error code; 
+     * otherwise it should return KErrNone, where the reset will be assumed
+     * to have succeeded
+     *
+     * @since S60 v3.2
+     * @return Error code
+     */       
+    TInt Reset();
+   
+
+private:
+   
+    /**
+     * Default constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize Size of the buffer
+     * @param aCallback Call back to workerobserver
+     */
+    CHttpUploadWorker( MHttpTransferObserver& aObserver,
+                       TUint aIAPId,
+                       TUint aBufferSize,
+                       MHttpWorkerObserver& aCallback );
+
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     */
+    void ConstructL();
+    
+    /**
+     * Map HTTP transaction error to Symbian error (POST request)
+     *
+     * @since S60 v3.2
+     * @param aError HTTP transaction error
+     * @return symbian error code
+     */
+    TInt MapPostTransactionError( TInt aError ) const;
+
+    /**
+     * Complete the transaction and notify the client
+     *
+     * @since S60 v3.2
+     * @param aError HTTP transaction error
+     */
+    void CompleteAndNotify( TInt aError );
+
+    /**
+    * Callback function for timer expirations.
+    * @since Series60 5.0 HN
+    * @param aTimer Timer that has expired.
+    **/
+    void TimerEventL( CHttpNotifyTimer* aTimer );
+    
+    /**
+     * Cancels and destroys the 100-continue response wait timer if it exists.
+     *
+     * @since S60 v3.2.3
+     */
+    void Destroy100ContinueTimer();
+    
+    /**
+     * Callback method for 100 continue timer. Cancels waiting for 
+     * 100-continue response and proceeds with sending the body.
+     *
+     * @param TAny* the object who generated the event 
+     *              (TAny pointer to this object)
+     * @since S60 v3.2.3
+     */
+    static TInt Cancel100ContinueWaitL( TAny* aParam );
+
+private: 
+ 
+    /**
+     * For performance reasons,
+     * read data from the file in chunks of 640K
+     * Own.
+     */
+    HBufC8* iRequestBodyBuffer;
+ 
+    /**
+     * How much body data has been sent to the HTTP stack
+     */
+    TUint iSendDataCount;
+    
+    /**
+     * How much data will be sent
+     */
+    TInt iOverallDataSize;
+    
+    /**
+     * Is there still data left
+     */
+    TBool iMoreToCome;
+    
+    /**
+     * Was the process of the request already done
+     * to avoid the repeated the process of the same part of the request
+     */
+    TBool iAlreadyDone;
+      
+    /**
+     * Here in file to start to read, currently always 0 
+     * (the beginning of the file)
+     */
+    TUint iBodyFileOffset;
+    
+    /**
+     * Http status
+     */ 
+    TInt iHttpStatus;            
+    
+    /**
+     * Timer to wait for 100-continue response. If no response is received 
+     * in the given time, we will continue with sending the body.
+     * Owned.
+     */
+    CPeriodic* i100ContinueTimer;
+    
+    /**
+    * Timeout timer for current session
+    */
+    CHttpNotifyTimer* iSessionTimer;
+    
+    };
+
+#endif // C_HTTPUPLOADWORKER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httpdownloader.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,180 @@
+/** @file
+* 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:  Handles downloads
+*
+*/
+
+
+// System include files
+#include <es_sock.h>
+
+// User include files
+#include "httpdownloader.h"
+#include "httpdownloadworker.h"
+#include "httptransferbase.h"
+#include "httptransferobserver.h"
+#include "httpworkerobserver.h"
+
+// Constants
+const TUint KMaxParallelTransfers = 5;
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::CHttpDownloader()
+// --------------------------------------------------------------------------
+//
+CHttpDownloader::CHttpDownloader( 
+                       MHttpTransferObserver& aObserver,
+                       TUint aIAPId,
+                       TUint aBufferSize,
+                       TUint aParallelTransfers = KDefaultParallelTransfers )
+    {
+    iObserver = &aObserver;
+    iIAPId = aIAPId;
+    iBufferSize = aBufferSize;
+
+    if ( aParallelTransfers <= 0 )
+        {
+        iParallelTransfers = KDefaultParallelTransfers;
+        }
+    else if ( aParallelTransfers > KMaxParallelTransfers )
+        {
+        iParallelTransfers = KMaxParallelTransfers;
+        }
+    else
+        {
+        iParallelTransfers = aParallelTransfers;
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::ConstructL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloader::ConstructL()
+    {
+    
+    for ( TInt i=0; i < iParallelTransfers; i++ )
+        {
+        iWorkerArray.Append( CHttpDownloadWorker::NewL( *iObserver,
+                                                        iIAPId,
+                                                        iBufferSize,
+                                                        *this ) );
+        }
+
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::NewL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C CHttpDownloader* CHttpDownloader::NewL( 
+                                        MHttpTransferObserver& aObserver,
+                                        TUint aIAPId,
+                                        TUint aBufferSize,
+                                        TUint aParallelTransfers )
+    {
+    CHttpDownloader* self = CHttpDownloader::NewLC( aObserver, 
+                                                    aIAPId, 
+                                                    aBufferSize,
+                                                    aParallelTransfers );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::NewLC()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C CHttpDownloader* CHttpDownloader::NewLC( 
+                                         MHttpTransferObserver& aObserver,
+                                         TUint aIAPId,
+                                         TUint aBufferSize,
+                                         TUint aParallelTransfers )
+
+    {
+    CHttpDownloader* self = 
+                new( ELeave ) CHttpDownloader( aObserver, 
+                                               aIAPId,
+                                               aBufferSize,
+                                               aParallelTransfers );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::~CHttpDownloader()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpDownloader::~CHttpDownloader()
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::DownloadFileL
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpDownloader::DownloadFileL( const TDesC8& aUri, 
+                                              const TDesC& aTargetPath, 
+                                              TAny* aKey )
+    {
+    // if aKey already exists -> leave
+    for ( TInt i=0; i < iFileQueue.Count(); i++ )
+        {
+        if ( iFileQueue[i]->Key() == aKey )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    // Add new CHttpFile into the iFileQueue
+    CreateAndQueueHttpFileL( aUri, aTargetPath, aKey );
+
+    // Activate new request
+    ActivateNewTransferRequest();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::DownloadFileL
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpDownloader::DownloadFileL( const TDesC8& aUri, 
+                                              const RFile& aFileHandle, 
+                                              TAny* aKey )
+    {
+    // if aKey already exists -> leave
+    for ( TInt i=0; i < iFileQueue.Count(); i++ )
+        {
+        if ( iFileQueue[i]->Key() == aKey )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    // Add new CHttpFile into the iFileQueue
+    CreateAndQueueHttpFileL( aUri, aFileHandle, aKey );
+
+    // Activate new request
+    ActivateNewTransferRequest();
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httpdownloadworker.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,646 @@
+/** @file
+* 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:  Handles download of one file at a time
+*
+*/
+
+
+// System include files
+#include <sysutil.h>
+#ifndef __SERIES60_31__
+#include <driveinfo.h>
+#endif
+
+// User include files
+#include "httpfile.h"
+#include "httpdownloadworker.h"
+#include "httpheader.h"
+#include "httpworkerobserver.h"
+#include "upnpcompvariant.hrh"
+
+// Constants
+_LIT8( KModuleName, "HttpTransfer");
+const TUint KDefaultBufferSize = 64000;
+const TUint32 KMaxBufferSize   = 0x100000; //1MB
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::NewL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpDownloadWorker* CHttpDownloadWorker::NewL(
+                                           MHttpTransferObserver& aObserver,
+                                           TUint aIAPId,
+                                           TUint aBufferSize,
+                                           MHttpWorkerObserver& aCallback )
+    {
+    CHttpDownloadWorker* self = CHttpDownloadWorker::NewLC( aObserver,
+                                                            aIAPId,
+                                                            aBufferSize,
+                                                            aCallback );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::NewLC()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpDownloadWorker* CHttpDownloadWorker::NewLC(
+                                           MHttpTransferObserver& aObserver,
+                                           TUint aIAPId,
+                                           TUint aBufferSize,
+                                           MHttpWorkerObserver& aCallback )
+    {
+    CHttpDownloadWorker* self = new( ELeave ) CHttpDownloadWorker(
+                                                               aIAPId,
+                                                               aBufferSize,
+                                                               aObserver,
+                                                               aCallback );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::CHttpDownloadWorker()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpDownloadWorker::CHttpDownloadWorker( TUint /*aIAPId*/,
+                                          TUint aBufferSize,
+                                          MHttpTransferObserver& aObserver,
+                                          MHttpWorkerObserver& aCallback )
+    {
+    iProcessState = EHttpTransactionIdle;
+    iFileSizeFromHeader = 0;
+    iBytesTransferred = 0;
+    iObserver = &aObserver;
+    iCallback = &aCallback;
+
+    if ( aBufferSize <= 0 )
+        {
+        iBufferSize = KDefaultBufferSize;
+        }
+    else if ( aBufferSize > KMaxBufferSize )
+        {
+        iBufferSize = KMaxBufferSize;
+        }
+    else
+        {
+        iBufferSize = aBufferSize;
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::ConstructL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::ConstructL()
+    {
+    CHttpTransferWorker::ConstructL();
+    ConnectL();
+    iSessionTimer = CHttpNotifyTimer::NewL( this );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::~CHttpDownloadWorker()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpDownloadWorker::~CHttpDownloadWorker()
+    {
+    delete iResponseBody;
+    delete iSessionTimer;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::CheckDiskSpaceL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::CheckDiskSpaceL( TInt aSize )
+    {
+    TInt driveNum;
+    TDriveInfo aninfo;
+    if ( iProcessedFile->Path() )
+        {
+        TParse p;
+        p.Set( *(iProcessedFile->Path() ), NULL, NULL );
+        TPtrC pointer = p.Drive();
+        TLex lineParser( pointer.Ptr() );
+        TChar ch = lineParser.Get();
+
+        //sets the default drive or the fulnd value
+        User::LeaveIfError( iFsSession.CharToDrive( ch, driveNum ) );
+        }
+    else
+        {
+        TDriveInfo driveInfo;
+        User::LeaveIfError( iFile.Drive( driveNum, driveInfo ) );
+        }
+
+    User::LeaveIfError( iFsSession.Drive( aninfo, driveNum ) );
+
+    // get the drive status from DriveInfo in order to distinguish memory card
+    // and hard disk from each other in multiple drive environment.
+#ifndef __SERIES60_31__
+    TUint driveStatus = 0;
+    User::LeaveIfError( DriveInfo::GetDriveStatus(
+        iFsSession, driveNum, driveStatus ) );
+#endif
+
+    // The case for default device memory (C-drive).
+    if( aninfo.iType == EMediaNANDFlash )
+        {
+        if( SysUtil::FFSSpaceBelowCriticalLevelL
+                                        ( &iFsSession, aSize ) )
+             {
+             User::Leave( KErrDiskFull );
+             }
+        }
+#ifndef __SERIES60_31__
+    // Internal FLASH memory
+    // Multiple drive checking rules are applied here
+    // note that in case of S60 3.1 this case is skipped
+    else if( aninfo.iType == EMediaHardDisk &&
+             aninfo.iDriveAtt & KDriveAttRemovable &&
+             driveStatus & DriveInfo::EDriveInternal )
+        {
+        if( SysUtil::MMCSpaceBelowCriticalLevelL( &iFsSession, aSize ) )
+            {
+            User::Leave( KErrDiskFull );
+            }
+        }
+#endif
+    // Memory card (or practically any other memory type)
+    // This covers also emulator's EMediaRam.
+    else
+        {
+        if( SysUtil::DiskSpaceBelowCriticalLevelL
+                                        ( &iFsSession, aSize, driveNum ) )
+            {
+            User::Leave( KErrDiskFull );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::WriteTailIntoFileL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::WriteTailIntoFileL()
+    {
+    if( iResponseBody )
+        {
+        if( iResponseBody->Length() > 0 )
+            {
+            CheckDiskSpaceL( iResponseBody->Length() );
+            TPtr8 ptrResponseBody = iResponseBody->Des();
+#ifndef RD_UPNP_REMOTE_ACCESS
+            TInt size( 0 );
+            iFile.Size( size );
+            if( size >= 0 )
+                {
+                //transfer succeed, total size can be set to file size
+                //it concerns chunked encoding or HTTP1.0 
+                if ( iFileSizeFromHeader == 0 )
+                    {
+                    iFileSizeFromHeader = size;
+                    }
+                
+#endif //RD_UPNP_REMOTE_ACCESS
+                // Write the data on the disk
+                User::LeaveIfError( iFile.Write( ptrResponseBody ) );
+                
+                delete iResponseBody;
+                iResponseBody = NULL;
+
+                // if the tracking is on send one more progress info
+#ifdef RD_UPNP_REMOTE_ACCESS
+                if ( iProcessedFile->TrackingOn() )
+#else // RD_UPNP_REMOTE_ACCESS
+                if ( iProcessedFile->TrackingOn()  )
+#endif // RD_UPNP_REMOTE_ACCESS
+                    {
+                    iObserver->TransferProgress( iProcessedFile->Key(),
+                                                 iBytesTransferred,
+                                                 iFileSizeFromHeader );
+                    }
+#ifndef RD_UPNP_REMOTE_ACCESS
+                }
+#endif //RD_UPNP_REMOTE_ACCESS
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::HandleResponseDataL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::HandleResponseDataL(
+                                              RHTTPTransaction aTransaction )
+    {
+    MHTTPDataSupplier* pRespBody = aTransaction.Response().Body();
+
+    if( pRespBody )
+        {
+        TPtrC8 dataChunk;
+        pRespBody->GetNextDataPart( dataChunk );
+
+        iSessionTimer->Cancel();
+        iSessionTimer->AfterSeconds( KSessionTimeout );
+
+        // increase the progress counter
+        iBytesTransferred += dataChunk.Length();
+
+        // Allocate memory for the data
+        if( !iResponseBody )
+            {
+            // this is the first call so create the buffer to retain
+            // response data
+            iResponseBody = HBufC8::NewL( iBufferSize );
+            }
+
+        if ( iResponseBody->Length() + dataChunk.Length() > iBufferSize  )
+            {
+            iResponseBody = iResponseBody->ReAllocL(
+                                                iResponseBody->Length() +
+                                                dataChunk.Length() );
+            }
+
+        // Append the new data to the buffer
+        TPtr8 ptrResponseBody = iResponseBody->Des();
+        ptrResponseBody.Append( dataChunk );
+        pRespBody->ReleaseData();
+        // If buffer is full write data to memory card ( to file )
+        if( iResponseBody->Length() > iBufferSize )
+            {
+#ifndef RD_UPNP_REMOTE_ACCESS
+            TInt size( 0 );
+            // if the file handle was not valid
+            User::LeaveIfError( iFile.Size( size ) );
+            if( size >= 0 )
+                {
+#endif // RD_UPNP_REMOTE_ACCESS
+                CheckDiskSpaceL( ptrResponseBody.Length() );
+                User::LeaveIfError( iFile.Write( ptrResponseBody ) );
+                delete iResponseBody;
+                iResponseBody = NULL;
+#ifndef RD_UPNP_REMOTE_ACCESS
+                }                      
+#endif // RD_UPNP_REMOTE_ACCESS
+
+            // Inform observer about the progress if progress tracking is on
+#ifdef RD_UPNP_REMOTE_ACCESS
+            if ( iProcessedFile->TrackingOn() )
+#else // RD_UPNP_REMOTE_ACCESS
+            if ( iProcessedFile->TrackingOn()  )
+#endif // RD_UPNP_REMOTE_ACCESS
+                {
+                iObserver->TransferProgress( iProcessedFile->Key(),
+                                             iBytesTransferred,
+                                             iFileSizeFromHeader );
+                }
+            }
+        }
+
+    else
+        {
+        aTransaction.Close();
+
+        // Remove remains of the file from the file system
+        delete iProcessedFile;
+        iProcessedFile = NULL;
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::HTTPGetL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::HttpGetL()
+    {
+    // if URI is null -> leave
+    if ( !iProcessedFile->Uri() )
+        {
+        User::Leave( KErrArgument );
+        }
+
+    TUriParser8 uri;
+    User::LeaveIfError( uri.Parse( *( iProcessedFile->Uri() ) ) );
+
+    RStringF method;
+    method = iStringPool.StringF( HTTP::EGET, RHTTPSession::GetTable() );
+
+    iHttpTransaction = iSession.OpenTransactionL( uri, *this, method );
+    RHTTPHeaders hdr = iHttpTransaction.Request().GetHeaderCollection();
+
+    SetHeaderL( hdr, HTTP::EUserAgent, KModuleName );
+
+    //Set the property of upnphttptransfer to ENotifyOnDisconnect
+    //Set the property of HTTP Transaction to EEnableDisconnectNotification
+    //The MHFRunL can get the really http error.
+    iHttpTransaction.PropertySet().SetPropertyL(
+        iSession.StringPool().StringF(
+            HTTP::ENotifyOnDisconnect,RHTTPSession::GetTable()),
+            iSession.StringPool().StringF(
+                HTTP::EEnableDisconnectNotification,
+                RHTTPSession::GetTable() ));
+
+    // Sets extra headers
+    RPointerArray<CHttpHeader> headerArray = iProcessedFile->Headers();
+    for ( TInt i = 0; i < headerArray.Count(); i++ )
+        {
+        SetHeaderL( hdr,
+                    headerArray[i]->FieldName(),
+                    headerArray[i]->FieldValue() );
+        }
+
+    // Now will get events in MHFRunL
+    iHttpTransaction.SubmitL();
+
+    //set timer
+    iSessionTimer->Cancel();
+    iSessionTimer->AfterSeconds( KSessionTimeout );
+
+    method.Close();
+
+    // Change state of the state machine
+    iProcessState = EHttpGetSent;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::FinishDownload()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::FinishDownload( RHTTPTransaction aTransaction )
+    {
+    // close transaction
+    aTransaction.Close();
+
+    delete iResponseBody;
+    iResponseBody = NULL;
+    
+    // change state
+    iProcessState = EHttpTransactionIdle;
+    iProcessedFile->CloseFile(); 
+    iFile.Close();
+
+    // inform observers
+    iObserver->TransferCompleted( iProcessedFile->Key(), KErrNone );
+
+    delete iProcessedFile;
+    iProcessedFile = NULL;
+    
+    // inform the worker observer
+    iCallback->WorkerCompleted();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::CompleteAndNotify()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::CompleteAndNotifyL( TInt aError )
+    {
+    iSessionTimer->Cancel();
+    iHttpTransaction.Cancel();
+    iHttpTransaction.Close();
+    iObserver->TransferCompleted( iProcessedFile->Key(), aError );
+
+    delete iResponseBody;
+    iResponseBody = NULL;
+    iProcessState = EHttpTransactionIdle;
+    iCallback->WorkerCompleted();
+
+    iFile.Close();
+    iProcessedFile->DeleteFileFromFileSystemL();
+    delete iProcessedFile;
+    iProcessedFile = NULL;
+    }
+
+
+// from base class CHttpTransferWorker
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::CancelTransfer()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::CancelTransfer()
+    {
+    iSessionTimer->Cancel();
+    // if transfer has not been started yet
+    if ( iProcessState == EHttpWaitingForStart )
+        {
+        delete iProcessedFile;
+        iProcessedFile = NULL;
+
+        iProcessState = EHttpTransactionIdle;
+        iCallback->WorkerCompleted();
+        }
+    // if process is finished do nothing
+    else if ( iProcessState != EHttpTransactionIdle )
+        {
+        iHttpTransaction.Cancel();
+        iHttpTransaction.Close();
+
+        delete iResponseBody;
+        iResponseBody = NULL;
+        iProcessState = EHttpTransactionIdle;
+        iCallback->WorkerCompleted();
+
+        iFile.Close();
+        TRAP_IGNORE( iProcessedFile->DeleteFileFromFileSystemL() )
+        delete iProcessedFile;
+        iProcessedFile = NULL;
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::StartProcessL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::StartProcessL()
+    {
+    CHttpTransferWorker::StartProcessL();
+
+    iProcessedFile->CreateFileInFileSystemL();
+
+    // File creation succeeded -> handle available
+    User::LeaveIfError( iFile.Duplicate( iProcessedFile->FileHandle() ) );
+
+    // Perform HTTP GET
+    HttpGetL();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::MHFRunL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::MHFRunL( RHTTPTransaction aTransaction,
+                                   const THTTPEvent& aEvent )
+    {
+    //set timer
+    iSessionTimer->Cancel();
+
+    // event handler
+    switch (aEvent.iStatus)
+        {
+        // Response headers received
+        case THTTPEvent::EGotResponseHeaders:
+            {
+            // accept all 'Successful' range of codes 2xx
+            TInt status = aTransaction.Response().StatusCode();
+            if ( !( ( status >= HTTPStatus::EOk ) &&
+                    ( status <  HTTPStatus::EMultipleChoices ) ) )
+                {
+                // calls MHFRunError
+                User::Leave( aTransaction.Response().StatusCode() );
+                }
+
+            else if ( iProcessState == EHttpGetSent )
+                {
+                RHTTPHeaders header =
+                           aTransaction.Response().GetHeaderCollection();
+                RStringF field;
+                field = iStringPool.StringF( HTTP::EContentLength,
+                                             RHTTPSession::GetTable() );
+                THTTPHdrVal value;
+
+                // Get value of the content-length field.
+                // Value is represented in bytes.
+                if ( header.GetField( field, 0, value ) == KErrNone )
+                    {
+                    // Set the value to filesize
+                    iFileSizeFromHeader = value.Int();
+                    }
+                else
+                    {
+                    // If the Content-Length is not defined
+                    // in case chunked encoding or HTTP1.0 
+                    // Set the iFileSizeFromHeader to zero
+                    iFileSizeFromHeader = 0;
+                    }
+
+                iBytesTransferred = 0;
+
+                iProcessState = EHttpGetResponseReceived;
+                }
+            iSessionTimer->AfterSeconds( KSessionTimeout );
+            break;
+            }
+
+        // Response body data received
+        // This is only entered when state is EHttpGetResponseReceived
+        //   --> no need to check state
+        case THTTPEvent::EGotResponseBodyData:
+            {
+            // handle body data
+            // Informs the observer as well
+            HandleResponseDataL( aTransaction );
+
+            break;
+            }
+
+        // Response completed
+        case THTTPEvent::EResponseComplete:
+            {
+            // Get response was completed
+            if ( iProcessState == EHttpGetResponseReceived )
+                {
+                // Write last part of the buffer to file ( if exists )
+                WriteTailIntoFileL();
+                }
+
+            break;
+            }
+
+        // Transaction succeeded
+        case THTTPEvent::ESucceeded:
+            {
+            if ( iProcessState == EHttpGetResponseReceived )
+                {
+                // Finish download
+                FinishDownload( aTransaction );
+                }
+
+            break;
+            }
+
+        // Transaction failed
+        case THTTPEvent::EFailed:
+            {
+            CompleteAndNotifyL( KErrGeneral );
+            break;
+            }
+
+        default:
+            {
+            if ( aEvent.iStatus < 0 )
+                {
+                CompleteAndNotifyL( aEvent.iStatus );
+                }
+            else
+                {
+                CompleteAndNotifyL( KErrGeneral );
+                }
+            break;
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::MHFRunError()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TInt CHttpDownloadWorker::MHFRunError( TInt aError,
+                                       RHTTPTransaction /*aTransaction*/,
+                                       const THTTPEvent& /*aEvent*/ )
+    {
+    // if the HTTP server responds with HTTP error code the aError variable
+    // contains the code which is above zero, changed to KErrGeneral
+    if ( aError > 0 )
+        {
+        aError = KErrGeneral;
+        }
+
+    TRAP_IGNORE( CompleteAndNotifyL( aError ) )
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CHttpDownloadWorker::TimerEventL
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//
+void CHttpDownloadWorker::TimerEventL( CHttpNotifyTimer* /*aTimer*/ )
+    {
+    CompleteAndNotifyL( KErrTimedOut );
+    }
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httpfile.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,374 @@
+/** @file
+* 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:  Represents one downloadable file
+*
+*/
+
+
+// User include files
+#include "httpfile.h"
+
+// Constants
+_LIT(KUnderScore, "_");
+const TUint KMaxSameFileNames = 1000;
+const TUint KSpaceForNumber = 5; // underscore + 4 digits
+const TUint KFinishFileCreationLoop = 1001;
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// CHttpFile::CHttpFile()
+// --------------------------------------------------------------------------
+//
+CHttpFile::CHttpFile( TAny* aKey )
+    {
+    iKey = aKey;
+    iPath = NULL;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::CHttpFile()
+// --------------------------------------------------------------------------
+//
+CHttpFile::CHttpFile( TAny* aKey, const RFile& aFileHandle )
+    {
+    iKey = aKey;
+    iPath = NULL;
+    iFile.Duplicate( aFileHandle );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::ConstructL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpFile::ConstructL( const TDesC8& aUri, const TDesC& aPath )
+    {
+    SetUriL( aUri );
+
+    iPath = aPath.AllocL();
+    
+    User::LeaveIfError( iFsSession.Connect() );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::ConstructL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpFile::ConstructL( const TDesC8& aUri )
+    {
+    SetUriL( aUri );
+    }
+// --------------------------------------------------------------------------
+// CHttpFile::NewL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpFile* CHttpFile::NewL( TAny* aKey, 
+                            const TDesC8& aUri, 
+                            const TDesC& aPath )
+    {
+    CHttpFile* self = CHttpFile::NewLC( aKey, aUri, aPath );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::NewLC()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpFile* CHttpFile::NewLC( TAny* aKey, 
+                             const TDesC8& aUri, 
+                             const TDesC& aPath )
+    {
+    CHttpFile* self = new( ELeave ) CHttpFile( aKey );
+    CleanupStack::PushL( self );
+    self->ConstructL( aUri, aPath );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::NewL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpFile* CHttpFile::NewL( TAny* aKey, const TDesC8& aUri,
+                            const RFile& aFileHandle )
+    {
+    CHttpFile* self = CHttpFile::NewLC( aKey, aUri, aFileHandle );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::NewLC()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpFile* CHttpFile::NewLC( TAny* aKey, const TDesC8& aUri, 
+                             const RFile& aFileHandle )
+    {
+    CHttpFile* self = new( ELeave ) CHttpFile( aKey, aFileHandle );
+    CleanupStack::PushL( self );
+    self->ConstructL( aUri );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::~CHttpFile()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpFile::~CHttpFile()
+    {
+    iFile.Close();
+    delete iUri;
+    delete iPath;
+    iHeaderArray.ResetAndDestroy();
+
+    iFsSession.Close();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::TrackProgress()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpFile::TrackProgress( TBool aValue ) 
+    {
+    iTrackProgress = aValue;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::TrackingOn()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TBool CHttpFile::TrackingOn() const
+    {
+    return iTrackProgress;    
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::Key()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TAny* CHttpFile::Key() const
+    {
+    return iKey;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::Uri()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+const HBufC8* CHttpFile::Uri() const
+    {
+    return iUri;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::SetUriL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpFile::SetUriL( const TDesC8& aUri )
+    {
+    HBufC8* uri = aUri.AllocL();
+    delete iUri;
+    iUri = uri;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::Path()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+const HBufC* CHttpFile::Path() const
+    {
+    return iPath;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::FileHandle()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+RFile CHttpFile::FileHandle() const
+    {
+    return iFile;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::SetHeaderL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpFile::SetHeaderL( const TDesC8& aFieldName, 
+                            const TDesC8& aFieldValue )
+    {
+    // if the fieldname already exists ( header already set ) -> leave
+    for ( TInt i = 0; i < iHeaderArray.Count(); i++ )
+        {
+        if ( iHeaderArray[i]->FieldName().CompareF( aFieldName ) == 0 )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    iHeaderArray.Append( CHttpHeader::NewL( aFieldName, aFieldValue ) );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::Headers()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+RPointerArray<CHttpHeader>& CHttpFile::Headers()
+    {
+    return iHeaderArray;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::CreateFileInFileSystem()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpFile::CreateFileInFileSystemL()
+    {
+    TInt ret = KErrNone;
+
+    if ( iPath )
+        {
+        // Check first that the drive exists
+        TInt driveNum;
+        TParse p;
+		p.Set( *iPath, NULL, NULL ); 
+		TPtrC pointer = p.Drive(); 
+		TLex lineParser( pointer.Ptr() ); 
+		TChar ch = lineParser.Get(); 
+		
+		User::LeaveIfError( iFsSession.CharToDrive( ch, driveNum) );
+
+		TVolumeInfo volumeInfo;
+        User::LeaveIfError( iFsSession.Volume( volumeInfo, driveNum ) );
+
+        // Create the file in the file system
+        ret = iFile.Create( iFsSession, *iPath, EFileWrite );
+
+        // Directory not available => create one
+        if( KErrPathNotFound == ret )
+            {
+            // Make directory
+            // Creates the directory and ignores the filename
+            iFsSession.MkDirAll( *iPath );
+            ret = iFile.Create( iFsSession, *iPath, EFileWrite );
+            }
+
+        // File already exists
+        // File has to be renamed to 
+        // <oldfilename>_<number>.<old_file_extension>
+        // number will increase if same file is loaded many times
+        else if( KErrAlreadyExists  == ret )
+            {
+            TParse parseFilename;
+
+            parseFilename.Set( *iPath, NULL, NULL );
+
+            HBufC* name = NULL;
+
+            for ( TInt count = 1; count < KMaxSameFileNames; count++ )
+                {
+                // KSpaceForNumber is meant for underscore and number
+                name = HBufC::NewLC( iPath->Length() + 
+                                     KSpaceForNumber );
+
+                TBuf<KSpaceForNumber> value;
+                value.Num( count );
+
+                name->Des().Append( parseFilename.DriveAndPath() );
+                name->Des().Append( parseFilename.Name() );    
+                name->Des().Append( KUnderScore() );
+                name->Des().Append( value );
+                name->Des().Append( parseFilename.Ext() );
+
+                ret = iFile.Create( iFsSession, *name, EFileWrite );
+
+                // If the file already exists make a new loop
+                if ( ret == KErrAlreadyExists )
+                    {
+                    CleanupStack::PopAndDestroy( name );
+                    name = NULL;
+                    }
+                // if file creation succeeded
+                else if ( ret == KErrNone )
+                    {
+                    delete iPath;
+                    iPath = name;
+                    CleanupStack::Pop( name );
+                    
+                    count = KFinishFileCreationLoop;
+                    }
+                else
+                    {
+                    CleanupStack::PopAndDestroy( name );
+                    
+                    count = KFinishFileCreationLoop;
+                    }
+                }
+            }
+        }
+
+    if( ret != KErrNone ) 
+        {
+        User::Leave( ret );
+        }
+
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::DeleteFileFromFileSystemL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpFile::DeleteFileFromFileSystemL()
+    {
+    // Close filehandle before delete
+    iFile.Close();
+
+    // Delete the file
+    if ( iPath )
+        {
+        CFileMan* fileMan = CFileMan::NewL( iFsSession );
+        CleanupStack::PushL( fileMan );
+        User::LeaveIfError( fileMan->Delete( iPath->Des() ) );
+        CleanupStack::PopAndDestroy( fileMan );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpFile::CloseFile()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpFile::CloseFile()
+    {
+    iFile.Close();
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httpheader.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,87 @@
+/** @file
+* 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:  Represents one header in transferred file
+*
+*/
+
+
+
+#include "httpheader.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// CHttpHeader::CHttpHeader()
+// --------------------------------------------------------------------------
+//
+CHttpHeader::CHttpHeader() 
+    {
+    iFieldName = NULL;
+    iFieldValue = NULL;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpHeader::~CHttpHeader()
+// --------------------------------------------------------------------------
+//
+CHttpHeader::~CHttpHeader()
+    {
+    delete iFieldName;
+    delete iFieldValue;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpHeader::ConstructL()
+// --------------------------------------------------------------------------
+//
+void CHttpHeader::ConstructL( const TDesC8& aFieldName, 
+                              const TDesC8& aFieldValue )
+    {
+    iFieldName = aFieldName.AllocL();
+    iFieldValue = aFieldValue.AllocL();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpHeader::NewL()
+// --------------------------------------------------------------------------
+//
+CHttpHeader* CHttpHeader::NewL( const TDesC8& aFieldName, 
+                                const TDesC8& aFieldValue )
+    {
+    CHttpHeader* self = new( ELeave ) CHttpHeader();
+    CleanupStack::PushL( self );
+    self->ConstructL( aFieldName, aFieldValue );
+    CleanupStack::Pop( self );
+    return self;    
+    }
+
+// --------------------------------------------------------------------------
+// CHttpHeader::FieldName()
+// --------------------------------------------------------------------------
+//
+const TDesC8& CHttpHeader::FieldName()
+    {
+    return *iFieldName;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpHeader::FieldValue()
+// --------------------------------------------------------------------------
+//
+const TDesC8& CHttpHeader::FieldValue()
+    {
+    return *iFieldValue;
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httpnotifytimer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,123 @@
+/** @file
+* 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:  Session timeout
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "httpnotifytimer.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CHttpNotifyTimer::CHttpNotifyTimer
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+CHttpNotifyTimer::CHttpNotifyTimer(MHttpNotifyTimerObserver* aObserver)
+	: CActive(EPriorityStandard)
+	{	
+	CActiveScheduler::Add(this);
+	iObserver = aObserver;
+	}
+
+// ----------------------------------------------------------------------------
+// CHttpNotifyTimer::NewL
+// -----------------------------------------------------------------------------
+//
+CHttpNotifyTimer* CHttpNotifyTimer::NewL(MHttpNotifyTimerObserver* aObserver)
+    {
+    CHttpNotifyTimer* self  = new (ELeave) CHttpNotifyTimer(aObserver);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CHttpNotifyTimer::ConstructL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+void CHttpNotifyTimer::ConstructL()
+    {
+    TInt err = iTimer.CreateLocal();
+    if ( KErrNone != err )
+        {
+        User::Leave( err );
+        }
+    }
+// -----------------------------------------------------------------------------
+// CHttpNotifyTimer::~CHttpNotifyTimer
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CHttpNotifyTimer::~CHttpNotifyTimer()
+	{
+	iObserver=NULL;
+	Cancel();
+	iTimer.Close();
+	}
+
+// -----------------------------------------------------------------------------
+// CHttpNotifyTimer::AfterSeconds
+// Start timer
+// -----------------------------------------------------------------------------
+//
+void CHttpNotifyTimer::AfterSeconds( TInt aIntervalInSeconds )
+	{
+	if ( !IsActive() )
+		{
+		TUint32 microsec = aIntervalInSeconds * KSecond;
+		iTimer.After( iStatus, microsec );
+		SetActive();
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CHttpNotifyTimer::RunL
+// Timer RunL
+// -----------------------------------------------------------------------------
+//
+void CHttpNotifyTimer::RunL()
+	{
+	if ( iObserver )
+	    {
+	    TRAP_IGNORE( iObserver->TimerEventL( this ) );
+	    }
+	}
+
+// -----------------------------------------------------------------------------
+// CHttpNotifyTimer::RunError
+// RunError in case RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CHttpNotifyTimer::RunError( TInt /*aError*/ )
+	{
+    return KErrNone;
+	}
+
+// -----------------------------------------------------------------------------
+// CHttpNotifyTimer::DoCancel
+// Timer DoCanel for active timers
+// -----------------------------------------------------------------------------
+//
+void CHttpNotifyTimer::DoCancel()
+	{
+	iTimer.Cancel();
+	}
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httptransferbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,605 @@
+/** @file
+* 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:  Base class for downloader / uploader classes
+*
+*/
+
+
+// System include files
+#include <escapeutils.h>
+
+// User include files
+#include "httptransferbase.h"
+#include "httptransferobserver.h"
+#include "httpfile.h"
+#include "httptransferworker.h"
+#include "httpworkerobserver.h"
+
+// Definitions
+enum TTransferStates 
+    {
+    ETransferNextFile
+    };
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::CHttpTransferBase()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpTransferBase::CHttpTransferBase() : CActive( EPriorityStandard ) 
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::~CHttpTransferBase()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpTransferBase::~CHttpTransferBase()
+    {
+    if( IsActive() )
+        {
+        CActive::Cancel();
+        }
+
+    // Reset array and destroy all the items in it
+    iFileQueue.ResetAndDestroy();
+    iWorkerArray.ResetAndDestroy();
+    iWaitQueue.ResetAndDestroy();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::CancelAll
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpTransferBase::CancelAll()
+    {
+    // Reset arrays and destroy all the items in them
+    iFileQueue.ResetAndDestroy();
+    iWaitQueue.ResetAndDestroy();
+
+    for( TInt i=0; i < iWorkerArray.Count(); i++ )
+        {
+        if ( iWorkerArray[i]->ProcessOnGoing() )
+            {
+            iWorkerArray[i]->CancelTransfer();
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::Cancel
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C TInt CHttpTransferBase::CancelTransfer( TAny* aKey )
+    {
+    TInt retval = KErrNotFound;
+
+    // Find the item corresponding aKey and delete it and
+    // remove from the wait queue
+    for ( TInt i = 0; i < iWaitQueue.Count(); i++ )
+        {
+        if ( iWaitQueue[i]->Key() == aKey )
+            {
+            retval = KErrNone;
+            delete iWaitQueue[i];
+            iWaitQueue.Remove(i);
+            iWaitQueue.Compress();
+            }
+        }
+
+    // Find the item corresponding aKey and delete it and
+    // remove from the file queue
+    for ( TInt i = 0; i < iFileQueue.Count(); i++ )
+        {
+        if ( iFileQueue[i]->Key() == aKey )
+            {
+            retval = KErrNone;
+            delete iFileQueue[i];
+            iFileQueue.Remove(i);
+            iFileQueue.Compress();
+            }
+        }
+
+    // Check if some of the ongoing processes has to be canceled
+    for ( TInt i = 0; i < iWorkerArray.Count(); i++ )
+        {
+        if ( iWorkerArray[i]->ProcessOnGoing() )
+            {
+            if ( iWorkerArray[i]->Key() == aKey )
+                {
+                retval = KErrNone;
+                iWorkerArray[i]->CancelTransfer();
+                }
+            }
+        }
+
+    return retval;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::TrackProgress
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C TInt CHttpTransferBase::TrackProgress( TAny* aKey, TBool aValue )
+    {
+    TInt retval = KErrNotFound;
+
+    // Find the corresponding file from iWaitQueue
+    for ( TInt i = 0; i < iWaitQueue.Count(); i++ )
+        {
+        if ( iWaitQueue[i]->Key() == aKey )
+            {
+            retval = KErrNone;
+            iWaitQueue[i]->TrackProgress( aValue );
+            }
+        }
+
+    // Find the corresponding instance of CHttpFile from iFileQueue and
+    // switch the tracking of the progress on
+    for ( TInt i = 0; i < iFileQueue.Count(); i++)
+        {
+        if ( iFileQueue[i]->Key() == aKey )
+            {
+            retval = KErrNone;
+            iFileQueue[i]->TrackProgress( aValue );
+            }
+        }
+
+    // Check if processed files have to be tracked
+    for ( TInt i = 0; i < iWorkerArray.Count(); i++ )
+        {
+        if ( iWorkerArray[i]->ProcessOnGoing() && 
+             iWorkerArray[i]->Key() == aKey ) 
+            {
+            retval = KErrNone;
+            iWorkerArray[i]->TrackProgress( aValue );    
+            }
+        }
+
+    return retval;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::SetHeaderL
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//    
+EXPORT_C void CHttpTransferBase::SetHeaderL( TAny* aKey,
+                                             const TDesC8& aFieldName, 
+                                             const TDesC8& aFieldValue )
+    {
+    TBool keyExists = EFalse;
+
+    // Go through iWaitQueue and if there is file mathich the key set headers
+    for ( TInt i = 0; i < iWaitQueue.Count(); i++ )
+        {
+        if ( iWaitQueue[i]->Key() == aKey )
+            {
+            keyExists = ETrue;
+            iWaitQueue[i]->SetHeaderL( aFieldName, aFieldValue );
+            }
+        }
+
+    // Go through workers and set the headers to the downloaded file which
+    // has matching key
+    for ( TInt i = 0; i < iWorkerArray.Count(); i++ )
+        {
+        if ( iWorkerArray[i]->Key() == aKey )
+            {
+            // if the worker is not waiting -> leave
+            if ( !iWorkerArray[i]->IsWaiting() )
+                {
+                User::Leave( KErrGeneral );
+                }
+
+            ( iWorkerArray[i]->ProcessedFile() )->
+                           SetHeaderL( aFieldName, aFieldValue );
+            keyExists = ETrue;
+            }
+        }
+
+    if ( !keyExists )
+        {
+        User::Leave( KErrNotFound );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::CreateAndQueueHttpFile()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferBase::CreateAndQueueHttpFileL( const TDesC8& aUri,
+                                                 const TDesC& aTargetPath,
+                                                 TAny* aKey )
+    {
+    CHttpFile* httpfile = CHttpFile::NewL( aKey, aUri, aTargetPath );
+    iFileQueue.Append( httpfile );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::CreateAndQueueHttpFile()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferBase::CreateAndQueueHttpFileL( const TDesC8& aUri,
+                                                 const RFile& aFileHandle,
+                                                 TAny* aKey )
+    {
+    CHttpFile* httpfile = CHttpFile::NewL( aKey, aUri, aFileHandle );
+    iFileQueue.Append( httpfile );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::NextFile
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpFile* CHttpTransferBase::NextFile()
+    {
+    CHttpFile* newFile = NULL;
+
+    // If iFileQueue has files
+    if ( iFileQueue.Count() > 0 )
+        {
+        // Set the new processed file
+        newFile = iFileQueue[0];
+
+        // Set the queue
+        iFileQueue.Remove(0);
+        iFileQueue.Compress();
+        }
+
+    return newFile;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::StartTransferL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpTransferBase::StartTransferL( TAny* aKey )
+    {
+    TBool keyExists = EFalse;
+
+    // go through workerarray and if there is worker which has 
+    // corresponding key -> start the transfer
+    for(TInt i=0; i < iWorkerArray.Count(); i++ )
+        {
+        if ( iWorkerArray[i]->Key() == aKey )
+            {
+            iWorkerArray[i]->StartProcessL();
+            keyExists = ETrue;
+            }
+        }
+
+    // Leave if the key does not exist
+    if ( !keyExists )
+        {
+        User::Leave( KErrNotFound );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::SetProperty()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpTransferBase::SetPropertyL( TAny* aKey,
+                                               THttpPropertyType aProperty, 
+                                               const TDesC& aValue )
+    {
+
+    switch ( aProperty )
+        {
+        // This case is used to set targetUri. This is used in upnp upload
+        case ETargetURI:
+            {
+            TBool keyExists = EFalse;
+            HBufC8* uri = EscapeUtils::ConvertFromUnicodeToUtf8L( aValue );
+            CleanupStack::PushL( uri );
+
+            for ( TInt i=0; i < iWorkerArray.Count(); i++ )
+                {
+                if ( iWorkerArray[i]->Key() == aKey )
+                    {
+                    ( iWorkerArray[i]->ProcessedFile() )->
+                                                    SetUriL( uri->Des() );
+                    keyExists = ETrue;
+                    }
+                }
+
+            CleanupStack::PopAndDestroy( uri );
+
+            // the key was not found
+            if ( !keyExists )
+                {
+                User::Leave( KErrNotFound );
+                }
+
+            break;
+            }
+
+        default:
+            {
+            
+            break;
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::GetPropertyL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C const HBufC* CHttpTransferBase::GetPropertyL( 
+                                                TAny* aKey,
+                                                THttpPropertyType aProperty )
+    {
+    const HBufC* retval = NULL;
+
+    switch ( aProperty )
+        {
+        // Client can receive the path of the transferred file using this
+        case ETargetPath:
+            {
+            TBool keyExists = EFalse;
+
+            // Goes through workerarray and returns the path of the file
+            // which matches the key
+            for ( TInt i = 0; i < iWorkerArray.Count(); i++ )
+                {
+                if ( iWorkerArray[i]->Key() == aKey )
+                    {
+                    retval = iWorkerArray[i]->Path();
+                    keyExists = ETrue;
+                    }
+                }
+
+            // the key was not found
+            if ( !keyExists )
+                {
+                User::Leave( KErrNotFound );
+                }
+
+            break;
+            }
+
+        default:
+            {
+            
+            break;
+            }
+        }
+
+    return retval;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::InsertFileIntoWaitQueueL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpTransferBase::InsertFileIntoWaitQueueL(
+                                                    TAny* aKey,
+                                                    const TDesC& aTargetPath,
+                                                    const TDesC8& aUri )
+    {
+    // Checks first if the key already exists in iWaitQueue or in iFileQueue
+    // if does -> leave
+    for ( TInt i = 0; i < iWaitQueue.Count(); i++ )
+        {
+        if ( iWaitQueue[i]->Key() == aKey )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    for ( TInt i = 0; i < iFileQueue.Count(); i++ )
+        {
+        if ( iFileQueue[i]->Key() == aKey )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    // if key is valid create CHttpFile and insert it to iWaitQueue
+    CHttpFile* httpfile = CHttpFile::NewL( aKey, aUri, aTargetPath );
+    iWaitQueue.Append( httpfile );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::InsertFileIntoWaitQueueL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpTransferBase::InsertFileIntoWaitQueueL(
+                                                    TAny* aKey,
+                                                    const RFile& aFileHandle,
+                                                    const TDesC8& aUri )
+    {
+    // Checks first if the key already exists in iWaitQueue or in iFileQueue
+    // if does -> leave
+    for ( TInt i = 0; i < iWaitQueue.Count(); i++ )
+        {
+        if ( iWaitQueue[i]->Key() == aKey )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    for ( TInt i = 0; i < iFileQueue.Count(); i++ )
+        {
+        if ( iFileQueue[i]->Key() == aKey )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    // if key is valid create CHttpFile and insert it to iWaitQueue
+    CHttpFile* httpfile = CHttpFile::NewL( aKey, aUri, aFileHandle );
+    iWaitQueue.Append( httpfile );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::MoveToFileQueue()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpTransferBase::MoveToTransferQueueL( TAny* aKey )
+    {
+    TBool keyExists = EFalse;
+    CHttpFile* waitFile = NULL;
+
+    for ( TInt i = 0; i < iWaitQueue.Count(); i++ )
+        {
+        if ( iWaitQueue[i]->Key() == aKey )
+            {
+            keyExists = ETrue;
+
+            // Removes the file from iWaitQueue
+            waitFile = iWaitQueue[i];
+
+            // Set the queue
+            iWaitQueue.Remove(i);
+            iWaitQueue.Compress();
+            }
+        }
+
+    // If the key does not exist -> leaves
+    if ( !keyExists )
+        {
+        User::Leave( KErrNotFound );
+        }
+
+    // Appends the file to iFileQueue
+    iFileQueue.Append( waitFile );
+
+    // start the transfer
+    ActivateNewTransferRequest();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::ActivateNewTransferRequest()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferBase::ActivateNewTransferRequest()
+    {
+    if ( !IsActive() )
+        {
+        SetActive();
+        TRequestStatus* pStatus = &iStatus;
+        User::RequestComplete( pStatus, ETransferNextFile );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::ProcessNextFileL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferBase::ProcessNextFileL()
+    {
+    // Check that there is workers available
+    for ( TInt i = 0; i < iWorkerArray.Count(); i++ )
+        {
+        if ( !iWorkerArray[i]->ProcessOnGoing() )
+            {
+            CHttpFile* nextFile = NULL;
+
+            nextFile = NextFile();
+
+            if ( nextFile )
+                {
+                // sets the file and sets the state to EWaitingForStart
+                iWorkerArray[i]->SetFileL( *nextFile );
+
+                // Set worker which is handled to pointer so that 
+                // if it leaves the worker can be terminated
+                iActiveWorker = iWorkerArray[i];
+
+                iObserver->ReadyForTransferL( nextFile->Key() );
+
+                iActiveWorker = NULL;
+                }
+            }
+        }
+    }
+
+
+// From base class CActive
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::DoCancel()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferBase::DoCancel()
+    {
+    CancelAll();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::RunL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferBase::RunL()
+    {
+    ProcessNextFileL();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::RunError()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TInt CHttpTransferBase::RunError( TInt aError )
+    {
+    // Terminate worker which leaved
+    if ( iActiveWorker )
+        {
+        // Cancels the transfer and 
+        // informs the client through TransferCompleted()
+        iObserver->TransferCompleted( iActiveWorker->Key(), aError );
+        iActiveWorker->CancelTransfer();
+        iActiveWorker = NULL;
+        }
+
+    return KErrNone;
+    }
+
+
+// From base class MHttpWorkerObserver
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::ProcessNextFileL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferBase::WorkerCompleted()
+    {
+    ActivateNewTransferRequest();
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httptransfertimer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,106 @@
+/** @file
+* 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:  Implementation of the class CHttpTransferTimer.
+*
+*/
+
+
+// User include files
+#include "httptransfertimer.h"
+#include "httptransfertimerobserver.h"
+
+// --------------------------------------------------------------------------
+// CHttpTransferTimer::NewL
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpTransferTimer* CHttpTransferTimer::NewL( 
+                                      TInt aInterval,
+                                      MHttpTransferTimerObserver* aCallback )
+    {
+    CHttpTransferTimer* self = new (ELeave) 
+                                CHttpTransferTimer( aInterval, aCallback );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferTimer::CHttpTransferTimer
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpTransferTimer::CHttpTransferTimer( 
+                                       TInt aInterval,
+                                       MHttpTransferTimerObserver* aCallback)
+    {
+    iInterval = aInterval;
+    iCallback = aCallback;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferTimer::ConstructL
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferTimer::ConstructL()
+    {
+
+    // Create CHeartbeat object
+    iHeartbeat = CHeartbeat::NewL( EPriorityLow );
+
+    iCounter = 0;
+
+    // Start the heartbeat timer (beating on every second)
+    iHeartbeat->Start( ETwelveOClock, this );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferTimer::~CHttpTransferTimer()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpTransferTimer::~CHttpTransferTimer()
+    {
+    // Cancel any outstanding request
+    if( iHeartbeat )
+        {
+        iHeartbeat->Cancel();
+        delete iHeartbeat;
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferTimer::Beat()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferTimer::Beat()
+    {
+    // Increase heartbeat counter
+    iCounter++;
+
+    // If interval is reached, do the call back
+    if( iCounter == iInterval )
+        {
+        if( iCallback )
+            {
+            iCallback->TimerCallback();
+            }
+        iCounter = 0;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httptransferworker.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,308 @@
+/** @file
+* 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:  Base class for download / upload worker classes
+*
+*/
+
+
+// System include files
+#include <commdbconnpref.h>
+#include <es_sock.h>
+#include <stringpool.h>
+#include <f32file.h>
+
+// User include files
+#include "httptransferworker.h"
+#include "httptransfertimer.h"
+
+// Constants
+const TUint K30Sec = 30;
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::ConstructL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferWorker::ConstructL()
+    {
+    // Open HTTP session
+    iSession.OpenL();
+
+    // Store the string pool for this HTTP session
+    iStringPool = iSession.StringPool();
+
+    // Connect to file server
+    User::LeaveIfError( iFsSession.Connect() );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::~CHttpTransferBase()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpTransferWorker::~CHttpTransferWorker()
+    {
+
+    if ( iProcessState != EHttpTransactionIdle )
+        {
+        iHttpTransaction.Close();
+        iFile.Close();
+        }
+
+    // Close HTTP session
+    if( &iSession )
+        {
+        iSession.Close();
+        }
+
+    // Closes the connection
+    delete iConnectionManagerProxy;
+
+    // Close file server session
+    iFsSession.Close();
+
+    // Close connection to the socket server
+    iSocketServer.Close();
+
+    
+    delete iProcessedFile;
+    iProcessedFile = NULL;
+
+    delete iTimer;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::ConnectL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferWorker::ConnectL()
+    {
+    User::LeaveIfError( iSocketServer.Connect() );
+
+    iConnectionManagerProxy = CUpnpConnectionManagerProxy::NewL( iSocketServer );
+    User::LeaveIfError( iConnectionManagerProxy->EnsureStart() );
+
+    RHTTPConnectionInfo connInfo = iSession.ConnectionInfo();
+
+    //Attach to socket server
+    connInfo.SetPropertyL( iStringPool.StringF(HTTP::EHttpSocketServ,
+                            RHTTPSession::GetTable() ),
+                            THTTPHdrVal(iSocketServer.Handle() ) );
+
+    //Attach to connection
+    TInt connPtr = reinterpret_cast<TInt>( &iConnectionManagerProxy->ConnectionL() );
+    connInfo.SetPropertyL( iStringPool.StringF(
+                            HTTP::EHttpSocketConnection,
+                            RHTTPSession::GetTable() ),
+                            THTTPHdrVal(connPtr) );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::SetFile()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferWorker::SetFileL( CHttpFile& aFile )
+    {
+    // if iProcessedFile is not deleted yet for some reason
+    //  --> delete it
+    delete iProcessedFile;
+
+    iProcessedFile = &aFile;
+
+    iProcessState = EHttpWaitingForStart;
+
+    // Create and start the timer
+    delete iTimer;
+    iTimer = NULL;
+    iTimer = CHttpTransferTimer::NewL( K30Sec, this );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::StartProcessL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferWorker::StartProcessL()
+    {
+    delete iTimer;
+    iTimer = NULL;
+    }
+
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::TrackProgress()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferWorker::TrackProgress( TBool aValue )
+    {
+    if ( iProcessedFile )
+        {
+        iProcessedFile->TrackProgress( aValue );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::Key()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TAny* CHttpTransferWorker::Key() const
+    {
+    TAny* retval = NULL;
+
+    if ( iProcessedFile )
+        {
+        retval = iProcessedFile->Key();
+        }
+
+    return retval;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::Uri()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+const HBufC8* CHttpTransferWorker::Uri() const
+    {
+    const HBufC8* retval = NULL;
+
+    if ( iProcessedFile )
+        {
+        retval = iProcessedFile->Uri();
+        }
+
+    return retval;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::Path()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+const HBufC* CHttpTransferWorker::Path() const
+    {
+    const HBufC* retval = NULL;
+
+    if ( iProcessedFile )
+        {
+        retval = iProcessedFile->Path();
+        }
+
+    return retval;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpTransferWorker::ProcessOnGoing()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TBool CHttpTransferWorker::ProcessOnGoing() const
+    {
+    TBool retval = EFalse;
+
+    if ( iProcessState != EHttpTransactionIdle )
+        {
+        retval = ETrue;
+        }
+
+    return retval;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::IsWaiting()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TBool CHttpTransferWorker::IsWaiting() const
+    {
+    TBool retval = EFalse;
+
+    // if its not waiting for start -> true
+    if ( iProcessState == EHttpWaitingForStart )
+        {
+        retval = ETrue;
+        }
+
+    return retval;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::SetHeaderL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferWorker::SetHeaderL( RHTTPHeaders aHeaders,
+                                      TInt aHdrField,
+                                      const TDesC8& aHdrValue )
+    {
+    RStringF valStr = iStringPool.OpenFStringL( aHdrValue );
+    CleanupClosePushL( valStr );
+    THTTPHdrVal val( valStr );
+    aHeaders.SetFieldL( iStringPool.StringF( aHdrField,
+                        RHTTPSession::GetTable() ), val );
+    CleanupStack::PopAndDestroy( &valStr );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::SetHeaderL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferWorker::SetHeaderL( RHTTPHeaders aHeaders,
+                                      const TDesC8& aHdrField,
+                                      const TDesC8& aHdrValue )
+    {
+    RStringF valStr = iStringPool.OpenFStringL( aHdrValue );
+    CleanupClosePushL( valStr );
+    RStringF fieldStr = iStringPool.OpenFStringL( aHdrField );
+    CleanupClosePushL( fieldStr );
+    THTTPHdrVal val( valStr );
+    aHeaders.SetFieldL( fieldStr, val );
+    CleanupStack::PopAndDestroy( &fieldStr );
+    CleanupStack::PopAndDestroy( &valStr );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpDownloadWorker::ProcessedFile()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpFile* CHttpTransferWorker::ProcessedFile()
+    {
+    return iProcessedFile;
+    }
+
+
+// From base class MHttpTransferTimerObserver
+
+// --------------------------------------------------------------------------
+// CHttpTransferBase::TimerCallback()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpTransferWorker::TimerCallback()
+    {
+    // if this method is called the waiting time has exceeded the time limit
+    CancelTransfer();
+    delete iTimer;
+    iTimer = NULL;
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httpuploader.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,157 @@
+/** @file
+* 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:  Handles uploads
+*
+*/
+
+
+// System include files
+#include <es_sock.h>
+
+// User include files
+#include "httpuploader.h"
+#include "httpuploadworker.h"
+#include "httptransferbase.h"
+#include "httptransferobserver.h"
+
+// Constants
+const TUint KMaxParallelTransfers = 5;
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// CHttpUploader::CHttpDownloader()
+// --------------------------------------------------------------------------
+//
+CHttpUploader::CHttpUploader( 
+                       MHttpTransferObserver& aObserver,
+                       TUint aIAPId,
+                       TUint aBufferSize,
+                       TUint aParallelTransfers = KDefaultParallelTransfers )
+    {
+    iObserver = &aObserver;
+    iIAPId = aIAPId;
+    iBufferSize = aBufferSize;
+    
+    if ( aParallelTransfers <= 0 )
+        {
+        iParallelTransfers = KDefaultParallelTransfers;
+        }
+    else if ( aParallelTransfers > KMaxParallelTransfers )
+        {
+        iParallelTransfers = KMaxParallelTransfers;
+        }
+    else
+        {
+        iParallelTransfers = aParallelTransfers;
+        }
+    }
+
+
+// --------------------------------------------------------------------------
+// CHttpUploader::ConstructL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpUploader::ConstructL()
+    {
+    
+    for ( TInt i=0; i < iParallelTransfers; i++ )
+        {
+        iWorkerArray.Append( CHttpUploadWorker::NewL( *iObserver,
+                                                      iIAPId,
+                                                      iBufferSize,
+                                                      *this ) );
+        }
+    }
+
+
+// --------------------------------------------------------------------------
+// CHttpUploader::NewL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C CHttpUploader* CHttpUploader::NewL( 
+                                          MHttpTransferObserver& aObserver,
+                                          TUint aIAPId,
+                                          TUint aBufferSize,
+                                          TUint aParallelTransfers )
+    {
+    CHttpUploader* self = CHttpUploader::NewLC( aObserver, 
+                                                aIAPId, 
+                                                aBufferSize,
+                                                aParallelTransfers );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// --------------------------------------------------------------------------
+// CHttpDownloader::NewLC()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C CHttpUploader* CHttpUploader::NewLC( 
+                                          MHttpTransferObserver& aObserver,
+                                          TUint aIAPId,
+                                          TUint aBufferSize,
+                                          TUint aParallelTransfers )
+    {
+    CHttpUploader* self = new( ELeave ) CHttpUploader( aObserver, 
+                                                       aIAPId,
+                                                       aBufferSize,
+                                                       aParallelTransfers );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+// --------------------------------------------------------------------------
+// CHttpUploader::~CHttpUploader()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpUploader::~CHttpUploader()
+    {
+    }
+
+
+// --------------------------------------------------------------------------
+// CHttpUploader::UploadFileL
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CHttpUploader::UploadFileL( const TDesC8& aUri, 
+                                          const TDesC& aTargetPath, 
+                                          TAny* aKey )
+    {
+    // if aKey already exists -> leave
+    for ( TInt i=0; i < iFileQueue.Count(); i++ )
+        {
+        if ( iFileQueue[i]->Key() == aKey )
+            {
+            User::Leave( KErrAlreadyExists );
+            }
+        }
+
+    // Add new CHttpFile into the iFileQueue
+    CreateAndQueueHttpFileL( aUri, aTargetPath, aKey );
+    
+    // Activate new request
+    ActivateNewTransferRequest();
+    }
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnphttptransfer/src/httpuploadworker.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,763 @@
+/** @file
+* 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:  Handles upload of one file
+*
+*/
+
+
+// User include files
+#include "httpuploadworker.h"
+
+// Constants
+_LIT8( KModuleName,         "HttpTransfer" );
+_LIT8( KAllowedData,        "*/*"          );
+_LIT8( KContentTypeName,    "Content-Type" );
+_LIT8( KDefaultContentType, "text/plain"   );
+_LIT8( KExpect,             "Expect" );
+_LIT8( K100Continue,        "100-continue" );
+
+const TUint KDefaultBufferSize = 64*KKilo;
+const TUint KMaxBufferSize     = 128*KKilo;
+
+// Time to wait for response after sending 100 continue post request.
+// Value in microseconds.
+const TInt K100ContinueResponseWaitTime = 3000000; // 3 seconds
+
+// ======== MEMBER FUNCTIONS ========
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::CHttpUploadWorker()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpUploadWorker::CHttpUploadWorker( MHttpTransferObserver& aObserver,
+                                      TUint /*aIAPId*/,
+                                      TUint aBufferSize,
+                                      MHttpWorkerObserver& aCallback )
+    {
+    iObserver = &aObserver;
+    iCallback = &aCallback;
+
+    iProcessState = EHttpTransactionIdle;
+
+    // Check that size of the buffer is between boundaries
+    if ( aBufferSize <= 0 )
+        {
+        iBufferSize = KDefaultBufferSize;
+        }
+    else if ( aBufferSize > KMaxBufferSize )
+        {
+        iBufferSize = KMaxBufferSize;
+        }
+    else
+        {
+        iBufferSize = aBufferSize;
+        }
+
+    iSendDataCount = 0;
+    iBodyFileOffset = 0;
+    iHttpStatus = 0;
+    iMoreToCome = EFalse;
+    iAlreadyDone = EFalse;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::ConstructL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpUploadWorker::ConstructL()
+    {
+    CHttpTransferWorker::ConstructL();
+    ConnectL();
+    iSessionTimer = CHttpNotifyTimer::NewL( this );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::NewL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpUploadWorker* CHttpUploadWorker::NewL(
+                                          MHttpTransferObserver& aObserver,
+                                          TUint aIAPId,
+                                          TUint aBufferSize,
+                                          MHttpWorkerObserver& aCallback )
+    {
+    CHttpUploadWorker* self = CHttpUploadWorker::NewLC( aObserver,
+                                                        aIAPId,
+                                                        aBufferSize,
+                                                        aCallback );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::NewLC()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpUploadWorker* CHttpUploadWorker::NewLC(
+                                          MHttpTransferObserver& aObserver,
+                                          TUint aIAPId,
+                                          TUint aBufferSize,
+                                          MHttpWorkerObserver& aCallback )
+    {
+    CHttpUploadWorker* self = new( ELeave ) CHttpUploadWorker( aObserver,
+                                                               aIAPId,
+                                                               aBufferSize,
+                                                               aCallback );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::~CHttpUploadWorker()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+CHttpUploadWorker::~CHttpUploadWorker()
+    {
+    delete iRequestBodyBuffer;
+    delete iSessionTimer;
+    
+    // Destroy the 100 continue timer if it exists.
+    Destroy100ContinueTimer();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::CancelTransfer()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpUploadWorker::CancelTransfer()
+    {
+    iSessionTimer->Cancel();
+
+    // Destroy the 100 continue response wait timer if it exists.
+    Destroy100ContinueTimer();
+    
+    if ( iProcessState == EHttpWaitingForStart )
+        {
+        delete iProcessedFile;
+        iProcessedFile = NULL;
+        iProcessState = EHttpTransactionIdle;
+        iCallback->WorkerCompleted();
+        }
+    // if process is finished do nothing
+    else if ( iProcessState != EHttpTransactionIdle )
+        {
+        iHttpTransaction.Cancel(); 
+
+        delete iRequestBodyBuffer;
+        iRequestBodyBuffer = NULL;
+
+        iProcessState = EHttpTransactionIdle;
+        iHttpTransaction.Close();
+
+        // call reset so that this worker can be used for the next download
+        Reset(); 
+
+        delete iProcessedFile;
+        iProcessedFile = NULL;
+
+        iOverallDataSize = 0;
+        iFile.Close();
+
+        // inform the worker observer
+        iCallback->WorkerCompleted();
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::MapPostTransactionError()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TInt CHttpUploadWorker::MapPostTransactionError( TInt aError ) const
+    {
+    TInt error = KErrNone;
+    switch (aError)
+        {
+        case HTTPStatus::EForbidden:
+            {
+            error = KErrAccessDenied;
+            break;
+            }
+
+        case HTTPStatus::EMethodNotAllowed:
+            {
+            error = KErrAccessDenied;
+            break;
+            }
+
+        case HTTPStatus::EConflict:
+            {
+            // resource already exists .
+            error = KErrAlreadyExists;
+            break;
+            }
+
+        case HTTPStatus::EUnsupportedMediaType:
+            {
+            error = KErrNotSupported;
+            break;
+            }
+
+        case HTTPStatus::EInternalServerError:
+            {
+            error = KErrNotSupported;
+            break;
+            }
+
+        case HTTPStatus::EMovedPermanently:
+            {
+            // fall through
+            }
+
+        case HTTPStatus::ETemporaryRedirect:
+            {
+            // It is not allowed to write a file with the same name
+            // as an existing directory.
+            error = KErrGeneral;    
+            break;
+            }
+
+        default:
+            {
+            if ( HTTPStatus::IsServerError( aError ) )
+                {
+                error = KErrNotSupported;
+                }
+            else if ( HTTPStatus::IsClientError( aError ) )
+                {
+                error = KErrAccessDenied;
+                }
+            else if ( HTTPStatus::IsRedirection( aError ) )
+                {
+                error = KErrNotFound;
+                }
+            else
+                {
+                if ( aError > 0 )
+                    {
+                    // An arbitrary choice for error codes that 
+                    // should not occur
+                    error = KErrAccessDenied;
+                    }
+                }
+            break;
+            }
+        }
+
+    return error;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::CompleteAndNotify()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpUploadWorker::CompleteAndNotify( TInt aError )
+    {
+    iSessionTimer->Cancel();
+        
+    iProcessState = EHttpTransactionIdle;
+    iHttpTransaction.Cancel();
+    iHttpTransaction.Close();
+
+    delete iRequestBodyBuffer;
+    iRequestBodyBuffer = NULL;
+
+    // call reset so that this worker can be used for the next download
+    Reset(); 
+    if ( iProcessedFile )
+        {
+        iObserver->TransferCompleted( iProcessedFile->Key(), aError );
+        }
+
+    delete iProcessedFile;
+    iProcessedFile = NULL;
+
+    iOverallDataSize = 0;
+    iFile.Close();
+
+    // inform the worker observer
+    iCallback->WorkerCompleted();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::StartProcessL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpUploadWorker::StartProcessL()
+    {
+    CHttpTransferWorker::StartProcessL();
+    
+    SendL();
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::SendL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpUploadWorker::SendL()
+    {
+    // iAlreadyDone need to be reset
+    iSendDataCount = 0;
+    iBodyFileOffset = 0;
+    iHttpStatus = 0;
+    iMoreToCome = EFalse;
+    iAlreadyDone = EFalse;
+    // Open the file in the file system
+    User::LeaveIfError( iFile.Open( iFsSession,
+                                    *(iProcessedFile->Path()),
+                                    EFileShareReadersOnly | EFileRead ) );
+
+    User::LeaveIfError( iFile.Size( iOverallDataSize ) );
+
+    // get read buffer size from the Central Repository
+    iRequestBodyBuffer = HBufC8::NewL( iBufferSize );
+
+    InvokeHttpMethodL();
+
+    // Change state of the state machine
+    iProcessState = EHttpPostSent;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::InvokeHttpMethodL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpUploadWorker::InvokeHttpMethodL()
+    {
+    // This actually creates the transaction, sets the headers and body 
+    // and then starts the transaction.
+    TBool contentTypeExists = EFalse;
+
+    // open HTTP transaction
+    TUriParser8 uri; 
+    User::LeaveIfError( uri.Parse( *( iProcessedFile->Uri() ) ) );
+
+    // POST HTTP method
+    RStringF method = iStringPool.StringF( HTTP::EPOST,
+                                           RHTTPSession::GetTable() );
+    CleanupClosePushL( method );
+
+    iHttpTransaction = iSession.OpenTransactionL( uri, *this, method );
+
+    RHTTPHeaders hdr = iHttpTransaction.Request().GetHeaderCollection();
+
+    SetHeaderL( hdr, HTTP::EUserAgent, KModuleName );
+    SetHeaderL( hdr, HTTP::EAccept, KAllowedData );
+
+    //Set the property of upnphttptransfer to ENotifyOnDisconnect
+    //Set the property of HTTP Transaction to EEnableDisconnectNotification
+    //The MHFRunL can get the really http error.
+    iHttpTransaction.PropertySet().SetPropertyL(
+        iSession.StringPool().StringF( 
+            HTTP::ENotifyOnDisconnect,RHTTPSession::GetTable() ),
+            iSession.StringPool().StringF( 
+                HTTP::EEnableDisconnectNotification,
+                RHTTPSession::GetTable() ) );
+    // Add arbitrary Http headers
+    RPointerArray<CHttpHeader> headerArray = iProcessedFile->Headers();
+    TBool expect100ContinueFound = EFalse;
+    for ( TInt i = 0; i < headerArray.Count(); i++ )
+        {
+        const TDesC8& headerName = headerArray[i]->FieldName();
+        const TDesC8& headerValue = headerArray[i]->FieldValue();
+        
+        SetHeaderL( hdr,
+                    headerName,
+                    headerValue );
+        if ( headerName == KContentTypeName() )
+            {
+            contentTypeExists = ETrue;
+            }
+        if ( headerName == KExpect() )
+            {
+            if ( headerValue == K100Continue() ) 
+                {
+                // Wait for 100 continue before sending the body in case of 
+                // "Expect: 100-Continue" header.
+                RHTTPTransactionPropertySet propSet = 
+                    iHttpTransaction.PropertySet();
+                RStringF notifyContinue = 
+                    iStringPool.StringF( 
+                        HTTP::ENotify100Continue, 
+                        RHTTPSession::GetTable() );
+                RStringF enableNotification = 
+                    iStringPool.StringF( 
+                        HTTP::EEnableNotification, 
+                        RHTTPSession::GetTable() );
+                THTTPHdrVal val( enableNotification );
+                propSet.SetPropertyL( notifyContinue, val );
+                      
+                // we found "Expect: 100-continue"-header
+                expect100ContinueFound = ETrue;
+                
+                // Need to start a timer when sending the headers that waits 
+                // for some time and if no response during that time, sends 
+                // this event to continue with the body.
+                i100ContinueTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+                i100ContinueTimer->Start(
+                    K100ContinueResponseWaitTime, // time to cancel waiting
+                    K100ContinueResponseWaitTime, // this is not actually used
+                    TCallBack( Cancel100ContinueWaitL, this ) );
+                }
+            }
+        }
+
+    if ( contentTypeExists == EFalse )
+        {
+        SetHeaderL( hdr, HTTP::EContentType, KDefaultContentType );
+        }
+        
+    if ( !expect100ContinueFound ) 
+        {
+        // "Expect: 100-continue" header not found. Do not wait for 
+        // 100-continue. This might not be needed but it is added here to 
+        // avoid possible regression by not changing the previous behaviour
+        // too much. 
+        RHTTPTransactionPropertySet propSet = iHttpTransaction.PropertySet();
+        RStringF notifyContinue = 
+            iStringPool.StringF( 
+                HTTP::ENotify100Continue, 
+                RHTTPSession::GetTable() );
+        RStringF disableNotification = 
+            iStringPool.StringF( 
+                HTTP::EDisableNotification, 
+                RHTTPSession::GetTable() );
+        THTTPHdrVal val( disableNotification );
+        propSet.SetPropertyL( notifyContinue, val );
+        }
+
+    // Set Body data
+    MHTTPDataSupplier* dataSupplier = this;
+    iHttpTransaction.Request().SetBody( *dataSupplier );
+
+    // submit the request
+    iHttpTransaction.SubmitL();
+
+    //set timer
+    iSessionTimer->Cancel();
+    iSessionTimer->AfterSeconds( KSessionTimeout );
+    CleanupStack::PopAndDestroy( &method );
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::MHFRunL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+void CHttpUploadWorker::MHFRunL( RHTTPTransaction aTransaction,
+                                 const THTTPEvent& aEvent )
+    {
+    iSessionTimer->Cancel();
+    
+    // HTTP status code
+    RHTTPResponse response = aTransaction.Response();
+    iHttpStatus = response.StatusCode();
+         
+    // If HTTP status is not what we expected, better to quit
+    // status 0 will be handled in switch case default
+    
+    if ( !( iHttpStatus == HTTPStatus::EOk ||
+    	    iHttpStatus == HTTPStatus::ECreated ||
+            iHttpStatus == HTTPStatus::ENoContent ||
+            iHttpStatus == HTTPStatus::EContinue ||
+            iHttpStatus == 0 ) )
+        {
+        CompleteAndNotify( 
+                       MapPostTransactionError( iHttpStatus ) );
+        }
+    else
+        {                
+
+        switch ( aEvent.iStatus ) 
+            {
+            // process the headers
+            case THTTPEvent::EGotResponseHeaders:
+                {
+                // POST response headers
+                // according to the RFC, location header is here if
+                // the entity was created
+                if( !iMoreToCome )
+                    {
+                    // Everything has been sent, no need to wait ESucceeded
+                    
+                    if ( ( iHttpStatus == HTTPStatus::EOk ) ||
+                    	 ( iHttpStatus == HTTPStatus::ECreated ) ||
+                         ( iHttpStatus == HTTPStatus::ENoContent ) )
+                        {
+                        CompleteAndNotify( KErrNone );
+                        }
+                     else
+                        {
+                        CompleteAndNotify( 
+                           MapPostTransactionError( iHttpStatus ) );
+                        }                            
+                    }
+                break;
+                }
+            case THTTPEvent::EGotResponseBodyData:
+                {
+                // discard the body data    
+                MHTTPDataSupplier* responseBody = 
+                                    aTransaction.Response().Body();
+                ASSERT( responseBody );
+                // Done with that bit of body data
+                responseBody->ReleaseData();
+                break;
+                }
+            case THTTPEvent::EResponseComplete:
+                {
+                // The transaction's response is complete
+                break;
+                }
+            case THTTPEvent::ESucceeded:
+                {
+                // check the status code and decide whether we
+                // actually succeeded or not
+
+                // inform observers
+                // according to the RFC we expect 200 OK,
+                //                                204 NO CONTENT or
+                //                                201 CREATED    
+                if ( ( iHttpStatus == HTTPStatus::EOk ) ||
+                	 ( iHttpStatus == HTTPStatus::ECreated ) ||
+                     ( iHttpStatus == HTTPStatus::ENoContent ) )
+                    {
+                    CompleteAndNotify( KErrNone );
+                    }
+                 else
+                    {
+                    CompleteAndNotify( 
+                       MapPostTransactionError( iHttpStatus ) );
+                    }
+            	break;
+                }
+            case THTTPEvent::EFailed:
+            	{
+            	// This is not supposed to do if transaction is finished
+            	// happens when cancel is done
+            	if ( iProcessState != EHttpTransactionIdle ) 
+            	    {
+            	    CompleteAndNotify( 
+            	            MapPostTransactionError( iHttpStatus ) );
+            	    }
+
+                break;
+                }
+            case THTTPEvent::EReceived100Continue: 
+                {
+                // The server responded with a 100-Continue status code. 
+                // HTTP FW continues with sending the body.
+                Destroy100ContinueTimer();
+                break;
+                } 
+            default:
+                {
+                if ( aEvent.iStatus < 0 )
+                    {
+                    CompleteAndNotify( aEvent.iStatus ); 
+                    }
+                else
+                    {
+                    CompleteAndNotify( KErrGeneral );
+                    }
+                break;
+                }
+            }
+        }
+    }
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::MHFRunError()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+TInt CHttpUploadWorker::MHFRunError( TInt /*aError*/,
+                                     RHTTPTransaction /*aTransaction*/,
+                                     const THTTPEvent& /* aEvent*/ )
+    {
+    // Just notify the client about the failure and return KErrNone to 
+    // the stack indicating that we handled this error.
+    if ( iProcessState != EHttpTransactionIdle )
+        {
+        CompleteAndNotify( MapPostTransactionError( iHttpStatus ) );
+        }
+
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::GetNextDataPart()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TBool CHttpUploadWorker::GetNextDataPart( TPtrC8& aDataPart )
+    {
+    if ( !iAlreadyDone )// Note: this is zero only when new part is requested
+        {
+        if ( iSendDataCount == 0 )
+            {
+            // first run
+            TInt pos = iBodyFileOffset;
+            iFile.Seek( ESeekStart, pos );
+            }
+
+        // We read data that will be given to the stack next time,
+        // or we will find out that there is no more data...
+        TInt readLength;
+        if ( ( iOverallDataSize - iSendDataCount ) >= iBufferSize )
+            {
+            readLength = iBufferSize;
+            }
+        else
+            {
+            readLength = iOverallDataSize - iSendDataCount;
+            }
+
+        TPtr8 requestBodyBufferPtr = iRequestBodyBuffer->Des();
+
+        TInt err = iFile.Read( requestBodyBufferPtr, readLength );
+        iSendDataCount = iSendDataCount + iRequestBodyBuffer->Length();
+        if ( err == KErrNone )
+            {
+            if ( ( iSendDataCount < iOverallDataSize ) &&
+                 ( iRequestBodyBuffer->Length() > 0  ) )
+                {  
+                iMoreToCome = ETrue;
+                }
+            }
+        iAlreadyDone = ETrue;
+        } // on first call, allocate the current part
+
+    aDataPart.Set( *iRequestBodyBuffer ); // .. otherwise, just re-use it
+
+    //set timer
+    iSessionTimer->Cancel();
+    iSessionTimer->AfterSeconds( KSessionTimeout );
+
+    return !iMoreToCome;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::ReleaseData()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+void CHttpUploadWorker::ReleaseData()
+    {
+    // HTTP client is ready with the current data
+    // notify observer if notifications are required
+    // and tell stack whether we have more data coming
+    // when done, close file etc.
+
+    // notify iObserver if iTrackProgress flag is on
+    if ( iProcessedFile->TrackingOn() )
+        {
+        iObserver->TransferProgress( iProcessedFile->Key(),
+                                     iSendDataCount,
+                                     iOverallDataSize );
+        }
+
+    if ( iMoreToCome )
+        {
+        TRAP_IGNORE( iHttpTransaction.NotifyNewRequestBodyPartL() );
+        iMoreToCome = EFalse;
+        }
+
+    iAlreadyDone = EFalse;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::OverallDataSize()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TInt CHttpUploadWorker::OverallDataSize()
+    {
+    return iOverallDataSize;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::Reset()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+//
+TInt CHttpUploadWorker::Reset()
+    {
+    // Reset send data count and buffer. This will cause GetNextDataPart() 
+    // to start from the beginning.
+    iSendDataCount = 0;
+    
+    // Destroy the 100 continue response wait timer if it exists.
+    Destroy100ContinueTimer();
+    
+    return KErrNone;
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::Destroy100ContinueTimer()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+// 
+void CHttpUploadWorker::Destroy100ContinueTimer() 
+    {
+    if ( i100ContinueTimer ) 
+        {
+        i100ContinueTimer->Cancel();
+        delete i100ContinueTimer;
+        i100ContinueTimer = NULL;
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CHttpUploadWorker::Cancel100ContinueWaitL()
+// (See comments in header file)
+// --------------------------------------------------------------------------
+// 
+TInt CHttpUploadWorker::Cancel100ContinueWaitL( TAny* aParam ) 
+    {
+    CHttpUploadWorker* self =
+        (static_cast<CHttpUploadWorker*>( aParam ));
+
+    // Destroy the timer. We don't need subsequent events.
+    self->Destroy100ContinueTimer(); 
+
+    // Cancel waiting for 100 continue. As the server did not respond,
+    // continue with sending the body.
+    self->iHttpTransaction.SendEventL(
+       THTTPEvent::ECancelWaitFor100Continue,
+       THTTPEvent::EOutgoing,
+       THTTPFilterHandle( THTTPFilterHandle::EClient) );
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CHttpUploadWorker::TimerEventL
+// Disconnect connection
+// -----------------------------------------------------------------------------
+//        
+void CHttpUploadWorker::TimerEventL( CHttpNotifyTimer* /*aTimer*/ )
+    {
+    CompleteAndNotify( KErrTimedOut );
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/BWINS/upnpipserversutilsu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,263 @@
+EXPORTS
+	?ExtractUrlPath@UpnpFileUtil@@YA?AVTPtrC8@@ABVTDesC8@@AAH@Z @ 1 NONAME ; class TPtrC8 UpnpFileUtil::ExtractUrlPath(class TDesC8 const &, int &)
+	?PendingRequest@CUpnpHttpMessage@@QAEPAXXZ @ 2 NONAME ; void * CUpnpHttpMessage::PendingRequest(void)
+	?IsSsdpMSearch@CUpnpSsdpMessage@@QAEHXZ @ 3 NONAME ; int CUpnpSsdpMessage::IsSsdpMSearch(void)
+	?ResponseL@RUpnpSsdpMessageFactory@@SAPAVCUpnpSsdpMessage@@AAVTDesC8@@000@Z @ 4 NONAME ; class CUpnpSsdpMessage * RUpnpSsdpMessageFactory::ResponseL(class TDesC8 &, class TDesC8 &, class TDesC8 &, class TDesC8 &)
+	?ExtractUrlPath@UpnpFileUtil@@YA?AVTPtrC8@@ABVTDesC8@@AAV2@1AAH@Z @ 5 NONAME ; class TPtrC8 UpnpFileUtil::ExtractUrlPath(class TDesC8 const &, class TPtrC8 &, class TPtrC8 &, int &)
+	?Is2xx@CUpnpHttpMessage@@QAEHXZ @ 6 NONAME ; int CUpnpHttpMessage::Is2xx(void)
+	?PanicServer@CUpnpSymbianServerBase@@IBEXH@Z @ 7 NONAME ; void CUpnpSymbianServerBase::PanicServer(int) const
+	?IsSsdpResponse@CUpnpSsdpMessage@@QAEHXZ @ 8 NONAME ; int CUpnpSsdpMessage::IsSsdpResponse(void)
+	?SenderPathFromHeader@CUpnpHttpMessage@@QAE?BVTPtrC8@@XZ @ 9 NONAME ; class TPtrC8 const CUpnpHttpMessage::SenderPathFromHeader(void)
+	?FromUnicodeL@UpnpString@@YAPAVHBufC8@@ABVTDesC16@@@Z @ 10 NONAME ; class HBufC8 * UpnpString::FromUnicodeL(class TDesC16 const &)
+	?SetTcpTimeout@CUpnpHttpMessage@@QAEXH@Z @ 11 NONAME ; void CUpnpHttpMessage::SetTcpTimeout(int)
+	?SetOutUriL@CUpnpHttpMessage@@QAEXABVTDesC8@@@Z @ 12 NONAME ; void CUpnpHttpMessage::SetOutUriL(class TDesC8 const &)
+	?Http11ResponseL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@PAV2@H@Z @ 13 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::Http11ResponseL(class CUpnpHttpMessage *, int)
+	?After@CUpnpNotifyTimer@@QAEXVTTimeIntervalMicroSeconds32@@H@Z @ 14 NONAME ; void CUpnpNotifyTimer::After(class TTimeIntervalMicroSeconds32, int)
+	?InFilename@CUpnpHttpMessage@@QAE?AVTPtrC8@@XZ @ 15 NONAME ; class TPtrC8 CUpnpHttpMessage::InFilename(void)
+	??1CUpnpHttpMessage@@UAE@XZ @ 16 NONAME ; CUpnpHttpMessage::~CUpnpHttpMessage(void)
+	?Domain@CUpnpDeviceLibraryElement@@QAEAAVTDesC8@@XZ @ 17 NONAME ; class TDesC8 & CUpnpDeviceLibraryElement::Domain(void)
+	?ReplaceHttpCharactersL@UpnpString@@YAXAAVTDes16@@@Z @ 18 NONAME ; void UpnpString::ReplaceHttpCharactersL(class TDes16 &)
+	?CheckDiskSpaceShortL@UpnpFileUtil@@YAHW4TDriveNumber@@H@Z @ 19 NONAME ; int UpnpFileUtil::CheckDiskSpaceShortL(enum TDriveNumber, int)
+	?DeleteElement@UpnpDomInterface@@YA?AVTXmlEngElement@@AAV2@@Z @ 20 NONAME ; class TXmlEngElement UpnpDomInterface::DeleteElement(class TXmlEngElement &)
+	?GetHeaderValue@CUpnpHttpMessage@@QAEAAVTDesC8@@ABV2@@Z @ 21 NONAME ; class TDesC8 & CUpnpHttpMessage::GetHeaderValue(class TDesC8 const &)
+	?Find@CUpnpDeviceLibrary@@QAEHABVTDesC8@@@Z @ 22 NONAME ; int CUpnpDeviceLibrary::Find(class TDesC8 const &)
+	?SessionId@CUpnpHttpMessage@@QBEHXZ @ 23 NONAME ; int CUpnpHttpMessage::SessionId(void) const
+	?AddrOutput@CUpnpHttpMessage@@SAXABVTInetAddr@@AAVTDes8@@@Z @ 24 NONAME ; void CUpnpHttpMessage::AddrOutput(class TInetAddr const &, class TDes8 &)
+	?SetRenew@CUpnpTimeoutElement@@QAEXW4TRenew@1@@Z @ 25 NONAME ; void CUpnpTimeoutElement::SetRenew(enum CUpnpTimeoutElement::TRenew)
+	?DoCancel@CUpnpTimeoutElement@@UAEXXZ @ 26 NONAME ; void CUpnpTimeoutElement::DoCancel(void)
+	?SaveToFileL@UpnpDomInterface@@YAHABVTDesC16@@ABVTDesC8@@@Z @ 27 NONAME ; int UpnpDomInterface::SaveToFileL(class TDesC16 const &, class TDesC8 const &)
+	?RemovePairL@CUpnpHttpMessage@@QAEXABVTDesC8@@@Z @ 28 NONAME ; void CUpnpHttpMessage::RemovePairL(class TDesC8 const &)
+	?First@CUpnpHttpHeaderList@@QAEPAVCUpnpHttpHeader@@XZ @ 29 NONAME ; class CUpnpHttpHeader * CUpnpHttpHeaderList::First(void)
+	?CheckAttributeValueL@UpnpDomInterface@@YAHABVTXmlEngElement@@ABVTDesC8@@1@Z @ 30 NONAME ; int UpnpDomInterface::CheckAttributeValueL(class TXmlEngElement const &, class TDesC8 const &, class TDesC8 const &)
+	?Http11ResponseL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTInetAddr@@H@Z @ 31 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::Http11ResponseL(class TInetAddr const &, int)
+	?CacheControl@CUpnpSsdpMessage@@QAEHXZ @ 32 NONAME ; int CUpnpSsdpMessage::CacheControl(void)
+	?SaveToFileL@UpnpDomInterface@@YAHABVTDesC16@@ABVTXmlEngElement@@@Z @ 33 NONAME ; int UpnpDomInterface::SaveToFileL(class TDesC16 const &, class TXmlEngElement const &)
+	?IsGena@CUpnpHttpMessage@@QAEHXZ @ 34 NONAME ; int CUpnpHttpMessage::IsGena(void)
+	?SetBodyL@CUpnpHttpMessage@@QAEXABVTDesC8@@@Z @ 35 NONAME ; void CUpnpHttpMessage::SetBodyL(class TDesC8 const &)
+	?ParseHeaderRowL@CUpnpHttpMessage@@IAEXABVTDesC8@@H@Z @ 36 NONAME ; void CUpnpHttpMessage::ParseHeaderRowL(class TDesC8 const &, int)
+	?Next@CUpnpHttpHeaderList@@QAEPAVCUpnpHttpHeader@@PBV2@@Z @ 37 NONAME ; class CUpnpHttpHeader * CUpnpHttpHeaderList::Next(class CUpnpHttpHeader const *)
+	?NewL@CUpnpHttpMessage@@SAPAV1@AAVTDesC8@@ABVTInetAddr@@H@Z @ 38 NONAME ; class CUpnpHttpMessage * CUpnpHttpMessage::NewL(class TDesC8 &, class TInetAddr const &, int)
+	?HttpGetL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTDesC8@@@Z @ 39 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpGetL(class TDesC8 const &)
+	?HeadersToStringL@CUpnpHttpMessage@@UAEPAVHBufC8@@XZ @ 40 NONAME ; class HBufC8 * CUpnpHttpMessage::HeadersToStringL(void)
+	?CurrentDateLC@UpnpString@@YAPAVHBufC8@@XZ @ 41 NONAME ; class HBufC8 * UpnpString::CurrentDateLC(void)
+	?Uuid@CUpnpSsdpMessage@@QAE?AVTPtr8@@XZ @ 42 NONAME ; class TPtr8 CUpnpSsdpMessage::Uuid(void)
+	?SetAlive@CUpnpDeviceLibraryElement@@QAEXH@Z @ 43 NONAME ; void CUpnpDeviceLibraryElement::SetAlive(int)
+	?UUID@CUpnpDeviceLibraryElement@@QAEAAVTDesC8@@XZ @ 44 NONAME ; class TDesC8 & CUpnpDeviceLibraryElement::UUID(void)
+	?Location@CUpnpSsdpMessage@@QAEAAVTDesC8@@XZ @ 45 NONAME ; class TDesC8 & CUpnpSsdpMessage::Location(void)
+	?DescriptionUrl@CUpnpDeviceLibraryElement@@QAEAAVTDesC8@@XZ @ 46 NONAME ; class TDesC8 & CUpnpDeviceLibraryElement::DescriptionUrl(void)
+	?AddPairL@CUpnpHttpMessage@@QAEXABVTDesC8@@0@Z @ 47 NONAME ; void CUpnpHttpMessage::AddPairL(class TDesC8 const &, class TDesC8 const &)
+	?OverwriteExisting@CUpnpHttpMessage@@QAEHXZ @ 48 NONAME ; int CUpnpHttpMessage::OverwriteExisting(void)
+	?Is3xx@CUpnpHttpMessage@@QAEHXZ @ 49 NONAME ; int CUpnpHttpMessage::Is3xx(void)
+	?RemoveSilentL@CUpnpDeviceLibrary@@QAEXABVTDesC8@@@Z @ 50 NONAME ; void CUpnpDeviceLibrary::RemoveSilentL(class TDesC8 const &)
+	?GetAttrValueL@UpnpDomInterface@@YA?AVTPtrC8@@ABVTXmlEngElement@@ABVTDesC8@@@Z @ 51 NONAME ; class TPtrC8 UpnpDomInterface::GetAttrValueL(class TXmlEngElement const &, class TDesC8 const &)
+	?SetOutFilenameL@CUpnpHttpMessage@@QAEXABVTDesC8@@@Z @ 52 NONAME ; void CUpnpHttpMessage::SetOutFilenameL(class TDesC8 const &)
+	??1CUpnpDeviceLibraryElement@@UAE@XZ @ 53 NONAME ; CUpnpDeviceLibraryElement::~CUpnpDeviceLibraryElement(void)
+	?UpdateId@CUpnpDeviceLibraryElement@@QBEHXZ @ 54 NONAME ; int CUpnpDeviceLibraryElement::UpdateId(void) const
+	?DeviceList@CUpnpDeviceLibrary@@QAEAAV?$RPointerArray@VCUpnpDeviceLibraryElement@@@@XZ @ 55 NONAME ; class RPointerArray<class CUpnpDeviceLibraryElement> & CUpnpDeviceLibrary::DeviceList(void)
+	?GetNextValue@CUpnpMSearchTimer@@QAEHXZ @ 56 NONAME ; int CUpnpMSearchTimer::GetNextValue(void)
+	?InetToStringL@UpnpString@@YAPAVHBufC8@@ABVTInetAddr@@@Z @ 57 NONAME ; class HBufC8 * UpnpString::InetToStringL(class TInetAddr const &)
+	?Remove@CUpnpHttpHeaderList@@QAEXPBVCUpnpHttpHeader@@@Z @ 58 NONAME ; void CUpnpHttpHeaderList::Remove(class CUpnpHttpHeader const *)
+	?IsSearchService@CUpnpSsdpMessage@@QAEHXZ @ 59 NONAME ; int CUpnpSsdpMessage::IsSearchService(void)
+	?SetLocal@CUpnpHttpMessage@@QAEXH@Z @ 60 NONAME ; void CUpnpHttpMessage::SetLocal(int)
+	?RetryCounter@CUpnpHttpMessage@@QAEHXZ @ 61 NONAME ; int CUpnpHttpMessage::RetryCounter(void)
+	?RPointerArrayToCsvLC@UpnpString@@YAPAVHBufC8@@AAV?$RPointerArray@VTPtrC8@@@@@Z @ 62 NONAME ; class HBufC8 * UpnpString::RPointerArrayToCsvLC(class RPointerArray<class TPtrC8> &)
+	?HttpResponseOkL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTInetAddr@@@Z @ 63 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpResponseOkL(class TInetAddr const &)
+	?HeaderList@CUpnpHttpMessage@@QAEPAVCUpnpHttpHeaderList@@XZ @ 64 NONAME ; class CUpnpHttpHeaderList * CUpnpHttpMessage::HeaderList(void)
+	?OutFilename@CUpnpHttpMessage@@QAE?AVTPtrC8@@XZ @ 65 NONAME ; class TPtrC8 CUpnpHttpMessage::OutFilename(void)
+	?NewSessionIdL@CUpnpHttpMessage@@SAHXZ @ 66 NONAME ; int CUpnpHttpMessage::NewSessionIdL(void)
+	?AfterSeconds@CUpnpNotifyTimer@@QAEXH@Z @ 67 NONAME ; void CUpnpNotifyTimer::AfterSeconds(int)
+	?Trim@UpnpString@@YA?AVTPtrC8@@V2@H@Z @ 68 NONAME ; class TPtrC8 UpnpString::Trim(class TPtrC8, int)
+	?NewL@CUpnpSsdpMessage@@SAPAV1@AAVTInetAddr@@W4TRequestType@1@@Z @ 69 NONAME ; class CUpnpSsdpMessage * CUpnpSsdpMessage::NewL(class TInetAddr &, enum CUpnpSsdpMessage::TRequestType)
+	?Local@CUpnpDeviceLibraryElement@@QBEHXZ @ 70 NONAME ; int CUpnpDeviceLibraryElement::Local(void) const
+	?HttpError@CUpnpHttpMessage@@SAABVTDesC8@@W4THttpStatusCode@@@Z @ 71 NONAME ; class TDesC8 const & CUpnpHttpMessage::HttpError(enum THttpStatusCode)
+	?AddInfoL@CUpnpDeviceLibrary@@QAEXPBVTUpnpAddLocalDevice@@ABVTDesC8@@ABVTInetAddr@@@Z @ 72 NONAME ; void CUpnpDeviceLibrary::AddInfoL(class TUpnpAddLocalDevice const *, class TDesC8 const &, class TInetAddr const &)
+	?ServicePath@CUpnpHttpMessage@@QBE?BVTPtrC8@@XZ @ 73 NONAME ; class TPtrC8 const CUpnpHttpMessage::ServicePath(void) const
+	?GetDirectoryElementListL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV?$RArray@VTXmlEngElement@@@@ABVTDesC8@@2H@Z @ 74 NONAME ; int UpnpDomInterface::GetDirectoryElementListL(class TXmlEngElement const &, class RArray<class TXmlEngElement> &, class TDesC8 const &, class TDesC8 const &, int)
+	?GetTarget@CUpnpMSearchTimer@@QAE?AVTPtrC8@@XZ @ 75 NONAME ; class TPtrC8 CUpnpMSearchTimer::GetTarget(void)
+	?RunError@CUpnpTimeoutElement@@UAEHH@Z @ 76 NONAME ; int CUpnpTimeoutElement::RunError(int)
+	?IsSsdpNotify@CUpnpSsdpMessage@@QAEHXZ @ 77 NONAME ; int CUpnpSsdpMessage::IsSsdpNotify(void)
+	??0CUpnpSymbianServerBase@@IAE@XZ @ 78 NONAME ; CUpnpSymbianServerBase::CUpnpSymbianServerBase(void)
+	?FindLWS@CUpnpHttpMessage@@SAHABVTDesC8@@@Z @ 79 NONAME ; int CUpnpHttpMessage::FindLWS(class TDesC8 const &)
+	?DecodeXmlStringL@UpnpString@@YAPAVHBufC8@@ABVTDesC8@@@Z @ 80 NONAME ; class HBufC8 * UpnpString::DecodeXmlStringL(class TDesC8 const &)
+	?HttpHeadL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTDesC8@@@Z @ 81 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpHeadL(class TDesC8 const &)
+	?HttpGetL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@AAVTInetAddr@@ABVTDesC8@@@Z @ 82 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpGetL(class TInetAddr &, class TDesC8 const &)
+	?RunL@CUpnpSymbianServerBase@@MAEXXZ @ 83 NONAME ; void CUpnpSymbianServerBase::RunL(void)
+	?SetDestinationPathL@CUpnpHttpMessage@@QAEXABVTDesC8@@@Z @ 84 NONAME ; void CUpnpHttpMessage::SetDestinationPathL(class TDesC8 const &)
+	?GetMimeTypeForFileL@UpnpFileUtil@@YAPAVHBufC8@@ABVTDesC16@@@Z @ 85 NONAME ; class HBufC8 * UpnpFileUtil::GetMimeTypeForFileL(class TDesC16 const &)
+	?GetElementL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV2@ABVTDesC8@@2HH@Z @ 86 NONAME ; int UpnpDomInterface::GetElementL(class TXmlEngElement const &, class TXmlEngElement &, class TDesC8 const &, class TDesC8 const &, int, int)
+	??0CUpnpMSearchTimer@@AAE@PAVMUpnpNotifyTimerObserver@@@Z @ 87 NONAME ; CUpnpMSearchTimer::CUpnpMSearchTimer(class MUpnpNotifyTimerObserver *)
+	?EncodeXmlStringL@UpnpString@@YAPAVHBufC8@@ABVTDesC8@@@Z @ 88 NONAME ; class HBufC8 * UpnpString::EncodeXmlStringL(class TDesC8 const &)
+	?Nt@CUpnpSsdpMessage@@QAEAAVTDesC8@@XZ @ 89 NONAME ; class TDesC8 & CUpnpSsdpMessage::Nt(void)
+	?ClientRequest@CUpnpHttpMessage@@QAEHXZ @ 90 NONAME ; int CUpnpHttpMessage::ClientRequest(void)
+	?SetType@CUpnpHttpMessage@@QAEXW4THTTPMsgType@@@Z @ 91 NONAME ; void CUpnpHttpMessage::SetType(enum THTTPMsgType)
+	?HttpGetL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@AAVTInetAddr@@ABVTDesC8@@1@Z @ 92 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpGetL(class TInetAddr &, class TDesC8 const &, class TDesC8 const &)
+	?TrimLC@UpnpString@@YAPAVHBufC8@@ABVTDesC8@@H@Z @ 93 NONAME ; class HBufC8 * UpnpString::TrimLC(class TDesC8 const &, int)
+	?AdvertiseByebyeL@RUpnpSsdpMessageFactory@@SAPAVCUpnpSsdpMessage@@AAVTDesC8@@0@Z @ 94 NONAME ; class CUpnpSsdpMessage * RUpnpSsdpMessageFactory::AdvertiseByebyeL(class TDesC8 &, class TDesC8 &)
+	?ConstructL@CUpnpHttpMessage@@IAEXXZ @ 95 NONAME ; void CUpnpHttpMessage::ConstructL(void)
+	?AdvertiseAliveL@RUpnpSsdpMessageFactory@@SAPAVCUpnpSsdpMessage@@AAVTDesC8@@000@Z @ 96 NONAME ; class CUpnpSsdpMessage * RUpnpSsdpMessageFactory::AdvertiseAliveL(class TDesC8 &, class TDesC8 &, class TDesC8 &, class TDesC8 &)
+	?BaseConstructL@CUpnpTimeoutElement@@IAEXXZ @ 97 NONAME ; void CUpnpTimeoutElement::BaseConstructL(void)
+	?Is1xx@CUpnpHttpMessage@@QAEHXZ @ 98 NONAME ; int CUpnpHttpMessage::Is1xx(void)
+	?DestinationPath@CUpnpHttpMessage@@QAE?AVTPtrC8@@XZ @ 99 NONAME ; class TPtrC8 CUpnpHttpMessage::DestinationPath(void)
+	?SaveAtOffset@CUpnpHttpMessage@@QAEHXZ @ 100 NONAME ; int CUpnpHttpMessage::SaveAtOffset(void)
+	?SwitchToBackSlashL@UpnpFileUtil@@YAPAVHBufC16@@ABVTDesC16@@@Z @ 101 NONAME ; class HBufC16 * UpnpFileUtil::SwitchToBackSlashL(class TDesC16 const &)
+	?Nts@CUpnpSsdpMessage@@QAEAAVTDesC8@@XZ @ 102 NONAME ; class TDesC8 & CUpnpSsdpMessage::Nts(void)
+	?NewL@CUpnpSsdpMessage@@SAPAV1@AAVTDesC8@@AAVTInetAddr@@@Z @ 103 NONAME ; class CUpnpSsdpMessage * CUpnpSsdpMessage::NewL(class TDesC8 &, class TInetAddr &)
+	?EncodeXmlStringL@UpnpString@@YAPAVHBufC8@@AAPAV2@@Z @ 104 NONAME ; class HBufC8 * UpnpString::EncodeXmlStringL(class HBufC8 * &)
+	?SwitchToBackSlashL@UpnpFileUtil@@YAPAVHBufC8@@ABVTDesC8@@@Z @ 105 NONAME ; class HBufC8 * UpnpFileUtil::SwitchToBackSlashL(class TDesC8 const &)
+	?ServiceList@CUpnpDeviceLibraryElement@@QAEAAVCDesC8Array@@XZ @ 106 NONAME ; class CDesC8Array & CUpnpDeviceLibraryElement::ServiceList(void)
+	?SetRangeL@CUpnpHttpMessage@@QAEXHHH@Z @ 107 NONAME ; void CUpnpHttpMessage::SetRangeL(int, int, int)
+	?RequestHTTPVersion@CUpnpHttpMessage@@QAE?BVTPtrC8@@XZ @ 108 NONAME ; class TPtrC8 const CUpnpHttpMessage::RequestHTTPVersion(void)
+	?HttpHeadL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTDesC8@@0@Z @ 109 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpHeadL(class TDesC8 const &, class TDesC8 const &)
+	?StopFilteringDeviceL@CUpnpDeviceLibrary@@QAEXABVTDesC8@@@Z @ 110 NONAME ; void CUpnpDeviceLibrary::StopFilteringDeviceL(class TDesC8 const &)
+	?SuggestShutdown@CUpnpSymbianServerBase@@IAEXXZ @ 111 NONAME ; void CUpnpSymbianServerBase::SuggestShutdown(void)
+	?Start@CUpnpNotifyTimer@@QAEXVTTimeIntervalMicroSeconds32@@H@Z @ 112 NONAME ; void CUpnpNotifyTimer::Start(class TTimeIntervalMicroSeconds32, int)
+	?Usn@CUpnpSsdpMessage@@QAEAAVTDesC8@@XZ @ 113 NONAME ; class TDesC8 & CUpnpSsdpMessage::Usn(void)
+	?Renew@CUpnpTimeoutElement@@QAEAAW4TRenew@1@XZ @ 114 NONAME ; enum CUpnpTimeoutElement::TRenew & CUpnpTimeoutElement::Renew(void)
+	?ReadFileL@UpnpFileUtil@@YAPAVHBufC8@@ABVTDesC16@@@Z @ 115 NONAME ; class HBufC8 * UpnpFileUtil::ReadFileL(class TDesC16 const &)
+	??0CUpnpNotifyTimer@@IAE@PAVMUpnpNotifyTimerObserver@@@Z @ 116 NONAME ; CUpnpNotifyTimer::CUpnpNotifyTimer(class MUpnpNotifyTimerObserver *)
+	?StringToInt@UpnpString@@YAHABVTDesC8@@PAH@Z @ 117 NONAME ; int UpnpString::StringToInt(class TDesC8 const &, int *)
+	?StartServer@CUpnpSymbianServerBase@@SAHABVTDesC16@@P6APAV1@XZ@Z @ 118 NONAME ; int CUpnpSymbianServerBase::StartServer(class TDesC16 const &, class CUpnpSymbianServerBase * (*)(void))
+	?AddHostL@CUpnpSsdpMessage@@QAEXAAVTDesC8@@@Z @ 119 NONAME ; void CUpnpSsdpMessage::AddHostL(class TDesC8 &)
+	?ValueFromCsvL@UpnpString@@YAPAVHBufC8@@ABVTDesC8@@H@Z @ 120 NONAME ; class HBufC8 * UpnpString::ValueFromCsvL(class TDesC8 const &, int)
+	?PrepareShutdown@CUpnpDeviceLibrary@@QAEXXZ @ 121 NONAME ; void CUpnpDeviceLibrary::PrepareShutdown(void)
+	?NewL@CUpnpDeviceLibrary@@SAPAV1@AAVMUpnpDeviceLibraryObserver@@H@Z @ 122 NONAME ; class CUpnpDeviceLibrary * CUpnpDeviceLibrary::NewL(class MUpnpDeviceLibraryObserver &, int)
+	?GetElementListL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV?$RArray@VTXmlEngElement@@@@ABVTDesC8@@222H@Z @ 123 NONAME ; int UpnpDomInterface::GetElementListL(class TXmlEngElement const &, class RArray<class TXmlEngElement> &, class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, int)
+	?StringReplaceL@UpnpString@@YAXABVTDesC8@@AAPAVHBufC8@@00@Z @ 124 NONAME ; void UpnpString::StringReplaceL(class TDesC8 const &, class HBufC8 * &, class TDesC8 const &, class TDesC8 const &)
+	?DecodeXmlStringL@UpnpString@@YAPAVHBufC8@@AAPAV2@@Z @ 125 NONAME ; class HBufC8 * UpnpString::DecodeXmlStringL(class HBufC8 * &)
+	?UpnpError@CUpnpHttpMessage@@SAABVTDesC8@@W4TUpnpErrorCode@@@Z @ 126 NONAME ; class TDesC8 const & CUpnpHttpMessage::UpnpError(enum TUpnpErrorCode)
+	?AddInfoL@CUpnpDeviceLibrary@@QAEXPAVCUpnpSsdpMessage@@@Z @ 127 NONAME ; void CUpnpDeviceLibrary::AddInfoL(class CUpnpSsdpMessage *)
+	?StringReplaceInPlaceL@UpnpString@@YAXAAVTDes8@@ABVTDesC8@@1@Z @ 128 NONAME ; void UpnpString::StringReplaceInPlaceL(class TDes8 &, class TDesC8 const &, class TDesC8 const &)
+	?GetElementListL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV?$RArray@VTXmlEngElement@@@@ABVTDesC8@@H@Z @ 129 NONAME ; int UpnpDomInterface::GetElementListL(class TXmlEngElement const &, class RArray<class TXmlEngElement> &, class TDesC8 const &, int)
+	?IsSsdpByebye@CUpnpSsdpMessage@@QAEHXZ @ 130 NONAME ; int CUpnpSsdpMessage::IsSsdpByebye(void)
+	?ExtractUrlPath@UpnpFileUtil@@YA?AVTPtrC8@@ABVTDesC8@@AAV2@AAH@Z @ 131 NONAME ; class TPtrC8 UpnpFileUtil::ExtractUrlPath(class TDesC8 const &, class TPtrC8 &, int &)
+	?SetClientRequest@CUpnpHttpMessage@@QAEXH@Z @ 132 NONAME ; void CUpnpHttpMessage::SetClientRequest(int)
+	?SetHttpPriority@CUpnpHttpMessage@@QAEXW4TThreadPriority@@@Z @ 133 NONAME ; void CUpnpHttpMessage::SetHttpPriority(enum TThreadPriority)
+	?CancelMessageTimeout@CUpnpHttpMessage@@QAEXXZ @ 134 NONAME ; void CUpnpHttpMessage::CancelMessageTimeout(void)
+	?ToUnicodeL@UpnpString@@YAPAVHBufC16@@ABVTDesC8@@@Z @ 135 NONAME ; class HBufC16 * UpnpString::ToUnicodeL(class TDesC8 const &)
+	?AddrInput@CUpnpHttpMessage@@SAXAAVTInetAddr@@ABVTDesC8@@@Z @ 136 NONAME ; void CUpnpHttpMessage::AddrInput(class TInetAddr &, class TDesC8 const &)
+	?TcpTimeout@CUpnpHttpMessage@@QAEHXZ @ 137 NONAME ; int CUpnpHttpMessage::TcpTimeout(void)
+	?GetIfNameForIap@UpnpIpAddressUtil@@YAXKAAVTDes16@@@Z @ 138 NONAME ; void UpnpIpAddressUtil::GetIfNameForIap(unsigned long, class TDes16 &)
+	?MatchIfNameWithIpInterface@UpnpIpAddressUtil@@YA?AVTInetAddr@@AAVRSocketServ@@AAVTDesC16@@AAH@Z @ 139 NONAME ; class TInetAddr UpnpIpAddressUtil::MatchIfNameWithIpInterface(class RSocketServ &, class TDesC16 &, int &)
+	?ParseUri@UpnpFileUtil@@YAHABVTDesC8@@@Z @ 140 NONAME ; int UpnpFileUtil::ParseUri(class TDesC8 const &)
+	?IsSearchAll@CUpnpSsdpMessage@@QAEHXZ @ 141 NONAME ; int CUpnpSsdpMessage::IsSearchAll(void)
+	??1CUpnpDeviceLibrary@@UAE@XZ @ 142 NONAME ; CUpnpDeviceLibrary::~CUpnpDeviceLibrary(void)
+	?Method@CUpnpHttpMessage@@QAE?BVTPtrC8@@XZ @ 143 NONAME ; class TPtrC8 const CUpnpHttpMessage::Method(void)
+	?PanicClient@CUpnpSymbianServerBase@@QBEXABVRMessage2@@H@Z @ 144 NONAME ; void CUpnpSymbianServerBase::PanicClient(class RMessage2 const &, int) const
+	?CheckSubTagPrefixL@UpnpDomInterface@@YAHABVTXmlEngElement@@ABVTDesC8@@11@Z @ 145 NONAME ; int UpnpDomInterface::CheckSubTagPrefixL(class TXmlEngElement const &, class TDesC8 const &, class TDesC8 const &, class TDesC8 const &)
+	?HttpPriority@CUpnpHttpMessage@@QAE?AW4TThreadPriority@@XZ @ 146 NONAME ; enum TThreadPriority CUpnpHttpMessage::HttpPriority(void)
+	?SearchTarget@CUpnpSsdpMessage@@QAEHXZ @ 147 NONAME ; int CUpnpSsdpMessage::SearchTarget(void)
+	?SenderPath@CUpnpHttpMessage@@QAE?AVTPtrC8@@XZ @ 148 NONAME ; class TPtrC8 CUpnpHttpMessage::SenderPath(void)
+	?RemoveL@CUpnpDeviceLibrary@@QAEXABVTDesC8@@@Z @ 149 NONAME ; void CUpnpDeviceLibrary::RemoveL(class TDesC8 const &)
+	?GetElementL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV2@ABVTDesC8@@HH@Z @ 150 NONAME ; int UpnpDomInterface::GetElementL(class TXmlEngElement const &, class TXmlEngElement &, class TDesC8 const &, int, int)
+	?Body@CUpnpHttpMessage@@QAEAAVTDesC8@@XZ @ 151 NONAME ; class TDesC8 & CUpnpHttpMessage::Body(void)
+	?GetContentElementL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV2@ABVTDesC8@@2HH@Z @ 152 NONAME ; int UpnpDomInterface::GetContentElementL(class TXmlEngElement const &, class TXmlEngElement &, class TDesC8 const &, class TDesC8 const &, int, int)
+	?SetTimeout@CUpnpTimeoutElement@@QAEXH@Z @ 153 NONAME ; void CUpnpTimeoutElement::SetTimeout(int)
+	?AppendContentLengthToHeadersL@CUpnpSsdpMessage@@MAEXAAPAVHBufC8@@@Z @ 154 NONAME ; void CUpnpSsdpMessage::AppendContentLengthToHeadersL(class HBufC8 * &)
+	?ReplaceHttpCharacters@UpnpString@@YAXAAVTDes8@@@Z @ 155 NONAME ; void UpnpString::ReplaceHttpCharacters(class TDes8 &)
+	?CutToPiecesL@UpnpString@@YAXVTPtrC8@@VTChar@@AAV?$RPointerArray@VTPtrC8@@@@@Z @ 156 NONAME ; void UpnpString::CutToPiecesL(class TPtrC8, class TChar, class RPointerArray<class TPtrC8> &)
+	?HttpGetL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTDesC8@@0@Z @ 157 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpGetL(class TDesC8 const &, class TDesC8 const &)
+	?Sender@CUpnpHttpMessage@@QAEAAVTInetAddr@@XZ @ 158 NONAME ; class TInetAddr & CUpnpHttpMessage::Sender(void)
+	?RemoveAllDevicesL@CUpnpDeviceLibrary@@QAEXXZ @ 159 NONAME ; void CUpnpDeviceLibrary::RemoveAllDevicesL(void)
+	??0CUpnpTimeoutElement@@IAE@AAVMUpnpTimeoutElementParent@@@Z @ 160 NONAME ; CUpnpTimeoutElement::CUpnpTimeoutElement(class MUpnpTimeoutElementParent &)
+	?CheckSubTagL@UpnpDomInterface@@YAHABVTXmlEngElement@@ABVTDesC8@@@Z @ 161 NONAME ; int UpnpDomInterface::CheckSubTagL(class TXmlEngElement const &, class TDesC8 const &)
+	?HttpPostL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTDesC8@@@Z @ 162 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpPostL(class TDesC8 const &)
+	?AddInfoL@CUpnpDeviceLibrary@@QAEXPBVTUpnpAddLocalDevice@@ABVTDesC8@@@Z @ 163 NONAME ; void CUpnpDeviceLibrary::AddInfoL(class TUpnpAddLocalDevice const *, class TDesC8 const &)
+	?CheckDiskSpaceShortL@UpnpFileUtil@@YAHABVTDesC16@@HAAVRFs@@@Z @ 164 NONAME ; int UpnpFileUtil::CheckDiskSpaceShortL(class TDesC16 const &, int, class RFs &)
+	?CsvToRPointerArrayL@UpnpString@@YAXABVTDesC8@@AAV?$RPointerArray@VTPtrC8@@@@@Z @ 165 NONAME ; void UpnpString::CsvToRPointerArrayL(class TDesC8 const &, class RPointerArray<class TPtrC8> &)
+	?NewL@CUpnpNotifyTimer@@SAPAV1@PAVMUpnpNotifyTimerObserver@@@Z @ 166 NONAME ; class CUpnpNotifyTimer * CUpnpNotifyTimer::NewL(class MUpnpNotifyTimerObserver *)
+	?Connect@RUpnpSessionBase@@IAEHABVTDesC16@@VTVersion@@HH0VTUid@@@Z @ 167 NONAME ; int RUpnpSessionBase::Connect(class TDesC16 const &, class TVersion, int, int, class TDesC16 const &, class TUid)
+	?IsSoap@CUpnpHttpMessage@@QBEHXZ @ 168 NONAME ; int CUpnpHttpMessage::IsSoap(void) const
+	?Value@CUpnpHttpHeader@@QAEAAVTDesC8@@XZ @ 169 NONAME ; class TDesC8 & CUpnpHttpHeader::Value(void)
+	??1CUpnpTimeoutElement@@UAE@XZ @ 170 NONAME ; CUpnpTimeoutElement::~CUpnpTimeoutElement(void)
+	?SessionIdMatch@CUpnpHttpMessage@@SAHABV1@0@Z @ 171 NONAME ; int CUpnpHttpMessage::SessionIdMatch(class CUpnpHttpMessage const &, class CUpnpHttpMessage const &)
+	?NewL@CUpnpSsdpMessage@@SAPAV1@W4TRequestType@1@@Z @ 172 NONAME ; class CUpnpSsdpMessage * CUpnpSsdpMessage::NewL(enum CUpnpSsdpMessage::TRequestType)
+	?RunError@CUpnpSymbianServerBase@@MAEHH@Z @ 173 NONAME ; int CUpnpSymbianServerBase::RunError(int)
+	?GetContentElementListL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV?$RArray@VTXmlEngElement@@@@ABVTDesC8@@2H@Z @ 174 NONAME ; int UpnpDomInterface::GetContentElementListL(class TXmlEngElement const &, class RArray<class TXmlEngElement> &, class TDesC8 const &, class TDesC8 const &, int)
+	?HttpPostL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTInetAddr@@ABVTDesC8@@@Z @ 175 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpPostL(class TInetAddr const &, class TDesC8 const &)
+	?Alive@CUpnpDeviceLibraryElement@@QBEHXZ @ 176 NONAME ; int CUpnpDeviceLibraryElement::Alive(void) const
+	?TimerEventL@CUpnpHttpMessage@@MAEXPAVCUpnpNotifyTimer@@@Z @ 177 NONAME ; void CUpnpHttpMessage::TimerEventL(class CUpnpNotifyTimer *)
+	?AppendContentLengthToHeadersL@CUpnpHttpMessage@@MAEXAAPAVHBufC8@@@Z @ 178 NONAME ; void CUpnpHttpMessage::AppendContentLengthToHeadersL(class HBufC8 * &)
+	?ConstructL@CUpnpHttpMessage@@IAEXAAVTInetAddr@@H@Z @ 179 NONAME ; void CUpnpHttpMessage::ConstructL(class TInetAddr &, int)
+	?SetUpdateId@CUpnpDeviceLibraryElement@@QAEXH@Z @ 180 NONAME ; void CUpnpDeviceLibraryElement::SetUpdateId(int)
+	?Offset@CUpnpHttpMessage@@QAEHXZ @ 181 NONAME ; int CUpnpHttpMessage::Offset(void)
+	?SetInFilenameL@CUpnpHttpMessage@@QAEXABVTDesC8@@H@Z @ 182 NONAME ; void CUpnpHttpMessage::SetInFilenameL(class TDesC8 const &, int)
+	?IsColon@UpnpString@@YAHABE@Z @ 183 NONAME ; int UpnpString::IsColon(unsigned char const &)
+	?Receiver@CUpnpHttpMessage@@QAEAAVTInetAddr@@XZ @ 184 NONAME ; class TInetAddr & CUpnpHttpMessage::Receiver(void)
+	?IsHeader@CUpnpHttpMessage@@QAEAAVTDesC8@@ABV2@AAH@Z @ 185 NONAME ; class TDesC8 & CUpnpHttpMessage::IsHeader(class TDesC8 const &, int &)
+	?IsSearchDevice@CUpnpSsdpMessage@@QAEHXZ @ 186 NONAME ; int CUpnpSsdpMessage::IsSearchDevice(void)
+	?IsSsdpAlive@CUpnpSsdpMessage@@QAEHXZ @ 187 NONAME ; int CUpnpSsdpMessage::IsSsdpAlive(void)
+	?RemoveFromCsvLC@UpnpString@@YAPAVHBufC8@@ABVTDesC8@@0@Z @ 188 NONAME ; class HBufC8 * UpnpString::RemoveFromCsvLC(class TDesC8 const &, class TDesC8 const &)
+	?SearchL@RUpnpSsdpMessageFactory@@SAPAVCUpnpSsdpMessage@@AAVTDesC8@@@Z @ 189 NONAME ; class CUpnpSsdpMessage * RUpnpSsdpMessageFactory::SearchL(class TDesC8 &)
+	?FoldHeaderL@CUpnpHttpMessage@@IAEXAAPAVHBufC8@@@Z @ 190 NONAME ; void CUpnpHttpMessage::FoldHeaderL(class HBufC8 * &)
+	?NewL@CUpnpDeviceLibraryElement@@SAPAV1@AAVMUpnpTimeoutElementParent@@@Z @ 191 NONAME ; class CUpnpDeviceLibraryElement * CUpnpDeviceLibraryElement::NewL(class MUpnpTimeoutElementParent &)
+	?NewL@CUpnpMSearchTimer@@SAPAV1@PAVMUpnpNotifyTimerObserver@@ABVTDesC8@@1@Z @ 192 NONAME ; class CUpnpMSearchTimer * CUpnpMSearchTimer::NewL(class MUpnpNotifyTimerObserver *, class TDesC8 const &, class TDesC8 const &)
+	?RunL@CUpnpTimeoutElement@@UAEXXZ @ 193 NONAME ; void CUpnpTimeoutElement::RunL(void)
+	?SetSenderPathL@CUpnpHttpMessage@@QAEXABVTDesC8@@@Z @ 194 NONAME ; void CUpnpHttpMessage::SetSenderPathL(class TDesC8 const &)
+	?UpnpResponseErrorL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@PAV2@W4TUpnpErrorCode@@@Z @ 195 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::UpnpResponseErrorL(class CUpnpHttpMessage *, enum TUpnpErrorCode)
+	?DevicePath@CUpnpHttpMessage@@QAE?BVTPtrC8@@XZ @ 196 NONAME ; class TPtrC8 const CUpnpHttpMessage::DevicePath(void)
+	??0CUpnpHttpMessage@@IAE@XZ @ 197 NONAME ; CUpnpHttpMessage::CUpnpHttpMessage(void)
+	?TimerEventL@CUpnpSymbianServerBase@@MAEXPAVCUpnpNotifyTimer@@@Z @ 198 NONAME ; void CUpnpSymbianServerBase::TimerEventL(class CUpnpNotifyTimer *)
+	?Error@CUpnpHttpMessage@@QAEHXZ @ 199 NONAME ; int CUpnpHttpMessage::Error(void)
+	?NewL@CUpnpHttpMessage@@SAPAV1@VTInetAddr@@H@Z @ 200 NONAME ; class CUpnpHttpMessage * CUpnpHttpMessage::NewL(class TInetAddr, int)
+	?CheckSubTagL@UpnpDomInterface@@YAHABVTXmlEngElement@@ABVTDesC8@@1@Z @ 201 NONAME ; int UpnpDomInterface::CheckSubTagL(class TXmlEngElement const &, class TDesC8 const &, class TDesC8 const &)
+	?Local@CUpnpHttpMessage@@QAEHXZ @ 202 NONAME ; int CUpnpHttpMessage::Local(void)
+	?SetInternalError@CUpnpHttpMessage@@QAEXH@Z @ 203 NONAME ; void CUpnpHttpMessage::SetInternalError(int)
+	?ToStringL@CUpnpHttpMessage@@UAEPAVHBufC8@@XZ @ 204 NONAME ; class HBufC8 * CUpnpHttpMessage::ToStringL(void)
+	?NewL@CUpnpHttpMessage@@SAPAV1@AAVTDesC8@@VTInetAddr@@@Z @ 205 NONAME ; class CUpnpHttpMessage * CUpnpHttpMessage::NewL(class TDesC8 &, class TInetAddr)
+	?After@CUpnpNotifyTimer@@QAEXHH@Z @ 206 NONAME ; void CUpnpNotifyTimer::After(int, int)
+	?ParseL@CUpnpHttpMessage@@MAEXAAVTDesC8@@@Z @ 207 NONAME ; void CUpnpHttpMessage::ParseL(class TDesC8 &)
+	?HttpPostL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTDesC8@@0@Z @ 208 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpPostL(class TDesC8 const &, class TDesC8 const &)
+	?HttpResponseOkL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@PAV2@@Z @ 209 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpResponseOkL(class CUpnpHttpMessage *)
+	?DeviceType@CUpnpDeviceLibraryElement@@QAEAAVTDesC8@@XZ @ 210 NONAME ; class TDesC8 & CUpnpDeviceLibraryElement::DeviceType(void)
+	?GetDirectoryElementL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV2@ABVTDesC8@@2HH@Z @ 211 NONAME ; int UpnpDomInterface::GetDirectoryElementL(class TXmlEngElement const &, class TXmlEngElement &, class TDesC8 const &, class TDesC8 const &, int, int)
+	?AppendStringL@UpnpString@@YAXAAPAVHBufC8@@ABVTDesC8@@@Z @ 212 NONAME ; void UpnpString::AppendStringL(class HBufC8 * &, class TDesC8 const &)
+	?SetSessionId@CUpnpHttpMessage@@QAEXH@Z @ 213 NONAME ; void CUpnpHttpMessage::SetSessionId(int)
+	?InternalError@CUpnpHttpMessage@@QAEHXZ @ 214 NONAME ; int CUpnpHttpMessage::InternalError(void)
+	?SearchL@RUpnpSsdpMessageFactory@@SAPAVCUpnpSsdpMessage@@AAVTDesC8@@0@Z @ 215 NONAME ; class CUpnpSsdpMessage * RUpnpSsdpMessageFactory::SearchL(class TDesC8 &, class TDesC8 &)
+	?HttpResponseErrorL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@PAV2@H@Z @ 216 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpResponseErrorL(class CUpnpHttpMessage *, int)
+	?Set@TUpnpDevice@@QAEXPAVCUpnpDeviceLibraryElement@@@Z @ 217 NONAME ; void TUpnpDevice::Set(class CUpnpDeviceLibraryElement *)
+	?NewL@CUpnpHttpMessage@@SAPAV1@ABVTInetAddr@@@Z @ 218 NONAME ; class CUpnpHttpMessage * CUpnpHttpMessage::NewL(class TInetAddr const &)
+	?AddMxL@CUpnpSsdpMessage@@QAEXAAVTDesC8@@@Z @ 219 NONAME ; void CUpnpSsdpMessage::AddMxL(class TDesC8 &)
+	?Type@CUpnpHttpMessage@@QBE?AW4THTTPMsgType@@XZ @ 220 NONAME ; enum THTTPMsgType CUpnpHttpMessage::Type(void) const
+	?IsRootDevice@CUpnpDeviceLibraryElement@@QBEHXZ @ 221 NONAME ; int CUpnpDeviceLibraryElement::IsRootDevice(void) const
+	?SetMessageTimeoutL@CUpnpHttpMessage@@QAEHPAVMUpnpMessageObserver@@H@Z @ 222 NONAME ; int CUpnpHttpMessage::SetMessageTimeoutL(class MUpnpMessageObserver *, int)
+	?BaseConstructL@CUpnpSymbianServerBase@@IAEXXZ @ 223 NONAME ; void CUpnpSymbianServerBase::BaseConstructL(void)
+	?GetElementListL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV?$RArray@VTXmlEngElement@@@@ABVTDesC8@@22H@Z @ 224 NONAME ; int UpnpDomInterface::GetElementListL(class TXmlEngElement const &, class RArray<class TXmlEngElement> &, class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, int)
+	?GetDirectoryElementL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV2@ABVTDesC8@@22HH@Z @ 225 NONAME ; int UpnpDomInterface::GetDirectoryElementL(class TXmlEngElement const &, class TXmlEngElement &, class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, int, int)
+	?AsTDeviceL@CUpnpDeviceLibraryElement@@QBEPAVTUpnpDevice@@XZ @ 226 NONAME ; class TUpnpDevice * CUpnpDeviceLibraryElement::AsTDeviceL(void) const
+	?St@CUpnpSsdpMessage@@QAEAAVTDesC8@@XZ @ 227 NONAME ; class TDesC8 & CUpnpSsdpMessage::St(void)
+	?AddInfoL@CUpnpDeviceLibraryElement@@QAEXPBVTUpnpAddLocalDevice@@ABVTDesC8@@@Z @ 228 NONAME ; void CUpnpDeviceLibraryElement::AddInfoL(class TUpnpAddLocalDevice const *, class TDesC8 const &)
+	?NewSessionL@CUpnpSymbianServerBase@@MBEPAVCSession2@@ABVTVersion@@ABVRMessage2@@@Z @ 229 NONAME ; class CSession2 * CUpnpSymbianServerBase::NewSessionL(class TVersion const &, class RMessage2 const &) const
+	?SetNameL@CUpnpHttpHeader@@QAEXABVTDesC8@@@Z @ 230 NONAME ; void CUpnpHttpHeader::SetNameL(class TDesC8 const &)
+	?AppendStringL@UpnpString@@YAXAAVCBufFlat@@ABVTDesC8@@@Z @ 231 NONAME ; void UpnpString::AppendStringL(class CBufFlat &, class TDesC8 const &)
+	?CompleteOneselfImmediate@CUpnpNotifyTimer@@QAEXXZ @ 232 NONAME ; void CUpnpNotifyTimer::CompleteOneselfImmediate(void)
+	?Name@CUpnpHttpHeader@@QAEAAVTDesC8@@XZ @ 233 NONAME ; class TDesC8 & CUpnpHttpHeader::Name(void)
+	?StringReplaceL@UpnpString@@YAPAVHBufC8@@ABVTDesC8@@00@Z @ 234 NONAME ; class HBufC8 * UpnpString::StringReplaceL(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &)
+	?UnFoldHeader@CUpnpHttpMessage@@IAEXAAPAVHBufC8@@@Z @ 235 NONAME ; void CUpnpHttpMessage::UnFoldHeader(class HBufC8 * &)
+	?GetUpdate@CUpnpDeviceLibrary@@QAEXAAHAAPAVTUpnpDevice@@AAPAVTUpnpService@@00@Z @ 236 NONAME ; void CUpnpDeviceLibrary::GetUpdate(int &, class TUpnpDevice * &, class TUpnpService * &, int &, int &)
+	?OutUri@CUpnpHttpMessage@@QAEABVTDesC8@@XZ @ 237 NONAME ; class TDesC8 const & CUpnpHttpMessage::OutUri(void)
+	?BodyLength@CUpnpHttpMessage@@QBEHXZ @ 238 NONAME ; int CUpnpHttpMessage::BodyLength(void) const
+	??1CUpnpSymbianServerBase@@UAE@XZ @ 239 NONAME ; CUpnpSymbianServerBase::~CUpnpSymbianServerBase(void)
+	?UpnpResponseErrorL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTInetAddr@@W4TUpnpErrorCode@@@Z @ 240 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::UpnpResponseErrorL(class TInetAddr const &, enum TUpnpErrorCode)
+	?HttpResponseErrorL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@ABVTInetAddr@@H@Z @ 241 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpResponseErrorL(class TInetAddr const &, int)
+	?DoCancel@CUpnpNotifyTimer@@UAEXXZ @ 242 NONAME ; void CUpnpNotifyTimer::DoCancel(void)
+	?CanBeStopped@CUpnpSymbianServerBase@@EBEHXZ @ 243 NONAME ; int CUpnpSymbianServerBase::CanBeStopped(void) const
+	?SetPendingRequest@CUpnpHttpMessage@@QAEXPAX@Z @ 244 NONAME ; void CUpnpHttpMessage::SetPendingRequest(void *)
+	?CheckTagL@UpnpDomInterface@@YAHABVTXmlEngElement@@ABVTDesC8@@@Z @ 245 NONAME ; int UpnpDomInterface::CheckTagL(class TXmlEngElement const &, class TDesC8 const &)
+	??1CUpnpSsdpMessage@@UAE@XZ @ 246 NONAME ; CUpnpSsdpMessage::~CUpnpSsdpMessage(void)
+	?HttpHeadL@RUpnpHttpMessageFactory@@SAPAVCUpnpHttpMessage@@AAVTInetAddr@@ABVTDesC8@@@Z @ 247 NONAME ; class CUpnpHttpMessage * RUpnpHttpMessageFactory::HttpHeadL(class TInetAddr &, class TDesC8 const &)
+	?SetRetryCounter@CUpnpHttpMessage@@QAEXH@Z @ 248 NONAME ; void CUpnpHttpMessage::SetRetryCounter(int)
+	?SetMessageDateL@CUpnpHttpMessage@@QAEXABVTTime@@@Z @ 249 NONAME ; void CUpnpHttpMessage::SetMessageDateL(class TTime const &)
+	?NewL@CUpnpHttpMessage@@SAPAV1@XZ @ 250 NONAME ; class CUpnpHttpMessage * CUpnpHttpMessage::NewL(void)
+	?Length@CUpnpHttpMessage@@QAEHXZ @ 251 NONAME ; int CUpnpHttpMessage::Length(void)
+	?AllocElementValueL@UpnpDomInterface@@YAPAVHBufC16@@ABVTXmlEngElement@@@Z @ 252 NONAME ; class HBufC16 * UpnpDomInterface::AllocElementValueL(class TXmlEngElement const &)
+	?GetElementL@UpnpDomInterface@@YAHABVTXmlEngElement@@AAV2@ABVTDesC8@@22HH@Z @ 253 NONAME ; int UpnpDomInterface::GetElementL(class TXmlEngElement const &, class TXmlEngElement &, class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, int, int)
+	?CheckTagL@UpnpDomInterface@@YAHABVTXmlEngElement@@ABVTDesC8@@1@Z @ 254 NONAME ; int UpnpDomInterface::CheckTagL(class TXmlEngElement const &, class TDesC8 const &, class TDesC8 const &)
+	?NewLC@CUpnpMSearchTimer@@SAPAV1@PAVMUpnpNotifyTimerObserver@@ABVTDesC8@@1@Z @ 255 NONAME ; class CUpnpMSearchTimer * CUpnpMSearchTimer::NewLC(class MUpnpNotifyTimerObserver *, class TDesC8 const &, class TDesC8 const &)
+	?UpnpErrorL@CUpnpHttpMessage@@SAPAVHBufC8@@W4TUpnpErrorCode@@@Z @ 256 NONAME ; class HBufC8 * CUpnpHttpMessage::UpnpErrorL(enum TUpnpErrorCode)
+	?SetValueL@CUpnpHttpHeader@@QAEXABVTDesC8@@@Z @ 257 NONAME ; void CUpnpHttpHeader::SetValueL(class TDesC8 const &)
+	?AddValueToCsvL@UpnpString@@YAPAVHBufC8@@ABVTDesC8@@0@Z @ 258 NONAME ; class HBufC8 * UpnpString::AddValueToCsvL(class TDesC8 const &, class TDesC8 const &)
+	?AddInfoL@CUpnpDeviceLibraryElement@@QAEHPAVCUpnpSsdpMessage@@AAH@Z @ 259 NONAME ; int CUpnpDeviceLibraryElement::AddInfoL(class CUpnpSsdpMessage *, int &)
+	?GetElementValueL@UpnpDomInterface@@YA?AVTPtrC8@@ABVTXmlEngElement@@@Z @ 260 NONAME ; class TPtrC8 UpnpDomInterface::GetElementValueL(class TXmlEngElement const &)
+	?AddInfoL@CUpnpDeviceLibraryElement@@QAEXPBVTUpnpAddLocalDevice@@ABVTDesC8@@ABVTInetAddr@@@Z @ 261 NONAME ; void CUpnpDeviceLibraryElement::AddInfoL(class TUpnpAddLocalDevice const *, class TDesC8 const &, class TInetAddr const &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/eabi/upnpipserversutilsu.def	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,298 @@
+EXPORTS
+	_ZN10UpnpString10ToUnicodeLERK6TDesC8 @ 1 NONAME
+	_ZN10UpnpString11StringToIntERK6TDesC8Pi @ 2 NONAME
+	_ZN10UpnpString12CutToPiecesLE6TPtrC85TCharR13RPointerArrayIS0_E @ 3 NONAME
+	_ZN10UpnpString12FromUnicodeLERK7TDesC16 @ 4 NONAME
+	_ZN10UpnpString13AppendStringLER8CBufFlatRK6TDesC8 @ 5 NONAME
+	_ZN10UpnpString13AppendStringLERP6HBufC8RK6TDesC8 @ 6 NONAME
+	_ZN10UpnpString13CurrentDateLCEv @ 7 NONAME
+	_ZN10UpnpString13InetToStringLERK9TInetAddr @ 8 NONAME
+	_ZN10UpnpString13ValueFromCsvLERK6TDesC8i @ 9 NONAME
+	_ZN10UpnpString14AddValueToCsvLERK6TDesC8S2_ @ 10 NONAME
+	_ZN10UpnpString14StringReplaceLERK6TDesC8RP6HBufC8S2_S2_ @ 11 NONAME
+	_ZN10UpnpString14StringReplaceLERK6TDesC8S2_S2_ @ 12 NONAME
+	_ZN10UpnpString15RemoveFromCsvLCERK6TDesC8S2_ @ 13 NONAME
+	_ZN10UpnpString16DecodeXmlStringLERK6TDesC8 @ 14 NONAME
+	_ZN10UpnpString16DecodeXmlStringLERP6HBufC8 @ 15 NONAME
+	_ZN10UpnpString16EncodeXmlStringLERK6TDesC8 @ 16 NONAME
+	_ZN10UpnpString16EncodeXmlStringLERP6HBufC8 @ 17 NONAME
+	_ZN10UpnpString19CsvToRPointerArrayLERK6TDesC8R13RPointerArrayI6TPtrC8E @ 18 NONAME
+	_ZN10UpnpString20RPointerArrayToCsvLCER13RPointerArrayI6TPtrC8E @ 19 NONAME
+	_ZN10UpnpString21ReplaceHttpCharactersER5TDes8 @ 20 NONAME
+	_ZN10UpnpString21StringReplaceInPlaceLER5TDes8RK6TDesC8S4_ @ 21 NONAME
+	_ZN10UpnpString22ReplaceHttpCharactersLER6TDes16 @ 22 NONAME
+	_ZN10UpnpString4TrimE6TPtrC8i @ 23 NONAME
+	_ZN10UpnpString6TrimLCERK6TDesC8i @ 24 NONAME
+	_ZN10UpnpString7IsColonERKh @ 25 NONAME
+	_ZN11TUpnpDevice3SetEP25CUpnpDeviceLibraryElement @ 26 NONAME
+	_ZN12UpnpFileUtil14ExtractUrlPathERK6TDesC8R6TPtrC8Ri @ 27 NONAME
+	_ZN12UpnpFileUtil14ExtractUrlPathERK6TDesC8R6TPtrC8S4_Ri @ 28 NONAME
+	_ZN12UpnpFileUtil14ExtractUrlPathERK6TDesC8Ri @ 29 NONAME
+	_ZN12UpnpFileUtil18SwitchToBackSlashLERK6TDesC8 @ 30 NONAME
+	_ZN12UpnpFileUtil18SwitchToBackSlashLERK7TDesC16 @ 31 NONAME
+	_ZN12UpnpFileUtil19GetMimeTypeForFileLERK7TDesC16 @ 32 NONAME
+	_ZN12UpnpFileUtil20CheckDiskSpaceShortLE12TDriveNumberi @ 33 NONAME
+	_ZN12UpnpFileUtil20CheckDiskSpaceShortLERK7TDesC16iR3RFs @ 34 NONAME
+	_ZN12UpnpFileUtil8ParseUriERK6TDesC8 @ 35 NONAME
+	_ZN12UpnpFileUtil9ReadFileLERK7TDesC16 @ 36 NONAME
+	_ZN15CUpnpHttpHeader4NameEv @ 37 NONAME
+	_ZN15CUpnpHttpHeader5ValueEv @ 38 NONAME
+	_ZN15CUpnpHttpHeader8SetNameLERK6TDesC8 @ 39 NONAME
+	_ZN15CUpnpHttpHeader9SetValueLERK6TDesC8 @ 40 NONAME
+	_ZN16CUpnpHttpMessage10AddrOutputERK9TInetAddrR5TDes8 @ 41 NONAME
+	_ZN16CUpnpHttpMessage10ConstructLER9TInetAddri @ 42 NONAME
+	_ZN16CUpnpHttpMessage10ConstructLEv @ 43 NONAME
+	_ZN16CUpnpHttpMessage10DevicePathEv @ 44 NONAME
+	_ZN16CUpnpHttpMessage10HeaderListEv @ 45 NONAME
+	_ZN16CUpnpHttpMessage10InFilenameEv @ 46 NONAME
+	_ZN16CUpnpHttpMessage10SenderPathEv @ 47 NONAME
+	_ZN16CUpnpHttpMessage10SetOutUriLERK6TDesC8 @ 48 NONAME
+	_ZN16CUpnpHttpMessage10TcpTimeoutEv @ 49 NONAME
+	_ZN16CUpnpHttpMessage10UpnpErrorLE14TUpnpErrorCode @ 50 NONAME
+	_ZN16CUpnpHttpMessage11FoldHeaderLERP6HBufC8 @ 51 NONAME
+	_ZN16CUpnpHttpMessage11OutFilenameEv @ 52 NONAME
+	_ZN16CUpnpHttpMessage11RemovePairLERK6TDesC8 @ 53 NONAME
+	_ZN16CUpnpHttpMessage11TimerEventLEP16CUpnpNotifyTimer @ 54 NONAME
+	_ZN16CUpnpHttpMessage12HttpPriorityEv @ 55 NONAME
+	_ZN16CUpnpHttpMessage12RetryCounterEv @ 56 NONAME
+	_ZN16CUpnpHttpMessage12SaveAtOffsetEv @ 57 NONAME
+	_ZN16CUpnpHttpMessage12SetSessionIdEi @ 58 NONAME
+	_ZN16CUpnpHttpMessage12UnFoldHeaderERP6HBufC8 @ 59 NONAME
+	_ZN16CUpnpHttpMessage13ClientRequestEv @ 60 NONAME
+	_ZN16CUpnpHttpMessage13InternalErrorEv @ 61 NONAME
+	_ZN16CUpnpHttpMessage13NewSessionIdLEv @ 62 NONAME
+	_ZN16CUpnpHttpMessage13SetTcpTimeoutEi @ 63 NONAME
+	_ZN16CUpnpHttpMessage14GetHeaderValueERK6TDesC8 @ 64 NONAME
+	_ZN16CUpnpHttpMessage14PendingRequestEv @ 65 NONAME
+	_ZN16CUpnpHttpMessage14SessionIdMatchERKS_S1_ @ 66 NONAME
+	_ZN16CUpnpHttpMessage14SetInFilenameLERK6TDesC8i @ 67 NONAME
+	_ZN16CUpnpHttpMessage14SetSenderPathLERK6TDesC8 @ 68 NONAME
+	_ZN16CUpnpHttpMessage15DestinationPathEv @ 69 NONAME
+	_ZN16CUpnpHttpMessage15ParseHeaderRowLERK6TDesC8i @ 70 NONAME
+	_ZN16CUpnpHttpMessage15SetHttpPriorityE15TThreadPriority @ 71 NONAME
+	_ZN16CUpnpHttpMessage15SetMessageDateLERK5TTime @ 72 NONAME
+	_ZN16CUpnpHttpMessage15SetOutFilenameLERK6TDesC8 @ 73 NONAME
+	_ZN16CUpnpHttpMessage15SetRetryCounterEi @ 74 NONAME
+	_ZN16CUpnpHttpMessage16HeadersToStringLEv @ 75 NONAME
+	_ZN16CUpnpHttpMessage16SetClientRequestEi @ 76 NONAME
+	_ZN16CUpnpHttpMessage16SetInternalErrorEi @ 77 NONAME
+	_ZN16CUpnpHttpMessage17OverwriteExistingEv @ 78 NONAME
+	_ZN16CUpnpHttpMessage17SetPendingRequestEPv @ 79 NONAME
+	_ZN16CUpnpHttpMessage18RequestHTTPVersionEv @ 80 NONAME
+	_ZN16CUpnpHttpMessage18SetMessageTimeoutLEP20MUpnpMessageObserveri @ 81 NONAME
+	_ZN16CUpnpHttpMessage19SetDestinationPathLERK6TDesC8 @ 82 NONAME
+	_ZN16CUpnpHttpMessage20CancelMessageTimeoutEv @ 83 NONAME
+	_ZN16CUpnpHttpMessage20SenderPathFromHeaderEv @ 84 NONAME
+	_ZN16CUpnpHttpMessage29AppendContentLengthToHeadersLERP6HBufC8 @ 85 NONAME
+	_ZN16CUpnpHttpMessage4BodyEv @ 86 NONAME
+	_ZN16CUpnpHttpMessage4NewLE9TInetAddri @ 87 NONAME
+	_ZN16CUpnpHttpMessage4NewLER6TDesC89TInetAddr @ 88 NONAME
+	_ZN16CUpnpHttpMessage4NewLER6TDesC8RK9TInetAddri @ 89 NONAME
+	_ZN16CUpnpHttpMessage4NewLERK9TInetAddr @ 90 NONAME
+	_ZN16CUpnpHttpMessage4NewLEv @ 91 NONAME
+	_ZN16CUpnpHttpMessage5ErrorEv @ 92 NONAME
+	_ZN16CUpnpHttpMessage5Is1xxEv @ 93 NONAME
+	_ZN16CUpnpHttpMessage5Is2xxEv @ 94 NONAME
+	_ZN16CUpnpHttpMessage5Is3xxEv @ 95 NONAME
+	_ZN16CUpnpHttpMessage5LocalEv @ 96 NONAME
+	_ZN16CUpnpHttpMessage6IsGenaEv @ 97 NONAME
+	_ZN16CUpnpHttpMessage6LengthEv @ 98 NONAME
+	_ZN16CUpnpHttpMessage6MethodEv @ 99 NONAME
+	_ZN16CUpnpHttpMessage6OffsetEv @ 100 NONAME
+	_ZN16CUpnpHttpMessage6OutUriEv @ 101 NONAME
+	_ZN16CUpnpHttpMessage6ParseLER6TDesC8 @ 102 NONAME
+	_ZN16CUpnpHttpMessage6SenderEv @ 103 NONAME
+	_ZN16CUpnpHttpMessage7FindLWSERK6TDesC8 @ 104 NONAME
+	_ZN16CUpnpHttpMessage7SetTypeE12THTTPMsgType @ 105 NONAME
+	_ZN16CUpnpHttpMessage8AddPairLERK6TDesC8S2_ @ 106 NONAME
+	_ZN16CUpnpHttpMessage8IsHeaderERK6TDesC8Ri @ 107 NONAME
+	_ZN16CUpnpHttpMessage8ReceiverEv @ 108 NONAME
+	_ZN16CUpnpHttpMessage8SetBodyLERK6TDesC8 @ 109 NONAME
+	_ZN16CUpnpHttpMessage8SetLocalEi @ 110 NONAME
+	_ZN16CUpnpHttpMessage9AddrInputER9TInetAddrRK6TDesC8 @ 111 NONAME
+	_ZN16CUpnpHttpMessage9HttpErrorE15THttpStatusCode @ 112 NONAME
+	_ZN16CUpnpHttpMessage9SetRangeLEiii @ 113 NONAME
+	_ZN16CUpnpHttpMessage9ToStringLEv @ 114 NONAME
+	_ZN16CUpnpHttpMessage9UpnpErrorE14TUpnpErrorCode @ 115 NONAME
+	_ZN16CUpnpHttpMessageC1Ev @ 116 NONAME
+	_ZN16CUpnpHttpMessageC2Ev @ 117 NONAME
+	_ZN16CUpnpHttpMessageD0Ev @ 118 NONAME
+	_ZN16CUpnpHttpMessageD1Ev @ 119 NONAME
+	_ZN16CUpnpHttpMessageD2Ev @ 120 NONAME
+	_ZN16CUpnpNotifyTimer12AfterSecondsEi @ 121 NONAME
+	_ZN16CUpnpNotifyTimer24CompleteOneselfImmediateEv @ 122 NONAME
+	_ZN16CUpnpNotifyTimer4NewLEP24MUpnpNotifyTimerObserver @ 123 NONAME
+	_ZN16CUpnpNotifyTimer5AfterE27TTimeIntervalMicroSeconds32i @ 124 NONAME
+	_ZN16CUpnpNotifyTimer5AfterEii @ 125 NONAME
+	_ZN16CUpnpNotifyTimer5StartE27TTimeIntervalMicroSeconds32i @ 126 NONAME
+	_ZN16CUpnpNotifyTimer8DoCancelEv @ 127 NONAME
+	_ZN16CUpnpNotifyTimerC1EP24MUpnpNotifyTimerObserver @ 128 NONAME
+	_ZN16CUpnpNotifyTimerC2EP24MUpnpNotifyTimerObserver @ 129 NONAME
+	_ZN16CUpnpSsdpMessage11IsSearchAllEv @ 130 NONAME
+	_ZN16CUpnpSsdpMessage11IsSsdpAliveEv @ 131 NONAME
+	_ZN16CUpnpSsdpMessage12CacheControlEv @ 132 NONAME
+	_ZN16CUpnpSsdpMessage12IsSsdpByebyeEv @ 133 NONAME
+	_ZN16CUpnpSsdpMessage12IsSsdpNotifyEv @ 134 NONAME
+	_ZN16CUpnpSsdpMessage12SearchTargetEv @ 135 NONAME
+	_ZN16CUpnpSsdpMessage13IsSsdpMSearchEv @ 136 NONAME
+	_ZN16CUpnpSsdpMessage14IsSearchDeviceEv @ 137 NONAME
+	_ZN16CUpnpSsdpMessage14IsSsdpResponseEv @ 138 NONAME
+	_ZN16CUpnpSsdpMessage15IsSearchServiceEv @ 139 NONAME
+	_ZN16CUpnpSsdpMessage29AppendContentLengthToHeadersLERP6HBufC8 @ 140 NONAME
+	_ZN16CUpnpSsdpMessage2NtEv @ 141 NONAME
+	_ZN16CUpnpSsdpMessage2StEv @ 142 NONAME
+	_ZN16CUpnpSsdpMessage3NtsEv @ 143 NONAME
+	_ZN16CUpnpSsdpMessage3UsnEv @ 144 NONAME
+	_ZN16CUpnpSsdpMessage4NewLENS_12TRequestTypeE @ 145 NONAME
+	_ZN16CUpnpSsdpMessage4NewLER6TDesC8R9TInetAddr @ 146 NONAME
+	_ZN16CUpnpSsdpMessage4NewLER9TInetAddrNS_12TRequestTypeE @ 147 NONAME
+	_ZN16CUpnpSsdpMessage4UuidEv @ 148 NONAME
+	_ZN16CUpnpSsdpMessage6AddMxLER6TDesC8 @ 149 NONAME
+	_ZN16CUpnpSsdpMessage8AddHostLER6TDesC8 @ 150 NONAME
+	_ZN16CUpnpSsdpMessage8LocationEv @ 151 NONAME
+	_ZN16RUpnpSessionBase7ConnectERK7TDesC168TVersioniiS2_4TUid @ 152 NONAME
+	_ZN16UpnpDomInterface11GetElementLERK14TXmlEngElementRS0_RK6TDesC8S6_S6_ii @ 153 NONAME
+	_ZN16UpnpDomInterface11GetElementLERK14TXmlEngElementRS0_RK6TDesC8S6_ii @ 154 NONAME
+	_ZN16UpnpDomInterface11GetElementLERK14TXmlEngElementRS0_RK6TDesC8ii @ 155 NONAME
+	_ZN16UpnpDomInterface11SaveToFileLERK7TDesC16RK14TXmlEngElement @ 156 NONAME
+	_ZN16UpnpDomInterface11SaveToFileLERK7TDesC16RK6TDesC8 @ 157 NONAME
+	_ZN16UpnpDomInterface12CheckSubTagLERK14TXmlEngElementRK6TDesC8 @ 158 NONAME
+	_ZN16UpnpDomInterface12CheckSubTagLERK14TXmlEngElementRK6TDesC8S5_ @ 159 NONAME
+	_ZN16UpnpDomInterface13DeleteElementER14TXmlEngElement @ 160 NONAME
+	_ZN16UpnpDomInterface13GetAttrValueLERK14TXmlEngElementRK6TDesC8 @ 161 NONAME
+	_ZN16UpnpDomInterface15GetElementListLERK14TXmlEngElementR6RArrayIS0_ERK6TDesC8S8_S8_S8_i @ 162 NONAME
+	_ZN16UpnpDomInterface15GetElementListLERK14TXmlEngElementR6RArrayIS0_ERK6TDesC8S8_S8_i @ 163 NONAME
+	_ZN16UpnpDomInterface15GetElementListLERK14TXmlEngElementR6RArrayIS0_ERK6TDesC8i @ 164 NONAME
+	_ZN16UpnpDomInterface16GetElementValueLERK14TXmlEngElement @ 165 NONAME
+	_ZN16UpnpDomInterface18AllocElementValueLERK14TXmlEngElement @ 166 NONAME
+	_ZN16UpnpDomInterface18CheckSubTagPrefixLERK14TXmlEngElementRK6TDesC8S5_S5_ @ 167 NONAME
+	_ZN16UpnpDomInterface18GetContentElementLERK14TXmlEngElementRS0_RK6TDesC8S6_ii @ 168 NONAME
+	_ZN16UpnpDomInterface20CheckAttributeValueLERK14TXmlEngElementRK6TDesC8S5_ @ 169 NONAME
+	_ZN16UpnpDomInterface20GetDirectoryElementLERK14TXmlEngElementRS0_RK6TDesC8S6_S6_ii @ 170 NONAME
+	_ZN16UpnpDomInterface20GetDirectoryElementLERK14TXmlEngElementRS0_RK6TDesC8S6_ii @ 171 NONAME
+	_ZN16UpnpDomInterface22GetContentElementListLERK14TXmlEngElementR6RArrayIS0_ERK6TDesC8S8_i @ 172 NONAME
+	_ZN16UpnpDomInterface24GetDirectoryElementListLERK14TXmlEngElementR6RArrayIS0_ERK6TDesC8S8_i @ 173 NONAME
+	_ZN16UpnpDomInterface9CheckTagLERK14TXmlEngElementRK6TDesC8 @ 174 NONAME
+	_ZN16UpnpDomInterface9CheckTagLERK14TXmlEngElementRK6TDesC8S5_ @ 175 NONAME
+	_ZN17CUpnpMSearchTimer12GetNextValueEv @ 176 NONAME
+	_ZN17CUpnpMSearchTimer4NewLEP24MUpnpNotifyTimerObserverRK6TDesC8S4_ @ 177 NONAME
+	_ZN17CUpnpMSearchTimer5NewLCEP24MUpnpNotifyTimerObserverRK6TDesC8S4_ @ 178 NONAME
+	_ZN17CUpnpMSearchTimer9GetTargetEv @ 179 NONAME
+	_ZN17CUpnpMSearchTimerC1EP24MUpnpNotifyTimerObserver @ 180 NONAME
+	_ZN17CUpnpMSearchTimerC2EP24MUpnpNotifyTimerObserver @ 181 NONAME
+	_ZN17UpnpIpAddressUtil15GetIfNameForIapEmR6TDes16 @ 182 NONAME
+	_ZN17UpnpIpAddressUtil26MatchIfNameWithIpInterfaceER11RSocketServR7TDesC16Ri @ 183 NONAME
+	_ZN18CUpnpDeviceLibrary10DeviceListEv @ 184 NONAME
+	_ZN18CUpnpDeviceLibrary13RemoveSilentLERK6TDesC8 @ 185 NONAME
+	_ZN18CUpnpDeviceLibrary15PrepareShutdownEv @ 186 NONAME
+	_ZN18CUpnpDeviceLibrary17RemoveAllDevicesLEv @ 187 NONAME
+	_ZN18CUpnpDeviceLibrary20StopFilteringDeviceLERK6TDesC8 @ 188 NONAME
+	_ZN18CUpnpDeviceLibrary4FindERK6TDesC8 @ 189 NONAME
+	_ZN18CUpnpDeviceLibrary4NewLER26MUpnpDeviceLibraryObserveri @ 190 NONAME
+	_ZN18CUpnpDeviceLibrary7RemoveLERK6TDesC8 @ 191 NONAME
+	_ZN18CUpnpDeviceLibrary8AddInfoLEP16CUpnpSsdpMessage @ 192 NONAME
+	_ZN18CUpnpDeviceLibrary8AddInfoLEPK19TUpnpAddLocalDeviceRK6TDesC8 @ 193 NONAME
+	_ZN18CUpnpDeviceLibrary8AddInfoLEPK19TUpnpAddLocalDeviceRK6TDesC8RK9TInetAddr @ 194 NONAME
+	_ZN18CUpnpDeviceLibrary9GetUpdateERiRP11TUpnpDeviceRP12TUpnpServiceS0_S0_ @ 195 NONAME
+	_ZN18CUpnpDeviceLibraryD0Ev @ 196 NONAME
+	_ZN18CUpnpDeviceLibraryD1Ev @ 197 NONAME
+	_ZN18CUpnpDeviceLibraryD2Ev @ 198 NONAME
+	_ZN19CUpnpHttpHeaderList4NextEPK15CUpnpHttpHeader @ 199 NONAME
+	_ZN19CUpnpHttpHeaderList5FirstEv @ 200 NONAME
+	_ZN19CUpnpHttpHeaderList6RemoveEPK15CUpnpHttpHeader @ 201 NONAME
+	_ZN19CUpnpTimeoutElement10SetTimeoutEi @ 202 NONAME
+	_ZN19CUpnpTimeoutElement14BaseConstructLEv @ 203 NONAME
+	_ZN19CUpnpTimeoutElement4RunLEv @ 204 NONAME
+	_ZN19CUpnpTimeoutElement5RenewEv @ 205 NONAME
+	_ZN19CUpnpTimeoutElement8DoCancelEv @ 206 NONAME
+	_ZN19CUpnpTimeoutElement8RunErrorEi @ 207 NONAME
+	_ZN19CUpnpTimeoutElement8SetRenewENS_6TRenewE @ 208 NONAME
+	_ZN19CUpnpTimeoutElementC1ER25MUpnpTimeoutElementParent @ 209 NONAME
+	_ZN19CUpnpTimeoutElementC2ER25MUpnpTimeoutElementParent @ 210 NONAME
+	_ZN19CUpnpTimeoutElementD0Ev @ 211 NONAME
+	_ZN19CUpnpTimeoutElementD1Ev @ 212 NONAME
+	_ZN19CUpnpTimeoutElementD2Ev @ 213 NONAME
+	_ZN22CUpnpSymbianServerBase11StartServerERK7TDesC16PFPS_vE @ 214 NONAME
+	_ZN22CUpnpSymbianServerBase11TimerEventLEP16CUpnpNotifyTimer @ 215 NONAME
+	_ZN22CUpnpSymbianServerBase14BaseConstructLEv @ 216 NONAME
+	_ZN22CUpnpSymbianServerBase15SuggestShutdownEv @ 217 NONAME
+	_ZN22CUpnpSymbianServerBase4RunLEv @ 218 NONAME
+	_ZN22CUpnpSymbianServerBase8RunErrorEi @ 219 NONAME
+	_ZN22CUpnpSymbianServerBaseC2Ev @ 220 NONAME
+	_ZN22CUpnpSymbianServerBaseD0Ev @ 221 NONAME
+	_ZN22CUpnpSymbianServerBaseD1Ev @ 222 NONAME
+	_ZN22CUpnpSymbianServerBaseD2Ev @ 223 NONAME
+	_ZN23RUpnpHttpMessageFactory15Http11ResponseLEP16CUpnpHttpMessagei @ 224 NONAME
+	_ZN23RUpnpHttpMessageFactory15Http11ResponseLERK9TInetAddri @ 225 NONAME
+	_ZN23RUpnpHttpMessageFactory15HttpResponseOkLEP16CUpnpHttpMessage @ 226 NONAME
+	_ZN23RUpnpHttpMessageFactory15HttpResponseOkLERK9TInetAddr @ 227 NONAME
+	_ZN23RUpnpHttpMessageFactory18HttpResponseErrorLEP16CUpnpHttpMessagei @ 228 NONAME
+	_ZN23RUpnpHttpMessageFactory18HttpResponseErrorLERK9TInetAddri @ 229 NONAME
+	_ZN23RUpnpHttpMessageFactory18UpnpResponseErrorLEP16CUpnpHttpMessage14TUpnpErrorCode @ 230 NONAME
+	_ZN23RUpnpHttpMessageFactory18UpnpResponseErrorLERK9TInetAddr14TUpnpErrorCode @ 231 NONAME
+	_ZN23RUpnpHttpMessageFactory8HttpGetLER9TInetAddrRK6TDesC8 @ 232 NONAME
+	_ZN23RUpnpHttpMessageFactory8HttpGetLER9TInetAddrRK6TDesC8S4_ @ 233 NONAME
+	_ZN23RUpnpHttpMessageFactory8HttpGetLERK6TDesC8 @ 234 NONAME
+	_ZN23RUpnpHttpMessageFactory8HttpGetLERK6TDesC8S2_ @ 235 NONAME
+	_ZN23RUpnpHttpMessageFactory9HttpHeadLER9TInetAddrRK6TDesC8 @ 236 NONAME
+	_ZN23RUpnpHttpMessageFactory9HttpHeadLERK6TDesC8 @ 237 NONAME
+	_ZN23RUpnpHttpMessageFactory9HttpHeadLERK6TDesC8S2_ @ 238 NONAME
+	_ZN23RUpnpHttpMessageFactory9HttpPostLERK6TDesC8 @ 239 NONAME
+	_ZN23RUpnpHttpMessageFactory9HttpPostLERK6TDesC8S2_ @ 240 NONAME
+	_ZN23RUpnpHttpMessageFactory9HttpPostLERK9TInetAddrRK6TDesC8 @ 241 NONAME
+	_ZN23RUpnpSsdpMessageFactory15AdvertiseAliveLER6TDesC8S1_S1_S1_ @ 242 NONAME
+	_ZN23RUpnpSsdpMessageFactory16AdvertiseByebyeLER6TDesC8S1_ @ 243 NONAME
+	_ZN23RUpnpSsdpMessageFactory7SearchLER6TDesC8 @ 244 NONAME
+	_ZN23RUpnpSsdpMessageFactory7SearchLER6TDesC8S1_ @ 245 NONAME
+	_ZN23RUpnpSsdpMessageFactory9ResponseLER6TDesC8S1_S1_S1_ @ 246 NONAME
+	_ZN25CUpnpDeviceLibraryElement10DeviceTypeEv @ 247 NONAME
+	_ZN25CUpnpDeviceLibraryElement11ServiceListEv @ 248 NONAME
+	_ZN25CUpnpDeviceLibraryElement11SetUpdateIdEi @ 249 NONAME
+	_ZN25CUpnpDeviceLibraryElement14DescriptionUrlEv @ 250 NONAME
+	_ZN25CUpnpDeviceLibraryElement4NewLER25MUpnpTimeoutElementParent @ 251 NONAME
+	_ZN25CUpnpDeviceLibraryElement4UUIDEv @ 252 NONAME
+	_ZN25CUpnpDeviceLibraryElement6DomainEv @ 253 NONAME
+	_ZN25CUpnpDeviceLibraryElement8AddInfoLEP16CUpnpSsdpMessageRi @ 254 NONAME
+	_ZN25CUpnpDeviceLibraryElement8AddInfoLEPK19TUpnpAddLocalDeviceRK6TDesC8 @ 255 NONAME
+	_ZN25CUpnpDeviceLibraryElement8AddInfoLEPK19TUpnpAddLocalDeviceRK6TDesC8RK9TInetAddr @ 256 NONAME
+	_ZN25CUpnpDeviceLibraryElement8SetAliveEi @ 257 NONAME
+	_ZN25CUpnpDeviceLibraryElementD0Ev @ 258 NONAME
+	_ZN25CUpnpDeviceLibraryElementD1Ev @ 259 NONAME
+	_ZN25CUpnpDeviceLibraryElementD2Ev @ 260 NONAME
+	_ZNK16CUpnpHttpMessage10BodyLengthEv @ 261 NONAME
+	_ZNK16CUpnpHttpMessage11ServicePathEv @ 262 NONAME
+	_ZNK16CUpnpHttpMessage4TypeEv @ 263 NONAME
+	_ZNK16CUpnpHttpMessage6IsSoapEv @ 264 NONAME
+	_ZNK16CUpnpHttpMessage9SessionIdEv @ 265 NONAME
+	_ZNK22CUpnpSymbianServerBase11NewSessionLERK8TVersionRK9RMessage2 @ 266 NONAME
+	_ZNK22CUpnpSymbianServerBase11PanicClientERK9RMessage2i @ 267 NONAME
+	_ZNK22CUpnpSymbianServerBase11PanicServerEi @ 268 NONAME
+	_ZNK22CUpnpSymbianServerBase12CanBeStoppedEv @ 269 NONAME
+	_ZNK25CUpnpDeviceLibraryElement10AsTDeviceLEv @ 270 NONAME
+	_ZNK25CUpnpDeviceLibraryElement12IsRootDeviceEv @ 271 NONAME
+	_ZNK25CUpnpDeviceLibraryElement5AliveEv @ 272 NONAME
+	_ZNK25CUpnpDeviceLibraryElement5LocalEv @ 273 NONAME
+	_ZNK25CUpnpDeviceLibraryElement8UpdateIdEv @ 274 NONAME
+	_ZTI15CUpnpHttpHeader @ 275 NONAME ; #<TI>#
+	_ZTI16CUpnpHttpMessage @ 276 NONAME ; #<TI>#
+	_ZTI16CUpnpNotifyTimer @ 277 NONAME ; #<TI>#
+	_ZTI16CUpnpSsdpMessage @ 278 NONAME ; #<TI>#
+	_ZTI17CUpnpMSearchTimer @ 279 NONAME ; #<TI>#
+	_ZTI18CUpnpDeviceLibrary @ 280 NONAME ; #<TI>#
+	_ZTI19CUpnpHttpHeaderList @ 281 NONAME ; #<TI>#
+	_ZTI19CUpnpTimeoutElement @ 282 NONAME ; #<TI>#
+	_ZTI22CUpnpSymbianServerBase @ 283 NONAME ; #<TI>#
+	_ZTI25CUpnpDeviceLibraryElement @ 284 NONAME ; #<TI>#
+	_ZTV15CUpnpHttpHeader @ 285 NONAME ; #<VT>#
+	_ZTV16CUpnpHttpMessage @ 286 NONAME ; #<VT>#
+	_ZTV16CUpnpNotifyTimer @ 287 NONAME ; #<VT>#
+	_ZTV16CUpnpSsdpMessage @ 288 NONAME ; #<VT>#
+	_ZTV17CUpnpMSearchTimer @ 289 NONAME ; #<VT>#
+	_ZTV18CUpnpDeviceLibrary @ 290 NONAME ; #<VT>#
+	_ZTV19CUpnpHttpHeaderList @ 291 NONAME ; #<VT>#
+	_ZTV19CUpnpTimeoutElement @ 292 NONAME ; #<VT>#
+	_ZTV22CUpnpSymbianServerBase @ 293 NONAME ; #<VT>#
+	_ZTV25CUpnpDeviceLibraryElement @ 294 NONAME ; #<VT>#
+	_ZThn104_N22CUpnpSymbianServerBase11TimerEventLEP16CUpnpNotifyTimer @ 295 NONAME ; #<thunk>#
+	_ZThn4_N16CUpnpHttpMessage11TimerEventLEP16CUpnpNotifyTimer @ 296 NONAME ; #<thunk>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,38 @@
+/** @file
+* 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:  Build info for the UPnPUtils component
+*
+*/
+
+
+PRJ_EXPORTS
+../inc/upnpcompvariant.hrh         |../../../inc/upnpcompvariant.hrh
+../inc/upnpcompvariant.hrh         MW_LAYER_PLATFORM_EXPORT_PATH(upnpcompvariant.hrh)
+../inc/upnpuheapmark.h		   |../../../inc/upnpuheapmark.h
+
+../inc/upnpipaddressutils.h        |../../inc/upnpipaddressutils.h
+../inc/upnplist.h                  |../../inc/upnplist.h
+../inc/upnpmessageobserver.h       |../../inc/upnpmessageobserver.h
+../inc/upnpmsearchtimer.h   	   |../../inc/upnpmsearchtimer.h
+../inc/upnpdevicelibrary.h	       |../../inc/upnpdevicelibrary.h
+../inc/upnpdevicelibraryelement.h  |../../inc/upnpdevicelibraryelement.h
+../inc/upnpssdpmessage.h	       |../../inc/upnpssdpmessage.h
+../inc/upnpssdpmessagefactory.h	   |../../inc/upnpssdpmessagefactory.h
+../inc/upnptimeoutelement.h        |../../inc/upnptimeoutelement.h
+
+
+PRJ_MMPFILES
+upnputils.mmp
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/group/upnputils.mmp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,88 @@
+/** @file
+* 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:
+*     This is the project specification file for UpnpUtils.
+*
+*/
+
+
+#include "../../../inc/upnpcompvariant.hrh"
+
+TARGETTYPE      DLL
+
+#if defined(__HN_31__) || defined(__HN_32__)
+TARGET          hnipserversutils.dll
+UID             0x1000008D 0x2000F886
+#else
+TARGET          upnpipserversutils.dll
+UID             0x1000008D 0x2001B2B9
+#endif
+
+CAPABILITY      CAP_GENERAL_DLL
+VENDORID        VID_DEFAULT
+
+VERSION 10.1
+paged
+
+SOURCEPATH      ../src
+SOURCE          upnpdominterface.cpp
+SOURCE          upnpstring.cpp
+SOURCE          upnpfileutils.cpp
+SOURCE          upnphttpheader.cpp
+SOURCE          upnphttpmessage.cpp
+SOURCE          upnphttpmessagefactory.cpp
+SOURCE          upnpipaddressutils.cpp
+SOURCE          upnpnotifytimer.cpp
+SOURCE          upnpmsearchtimer.cpp
+SOURCE          upnpdevicelibrary.cpp
+SOURCE          upnpdevicelibraryelement.cpp
+SOURCE          upnptimeoutelement.cpp
+SOURCE          upnpssdpmessage.cpp
+SOURCE          upnpssdpmessagefactory.cpp
+SOURCE          upnplist.cpp
+SOURCE          upnpsessionbase.cpp
+SOURCE          upnpsymbianserverbase.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   ../../../inc
+SYSTEMINCLUDE   ../../inc
+USERINCLUDE     ../inc
+
+LIBRARY         euser.lib
+LIBRARY         estlib.lib
+LIBRARY         efsrv.lib
+LIBRARY         estor.lib
+LIBRARY         ecom.lib
+LIBRARY         insock.lib
+LIBRARY         esock.lib
+LIBRARY         flogger.lib
+LIBRARY         apmime.lib
+LIBRARY         apgrfx.lib
+#if defined(__HN_31__)
+LIBRARY         wsstarxmlenginedom.lib
+LIBRARY         wsstarxmlengineutils.lib
+#else
+LIBRARY         xmlenginedom.lib
+LIBRARY         xmlengineutils.lib
+#endif
+
+LIBRARY         inetprotutil.lib
+LIBRARY         commdb.lib
+LIBRARY         sysutil.lib
+LIBRARY         bafl.lib
+
+DEFFILE         upnpipserversutils
+
+SMPSAFE
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpcompvariant.hrh	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,42 @@
+/** @file
+* 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:  Here are the flags that allows to compile code
+*
+*/
+
+#ifndef upnpcompvariant_HRH
+#define upnpcompvariant_HRH
+#include <platform_paths.hrh>
+#include <bldvariant.hrh>
+
+//#define RD_UPNP_REMOTE_ACCESS
+
+#if defined (__SERIES60_31__)
+
+//Flag for 3.1 HN
+#ifndef __HN_31__
+    #define __HN_31__
+#endif
+
+//#elif defined (__SERIES60_32__)
+
+//Flag for 3.2 HN
+//    #define __HN_32__
+//#endif
+
+//#else // no __HN_31__, no __HN_32__
+
+#endif // __HN_31__
+
+#endif // upnpcompvariant_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpdevicelibrary.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,275 @@
+/** @file
+* 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:  Declares main application class.
+*
+*/
+
+
+
+#ifndef C_CUPNPDEVICELIBRARY_H
+#define C_CUPNPDEVICELIBRARY_H
+
+// INCLUDES
+#include "upnpdevicelibraryelement.h"
+
+// CONSTANTS
+static const TInt KDeviceTimeout=120;
+
+// FORWARD DECLARATIONS
+class TBufferIndex;
+class CUpnpSsdpMessage;
+
+// CLASS DECLARATION
+
+/**
+*  An interface from device library to Message Handler.
+*  This interface class presents two pure virtual functions that are required
+*  by device library.
+*
+*  @since Series60 2.0
+*/
+class MUpnpDeviceLibraryObserver
+    {
+    public: // New functions
+        
+        /**
+        * A pure virtual function.
+        * Advertise a device (advertisement type 
+        * selected depending on parameter aLive)
+        * @since Series60 2.0
+        * @param aLive Expresses the advertisement type 
+        * (ssdp:alive or ssdp:byebye)
+        * @param anElement The device to be advertised
+        */
+        virtual void AdvertiseDeviceL(TInt aLive, CUpnpDeviceLibraryElement& anElement) = 0;
+        
+        /**
+        * A pure virtual function. Advertises the device list has changed.
+        * @since Series60 2.0
+        */
+        virtual void DeviceListChangedL() = 0;
+    };
+
+// CLASS DECLARATION
+
+/**
+*  The device library main class.
+*  This class contains an array of device library elements 
+*  (of type CUpnpDeviceLibraryElement). 
+*  This list is maintained up-to-date by reading received SSDP messages. 
+*  Every element in the library has a timeout, and remote devices are removed 
+*  from the library after the timeout.
+*
+*  @since Series60 2.0
+*/
+class CUpnpDeviceLibrary : public CBase, public MUpnpTimeoutElementParent
+    {
+    public:
+
+        /**
+        * Two-phased constructor.
+        * @param aObserver The observer of the library. 
+        * @param aHandle the thread log handle
+        * @return The new instance.
+        */
+        IMPORT_C static CUpnpDeviceLibrary* NewL(
+                        MUpnpDeviceLibraryObserver& aObserver,
+                        TInt aHandle );
+        
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CUpnpDeviceLibrary();
+        
+        /**
+        * Adds the data of the local device to the library.
+        * @since Series60 2.0
+        * @param aIndex An indexing structure to parse the actual data
+        * @param aBuffer A buffer containing the actual data
+        * @param aLocalAddr Local address 
+        */
+        IMPORT_C void AddInfoL( const TUpnpAddLocalDevice* aIndex, 
+                                const TDesC8& aBuffer, 
+                                const TInetAddr& aLocalAddr);
+
+        /**
+        * Adds the data of the local device to the library.
+        * @since Series60 2.0
+        * @param aIndex An indexing structure to parse the actual data
+        * @param aBuffer A buffer containing the actual data
+        */
+        IMPORT_C void AddInfoL( const TUpnpAddLocalDevice* aIndex, 
+                                const TDesC8& aBuffer);
+        
+        /**
+        * Adds the data of the SSDP message to the library.
+        * @since Series60 2.0
+        * @param aMessage A SSDP message containing data
+        */
+        IMPORT_C void AddInfoL( CUpnpSsdpMessage* aMessage );
+        
+        /**
+        * Returns the index of an element with matching UUID.
+        * @since Series60 2.0
+        * @param aUuid The UUID of searched device
+        * @return The index of the found element; if not found, -1
+        */
+        IMPORT_C TInt Find( const TDesC8& aUuid );
+        
+        /**
+        * Returns an array containing pointers to the library elements
+        * @since Series60 2.0
+        * @return An array containing pointers to the library elements
+        */
+        IMPORT_C RPointerArray<CUpnpDeviceLibraryElement>& DeviceList();
+        
+        /**
+        * Removes an element from the library.
+        * @since Series60 2.0
+        * @param aUuid The UUID of the element to be removed
+        */
+        IMPORT_C void RemoveL( const TDesC8& aUuid );
+        
+         /**
+        * Removes an element from the library.
+        * @since Series60 2.0
+        * @param aUuid The UUID of the element to be removed
+        */
+        IMPORT_C void RemoveSilentL( const TDesC8& aUuid );
+        /**
+        * Prepare for shutdown.
+        * @since Series60 2.0
+        */
+        IMPORT_C void PrepareShutdown();
+        
+        /**
+        * ?member_description.
+        * @since Series60 2.0
+        * @param aUpdateId
+        * @param aDevices
+        * @param aServices
+        * @param aDeviceCount 
+        * @param aServiceCount
+        */
+        IMPORT_C void GetUpdate( TInt& aUpdateId, 
+                                 TUpnpDevice*& aDevices,
+                                 TUpnpService*& aServices,
+                                 TInt& aDeviceCount,
+                                 TInt& aServiceCount );
+        
+        
+        /**
+        * Removes all remote devices from the device library,
+        * used for ip address changes
+        * @since Series60 3.1
+        */
+        IMPORT_C void RemoveAllDevicesL();
+        
+       /**
+        * Set device notification filtering
+        * @since Series60 3.2
+        * @param aUuid Device Uuid
+        */
+        IMPORT_C void StopFilteringDeviceL( const TDesC8& aUuid );
+        
+    private: // Functions from base classes
+
+        /**
+        * From MUpnpTimeoutElementParent Callback function.
+        * Implementation of MUpnpTimeoutElementParent::TimeoutExpired.
+        * If the element is local, it is advertised and new timeout is set. 
+        * If the element describes a remote device, the device is removed 
+        * from the library and observer is informed about the disappearing.
+        * @since Series60 2.0
+        * @param aElement The element whose timeout has ran out
+        */
+        void TimeoutExpiredL( CUpnpTimeoutElement* aElement );
+        
+    protected:  // New functions
+
+        /**
+        * Remove Device.
+        * @since Series60 2.0
+        * @param aMessage
+        */
+        void RemoveDeviceL( CUpnpSsdpMessage* aMessage );
+
+    private:    // New functions
+
+        /**
+        * Return element.
+        * @since Series60 2.0
+        * @param aUUID 
+        * @return CUpnpDeviceLibraryElement pointer
+        */
+        CUpnpDeviceLibraryElement* Element( TDesC8& aUUID );
+        
+        /**
+        * Add device.
+        * @since Series60 2.0
+        * @param aMessage
+        * @return TBool
+        */
+        TBool AddDeviceL( CUpnpSsdpMessage* aMessage );
+    /**
+     * Creates and appends local device.
+     * @param aIndex descriptiors positions structure        
+             needed by deserialization algorithm    
+     * @param aBuffer aBuffer CUpnpDeviceLibraryElement object in serialized form 
+     * @param aLocalAddr local address of device being added
+     */
+    void  AppendLocalDeviceL( const TUpnpAddLocalDevice* aIndex, 
+                     const TDesC8& aBuffer, 
+                     const TInetAddr& aLocalAddr );
+                     
+    /**
+     * Invalidates non local device with the same UID as
+     * local device being added 
+     * @param aElem
+     */
+    void InvalidateNonLocalDevice( CUpnpDeviceLibraryElement& aElem );
+
+    private:
+
+        /**
+        * C++ default constructor.
+        * @param aObserver The observer of the library. 
+        * @param aHandle the thread log handle
+        */
+        CUpnpDeviceLibrary( MUpnpDeviceLibraryObserver& aObserver, TInt aHandle );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    protected:  
+
+        TInt iUpdateId;
+        
+    private:    
+
+        MUpnpDeviceLibraryObserver& iObserver;
+
+        RPointerArray<CUpnpDeviceLibraryElement> iElementArray;
+
+	    // for logging into right thread log
+        TInt iHandle;
+
+    };
+
+
+#endif      //  DEVICELIBRARY_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpdevicelibraryelement.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,332 @@
+/** @file
+* 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:  Declares main application class.
+*
+*/
+
+
+#ifndef C_CUPNPDEVICELIBRARYELEMENT_H
+#define C_CUPNPDEVICELIBRARYELEMENT_H
+
+// INCLUDES
+#include <e32std.h>
+#include <cdbcols.h>
+#include <badesca.h>
+#include "upnptimeoutelement.h"
+#include "upnpcommonstructs.h"
+
+// FORWARD DECLARATIONS
+class CUpnpSsdpMessage;
+
+// CLASS DECLARATION
+
+/**
+*  This class has two main functionalities:
+*  1. Timeout from CUpnpTimeoutElement
+*  2. Buffers to store the data about a UPnP device
+*
+*  @since Series60 2.0
+*/
+class CUpnpDeviceLibraryElement : public CUpnpTimeoutElement
+    {
+    public: // Constructors and destructor
+        
+        /**
+        * Two-phased constructor.
+        * @param aParent The parent of the element (e.g. device library) 
+        * to handle timeout callbacks
+        * @return A new CUpnpDeviceLibraryElement instance
+        */
+        IMPORT_C static CUpnpDeviceLibraryElement* NewL(
+            MUpnpTimeoutElementParent& aParent);
+        
+        /**
+        * Destructor.
+        */
+        IMPORT_C virtual ~CUpnpDeviceLibraryElement();
+        
+    public: // New functions
+
+        /**
+        * Add data of a SSDP message to the device library
+        * @since Series60 2.0
+        * @param aMessage A SSDP message
+        * @param aUpdateId Reference to current update id. If required \
+            the value of this update id is changed when device is added to \
+            device library.
+        * @return ETrue if device changed
+        */
+        IMPORT_C TBool AddInfoL( CUpnpSsdpMessage* aMessage, TInt& aUpdateId );
+
+        /**
+        * Add data got from local device to the device library.
+        * @since Series60 2.0
+        * @param aIndex A indexing structure for the data buffer
+        * @param aBuffer A buffer containing the actual data
+        * @param aAddr Address of the device that is to be added.
+        */
+        IMPORT_C void AddInfoL( const TUpnpAddLocalDevice* aIndex, 
+                                const TDesC8& aBuffer, 
+                                const TInetAddr& aAddr );
+
+        /**
+        * Add data got from local device to the device library.
+        * @since Series60 2.0
+        * @param aIndex A indexing structure for the data buffer
+        * @param aBuffer A buffer containing the actual data
+        */
+        IMPORT_C void AddInfoL( const TUpnpAddLocalDevice* aIndex, 
+                                const TDesC8& aBuffer);
+
+    public:
+
+        /**
+        * Sets iAdvertised to ETrue.
+        * @since Series60 3.2
+        */
+        void Advertising();
+
+        /**
+        * Sets iAdvertised to EFalse.
+        * @since S60 5.1
+        */
+        void AdvertisingFinished();
+        
+        /**
+        * Is advertised.
+        * @since Series60 3.2
+        * @return TBool
+        */
+        TBool Advertised();
+
+        /**
+        * Set root device.
+        * @since Series60 2.0
+        * @param aRootDevice root device
+        */
+        void SetRootDevice( TBool aRootDevice );
+
+        /**
+        * Return local.
+        * @since Series60 2.0
+        * @return TBool
+        */
+        IMPORT_C TBool Local() const;
+
+        /**
+        * Set local.
+        * @since Series60 2.0
+        * @param aLocal if local or not
+        */
+        void SetLocal( TBool aLocal );
+
+        /**
+        * Is alive.
+        * @since Series60 2.0
+        * @return TBool
+        */
+        IMPORT_C TBool Alive() const;
+
+        /**
+        * SetAlive.
+        * @since Series60 2.0
+        */
+        IMPORT_C void SetAlive(TBool aAlive);
+
+        /**
+        * Should be filtered.
+        * @since Series60 3.2
+        * @return TBool
+        */
+        TBool Filter() const;
+
+        /**
+        * SetFilter.
+        * @since Series60 2.0
+        */
+        void SetFilter(TBool aFilter);
+
+        /**
+        * Idicate if device cache-control time expired.
+        * @since Series60 3.2
+        * @return ETrue if expired, otherwise EFalse
+        */
+        TBool Expired() const;
+
+        /**
+        * Setter.
+        * @since Series60 3.2
+        */
+        void SetExpired( TBool aExpired );
+
+        /**
+        * Set update id.
+        * @since Series60 2.0
+        * @param aUpdateId update ID
+        */
+        IMPORT_C void SetUpdateId( TInt aUpdateId );
+
+        /**
+        * Return update ID.
+        * @since Series60 2.0
+        * @return TInt update ID
+        */
+        IMPORT_C TInt UpdateId() const;
+
+        /**
+        * ?member_description.
+        * @since Series60 2.0
+        * @return ?description
+        */
+        IMPORT_C TUpnpDevice* AsTDeviceL() const;
+
+        /**
+        * Returns true, if the element describes a root device.
+        * @since Series60 2.0
+        * @return ETrue, if root device; EFalse otherwise
+        */
+        IMPORT_C TBool IsRootDevice() const;
+        
+        /**
+        * Returns the UUID of this element.
+        * @since Series60 2.0
+        * @return Descriptor containing the UUID.
+        */
+        IMPORT_C TDesC8& UUID();
+
+        /**
+        * Returns the description URL of this element.
+        * @since Series60 2.0
+        * @return Descriptor containing the description URL.
+        */
+        IMPORT_C TDesC8& DescriptionUrl();
+
+        /**
+        * Returns the domain of this element.
+        * @since Series60 2.0
+        * @return Descriptor containing the domain.
+        */
+        IMPORT_C TDesC8& Domain();
+
+        /**
+        * Returns the device type of this element.
+        * @since Series60 2.0
+        * @return Descriptor containing the device type.
+        */
+        IMPORT_C TDesC8& DeviceType();
+
+        /**
+        * Returns an array containing the service types of the services 
+        * of this element.
+        * @since Series60 2.0
+        * @return Descriptor array containing the service types.
+        */
+        IMPORT_C CDesC8Array& ServiceList();
+        
+    private:
+        
+        /**
+        * C++ default constructor.
+        * @param aParent The parent of the element (e.g. device library) 
+        * to handle timeout callbacks
+        */
+        CUpnpDeviceLibraryElement( MUpnpTimeoutElementParent& aParent );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+        
+    private:
+        
+        /**
+        * Sets the UUID of a device to aUUID.
+        * @since Series60 2.0
+        * @param aUUID UUID value that is to be set for this element.
+        */
+        void SetUuidL( const TDesC8& aUUID );
+
+        /**
+        * Sets the url to this device's description file.
+        * @since Series60 2.0
+        * @param aDescriptionURL New value of description url.
+        */
+        void SetDescriptionUrlL( const TDesC8& aDescriptionURL );
+        
+        /**
+        * Sets the url to this device's description file.
+        * @param aDescriptionURL New value of description url.
+        * @param aAddr Address of the device.
+        * @param aPort Port of the device.
+        */
+        void SetDescriptionUrlL( const TDesC8& aDescriptionURL,
+                                 const TInetAddr& aAddr,
+                                 const TDesC8& aPort );
+
+        /**
+        * Sets the domain value for this element.
+        * @since Series60 2.0
+        * @param aDomain New value for Domain.
+        */
+        void SetDomainL( const TDesC8& aDomain );
+
+        /**
+        * Sets the device's type (for example MediaServer:1).
+        * @since Series60 2.0
+        * @param aDeviceType New value for device type.
+        */
+        void SetDeviceTypeL( const TDesC8& aDeviceType );
+
+        /**
+        * Adds a service to this element. Service type is aServiceType
+        * (ConnectionManager:1 for example).
+        * @since Series60 2.0
+        * @param aServiceType Name of service that is to be added.
+        */
+        void AddServiceTypeL( const TDesC8& aServiceType );
+        
+        /**
+        * Add data (only from Notification Type Header) of a SSDP message to the device library
+        * @param aMessage A SSDP message
+        * @return ETrue if device changed
+        */
+        TBool AddInfoFromNotificationTypeHeaderL( CUpnpSsdpMessage* aMessage);
+
+        /**
+        * Check if a aDescriptor has prefix aPrefix 
+        * @param aDescriptor
+        * @param aPrefix
+        * @return TBool
+        */
+        static TBool HasPrefix( const TDesC8& aDescriptor, const TDesC8& aPrefix );
+
+    protected:  
+        TInt iUpdateId;
+    private:    
+        TBool iAlive;
+        TBool iFilter;
+        TBool iLocal;
+        TBool iExpired;
+        TBool iRootDevice;
+        HBufC8* iUUID;
+        HBufC8* iDeviceType;
+        HBufC8* iDomain;
+        HBufC8* iDescriptionURL;
+        CDesC8ArrayFlat* iServiceList;
+        TBool iAdvertised;
+    };
+
+#endif      // C_CUPNPDEVICELIBRARYELEMENT_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpipaddressutils.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+/** @file
+* 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:  Declares IP Address Util functions
+*
+*/
+
+
+#ifndef C_UPNIPADDRESSUTILS_H
+#define C_UPNIPADDRESSUTILS_H
+
+#include <e32base.h>
+#include <in_sock.h>
+
+// NAMESPACE DECLARATION
+namespace UpnpIpAddressUtil
+    {
+	/**
+	GetIfNameForIap
+	
+	Reads the IF name for the specified IAP ID.
+	@param	aIapId IAP ID for reading IF name
+	@param	aIfName interface name
+	**/
+	IMPORT_C void GetIfNameForIap( TUint32 aIapId, TDes& aIfName );
+	
+	/**
+	MatchIfNameWithIpInterface
+		
+	Matches IF name with IP address of the TCP/IP stack interfaces.
+	@param	aSocketServer	Socket Server to be used for reading interfaces
+	@param	aIfName	IF name to be found from IP interfaces
+	@param	aIfIndex reference that will be set to interface index
+	@return	mimetype
+	**/	
+	IMPORT_C TInetAddr MatchIfNameWithIpInterface( RSocketServ& aSocketServer,
+                                                   TDesC& aIfName,
+                                                   TInt& aInterfaceIndex  );
+    }
+
+#endif // C_UPNIPADDRESSUTILS_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnplist.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,83 @@
+/** @file
+* 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:  Declares RList type
+*
+*/
+
+
+
+#ifndef C_CUPNPHEADERLIST_H
+#define C_CUPNPHEADERLIST_H
+// INCLUDES
+
+#include "upnphttpheader.h"
+#include <e32base.h>
+
+class CUpnpHttpHeaderList: public CBase
+{
+public:
+	/**
+      * C++ default constructor.
+    */
+	CUpnpHttpHeaderList();
+       
+public:
+	/**
+      * C++ default destructor.
+    */
+	~CUpnpHttpHeaderList();
+    
+public:
+	/**
+      * Method deletes all objects from the list.
+    */
+	void DeleteObjects();
+	
+	/**
+      * Adds element to the list.
+    */
+	void AddL(const CUpnpHttpHeader* aHeader);
+	
+	/**
+      * Removes element from the list.
+    */
+	IMPORT_C void Remove(const CUpnpHttpHeader* aHeader);
+	
+	/**
+      * Returns the frist element of the list.
+    */ 
+	IMPORT_C CUpnpHttpHeader* First();
+	
+	/**
+      * Returns the number of elements in list.
+    */
+	TInt Count() const;
+	
+	/**
+    * Goes to the next element on the list.
+    */
+	IMPORT_C CUpnpHttpHeader* Next(const CUpnpHttpHeader* aHeader);
+
+	
+	private:
+	/**
+	Header list
+	*/
+	RPointerArray<CUpnpHttpHeader> iHeaderList;
+	
+};
+    
+#endif // C_CUPNPHEADERLIST_H
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpmessageobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+/** @file
+* 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:  Declares virtual MUpnpMessageObserver callback class
+*                and the implemented active object class CUpnpNotifyTimer
+*
+*/
+
+
+#ifndef C_MUPNPMESSAGEOBSERVER_H
+#define C_MUPNPMESSAGEOBSERVER_H
+
+// INCLUDES
+#include <e32base.h>
+
+// CONSTANTS
+
+// CLASS DECLARATION
+class CUpnpHttpMessage;
+
+/**
+* brief An interface from SsdpMessage to its customer (service)
+*
+*  @since Series60 2.0
+*/
+class MUpnpMessageObserver
+    {
+    public:
+
+        /**
+        * MessageExpiredL
+        * @since Series60 2.0
+        * @param aMessage A pointer to expired message.
+        * @return None
+        */
+	    virtual void MessageExpiredL( CUpnpHttpMessage* aMessage ) = 0;
+    };
+
+#endif // C_MUPNPMESSAGEOBSERVER_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpmsearchtimer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,76 @@
+/** @file
+* 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:  Declares virtual MUpnpNotifyTimerObserver callback class
+*                and the implemented active object class CUpnpNotifyTimer
+*
+*/
+
+
+#ifndef C_CUPNPMSEARCHTIMER_H
+#define C_CUPNPMSEARCHTIMER_H
+
+// INCLUDES
+#include <e32base.h>
+#include "upnpnotifytimer.h"
+    
+// CLASS DECLARATION
+/**
+* Class with m-search timer
+*
+*  @since Series60 3.2
+*/
+class CUpnpMSearchTimer : public CUpnpNotifyTimer
+    {
+    private:
+
+    /**
+     * Constructor
+     */
+    IMPORT_C CUpnpMSearchTimer( MUpnpNotifyTimerObserver* aObserver);
+
+    public: 
+    IMPORT_C static CUpnpMSearchTimer* NewL(MUpnpNotifyTimerObserver* aObserver, 
+                                const TDesC8& aTarget,
+                                const TDesC8& aMX);
+                                
+    IMPORT_C static CUpnpMSearchTimer* NewLC(MUpnpNotifyTimerObserver* aObserver, 
+                                const TDesC8& aTarget,
+                                const TDesC8& aMX);
+        
+    void ConstructL(const TDesC8& aTarget,
+                                const TDesC8& aMX);
+        
+    /**
+     * Destructor.
+     */
+    ~CUpnpMSearchTimer();
+    
+    IMPORT_C TInt GetNextValue();
+    IMPORT_C TPtrC8 GetTarget();
+    
+
+    private: 
+    // search target
+    HBufC8* iTarget;
+    // mx configuration
+    HBufC8* iMXString;
+    // mx processor
+    TLex8 iMX;
+    
+    };
+
+
+#endif // C_CUPNPMSEARCHTIMER_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpssdpmessage.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,331 @@
+/** @file
+* 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:  Declares main application class.
+*
+*/
+
+
+#ifndef C_CUPNPSSDPMESSAGE_H
+#define C_CUPNPSSDPMESSAGE_H
+
+// INCLUDES
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnphttpmessage.h"
+#include "upnphttpheader.h"
+
+// CLASS DECLARATION
+
+/**
+*  Ssdp-Message class. Used in sending and handling Ssdp messages.
+*
+*  @since Series60 2.0
+*/
+class CUpnpSsdpMessage : public CUpnpHttpMessage
+    {
+    
+    public:
+
+        /**
+        * Enumeration for message types:
+        */
+        enum TRequestType
+            {
+                // This value is used in notify-type of messages, such as 
+                // ssdp:alive.
+                ERequestNotify =1,
+                // This value is used in ssdp:byebye messages.
+                ERequestByeBye,
+                // This value is used in search messages.
+                ERequestSearch,
+                // This value is used in replies to search messages.
+                ERequestSearchResponse,
+                
+                ERequestUndefined
+                
+            };
+
+    public:  // Constructors and destructor
+        
+        /**
+        * Two-phased constructor.
+        * @param aAddr Sender's IP address.
+        * @param aRequestType Type of message to be constructed.
+        */
+        IMPORT_C static CUpnpSsdpMessage* NewL( TInetAddr& aAddr, 
+                                            TRequestType aRequestType);
+        
+        /**
+        * Two-phased constructor.
+        * @param aRequestType Type of message to be constructed.
+        */
+        IMPORT_C static CUpnpSsdpMessage* NewL( TRequestType aRequestType );
+        
+        /**
+        * Two-phased constructor.
+        * @param aBuffer Buffer which contains the message.
+        * @param aAddr Target IP address.
+        */
+        IMPORT_C static CUpnpSsdpMessage* NewL(TDesC8& aBuffer, TInetAddr& aAddr );
+        
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CUpnpSsdpMessage();
+        
+    public: // New functions
+
+        /**
+        * Buffer to string.
+        * @since Series60 2.0
+        * @return HBufC8 pointer
+        */
+        HBufC8* ToStringL();
+
+        /**
+        * Cache control.
+        * @since Series60 2.0
+        * @return TInt
+        */
+        IMPORT_C TInt CacheControl();
+
+        /**
+        * Return UUID
+        * @since Series60 2.0
+        * @return TPtr8
+        */
+        IMPORT_C TPtr8 Uuid();
+
+        /**
+        * Return location
+        * @since Series60 2.0
+        * @return TDesC8
+        */
+        IMPORT_C TDesC8& Location();
+
+        /**
+        * Returns if SSDP notify.
+        * @since Series60 2.0
+        * @return TBool 
+        */
+        IMPORT_C TBool IsSsdpNotify();
+        
+        /**
+        * Sets the host-header of Ssdp message.
+        * @since Series60 2.0
+        * @param aHost Value of host to be set.
+        */
+    IMPORT_C void AddHostL( TDesC8& aHost );
+        
+        /**
+        * Sets the USN-header of Ssdp message.
+        * @since Series60 2.0
+        * @param aUsn Value of USN to be set.
+        */
+        void AddUsnL(TDesC8& aUsn);
+        
+        /**
+        * Sets the Cache-control-header of Ssdp message.
+        * @since Series60 2.0
+        * @param aMaxAge Value of Cache-Control to be set.
+        */
+        void AddCacheControlL(TDesC8& aMaxAge);
+        
+        /**
+        * Sets the Description-header of Ssdp message.
+        * @since Series60 2.0
+        * @param aDescriptionLocation Value of description to be set.
+        */
+        void AddLocationL(TDesC8& aDescriptionLocation);
+        
+        /**
+        * Sets the ST-header of Ssdp message.
+        * @since Series60 2.0
+        * @param aSt Value of ST to be set.
+        */
+        void AddSearchTargetStringL(TDesC8& aSt);
+        
+        /**
+        * Sets the NT-header of Ssdp message.
+        * @since Series60 2.0
+        * @param aNT Value of NT to be set.
+        */
+        void AddNotificationTypeL(TDesC8& aNT);
+        
+        /**
+        * Sets the Server description-header of Ssdp message.
+        * @since Series60 2.0
+        * @param aServerType Value of server description to be set.
+        */
+        void AddServerL(TDesC8& aServerType);
+        
+        /**
+        * Sets the MX-header of Ssdp message.
+        * @since Series60 2.0
+        * @param aMx Value of MX to be set.
+        */
+    IMPORT_C void AddMxL(TDesC8& aMx);
+        
+        /**
+        * Search target.
+        * @since Series60 2.0
+        * @return TInt
+        */
+        IMPORT_C TInt SearchTarget();
+        
+        /**
+        * Returns ETrue, if message is a Alive-message, else returns EFalse.
+        * @since Series60 2.0
+        * @return ETrue, if message is a Alive-message, 
+        * else returns EFalse.
+        */
+        IMPORT_C TBool IsSsdpAlive();
+
+        /**
+        * Returns ETrue, if message is a Byebye-message, else returns EFalse.
+        * @since Series60 2.0
+        * @return ETrue, if message is a Byebye-message, 
+        * else returns EFalse.
+        */
+        IMPORT_C TBool IsSsdpByebye();
+
+        /**
+        * Returns ETrue, if message is a search message, else returns EFalse.
+        * @since Series60 2.0
+        * @return ETrue, if message is a search message, else returns EFalse.
+        */
+        IMPORT_C TBool IsSsdpMSearch();
+
+        /**
+        * Return if SSDP response.
+        * @since Series60 2.0
+        * @return ETrue, if message is a response to search message, 
+        * else returns EFalse.
+        */
+        IMPORT_C TBool IsSsdpResponse();
+        
+        /**
+        * Return if search all.
+        * @since Series60 2.0
+        * @return ETrue, if message is a search message and 
+        * search is for all devices, else returns EFalse.
+        */
+        IMPORT_C TBool IsSearchAll();
+
+        /**
+        * Return if search device.
+        * @since Series60 2.0
+        * @return ETrue, if message is a search message and 
+        * search is for certain devices, else returns EFalse.
+        */
+        IMPORT_C TBool IsSearchDevice();
+
+        /**
+        * Return if search service.
+        * @since Series60 2.0
+        * @return ETrue, if message is a search message and 
+        * search is for certain services, else returns EFalse.
+        */
+        IMPORT_C TBool IsSearchService();
+        
+        /**
+        * Returns NT-header of Ssdp message.
+        * @since Series60 2.0
+        * @return NT-header of Ssdp message.
+        */
+        IMPORT_C TDesC8& Nt();
+        
+        /**
+        * Returns USN-header of Ssdp message.
+        * @since Series60 2.0
+        * @return USN-header of Ssdp message.
+        */
+        IMPORT_C TDesC8& Usn();
+        
+        /**
+        * Returns ST-header of Ssdp message.
+        * @since Series60 2.0
+        * @return ST-header of Ssdp message.
+        */
+        IMPORT_C TDesC8& St();
+
+        /**
+        * Returns NTS-header of Ssdp message.
+        * @since Series60 2.0
+        * @return NTS-header of Ssdp message.
+        */
+        IMPORT_C TDesC8& Nts();
+        
+        /**
+        * Enumeration for search message types:
+        * @since Series60 2.0
+        */
+        enum TSearchTarget 
+            {
+            
+                // This message is not a search message.
+                ESsdpNone = 1, 
+                // This is a search all message.
+                ESsdpAll,
+                // This is a root device search.
+                EUPnPRootDevice,
+                // This is a search by specific uuid.
+                EDeviceUid,
+                // This is a search by specific device type.
+                EDeviceType,
+                // This is a search by specific service type.
+                EServiceType
+
+            };
+        
+    protected: // from CUpnpHttpMessage
+		/**
+		Append ContentLength when headers are dumped to string (using public method HeadersToStringL)
+		@param aHeaders without "Content-Length"
+		**/	
+		IMPORT_C virtual void AppendContentLengthToHeadersL(HBufC8*& aHeaders);
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CUpnpSsdpMessage();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aRequestType Type of message to be constructed.
+        */
+        void ConstructL( TRequestType aRequestType );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aAddr Remote IP address
+        */
+		void HttpConstructL( TInetAddr& aAddr );
+
+    private:
+
+        /**
+        * Parse buffer.
+        * @since Series60 2.0
+        * @param aBuffer buffer to be parsed.
+        */
+        void ParseL(TDesC8& aBuffer);
+    
+    };
+
+#endif // C_CUPNPSSDPMESSAGE_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpssdpmessagefactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,107 @@
+/** @file
+* 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:  RUpnpSsdpMessageFactory is responisble for creating SSDP messages
+*
+*/
+
+
+#ifndef C_RUPNPSSDPMESSAGEFACTORY_H
+#define C_RUPNPSSDPMESSAGEFACTORY_H
+
+//  INCLUDES
+#include <e32base.h>
+#include "upnpssdpmessage.h"
+
+// DATA TYPES
+typedef CUpnpSsdpMessage CSsdpAdvertise;
+typedef CUpnpSsdpMessage CSsdpSearch;
+typedef CUpnpSsdpMessage CSsdpSearchResponse;
+
+// CLASS DECLARATION
+/**
+*  SSDP Message Factory. Used to create standard SSDP messages.
+*
+*  @since Series60 2.0
+*/
+class RUpnpSsdpMessageFactory
+    {
+    public:
+        
+     
+        /**
+        * Constructor function; Creates standard alive message 
+        * with following parameters.
+        * @since Series60 2.0
+        * @param aLoc Value of the Location-header.
+        * @param aNt Value of the NT-header.
+        * @param aUsn Value of the USN-header.
+        * @param aServerDesc Value of the server description-header.
+        * @return CSsdpAdvertise pointer
+        */
+        IMPORT_C static CSsdpAdvertise* AdvertiseAliveL( TDesC8& aLoc,
+                                                         TDesC8& aNt, 
+                                                         TDesC8& aUsn, 
+                                                         TDesC8& aServerDesc );
+
+        /**
+        * Constructor function; Creates standard byebye message 
+        * with following parameters.
+        * @since Series60 2.0
+        * @param aNt Value of the NT-header.
+        * @param aUsn Value of the USN-header.
+        * @param aServerDesc Value of the server description-header.        
+        * @return CSsdpAdvertise pointer
+        */
+        IMPORT_C static CSsdpAdvertise* AdvertiseByebyeL( TDesC8& aNt,
+                                                          TDesC8& aUsn);
+    
+        /**
+        * Constructor function; Creates standard search message 
+        * with following parameters.
+        * @since Series60 2.0
+        * @param aTarget Value of the ST-header.
+        * @return CSsdpSearch pointer
+        */
+        IMPORT_C static CSsdpSearch* SearchL( TDesC8& aTarget );
+    
+        /**
+        * Constructor function; Creates standard search message 
+        * with following parameters.
+        * @since Series60 2.0
+        * @param aTarget Value of the ST-header.
+        * @param aMaximumWaitTime Value of the MX-header.
+        * @return CSsdpSearch pointer
+        */
+        IMPORT_C static CSsdpSearch* SearchL( TDesC8& aTarget,
+                                              TDesC8& aMaximumWaitTime );
+    
+        /**
+        * Constructor function; Creates standard search response message 
+        * with following parameters.
+        * @since Series60 2.0
+        * @param aSt Value of the ST-header.
+        * @param aUsn Value of the USN-header.  
+        * @param aLoc Value of the Location-header.  
+        * @param aServerDesc Value of the Server description-header.
+        * @return CSsdpSearchResponse pointer
+        */
+        IMPORT_C static CSsdpSearchResponse* ResponseL( TDesC8& aSt, 
+                                                        TDesC8& aUsn, 
+                                                        TDesC8& aLoc,
+                                                        TDesC8& aServerDesc );
+    };
+
+#endif // C_RUPNPSSDPMESSAGEFACTORY_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnptimeoutelement.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,183 @@
+/** @file
+* 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:  Declares virtual MUpnpTimeoutElementParent callback class
+*                and the implemented active object class CUpnpTimeoutElement
+*
+*/
+
+
+#ifndef C_CUPNPTIMEOUTELEMENT_H
+#define C_CUPNPTIMEOUTELEMENT_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CUpnpTimeoutElement;
+
+// CLASS DECLARATION
+
+/**
+*  @brief A virtual parent class.
+*
+*  This interface class is used to receive the timeout callbacks from timeout
+*  elements.
+*
+*  @since Series60 2.0
+*/
+
+class MUpnpTimeoutElementParent 
+    {
+    public:
+
+    /**
+    * A virtual function to be implemented in derived classes.
+    * For example, the implementation might contain deletion of the timeout element.
+    * @since Series60 2.0
+    * @param anElement This pointer contains the element whose timeout has ran out. 
+    * @return None
+    */
+	virtual void TimeoutExpiredL( CUpnpTimeoutElement* anElement ) = 0;
+    };
+
+/**
+*  @brief An element with timeout
+*
+*  This is a virtual base class containing a timeout functionality. This class
+*  is used by following steps:
+*
+*  1. Inherit your class from CUpnpTimeoutElement; 
+*
+*  2. In the constructor of the derived class, call also the constructor of 
+*  CUpnpTimeoutElement. This means you have to have an element library class which
+*  is derived from the class MUpnpTimeoutElementParent. This element library has to
+*  be passed to the constructor of CUpnpTimeoutElement.
+*
+*  3. Call the SetTimeout function to set the timeout of the element
+*
+*  4. If the timeout should be renewed after a timeout, call SetRenew to set the
+*  member variable iRenew. That variable can be used later to decide the destiny
+*  of an element.
+*
+*  @since Series60 2.0
+*/
+class CUpnpTimeoutElement : public CActive
+    {
+    private:
+        static const TUint32 KMicroInSec = 1000000;
+        static const TInt KTime = 1800;
+    
+    protected: // Constructors and destructors
+
+        /**
+        * Constructor function; call from the constructor of a derived class.
+        * @since Series60 2.0
+        * @param aParent A class implementing the parent interface 
+        * MUpnpTimeoutElementParent, in practice the library class
+        */
+    IMPORT_C CUpnpTimeoutElement( MUpnpTimeoutElementParent& aParent );
+      
+        /**
+        * Base class constructor function
+        * @since Series60 2.0
+        */
+    IMPORT_C void BaseConstructL();
+   
+    public:
+ 
+    	/**
+	    * Destructor function; called automatically from the destructor of a 
+        * derived class
+	    **/
+	IMPORT_C virtual ~CUpnpTimeoutElement();
+
+        /**
+    	* This function sets the timeout of the element. The TimeoutExpired()
+        * function of the parent of this element is called after the timeout
+        * @since Series60 2.0
+        * @param aSeconds
+        */
+	IMPORT_C void SetTimeout( TInt aSeconds );
+
+    public: // From CActive
+
+        /**
+    	* Standard callback function of CActive-derived functions
+        * @since Series60 2.0
+        * @return None
+        */
+	IMPORT_C void RunL();
+
+        /**
+    	* Standard callback function of CActive-derived functions
+        * @since Series60 2.0
+        * @return None
+        */
+	IMPORT_C void DoCancel();
+
+        /**
+    	* Standard callback function of CActive-derived functions
+        * @since Series60 2.0
+        * @return None
+        */
+    IMPORT_C TInt RunError( TInt aError );
+
+    public: // New Functions
+
+	    // Enumeration for different timeouts:
+	    enum TState {
+		    EAlive,
+		    EDead,
+		    ELongTime
+	    };
+
+	    // Enumeration for different timeouts:
+	    enum TRenew { 
+		    // This value is for timeouts that should be renewed after the timeout
+		    ERenew, 
+		    // This value is for timeouts that declare the closing of 
+			// an external (device) element; 
+		    EOnce,
+			// This value is for timeouts that declare the closing of an element;
+			// timeout not renewed anymore.
+			ERemove
+	    };
+
+        /**
+    	* Returns the current renew setting
+        * @since Series60 2.0
+        * @return Returns the current renew setting
+        */
+	IMPORT_C TRenew& Renew();
+
+        /**
+    	* ets the renew setting of this element
+        * @since Series60 2.0
+        * @param aRenew The new renew setting
+        */
+	IMPORT_C void SetRenew( TRenew aRenew );
+
+    private: 
+
+	    TRenew iRenew;
+	    TState iState;
+	    RTimer iTimer;
+	    MUpnpTimeoutElementParent& iParent;
+	    TInt iSeconds;
+    };
+
+#endif	// C_CUPNPTIMEOUTELEMENT_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/inc/upnpuheapmark.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,63 @@
+/** @file
+* 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:  Declares macros for heap checks
+*
+*/
+
+
+
+#ifndef UPNPUHEAPMARK_H
+#define UPNPUHEAPMARK_H
+// INCLUDES
+
+#include <e32base.h>
+
+//variables
+const TBool KUpnpHeapChecksToHeapChecks = ETrue; //checks heap only if ETrue
+_LIT( KUpnpHeapChecksAllocInfo, "%D;%D" ); //panic category if heap checks fails
+const TInt KUpnpHeapChecksMaxAllocInfoLength = 21; //10 + 1 + 10
+const TInt KUpnpHeapChecksAllocPanicReason = 0; //panic reason if heap checks fails
+
+//functions
+static void UPnpHeapChecks( TInt aCells, TInt aBytes )
+    {
+    if ( aCells )
+        {
+        TBuf<KUpnpHeapChecksMaxAllocInfoLength> allocInfo;
+        allocInfo.AppendFormat(  KUpnpHeapChecksAllocInfo(), aCells, aBytes );
+        User::Panic( allocInfo, KUpnpHeapChecksAllocPanicReason );
+        }
+    }
+
+
+#define __UPNP_UHEAP_MARK     TInt cells_begin;                                     \
+                              TInt bytes_begin;                                     \
+                              RHeap& heap = User::Heap();                           \
+                              if ( KUpnpHeapChecksToHeapChecks )                    \
+                              {                                                     \
+                              cells_begin = heap.AllocSize( bytes_begin );          \
+                              }    
+
+#define __UPNP_UHEAP_MARKEND if ( KUpnpHeapChecksToHeapChecks )                     \
+                              {                                                     \
+                              TInt cells_end;                                       \
+                              TInt bytes_end;                                       \
+                              cells_end = heap.AllocSize( bytes_end );              \
+                              UPnpHeapChecks( cells_end-cells_begin,                \
+                                                          bytes_end-bytes_begin );  \
+                              }    
+    
+#endif // UPNPUHEAPMARK_H
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpdevicelibrary.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,763 @@
+/** @file
+* Copyright (c) 2005-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:  CUpnpDeviceLibrary
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpdevicelibrary.h"
+#include "upnpssdpmessage.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+
+static const TInt KIntervalBetweenByeAndAlive = 1;
+static const TInt KIntervalBeforeFirstAlive = 1;
+// prevents treating SSDP alive messages sent by local device
+// as an external device messages in case of quick local device restarting
+// heuristic value 
+static const TInt KLocalDeviceHysteresisWindow  = 20;
+// used for IPC communication 2 phase request
+// heuristic value 
+static const TInt KIpcCommunicationTimeout = 2;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::CUpnpDeviceLibrary
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceLibrary::CUpnpDeviceLibrary( MUpnpDeviceLibraryObserver& aObserver,
+                                TInt aHandle )
+    : iObserver(aObserver),
+      iHandle( aHandle )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibrary::ConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceLibrary* CUpnpDeviceLibrary::NewL( 
+                                        MUpnpDeviceLibraryObserver& aObserver,
+                                        TInt aHandle )
+    {
+    CUpnpDeviceLibrary* self = new (ELeave) CUpnpDeviceLibrary( aObserver, aHandle );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    
+    return self;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::~CUpnpDeviceLibrary
+// Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceLibrary::~CUpnpDeviceLibrary()
+    {
+    LOGSH( iHandle, "Devicelibrary ~CUpnpDeviceLibrary");
+
+    iElementArray.ResetAndDestroy();
+    iElementArray.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::PrepareShutdown
+// Prepare devices for shutdown.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::PrepareShutdown()
+    {
+    LOGSH( iHandle, "Devicelibrary PrepareShutdown" );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::AddInfoL
+// Add device info.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::AddInfoL( const TUpnpAddLocalDevice* aIndex, 
+                                        const TDesC8& aBuffer, 
+                                        const TInetAddr& aLocalAddr )
+    {
+    LOGSH( iHandle, "Devicelibrary AddInfoL" );
+    if ( !aIndex )
+        {
+        return;
+        }
+    
+    TPtrC8 uuid = aBuffer.Left(aIndex->iUuidLength);    
+    TInt index = Find( uuid );
+    
+    if ( index != KErrNotFound )
+        {        
+        CUpnpDeviceLibraryElement* elem = iElementArray[index];
+        
+        if ( elem->Local() )
+            {            
+            CUpnpTimeoutElement::TRenew state = elem->Renew();          
+            elem->AddInfoL( aIndex, aBuffer, aLocalAddr );                        
+            elem->SetRenew( CUpnpTimeoutElement::ERenew );
+            elem->SetTimeout( KIntervalBeforeFirstAlive );        
+            elem->SetUpdateId( iUpdateId );
+                 
+            if ( state == CUpnpTimeoutElement::ERemove ) 
+                {   
+                elem->SetAlive( ETrue );                
+                elem->SetUpdateId( ++iUpdateId );
+                iObserver.DeviceListChangedL();
+                }        
+            }
+        else
+            {
+            InvalidateNonLocalDevice( *elem );
+            AppendLocalDeviceL( aIndex, aBuffer, aLocalAddr );                            
+            iObserver.DeviceListChangedL();            
+            }                
+        }
+    else
+        {        
+        AppendLocalDeviceL( aIndex, aBuffer, aLocalAddr );                
+        iObserver.DeviceListChangedL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::InvalidateNonLocalDevice
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibrary::InvalidateNonLocalDevice( CUpnpDeviceLibraryElement& aElem )
+    {
+    aElem.SetAlive( EFalse );
+    aElem.SetUpdateId( ++iUpdateId );
+    aElem.SetTimeout( KIpcCommunicationTimeout );                            
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::AppendLocalDeviceL
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibrary::AppendLocalDeviceL( const TUpnpAddLocalDevice* aIndex, 
+                         const TDesC8& aBuffer, 
+                         const TInetAddr& aLocalAddr )
+    {    
+    CUpnpDeviceLibraryElement* element = CUpnpDeviceLibraryElement::NewL(*this);
+    CleanupStack::PushL( element );
+    element->AddInfoL( aIndex, aBuffer, aLocalAddr );
+    element->SetRenew( CUpnpTimeoutElement::ERenew );
+    element->SetTimeout( KIntervalBeforeFirstAlive );
+    element->SetLocal( ETrue );
+    element->SetUpdateId( ++iUpdateId );
+    iElementArray.AppendL( element );
+    CleanupStack::Pop( element );    
+    }
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::AddInfoL
+// Add device info.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::AddInfoL( const TUpnpAddLocalDevice* aIndex, 
+                                        const TDesC8& aBuffer )
+    {
+    LOGSH( iHandle, "Devicelibrary AddInfoL");
+
+    if ( !aIndex )
+        {
+        return;
+        }
+    
+    TPtrC8 uuid = aBuffer.Left(aIndex->iUuidLength);
+    
+    TInt index = Find( uuid );
+    
+    if ( index != KErrNotFound )
+        {
+        CUpnpDeviceLibraryElement* elem = iElementArray[index];
+        
+        CUpnpTimeoutElement::TRenew state = elem->Renew();
+        
+        elem->AddInfoL( aIndex, aBuffer );                        
+        elem->SetRenew( CUpnpTimeoutElement::ERenew );
+        elem->SetTimeout( 1 );        
+        elem->SetUpdateId( iUpdateId );
+             
+        if (state == CUpnpTimeoutElement::ERemove) 
+            {   
+            iUpdateId++; 
+            elem->SetAlive( ETrue );                
+            elem->SetUpdateId( iUpdateId );
+            iObserver.DeviceListChangedL();
+            }        
+        }
+    else
+        {
+        iUpdateId++;
+        
+        CUpnpDeviceLibraryElement* element = CUpnpDeviceLibraryElement::NewL(*this);
+        CleanupStack::PushL( element );
+        element->AddInfoL( aIndex, aBuffer );
+        element->SetRenew( CUpnpTimeoutElement::ERenew );
+        element->SetTimeout( 1 );
+        element->SetLocal( EFalse );
+        element->SetUpdateId( iUpdateId );
+        iElementArray.AppendL( element );
+        CleanupStack::Pop( element );
+        
+        iObserver.DeviceListChangedL();
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::AddInfoL
+// Add device info.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::AddInfoL( CUpnpSsdpMessage* aMessage )
+    {
+    LOGSH( iHandle, "Devicelibrary AddInfoL");
+    if ( aMessage )
+        {
+        if ( aMessage->IsSsdpAlive() )
+            {       
+            if( AddDeviceL(aMessage) )
+                {  
+                iObserver.DeviceListChangedL();
+                }
+            }
+        else
+            {
+            RemoveDeviceL( aMessage );
+            iObserver.DeviceListChangedL();
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::Find
+// Find device given by UUID.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpDeviceLibrary::Find( const TDesC8& aUuid )
+    {
+    LOGSH( iHandle, "Devicelibrary Find");
+
+    for ( TInt i=0; i<iElementArray.Count(); i++ )
+        {
+        if ( aUuid.FindC( iElementArray[i]->UUID() ) == 0 
+             && aUuid.Length() == iElementArray[i]->UUID().Length() )
+            {
+            return i;
+            }
+        }
+    return KErrNotFound;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::RemoveL
+// Remove device by given UID. Used for local devices only.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::RemoveL( const TDesC8& aUuid )
+    {
+    LOGSH( iHandle, "Devicelibrary RemoveL");
+
+    TInt result = Find( aUuid );
+    
+    if ( result != KErrNotFound )
+        {
+        CUpnpDeviceLibraryElement* elem = iElementArray[result];
+
+        iObserver.AdvertiseDeviceL( EFalse, *elem );
+        iObserver.AdvertiseDeviceL( EFalse, *elem );        
+
+        elem->AdvertisingFinished();
+        
+        elem->SetRenew( CUpnpTimeoutElement::ERemove );
+        elem->SetTimeout( KLocalDeviceHysteresisWindow );
+        elem->SetUpdateId( ++iUpdateId );
+        elem->SetAlive( EFalse );            
+
+        iObserver.DeviceListChangedL();
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::RemoveSilentL
+// Remove device by given UID. Used for local devices only.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::RemoveSilentL( const TDesC8& aUuid )
+    {
+    //LOGS( iHandle, "Devicelibrary RemoveSilentL");
+    
+   LOGS("CUpnpDeviceLibrary::RemoveSilentL( const TDesC8& aUuid )");
+    TInt result = Find( aUuid );
+    
+    if ( result != KErrNotFound )
+        {
+        CUpnpDeviceLibraryElement* elem = iElementArray[result];
+
+        
+        elem->SetRenew( CUpnpTimeoutElement::ERemove );
+        elem->SetTimeout( KLocalDeviceHysteresisWindow );
+        elem->SetUpdateId( ++iUpdateId );
+        elem->SetAlive( EFalse );            
+
+        iObserver.DeviceListChangedL();
+        }
+         LOGS("CUpnpDeviceLibrary::RemoveSilentL( const TDesC8& aUuid ) passed");
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::TimeoutExpiredL
+// Timeout expired for advertisement.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibrary::TimeoutExpiredL( CUpnpTimeoutElement* anElement )
+    {
+    LOGSH( iHandle, "Devicelibrary TimeoutExpiredL");
+
+    if ( !anElement )
+        {
+        return;
+        }
+    
+    CUpnpDeviceLibraryElement* elem = 
+        static_cast<CUpnpDeviceLibraryElement*>(anElement);
+    
+    switch ( elem->Renew() )
+        {
+        case CUpnpTimeoutElement::ERenew:
+            {
+            if ( !elem->Advertised() )
+                {
+                elem->Advertising();
+                // whatever happends we don't want to have leave here
+                TRAP_IGNORE( iObserver.AdvertiseDeviceL( EFalse, *elem ));
+                TRAP_IGNORE( iObserver.AdvertiseDeviceL( EFalse, *elem ));
+                elem->SetTimeout( KIntervalBetweenByeAndAlive );
+                }
+            else 
+                {
+                // whatever happends we don't want to have leave here
+                TRAP_IGNORE( iObserver.AdvertiseDeviceL( ETrue, *elem ));
+                elem->SetTimeout( KDeviceTimeout );
+                }
+            }
+            break;
+            
+        case CUpnpTimeoutElement::EOnce: // after cache control expires
+            {    
+            // Set the timeout for the device to be removed
+            iUpdateId++;
+            elem->SetRenew( CUpnpTimeoutElement::ERemove );
+            if( elem->Local() )
+                {
+                elem->SetTimeout( KLocalDeviceHysteresisWindow );    
+                }
+            else
+                {
+                elem->SetTimeout( KIpcCommunicationTimeout );
+                }
+            elem->SetUpdateId( iUpdateId );
+            elem->SetAlive( EFalse );
+            elem->SetExpired( ETrue );
+
+            iObserver.DeviceListChangedL();
+            }
+            break;
+
+        case CUpnpTimeoutElement::ERemove:
+            {
+            // Remove device from the element array
+            for ( TInt i=0; i<iElementArray.Count(); i++ )
+                {
+                if ( elem == iElementArray[i] )
+                    {
+                    iElementArray.Remove( i );
+                    iElementArray.Compress();
+                    
+                    delete elem;
+                    break;
+                    }
+                }
+            }
+            break;
+
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::DeviceList
+// Return device list.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RPointerArray<CUpnpDeviceLibraryElement>& CUpnpDeviceLibrary::DeviceList()
+    {
+    LOGSH( iHandle, "Devicelibrary DeviceList");
+
+    return iElementArray;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::GetUpdate
+// Get update.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::GetUpdate( TInt& aUpdateId, 
+                                         TUpnpDevice *&aDevices, 
+                                         TUpnpService *&aServices,
+                                         TInt& aDeviceCount,
+                                         TInt& aServiceCount )
+    {
+    aDevices = NULL;
+    aServices = NULL;
+    
+    TUpnpDevice* devices = NULL;
+    TUpnpService* services = NULL;
+    
+    aDeviceCount = 0;
+    aServiceCount = 0;
+    
+    for ( TInt i = 0; i < iElementArray.Count(); i++ )
+        {
+        CUpnpDeviceLibraryElement* elem = iElementArray[i];
+        
+        if (elem->UpdateId() > aUpdateId)
+            {
+            TUpnpDevice* temp = new TUpnpDevice[aDeviceCount+1];
+            if ( !temp )
+                {
+                continue;
+                }
+            
+            TPtr8 destPtr(reinterpret_cast<TUint8*>(temp), 
+                0,
+                sizeof(TUpnpDevice)*(aDeviceCount+1));
+            TPtr8 srcPtr(reinterpret_cast<TUint8*>(devices),
+                sizeof(TUpnpDevice)*aDeviceCount,
+                sizeof(TUpnpDevice)*aDeviceCount);
+            
+            destPtr.Copy(srcPtr);
+            
+            if (devices)
+                {
+                delete[] devices;
+                devices = NULL;
+                }
+            
+            devices = temp;
+            
+            TUpnpDevice devtemp;
+            destPtr.Set(reinterpret_cast<TUint8*>(&devices[aDeviceCount]),
+                0,
+                sizeof(TUpnpDevice));
+            srcPtr.Set(reinterpret_cast<TUint8*>(&devtemp), 
+                sizeof(TUpnpDevice),
+                sizeof(TUpnpDevice));
+            destPtr.Copy(srcPtr);
+            
+            devices[aDeviceCount].Set(elem);
+            
+            TInt servs = elem->ServiceList().Count();
+            
+            TUpnpService* tempServ = new TUpnpService[aServiceCount+servs];
+            if ( !tempServ )
+                {
+                delete [] temp;
+                temp = NULL;
+                devices = NULL;
+                continue;
+                }
+            
+            destPtr.Set(reinterpret_cast<TUint8*>(tempServ), 
+                0,
+                sizeof(TUpnpService)*(aServiceCount+servs));
+            srcPtr.Set(reinterpret_cast<TUint8*>(services),
+                sizeof(TUpnpService)*aServiceCount,
+                sizeof(TUpnpService)*aServiceCount);
+            
+            destPtr.Copy(srcPtr);
+            
+            if (services)
+                {
+                delete[] services;
+                services = NULL;
+                }
+            
+            services = tempServ;
+            
+            for (TInt j=0; j<servs; j++)
+                {
+                TUpnpService service;
+                destPtr.Set(reinterpret_cast<TUint8*>(&services[aServiceCount]),
+                    0,
+                    sizeof(TUpnpService));
+                srcPtr.Set(reinterpret_cast<TUint8*>(&service), 
+                    sizeof(TUpnpService),
+                    sizeof(TUpnpService));
+                destPtr.Copy(srcPtr);
+                
+                services[aServiceCount].iServiceType.Zero();
+                services[aServiceCount].iServiceType.Append(
+                    elem->ServiceList()[j] );
+                
+                aServiceCount++;
+                }
+            
+            aDeviceCount++;
+            }
+        }
+    
+    aUpdateId = iUpdateId;
+    
+    aDevices = devices;
+    aServices = services;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::RemoveAllDevicesL
+// Removes all remote devices from device library.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::RemoveAllDevicesL()
+    {
+    for (TInt i = 0; i < iElementArray.Count(); i++)
+        {
+        CUpnpDeviceLibraryElement* elem = iElementArray[i];
+        if ( elem->Alive() )
+            {
+            iUpdateId++;
+            elem->SetAlive(EFalse);
+            elem->SetUpdateId( iUpdateId );
+            if( elem->Renew() == CUpnpTimeoutElement::EOnce )
+                {
+                elem->SetRenew( CUpnpTimeoutElement::ERemove );
+                elem->SetTimeout( KIpcCommunicationTimeout );
+                }
+            }
+        }
+    iObserver.DeviceListChangedL();        
+    }    
+
+// -----------------------------------------------------------------------------
+// TUpnpDevice::Set
+// Set device.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TUpnpDevice::Set(CUpnpDeviceLibraryElement* aElem)
+    {
+    LOGS("Devicelibrary Set");
+
+    if ( !aElem )
+        {
+        return;
+        }
+
+    iDescriptionURL = aElem->DescriptionUrl().Left( iDescriptionURL.MaxLength() );
+    iUUID = aElem->UUID().Left( iUUID.MaxLength() );
+    iDeviceType = aElem->DeviceType().Left( iDeviceType.MaxLength() );
+    iDomain = aElem->Domain().Left( iDomain.MaxLength() );
+
+    iServiceCount = aElem->ServiceList().Count();
+    iLocal = aElem->Local();
+    iRemote = EFalse;
+    iAlive = aElem->Alive();
+    iExpired = aElem->Expired();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::AddDeviceL
+// Add a device.
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpDeviceLibrary::AddDeviceL(CUpnpSsdpMessage *aMessage)
+    {
+    TBool update = EFalse;
+
+    LOGSH( iHandle, "Devicelibrary AddDeviceL");
+
+    if ( !aMessage )
+        {
+        return update;
+        }
+    
+    TPtr8 uuidPtr = aMessage->Uuid();
+    TInt index = Find( uuidPtr );
+    
+    if (index != KErrNotFound)
+        {
+        CUpnpDeviceLibraryElement* elem = iElementArray[index];
+        if ( !elem->Local() )
+        {
+            if( elem->Renew() == CUpnpTimeoutElement::ERemove )
+                {
+                iElementArray.Remove( index );
+                iElementArray.Compress();
+                
+                delete elem;
+                
+                CUpnpDeviceLibraryElement* element = CUpnpDeviceLibraryElement::NewL(*this);
+                CleanupStack::PushL(element);
+                
+                update = element->AddInfoL(aMessage, iUpdateId);
+                
+                element->SetRenew(CUpnpTimeoutElement::EOnce);
+                element->SetTimeout(aMessage->CacheControl());
+                element->SetLocal(EFalse);
+                iElementArray.Append(element);
+                
+                CleanupStack::Pop(); // element
+                }
+            
+            else 
+                {
+                if(elem->Filter())
+                    {
+                    //Alive message from 
+                    if(elem->AddInfoL(aMessage, iUpdateId))
+                        {
+                        update=ETrue;
+                        }
+                    elem->SetTimeout(aMessage->CacheControl());    
+                    }
+                else
+                    {
+                    iElementArray.Remove( index );
+                    iElementArray.Compress();
+                
+                    delete elem;
+                
+                    CUpnpDeviceLibraryElement* element = CUpnpDeviceLibraryElement::NewL(*this);
+                    CleanupStack::PushL(element);
+                
+                    update = element->AddInfoL(aMessage, iUpdateId);
+                
+                    element->SetRenew(CUpnpTimeoutElement::EOnce);
+                    element->SetTimeout(aMessage->CacheControl());
+                    element->SetLocal(EFalse);
+                    iElementArray.Append(element);
+                
+                    CleanupStack::Pop(); // element
+                    }
+                }
+            }
+        }
+    else
+        {    
+        CUpnpDeviceLibraryElement* element = CUpnpDeviceLibraryElement::NewL(*this);
+        CleanupStack::PushL(element);
+        
+        update = element->AddInfoL(aMessage, iUpdateId);
+        
+        element->SetRenew(CUpnpTimeoutElement::EOnce);
+        element->SetTimeout(aMessage->CacheControl());
+        element->SetLocal(EFalse);
+        iElementArray.Append(element);
+        
+        CleanupStack::Pop(); // element
+        }
+    return update;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::RemoveDevice
+// Remove a device.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibrary::RemoveDeviceL( CUpnpSsdpMessage *aMessage )
+    {
+    LOGSH( iHandle, "Devicelibrary RemoveDevice" );
+
+    if ( !aMessage )
+        {
+        return;
+        }
+    
+    TPtr8 uuidPtr = aMessage->Uuid();
+    TInt index = Find( uuidPtr );
+    
+    if ( index != KErrNotFound )
+        {
+        CUpnpDeviceLibraryElement* elem = iElementArray[index];
+        if ( !elem->Local() )
+            {
+            if ( elem->Alive() )
+                {
+                iUpdateId++;
+                elem->SetAlive(EFalse);
+                elem->SetUpdateId( iUpdateId );
+                if( elem->Renew() == CUpnpTimeoutElement::EOnce )
+                    {
+                    elem->SetRenew( CUpnpTimeoutElement::ERemove );
+                    elem->SetTimeout( KIpcCommunicationTimeout );
+                    }
+                }
+            iObserver.DeviceListChangedL();
+            }
+        }
+    else
+        {        
+        CUpnpDeviceLibraryElement* element = CUpnpDeviceLibraryElement::NewL( *this );
+        CleanupStack::PushL( element );
+
+        element->AddInfoL( aMessage, iUpdateId );
+
+        iUpdateId++;
+        element->SetAlive( EFalse );
+        element->SetUpdateId( iUpdateId );
+        element->SetRenew( CUpnpTimeoutElement::ERemove );
+        element->SetTimeout( KIpcCommunicationTimeout );
+        element->SetLocal( EFalse );
+        iElementArray.AppendL( element );
+        
+        CleanupStack::Pop( element );
+        
+        iObserver.DeviceListChangedL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibrary::StopFilteringDeviceL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibrary::StopFilteringDeviceL( const TDesC8& aUuid )
+    {
+    LOGSH( iHandle, "Devicelibrary RemoveDevice" );
+
+    TInt index = Find( aUuid );
+    
+    if ( index != KErrNotFound )
+        {
+        CUpnpDeviceLibraryElement* elem = iElementArray[index];
+        elem->SetFilter(EFalse);
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpdevicelibraryelement.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,672 @@
+/** @file
+* Copyright (c) 2005-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:  CUpnpDeviceLibraryElement
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32base.h>
+#include "upnpdevicelibraryelement.h"
+#include "upnpssdpmessage.h"
+#include "upnpcons.h"
+#include "upnpstring.h"
+
+using namespace UpnpSSDP;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::CUpnpDeviceLibraryElement
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpDeviceLibraryElement::CUpnpDeviceLibraryElement(MUpnpTimeoutElementParent& aParent)
+    : CUpnpTimeoutElement(aParent)
+    {
+    iLocal = EFalse;
+    iFilter = ETrue;
+    iAdvertised = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::ConstructL()
+    {
+    BaseConstructL();
+    iUUID = HBufC8::NewL(0);
+    iDescriptionURL = HBufC8::NewL(0);
+    iDomain = HBufC8::NewL(0);
+    iDeviceType = HBufC8::NewL(0);
+
+    iServiceList = new (ELeave) CDesC8ArrayFlat(4);
+
+    iAlive = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceLibraryElement* CUpnpDeviceLibraryElement::NewL( 
+                                               MUpnpTimeoutElementParent& aParent )
+    {
+    CUpnpDeviceLibraryElement* self = new (ELeave) CUpnpDeviceLibraryElement(aParent);
+    
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::~CUpnpDeviceLibraryElement
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpDeviceLibraryElement::~CUpnpDeviceLibraryElement()
+    {
+    Cancel(); 
+
+    delete iUUID;
+    iUUID = NULL;
+    delete iDescriptionURL;
+    iDescriptionURL = NULL;
+    delete iDomain;
+    iDomain = NULL;
+    delete iDeviceType;
+    iDeviceType = NULL;
+
+    if( iServiceList )    
+        {
+        iServiceList->Reset();
+        delete iServiceList;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::IsRootDevice
+// Return iRootDevice.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDeviceLibraryElement::IsRootDevice() const
+    {
+    return iRootDevice;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::UUID
+// Return iUUID.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpDeviceLibraryElement::UUID() 
+    {
+    return *iUUID;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::DescriptionURL
+// Return iDescriptionURL.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpDeviceLibraryElement::DescriptionUrl() 
+    {
+    return *iDescriptionURL;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::Domain
+// Return iDomain.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpDeviceLibraryElement::Domain() 
+    {
+    return *iDomain;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::DeviceType
+// Return iDeviceType.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpDeviceLibraryElement::DeviceType() 
+    {
+    return *iDeviceType;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::ServiceList
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CDesC8Array& CUpnpDeviceLibraryElement::ServiceList() 
+    {
+    return *iServiceList;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::AddInfoFromNotificationTypeHeaderL
+//
+// Supported NT (Notification Type) messages:
+// "uuid:"                         (length: 5 )
+// "upnp:rootdevice"               (length: 15)
+// "urn:schemas-upnp-org:device:"  (length: 28)
+// "urn:schemas-upnp-org:service:" (length: 29)
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpDeviceLibraryElement::AddInfoFromNotificationTypeHeaderL(
+    CUpnpSsdpMessage* aMessage )
+    {
+    TPtrC8 nt = aMessage->St( );
+
+    if ( nt.Length( ) == 0 )
+        {
+        nt.Set( aMessage->Nt( ) );
+        }
+
+    if ( HasPrefix( nt, KUPnPUuid ) )
+        {
+        // an uuid advertisement
+        return ETrue;
+        }
+
+    if ( iDeviceType->Length( ) == 0 )
+        {
+        if ( nt == KUPnPRootDevice )
+            {
+            // a root device advertisement
+            SetDeviceTypeL( nt );
+            return ETrue;
+            }
+
+        if ( HasPrefix( nt, KUPnPDeviceSchema ) )
+            {
+            // a device advertisement
+            SetDeviceTypeL( nt );
+            return ETrue;
+            }
+        }
+
+    if ( HasPrefix( nt, KUPnPServiceSchema ) )
+        {
+        // a service advertisement
+        AddServiceTypeL( nt );
+        return ETrue;
+        }
+
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::AddInfoL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDeviceLibraryElement::AddInfoL( CUpnpSsdpMessage* aMessage, 
+                                                TInt& aUpdateId )
+    {
+    if ( !aMessage )
+        {
+        return EFalse;
+        }
+
+    if ( iDescriptionURL->Length() == 0 )
+        {
+        SetDescriptionUrlL( aMessage->Location() );
+        }
+
+    TBool updateInc = AddInfoFromNotificationTypeHeaderL( aMessage );
+
+    //If iUUID message has not been defined, Set it as Message's UUID
+    if ( iUUID->Length() == 0 )
+        {
+        SetUuidL( aMessage->Uuid() );
+        }
+    else
+        {
+        // Set update only when device didn't notify before, always 
+        // when device notify - uuid will be set
+        updateInc = EFalse;
+        }
+
+    if ( updateInc )
+        {
+        aUpdateId++;
+        SetUpdateId(aUpdateId);
+        }
+
+    return updateInc;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::AddInfoL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibraryElement::AddInfoL(const TUpnpAddLocalDevice* anIndex,
+                                                  const TDesC8& aBuffer,
+                                                  const TInetAddr& aAddr)
+    {
+    if ( !anIndex )
+        {
+        return;
+        }
+
+    TInt index = 0;
+
+    TPtrC8 uuid = aBuffer.Left(anIndex->iUuidLength);
+    index += anIndex->iUuidLength;
+
+    TPtrC8 deviceType = aBuffer.Mid(index, anIndex->iDeviceTypeLength);
+    index += anIndex->iDeviceTypeLength;
+
+    TPtrC8 descriptionUrl = aBuffer.Mid(index, anIndex->iDescriptionUrlLength);
+    index += anIndex->iDescriptionUrlLength;
+
+    TPtrC8 domain = aBuffer.Mid(index, anIndex->iDomainLength);
+    index += anIndex->iDomainLength;
+
+    TPtrC8 port = aBuffer.Mid(index, anIndex->iPortNumberLength);
+    index += anIndex->iPortNumberLength;
+
+    TPtrC8 root = aBuffer.Mid(index, anIndex->iRootDeviceLength);
+    index += anIndex->iRootDeviceLength;
+
+    if (uuid.Length()> 0)
+        {
+        SetUuidL(uuid);
+        }
+
+    if (deviceType.Length()> 0)
+        {
+        SetDeviceTypeL(deviceType);
+        }
+
+    if (root.Length()> 0)
+        {
+        SetRootDevice( ETrue );
+        }
+    else
+        {
+        SetRootDevice( EFalse );
+        }
+
+    if (descriptionUrl.Length()> 0)
+        {
+        if (aAddr.IsUnspecified())
+            {
+            SetDescriptionUrlL(descriptionUrl);
+            }
+        else
+            {
+            SetDescriptionUrlL(descriptionUrl, aAddr, port);
+            }
+        }
+
+    if (domain.Length()> 0)
+        {
+        SetDomainL(domain);
+        }
+
+    for (TInt i=0; i < KMaxServiceCount; i++)
+        {
+        TPtrC8 serviceType = aBuffer.Mid(index, anIndex->iServiceLength[i]);
+        index += anIndex->iServiceLength[i];
+
+        AddServiceTypeL(serviceType);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::AddInfoL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibraryElement::AddInfoL(const TUpnpAddLocalDevice* anIndex,
+                                                  const TDesC8& aBuffer)
+    {
+    AddInfoL(anIndex, aBuffer, TInetAddr());
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetUuidL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetUuidL( const TDesC8& aUUID )
+    {
+    if ( aUUID.Length()> KUdnMaxLength )
+        {
+        User::Leave( KErrOverflow );
+        }
+    
+    delete iUUID;
+    iUUID = NULL;
+
+    iUUID = aUUID.AllocL( );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetDescriptionUrlL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetDescriptionUrlL(
+    const TDesC8& aDescriptionURL )
+    {
+    if ( aDescriptionURL.Length( ) > KUrlMaxLength )
+        {
+        User::Leave( KErrOverflow );
+        }
+
+    delete iDescriptionURL;
+    iDescriptionURL = NULL;
+
+    iDescriptionURL = aDescriptionURL.AllocL( );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetDescriptionUrlL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetDescriptionUrlL(
+    const TDesC8& aDescriptionURL, const TInetAddr& aAddr, const TDesC8& aPort )
+    {
+    TBuf<UpnpSSDP::KIPAddBuffLen> addrBuf;
+    aAddr.Output( addrBuf );
+
+    HBufC8* addrBuf8 = UpnpString::FromUnicodeL( addrBuf );
+    CleanupStack::PushL( addrBuf8 );
+
+    HBufC8* url = HBufC8::NewLC( (UpnpHTTP::KHTTPUrl().Length( ))
+            + aDescriptionURL.Length( ) + addrBuf8->Length( )
+            + aPort.Length( )+ 2 );//+2 reserved for colon and slashes in url
+
+    url->Des().Append( UpnpHTTP::KHTTPUrl( ) );
+    url->Des().Append( *addrBuf8 );
+    if ( aPort.Length( ) > 0 )
+        {
+        url->Des().Append( UpnpString::KColon( ) );
+        url->Des().Append( aPort );
+        }
+    // After Ip address there should be slash and device Url so device url
+    // must start with slash
+    ASSERT( aDescriptionURL.Find( UpnpString::KSlash) == 0 ); 
+   	
+    url->Des().Append( aDescriptionURL );
+
+    SetDescriptionUrlL( *url );
+
+    CleanupStack::PopAndDestroy( url );
+    CleanupStack::PopAndDestroy( addrBuf8 );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetDomainL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetDomainL(const TDesC8& aDomain)
+    {
+    if ( aDomain.Length( ) > KDeviceTypeBufferLength )
+        {
+        User::Leave( KErrOverflow );
+        }
+    
+    delete iDomain;
+    iDomain = NULL;
+
+    iDomain = aDomain.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetDeviceTypeL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetDeviceTypeL(const TDesC8& aDeviceType)
+    {
+    if ( aDeviceType.Length( ) > KDeviceTypeBufferLength )
+        {
+        User::Leave( KErrOverflow );
+        }
+    
+    delete iDeviceType;
+    iDeviceType = NULL;
+
+    iDeviceType = aDeviceType.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::AddServiceTypeL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::AddServiceTypeL( const TDesC8& aServiceType )
+    {
+    if ( aServiceType.Length() > 0 )
+        {
+        if ( aServiceType.Length() > KServiceTypeBufferLength )
+            {
+            User::Leave( KErrOverflow );
+            }
+        // check if this service type is already mentioned 
+        // in the service type list
+        TInt foundIdx;
+        
+        if ( iServiceList->Find( aServiceType, foundIdx ) == 0 )
+            {
+            return;
+            }
+
+        // else, append the new service type to the list
+        iServiceList->AppendL( aServiceType );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::AsTDeviceL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TUpnpDevice* CUpnpDeviceLibraryElement::AsTDeviceL() const
+    {
+    TUpnpDevice* dev = new (ELeave) TUpnpDevice;
+    dev->Set(const_cast<CUpnpDeviceLibraryElement*>(this));
+    return dev;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::UpdateId
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpDeviceLibraryElement::UpdateId() const
+    {
+    return iUpdateId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetUpdateId
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibraryElement::SetUpdateId(TInt aUpdateId)    
+    {
+    iUpdateId = aUpdateId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetAlive
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpDeviceLibraryElement::SetAlive(TBool aAlive)
+    {
+    iAlive = aAlive;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::Alive
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDeviceLibraryElement::Alive() const
+    {
+    return iAlive;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetLocal
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetLocal(TBool aLocal)
+    {
+    iLocal = aLocal;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::Local
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpDeviceLibraryElement::Local() const
+    {
+    return iLocal;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetFilter
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetFilter(TBool aFilter)
+    {
+    iFilter = aFilter;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::Filter
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpDeviceLibraryElement::Filter() const
+    {
+    return iFilter;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::Expired
+//
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpDeviceLibraryElement::Expired() const
+    {
+    return iExpired;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetExpired
+//
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetExpired( TBool aExpired )
+    {
+    iExpired = aExpired;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::SetRootDevice
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::SetRootDevice(TBool aRootDevice)
+    {
+    iRootDevice = aRootDevice;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::Advertised
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpDeviceLibraryElement::Advertised()
+    {
+    return iAdvertised;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::Advertising
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::Advertising()
+    {
+    iAdvertised = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::AdvertisingFinished
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpDeviceLibraryElement::AdvertisingFinished()
+    {
+    iAdvertised = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpDeviceLibraryElement::HasPrefix
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TBool CUpnpDeviceLibraryElement::HasPrefix( const TDesC8& aDescriptor,
+    const TDesC8& aPrefix )
+    {
+    return (aDescriptor.Left( aPrefix.Length( ) ) == aPrefix );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpdominterface.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,1184 @@
+/** @file
+* 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:  UpnpDomInterface
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32def.h>
+#include <e32math.h>
+#include <f32file.h>
+#include <s32file.h>
+#include <e32std.h>
+
+#define KLogFile _L("DLNAWebServer.txt")
+
+#include "upnpdominterface.h"
+#include "upnpstring.h"
+#include "upnpcustomlog.h"
+
+
+#include <xmlengdom.h>
+#include <xmlengdocument.h>
+#include <xmlengserializationoptions.h>
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+namespace UpnpDomInterface
+    {
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetAttrValueL
+// Gets the element attribute's value
+// -----------------------------------------------------------------------------
+//
+	EXPORT_C TPtrC8 GetAttrValueL( const TXmlEngElement& aElement,
+                    	      	   const TDesC8& aAttribute )	
+		{
+		if( aElement.NotNull() )
+			{
+			
+			TPtrC8 val = aElement.AttributeValueL( aAttribute );
+			
+			if( val.Length() )	
+				{
+				// Cleanup
+				return val;
+				}
+			
+			// Cleanup
+			return KNullDesC8();
+		
+			}
+			
+		return KNullDesC8();
+		}
+	
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetElementValueL
+// Gets value of the indicated element.
+// -----------------------------------------------------------------------------
+//
+	EXPORT_C TPtrC8 GetElementValueL( const TXmlEngElement& aElement )
+		{
+		if( aElement.IsNull() )
+			User::Leave( KErrNotFound );
+		
+		if( !aElement.Value().Length() )
+			return KNullDesC8();
+		
+		return aElement.Value();
+		
+		}
+    
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::AllocElementValueL
+// Gets value of the indicated element and allocs it on heap.
+// -----------------------------------------------------------------------------
+//
+	EXPORT_C HBufC* AllocElementValueL( const TXmlEngElement& aElement )
+		{
+		if( aElement.IsNull() )
+			User::Leave( KErrNotFound );
+		
+		if( !aElement.Value().Length() )
+			return NULL;
+		
+		HBufC* ret = HBufC::NewL(aElement.Value().Length());
+		ret->Des().Copy(aElement.Value());
+		return ret;
+		}
+    
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::CheckTagL
+// Checks the element's tag
+// -----------------------------------------------------------------------------
+//
+	EXPORT_C TBool CheckTagL( const TXmlEngElement& aElement,
+                    	      const TDesC8& aTag )
+		{
+            		
+        // Check the local name against the wanted tag.
+		TInt difference = aElement.Name().Compare( aTag );
+		
+		// Check the name of the element, 
+        // if it equals to Tag (the wanted value) 
+        if ( difference == 0 )
+      		return ETrue;
+        else 
+        	return EFalse;
+          				
+		}
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::CheckTagL
+// Checks the element's tag
+// -----------------------------------------------------------------------------
+//
+	EXPORT_C TBool CheckTagL( const TXmlEngElement& aElement,
+                       		  const TDesC8& aTag,
+                       		  const TDesC8& aTagValue )
+		{
+		
+		// If tag name equals
+		if( CheckTagL( aElement, aTag ) )
+			{
+			 
+	        TInt difference = aElement.Value().Compare( aTagValue );
+	            	
+             // If value also equals then that's the tag
+             // we're looking for
+             if ( difference == 0 || ( !aElement.Value().Length() && !aTagValue.Length() ) )
+      		   	return ETrue;
+                    	
+			}
+		
+		return EFalse;  				
+		}
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::CheckSubTagL
+// Check tag.
+// -----------------------------------------------------------------------------
+//            
+    EXPORT_C TBool CheckSubTagL( const TXmlEngElement& aElement,
+                                 const TDesC8& aTag )
+        {
+        
+        // Go through the elements of the current level.   
+        if ( aElement.NotNull() )
+            {
+          	
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+				 
+				// Check the name of the sub element, 
+                // if it equals to Tag (the wanted value) 
+                if ( CheckTagL( childElements.Next(), aTag ) )
+                    {
+                    CleanupStack::PopAndDestroy(&childElements);
+      		        return ETrue;
+                    }				
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+            }
+
+        return EFalse;
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::CheckSubTagL
+// Check sub tag.
+// -----------------------------------------------------------------------------
+//          
+    EXPORT_C TBool CheckSubTagL( const TXmlEngElement& aElement,
+                                 const TDesC8& aTag,
+                                 const TDesC8& aTagValue )
+        {
+        
+        // Go through the elements of the current level.   
+        if ( aElement.NotNull() )
+            {
+          	
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+				
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+				
+				if( CheckTagL( sub, aTag, aTagValue ) )
+				    {
+				    CleanupStack::PopAndDestroy(&childElements);
+					return ETrue;
+				    }
+			
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+            }
+
+		return EFalse;
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::CheckSubTagPrefixL
+// Check sub tag prefix.
+// -----------------------------------------------------------------------------
+//              
+    EXPORT_C TBool CheckSubTagPrefixL( const TXmlEngElement& aElement,
+                                       const TDesC8& aNameSpacePrefix,
+                                       const TDesC8& aTag,
+                                       const TDesC8& aTagValue )
+        {
+        
+      	// Go through the elements of the current level.   
+        if ( aElement.NotNull() )
+            {
+          	
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+				
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+				
+				if( CheckTagL( sub, aTag, aTagValue ) )
+					{
+					
+					TXmlEngNamespace ns = sub.LookupNamespaceByPrefixL( aNameSpacePrefix );
+					
+					//Does the prefix match or is there is no prefix if empty string was passed
+					if( ns.NotNull() || ( ns.IsNull() && aNameSpacePrefix.Length() == 0 ) )
+						{
+						CleanupStack::PopAndDestroy(&childElements);
+						return ETrue;							
+						}
+					}
+                }
+            CleanupStack::PopAndDestroy(&childElements);
+            }
+        
+        return EFalse;
+        
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::CheckAttributeValueL
+// Check attribute value.
+// -----------------------------------------------------------------------------
+//            
+    EXPORT_C TBool CheckAttributeValueL( const TXmlEngElement& aElement,
+                                         const TDesC8& aAttribute,
+                                         const TDesC8& aValue )
+        {
+        if ( aElement.NotNull() )
+            {
+            
+            // Check existence and value of the argument
+         	TInt difference = aElement.AttributeValueL( aAttribute ).Compare( aValue );
+ 
+            if(!difference)
+            	return ETrue;
+            else
+            	return EFalse;
+
+            }
+
+        return EFalse;
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::DeleteElement
+// Delete DOM element from the tree.
+// -----------------------------------------------------------------------------
+//    
+    EXPORT_C TXmlEngElement DeleteElement(TXmlEngElement& aElement)
+        {
+        
+		if( aElement.IsNull() )
+            {
+            TXmlEngElement nullElement;
+            return nullElement;
+            }
+            
+        TXmlEngElement parent = aElement.ParentNode().AsElement();
+		
+		aElement.Remove();
+		       
+        return parent;
+        }
+        
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetElementL
+// Get element.
+// -----------------------------------------------------------------------------
+//  
+    EXPORT_C TBool GetElementL( const TXmlEngElement& aElement, 
+                                TXmlEngElement& aWanted, 
+                                const TDesC8& aMainTag, 
+                                TInt aDepth, 
+                                TInt aCurrentDepth )
+        {
+
+        if ( aElement.NotNull() )
+            {
+            aCurrentDepth++;
+			
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+				
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+				 
+				// Check the name of the element, 
+                // if it equals to MainTag (the wanted value) 
+                if ( CheckTagL( sub, aMainTag ) )
+                    {
+                    aWanted = sub;
+                    CleanupStack::PopAndDestroy(&childElements);
+      		        return ETrue;
+                    }				
+				// Else go deeper into the tree. 
+                else if ( aDepth < 0 || aDepth > aCurrentDepth )
+                    {
+	    	     	               
+                    if ( GetElementL( sub,
+                                     aWanted,
+                                     aMainTag, 
+                                     aDepth, 
+                                     aCurrentDepth ) 
+                                     == ( TBool ) ETrue )
+                        
+                        {
+                        CleanupStack::PopAndDestroy(&childElements);
+                        return ETrue;
+                        }
+                    }
+                else
+                    {
+                    }
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+            }
+
+        return EFalse;
+        }
+    
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetElementL
+// Get element.
+// -----------------------------------------------------------------------------
+//       
+    EXPORT_C TBool GetElementL( const TXmlEngElement& aElement, 
+    						    TXmlEngElement& aWanted,
+                                const TDesC8& aMainTag,
+                                const TDesC8& aSubTag,
+                                TInt aDepth,
+                                TInt aCurrentDepth )
+        {
+        
+        if ( aElement.NotNull() )
+            {
+            
+            // Add one Depth level to the counter 
+            // (affects only current and deeper levels) 
+            aCurrentDepth++;
+			
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+				
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+
+				// Check the name of the element, 
+                // if it equals to MainTag (the wanted value) 
+                if ( CheckTagL( sub, aMainTag ) )
+                    {
+                    
+                    // Check that it holds the wanted subtag 
+                    // and that the subtags value is the wanted one. 
+                    if ( CheckSubTagL( sub, aSubTag ) == ( TBool ) ETrue )
+                        {
+                        aWanted = sub;
+                        CleanupStack::PopAndDestroy(&childElements);
+      		        	return ETrue;
+                        }
+                    }		
+                    		
+				// Else go deeper into the tree. 
+                else
+                    {
+
+                    if ( aDepth < 0 || aDepth > aCurrentDepth )
+                        {
+
+                        if ( GetElementL( sub,
+                                         aWanted,
+                                         aMainTag,
+                                         aSubTag,
+                                         aDepth,
+                                         aCurrentDepth ) 
+                                         == ( TBool )ETrue )
+                            {
+                            CleanupStack::PopAndDestroy(&childElements);
+                            return ETrue;
+                            }
+                        }
+                    }
+				}
+		    CleanupStack::PopAndDestroy(&childElements);
+            }
+            
+        return EFalse;
+        }
+    
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetElementL
+// Get element.
+// -----------------------------------------------------------------------------
+//            
+    EXPORT_C TBool GetElementL( const TXmlEngElement& aElement, 
+    						    TXmlEngElement& aWanted,
+                                const TDesC8& aMainTag,
+                                const TDesC8& aSubTag,
+                                const TDesC8& aSubTagValue, 
+                                TInt aDepth, TInt aCurrentDepth )
+        {
+        
+        if ( aElement.NotNull() )
+            {
+            
+            // Add one Depth level to the counter 
+            // (affects only current and deeper levels) 
+            aCurrentDepth++;
+			
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			CleanupStack::Check(&childElements);
+			while( childElements.HasNext() )
+				{
+				
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+
+				// Check the name of the element, 
+                // if it equals to MainTag (the wanted value) 
+                if ( CheckTagL( sub, aMainTag ) )
+                    {
+                    CleanupStack::Check(&childElements);
+                    // Check that it holds the wanted subtag and 
+                    // that the subtags value is the wanted one. 
+                    if ( CheckSubTagL( sub,
+                                      aSubTag,
+                                      aSubTagValue ) 
+                                      == ( TBool ) ETrue )
+                        {
+                        aWanted = sub;
+                        CleanupStack::PopAndDestroy(&childElements);
+      		        	return ETrue;
+                        }
+                    }		
+                    		
+				// Else go deeper into the tree. 
+                else
+                    {
+
+                    if ( aDepth < 0 || aDepth > aCurrentDepth )
+                        {
+
+                        if ( GetElementL( sub,
+                                         aWanted, 
+                                         aMainTag,
+                                         aSubTag,
+                                         aSubTagValue,
+                                         aDepth,
+                                         aCurrentDepth )
+                                         == ( TBool ) ETrue )
+                            {
+                            CleanupStack::PopAndDestroy(&childElements);
+                            return ETrue;
+                            }
+                        }
+                    }
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+            }
+            
+        return EFalse;
+        }
+
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetContentElementL
+// Get content element.
+// -----------------------------------------------------------------------------
+//        
+    EXPORT_C TBool GetContentElementL( const TXmlEngElement& aElement, 
+    								   TXmlEngElement& aWanted,
+                                       const TDesC8& aSubTag,
+                                       const TDesC8& aSubTagValue,
+                                       TInt aDepth, 
+                                       TInt aCurrentDepth )
+        {
+		
+		if ( aElement.NotNull() )
+        	{
+            
+            // Add one Depth level to the counter 
+            // (affects only current and deeper levels) 
+            aCurrentDepth++;
+			
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+				
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+
+                if ( CheckTagL( sub, aSubTag, aSubTagValue ) )
+                    {
+                    aWanted = sub;
+                    CleanupStack::PopAndDestroy(&childElements);
+      		        return ETrue;
+                    }				
+				// Else go deeper into the tree. 
+                else if ( aDepth < 0 || aDepth > aCurrentDepth )
+                    {
+	    	     	               
+                     if ( GetContentElementL( sub,
+                                             aWanted,
+                                             aSubTag,
+                                             aSubTagValue,
+                                             aDepth,
+                                             aCurrentDepth ) 
+                                               == ( TBool ) ETrue )
+                     	{
+                     	CleanupStack::PopAndDestroy(&childElements);
+						return ETrue;
+                        }
+
+                    }
+                else
+                    {
+                    }
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+            }
+
+        return EFalse;
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetDirectoryElementL
+// Get directory element.
+// -----------------------------------------------------------------------------
+//    
+    EXPORT_C TBool GetDirectoryElementL( const TXmlEngElement& aElement,
+                                         TXmlEngElement& aWanted,
+                                         const TDesC8& aMainTag,
+                                         const TDesC8& aAttribute,
+                                         const TDesC8& aAttributeValue, 
+                                         TInt aDepth, 
+                                         TInt aCurrentDepth)
+        
+        {
+     
+       	if ( aElement.NotNull() )
+        	{
+            
+            // Add one Depth level to the counter 
+            // (affects only current and deeper levels) 
+            aCurrentDepth++;
+			
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+				
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+
+                if ( CheckTagL( sub, aMainTag ) )
+                    {
+                    if ( CheckAttributeValueL( sub,aAttribute,aAttributeValue ) )
+                        {
+                        aWanted = sub;
+                        CleanupStack::PopAndDestroy(&childElements);
+                        return ETrue;
+                        }
+
+                    }				
+				// Else go deeper into the tree. 
+                else
+                    {
+
+                    if ( aDepth < 0 || aDepth > aCurrentDepth )
+                        {
+
+                        if ( GetDirectoryElementL( sub,
+                                                  aWanted, 
+                                                  aMainTag, 
+                                                  aAttribute, 
+                                                  aAttributeValue, 
+                                                  aDepth, 
+                                                  aCurrentDepth ) == ( TBool ) ETrue )
+                            {
+                            CleanupStack::PopAndDestroy(&childElements);
+                            return ETrue;
+                            }
+                        }
+                    }            
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+            }
+                
+        return EFalse;
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetDirectoryElementL
+// Get directory element.
+// -----------------------------------------------------------------------------
+//      
+    EXPORT_C TBool GetDirectoryElementL( const TXmlEngElement& aElement,
+                                         TXmlEngElement& aWanted,
+                                         const TDesC8& aAttribute,
+                                         const TDesC8& aAttributeValue, 
+                                         TInt aDepth, 
+                                         TInt aCurrentDepth)
+        
+        {
+        
+       	if ( aElement.NotNull() )
+        	{
+            
+            // Add one Depth level to the counter 
+            // (affects only current and deeper levels) 
+            aCurrentDepth++;
+			
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+				
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+				
+				if ( CheckAttributeValueL( sub, 
+                                          aAttribute, 
+                                          aAttributeValue ) ==( TBool ) ETrue )
+                    {
+                    aWanted = sub;
+                    CleanupStack::PopAndDestroy(&childElements);
+                    return ETrue;
+                    }
+
+                if ( aDepth < 0 || aDepth > aCurrentDepth )
+                    {
+
+                    if ( GetDirectoryElementL( sub, 
+                                              aWanted, 
+                                              aAttribute, 
+                                              aAttributeValue, 
+                                              aDepth, 
+                                              aCurrentDepth ) == ( TBool ) ETrue )
+                        
+                        {
+                        CleanupStack::PopAndDestroy(&childElements);
+                        return ETrue;
+                        }
+                    }
+                
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+            }
+        
+        return EFalse;
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetElementListL
+// Get element list.
+// -----------------------------------------------------------------------------
+//
+    EXPORT_C TBool GetElementListL( const TXmlEngElement& aElement,
+                                    RArray<TXmlEngElement>& aElementList,
+                                    const TDesC8& aMainTag,
+                                    TBool aSearchable )
+        {
+
+        TBool status = EFalse;
+        
+        if ( aElement.NotNull() )
+			{
+			
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+			
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+				
+				//Get "searchable" attribute value
+				TPtrC8 searchable = GetAttrValueL( sub, KSearchable() );
+       
+                // aSearchable == false || tag != "container" || aSearchable == true && searchable == "true"
+				// check this "true" value
+				if ( aSearchable == ( TBool ) EFalse 
+					|| ( !CheckTagL( sub, KContainer() ) )
+					|| ( aSearchable == ( TBool ) ETrue && searchable.Compare( KTrueVal() ) == 0 ) )
+                	{
+
+                	if ( CheckTagL( sub, aMainTag ) )
+                        {
+                        User::LeaveIfError(aElementList.Append( sub));
+                        status = ETrue;
+                        }
+
+                    else
+                        {
+                        if ( status == ( TBool ) ETrue )
+                            {
+                            GetElementListL( sub, 
+                                            aElementList, 
+                                            aMainTag, 
+                                            aSearchable );
+                            }
+
+                        else
+                            {
+                            status = GetElementListL( sub, 
+                                                     aElementList, 
+                                                     aMainTag, 
+                                                     aSearchable );
+                            }
+                        }
+                    }                
+                }
+            CleanupStack::PopAndDestroy(&childElements);
+            }
+             
+        return status; 
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetElementListL
+// Get element list.
+// -----------------------------------------------------------------------------
+// 
+    EXPORT_C TBool GetElementListL( const TXmlEngElement& aElement,
+                                    RArray<TXmlEngElement>& aElementList,
+                                    const TDesC8& aMainTag, 
+                                    const TDesC8& aSubTag, 
+                                    const TDesC8& aSubValue,
+                                    TBool aSearchable )
+        {
+        
+        TBool status = EFalse;
+ 
+        if ( aElement.NotNull() )
+            {
+
+            RXmlEngNodeList<TXmlEngElement> childElements;
+            CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+			
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+                
+                //Get "searchable" attribute value
+				TPtrC8 searchable = GetAttrValueL( sub, KSearchable() );
+      
+                // aSearchable == false || tag != "container" || aSearchable == true && searchable == "true"
+				// check this "true" value
+				if ( aSearchable == ( TBool ) EFalse 
+					|| ( !CheckTagL( sub, KContainer() ) )
+					|| ( aSearchable == ( TBool ) ETrue && searchable.Compare( KTrueVal() ) == 0 ) )
+                	{
+					
+					if ( CheckTagL( sub, aMainTag ) )
+                        {
+                        if ( CheckSubTagL( sub, aSubTag, aSubValue ) )
+                            {
+                            User::LeaveIfError(aElementList.Append( sub));
+                            status = ETrue;
+                            }
+						}
+                    else
+                        {
+                        if ( status == ( TBool ) ETrue )
+                            {
+                            GetElementListL( sub, 
+                                            aElementList, 
+                                            aMainTag, 
+                                            aSubTag, 
+                                            aSubValue, 
+                                            aSearchable );
+
+                            }
+                        else
+                            {
+                            status = GetElementListL( sub, 
+                                                     aElementList, 
+                                                     aMainTag, 
+                                                     aSubTag, 
+                                                     aSubValue, 
+                                                     aSearchable );
+
+                            }
+                        }
+
+                    }
+                }
+            CleanupStack::PopAndDestroy(&childElements);
+            }
+
+        return status; 
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetElementListL
+// Get element list.
+// -----------------------------------------------------------------------------
+//    
+    EXPORT_C TBool GetElementListL( const TXmlEngElement& aElement,
+                                    RArray<TXmlEngElement>& aElementList,
+                                    const TDesC8& aMainTag, 
+                                    const TDesC8& aSubTag, 
+                                    const TDesC8& aSubValue,
+                                    const TDesC8& aNSPrefix,
+                                    TBool aSearchable )
+        {
+        TBool status = EFalse;
+
+        if ( aElement.NotNull() )
+            {
+
+            RXmlEngNodeList<TXmlEngElement> childElements;
+            CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+			
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+                
+                //Get "searchable" attribute value
+				TPtrC8 searchable = GetAttrValueL( sub, KSearchable() );
+				
+                // aSearchable == false || tag != "container" || aSearchable == true && searchable == "true"
+				// check this "true" value
+				if ( aSearchable == ( TBool ) EFalse 
+					|| ( !CheckTagL( sub, KContainer() ) )
+					|| ( aSearchable == ( TBool ) ETrue && searchable.Compare( KTrueVal() ) == 0 ) )
+                	{
+					
+					if ( CheckTagL( sub, aMainTag ) )
+                        {
+                        if( CheckSubTagPrefixL( sub,
+                                               aNSPrefix,
+                                               aSubTag,
+                                               aSubValue ) )
+
+                            {
+                            User::LeaveIfError(aElementList.Append( sub));
+                            status = ETrue;
+                            }
+						}
+                     else
+                        {
+
+                        if ( status == ( TBool ) ETrue )
+                            {
+                            GetElementListL( sub, 
+                                            aElementList, 
+                                            aMainTag, 
+                                            aSubTag, 
+                                            aSubValue, 
+                                            aNSPrefix, 
+                                            aSearchable );
+
+                            }
+                        else
+                            {
+                            status = GetElementListL( sub, 
+                                                     aElementList, 
+                                                     aMainTag, 
+                                                     aSubTag, 
+                                                     aSubValue, 
+                                                     aNSPrefix, 
+                                                     aSearchable );
+
+                            }
+                        }
+
+                    }
+            	}
+            CleanupStack::PopAndDestroy(&childElements);
+            }
+            
+		if ( status == ( TBool ) ETrue )
+            {
+            return ETrue;
+            }
+            
+        return EFalse; 
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetContentElementListL
+// Get content element list.
+// -----------------------------------------------------------------------------
+//
+    EXPORT_C TBool GetContentElementListL( const TXmlEngElement& aElement, 
+                                           RArray<TXmlEngElement>& aElementList,
+                                           const TDesC8& aSubTag, 
+                                           const TDesC8& aSubValue,
+                                           TBool aSearchable )
+        {
+        // Operators: MainTag
+        // Example: GetStateVariableList
+        // MainTag     = "stateVariableTable"       
+    
+        
+        if ( aElement.NotNull() )
+			{
+            TBool status = EFalse;
+            
+            RXmlEngNodeList<TXmlEngElement> childElements;
+            CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+			
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+                
+               //Get "searchable" attribute value
+				TPtrC8 searchable = GetAttrValueL( sub, KSearchable() );
+                
+                // aSearchable == false || tag != "container" || aSearchable == true && searchable == "true"
+				// check this "true" value
+				if ( aSearchable == ( TBool ) EFalse 
+					|| ( !CheckTagL( sub, KContainer() ) )
+					|| ( aSearchable == ( TBool ) ETrue && searchable.Compare( KTrueVal() ) == 0 ) )
+                	{
+
+					if( CheckTagL( sub, aSubTag, aSubValue ) )
+						{
+						User::LeaveIfError(aElementList.Append( sub));
+                        status = ETrue;
+						}
+                    else
+                        {
+
+                        if(status == ( TBool ) ETrue )
+                            {
+                            GetContentElementListL( sub, 
+                                                   aElementList,
+                                                   aSubTag,
+                                                   aSubValue,
+                                                   aSearchable );
+                            }
+
+                        else
+                            {
+                            status = GetContentElementListL( sub, 
+                                                            aElementList,
+                                                            aSubTag,
+                                                            aSubValue,
+                                                            aSearchable );
+                            }
+                        }
+                	}
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+            return status; 
+            }
+
+        return EFalse;
+		}
+
+
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::GetDirectoryElementListL
+// Get directory element list.
+// -----------------------------------------------------------------------------
+//       
+    EXPORT_C TBool GetDirectoryElementListL( const TXmlEngElement& aElement,
+                                             RArray<TXmlEngElement>& aElementList,
+                                             const TDesC8& aAttrName,
+                                             const TDesC8& aAttrValue,
+                                             TBool aSearchable )
+        {
+        TBool status = EFalse;
+       
+    	if ( aElement.NotNull() )
+			{
+			
+			RXmlEngNodeList<TXmlEngElement> childElements;
+			CleanupClosePushL(childElements);
+			aElement.GetChildElements( childElements );
+			
+			while( childElements.HasNext() )
+				{
+			
+				// Get a single element of the current level
+				TXmlEngElement sub = childElements.Next();
+				
+				//Get "searchable" attribute value
+				TPtrC8 searchable = GetAttrValueL( sub, KSearchable() );
+				
+				// aSearchable == false || tag != "container" || aSearchable == true && searchable == "true"
+				// check this "true" value
+				if ( aSearchable == ( TBool ) EFalse 
+					|| ( !CheckTagL( sub, KContainer() ) )
+					|| ( aSearchable == ( TBool ) ETrue && searchable.Compare( KTrueVal() ) == 0 ) )
+                	{
+                	
+                	if ( CheckAttributeValueL( sub, aAttrName, aAttrValue ) )
+                        {
+                        
+                        User::LeaveIfError(aElementList.Append( sub));
+                        status = ETrue;
+                        }
+                    
+                    if ( status )
+                        {
+                        GetDirectoryElementListL( sub, 
+                                                 aElementList, 
+                                                 aAttrName, 
+                                                 aAttrValue, 
+                                                 aSearchable );
+                        }
+
+                    else
+                        {
+                        status = GetDirectoryElementListL( sub, 
+                                                          aElementList, 
+                                                          aAttrName, 
+                                                          aAttrValue,
+                                                          aSearchable );
+                        }
+                    }
+				}
+			CleanupStack::PopAndDestroy(&childElements);
+			}
+
+        return status; 
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::SaveToFileL
+// Save to file.
+// -----------------------------------------------------------------------------
+//
+    EXPORT_C TBool SaveToFileL( const TDesC16& aFileName, 
+                                const TXmlEngElement& aRoot )
+        {
+        TBool result = EFalse;
+        // Check element
+        if ( aRoot.IsNull() )
+            {
+            return result;
+            }
+        
+        // Get XML document handler from DOM tree root node and save it to the file
+	    RXmlEngDocument doc = aRoot.OwnerDocument();
+	        
+	    //Dump XML tree into buffer
+	    RBuf8 xmlBuf;
+	    TXmlEngSerializationOptions options(TXmlEngSerializationOptions::KOptionIndent | 
+	    							  TXmlEngSerializationOptions::KOptionEncoding);
+	      
+	    doc.SaveL( xmlBuf, aRoot, options);
+        CleanupClosePushL(xmlBuf);
+        result = SaveToFileL( aFileName, xmlBuf );
+        CleanupStack::PopAndDestroy(&xmlBuf);
+   		
+   		return result;
+        }
+
+    
+// -----------------------------------------------------------------------------
+// UpnpDomInterface::SaveToFileL
+// Save to file.
+// -----------------------------------------------------------------------------
+//
+    EXPORT_C TBool SaveToFileL( const TDesC16& aFileName, 
+                                const TDesC8& aData )
+        {
+        // Create file server session
+        RFs fs;
+        TInt error = fs.Connect();
+
+        if ( error != KErrNone )
+            {
+            LOGS("SERVICE *** RFs::Connect() id 12 failed; ERROR");
+
+            return EFalse;
+            }
+        
+        RFile file;
+
+        // Create or Replace the requested file, 
+        // if operation does not succeed return EFalse
+        if ( file.Replace( fs, aFileName, EFileWrite ) == KErrNone )
+            {
+            RFileWriteStream writeStream( file );
+            CleanupClosePushL(fs);
+            CleanupClosePushL(file);
+            CleanupReleasePushL(writeStream);
+            writeStream.WriteL( aData );
+            writeStream.CommitL();
+            
+            
+            CleanupStack::PopAndDestroy(&writeStream);
+            CleanupStack::PopAndDestroy(&file);
+            CleanupStack::PopAndDestroy(&fs);
+            
+            return ETrue;
+            }
+
+        else
+            {
+            LOGS("SERVICE *** RFile::Replace() id 12 failed; ERROR");
+            fs.Close();
+            return EFalse;
+            }
+        }
+
+	} 
+	
+//  End of File 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpfileutils.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,631 @@
+/** @file
+* 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:  File utils
+ *
+*/
+
+
+// INCLUDES
+#include <e32base.h>
+#include <charconv.h>
+#include <f32file.h>
+#include <apgcli.h>
+#include <apmrec.h>
+#include <sysutil.h>
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+#include "upnpcons.h"
+#include "upnpfileutils.h"
+#include "upnpstring.h"
+#include "uri8.h"
+#include "in_sock.h"
+
+// ================= MEMBER FUNCTIONS =======================
+namespace UpnpFileUtil
+    {
+    // -----------------------------------------------------------------------------
+    // UpnpFileUtil::ReadFileL
+    // Reads the specified file and returns a pointer to HBufC8 holding the 
+    // information.
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C HBufC8* ReadFileL(const TDesC16& aFilename)
+        {
+        LOGS1("UpnpFileUtil::ReadFileL - File: %S", &aFilename);
+
+        RFs fs;
+        HBufC8* buffer = NULL;
+        TInt error = fs.Connect();
+        if ( error == KErrNone )
+            {
+            CleanupClosePushL( fs );
+
+            RFile file;
+            error = file.Open(fs, aFilename, EFileRead|EFileShareAny );
+            if ( error == KErrNone )
+                {
+                CleanupClosePushL( file );
+
+                TInt fileSize;
+                error = file.Size(fileSize);
+                if ( error == KErrNone )
+                    {
+                    buffer = HBufC8::NewLC(fileSize);
+                    buffer->Des().SetLength(0);
+
+                    TPtr8 ptr = buffer->Des();
+                    error = file.Read( ptr );
+                    if ( error == KErrNone )
+                        {
+                        CleanupStack::Pop( buffer );
+                        }
+                    else
+                        {
+                        CleanupStack::PopAndDestroy( buffer );
+                        buffer = NULL;
+                        }
+                    }
+
+                // Close File
+                CleanupStack::PopAndDestroy(); 
+                }
+            else
+                {
+                LOGS1("UpnpFileUtil::ReadFileL - RFile::Open() failed: %d", error);
+                }
+
+            // Close FS
+            CleanupStack::PopAndDestroy(); 
+            }
+        else
+            {
+            LOGS1("UpnpFileUtil::ReadFileL - RFs::Connect() failed: %d", error );
+            }
+
+        // In case of an error, we leave as error would mean that the 
+        // file system is down. Shouldn't fail in any other case.
+        User::LeaveIfError( error );
+
+        return buffer;
+        }
+
+    // -----------------------------------------------------------------------------
+    // UpnpFileUtil::GetMimeTypeForFileL
+    // - In emulator, checks the filename, and returns mimetype-string depending 
+    //   on extension.
+    // - In Target device, uses RApaLsSession (Application server) to find out 
+    //   file's mime type.
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C HBufC8* GetMimeTypeForFileL(const TDesC16& aFilename)
+        {
+        LOGS1("UpnpFileUtil::GetMimeTypeForFileL - Getting mime type for file: %S", &aFilename);
+
+        HBufC8* mimetype = NULL;
+
+        // Added extra functionality, due to DLNA requirements for XML files mime type.
+        // In mime type for xml files there should be explicitly defined used charset
+        // and RApaLsSession service doesn't provide such a functionality.
+
+        // Check extension, if its .xml - set mime type to text/xml and check used encoding
+        _LIT8(KXmlUtf8, "text/xml; charset=\"utf-8\"");
+        TParse parse;
+        parse.Set( aFilename, NULL, NULL );
+        TBufC16<KMaxName> ext( parse.Ext() );
+
+        if ( ext.FindC( KXml16 ) == 0 && ext.Length() == KXml16().Length() )
+            {
+            // Extension says that's XML but we check content to be sure and get encoding
+            
+
+            mimetype = HBufC8::NewL( KXmlUtf8().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KXmlUtf8() );
+            return mimetype;
+            }
+
+        // If it's not a XML file then use built-in service.
+
+        RApaLsSession sess;
+        TInt error = sess.Connect();
+        // We have FS, File and RApaLs open
+        if ( error == KErrNone )
+            {
+            CleanupClosePushL( sess );
+
+            TUid id = TUid::Uid( 0 );
+
+            TDataType type;
+
+            error = sess.AppForDocument( aFilename, id, type );
+            if( error == KErrNone && type != TDataType())
+                {
+                mimetype = HBufC8::NewL( type.Des8().Length() + UpnpString::KLineFeed().Length() );
+                mimetype->Des().Append( type.Des8() );
+                }
+            else
+                {
+                error = KErrNotFound;
+                LOGS1("UpnpFileUtil::GetMimeTypeForFileL - AppForDocument failed: %d", error );
+                }
+
+            CleanupStack::PopAndDestroy( &sess );
+            }
+        else
+            {
+            LOGS1("UpnpFileUtil::GetMimeTypeForFileL - RFile::Open failed: %d", error );
+            }
+
+        if( error != KErrNone)
+            {
+            mimetype = GetMimeTypeByExtensionL( aFilename );
+            }
+
+        LOGS("UpnpFileUtil::GetMimeTypeForFileL - MIME type resolved: " );
+        LOGT( mimetype->Des() );
+
+        return mimetype;
+        }
+
+    // -----------------------------------------------------------------------------
+    // UpnpFileUtil::GetMimeTypeByExtensionL
+    // - In emulator, checks the filename, and returns mimetype-string depending 
+    //   on extension.
+    // - In Target device, uses RApaLsSession (Application server) to find out 
+    //   file's mime type.
+    // -----------------------------------------------------------------------------
+    //
+    HBufC8* GetMimeTypeByExtensionL( const TDesC16& aFilename )
+        {
+        LOGS("UpnpFileUtil::GetMimeTypeForFileL - Starting search by file extension");
+
+        HBufC8* mimetype = NULL;
+
+        TParse parse;
+
+        parse.Set( aFilename, NULL, NULL );
+
+        TBufC16<KMaxName> ext( parse.Ext() );
+
+        // FindC and length calculation is used,
+        // beacause compareC does not work for undefined reason  
+
+        if ( ext.FindC( KHtml16 ) == 0 && ext.Length() == KHtml16().Length() )
+            {
+            mimetype = HBufC8::NewLC( KHtml().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KHtml() );
+            }
+        else if ( ext.FindC( KXml16 ) == 0 && ext.Length() == KXml16().Length() )
+            {
+            mimetype = HBufC8::NewLC( KXml().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KXml() );
+            }
+        else if ( ext.FindC( KTxt16 ) == 0 && ext.Length() == KTxt16().Length() )
+            {
+            mimetype = HBufC8::NewLC( KTxt().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KTxt() );
+            }
+        else if ( ( ext.FindC( KJpg16 ) == 0 && ext.Length() == KJpg16().Length() ) ||
+                ( ext.FindC( KJpeg16 ) == 0 && ext.Length() == KJpeg16().Length() ) )
+            {
+            mimetype = HBufC8::NewLC( KJpg().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KJpg() );
+            }
+        else if ( ext.FindC( KGif16 ) == 0 && ext.Length() == KGif16().Length() )
+            {
+            mimetype = HBufC8::NewLC( KGif().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KGif() );
+            }
+        else if ( ext.FindC( KPng16 ) == 0 && ext.Length() == KPng16().Length() )
+            {
+            mimetype = HBufC8::NewLC( KPng().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KPng() );
+            }
+        else if ( ( ext.FindC( KMpg16 ) == 0 && ext.Length() == KMpg16().Length() ) ||
+                ( ext.FindC( KMpeg16 ) == 0 && ext.Length() == KMpeg16().Length() ) )
+            {
+            mimetype = HBufC8::NewLC( KMpeg().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KMpeg() );
+            }
+        else if ( ext.FindC( KAvi16 ) == 0 && ext.Length() == KAvi16().Length() )
+            {
+            mimetype =HBufC8::NewLC( KAvi().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KAvi() );
+            }
+        else if ( ext.FindC( KMp316 ) == 0 && ext.Length() == KMp316().Length() )
+            {
+            mimetype = HBufC8::NewLC( KMp3().Length() );
+            mimetype->Des().Zero();
+            mimetype->Des().Append( KMp3() );
+            }
+
+        // If type was not found, then set empty it here
+        if ( !mimetype )
+            {
+            // We can't return mimetype=NULL;
+            
+            // Allocate one lenght mime.
+            mimetype = HBufC8::NewLC( 1 );
+            }
+        CleanupStack::Pop( mimetype );
+
+        return mimetype;
+        }
+
+    // -----------------------------------------------------------------------------
+    // ExtractNumFromIP
+    // -----------------------------------------------------------------------------
+    //    
+    TInt ExtractNumFromIP(TPtrC8 ippart)
+        {
+
+        TInt ipdef=KIPNumMin;
+        TLex8 lexip = TLex8(ippart);
+        TInt errorip = lexip.Val(ipdef);
+
+        if (errorip == KErrNone)
+        return ipdef;
+        else
+        return KErrNotFound;
+
+        }
+    // -----------------------------------------------------------------------------
+    // Returns drive number
+    // -----------------------------------------------------------------------------
+    //
+    TInt DriveNumberFromPath( const TDesC16& aPath, RFs& aFs )
+        {
+        TInt drive_num;
+        TParse p;
+        p.Set( aPath, NULL, NULL );
+        TPtrC pointer = p.Drive();
+        TLex lineParser( pointer.Ptr() );
+        TChar ch = lineParser.Get();
+
+        //sets the default drive or the found value
+        if( aFs.CharToDrive( ch, drive_num )<KErrNone )
+            {
+            drive_num=EDriveC;
+            }
+        return drive_num;
+        }
+
+    // -----------------------------------------------------------------------------
+    // ExtractUrlPathHost
+    // -----------------------------------------------------------------------------
+    //
+    TBool ExtractUrlPathHost(const TDesC8& aUrl, TInt& aParseError )
+        {
+        TUriParser8 up;
+        aParseError = up.Parse(aUrl);
+        if ( aParseError != KErrNone )
+            {
+            return EFalse;
+            }
+
+        TPtrC8 hostt(up.Extract(EUriHost));
+        TInt posOfFirstDot( 0 );
+        TInt posOfSecondDot( 0 );
+        TInt posOfThirdDot( 0 );
+
+        posOfFirstDot = hostt.FindC( UpnpString::KDot8() );
+
+        //position of the first dot in IP address must be from 1 to 3
+        if( (posOfFirstDot < KErrNone ) || ((posOfFirstDot> 3 ) || (posOfFirstDot < 1)))
+            {
+            return EFalse;
+            }
+        else
+            {
+            TPtrC8 ip1;
+            ip1.Set( hostt.Left( posOfFirstDot));
+
+            TInt ip1def = ExtractNumFromIP(ip1);
+
+            if ((ip1def> KIPNumMax) || (ip1def < KIPNumMin ))
+                {
+                return EFalse;
+                }
+
+            hostt.Set(hostt.Mid(posOfFirstDot + UpnpString::KDot8().Length()));
+            posOfSecondDot = hostt.FindC( UpnpString::KDot8() );
+
+            //position of the dot in IP address must from 1 to 3 starting from the position of former dot
+            if( (posOfSecondDot < KErrNone) || ((posOfSecondDot> 3 ) || (posOfSecondDot < 1)))
+                {
+                return EFalse;
+                }
+            else
+                {
+                TPtrC8 ip2;
+                ip2.Set( hostt.Left( posOfSecondDot));
+
+                ip1def = ExtractNumFromIP(ip2);
+
+                if ((ip1def == KErrNotFound) || (ip1def> KIPNumMax))
+                    {
+                    return EFalse;
+                    }
+
+                hostt.Set(hostt.Mid(posOfSecondDot + UpnpString::KDot8().Length()));
+                posOfThirdDot = hostt.FindC( UpnpString::KDot8() );
+
+                //position of the dot in IP address must from 1 to 3 starting from the position of former dot					
+                if( (posOfThirdDot < KErrNone ) || ((posOfThirdDot> 3 ) || (posOfThirdDot < 1)))
+                    {
+                    return EFalse;
+                    }
+                else
+                    {
+                    TPtrC8 ip3;
+                    ip3.Set( hostt.Left( posOfThirdDot));
+
+                    ip1def = ExtractNumFromIP(ip3);
+
+                    if ((ip1def == KErrNotFound) || (ip1def> KIPNumMax))
+                        {
+                        return EFalse;
+                        }
+
+                    TPtrC8 ip4;
+                    ip4.Set(hostt.Mid(posOfThirdDot + UpnpString::KDot8().Length()));
+
+                    //position of the dot in IP address must from 1 to 3 starting from the position of former dot							
+                    if((ip4.Length() < 1) || (ip4.Length()> 3))
+                        {
+                        return EFalse;
+                        }
+
+                    ip1def = ExtractNumFromIP (ip4);
+
+                    if ((ip1def == KErrNotFound) || (ip1def> KIPNumMax))
+                        {
+                        return EFalse;
+                        }
+                    else
+                        {
+                        return ETrue;
+                        }
+
+                    }
+                }
+            }
+        }
+
+    // -----------------------------------------------------------------------------
+    // ExtractUrlPath
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C TPtrC8 ExtractUrlPath(
+        const TDesC8& aUrl, TPtrC8& aFilename, TPtrC8& aScheme, TInt& aParseError )
+        {
+
+        LOGS("CHttpFolderUrlMatch::ExtractUrlPath()");
+        TUriParser8 up;
+        aParseError = up.Parse(aUrl);
+        if( aParseError != KErrNone)
+            {
+            return KNullDesC8();
+            }
+        TPtrC8 path(up.Extract(EUriPath));
+        TPtrC8 scheme(up.Extract(EUriScheme));
+        TPtrC8 port(up.Extract(EUriPort));
+        TPtrC8 host(up.Extract(EUriHost));
+        TInt position (0);
+        TPtrC8 urlPath;
+
+        if(up.IsPresent(EUriScheme))
+            {
+
+            if(scheme.Compare(UpnpHTTP::KSchemeHTTP8()) == 0)
+                {
+                aScheme.Set(scheme);
+
+                //separator test
+                position = aUrl.FindC(UpnpHTTP::KSchemeSeparator());
+                if (position != KErrNotFound)
+                    {
+                    if ((up.IsPresent(EUriHost)) && (host != KNullDesC8()))
+                        {
+                        if( ExtractUrlPathHost(aUrl, aParseError ) )
+                            {
+                            TUint portdef(0);
+                            TLex8 lex = TLex8(port);
+                            TInt error = lex.Val(portdef, EDecimal);
+                            if((up.IsPresent(EUriPort)) && (port != KNullDesC8()) && (error == KErrNone) )
+                                {
+                                urlPath.Set(path);
+                                }
+                            else
+                                {
+                                return KNullDesC8();
+                                }
+                            }
+                        else
+                            {
+                            return KNullDesC8();
+                            }
+                        }
+                    else
+                        {
+                        return KNullDesC8();
+                        }
+                    }
+                else
+                    {
+                    return KNullDesC8();
+                    }
+
+                }
+            else
+                {
+                return KNullDesC8();
+                }
+            }
+        else
+            {
+            TInt posOfFirstSlashnohttp( 0 );
+            posOfFirstSlashnohttp = path.FindC( UpnpString::KSlash() );
+
+            if( (posOfFirstSlashnohttp < KErrNone ) || (posOfFirstSlashnohttp != 0))
+                {
+                return KNullDesC8();
+                }
+            else
+                {
+                urlPath.Set(aUrl);
+                }
+            }
+
+        TInt posOfFirstSlash( 0 );
+        TInt posOfLastSlash( 0 );
+        posOfFirstSlash = urlPath.FindC( UpnpString::KSlash() );
+
+        if( posOfFirstSlash < KErrNone )
+            {
+            return KNullDesC8();
+            }
+        else
+            {
+            TInt posOfTwoSlashes( 0 );
+            posOfTwoSlashes = urlPath.FindC(UpnpString::KDoubleSlash());
+            if((posOfTwoSlashes == KErrNone ) || (posOfTwoSlashes> KErrNone) )
+                {
+                return KNullDesC8();
+                }
+            posOfLastSlash = urlPath.LocateReverse( UpnpString::KSlash()[0] );
+            if( posOfLastSlash == posOfFirstSlash )
+                {
+                aFilename.Set( urlPath.Mid( posOfLastSlash + UpnpString::KSlash().Length()) );
+                return KNullDesC8();
+                }
+            else
+                {
+                aFilename.Set( urlPath.Mid( posOfLastSlash + UpnpString::KSlash().Length()) );
+                urlPath.Set( urlPath.Mid( posOfFirstSlash + UpnpString::KSlash().Length() ) );
+                urlPath.Set( urlPath.Left( posOfLastSlash - UpnpString::KSlash().Length() ) );
+                return urlPath;
+
+                }
+            }
+        }
+
+    // -----------------------------------------------------------------------------
+    // ExtractUrlPath
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C TPtrC8 ExtractUrlPath(const TDesC8& aUrl, TInt& aParseError )
+        {
+        TPtrC8 fileName;
+        TPtrC8 scheme;
+        return ExtractUrlPath(aUrl, fileName, scheme, aParseError );
+        }
+    // -----------------------------------------------------------------------------
+    // ExtractUrlPath
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C TPtrC8 ExtractUrlPath(const TDesC8& aUrl, TPtrC8& aFilename, TInt& aParseError)
+        {
+        TPtrC8 scheme;
+        return ExtractUrlPath(aUrl, aFilename, scheme, aParseError );
+        }
+
+    // -----------------------------------------------------------------------------
+    // ConvertUrlToFolder
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C HBufC8* SwitchToBackSlashL(const TDesC8& aUrl)
+        {
+        TInt position( 0 );
+
+        HBufC8* result = HBufC8::NewL(aUrl.Length() + aUrl.Length()/2);
+
+        TPtr8 ptrResult(result->Des());
+        ptrResult.Copy(aUrl);
+
+        // replace / with '\\'
+        while ( ( position = ptrResult.Locate( UpnpString::KSlash()[0] ) ) != KErrNotFound )
+            {
+            ptrResult.Replace( position, 1, UpnpString::KDoubleBackSlash() );
+            }
+        return result;
+
+        }
+    // -----------------------------------------------------------------------------
+    // ConvertUrlToFolder
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C HBufC* SwitchToBackSlashL(const TDesC& aUrl)
+        {
+        TInt position( 0 );
+
+        HBufC* result = HBufC::NewL(aUrl.Length() + aUrl.Length()/2);
+
+        TPtr ptrResult(result->Des());
+        ptrResult.Copy(aUrl);
+
+        // replace / with '\\'
+        while ( ( position = ptrResult.Locate( UpnpString::KSlash()[0] ) ) != KErrNotFound )
+            {
+            ptrResult.Replace( position, 1, UpnpString::KDoubleBackSlash16() );
+            }
+        return result;
+
+        }
+    // -----------------------------------------------------------------------------
+    // Checks if the disk is short of the space requested
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C TBool CheckDiskSpaceShortL( const TDesC16& aPath, TInt aSize, RFs& aFs )
+        {
+        TInt drive_num = UpnpFileUtil::DriveNumberFromPath( aPath, aFs );
+        return SysUtil::DiskSpaceBelowCriticalLevelL ( &aFs, aSize, drive_num );
+        }
+
+    // -----------------------------------------------------------------------------
+    // Checks if the disk is short of the space requested
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C TBool CheckDiskSpaceShortL( TDriveNumber aDriveNumber, TInt aSize )
+        {
+        RFs fs;
+        User::LeaveIfError( fs.Connect() );
+        CleanupClosePushL( fs );
+        TBool result = SysUtil::DiskSpaceBelowCriticalLevelL ( &fs, aSize, aDriveNumber );
+        CleanupStack::PopAndDestroy( &fs );
+        return result;
+        }
+     
+    // -----------------------------------------------------------------------------
+    // Parses uri
+    // -----------------------------------------------------------------------------
+    //
+    EXPORT_C TInt ParseUri( const TDesC8& aUrl )
+        {
+        TUriParser8 up;
+        return up.Parse( aUrl );
+        }
+    
+
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnphttpheader.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,157 @@
+/** @file
+* 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:  HTTP header
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "upnphttpheader.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpHeader::CUpnpHttpHeader
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpHeader::CUpnpHttpHeader()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpHeader::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpHeader::ConstructL( const TDesC8& aName, const TDesC8& aValue )
+    {
+    iName = HBufC8::NewL(aName.Length());
+    iName->Des().SetLength(0);
+    iName->Des().Append(aName);
+    
+    iValue = HBufC8::NewL(aValue.Length());
+    iValue->Des().SetLength(0);
+    iValue->Des().Append(aValue);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpHeader::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpHeader* CUpnpHttpHeader::NewL(const TDesC8& aName, const TDesC8& aValue)
+    {
+    CUpnpHttpHeader* self = new (ELeave) CUpnpHttpHeader();
+    CleanupStack::PushL(self);
+    self->ConstructL(aName, aValue);
+    CleanupStack::Pop();
+    
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpHeader::~CUpnpHttpHeader
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpHeader::~CUpnpHttpHeader()
+    {
+    if (iName)
+        {
+        delete iName;
+        iName = NULL;
+        }
+    
+    if (iValue)
+        {
+        delete iValue;
+        iValue = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpHeader::Name
+// Returns name of HTTPHeader.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpHttpHeader::Name()
+    {
+    if ( iName != NULL )
+        {
+        return *iName;
+        }
+    else
+        {
+        return ( TDesC8& ) KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpHeader::Value
+// Returns value of HTTPHeader.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpHttpHeader::Value()
+    {
+    if ( iName != NULL )
+        {
+        return *iValue;
+        }
+    else
+        {
+        return ( TDesC8& ) KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpHeader::SetNameL
+// Set name of HTTPHeader.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpHeader::SetNameL( const TDesC8& aName )
+    {
+    if ( iName )
+        {
+        delete iName;
+        iName = NULL;
+        }
+    
+    iName = HBufC8::NewL( aName.Length() );
+    iName->Des().SetLength( 0 );
+    iName->Des().Append(aName);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpHeader::SetValueL
+// Set value of HTTPHeader.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpHeader::SetValueL( const TDesC8& aValue )
+    {
+    if ( iValue )
+        {
+        delete iValue;
+        iValue = NULL;
+        }
+    
+    iValue = HBufC8::NewL( aValue.Length() );
+    iValue->Des().SetLength( 0 );
+    iValue->Des().Append( aValue );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnphttpmessage.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,2279 @@
+/** @file
+* 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:  HTTP header
+*
+*/
+
+
+// INCLUDES
+#include <e32math.h>
+#include <f32file.h>
+#include <e32std.h>
+
+#include <e32property.h>
+
+#include "upnplist.h"
+
+#include "upnphttpmessage.h"
+#include "upnpcommonupnplits.h"
+#include "upnpcons.h"
+#include "upnpstring.h"
+#include "upnpcustomlog.h"
+#include "upnpmessageobserver.h"
+
+const TInt KHeadersMaxSixe = 8192;
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* CUpnpHttpMessage::NewL()
+    {
+    CUpnpHttpMessage* self = new (ELeave) CUpnpHttpMessage();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CCHttpMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* CUpnpHttpMessage::NewL(const TInetAddr& aAddr)
+    {
+    return NewL(aAddr, NewSessionIdL());
+    }
+
+// -----------------------------------------------------------------------------
+// CCHttpMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* CUpnpHttpMessage::NewL(TInetAddr aAddr, TInt aSessionId)
+    {
+    CUpnpHttpMessage* self = new (ELeave) CUpnpHttpMessage();
+    CleanupStack::PushL(self);
+    
+    
+    self->ConstructL(aAddr, aSessionId);
+    CleanupStack::Pop(self);
+    
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CCHttpMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* CUpnpHttpMessage::NewL(TDesC8& aMessageBuffer, TInetAddr aSender)
+    {
+    
+    return NewL(aMessageBuffer, aSender, NewSessionIdL());
+    }
+
+// -----------------------------------------------------------------------------
+// CCHttpMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* CUpnpHttpMessage::NewL(TDesC8& aMessageBuffer, const TInetAddr& aSender, TInt aSessionId)
+    {
+    CUpnpHttpMessage* self = NewL(aSender, aSessionId);
+    CleanupStack::PushL(self);
+    self->ParseL(aMessageBuffer);
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::~CUpnpHttpMessage
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage::~CUpnpHttpMessage()
+    {
+    if (iHeaderList)
+        {
+        iHeaderList->DeleteObjects();
+        delete iHeaderList;
+        }
+
+    if( iTimer )
+        {
+        iTimer->Cancel();
+        delete iTimer;
+        }
+
+    if ( iOutUri )
+        {
+        delete iOutUri;
+        }
+
+    delete iDestinationPath;
+
+
+    delete iSenderPath;
+
+
+    delete iTextBody;
+
+
+    delete iOutFilename;
+
+
+    delete iInFilename;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::CUpnpHttpMessage
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage::CUpnpHttpMessage()
+    {
+    iSessionPriority = EPriorityNormal;
+    
+    iOverwriteExisting = EFalse;
+    
+    // Parameters connected with downloading range of requested content.
+    // This mechanism if disabled by default an the whole file is requested.
+    iOffset = 0;
+    iLength = 0; 
+    iSaveAtOffset = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::ConstructL()
+    {
+    iHeaderList = new (ELeave) CUpnpHttpHeaderList;
+
+    
+    iTextBody = HBufC8::NewL(0);
+
+    iDestinationPath = HBufC8::NewL(0);
+    iSenderPath = HBufC8::NewL(0);
+
+    iInFilename = HBufC8::NewL(0);
+    iOutFilename = HBufC8::NewL(0);
+    //by default EFalse, meaning ignored
+    iClientRequest = EFalse;
+    //TCP-session's 0 means the value will be ignored unless changed later on!
+    iTcpTimeout = 0;
+    iInternalError = KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::ConstructL( TInetAddr& aSender, TInt aSessionId)
+    {
+    iDestinationPath = HBufC8::NewL(0);
+
+    iSenderPath = HBufC8::NewL(0);
+
+    iInFilename = HBufC8::NewL(0);
+    
+    iOutFilename = HBufC8::NewL(0);
+    
+    iHeaderList = new (ELeave) CUpnpHttpHeaderList;
+
+    iTextBody = HBufC8::NewL(0);
+    
+    iRemoteHost = aSender;
+    iSessionId = aSessionId;
+    //by default EFalse, meaning ignored
+    iClientRequest = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::ParseL
+// Parses one row of headers.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::ParseL(TDesC8& aBuffer)
+    {
+
+    // position where the header ends
+    TInt endOfHeader=0;
+    
+    // position of first \r\n
+    TInt posOfNextLine = 0;
+    
+    // position of first space
+    TInt posOfFirstSpace = 0;
+
+    // position of second space
+    TInt posOfSecondSpace = 0;
+
+    // Boolean value that is used to check if message is
+    // request or response. If message is response, protocol
+    // version information is at the beginning of first row
+    // (HTTP/1.1 200 OK)
+    // In request, protocol version is at the end.
+    // (GET / HTTP/1.1)
+    TBool isResponse = EFalse;
+
+// Handling of header part
+    
+    // trying to find Head/body separator
+    endOfHeader = aBuffer.Find(UpnpString::KDoubleLineFeed);
+    if( endOfHeader == KErrNotFound)
+        {
+        User::Leave(KErrAbort);
+        }
+
+    posOfNextLine = aBuffer.Find(UpnpString::KLineFeed); 
+    if( posOfNextLine != KErrNotFound )
+        {
+        TPtrC8 spacePtr;
+        spacePtr.Set( aBuffer );
+        
+        // finding first space
+        posOfFirstSpace = spacePtr.Find(UpnpString::KSpace);
+        if ( posOfFirstSpace != KErrNotFound )
+            {
+            spacePtr.Set( spacePtr.Left( posOfFirstSpace ) );
+
+            // if first word of message is HTTP/1.1 or HTTP/1.0
+            // message is response
+            if( ( spacePtr.Find( KHttp11WithoutSpace() ) == 0 && 
+                  posOfFirstSpace == KHttp11WithoutSpace().Length() ) 
+                ||
+                ( spacePtr.Find( KHttp10() ) == 0 && 
+                  posOfFirstSpace == KHttp10().Length() ) )
+                {
+                isResponse = ETrue;
+                }
+            else
+                {
+                isResponse = EFalse;            
+                }
+            }
+        else
+            {
+            isResponse = EFalse;            
+            }
+
+        // back to basic handling
+        spacePtr.Set( aBuffer );
+        
+        if( posOfFirstSpace < posOfNextLine && posOfFirstSpace != KErrNotFound )
+            {
+            // if first space is found, it has to be before linefeed
+            // +1 comes from going over the first space, we are interested
+            // in what comes after it.
+            spacePtr.Set( spacePtr.Mid( posOfFirstSpace  + 1 ) );
+            posOfSecondSpace = spacePtr.Find(UpnpString::KSpace);
+            if( posOfSecondSpace < posOfNextLine && posOfSecondSpace != KErrNotFound )
+                {
+                // check that length of path is longer than zero.
+                if( posOfSecondSpace > 0 )
+                    {
+                    // Now check that Protocol version is HTTP/1.0 
+                    // or HTTP/1.1. 
+                    
+                    // If message is response, version is defined in first 
+                    // parameter of the message. This has been checked before,
+                    // so if response, no check needed.
+                    spacePtr.Set( spacePtr.Mid( posOfSecondSpace+1 ) );
+                    posOfNextLine = spacePtr.FindC( UpnpString::KLineFeed() );
+                    spacePtr.Set( spacePtr.Left( posOfNextLine ) );
+                    
+                    if( !isResponse )
+                        {
+                        //Check protocol's version                        
+                        if (spacePtr.Match( KHttpVersionPattern() ) == 0 )
+                            {    
+                            //get only version numbers    
+                            TPtrC8 version = spacePtr.Mid(5);
+                            TLex8 lex(version);
+                            TUint major;                            
+                            if(lex.Val(major)!= KErrNone || lex.Peek()!='.')
+                                {
+                                {
+                                // (protocol NOT HTTP/1.0 or HTTP/1.1. Invalid message)
+                                User::Leave(KErrAbort);        
+                                }
+                                }
+                            lex.Inc();                                                        
+                            TUint minor;
+                            if (lex.Val(minor) !=KErrNone)
+                                {
+                                // (protocol NOT HTTP/1.x. Invalid message)
+                                User::Leave(KErrAbort);    
+                                }                                
+                            lex.SkipSpace();
+                            if (!lex.Eos())
+                                {
+                                // (protocol NOT HTTP/1.x. Invalid message)
+                                User::Leave(KErrAbort);    
+                                }
+                            //only 1.1 and 1.0 supported
+                            if(major != 1 || (minor>1))
+                                {
+                                // (HTTP Version not supported)
+                                User::Leave(-EHttpVersionNotSupported);    
+                                }
+                            
+                            }
+                        else
+                            {
+                            // (protocol NOT HTTP/1.0 or HTTP/1.1. Invalid message)
+                            User::Leave(KErrAbort);                                
+                            }
+                        }
+        
+                    }
+                else
+                    {
+                    // header too short. Invalid message
+                    User::Leave(KErrAbort);
+                    }
+                }
+            else
+                {
+                // no second space found. Invalid message.
+                User::Leave(KErrAbort);
+                }
+            }
+        else
+            {
+            // no space found before linefeed. Invalid message
+            User::Leave(KErrAbort);
+            }
+        }
+    else
+        {
+        // no linefeed found. Invalid message
+        User::Leave(KErrAbort);
+        }
+
+    if ( endOfHeader != KErrNotFound )
+        {
+        TPtrC8 tempHeaderPointer;
+        TPtrC8 finderIndexPointer;
+        tempHeaderPointer.Set(aBuffer.Left(endOfHeader));
+        
+        
+        // if header lenght is longer that 8k,cut headers after one that cross the line
+        if (endOfHeader > KHeadersMaxSixe)
+            {
+            TInt afterLimit = tempHeaderPointer.Mid(KHeadersMaxSixe).Find(UpnpString::KLineFeed);
+            if (afterLimit != KErrNotFound)
+                {
+                tempHeaderPointer.Set(tempHeaderPointer.Left(KHeadersMaxSixe + afterLimit));
+                }
+            }    
+        TInt index=0, indexLWS=0, indexCRLF=0;
+        TBool FirstLine=ETrue;
+        
+        while (index != KErrNotFound)
+            {
+            // locate end-of-line, parse each line separately
+        
+            //RFC822 3.2 field-name  =  1*<any CHAR, excluding CTLs, SPACE, and ":">
+            index = tempHeaderPointer.Find(UpnpString::KLineFeed);
+            indexLWS = FindLWS(tempHeaderPointer);
+            finderIndexPointer.Set(tempHeaderPointer);
+            indexCRLF = index;
+            //the length of the string for the end-line marker CRLF
+            TInt headerCRLF = 2;
+            while (indexCRLF == indexLWS && indexCRLF != KErrNotFound)
+            {
+                //3 below =the length of the LWS string
+                finderIndexPointer.Set(finderIndexPointer.Right(finderIndexPointer.Length()-(indexCRLF+3)));
+                indexCRLF = finderIndexPointer.Find(UpnpString::KLineFeed);
+                if (indexCRLF == KErrNotFound)
+                {
+                    //3 below =the length of the LWS string
+                    index += finderIndexPointer.Length() + 3; 
+                    indexLWS = finderIndexPointer.Length();
+                    headerCRLF = 0;
+                }
+                else
+                {
+                    index += indexCRLF+3;    
+                    indexLWS = FindLWS(finderIndexPointer);
+                }
+                
+                
+            }
+            if(index != KErrNotFound)
+                {
+                TPtrC8 oneHeaderRow;
+                oneHeaderRow.Set(tempHeaderPointer.Left(index));
+
+                // To check if is the first line of message (e.g. GET / HTTP 1.1 etc.)
+                if (FirstLine)
+                    {
+                    ParseHeaderRowL( (TDesC8&) oneHeaderRow, ETrue);
+                    FirstLine=EFalse;
+                    }
+                else 
+                    {
+                    ParseHeaderRowL(oneHeaderRow, EFalse);
+                    }
+
+                // To delete one header row + "\r\n" = length+2 to prepare for next row.
+                if (headerCRLF)
+                    {
+                    tempHeaderPointer.Set(tempHeaderPointer.Right(tempHeaderPointer.Length()-(index+headerCRLF)));    
+                    
+                    }
+                    else
+                    {
+                        index = KErrNotFound;
+                    }
+                }
+            }
+            
+        if (FirstLine)
+            {
+            ParseHeaderRowL(tempHeaderPointer, ETrue);
+            }
+        else
+            {
+            ParseHeaderRowL(tempHeaderPointer, EFalse);
+            }
+        }
+    // check if all HTTP/1 requests have HOST header
+    if(!isResponse && RequestHTTPVersion() == KHttp11WithoutSpace() )
+        {
+        TBool exists;
+        IsHeader(UpnpSSDP::KHdrHost(), exists);
+        if (!exists) 
+            User::Leave(KErrAbort);    
+        }
+    
+    // Handle body:
+    
+    if(iTextBody)
+        {
+        delete iTextBody;
+        iTextBody=NULL;
+        }
+    
+    iTextBody=HBufC8::NewL(aBuffer.Length() - endOfHeader);
+    iTextBody->Des().Zero();
+    
+    // Append rest of message to iTextBody. Leave out string "\r\n\r\n".
+    iTextBody->Des().Append(aBuffer.Right(aBuffer.Length() - (endOfHeader + 4)));
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::ParseHeaderRowL
+// Parses one row of headers.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::FindLWS(const TDesC8& aText)
+{
+    TInt indexSP = aText.Find(UpnpString::KCRLFSP);
+    TInt indexHT = aText.Find(UpnpString::KCRLFHT);
+    
+    
+    if (indexSP == KErrNotFound) 
+        return indexHT;
+    else if    (indexHT == KErrNotFound) 
+        return indexSP;
+    else if(indexSP < indexHT) 
+        return indexSP;
+    else
+        return indexHT;
+    
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::ParseHeaderRowL
+// Parses one row of headers.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::ParseHeaderRowL(const TDesC8& aBuffer, TBool aFirstLine)
+    {
+    TInt FirstColonPosition=0;
+
+    // locate first colon. This separates header's name and value.
+
+    FirstColonPosition = aBuffer.Find(UpnpString::KColon());
+    if(aFirstLine)
+        {
+        AddPairL(aBuffer, KSpace8());
+        }
+    else
+        {
+        if (FirstColonPosition == KErrNotFound )
+            {
+                User::Leave(KErrAbort);
+            }
+        else 
+            {    
+            HBufC8* TrimBuffer;
+            TrimBuffer=HBufC8::NewLC(aBuffer.Length() - (FirstColonPosition + 1));
+            TrimBuffer->Des().Zero();
+            
+            TrimBuffer->Des().Append(aBuffer.Right(aBuffer.Length() - (FirstColonPosition + 1)));
+            TrimBuffer->Des().Trim();
+            UnFoldHeader(TrimBuffer);
+
+            TPtrC8 ptr = aBuffer.Left(FirstColonPosition);
+            
+            // if there are spaces, ignore them.
+            TBool spaceFound = ETrue;
+
+            while( spaceFound )
+                {
+                if(ptr.Find(KSpace()) == 0)
+                    {
+                    ptr.Set(ptr.Mid(1));
+                    }
+                else
+                    {
+                    spaceFound = EFalse;
+                    }
+                }
+
+            AddPairL(ptr, *TrimBuffer);
+            
+            CleanupStack::PopAndDestroy();    
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::TimerEventL
+// Timer expired. For SSDP messages
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::TimerEventL( CUpnpNotifyTimer* /*aTimer*/ )
+    {
+    // Cancel timer if exists.
+    if( iTimer )
+        {
+        if( iTimer->IsActive() )
+            {
+            iTimer->Cancel();
+            }
+        }
+    iMessageObserver->MessageExpiredL( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetMessageTimeoutL
+// Set message timer timeout for SSDP messages.
+// -----------------------------------------------------------------------------
+//   
+EXPORT_C TInt CUpnpHttpMessage::SetMessageTimeoutL( MUpnpMessageObserver* aObserver, const TInt aTimeoutValue )
+    {
+    // check that request is valid.
+    if( !aObserver )
+        {
+        return KErrNotFound;
+        }
+        
+    iMessageObserver = aObserver;
+
+    if( iTimer )
+        {
+        if( iTimer->IsActive() )
+            {
+            iTimer->Cancel();
+            }
+        }
+    else
+        {
+        // setup timer;
+        iTimer = CUpnpNotifyTimer::NewL( this );
+        }
+    iTimer->After( aTimeoutValue );
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::CancelMessageTimeout
+// Set message timer timeout.
+// -----------------------------------------------------------------------------
+//   
+EXPORT_C void CUpnpHttpMessage::CancelMessageTimeout()
+    {
+    if ( iTimer )
+        {
+        iTimer->Cancel();
+        // Deleting timer will also null the observer in the timer.
+        delete iTimer;
+        iTimer = NULL;
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::AddPairL
+// Adds a Headerrow in this message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::AddPairL(const TDesC8& aName, const TDesC8& aValue)
+    {
+    // first checking if given header already exists in the message
+
+    CUpnpHttpHeader* chk = iHeaderList->First();
+    while( chk != NULL )
+        {
+        if( chk->Name().CompareC( aName ) == 0 )
+            {
+            chk->SetValueL( aValue );
+            // no delete to chk, it is owned by iHeaderList.
+            return;
+            }
+        chk = iHeaderList->Next( chk );
+        }
+    
+    // header name not found, adding it.
+        
+    CUpnpHttpHeader* hdr = CUpnpHttpHeader::NewL(aName, aValue);
+    CleanupStack::PushL(hdr);
+    iHeaderList->AddL(hdr);
+    CleanupStack::Pop(hdr);
+    }
+    
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::AddPairL
+// Adds a Headerrow in this message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::RemovePairL(const TDesC8& aName)
+    {
+    // first checking if given header already exists in the message
+
+    CUpnpHttpHeader* chk = iHeaderList->First();
+    while( chk != NULL )
+        {
+        if( chk->Name().CompareC( aName ) == 0 )
+            {
+            // no delete to chk, it is owned by iHeaderList.
+            iHeaderList->Remove(chk);
+            delete chk;
+            return;
+            }
+        chk = iHeaderList->Next( chk );
+        }
+    
+    }
+
+    
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetBodyL
+// Sets the body of message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetBodyL(const TDesC8& aBody)
+    {
+    delete iTextBody;
+    iTextBody = NULL;
+    iTextBody = aBody.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Body
+// Getter for the body of message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpHttpMessage::Body()
+    {
+    return *iTextBody;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::HeadersToStringL
+// Returns message as HBufC8.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* CUpnpHttpMessage::HeadersToStringL()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+
+    HBufC8* headerBuf = NULL;
+    headerBuf = HBufC8::NewL(0);
+    headerBuf->Des().SetLength(0);
+    TBool firstLine = ETrue;
+    
+    while (hdr != NULL)
+        {
+        CleanupStack::PushL( headerBuf );
+        
+        HBufC8* tempHeader = NULL;
+    
+        tempHeader=HBufC8::NewLC( hdr->Name().Length() +
+                                    hdr->Value().Length() +
+                                    4 ); // 4 for colon, space and linefeed
+        tempHeader->Des().Zero();        
+        tempHeader->Des().Append(hdr->Name());
+
+
+        //first line is Request line (Request-Line   = Method SP Request-URI SP HTTP-Version CRLF)
+        //block is needed for URI manipualtion, first line is ALSO added
+        //-- can not be folded, DLNA says directly "Each HTTP header line"
+
+
+        TInt posOfSpace = tempHeader->Des().Find(UpnpString::KSpace());
+            TPtrC8 ptr;
+            if (posOfSpace != KErrNotFound)
+                {
+                ptr.Set( 
+                tempHeader->Des().Right( tempHeader->Des().Length() - 
+                                            (posOfSpace + 1)  )
+                    );
+                }
+            
+            TInt posOfSecondSpace = ptr.Find( UpnpString::KSpace() );
+            TPtrC8 ptr2;
+            
+            if (posOfSecondSpace != KErrNotFound)            
+                ptr2.Set( ptr.Left( posOfSecondSpace ) );
+
+            HBufC8* url = ptr2.AllocLC();
+
+            
+        tempHeader->Des().Replace( posOfSpace+1,
+                                          url->Des().Length(),
+                                          *url );
+
+            CleanupStack::PopAndDestroy( url );
+            url = NULL;
+            
+/*------if Content-Length is not at the beginning (can be some same string in value) so copy it, otherwise will be added and calcualted at the end----*/
+
+        if(hdr->Name().FindC(UpnpHTTP::KHdrContentLength()) != 0)
+
+            {
+            if (hdr->Value().Length() > 0 && !firstLine)
+                {
+                tempHeader->Des().Append(UpnpString::KColon());
+                tempHeader->Des().Append(UpnpString::KSpace());
+                tempHeader->Des().Append(hdr->Value());
+                }
+            else 
+                {
+                if (firstLine)
+                    {
+                    firstLine = EFalse;
+                    }
+                else
+                    {
+                    tempHeader->Des().Append(UpnpString::KColon());
+                    }
+                }
+            //folding, we pass with lineFeed
+            FoldHeaderL(tempHeader);                
+            tempHeader->Des().Append(UpnpString::KLineFeed());
+            }
+
+        HBufC8* tempBuf;
+        tempBuf = HBufC8::NewLC( headerBuf->Des().Length() +
+                                 tempHeader->Des().Length() );
+        tempBuf->Des().Zero();
+        tempBuf->Des().Append( *headerBuf );
+        
+
+        if(hdr->Name().FindC(UpnpHTTP::KHdrContentLength()) != 0)
+            {
+            tempBuf->Des().Append(*tempHeader);
+            }
+        
+        CleanupStack::Pop( tempBuf );
+        CleanupStack::PopAndDestroy( tempHeader ); 
+        CleanupStack::PopAndDestroy( headerBuf ); 
+        
+        tempHeader = NULL;
+        headerBuf = NULL;
+
+        headerBuf = tempBuf;
+        tempBuf = NULL;
+        
+        hdr = iHeaderList->Next(hdr);    
+        }
+    
+    AppendContentLengthToHeadersL(headerBuf);
+    return headerBuf;
+}
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::AppendContentLengthToHeadersL
+// Appends ContentLength when headers are dumped to string (using public method HeadersToStringL).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::AppendContentLengthToHeadersL(HBufC8*& aHeaders){
+
+/*------open file which keep message--------*/
+    TInt bodyLength( 0 );
+    CleanupStack::PushL( aHeaders );    
+
+
+    if(iOutFilename->Length() > 0)
+        {
+        RFs fs;
+        CleanupClosePushL(fs);
+        RFile file;
+        CleanupClosePushL(file);
+
+        User::LeaveIfError( fs.Connect() );
+        
+        HBufC16* outFilename16 = UpnpString::ToUnicodeL( *iOutFilename);
+        CleanupStack::PushL(outFilename16);
+        
+        User::LeaveIfError( file.Open(fs,*outFilename16,  EFileRead|EFileShareAny ) );
+
+        TInt Filesize( 0 );
+        User::LeaveIfError( file.Size( Filesize ) );
+        
+        CleanupStack::PopAndDestroy( outFilename16 );
+        
+        CleanupStack::PopAndDestroy();  //file.Close();
+        outFilename16 = NULL;
+        
+        CleanupStack::PopAndDestroy(); //fs.Close();
+                
+        bodyLength = Filesize;
+        }
+    else
+        {
+        iTextBody->Des().Trim();
+        bodyLength=iTextBody->Des().Length();
+        }
+
+    TBuf8<20> tempBuf;
+    tempBuf.Num( bodyLength );
+
+    HBufC8* tempBuf2;
+    tempBuf2=HBufC8::NewL( aHeaders->Des().Length() +
+                            tempBuf.Length() +
+                            UpnpHTTP::KHdrContentLength().Length() +
+                            2 ); // +2 from colon and space
+    tempBuf2->Des().Append( *aHeaders);
+    
+    CleanupStack::Pop(aHeaders);
+    delete aHeaders;
+    aHeaders=NULL;
+
+    tempBuf2->Des().Append(UpnpHTTP::KHdrContentLength());
+    tempBuf2->Des().Append(UpnpString::KColon());
+    tempBuf2->Des().Append(UpnpString::KSpace());
+    tempBuf2->Des().Append(tempBuf);
+
+    aHeaders=tempBuf2;
+    tempBuf2=NULL;
+
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::FoldHeaderL
+// Folds long header fields (without last CRLF)  - "MUST limit 998".
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::FoldHeaderL(HBufC8*& aHeader){
+HBufC8* result = NULL;
+TInt length = aHeader->Length();
+
+    if(length > KLineLengthLimit)
+        {
+        //Body can be only folded, so 1st we check if name is not too long
+        if (aHeader->FindC(UpnpString::KColon()) > KLineLengthLimit-1)
+            {
+            User::Leave(KErrOverflow);
+            #ifdef _DEBUG
+            LOGS("[CUpnpHttpMessage::FoldHeaderL] name of header > KLineLengthLimit");
+            #endif //_DEBUG
+            }
+        else
+            {
+            //RFC 2822 3.2.3 (check if any FWS already exist and remove them) comment in DLNA doesnt exist so there are not processing)
+            UnFoldHeader(aHeader);
+            aHeader->Des().TrimAll();
+
+            //now proper folding
+            //new length is estimated,
+            //its faster way to estiamte max number (worst possible case) than calculate strict number
+            //how estimation is calculate: HighLevel break (but not SP) in worst case will be in every half -1 in every maxLength string
+            
+            
+            result = HBufC8::NewL(length + length/KLineLengthLimit*2*3 + 2);//CRLFSP + LineFeed
+            CleanupStack::PushL(result);
+            TInt x1 = 0, x2 = 0;
+            TBool last = EFalse;
+            while(ETrue)
+                {
+                length = aHeader->Length();
+                x2 = x1 + KLineLengthLimit;
+                if (x2 >= length) 
+                    {
+                    x2 = length-1;
+                    last = ETrue;
+                    }
+                else
+                    {
+                    TBool foundBreak = EFalse;
+                    for (TInt j=0; j<KHigherLevelSintaticBreaks().Length(); j++)
+                        {
+                        x2 = x1 + KLineLengthLimit;
+                        while (x2 > 0 && !foundBreak)
+                            {
+                            if (aHeader->Des()[x2] == KHigherLevelSintaticBreaks()[j])
+                                {
+                                foundBreak = ETrue;
+                                }
+                            else
+                                {
+                                x2--;
+                                }
+                                
+                            }
+                        if (foundBreak) break;
+                        }
+                    if (!foundBreak)
+                        {
+                        User::Leave(KErrOverflow);
+                        #ifdef _DEBUG
+                        LOGS("[CUpnpHttpMessage::FoldHeaderL] value of header > KLineLengthLimit");
+                        #endif //_DEBUG
+                        }
+                    }
+                //we will append in different way whether SP or other breaks
+                if (aHeader->Des()[x2] == UpnpString::KSpace()[0] || 
+                    aHeader->Des()[x2] == UpnpString::KTab()[0])
+                    {
+                    result->Des().Append(aHeader->Des().Mid(x1, x2));
+                    if (!last)
+                        {
+                        result->Des().Append(UpnpString::KLineFeed());
+                        }
+                    }
+                else
+                    {
+                    result->Des().Append(aHeader->Des().Mid(x1, x2+1));
+                    if (!last)
+                        {
+                        result->Des().Append(UpnpString::KLineFeed());
+                        result->Des().Append(UpnpString::KSpace());//additional space, HTTP req, also break reversibility (folding and unfolding will give new string)
+                        }
+                    }
+                aHeader->Des().Delete(x1, x2-x1);// from, length
+                if (last)
+                    {
+                    break;
+                    }
+                
+                }
+            CleanupStack::Pop(result);
+            CleanupStack::PopAndDestroy(aHeader);
+            aHeader = result;
+            CleanupStack::PushL(aHeader);
+            }
+        }
+    
+ 
+}
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::ToStringL
+// Unfolds header by simply removing any CRLF that is immediately followed by WSP.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::UnFoldHeader(HBufC8*& aHeader){
+    TPtr8 ptr = aHeader->Des();
+    TInt pos = ptr.FindC(UpnpString::KLineFeed());
+    while(pos != KErrNotFound)
+    {
+        ptr.Delete(pos, 2);
+        pos = ptr.FindC(UpnpString::KLineFeed());
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::ToStringL
+// Returns message as HBufC8.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* CUpnpHttpMessage::ToStringL()
+    {
+    HBufC8* buffer;
+    buffer=HeadersToStringL();
+    CleanupStack::PushL(buffer);
+
+    HBufC8* returnBuf;
+    //4 added to the length of the buffer becasue of the additional 2 line feeds
+    returnBuf=HBufC8::NewL(buffer->Des().Length()+iTextBody->Des().Length()+4);
+    
+    returnBuf->Des().Append(*buffer);
+    CleanupStack::PopAndDestroy(buffer);
+    buffer=NULL;
+    //2 line feeds appended
+    returnBuf->Des().Append(UpnpString::KLineFeed);
+    returnBuf->Des().Append(UpnpString::KLineFeed);
+    
+    returnBuf->Des().Append(*iTextBody);
+    
+    return returnBuf;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetMessageDateL
+// Sets the date of message.
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C void CUpnpHttpMessage::SetMessageDateL(const TTime& aTime)
+{   
+    HBufC8* timebuf = NULL;
+    timebuf = UpnpString::GetDateLC(aTime);
+    
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    TBool HeaderFound=EFalse;
+    
+    while (hdr != NULL)
+        {
+        if (hdr->Name() == UpnpHTTP::KHdrDate() )
+            {
+            HeaderFound = ETrue;
+            hdr->SetValueL(*timebuf);
+            }
+        hdr = iHeaderList->Next(hdr);    
+        }
+    
+    if(!HeaderFound)
+        {
+        AddPairL(UpnpHTTP::KHdrDate(),*timebuf);
+        }
+    CleanupStack::PopAndDestroy(timebuf);
+}
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Sender
+// Returns the IP address of the sender of the message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr& CUpnpHttpMessage::Sender()
+    {
+    return iRemoteHost;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Receiver
+// Returns the IP address of the receiver of the message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInetAddr& CUpnpHttpMessage::Receiver()
+    {
+    return iRemoteHost;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetDestinationPathL
+// Sets the DestinationPath of the message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetDestinationPathL(const TDesC8& aDestinationPath)
+    {
+    if(iDestinationPath)
+        {
+        delete iDestinationPath;
+        iDestinationPath = NULL;
+        }
+        
+    iDestinationPath = aDestinationPath.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::DestinationPath
+// Returns the DestinationPath of the message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtrC8 CUpnpHttpMessage::DestinationPath()
+    {
+    if(iDestinationPath->Length()>0)
+        {
+        return iDestinationPath->Des();
+        }
+    else
+        {
+        return (TDesC8&) KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetSenderPathL
+// Sets the SourcePath of the message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetSenderPathL(const TDesC8& aSenderPath)
+    {
+    if(iSenderPath)
+        {
+        delete iSenderPath;
+        iSenderPath = NULL;
+        }
+        
+    iSenderPath = aSenderPath.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SenderPath
+// Returns the SenderPath of the message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtrC8 CUpnpHttpMessage::SenderPath()
+    {
+    if(iSenderPath->Length()>0)
+        {
+        return iSenderPath->Des();
+        }
+    else
+        {
+        return (TDesC8&) KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SenderPathFromHeader
+// Returns the SenderPath from Headers.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpHttpMessage::SenderPathFromHeader()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+
+    if (hdr != NULL)
+        {
+        TInt FirstSpacePosition=hdr->Name().Find(KSpace);
+            
+        if (FirstSpacePosition != KErrNotFound)
+            {
+            TPtrC8 tempPtr;
+            tempPtr.Set(hdr->Name().Right(hdr->Name().Length() - (FirstSpacePosition + 1)));
+            TInt SecondSpacePosition=tempPtr.Find(UpnpString::KSpace());
+            if (SecondSpacePosition != KErrNotFound)
+                {
+                TPtrC8 tempPtr2;
+                tempPtr2.Set(tempPtr.Left(SecondSpacePosition));
+                return tempPtr2;
+                }
+            else
+                return TPtrC8((unsigned char*)"", 0);
+    
+            }
+        else
+            return TPtrC8((unsigned char*)"", 0);
+        
+        }
+
+    return TPtrC8((unsigned char*)"", 0);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetPendingRequest
+// Sets the private member iPendingRequest.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetPendingRequest(TAny* aPointer)
+    {
+    iPendingRequest=aPointer;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::PendingRequest
+// Returns iPendingRequest pointer.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TAny* CUpnpHttpMessage::PendingRequest()
+    {
+    return iPendingRequest;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetInFilenameL
+// Sets the filename where to save incoming content.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetInFilenameL(const TDesC8& aFilename, TBool aOverwriteExisting)
+    {
+    if ( iInFilename )
+        {
+        delete iInFilename;
+        iInFilename = NULL;
+        }
+    
+    iInFilename=HBufC8::NewL(aFilename.Length());
+    iInFilename->Des().Zero();
+    iInFilename->Des().Append(aFilename);    
+
+    iOverwriteExisting  = aOverwriteExisting;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::InFilename
+// Returns the name of file where to save incoming content.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtrC8 CUpnpHttpMessage::InFilename()
+    {
+    if(iInFilename->Length()>0)
+        {
+        return iInFilename->Des();
+        }
+    else
+        {
+        return (TDesC8&) KNullDesC8();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::OverwriteExisting
+// Returns if the existing file should be overwritten with the requested content.
+// If not then the new file with name: aFilename_serialNumber will be created.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::OverwriteExisting()
+    {
+    return iOverwriteExisting;        
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetRangeL
+// Sets the range of remote filename which will be requested.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetRangeL(TInt aOffset, TInt aLength, TBool aSaveAtOffset)
+    {
+    iOffset = aOffset;
+    iLength = aLength;
+    iSaveAtOffset = aSaveAtOffset;    
+
+    
+    TPtrC8 method = Method();
+    // Check method, because sending POST with range is not supported.
+    if( method.Find( KHttpGet ) == 0 || method.Find( KHttpHead ) == 0)
+        {
+        // If one of those values are different from default then it means that 
+        // the Range header should be added.
+        if( iOffset != 0 || iLength != 0 ) 
+            {
+            TBuf8<KMaxIntegerLength> num;
+            HBufC8* rangeValue = HBufC8::NewLC(    UpnpHTTP::KBytes().Length() +
+                                                UpnpString::KEqual().Length() +
+                                                KMaxIntegerLength + 
+                                                   UpnpString::KMinus().Length() +
+                                                   KMaxIntegerLength );
+            rangeValue->Des().Zero();
+            
+            rangeValue->Des().Append( UpnpHTTP::KBytes() );
+            rangeValue->Des().Append( UpnpString::KEqual() );
+            
+            num.Num( iOffset );
+            rangeValue->Des().Append( num );
+            rangeValue->Des().Append( UpnpString::KMinus() );
+            
+            // If length == 0 and offset is specified then it should looks: offset-
+            if( iLength )
+                {
+                // In the Range header the second value specyfies last byte position
+                // so there must be done simple transformation last-byte-pos = offset+lenght-1.
+                // There is 1 subtracted because we inlucde the byte indicated by offset
+                TInt lastBytePos = iOffset + iLength - 1; 
+                num.Num( lastBytePos );
+                rangeValue->Des().Append( num );
+                }
+            
+            AddPairL( UpnpHTTP::KHdrRange(), *rangeValue );
+                                               
+            CleanupStack::PopAndDestroy( rangeValue );
+            }
+        else if( iOffset == 0 && iLength == 0 && !iSaveAtOffset ) 
+            {
+            // Set values indicate that there should be no Range header, so remove it.
+            CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+            while ( hdr != NULL )
+                {
+                if( hdr->Name().Length() == UpnpHTTP::KHdrRange().Length() )
+                    {
+                    if (hdr->Name().FindC( UpnpHTTP::KHdrRange() ) == 0)
+                        {
+                        // Header was found so remove it and exit function.
+                        iHeaderList->Remove( hdr );
+                        delete hdr;
+                        return;
+                        }
+                    }
+                hdr = iHeaderList->Next( hdr );
+                }
+            }
+        }
+    else
+        {
+        User::Leave( KErrGeneral );
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Offset
+// Returns the offset of the file that should be requested from server.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::Offset()
+    {
+    return iOffset;    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Length
+// Returns the length of file content to be requested.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::Length()
+    {
+    return iLength;        
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::InFilename
+// Return if the requested offset of the remote file should be saved at physical offset of
+// the local file.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::SaveAtOffset()
+    {
+    return iSaveAtOffset;        
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetOutFilenameL
+// Sets the filename which will be used as message body.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetOutFilenameL(const TDesC8& aFilename)
+    {
+
+    if(iOutFilename)
+        {
+        delete iOutFilename;
+        iOutFilename=NULL;
+        }
+    
+    iOutFilename=HBufC8::NewL(aFilename.Length());
+    iOutFilename->Des().Zero();
+    iOutFilename->Des().Append(aFilename);    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::OutFilename
+// Returns the name of file which will be set as body of message to send.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtrC8 CUpnpHttpMessage::OutFilename()
+    {
+    if(iOutFilename->Length()>0)
+        {
+        return iOutFilename->Des();
+        }
+    else
+        {
+        return (TDesC8&) KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::GetHeaderValue
+// Returns value of the header.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpHttpMessage::GetHeaderValue(const TDesC8& aHeaderName)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while (hdr != NULL)
+        {
+        if(hdr->Name().Length() == aHeaderName.Length())
+            {
+            if (hdr->Name().FindC(aHeaderName) == 0)
+                {
+                return hdr->Value();
+                }
+            }
+        hdr = iHeaderList->Next(hdr);
+        }
+    
+    return (TDesC8&) KNullDesC8();
+    }
+
+// -----------------------------------------------------------------------------
+//    Check if header exists, also return value of header if exists
+//    @param aHeaderName Name of the header.
+//    @param aExist True if header exist, false if not.
+//    @result Value of the header (if exist, otherwise KNullDesC).
+// -----------------------------------------------------------------------------
+
+EXPORT_C TDesC8& CUpnpHttpMessage::IsHeader(const TDesC8& aHeaderName, TBool& aExist)
+{ 
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    aExist = EFalse;
+    while (hdr != NULL)
+        {
+        if(hdr->Name().Length() == aHeaderName.Length())
+            {
+            if (hdr->Name().FindC(aHeaderName) == 0)
+                {
+                aExist = ETrue;
+                return hdr->Value();
+                }
+            }
+        hdr = iHeaderList->Next(hdr);
+        }
+    return ( TDesC8& )KNullDesC8();
+}
+
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetSessionId
+// Sets messages Session id.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetSessionId(TInt aId)
+    {
+    iSessionId = aId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SessionId
+// Returns the SessionId of the message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::SessionId() const
+    {
+    return iSessionId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::NewSessionIdL
+// Creates new, unused Session id value.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::NewSessionIdL()
+    {
+    TInt id;
+    TInt r;
+    TBool newID=EFalse;
+
+    RSemaphore accessSemaphore;        
+    
+    r=accessSemaphore.OpenGlobal(KSessionIdAccessSemaphoreName());
+    //if failed to open
+    if(r!=KErrNone)
+        {
+        User::LeaveIfError (accessSemaphore.CreateGlobal(KSessionIdAccessSemaphoreName(), 0) );
+        accessSemaphore.Signal();
+        }
+    
+            
+          
+    accessSemaphore.Wait();
+    
+    // Use Publish and Subscribe to generate new session ID. 
+    RProperty idCounter;
+    
+    // Attach to the idCounter, property defined in MessageHandler
+    r = idCounter.Attach(KUPnPUtilsCat,EUPnPUtilsCounter);
+    if (r == KErrNone) 
+        {
+        r = idCounter.Get(id);
+        }
+
+    if (r == KErrNone) 
+        {
+        // Increment id and save
+        id++;
+        r=idCounter.Set(id);
+        if (r==KErrNone) 
+            {
+            newID = ETrue; 
+            }
+        }
+
+    accessSemaphore.Signal();
+    accessSemaphore.Close();       
+
+    // Close the idCounter property
+    idCounter.Close();      
+    
+    
+    if(!newID)
+        User::Leave(r);
+
+    return id;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SessionIdMatch
+// Compares if two messages have same session id.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::SessionIdMatch(const CUpnpHttpMessage& aFirst, const CUpnpHttpMessage& aSecond)
+    {
+    return aFirst.iSessionId == aSecond.iSessionId;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::BodyLength
+// Returns length of message body.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::BodyLength() const
+    {
+    return iTextBody->Length();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::DevicePath
+// Returns the service used from http message, for example MediaServer:1 
+// from Mediaserver:1/ContentDirectory.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpHttpMessage::DevicePath()
+    {
+
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    if (hdr != NULL)
+        {
+        TInt FirstSlashIndex = hdr->Name().Find(UpnpString::KSlash());
+        if (FirstSlashIndex == KErrNotFound)
+            {
+            return KNullDesC8();
+            }
+        TPtrC8 tempPtr;
+        tempPtr.Set(hdr->Name().Right(hdr->Name().Length() - (FirstSlashIndex + 1)));
+        TInt SecondSlashIndex = tempPtr.Find(UpnpString::KSlash());
+        if (SecondSlashIndex == KErrNotFound)
+            {
+            return KNullDesC8();
+            }
+        TPtrC8 tempPtr2;
+        tempPtr2.Set(tempPtr.Left(SecondSlashIndex));
+        return tempPtr2;
+        }
+    
+    return KNullDesC8();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::ServicePath
+// Returns the service used from http message, for example ContentDirectory 
+// from Mediaserver:1/ContentDirectory.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpHttpMessage::ServicePath() const
+    {
+    TInt firstSlashIndex(-1);
+    
+    TInt httpSchema  = iDestinationPath->Find( UpnpHTTP::KHTTPUrl() );
+    if( httpSchema != KErrNotFound)
+    {
+        TPtrC8 schemaPtr( iDestinationPath->Mid( UpnpHTTP::KHTTPUrl().Length() ) );    
+        TInt relativePath = schemaPtr.Find( UpnpString::KSlash() );        
+        firstSlashIndex = relativePath + UpnpHTTP::KHTTPUrl().Length() ;
+    }    
+    else
+    {
+        firstSlashIndex = iDestinationPath->Find(UpnpString::KSlash());
+    }
+    
+    if(firstSlashIndex == KErrNotFound)
+        return KNullDesC8();    
+    
+    TPtrC8 devicePtr(iDestinationPath->Right(iDestinationPath->Length() - (firstSlashIndex + 1)));
+
+    TInt secondSlashIndex = devicePtr.Find(UpnpString::KSlash());
+    TPtrC8 servicePtr(devicePtr.Right(devicePtr.Length() - (secondSlashIndex + 1)));
+    TInt third = servicePtr.Find(UpnpString::KSlash());
+    TInt sp = servicePtr.Find(UpnpString::KSpace());
+
+    if (third != KErrNotFound && ((third < sp && sp != KErrNotFound) || sp == KErrNotFound))
+        {
+        return servicePtr.Left(third);
+        }
+    else
+        {
+        TInt space = servicePtr.Find(UpnpString::KSpace());
+        if (space != KErrNotFound)
+            {
+            return servicePtr.Left(space);
+            }
+        return servicePtr;
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::IsSoap
+// Checks if message is SOAP message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::IsSoap() const
+    {
+    
+    TInt envelope = iTextBody->Find(KEnvelope());
+    if( envelope == KErrNotFound )
+        {
+        CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+        while (hdr != NULL)
+            {
+            if ( hdr->Value().FindC( UpnpSSDP::KUPnPServiceSchema() ) != KErrNotFound && hdr->Name().FindC( KSoapAction() ) != KErrNotFound )
+                {
+                return ETrue;
+                }
+
+            hdr = iHeaderList->Next(hdr);
+            }
+        return EFalse;
+        }
+    else
+        {
+        return ETrue;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::IsGena
+// Checks if message is GENA message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::IsGena()
+    {
+
+    if (Method().CompareC(UpnpGENA::KGenaSubscribe()) == 0)
+        {
+        return ETrue;
+        }
+    else if (Method().CompareC(UpnpGENA::KGenaUnSubscribe()) == 0)
+        {
+        return ETrue;
+        }
+    else if (Method().CompareC(UpnpGENA::KGenaNotify()) == 0)
+        {
+        return ETrue;
+        }
+
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while (hdr != NULL)
+        {
+        if (hdr->Name().CompareC(UpnpGENA::KSid()) == 0)
+            {
+            return ETrue;
+            }
+
+        hdr = iHeaderList->Next(hdr);
+        }    
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Method
+// Returns the method of message, like GET, POST etc.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpHttpMessage::Method()
+    {
+    TBool ValueFound=EFalse;
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+
+    TPtrC8 returnPtr;
+    
+    if (hdr != NULL)
+        {
+        TInt index = hdr->Name().Find(UpnpString::KSpace());
+        if    (index!= KErrNotFound)
+        {
+        returnPtr.Set(hdr->Name().Left(index));
+        ValueFound=ETrue;    
+        }
+        
+        }
+    
+    if(!ValueFound)
+        {
+        returnPtr.Set(KNullDesC8);
+        }
+    return returnPtr;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::HTTPVersion
+//Returns version of HTTP, like HTTP/1.1, HTTP/1.0 etc.
+//-----------------------------------------------------------------------------
+//
+EXPORT_C const TPtrC8 CUpnpHttpMessage::RequestHTTPVersion()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    TPtrC8 returnPtr;
+
+    if (hdr != NULL)
+        {
+        TInt index = hdr->Name().LocateReverse(UpnpString::KSpace()[0]);
+        if (index >= 0)
+            {
+                returnPtr.Set(hdr->Name().Right(hdr->Name().Length()-index-1));    
+            }
+            else
+            {
+                returnPtr.Set(KNullDesC8);
+            }
+        }
+        else
+        {
+            returnPtr.Set(KNullDesC8);
+        }
+    return returnPtr;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::HeaderList
+// Returns a pointer to this message's headerlist.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpHeaderList* CUpnpHttpMessage::HeaderList()
+    {
+    return iHeaderList;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetType
+// Sets the type of message. Used by ControlPoint
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetType(THTTPMsgType aType)
+    {
+    iType = aType;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Type
+// Returns the Http message type, used by controlpoint.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C THTTPMsgType CUpnpHttpMessage::Type() const
+    {
+    return iType;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::UpnpError
+// Returns textual presentation of the given error.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpHttpMessage::UpnpError(TUpnpErrorCode aError)
+    {
+    switch(aError)    
+        {    
+        case EHttpOk:
+            return KHttpOk();
+            
+        case EBadRequest:
+            return KBadRequest();
+        case EInvalidAction:
+            return KInvalidAction();
+        case EInvalidArgs:
+            return KInvalidArgs();
+        case EInvalidVar:
+            return KInvalidVar();
+        case EPreconditionFailed:
+            return KPreconditionFailed();
+            
+        case EInternalServerError:
+            return KInternalServerError();
+        case EActionFailed:
+            return KActionFailed();
+            
+        // 600-699 Common action errors:    
+        case EArgumentValue:
+            return KArgumentValue();
+        case EArgumentRange:
+            return KArgumentRange();
+        case ENotImplemented:
+            return KNotImplemented();
+        case EOutOfMemory:
+            return KOutOfMemory();
+        case EHumanIntervention:
+            return KHumanIntervention();
+        case EStringTooLong:
+            return KStringTooLong();
+        case ENotAuthorized:
+            return KNotAuthorized();
+        case ESignatureFailure:
+            return KSignatureFailure();
+        case ESignatureMissing:
+            return KSignatureMissing();
+        case ENotEncrypted:
+            return KNotEncrypted();
+        case EInvalidSequence:
+            return KInvalidSequence();
+        case EInvalidUrl:
+            return KInvalidUrl();
+        case ENoSession:
+            return KNoSession();
+            
+        // 700-799 Action specific errors:    
+        case ENoSuchObject:
+            return KNoSuchObject();
+        case EInvalidCurrentTag:
+            return KInvalidCurrentTag();
+        case EInvalidNewTag:
+            return KInvalidNewTag();
+        case ERequiredTag:
+            return KRequiredTag();
+        case EReadOnlyTag:
+            return KReadOnlyTag();
+        case EParameterMismatch:
+            return KParameterMismatch();
+        case EInvalidSearch:
+            return KInvalidSearch();
+        case EInvalidSort:
+            return KInvalidSort();
+        case ENoContainer:
+            return KNoContainer();
+        case ERestrictedObject:
+            return KRestrictedObject();
+        case EBadMetadata:
+            return KBadMetadata();
+        case ERestrictedParentObject:
+            return KRestrictedParentObject();
+        case ENoSourceResource:
+            return KNoSourceResource();
+        case ESourceAccess:
+            return KSourceAccess();
+        case ETransferBusy:
+            return KTransferBusy();
+        case ENoFileTransfer:
+            return KNoFileTransfer();
+        case ENoDestinationResource:
+            return KNoDestinationResource();
+        case EDestinationAccess:
+            return KDestinationAccess();
+        case ECannotProcess:
+            return KCannotProcess();
+        default:
+            return KNullDesC8();
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::UpnpErrorL
+// Returns textual presentation of the given error.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* CUpnpHttpMessage::UpnpErrorL(TUpnpErrorCode aError)
+    {
+    return UpnpError(aError).AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::HttpError
+// Returns the textual error message of given error code.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpHttpMessage::HttpError(THttpStatusCode aError)
+    {
+    switch(aError)    
+        {    
+            // 100
+        case EHttpContinue:
+            return KHttpContinue();
+        case EHttpSwitchingProtocols:
+            return KHttpSwitchingProtocols();
+            
+            // 200
+        case EHttp200Ok:
+            return KHttpOk();
+        case EHttpCreated:
+            return KHttpCreated();
+        case EHttpAccepted:
+            return KHttpAccepted();
+        case EHttpNonAuthoritative:
+            return KHttpNonAutohorative();
+        case EHttpNoContent:
+            return KHttpNoContent();
+        case EHttpResetContent:
+            return KHttpResetContent();
+        case EHttpPartialContent:
+            return KHttpPartialContent();
+        
+            // 300
+
+        case EHttpMultipleChoises:
+            return     KHttpMultipleChoises();
+        case EHttpMovedPermanently:
+            return KHttpMovedPermanently();
+        case EHttpFound:
+            return KHttpFound();
+        case EHttpSeeOther:
+            return KHttpSeeOther();
+        case EHttpNotModified:
+            return KHttpNotModified();
+        case EHttpUseProxy:
+            return KHttpUseProxy();
+        case EHttpTemporaryRedirect:
+            return KHttpTemporaryRedirect();
+            
+            // 400
+            
+        case EHttpBadRequest:
+            return KHttpBadRequest();
+        case EHttpUnAuthorized:
+            return KHttpUnauthorized();
+        case EHttpPaymentRequired:
+            return KHttpPaymentRequired();
+        case EHttpForbidden:
+            return KHttpForbidden();
+        case EHttpNotFound:
+            return KHttpNotFound();
+        case EHttpMethodNotAllowed:
+            return KHttpMethodNotAllowed();
+        case EHttpNotAcceptable:
+            return KHttpNotAcceptable();
+        case EHttpProxyAuthenticationRequired:
+            return KHttpProxyAuthenticationRequired();
+            
+        case EHttpRequestTimeout:
+            return KHttpRequestTimeout();
+        case EHttpConflict:
+            return KHttpConflict();
+        case EHttpGone:
+            return KHttpGone();
+        case EHttpLengthRequired:
+            return KHttpLengthRequired();
+        case EHttpPreconditionFailed:
+            return KHttpPreconditionFailed();
+        case EHttpEntityTooLarge:
+            return KHttpEntityTooLarge();
+        case EHttpUriTooLong:
+            return KHttpUriTooLarge();
+        case EHttpUnsupportedMediaType:
+            return KHttpUnsupprotedMediaType();
+        case EHttpRequestedRangeNotSatisfiable:
+            return KHttpRequestedRangeNotSatisfiable();
+        case EHttpExpectationFailed:
+            return KHttpExpectationFailed();
+
+            // 500                
+        case EHttpInternalServerError:
+            return KHttpInternalServerError();
+        case EHttpNotImplemented:
+            return KHttpNotImplemented();
+        case EHttpBadGateway:
+            return KHttpBadGateway();
+        case EHttpServiceUnavailable:
+            return KHttpServiceUnavailable();
+        case EHttpGatewayTimeout:
+            return KHttpGatewayTimeout();
+        case EHttpVersionNotSupported:
+            return KHttpVersionNotSupported();
+        case EHttpInsufficientStorage:
+            return KHttpInsufficientStorage();
+            
+        default:
+            return KNullDesC8();
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Error
+// Returns the error code of the message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::Error()
+    {
+    if(iHeaderList && iHeaderList->Count())
+        {
+        CUpnpHttpHeader* hdr = iHeaderList->First();
+
+        if (hdr != NULL)
+            {            
+            TDesC8& first = hdr->Name();
+        
+            if(first.Length() == 0)
+                {
+                return KErrNotFound;
+                }
+
+            TInt space1 = first.Find(KSpace8());
+
+            if (space1 != KErrNotFound)
+                {
+                TPtrC8 right = first.Mid(space1+1);
+                TInt space2 = right.Find(KSpace8());
+
+                if (space2 != KErrNotFound)
+                    {
+                    TLex8 lex(right.Left(space2));
+
+                    TInt error;
+                    lex.Val(error);
+
+                    return error;                
+                    }
+                }
+            }
+        }
+    return KErrNotFound;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Is3xx
+// Returns True if message is a 3xx response
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::Is3xx()
+    { TInt err = Error();
+        return (err>=300 && err<400);
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Is1xx
+// Returns True if message is a 1xx response
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::Is1xx()
+    { TInt err = Error();
+        return (err>=100 && err<200);
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Is2xx
+// Returns True if message is a 2xx response
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::Is2xx()
+    { TInt err = Error();
+        return (err>=200 && err<300);
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::AddrOutput
+// Sets the aBuf as string presentation of aAddr
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::AddrOutput(const TInetAddr& aAddr, TDes8& aBuf)
+    {
+    aBuf.SetLength(0);
+    if (aAddr.Family() == KAfInet || aAddr.Family() == KAfInet6)
+        {
+        TUint32 a = aAddr.Address();
+        aBuf.Format(_L8("%d.%d.%d.%d"), a>>24, (a>>16)&0xff, (a>>8)&0xff, a&0xff);
+        }
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::AddrInput
+// Sets the TInetAddr object value to given aBuf.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::AddrInput(TInetAddr& aAddr, const TDesC8& aBuf)
+    {
+    
+    TPtrC8 ptr(aBuf);
+    TInt addr[4] = {0, 0, 0, 0};
+    for (TInt i=0; i<4; i++)
+        {
+        TInt posOfDot=ptr.Find(UpnpString::KDot8);
+        if(posOfDot != KErrNotFound)
+            {
+            TLex8 lex(ptr.Left(posOfDot));
+            lex.Val(addr[i]);    
+            ptr.Set(ptr.Mid(posOfDot+1));
+            }
+        else
+            {
+            if(i==3)
+                {
+                TLex8 lex(ptr);
+                lex.Val(addr[i]);                
+                }
+            }
+
+        }    
+    aAddr.SetAddress((addr[0]<<24) | (addr[1]<<16) | (addr[2]<<8) | addr[3]);
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::RetryCounter
+// Returns the current iRetryCounter value.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::RetryCounter()
+    {
+    return iRetryCounter;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetRetryCounter
+// Sets the retry counter value
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetRetryCounter(TInt aValue)
+    {
+    iRetryCounter=aValue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetHttpPriority
+// Sets the priority on session sending this message
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetHttpPriority( TThreadPriority aPriority )
+    {
+    iSessionPriority = aPriority;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::HttpPriority
+// Returns the priority of this message
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TThreadPriority CUpnpHttpMessage::HttpPriority()
+    {
+    return iSessionPriority;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetOutUri
+// Sets the uri to find the local file.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetOutUriL( const TDesC8& aUri )
+    {
+    if( iOutUri )
+        {
+        delete iOutUri;
+        iOutUri = NULL;
+        }
+    iOutUri = HBufC8::NewL( aUri.Length() );
+    iOutUri->Des().Zero();
+    iOutUri->Des().Append( aUri );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::OutUri
+// Returns the value of OutUri.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TDesC8& CUpnpHttpMessage::OutUri()
+    {
+    if( iOutUri )
+        {
+        return *iOutUri;
+        }
+    else
+        {
+        return KNullDesC8();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetLocal
+// Sets if message is a local requests
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetLocal( TBool aLocal )
+    {
+    iLocal = aLocal;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Local
+// Returns if message is a local requests.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::Local()
+    {
+    return iLocal;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetClientRequest
+// Sets if message is a client request
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetClientRequest( TBool aClientRequest )
+    {
+    iClientRequest = aClientRequest;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Local
+// Returns if message is a client request.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpHttpMessage::ClientRequest()
+    {
+    return iClientRequest;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetTimeout
+// Sets the value for a TCP timeout (valid for cleint sessions)
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetTcpTimeout( TInt aTimeout )
+    {
+    iTcpTimeout = aTimeout;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::Timeout
+// Returns the value of TCP timeout
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::TcpTimeout()
+    {
+    return iTcpTimeout;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetInternalError
+// Sets internal error code
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpMessage::SetInternalError(TInt aErrorCode)
+    {
+    iInternalError = aErrorCode;
+    }    
+// -----------------------------------------------------------------------------
+// CUpnpHttpMessage::SetInternalError
+// Sets internal error code
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpHttpMessage::InternalError()
+    {
+    return iInternalError;
+    }        
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnphttpmessagefactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,880 @@
+/** @file
+* 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:  HTTP message factory
+*
+*/
+
+
+// INCLUDES
+#include "upnphttpmessagefactory.h"
+#include "upnpstring.h"
+#include "upnpcons.h"
+#include "upnpcommonupnplits.h"
+
+_LIT8(KUpnpBodyMsgError1,"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>");
+_LIT8(KUpnpBodyMsgError2,"</title>\n</head><body>\n<h1>");
+_LIT8(KUpnpBodyMsgError3,"</h1>\n<hr />\n</body></html>");
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpGetL
+// HTTP GET
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpGetL( TInetAddr& aDestination,
+                                                      const TDesC8& aPath )
+    {
+    CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL(aDestination);
+    CleanupStack::PushL(msg);
+    msg->SetDestinationPathL( aPath );
+
+    TInt headerLen = 0;
+
+    headerLen += KHttpGet().Length();
+    headerLen += UpnpString::KSpace().Length();
+    headerLen += UpnpString::KSlash().Length();
+    headerLen += aPath.Length();
+    headerLen += KHttp11().Length();
+
+    HBufC8* header = HBufC8::NewLC(headerLen);
+
+    header->Des().Zero();
+    header->Des().Append(KHttpGet());
+    header->Des().Append(UpnpString::KSpace());
+    if (aPath.Length() >= UpnpString::KSlash().Length())
+        {
+        if (aPath.Find(UpnpString::KSlash()) != 0)
+            {
+            header->Des().Append(UpnpString::KSlash());
+            }
+        }
+    else
+        {
+        header->Des().Append(UpnpString::KSlash());
+        }
+    header->Des().Append(aPath);
+    header->Des().Append(KHttp11);
+
+    msg->AddPairL(*header, KNullDesC8());
+
+    SetHostHeaderL( msg, aDestination );
+
+    msg->AddPairL( UpnpHTTP::KHdrCacheControl(), UpnpHTTP::KNoCache());
+
+    CleanupStack::PopAndDestroy(); // header
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpGetL
+// HTTP GET
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpGetL( TInetAddr& aDestination,
+                                                      const TDesC8& aHeadPath,
+                                                      const TDesC8& aTailPath )
+    {
+    HBufC8 *wholePath = HBufC8::NewLC(aHeadPath.Length() + aTailPath.Length());
+    wholePath->Des().Append(aHeadPath);
+    wholePath->Des().Append(aTailPath);
+    CUpnpHttpMessage* msg = HttpGetL(aDestination, *wholePath);
+    CleanupStack::PopAndDestroy(wholePath);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpGetL
+// HTTP GET
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpGetL(const TDesC8& aUrl)
+    {
+    TPtrC8 PathPtr;
+    PathPtr.Set(aUrl);
+    TInt PosOfDoubleSlash = PathPtr.FindC(UpnpString::KDoubleSlash());
+    TInt PosOfSlash=0;
+    if(PosOfDoubleSlash==KErrNotFound)
+        {
+        // no "//" found, so we assume that protocol (http://, ftp://)
+        // is not used in front of aPath
+        PosOfSlash=PathPtr.Find(UpnpString::KSlash());
+        if(PosOfSlash != 0)
+            {
+            PathPtr.Set(PathPtr.Mid(PosOfSlash+1));
+            }
+        }
+    else
+        {
+        // DoubleSlash found, so we have to get next slash after doubleSlash.
+        PathPtr.Set(PathPtr.Mid( PosOfDoubleSlash+2 ));
+        PosOfSlash=PathPtr.Find(UpnpString::KSlash());
+        if(PosOfSlash != KErrNotFound)
+            {
+            PathPtr.Set(PathPtr.Mid(PosOfSlash));
+            }
+        }
+
+    if(PathPtr.Length() == 0)
+        {
+        PathPtr.Set(aUrl.Mid( PosOfSlash+PosOfDoubleSlash+2 ));
+        }
+
+    TPtrC8 addressPtr;
+    addressPtr.Set(aUrl);
+    if(PosOfDoubleSlash != KErrNotFound)
+        {
+        addressPtr.Set(addressPtr.Mid(PosOfDoubleSlash+2));
+        }
+
+    PosOfSlash=0;
+    PosOfSlash=addressPtr.Find(UpnpString::KSlash());
+    if(PosOfSlash != KErrNotFound)
+        {
+        addressPtr.Set(addressPtr.Left(PosOfSlash));
+        }
+
+    TInetAddr addr;
+
+    TInt port=KDefaultHttpPortNumber; // default port of http.
+
+    TInt PosOfColon=addressPtr.Find(UpnpString::KColon());
+    if(PosOfColon != KErrNotFound)
+        {
+
+        // port is given in url, so we use that one.
+        TPtrC8 portPtr;
+        portPtr.Set(addressPtr);
+        portPtr.Set(addressPtr.Mid(PosOfColon+1));
+
+        TLex8 lex = TLex8(portPtr);
+        TInt error = lex.Val(port);
+        if( error == KErrNone )
+            {
+            addressPtr.Set(addressPtr.Left(PosOfColon));
+            }
+        }
+
+    addr.SetPort(port);
+
+    CUpnpHttpMessage::AddrInput(addr, addressPtr);
+
+    CUpnpHttpMessage* msg =  HttpGetL(addr, PathPtr);
+
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpGetL
+// HTTP GET
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpGetL(
+                        const TDesC8& aDestination,
+                        const TDesC8& aPath )
+    {
+
+    TPtrC8 tempPtr(aPath);
+    TInt PosOfDoubleSlash = tempPtr.FindC(UpnpString::KDoubleSlash());
+    TInt PosOfSlash=0;
+    if(PosOfDoubleSlash==KErrNotFound)
+        {
+        // no "//" found, so we assume that protocol (http://, ftp://)
+        // is not used in front of aPath
+        PosOfSlash=tempPtr.Find( UpnpString::KSlash() );
+        if(PosOfSlash != 0)
+            {
+            tempPtr.Set(tempPtr.Mid(PosOfSlash+1));
+            }
+        }
+    else
+        {
+        // DoubleSlash found, so we have to get next slash after doubleSlash.
+        tempPtr.Set(tempPtr.Mid( PosOfDoubleSlash+2 ));
+        PosOfSlash=tempPtr.Find( UpnpString::KSlash() );
+        tempPtr.Set(tempPtr.Mid(PosOfSlash));
+        }
+
+    if(tempPtr.Length() == 0)
+        {
+        tempPtr.Set(aPath.Mid( PosOfSlash+PosOfDoubleSlash+2 ));
+        }
+
+    TInt port(KDefaultHttpPortNumber);
+
+    RPointerArray<TPtrC8> array;
+    CleanupClosePushL(array);
+    UpnpString::CutToPiecesL(aDestination, ':', array);
+
+    if( array.Count() == 0 )
+        {
+        CleanupStack::PopAndDestroy( &array ); //array
+        return NULL;
+        }
+
+    //if the port is defined. otherwise use 80 as a default
+    if(array.Count() > 1)
+        {
+        UpnpString::StringToInt(  *(array)[1], &port );
+        }
+
+    TPtrC8 temp = *(array)[0];
+    CleanupStack::Pop(); //array
+    array.ResetAndDestroy();
+
+    TInetAddr* addr = new (ELeave) TInetAddr();
+    CleanupStack::PushL( addr );
+
+    TInt slash = temp.Find( UpnpString::KSlash() );
+
+    if(slash != KErrNotFound)
+        {
+        temp.Set(temp.Left(slash));
+        }
+
+    CUpnpHttpMessage::AddrInput(*addr, temp);
+    addr->SetPort(port);
+
+    CUpnpHttpMessage* msg =  HttpGetL(*addr, tempPtr);
+
+    CleanupStack::PopAndDestroy( addr );
+
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpHeadL
+// HTTP HEAD
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpHeadL(const TDesC8& aUrl)
+    {
+    TPtrC8 PathPtr;
+    PathPtr.Set(aUrl);
+    TInt PosOfDoubleSlash = PathPtr.FindC(UpnpString::KDoubleSlash());
+    TInt PosOfSlash=0;
+    if(PosOfDoubleSlash==KErrNotFound)
+        {
+        // no "//" found, so we assume that protocol (http://, ftp://)
+        // is not used in front of aPath
+        PosOfSlash=PathPtr.Find(UpnpString::KSlash());
+        if(PosOfSlash != 0)
+            {
+            PathPtr.Set(PathPtr.Mid(PosOfSlash+1));
+            }
+        }
+    else
+        {
+        // DoubleSlash found, so we have to get next slash after doubleSlash.
+        PathPtr.Set(PathPtr.Mid( PosOfDoubleSlash+2 ));
+        PosOfSlash=PathPtr.Find(UpnpString::KSlash());
+        if(PosOfSlash != KErrNotFound)
+            {
+            PathPtr.Set(PathPtr.Mid(PosOfSlash));
+            }
+        }
+
+    if(PathPtr.Length() == 0)
+        {
+        PathPtr.Set(aUrl.Mid( PosOfSlash+PosOfDoubleSlash+2 ));
+        }
+
+    TPtrC8 addressPtr;
+    addressPtr.Set(aUrl);
+    if(PosOfDoubleSlash != KErrNotFound)
+        {
+        addressPtr.Set(addressPtr.Mid(PosOfDoubleSlash+2));
+        }
+
+    PosOfSlash=0;
+    PosOfSlash=addressPtr.Find(UpnpString::KSlash());
+    if(PosOfSlash != KErrNotFound)
+        {
+        addressPtr.Set(addressPtr.Left(PosOfSlash));
+        }
+
+    TInetAddr addr;
+
+    TInt port=KDefaultHttpPortNumber; // default port of http.
+
+    TInt PosOfColon=addressPtr.Find(UpnpString::KColon());
+    if(PosOfColon != KErrNotFound)
+        {
+
+        // port is given in url, so we use that one.
+        TPtrC8 portPtr;
+        portPtr.Set(addressPtr);
+        portPtr.Set(addressPtr.Mid(PosOfColon+1));
+
+        TLex8 lex = TLex8(portPtr);
+        TInt error = lex.Val(port);
+        if( error == KErrNone )
+            {
+            addressPtr.Set(addressPtr.Left(PosOfColon));
+            }
+        }
+
+    addr.SetPort(port);
+
+    CUpnpHttpMessage::AddrInput(addr, addressPtr);
+
+    CUpnpHttpMessage* msg =  HttpHeadL(addr, PathPtr);
+
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpHeadL
+// HTTP HEAD
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpHeadL(
+                        const TDesC8& aDestination,
+                        const TDesC8& aPath )
+    {
+
+    TPtrC8 tempPtr(aPath);
+    TInt PosOfDoubleSlash = tempPtr.FindC(UpnpString::KDoubleSlash());
+    TInt PosOfSlash=0;
+    if(PosOfDoubleSlash==KErrNotFound)
+        {
+        // no "//" found, so we assume that protocol (http://, ftp://)
+        // is not used in front of aPath
+        PosOfSlash=tempPtr.Find( UpnpString::KSlash() );
+        if(PosOfSlash != 0)
+            {
+            tempPtr.Set(tempPtr.Mid(PosOfSlash+1));
+            }
+        }
+    else
+        {
+        // DoubleSlash found, so we have to get next slash after doubleSlash.
+        tempPtr.Set(tempPtr.Mid( PosOfDoubleSlash+2 ));
+        PosOfSlash=tempPtr.Find( UpnpString::KSlash() );
+        tempPtr.Set(tempPtr.Mid(PosOfSlash));
+        }
+
+    if(tempPtr.Length() == 0)
+        {
+        tempPtr.Set(aPath.Mid( PosOfSlash+PosOfDoubleSlash+2 ));
+        }
+
+    RPointerArray<TPtrC8> array;
+    CleanupClosePushL(array);
+    UpnpString::CutToPiecesL(aDestination, ':', array);
+        if( array.Count() == 0 )
+        {
+        CleanupStack::PopAndDestroy( &array ); //array
+        return NULL;
+        }
+    TInt port( KDefaultHttpPortNumber);
+    //if the port is defined. otherwise use 80 as a default
+    if(array.Count() > 1)
+        {
+        UpnpString::StringToInt(  *(array)[1], &port );
+        }
+    TPtrC8 temp = *(array)[0];
+    CleanupStack::Pop(); //array
+    array.ResetAndDestroy();
+
+    TInetAddr* addr = new (ELeave) TInetAddr();
+    CleanupStack::PushL( addr );
+
+    TInt slash = temp.Find( UpnpString::KSlash() );
+
+    if(slash != KErrNotFound)
+        {
+        temp.Set(temp.Left(slash));
+        }
+
+    CUpnpHttpMessage::AddrInput(*addr, temp);
+    addr->SetPort(port);
+
+    CUpnpHttpMessage* msg =  HttpHeadL(*addr, tempPtr);
+
+    CleanupStack::PopAndDestroy( addr );
+
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpHeadL
+// HTTP HEAD
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpHeadL( TInetAddr& aDestination,
+                                                      const TDesC8& aPath )
+    {
+    CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL(aDestination);
+    CleanupStack::PushL(msg);
+    msg->SetDestinationPathL( aPath );
+
+    TInt headerLen = 0;
+
+    headerLen += KHttpHead().Length();
+    headerLen += UpnpString::KSpace().Length();
+    headerLen += UpnpString::KSlash().Length();
+    headerLen += aPath.Length();
+    headerLen += KHttp11().Length();
+
+    HBufC8* header = HBufC8::NewLC(headerLen);
+
+    header->Des().Zero();
+    header->Des().Append(KHttpHead());
+    header->Des().Append(UpnpString::KSpace());
+    if (aPath.Length() >= UpnpString::KSlash().Length())
+        {
+        if (aPath.Find(UpnpString::KSlash()) != 0)
+            {
+            header->Des().Append(UpnpString::KSlash());
+            }
+        }
+    else
+        {
+        header->Des().Append(UpnpString::KSlash());
+        }
+    header->Des().Append(aPath);
+    header->Des().Append(KHttp11);
+
+    msg->AddPairL(*header, KNullDesC8());
+
+    SetHostHeaderL( msg, aDestination );
+
+    CleanupStack::PopAndDestroy(); // header
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpPostL
+// HTTP POST
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpPostL(const TDesC8& aUrl)
+    {
+    TPtrC8 PathPtr;
+    PathPtr.Set(aUrl);
+    TInt PosOfDoubleSlash = PathPtr.FindC(UpnpString::KDoubleSlash());
+    TInt PosOfSlash=0;
+    if(PosOfDoubleSlash==KErrNotFound)
+        {
+        // no "//" found, so we assume that protocol (http://, ftp://)
+        // is not used in front of aPath
+        PosOfSlash=PathPtr.Find(UpnpString::KSlash());
+        if(PosOfSlash != 0)
+            {
+            PathPtr.Set(PathPtr.Mid(PosOfSlash+1));
+            }
+        }
+    else
+        {
+        // DoubleSlash found, so we have to get next slash after doubleSlash.
+        PathPtr.Set(PathPtr.Mid( PosOfDoubleSlash+2 ));
+        PosOfSlash=PathPtr.Find(UpnpString::KSlash());
+        if(PosOfSlash != KErrNotFound)
+            {
+            PathPtr.Set(PathPtr.Mid(PosOfSlash));
+            }
+        }
+
+    if(PathPtr.Length() == 0)
+        {
+        PathPtr.Set(aUrl.Mid( PosOfSlash+PosOfDoubleSlash+2 ));
+        }
+
+    TPtrC8 addressPtr;
+    addressPtr.Set(aUrl);
+    if(PosOfDoubleSlash != KErrNotFound)
+        {
+        addressPtr.Set(addressPtr.Mid(PosOfDoubleSlash+2));
+        }
+
+    PosOfSlash=0;
+    PosOfSlash=addressPtr.Find(UpnpString::KSlash());
+    if(PosOfSlash != KErrNotFound)
+        {
+        addressPtr.Set(addressPtr.Left(PosOfSlash));
+        }
+
+    TInetAddr addr;
+    HBufC* addrBuf;
+    TInt port=KDefaultHttpPortNumber; // default port of http
+
+    TInt PosOfColon=addressPtr.Find(UpnpString::KColon());
+    if(PosOfColon != KErrNotFound)
+        {
+        // port is given in url, so we use that one.
+        TPtrC8 portPtr;
+        portPtr.Set(addressPtr);
+        portPtr.Set(addressPtr.Mid(PosOfColon+1));
+
+        TLex8 lex = TLex8(portPtr);
+        lex.Val(port);
+
+        addressPtr.Set(addressPtr.Left(PosOfColon));
+        }
+
+    addr.SetPort(port);
+
+    addrBuf=UpnpString::ToUnicodeL(addressPtr);
+
+    CUpnpHttpMessage::AddrInput(addr, addressPtr);
+
+    delete addrBuf;
+    addrBuf=NULL;
+
+    CUpnpHttpMessage* msg =  HttpPostL(addr, PathPtr);
+
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpPostL
+// HTTP POST
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpPostL(
+                            const TDesC8& aDestination,
+                            const TDesC8& aPath )
+    {
+    RPointerArray<TPtrC8> array;
+    CleanupClosePushL(array);
+    UpnpString::CutToPiecesL(aDestination, ':',array);
+    TInetAddr addr;
+    if(array.Count() > 1)
+        {
+        TInt port;
+        if((array)[1]->Length() >0)
+            {
+            TLex8 lex = TLex8( *(array)[1] );
+            lex.Val(port);
+            }
+        else
+            {
+            CleanupStack::Pop(); //array
+            array.ResetAndDestroy();
+            return NULL;
+            }
+
+        if((array)[0]->Length() > 0)
+            {
+            CUpnpHttpMessage::AddrInput(addr, *(array)[0]);
+            addr.SetPort( port);
+            }
+        else
+            {
+            CleanupStack::Pop(); //array
+            array.ResetAndDestroy();
+            return NULL;
+            }
+        }
+    else
+        {
+        CleanupStack::Pop(); //array
+        array.ResetAndDestroy();
+        return NULL;
+        }
+    CleanupStack::Pop();
+    array.ResetAndDestroy();
+    return HttpPostL(addr, aPath);
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpPostL
+// HTTP POST
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpPostL(
+                            const TInetAddr& aDestination,
+                            const TDesC8& aPath )
+    {
+    CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL(aDestination);
+    CleanupStack::PushL(msg);
+    msg->SetDestinationPathL( aPath );
+    HBufC8* temp = HBufC8::NewLC( KHttpPost().Length() +
+                                  UpnpString::KSpace().Length() +
+                                  aPath.Length() +
+                                  KHttp11().Length() );
+
+    temp->Des().Zero();
+    temp->Des().Append(KHttpPost());
+    temp->Des().Append(UpnpString::KSpace());
+    temp->Des().Append(aPath);
+    temp->Des().Append(KHttp11);
+    msg->AddPairL(*temp, KNullDesC8());
+
+    SetHostHeaderL( msg, aDestination );
+
+    msg->AddPairL(UpnpHTTP::KConnection(), UpnpHTTP::KClose());
+    CleanupStack::PopAndDestroy(temp);
+    CleanupStack::Pop();
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpResponseOkL
+// HTTP response OK
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpResponseOkL(
+                                        CUpnpHttpMessage* aMessage )
+    {
+    CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL(aMessage->Sender(),
+        aMessage->SessionId());
+    CleanupStack::PushL(msg);
+
+    msg->AddPairL(KHttp11Ok(), KNullDesC8());
+
+
+    msg->SetDestinationPathL(aMessage->SenderPath());
+    msg->SetSenderPathL(aMessage->DestinationPath());
+
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpResponseOkL
+// HTTP response OK
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpResponseOkL(
+                                    const TInetAddr& aDestination )
+    {
+    CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL(aDestination);
+    CleanupStack::PushL(msg);
+
+    msg->AddPairL(KHttp11Ok(), KNullDesC8());
+
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::Http11Response
+// HTTP response
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::Http11ResponseL(
+                                    CUpnpHttpMessage *aMessage,
+                                    TInt aStatus )
+    {
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::Http11ResponseL( aMessage->Sender(), aStatus );
+    CleanupStack::PushL(msg);
+
+    msg->SetSessionId( aMessage->SessionId() );
+    msg->SetDestinationPathL(aMessage->SenderPath());
+    msg->SetSenderPathL(aMessage->DestinationPath());
+
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::Http11Response
+// HTTP response
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::Http11ResponseL(
+                                    const TInetAddr& aDestination,
+                                    TInt aStatus )
+    {
+    CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL(aDestination);
+    CleanupStack::PushL(msg);
+    THttpStatusCode status = (THttpStatusCode) aStatus;
+
+    TBuf8<KMaxIntegerLength> num;
+    num.Num( aStatus );
+
+    HBufC8* tempBuf;
+    tempBuf=HBufC8::NewLC( KHttp11WithoutSpace().Length() + KSpace().Length() +
+                            num.Length() + KSpace().Length() +
+                            (CUpnpHttpMessage::HttpError(status)).Length() );
+    tempBuf->Des().Zero();
+    tempBuf->Des().Append(KHttp11WithoutSpace());
+    tempBuf->Des().Append( KSpace() );
+    tempBuf->Des().Append( num );
+    tempBuf->Des().Append( KSpace );
+    tempBuf->Des().Append(CUpnpHttpMessage::HttpError(status));
+
+
+    msg->AddPairL((TDesC8&) *tempBuf, (TDesC8&) KNullDesC8());
+
+    CleanupStack::PopAndDestroy(tempBuf);
+    tempBuf=NULL;
+
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpResponseErrorL
+// HTTP response ERROR
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpResponseErrorL(
+                                    CUpnpHttpMessage *aMessage,
+                                    TInt aError )
+    {
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::HttpResponseErrorL(
+        aMessage->Sender(), aError );
+    CleanupStack::PushL(msg);
+
+    msg->SetSessionId( aMessage->SessionId() );
+    msg->SetDestinationPathL(aMessage->SenderPath());
+    msg->SetSenderPathL(aMessage->DestinationPath());
+
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::HttpResponseErrorL
+// HTTP response ERROR
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::HttpResponseErrorL(
+                            const TInetAddr& aDestination,
+                            TInt aError )
+    {
+    CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL(aDestination);
+    CleanupStack::PushL(msg);
+    THttpStatusCode error = (THttpStatusCode) aError;
+
+    HBufC8* tempBuf;
+    tempBuf=HBufC8::NewLC((CUpnpHttpMessage::HttpError(error)).Length()+KMaxIntegerLength);
+    tempBuf->Des().Zero();
+
+    tempBuf->Des().Num(aError);
+    tempBuf->Des().Append( KSpace );
+    tempBuf->Des().Append(CUpnpHttpMessage::HttpError(error));
+
+    HBufC8* tempBuf2;
+    tempBuf2=HBufC8::NewLC(tempBuf->Des().Length()+KHttp11().Length()+1);
+    tempBuf2->Des().Zero();
+    tempBuf2->Des().Append(KHttp11WithoutSpace());
+    tempBuf2->Des().Append(UpnpString::KSpace());
+    tempBuf2->Des().Append(*tempBuf);
+
+    msg->AddPairL((TDesC8&) *tempBuf2, (TDesC8&) KNullDesC8());
+
+    CleanupStack::PopAndDestroy(tempBuf2);
+    tempBuf2=NULL;
+
+    HBufC8* BodyBuf;
+    BodyBuf=HBufC8::NewLC( KUpnpBodyMsgError1().Length() +
+                           KUpnpBodyMsgError2().Length() +
+                           KUpnpBodyMsgError3().Length() +
+                           ( tempBuf->Length() * 2 ) );
+    BodyBuf->Des().Zero();
+    BodyBuf->Des().Append(KUpnpBodyMsgError1());
+    BodyBuf->Des().Append(*tempBuf);
+    BodyBuf->Des().Append(KUpnpBodyMsgError2());
+    BodyBuf->Des().Append(CUpnpHttpMessage::HttpError(error));
+    BodyBuf->Des().Append(KUpnpBodyMsgError3());
+
+    msg->SetBodyL( *BodyBuf);
+
+    CleanupStack::PopAndDestroy(BodyBuf);
+    CleanupStack::PopAndDestroy(tempBuf);
+    tempBuf=NULL;
+    BodyBuf=NULL;
+
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::UpnpResponseErrorL
+// UPnP response ERROR
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::UpnpResponseErrorL(
+                            CUpnpHttpMessage* aMessage,
+                            TUpnpErrorCode aError )
+    {
+    CUpnpHttpMessage* msg = RUpnpHttpMessageFactory::UpnpResponseErrorL(
+        aMessage->Sender(), aError);
+    CleanupStack::PushL(msg);
+
+    msg->SetSessionId(aMessage->SessionId());
+    msg->SetDestinationPathL(aMessage->SenderPath());
+    msg->SetSenderPathL(aMessage->DestinationPath());
+
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::UpnpResponseErrorL
+// UPnP response ERROR
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpHttpMessage* RUpnpHttpMessageFactory::UpnpResponseErrorL(
+                            const TInetAddr& aDestination,
+                            TUpnpErrorCode aError )
+    {
+    CUpnpHttpMessage* msg = CUpnpHttpMessage::NewL(aDestination);
+    CleanupStack::PushL(msg);
+
+    TBuf8<KMaxIntegerLength> num;
+    num.Num((TInt)aError);
+
+    HBufC8* tempBuf;
+    tempBuf=HBufC8::NewLC((CUpnpHttpMessage::UpnpError(aError)).Length()
+                            +KMaxIntegerLength+KHttp11().Length()+1);
+    tempBuf->Des().Zero();
+    tempBuf->Des().Append(KHttp11WithoutSpace());
+    tempBuf->Des().Append(UpnpString::KSpace());
+    tempBuf->Des().Append(num);
+    tempBuf->Des().Append( KSpace );
+    tempBuf->Des().Append(CUpnpHttpMessage::UpnpError(aError));
+
+    msg->AddPairL((TDesC8&) *tempBuf, (TDesC8&) KNullDesC8());
+
+    CleanupStack::PopAndDestroy(tempBuf);
+    tempBuf=NULL;
+
+    CleanupStack::Pop(msg);
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpHttpMessageFactory::SetHostHeaderL
+// Sets Host HTTP header to given message basing on given destinstion address.
+// -----------------------------------------------------------------------------
+//
+void RUpnpHttpMessageFactory::SetHostHeaderL( CUpnpHttpMessage* aMessage, const TInetAddr& aDestination )
+    {
+
+    TInt port = aDestination.Port();
+    TBuf8<UpnpString::KShortStringLength> addrBuf;
+    TBuf8<UpnpString::KMaxTUintLength> portBuf;
+    portBuf.Num( port );
+
+    CUpnpHttpMessage::AddrOutput(aDestination, addrBuf);
+
+    HBufC8* hostBuf=HBufC8::NewLC(addrBuf.Length() + KColon().Length() + portBuf.Length());
+    TPtr8 hostPtr = hostBuf->Des();
+    hostPtr.Append( addrBuf );
+    hostPtr.Append( KColon() );
+    hostPtr.Append( portBuf );
+
+    aMessage->AddPairL(UpnpSSDP::KHdrHost(),*hostBuf);
+
+    CleanupStack::PopAndDestroy( hostBuf );
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpipaddressutils.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,246 @@
+/** @file
+* 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:  IP Address utils
+*
+*/
+
+
+// INCLUDES
+#include <e32base.h>
+#include <commdb.h>
+#include <in_sock.h>
+#include "upnpipaddressutils.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+
+// ================= MEMBER FUNCTIONS =======================
+namespace UpnpIpAddressUtil
+    {
+// -----------------------------------------------------------------------------
+// UpnpIpAddressUtil::GetIfNameForIap
+// Reads the IF name for the specified IAP ID.
+// -----------------------------------------------------------------------------
+//
+    EXPORT_C void GetIfNameForIap( TUint32 aIapId, TDes& aIfName )
+        {
+        CCommsDatabase* theDb;
+        TUint32 iapId;
+        TBool nameNotFound = ETrue;
+
+        // First zero the name. If IF Name is not found, it will be zero lenght.
+        aIfName.Zero();
+
+        // Open CommDB
+        theDb = CCommsDatabase::NewL( EDatabaseTypeIAP );
+        CleanupStack::PushL( theDb );
+
+        theDb->ShowHiddenRecords();
+
+        // Open IAP table and find the IAP ID given as method parameter.
+        CCommsDbTableView* view = theDb->OpenTableLC( TPtrC( IAP ) );
+        TInt res = view->GotoFirstRecord();
+        while ( res == KErrNone && nameNotFound )
+            {
+            // Read IAP ID and match it to the one given as parameter
+            view->ReadUintL( TPtrC( COMMDB_ID ), iapId );
+            if ( iapId == aIapId )
+                {
+                // Right IAP found, read bearer ID and type
+                TUint32 iapBearerId;
+                view->ReadUintL( TPtrC( IAP_BEARER ),iapBearerId );
+                view->ReadTextL( TPtrC( IAP_BEARER_TYPE ),aIfName );
+
+                // Find the correct bearer table specified by bearer type
+                CCommsDbTableView* ifView = theDb->OpenTableLC( 
+                    TPtrC( aIfName ) );
+                TInt bearerRes = ifView->GotoFirstRecord();
+                TUint32 bearerId;
+                while ( bearerRes == KErrNone && nameNotFound )
+                    {
+                    ifView->ReadUintL( TPtrC( COMMDB_ID ), bearerId );
+                    // Find out right bearer record and read IF name
+                    if ( bearerId == iapBearerId )
+                        {
+                        // Read the IF name, it is returned in the method
+                        // parameter
+                        ifView->ReadTextL( TPtrC( IF_NAME ),aIfName );
+                        nameNotFound = EFalse;
+                        }
+                    // Bearer id does not match, check next record
+                    else
+                        {
+                        bearerRes = ifView->GotoNextRecord();
+                        }
+                    }
+                CleanupStack::PopAndDestroy( ifView );
+                }
+            // IAP id does not match, check next record
+            else
+                {
+                res = view->GotoNextRecord();
+                }
+            }
+        CleanupStack::PopAndDestroy( view );
+        CleanupStack::PopAndDestroy( theDb );
+        }
+
+// -----------------------------------------------------------------------------
+// UpnpFileUtil::MatchIfNameWithIpInterface
+// Matches IF name with IP address of the TCP/IP stack interfaces.
+// -----------------------------------------------------------------------------
+//
+    EXPORT_C TInetAddr MatchIfNameWithIpInterface( RSocketServ& aSocketServer,
+                                                   TDesC& aIfName,
+                                                   TInt& aInterfaceIndex )
+        {
+        // Buffer for IP address
+        const TUint KAddrOutputLength = 50;
+        TBuf<KAddrOutputLength> address;
+        TPckgBuf<TSoInetInterfaceInfo> info;
+        TInetAddr localIpAddress;        
+        TInetAddr autoIpAddress;
+        TInt autoIfIndex = 0;
+        RSocket sock;
+        TBool autoIpFound = EFalse;
+        TBool ipFound = EFalse;
+
+        _LIT( KUdpProtocol, "udp" );
+        _LIT( KLoop4Interface, "loop4" );
+        _LIT( KLoop6Interface, "loop6" );
+        _LIT( KNoAddress, "0.0.0.0");
+        _LIT( KLocalHost, "127.0.0.1");
+        _LIT( KWlanIPv6IfSearchString, "wlan6[*");
+        _LIT( KWlanIPv4IfSearchString, "wlan[*");
+        _LIT( KWlanIfMatchString, "wlan*");
+        _LIT( KEtherIfSearchString, "eth[*");
+        _LIT( KEtherIfMatchString, "eth*");
+        // BT PAN is the same for both info and NIF name
+        _LIT( KBtPanIfSearchString, "btpannif*");
+        _LIT( KAutoIpMatch, "169.254.*");
+        
+        //the default interface index
+        aInterfaceIndex = 0;
+        
+        TInt ret= sock.Open( aSocketServer, KUdpProtocol );
+        if ( KErrNone == ret )
+            {
+            ret = sock.SetOpt( KSoInetEnumInterfaces, KSolInetIfCtrl );
+            }
+
+        if ( KErrNone == ret )
+            {
+            while( KErrNone == sock.GetOpt( 
+                       KSoInetNextInterface, KSolInetIfCtrl, info ) )
+                {
+
+                // If state is up and name is not empty, loop4 or loop6, 
+                // then get the address
+                if ( ( EIfUp == info().iState ) &&
+                     ( 0 != info().iName.Length() ) &&
+                     ( 0 != info().iName.Match( KLoop4Interface ) ) && 
+                     ( 0 != info().iName.Match( KLoop6Interface ) ) )
+                    {
+                    // Check if we have valid IP
+                    address.Zero();
+                    info().iAddress.Output( address );
+
+                    if ( ( 0 < address.Length() ) && 
+                         ( 0 != address.Match( KNoAddress ) ) &&
+                         ( 0 != address.Match( KLocalHost ) ) )
+                        {
+                        
+                        // read index of interface 
+                                        
+                        TPckgBuf<TSoInetIfQuery> query;
+    					query().iName = info().iName;
+    					
+    					TInt index;
+    					ret=sock.GetOpt(KSoInetIfQueryByName, KSolInetIfQuery, query);
+    					if(KErrNone==ret)
+    					    {
+    					    index = query().iIndex;
+                   
+                            // For ethernet, WLAN and BT PAN interfaces, 
+                            // change the match string to suit right interfaces
+                            if ( 0 <= info().iName.MatchC( KEtherIfSearchString ) )
+                                {
+                                // Set the IF name for ETH Match operation below.
+                                info().iName.Copy( KEtherIfMatchString );
+                                }
+                            else if ( 0 <= info().iName.MatchC( 
+                                KWlanIPv4IfSearchString ) )
+                                {
+                                // Set the IF name for WLAN Match operation below.
+                                info().iName.Copy( KWlanIfMatchString );
+                                }
+                            else if ( 0 <= info().iName.MatchC( 
+                                    KBtPanIfSearchString ) )
+                                {
+                                // Set the IF name for BT PAN Match operation below.
+                                info().iName.Copy( KBtPanIfSearchString );
+                                }
+
+                            // Exlude IPv6 addresses, they are not supported.
+                            // If IF name matches with the one given as parameter,
+                            // then we have the same interface with IP.
+                            if ( ( 0 > info().iName.MatchC( KWlanIPv6IfSearchString ) ) &&
+                                 ( 0 <= aIfName.MatchC( info().iName ) ) )
+                                {
+                                // If the address is auto-ip, check whether there 
+                                // is also DHCP IP in the same interface.
+                                if ( 0 <= address.Match( KAutoIpMatch ) )
+                                    {
+                                    autoIpFound = ETrue;
+                                    autoIpAddress = info().iAddress;
+                                    autoIpAddress.ConvertToV4();
+                                    autoIfIndex = index;
+                                    }
+                                // Other than auto IP
+                                else
+                                    {
+                                    ipFound = ETrue;
+                                    localIpAddress = info().iAddress;
+                                    // we're using ipv4 addresses
+                                    localIpAddress.ConvertToV4();
+                                    aInterfaceIndex = index;
+                                    }
+                                }
+    					    }
+                        }
+                    }
+                }
+            }
+        sock.Close();
+
+        // If only auto-IP was found, then return it.
+        // If only DHCP IP was found or also auto-IP, then return the
+        // DHCP IP which is already placed in localIpAddress variable.
+        // It is not possible that there is no IP as the connection has
+        // been started already by the UPnP application and this method can't
+        // be called if there is no connection.
+        if ( !ipFound && autoIpFound )
+            {
+            localIpAddress = autoIpAddress;
+            aInterfaceIndex = autoIfIndex;
+            }
+
+        address.Zero();
+        localIpAddress.Output( address );
+
+        // return the address
+        return localIpAddress;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnplist.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,122 @@
+/** @file
+* 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:  CUpnpHttpHeaderList
+*
+*/
+
+
+// INCLUDES
+#include "upnplist.h"
+
+// -----------------------------------------------------------------------------
+// C++ default constructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpHeaderList::CUpnpHttpHeaderList() : iHeaderList( 4 )
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// C++ default destructor.
+// -----------------------------------------------------------------------------
+//
+CUpnpHttpHeaderList::~CUpnpHttpHeaderList()
+	{
+	iHeaderList.Close();
+	}
+
+// -----------------------------------------------------------------------------
+// Method deletes all objects from the list.
+// -----------------------------------------------------------------------------
+//
+
+void CUpnpHttpHeaderList::DeleteObjects()
+    {
+	TInt size = Count();
+	for ( int i = 0; i < size; i++ )
+	    {
+		if ( iHeaderList[i] != NULL )
+	    	{
+			CUpnpHttpHeader* t = iHeaderList[i];
+			delete t;
+			t = NULL;
+		    }
+	    }
+    }
+
+// -----------------------------------------------------------------------------
+// Returns the number of elements in list.
+// -----------------------------------------------------------------------------
+//
+void CUpnpHttpHeaderList::AddL( const CUpnpHttpHeader* aHeader )
+    {
+	iHeaderList.AppendL( aHeader );
+    }
+
+// -----------------------------------------------------------------------------
+// Returns the number of elements in list.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpHttpHeaderList::Remove( const CUpnpHttpHeader* aHeader )
+    {
+	TInt index = iHeaderList.Find( aHeader );
+	if (index >= 0 )
+        {
+	    iHeaderList.Remove( index );
+	    iHeaderList.Compress();
+        }
+    }
+	 
+// -----------------------------------------------------------------------------
+// Returns the number of elements in list.
+// -----------------------------------------------------------------------------
+//	 
+EXPORT_C CUpnpHttpHeader* CUpnpHttpHeaderList::First()
+    {
+	if ( Count() > 0 )
+	    {
+		return iHeaderList[0];
+	    }
+	return NULL;	
+    }
+
+// -----------------------------------------------------------------------------
+// Returns the number of elements in list.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpHttpHeaderList::Count() const
+	{
+	return iHeaderList.Count();	
+	}
+
+// -----------------------------------------------------------------------------
+// Goes to the next element on the list.
+// -----------------------------------------------------------------------------
+//	
+EXPORT_C CUpnpHttpHeader* CUpnpHttpHeaderList::Next( const CUpnpHttpHeader* aHeader )
+	{
+	TInt index = iHeaderList.Find( aHeader);
+	index++;
+	if ( Count() > index )
+        {
+		return iHeaderList[index];
+        }
+	else
+        {
+		return NULL;
+		}
+	}
+
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpmsearchtimer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,112 @@
+/** @file
+* 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:  CUpnpMSearchTimer
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "upnpnotifytimer.h"
+#include "upnpmsearchtimer.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpMSearchTimer::CUpnpMSearchTimer
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpMSearchTimer::CUpnpMSearchTimer(MUpnpNotifyTimerObserver* aObserver)
+            : CUpnpNotifyTimer(aObserver)
+	{
+	}
+// ----------------------------------------------------------------------------
+// CUpnpMSearchTimer::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpMSearchTimer* CUpnpMSearchTimer::NewL(MUpnpNotifyTimerObserver* aObserver, 
+                                const TDesC8& aTarget,
+                                const TDesC8& aMX)
+    {
+    CUpnpMSearchTimer* self  = CUpnpMSearchTimer::NewLC(aObserver,aTarget,aMX);
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpMSearchTimer::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpMSearchTimer* CUpnpMSearchTimer::NewLC(MUpnpNotifyTimerObserver* aObserver, 
+                                const TDesC8& aTarget,
+                                const TDesC8& aMX)
+    {
+    CUpnpMSearchTimer* self  = new (ELeave) CUpnpMSearchTimer(aObserver);
+    CleanupStack::PushL( self );
+    self->ConstructL(aTarget, aMX);
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpMSearchTimer::ConstructL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+void CUpnpMSearchTimer::ConstructL(const TDesC8& aTarget,
+                                const TDesC8& aMX)
+    {
+    CUpnpNotifyTimer::ConstructL();
+    iTarget = aTarget.AllocL();
+    iMXString = aMX.AllocL();
+    TLex8 tmp(*iMXString);
+    iMX = tmp;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpMSearchTimer::~CUpnpMSearchTimer
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpMSearchTimer::~CUpnpMSearchTimer()
+    {
+    delete iTarget;
+    delete iMXString;
+    }
+
+EXPORT_C TInt CUpnpMSearchTimer::GetNextValue()
+    {
+    TInt i;
+    TInt res = iMX.Val(i);
+    if(res)
+        {
+        return res;	        
+        }
+    for(;;)
+        {
+        if (!iMX.Get().IsDigit() || iMX.Get() == ',')
+            {
+            break;
+            }
+        }
+    return i;
+    }
+
+EXPORT_C TPtrC8 CUpnpMSearchTimer::GetTarget()
+    {
+    return *iTarget;
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpnotifytimer.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,216 @@
+/** @file
+* 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:  CUpnpNotifyTimer
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "upnpnotifytimer.h"
+#define KLogFile _L("DLNAWebServer.txt")
+#include "upnpcustomlog.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::CUpnpNotifyTimer
+// C++ default constructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpNotifyTimer::CUpnpNotifyTimer(MUpnpNotifyTimerObserver* aObserver)
+	: CActive(EPriorityStandard)
+    {
+    CActiveScheduler::Add(this);
+    iObserver = aObserver;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpNotifyTimer::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpNotifyTimer* CUpnpNotifyTimer::NewL(MUpnpNotifyTimerObserver* aObserver)
+    {
+    CUpnpNotifyTimer* self  = new (ELeave) CUpnpNotifyTimer(aObserver);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpNotifyTimer::ConstructL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+void CUpnpNotifyTimer::ConstructL()
+    {
+    TInt err = iTimer.CreateLocal();
+    if ( KErrNone != err )
+        {
+        LOGS1("CUpnpNotifyTimer::CUpnpNotifyTimer() CreateLocal FAILED: %d", err );
+        User::Leave( err );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::~CUpnpNotifyTimer
+// C++ default destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpNotifyTimer::~CUpnpNotifyTimer()
+    {
+    iObserver=NULL;
+    Cancel();
+    iTimer.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::After
+// Starts timer
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpNotifyTimer::After( TInt aInterval, TBool /*aUnused*/ )
+    {
+    Start( TTimeIntervalMicroSeconds32( aInterval ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::After
+// Starts timer
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpNotifyTimer::After( TTimeIntervalMicroSeconds32 aInterval,
+                                  TBool /*aUnused*/ )
+    {
+    Start( aInterval );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::AfterSeconds
+// Start timer
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpNotifyTimer::AfterSeconds( TInt aIntervalInSeconds )
+    {
+    if( !IsActive() )
+        {
+        ASSERT( 0 == iIterationsToRun );
+        TInt secondsToWait = aIntervalInSeconds;
+        if ( aIntervalInSeconds > KOneIterationSeconds )
+            {
+            iIterationsToRun = aIntervalInSeconds / KOneIterationSeconds;
+            secondsToWait = aIntervalInSeconds % KOneIterationSeconds;
+            }
+        iTimer.After(  iStatus, TTimeIntervalMicroSeconds32( secondsToWait * KSecond ) );
+        SetActive();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::Start
+// Start timer
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpNotifyTimer::Start( TTimeIntervalMicroSeconds32 aInterval,
+                                  TBool /*aUnused*/ )
+    {
+    if ( !IsActive() )
+        {
+        ASSERT( 0 == iIterationsToRun );
+        iTimer.After( iStatus, aInterval );
+        SetActive();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::RunL
+// Timer RunL
+// -----------------------------------------------------------------------------
+//
+void CUpnpNotifyTimer::RunL()
+    {
+    LOGS1( "CUpnpNotifyTimer::RunL() iStatus: %d", iStatus.Int() );
+	User::LeaveIfError(iStatus.Int());
+
+    if ( iIterationsToRun > 0 )
+        {
+        StartNextIteration();
+        }
+    else
+        {
+        if ( iObserver )
+            {
+        	iObserver->TimerEventL( this );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::StartNextIteration
+// only for internal use decrease repeat counter and
+// waits for KOneIterationSeconds seconds
+// This function should be run when object isn't active.
+// --------------------------------------------------------------------- --------
+//
+void CUpnpNotifyTimer::StartNextIteration()
+    {
+    ASSERT( !IsActive() );
+    iIterationsToRun--;
+    iTimer.After( iStatus,
+    TTimeIntervalMicroSeconds32( KOneIterationSeconds * KSecond ) );
+    SetActive();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::RunError
+// RunError in case RunL leaves.
+// -----------------------------------------------------------------------------
+//
+TInt CUpnpNotifyTimer::RunError( TInt aError )
+    {
+    LOGS1("CUpnpNotifyTimer::RunError, error %d", aError);
+    iObserver->TimerEventError( this, aError );
+    iIterationsToRun = 0;
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::DoCancel
+// Timer DoCanel for active timers
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpNotifyTimer::DoCancel()
+    {
+    iIterationsToRun = 0;
+    iTimer.Cancel();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpNotifyTimer::CompleteOneselfImmediate
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpNotifyTimer::CompleteOneselfImmediate()
+    {
+    if ( !IsActive() )
+        {
+        TRequestStatus* status = &iStatus;
+        User::RequestComplete( status, KErrNone );
+        SetActive();
+        }
+    }
+
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpsessionbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,84 @@
+/** @file
+* 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:  Implementation of RUpnpSessionBase
+*
+*/
+
+#include "upnpsessionbase.h"
+// ======== LOCAL FUNCTIONS ========
+#include "upnpcustomlog.h"
+
+// -----------------------------------------------------------------------------
+// StartServer
+// Static method to start the server.
+// Start the server process. Simultaneous launching
+// of two such processes should be detected when the second one attempts to
+// create the server object, failing with KErrAlreadyExists.
+// -----------------------------------------------------------------------------
+//
+static TInt StartServer( TUid aUid3, const TDesC& aFileName )
+    {
+    const TUidType serverUid( KNullUid, KNullUid, aUid3 );
+    RProcess server;
+    TInt r = server.Create( aFileName, KNullDesC, serverUid );
+    if ( r != KErrNone )
+        {
+        return r;
+        }
+    TRequestStatus stat;
+    server.Rendezvous( stat );
+    if ( stat != KRequestPending )
+        {
+        server.Kill( 0 ); // abort startup
+        }
+    else
+        {
+        server.Resume(); // logon OK - start the server
+        }
+    User::WaitForRequest( stat ); // wait for start or death
+    // we can't use the 'exit reason' if the server panicked as this
+    // is the panic 'reason' and may be '0' which cannot be distinguished
+    // from KErrNone
+    r = (server.ExitType() == EExitPanic) ? KErrGeneral : stat.Int();
+    server.Close();
+    return r;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpSessionBase::Connect
+// Connect to the server, attempting to start it if necessary
+// -----------------------------------------------------------------------------
+EXPORT_C TInt RUpnpSessionBase::Connect( const TDesC& aServerName, TVersion aServerVersion,
+    TInt aServerMessageSlots, TInt aServerStartRetryCount,
+    const TDesC& aServerFileName, TUid aServerUid3 )
+    {
+    TInt retry = aServerStartRetryCount;
+    for ( ;; )
+        {
+        TInt r = CreateSession( aServerName, aServerVersion, aServerMessageSlots );
+        if ( r != KErrNotFound && r != KErrServerTerminated )
+            {
+            return r;
+            }
+        if ( --retry == 0 )
+            {
+            return r;
+            }
+        r = StartServer( aServerUid3, aServerFileName );
+        if ( r != KErrNone && r != KErrAlreadyExists )
+            {
+            return r;
+            }
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpssdpmessage.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,871 @@
+/** @file
+* 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:  Represents SSDP message
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpssdpmessage.h"
+#include "upnpcons.h"
+#include "upnplist.h"
+
+
+// LITERALS
+using namespace UpnpSSDP;
+using namespace UpnpHTTP;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::CUpnpSsdpMessage
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUpnpSsdpMessage::CUpnpSsdpMessage()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::ConstructL(TRequestType aRequestType)
+    {
+
+    switch ( aRequestType )
+        {
+        case ERequestNotify:
+            AddPairL( KMethodNotify, KNullDesC8 );
+            AddPairL( KHdrLocation, KNullDesC8 );
+            AddPairL( KHdrHost, KDefaultHost );
+            AddPairL( UpnpSSDP::KHdrServer, KNullDesC8 );
+            AddPairL( KHdrNotificationType,(TDesC8&) KNotificationAlive );
+            AddPairL( KHdrUuid, KNullDesC8 );
+            AddPairL( UpnpSSDP::KHdrCacheControl, KNullDesC8 );
+            AddPairL( KHdrSearchTarget, KNullDesC8 );
+            break;
+        case ERequestByeBye:
+            AddPairL( KMethodNotify, KNullDesC8 );
+            AddPairL( KHdrHost, KDefaultHost );
+            AddPairL( KHdrSearchTarget, KNullDesC8 );
+            AddPairL( KHdrNotificationType, KNotificationByebye );
+            AddPairL( KHdrUuid, KNullDesC8 );
+            
+            break;
+        case ERequestSearch:
+            AddPairL( KMethodMSearch, KNullDesC8 );
+            AddPairL( KHdrHost, KDefaultHost );
+            AddPairL( KHdrMan, KNotificationDiscover );
+            AddPairL( KHdrMx, KNullDesC8 );
+            AddPairL( KHdrSt, KNullDesC8 );
+            break;
+        case ERequestSearchResponse:
+            {
+            AddPairL( UpnpHTTP::KHTTPOk, KNullDesC8 );
+            AddPairL( UpnpSSDP::KHdrCacheControl, KNullDesC8 );
+            AddPairL( UpnpHTTP::KHdrDate, KNullDesC8 );
+            AddPairL( UpnpHTTP::KHdrExtWithoutColon, KNullDesC8 );
+            AddPairL( KHdrLocation, KNullDesC8 );
+            AddPairL( UpnpSSDP::KHdrServer, KNullDesC8 );
+            AddPairL( KHdrSt, KNullDesC8 );
+            AddPairL( KHdrUuid, KNullDesC8 );
+            
+            TTime now;
+            now.UniversalTime();
+            
+            this->SetMessageDateL( now );
+            }
+            break;
+        default:
+            break;
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSsdpMessage* CUpnpSsdpMessage::NewL( TInetAddr& aAddr, 
+                                  		   TRequestType aRequestType )
+    {
+    CUpnpSsdpMessage* self = new (ELeave) CUpnpSsdpMessage();
+    CleanupStack::PushL(self );
+    self->HttpConstructL( aAddr );
+    self->ConstructL(aRequestType );
+    CleanupStack::Pop(self );
+    
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSsdpMessage* CUpnpSsdpMessage::NewL( TRequestType aRequestType )
+    {
+    CUpnpSsdpMessage* self = new (ELeave) CUpnpSsdpMessage();
+    CleanupStack::PushL(self );
+    
+    TInetAddr tempAddr = TInetAddr(INET_ADDR(0,0,0,0),0 );
+    self->HttpConstructL( tempAddr );
+    self->ConstructL( aRequestType );
+
+    CleanupStack::Pop( self );
+    
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSsdpMessage* CUpnpSsdpMessage::NewL(TDesC8& aBuffer, TInetAddr& aAddr)
+    {
+    CUpnpSsdpMessage* self = new (ELeave) CUpnpSsdpMessage();
+    CleanupStack::PushL(self);
+    aAddr.SetFamily(KAfInet);
+    self->HttpConstructL( aAddr );
+    self->ParseL(aBuffer);
+    CleanupStack::Pop(self);
+    
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CCSsdpMessage::~CUpnpSsdpMessage
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CUpnpSsdpMessage::~CUpnpSsdpMessage()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AddHostL
+// Add host.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpMessage::AddHostL(TDesC8& aHost)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name().CompareF( KHdrHost() )== 0 )
+            {
+            hdr->SetValueL(aHost);
+            return;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    // header not found, adding it.
+    AddPairL( KHdrHost(), aHost );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AddUsnL
+// Add USN.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::AddUsnL(TDesC8& aUsn)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name().CompareF( KHdrUuid )== 0 )
+            {
+            hdr->SetValueL(aUsn);
+            return;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    // header not found, adding it.       
+    AddPairL( KHdrUuid(), aUsn );        
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AddCacheControlL
+// Add cache control.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::AddCacheControlL(TDesC8& aMaxAge)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name().CompareF( UpnpSSDP::KHdrCacheControl )== 0 )
+            {
+            hdr->SetValueL( (TDesC8&) aMaxAge);
+            return;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    // header not found, adding it.        
+    AddPairL( UpnpSSDP::KHdrCacheControl(), aMaxAge );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AddLocationL
+// Add location.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::AddLocationL(TDesC8& aDescriptionLocation)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name ().CompareF( KHdrLocation )== 0 )
+            {
+            hdr->SetValueL(aDescriptionLocation);
+            return;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    // header not found, adding it.        
+    AddPairL( KHdrLocation(), aDescriptionLocation );        
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AddSearchTargetStringL
+// Add search string.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::AddSearchTargetStringL(TDesC8& aSt)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name ().CompareF( KHdrSt )== 0 )
+            {
+            hdr->SetValueL(aSt);
+            return;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    // header not found, adding it.        
+    AddPairL( KHdrSt(), aSt );        
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AddServerL
+// Add server.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::AddServerL(TDesC8& aServerType)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name ().CompareF( UpnpSSDP::KHdrServer )== 0 )
+            {
+            hdr->SetValueL(aServerType);
+            return;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    // header not found, adding it.        
+    AddPairL( UpnpSSDP::KHdrServer(), aServerType );            
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AddNotificationTypeL
+// Add notification type.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::AddNotificationTypeL(TDesC8& aNT)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name ().CompareF( KHdrSearchTarget )== 0 )
+            {
+            hdr->SetValueL(aNT);
+            return;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    // header not found, adding it.        
+    AddPairL( KHdrSearchTarget(), aNT );         
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AddMxL
+// Add MX.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpMessage::AddMxL(TDesC8& aMx)
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name ().CompareF( KHdrMx )== 0 )
+            {
+            hdr->SetValueL(aMx);
+            return;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    // header not found, adding it.        
+    AddPairL( KHdrMx(), aMx );            
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::SearchTarget
+// Search target.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSsdpMessage::SearchTarget()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name().CompareF ( KHdrSt ) == 0 )
+            {
+            
+            if ( hdr->Value().CompareF(KSearchTargetAll) == 0 )
+                {
+                return ESsdpAll;
+                }
+            
+            else if ( hdr->Value().CompareF(KUPnPRootDevice) == 0 )
+                {
+                return EUPnPRootDevice;
+                }
+            else if ( hdr->Value().FindF(KUPnPUuid) == 0 )
+                {
+                return EDeviceUid;
+                }
+            else if ( hdr->Value().FindF(KUPnPDeviceSchema) == 0 )
+                {
+                return EDeviceType;
+                }
+            else if ( hdr->Value().FindF(KUPnPServiceSchema) == 0 )
+                {
+                return EServiceType;
+                }
+            else
+                {
+                return ESsdpNone;
+                }		
+            
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }	
+    return ESsdpNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::IsSsdpAlive
+// Return wheter SSDP is alive.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSsdpMessage::IsSsdpAlive()
+    {
+   
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+
+    if (IsSsdpResponse())
+        {
+        return ETrue;
+        }
+    
+    while ( hdr)
+        {
+        if ( hdr->Name().CompareF ( KHdrNotificationType ) == 0 )
+            {
+            if ( hdr->Value().CompareF ( KNotificationAlive ) == 0 )
+                {
+                return ETrue;
+                }   
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::IsSsdpByebye
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSsdpMessage::IsSsdpByebye()
+    {
+    
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr)
+        {
+        if ( hdr->Name().CompareF( KHdrNotificationType ) == 0 )
+            {
+            if ( hdr->Value().CompareF( KNotificationByebye ) == 0 )
+                {
+                return ETrue;
+                }
+            
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::IsSsdpMSearch
+// Return whether SSP search is true or false.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSsdpMessage::IsSsdpMSearch()
+    {
+    return Method().CompareF( UpnpSSDP::KMSearch() ) == 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::IsSsdpResponse
+// Return whether .
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSsdpMessage::IsSsdpResponse()
+    {  
+    return Method().CompareF( KHttp11WithoutSpace() ) == 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::IsSearchAll
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSsdpMessage::IsSearchAll()
+    {
+    
+    TBool IsSearch=IsSsdpMSearch();
+    
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( ( IsSearch ) && ( hdr->Name().CompareF ( KHdrSt ) == 0 )
+                && ( hdr->Value().CompareF ( KSearchTargetAll ) == 0 ) )
+            {
+            return ETrue;
+            }
+        
+        hdr = iHeaderList->Next(hdr);	
+        }
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::IsSearchDevice
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSsdpMessage::IsSearchDevice()
+    {
+    TBool IsSearch=IsSsdpMSearch();
+    
+    if (IsSearch)
+        {
+        CUpnpHttpHeader* hdr = iHeaderList->First();
+        
+        while ( hdr )
+            {
+            if ( hdr->Name().CompareF ( KHdrSt ) == 0 )
+                {
+                if ( hdr->Value().FindF(KUPnPDeviceSchema) == 0 )
+                    {
+                    return ETrue;
+                    }    
+                }
+                
+            hdr = iHeaderList->Next(hdr);	
+            }
+        }
+    
+    return EFalse;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::IsSearchService
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSsdpMessage::IsSearchService()
+    {
+    TBool IsSearch=IsSsdpMSearch();
+    
+    if (IsSearch)
+        {
+        CUpnpHttpHeader* hdr = iHeaderList->First();
+        
+        while ( hdr )
+            {
+            if ( hdr->Name().CompareF ( KHdrSt ) == 0 )
+                {
+                if ( hdr->Value().FindF( KUPnPServiceSchema ) == 0 )
+                    {
+                    return ETrue;
+                    }		 
+                }
+        
+            hdr = iHeaderList->Next(hdr);	
+            }
+        }
+    
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::St
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpSsdpMessage::St()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    TBool valuefound=EFalse;
+    
+    while ( !valuefound && hdr )
+        {
+        if ( hdr->Name().FindF(KHdrSt()) == 0 && hdr->Name().Length() == KHdrSTLen )
+            {
+            return hdr->Value();
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    return (TDesC8&) KNullDesC8();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::Nt
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpSsdpMessage::Nt()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    TBool valuefound=EFalse;
+    
+    while ( !valuefound && hdr )
+        {
+        if ( hdr->Name().CompareF( KHdrSearchTarget ) == 0 )
+            {
+            return hdr->Value();
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    
+    return (TDesC8&) KNullDesC8();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::Usn
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpSsdpMessage::Usn()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    TBool valuefound=EFalse;
+    
+    while ( !valuefound && hdr )
+        {
+        if ( hdr->Name().CompareF( KHdrUuid ) == 0 )
+            {
+            return hdr->Value();
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    
+    return (TDesC8&) KNullDesC8();
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::Nts
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpSsdpMessage::Nts()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    TBool valuefound=EFalse;
+    
+    while ( !valuefound && hdr )
+        {
+        if ( hdr->Name().CompareF(KHdrNotificationType) == 0 )
+            {
+            return hdr->Value();
+            }
+        hdr = iHeaderList->Next(hdr);
+        }
+    
+    return (TDesC8&) KNullDesC8();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::ParseL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::ParseL(TDesC8& aBuffer)
+    {
+    TInt index = 1,indexLWS=0, indexCRLF=0;
+    TBool FirstLine=ETrue;
+    TPtrC8 finderIndexPointer;
+    TPtrC8 tempHeaderPointer;
+    HBufC8* tempHeaderBuffer = aBuffer.AllocLC();
+    TInt endOfHeader=0;
+    endOfHeader = aBuffer.Find(UpnpString::KDoubleLineFeed);
+	if( endOfHeader == KErrNotFound )
+	{
+		User::Leave(KErrAbort);
+	}
+    tempHeaderPointer.Set(aBuffer.Left(endOfHeader));
+    
+    while ( index != KErrNotFound && index != KErrNone )
+        {
+        //RFC822 3.2 field-name  =  1*<any CHAR, excluding CTLs, SPACE, and ":">
+        index = tempHeaderBuffer->Des().Find(UpnpString::KLineFeed);
+		indexLWS = FindLWS(tempHeaderPointer);
+		finderIndexPointer.Set(tempHeaderPointer);
+		indexCRLF = index;
+		while (indexCRLF == indexLWS && indexCRLF != KErrNotFound)
+		{
+			finderIndexPointer.Set(finderIndexPointer.Right(finderIndexPointer.Length()-(indexCRLF+3)));//3 = LWS
+			indexCRLF = finderIndexPointer.Find(UpnpString::KLineFeed);
+			//+3 - index skips the length of KLineFeed and parses further...
+			index += indexCRLF+3;
+			indexLWS = FindLWS(finderIndexPointer);
+		}
+
+        
+        if(index != KErrNotFound && index != KErrNone)
+            {
+            HBufC8* oneHeaderRow=NULL;
+            oneHeaderRow=HBufC8::NewLC(index);
+            oneHeaderRow->Des().Zero();
+            
+            TPtrC8 ptr;
+            ptr.Set(tempHeaderBuffer->Des().Left(index));
+            
+            oneHeaderRow->Des().Append(ptr);
+            
+            // To check if is the first line of message 
+            // (e.g. GET / HTTP 1.1 etc.)
+            if (FirstLine)
+                {
+                ParseHeaderRowL( (TDesC8&) *oneHeaderRow, ETrue);
+                FirstLine=EFalse;
+                }
+            else 
+                {
+                ParseHeaderRowL(*oneHeaderRow, EFalse);
+                }
+            
+            
+            CleanupStack::PopAndDestroy(); // oneHeaderRow
+            
+            // To delete one header row + "\r\n" = length+2 
+            // to prepare for next row.
+            tempHeaderBuffer->Des().Delete(0,index+2);
+            tempHeaderPointer.Set(tempHeaderBuffer->Des());
+            
+            
+            }
+        }
+    CleanupStack::PopAndDestroy(); // TempHeaderBuffer
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::IsSsdpNotify
+// Return whether SSDP notify is true or false.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSsdpMessage::IsSsdpNotify()
+    {
+    return Method().CompareF( UpnpSSDP::KNotify() ) == 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::Location
+// Return location.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TDesC8& CUpnpSsdpMessage::Location()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    while ( hdr )
+        {
+        if ( hdr->Name().CompareF(KHdrLocation) == 0 )
+            {
+            return hdr->Value();
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    
+    return (TDesC8&) KNullDesC8();	
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::Uuid
+// Return UUID.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtr8 CUpnpSsdpMessage::Uuid()
+    {
+    TPtrC8 usn = Usn();
+    
+    TInt sng = usn.Find(UpnpString::KColon);
+    TInt dbl = usn.Find(UpnpString::KDblColon);
+    
+    TPtr8 uuid(NULL, 0, 0);
+    if (dbl != KErrNotFound && dbl != sng)
+        {
+        TPtrC8 temp = usn.Mid(sng + 1, (dbl - sng) - 1);
+        uuid.Set((unsigned char*)temp.Ptr(), temp.Length(), temp.Length());
+        }
+    else
+        {
+        if (dbl == KErrNotFound)
+            {
+            TPtrC8 temp = usn.Right((usn.Length() - sng) - 1);
+            uuid.Set((unsigned char*)temp.Ptr(), temp.Length(), temp.Length());
+            }
+        else
+            {
+            TPtrC8 temp = usn.Left(dbl);
+            uuid.Set((unsigned char*)temp.Ptr(), temp.Length(), temp.Length());
+            }
+        }
+    return uuid;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::CacheControl
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSsdpMessage::CacheControl()
+    {
+    CUpnpHttpHeader* hdr = iHeaderList->First();
+    
+    TBool valuefound=EFalse;
+    
+    while ( !valuefound && hdr )
+        {
+        if ( hdr->Name().CompareF( UpnpSSDP::KHdrCacheControl() ) == KErrNone )
+            {
+            
+            TDesC8& value = hdr->Value();
+            
+            TInt index = value.FindF(KSsdpMaxAge());
+            TInt eqIndex = value.Find(UpnpString::KEqual());
+            
+            if (index != KErrNotFound && eqIndex!= KErrNotFound && index < eqIndex)
+                {
+                TLex8 num(value.Right((value.Length() 
+                    - UpnpString::KEqual().Length()) - eqIndex));
+                num.SkipSpace();
+                TInt cc;
+                TInt err( num.Val(cc) );
+                if ( ( cc < 0 ) || err )
+                    {
+                    return KDefaultMaxAgeValue;
+                    }
+                return cc;
+                }
+            return KDefaultMaxAgeValue;
+            }
+        hdr = iHeaderList->Next(hdr);	
+        }
+    return KDefaultMaxAgeValue;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::ToStringL
+// Convert headers to string.
+// -----------------------------------------------------------------------------
+//
+HBufC8* CUpnpSsdpMessage::ToStringL()
+    {
+    HBufC8* buffer=NULL;
+    buffer=HeadersToStringL();
+    
+    CleanupStack::PushL(buffer); 
+    
+    HBufC8* returnBuf = NULL;
+    //+2 bytes reserved for KLineFeed
+    returnBuf=HBufC8::NewLC(buffer->Des().Length() + 2);
+    
+    returnBuf->Des().Append(*buffer);
+    returnBuf->Des().Append(UpnpString::KLineFeed());
+
+    CleanupStack::Pop( returnBuf );
+    CleanupStack::PopAndDestroy( buffer );
+
+    return returnBuf;
+    }
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::AppendContentLengthToHeadersL
+// Overwrites the method from CUpnpHttpMessage. It is empty on purpose!.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSsdpMessage::AppendContentLengthToHeadersL(HBufC8*& /*aHeaders*/)
+	{
+	}
+// -----------------------------------------------------------------------------
+// CUpnpSsdpMessage::HttpConstructL
+// Constructor of HTTP message.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSsdpMessage::HttpConstructL(TInetAddr& aAddr)
+	{
+	CUpnpHttpMessage::ConstructL( aAddr, 0 );
+	}
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpssdpmessagefactory.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,143 @@
+/** @file
+* 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:  Produces SSDP messages
+*
+*/
+
+
+// INCLUDE FILES
+#include "upnpssdpmessagefactory.h"
+#include "upnpcons.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// RUpnpSsdpMessageFactory::AdvertiseAliveL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CSsdpAdvertise* RUpnpSsdpMessageFactory::AdvertiseAliveL( TDesC8& aLoc,
+                                                      TDesC8& aNt, 
+                                                      TDesC8& aUsn,
+                                                      TDesC8& aServerDesc )
+    {
+    CUpnpSsdpMessage* msg = CUpnpSsdpMessage::NewL( CUpnpSsdpMessage::ERequestNotify );
+    CleanupStack::PushL(msg);
+    
+    msg->AddHostL( (TDesC8&) UpnpSSDP::KDefaultHost);
+    msg->AddCacheControlL( (TDesC8&) UpnpSSDP::KDefaultMaxAge);
+    msg->AddLocationL(aLoc);
+    msg->AddNotificationTypeL(aNt);
+    msg->AddServerL(aServerDesc);
+    msg->AddUsnL(aUsn);
+    
+    CleanupStack::Pop(); // msg
+    
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpSsdpMessageFactory::AdvertiseByebyeL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CSsdpAdvertise* RUpnpSsdpMessageFactory::AdvertiseByebyeL( TDesC8& aNt,
+                                                      TDesC8& aUsn )
+    {
+    
+    CUpnpSsdpMessage* msg = CUpnpSsdpMessage::NewL(CUpnpSsdpMessage::ERequestByeBye);
+    CleanupStack::PushL(msg);
+    
+    msg->AddNotificationTypeL(aNt); 
+    msg->AddHostL( (TDesC8&) UpnpSSDP::KDefaultHost);
+    msg->AddUsnL(aUsn);
+    
+    CleanupStack::Pop(); // msg
+    
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpSsdpMessageFactory::SearchL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CSsdpSearch* RUpnpSsdpMessageFactory::SearchL( TDesC8& aTarget )
+    {
+    CUpnpSsdpMessage* msg = CUpnpSsdpMessage::NewL(CUpnpSsdpMessage::ERequestUndefined);
+    CleanupStack::PushL(msg);
+    
+    msg->AddPairL(UpnpSSDP::KMethodMSearch(), KNullDesC8());
+    msg->AddPairL(UpnpSSDP::KHdrMx(), UpnpSSDP::KDefaultResponseDelay());
+    msg->AddPairL(UpnpSSDP::KHdrSt(), aTarget);
+    msg->AddPairL(UpnpSSDP::KHdrHost(), (TDesC8&) UpnpSSDP::KDefaultHost);
+    msg->AddPairL(UpnpSSDP::KHdrMan(), UpnpSSDP::KNotificationDiscover());
+    CleanupStack::Pop(); // msg
+    
+    return msg;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpSsdpMessageFactory::SearchL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CSsdpSearch* RUpnpSsdpMessageFactory::SearchL( TDesC8& aTarget,
+                                           TDesC8& aMaximumWaitTime)
+    {
+    CUpnpSsdpMessage* msg = CUpnpSsdpMessage::NewL(CUpnpSsdpMessage::ERequestSearch);
+    CleanupStack::PushL(msg);
+    
+    msg->AddMxL(aMaximumWaitTime);	
+    msg->AddSearchTargetStringL(aTarget);
+    msg->AddHostL((TDesC8&) UpnpSSDP::KDefaultHost());
+    
+    CleanupStack::Pop(); // msg
+    return msg;
+    }
+
+// -----------------------------------------------------------------------------
+// RUpnpSsdpMessageFactory::ResponseL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CSsdpSearchResponse* RUpnpSsdpMessageFactory::ResponseL( TDesC8& aSt,
+                                                     TDesC8& aUsn,
+                                                     TDesC8& aLoc,
+                                                     TDesC8& aServerDesc )
+    {
+    
+    CUpnpSsdpMessage* msg = CUpnpSsdpMessage::NewL(CUpnpSsdpMessage::ERequestSearchResponse);
+    CleanupStack::PushL(msg);
+    
+    msg->AddCacheControlL( (TDesC8&) UpnpSSDP::KDefaultMaxAge);
+    // Date and EXT-header will be generated automatically.
+    msg->AddLocationL(aLoc);
+    msg->AddServerL(aServerDesc);
+    msg->AddSearchTargetStringL(aSt);
+    msg->AddUsnL(aUsn);
+    
+    CleanupStack::Pop(); // msg
+    
+    return msg;
+    
+    }
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpstring.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,844 @@
+/** @file
+* 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:  String handling
+*
+*/
+
+
+// INCLUDES
+#include <e32base.h>
+#include <charconv.h>
+#include <f32file.h>
+#include <s32mem.h>
+#include <escapeutils.h>
+#include "upnpcons.h"
+#include "upnpstring.h"
+#include "upnpcommonupnplits.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+namespace UpnpString
+    {
+    
+    // PR: following for optimized encode/decodexml functions    
+    _LIT8( KGtEntity,       "gt;");
+    _LIT8( KLtEntity,       "lt;");
+    _LIT8( KQuotEntity,     "quot;");
+    _LIT8( KAposEntity,     "apos;");
+    _LIT8( KAmpEntity,      "amp;");
+    
+    // for formatting a date string (in UT)
+    _LIT8( KDay1,"Mon");
+    _LIT8( KDay2,"Tue");
+    _LIT8( KDay3,"Wed");
+    _LIT8( KDay4,"Thu");
+    _LIT8( KDay5,"Fri");
+    _LIT8( KDay6,"Sat");
+    _LIT8( KDay7,"Sun");
+    
+    // for formatting a date string (in UT)
+    _LIT8( KMonth1,"Jan");
+    _LIT8( KMonth2,"Feb");
+    _LIT8( KMonth3,"Mar");
+    _LIT8( KMonth4,"Apr");
+    _LIT8( KMonth5,"May");
+    _LIT8( KMonth6,"Jun");
+    _LIT8( KMonth7,"Jul");
+    _LIT8( KMonth8,"Aug");
+    _LIT8( KMonth9,"Sep");
+    _LIT8( KMonth10,"Oct");
+    _LIT8( KMonth11,"Nov");
+    _LIT8( KMonth12,"Dec");
+    
+    //for formatting UT
+    _LIT8( KTimeGMT,"GMT");
+    
+    //for formatting UT
+    const static TInt KWidthFour = 4;
+    const static TInt KWidthTwo = 2;
+    
+    const static TInt KMaxEntityLength = 6; // e.g. &quot;
+    const static TInt KEntitiesCount = 5;
+    const static TReal KReallocRatio = 1.3;
+
+
+// -----------------------------------------------------------------------------
+// UpnpString::DeleteArray
+// 
+// -----------------------------------------------------------------------------
+//
+void DeleteArray(TAny* param);
+    
+// -----------------------------------------------------------------------------
+// UpnpString::IsColon
+// Is char colon.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool IsColon(const TUint8& aChar)
+    {
+    return aChar == ':';
+    }
+// -----------------------------------------------------------------------------
+// UpnpString::FromUnicodeL
+// Convert from unicode.
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C HBufC8* FromUnicodeL(const TDesC& aBuffer)
+    {
+    return EscapeUtils::ConvertFromUnicodeToUtf8L(aBuffer);
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::ToUnicodeL
+// Convert to unicode.
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C HBufC16* ToUnicodeL(const TDesC8& aBuffer)
+    {
+    return EscapeUtils::ConvertToUnicodeFromUtf8L(aBuffer);
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::CurrentDateLC
+// Return current date.
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C HBufC8* CurrentDateLC()
+    {
+    HBufC8* timeBuf = NULL;
+        
+    TTime time;    
+    time.UniversalTime();    
+    
+    timeBuf = GetDateLC(time);
+    
+    return timeBuf;
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::GetDateLC
+// Return current date.
+// -----------------------------------------------------------------------------
+//    
+HBufC8* GetDateLC(const TTime& aTime)
+    {
+    TDateTime datetime = aTime.DateTime();    
+    
+    HBufC8* timeBuf = HBufC8::NewLC(KDateTimeStringLen);
+    //weekday
+    timeBuf->Des().Copy(GetWeekday(aTime));
+    timeBuf->Des().Append(KComma);
+    timeBuf->Des().Append(KSpace);
+    
+    //date
+    //days numerated from 0 to 30, so +1
+    timeBuf->Des().AppendNumFixedWidth((datetime.Day()+1),EDecimal, KWidthTwo);
+    timeBuf->Des().Append(KSpace);
+    timeBuf->Des().Append(GetMonth(datetime));
+    timeBuf->Des().Append(KSpace);    
+    timeBuf->Des().AppendNumFixedWidth(datetime.Year(),EDecimal, KWidthFour);
+    timeBuf->Des().Append(KSpace);
+    
+    //time
+    timeBuf->Des().AppendNumFixedWidth((datetime.Hour()),EDecimal, KWidthTwo);
+    timeBuf->Des().Append(KColon);
+    timeBuf->Des().AppendNumFixedWidth((datetime.Minute()),EDecimal, KWidthTwo);
+    timeBuf->Des().Append(KColon);
+    timeBuf->Des().AppendNumFixedWidth((datetime.Second()),EDecimal, KWidthTwo);
+    timeBuf->Des().Append(KSpace);
+    
+    //GMT
+    timeBuf->Des().Append(KTimeGMT);    
+    
+    return timeBuf;
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::GetWeekday
+// 
+// -----------------------------------------------------------------------------
+//    
+const TDesC8& GetWeekday(const TTime& aDate)
+    {
+    switch (aDate.DayNoInWeek())
+        {
+        case EMonday:
+            return KDay1();            
+        case ETuesday:
+            return KDay2();    
+        case EWednesday:
+            return KDay3();
+        case EThursday:
+            return KDay4();
+        case EFriday:
+            return KDay5();   
+        case ESaturday:
+            return KDay6();
+        case ESunday:
+            return KDay7();
+        default:
+            return KNullDesC8;                                                    
+            
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::GetMonth
+// 
+// -----------------------------------------------------------------------------
+//    
+const TDesC8& GetMonth(const TDateTime& aDate)
+    {
+    switch (aDate.Month())
+        {
+        case EJanuary:
+            return KMonth1();            
+        case EFebruary:
+            return KMonth2();    
+        case EMarch:
+            return KMonth3();
+        case EApril:
+            return KMonth4();
+        case EMay:
+            return KMonth5();   
+        case EJune:
+            return KMonth6();
+        case EJuly:
+            return KMonth7();
+        case EAugust:
+            return KMonth8();
+        case ESeptember:
+            return KMonth9();
+        case EOctober:
+            return KMonth10();
+        case ENovember:
+            return KMonth11();
+        case EDecember:
+            return KMonth12();                    
+        default:
+            return KNullDesC8;        
+        }
+    }    
+
+// -----------------------------------------------------------------------------
+// UpnpString::CutToPiecesL
+// 
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C void CutToPiecesL( TPtrC8 aPtr, 
+                            TChar aDelim, 
+                            RPointerArray<TPtrC8>& aArray )
+    {
+    TInt i = 0;
+    CleanupStack::PushL(TCleanupItem(&DeleteArray,&aArray));
+
+    while(KErrNotFound != aPtr.Locate(aDelim))
+        {    
+        TPtrC8* tmp = new (ELeave)TPtrC8();
+        CleanupStack::PushL(tmp);
+        User::LeaveIfError( aArray.Append( tmp ) );
+        CleanupStack::Pop(tmp);
+    
+        aArray[i]->Set(aPtr.Left((aPtr.Locate(aDelim))));
+        aPtr.Set(aPtr.Right(aPtr.Length() - (aPtr.Locate(aDelim) + 1)) ); 
+        aArray[i]->Set(Trim(*aArray[i], EFalse));
+        i++;
+        }
+    TPtrC8* tmp = new (ELeave)TPtrC8();
+    CleanupStack::PushL(tmp);
+    User::LeaveIfError( aArray.Append( tmp ) );
+    CleanupStack::Pop(tmp);        
+       
+    aArray[i]->Set(aPtr);
+    aArray[i]->Set(Trim(*aArray[i], EFalse));
+        
+    CleanupStack::Pop(&aArray);    
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::Trim
+// 
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C TPtrC8 Trim(TPtrC8 aPtr, TBool aQuotations)
+    {
+    if( aPtr.Length() == 0 )
+        {
+        return aPtr;
+        }
+    while( ( ('"' == aPtr[0]) && aQuotations ) ||
+        (' ' == aPtr[0]) )
+        {
+            aPtr.Set(aPtr.Right(aPtr.Length() - 1));
+        if( aPtr.Length() == 0) 
+            {
+            return aPtr;
+            }
+        }
+
+    while( ( ('"' == aPtr[aPtr.Length() - 1] ) && aQuotations ) ||
+        (' ' == aPtr[aPtr.Length() - 1] ) )
+        {
+        aPtr.Set(aPtr.Left(aPtr.Length() - 1 ));
+        if( aPtr.Length() == 0 ) 
+            {
+            return aPtr;
+            }
+        }
+    return aPtr;
+    }
+
+// -----------------------------------------------------------------------------
+// CutToPiecesL
+// 
+// -----------------------------------------------------------------------------
+//
+void CutToPiecesL( TPtrC8 aPtr,TChar aDelim, RArray<TPtrC8>& aArray )
+    {
+    TInt i = 0;
+    TInt loc = aPtr.Locate(aDelim);
+    while(KErrNotFound != loc)
+        {    
+        TPtrC8 r(aPtr.Left(loc));
+        User::LeaveIfError(aArray.Append(r));
+        aPtr.Set(aPtr.Right(aPtr.Length() - (loc + 1)) ); 
+        i++;
+        loc = aPtr.Locate(aDelim);
+        }
+    TInt parenthesis;
+    parenthesis =  aPtr.Locate(')');
+    if( KErrNotFound != parenthesis )
+        {
+        User::LeaveIfError(aArray.Append(aPtr.Left( parenthesis )));
+        }
+    else
+        {
+        User::LeaveIfError(aArray.Append(aPtr));
+          }
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::ValueFromCsvL
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* ValueFromCsvL(const TDesC8& aCSV, TInt aPlace)
+    {
+    RArray<TPtrC8> array;
+    CleanupClosePushL(array);
+    CutToPiecesL(aCSV, ',', array);
+
+    HBufC8* value = HBufC8::NewL(array[aPlace].Length());
+    value->Des().Copy(array[aPlace]);
+    CleanupStack::PopAndDestroy();
+    return value;
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::AddValueToCsvL
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* AddValueToCsvL(const TDesC8& aCSV, const TDesC8& aValue)
+    {
+    HBufC8* buf=NULL;
+    if( 0 == KEmptyString().Compare(aCSV) )
+        {
+        buf = aValue.AllocL();
+        }
+    else
+        {
+        buf = HBufC8::NewL(aCSV.Length() + KComma().Length() + aValue.Length());
+        buf->Des().Append(aCSV);
+        buf->Des().Append(KComma());
+        buf->Des().Append(aValue);
+        }
+    return buf;
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::RemoveFromCsvLC
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* RemoveFromCsvLC(const TDesC8& aCSV, const TDesC8& aValue)
+    {
+    RPointerArray<TPtrC8> array;
+    CsvToRPointerArrayL(aCSV, array);
+    TPtrC8 val(Trim(aValue, EFalse));
+    for( TInt i = 0; i < array.Count(); i++ )
+        {
+        if( 0 == array[i]->CompareF(val) )
+            {
+            delete array[i];
+            array.Remove(i);
+            }
+        }
+    CleanupStack::PushL(TCleanupItem(&DeleteArray, &array));    
+    HBufC8* buf = RPointerArrayToCsvLC( array );
+    CleanupStack::Pop( buf ); 
+    CleanupStack::PopAndDestroy( &array ); 
+    CleanupStack::PushL( buf ); 
+    array.Close();
+    return buf;
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::CsvToRPointerArrayL
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CsvToRPointerArrayL( const TDesC8& aCSV, 
+                                   RPointerArray<TPtrC8>& aArray )
+    {
+    aArray.ResetAndDestroy();
+    CutToPiecesL(aCSV, ',', aArray);
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::RPointerArrayToCsvLC
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* RPointerArrayToCsvLC( RPointerArray<TPtrC8>& aArray )
+    {
+    TInt length (0);
+    TInt i(0);
+    for( ; i< aArray.Count(); ++i)
+        {
+        length += aArray[i]->Length() + KComma().Length();
+        }
+
+    HBufC8* buf = HBufC8::NewLC(length);
+    TPtr8 des = buf->Des();
+
+    for( i = 0; i < aArray.Count(); i++ )
+        {
+        des.Append(*aArray[i]);
+        if( i != aArray.Count() - 1 )
+            {
+            des.Append(KComma());
+            }
+        }
+    return buf;
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::AppendStringL
+// Append to string.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void AppendStringL( CBufFlat& aBuffer, const TDesC8& aString )
+    {
+    RBufWriteStream bufWs(aBuffer, aBuffer.Size());
+    CleanupClosePushL(bufWs);
+    bufWs.WriteL(aString);
+    bufWs.CommitL();
+    CleanupStack::PopAndDestroy(); 
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::AppendStringL
+// Append to string.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void AppendStringL( HBufC8*& aString, const TDesC8& aString2 )
+    {
+    if(aString==NULL)
+        { 
+        if(aString2.Length()==0)
+            {
+            return;
+            }
+        aString = HBufC8::NewLC(aString2.Length());
+        aString->Des().Append(aString2);
+        CleanupStack::Pop();
+        }
+    else if(aString2.Length()==0)
+        {
+        return;
+        }
+    else
+        {
+        HBufC8* nString = HBufC8::NewLC(aString->Length() + aString2.Length());
+        nString->Des().Append(aString->Des());
+        nString->Des().Append(aString2);
+
+        delete aString;
+        aString = nString;
+        CleanupStack::Pop();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::StringToInt
+// String to integer.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt StringToInt(const TDesC8& aStr, TInt* aInt)
+    {
+    if( 0 == aStr.Length() || aInt == NULL)
+        {
+        return KErrArgument;
+        }
+    TLex8 lex( aStr );
+    return lex.Val( *aInt );
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::StringReplaceL
+// 
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C void StringReplaceL( const TDesC8& aOrginal, 
+                              HBufC8*& aResult, 
+                              const TDesC8& aTrg, 
+                              const TDesC8& aReplacement )
+    {
+    TInt place = aOrginal.Find( aTrg );
+    if( KErrNotFound != place )
+        {
+        aResult = StringReplaceL(aOrginal, aTrg, aReplacement);
+        }
+    else
+        {    
+        delete aResult;
+        aResult = NULL;
+        aResult = aOrginal.AllocL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::StringReplaceL
+// 
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C HBufC8* StringReplaceL( const TDesC8& aStr, 
+                                 const TDesC8& aTrg, 
+                                 const TDesC8& aReplacement )
+    {
+    __ASSERT_DEBUG(aTrg.Length() && aStr.Length(), User::Panic(_L("String"), 0));
+    TInt length = aStr.Length();
+    if(aReplacement.Length() > aTrg.Length())
+        {
+        TInt position(0);
+        TPtrC8 loc;
+        TInt numOccurrences(0);
+        loc.Set(aStr);
+        for(;;)
+            {
+            position = loc.Find(aTrg);
+            if(position == KErrNotFound)
+                {
+                break;
+                }
+            numOccurrences++;
+            position +=aTrg.Length();
+            if(position >= loc.Length())
+                {
+                break;
+                }
+            loc.Set(loc.Mid(position)); 
+            }
+        length += (aReplacement.Length() - aTrg.Length())*numOccurrences;
+        }
+    HBufC8* result = HBufC8::NewLC(length);
+    TPtr8 ptr = result->Des();
+    ptr.Copy(aStr);
+    StringReplaceInPlaceL(ptr, aTrg, aReplacement);
+    if(ptr.MaxLength() > ptr.Length())
+        {
+        result = result->ReAllocL(result->Length());
+        }
+    CleanupStack::Pop(); 
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::StringReplaceInPlaceL
+// expected: aTrg.Length() >= aReplacement.Length()
+// -----------------------------------------------------------------------------
+//    
+EXPORT_C void StringReplaceInPlaceL(
+    TDes8& aString, 
+    const TDesC8& aTrg,
+    const TDesC8& aReplacement )
+    {
+    __ASSERT_DEBUG(aTrg != aReplacement, User::Panic(_L("String"), 1));
+
+    TPtrC8 ptr(aString);
+    TInt position(0);
+    FOREVER
+        {
+        TInt found = ptr.Find( aTrg );
+        if(found < 0)
+            {
+            return;
+            }
+        aString.Replace( position + found, aTrg.Length(), aReplacement );
+        if(position + found + aReplacement.Length() < aString.Length())
+            {
+            position += found + aReplacement.Length();
+            ptr.Set(aString.Mid(position));
+            }
+        else
+            return;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// String::EncodeXmlStringL
+// Encode XML string.
+// -----------------------------------------------------------------------------
+// 
+
+EXPORT_C HBufC8* EncodeXmlStringL( HBufC8*& aBuf )
+    {
+    return EncodeXmlStringL( *aBuf );
+    }
+
+// -----------------------------------------------------------------------------
+// String::DecodeXmlStringL
+// Decode XML string.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* DecodeXmlStringL( HBufC8*& aBuf )
+    {
+    return DecodeXmlStringL( *aBuf );
+    }
+
+EXPORT_C HBufC8* EncodeXmlStringL( const TDesC8& aXmlString )
+    {
+    const TPtrC8 KEntities[5] = 
+        {
+        KGtEntity(), KLtEntity(), KQuotEntity(), KAposEntity(), KAmpEntity()
+        };
+    const TChar KChars[5] = 
+        {
+        '>', '<', '"', '\'', '&' 
+        };
+    
+    HBufC8* result = HBufC8::NewLC( aXmlString.Length() * KReallocRatio );
+    TPtr8 ptr = result->Des();
+    
+    TLex8 lexer( aXmlString );
+    TChar ch;
+    while ( ch = lexer.Get() )
+        {
+        if ( result->Length() >= ( ptr.MaxLength() - KMaxEntityLength ) )
+            {
+            TInt newLength( ptr.MaxLength() * KReallocRatio ) ;
+            
+            result = result->ReAllocL( newLength );
+            CleanupStack::Pop(); // "old" result descriptor
+            CleanupStack::PushL( result );
+            ptr.Set( result->Des() );
+            
+            }
+        TBool found = EFalse;
+        for ( TInt i = 0; i < KEntitiesCount; i++ )
+            {
+            if ( ch == KChars[i] )
+                {
+                ptr.Append( '&' );
+                ptr.Append( KEntities[i] );
+                found = ETrue;
+                break;
+                }
+            }
+        if ( !found )
+            {
+            ptr.Append( ch );
+            }
+        }
+    CleanupStack::Pop( result );
+    return result;
+    }
+
+EXPORT_C HBufC8* DecodeXmlStringL( const TDesC8& aXmlString )
+    {
+    const TPtrC8 KEntities[5] = 
+        {
+        KGtEntity(), KLtEntity(), KQuotEntity(), KAposEntity(), KAmpEntity()
+        };
+    const TChar KChars[5] = 
+        {
+        '>', '<', '"', '\'', '&' 
+        };
+    
+    HBufC8* result = HBufC8::NewLC( aXmlString.Length() );
+    TPtr8 ptr = result->Des();
+    
+    TLex8 lexer( aXmlString );
+    TChar ch;
+    TBool insideEntity = EFalse;
+    
+    while ( ch = lexer.Get() )
+        {
+        if ( insideEntity )
+            {
+            if ( ch == ';' ) // entity ends
+                {
+                insideEntity = EFalse;
+                TPtrC8 entity = lexer.MarkedToken();
+                TBool found = EFalse;
+                
+                for ( TInt i = 0; i < KEntitiesCount; i++ )
+                    {
+                    if ( !entity.Compare( KEntities[i] )) // match
+                        {
+                        ptr.Append( KChars[i] );
+                        found = ETrue;
+                        break;           
+                        }
+                    }
+                if ( !found )
+                    {
+                    // no match, appending as it is
+                    ptr.Append( '&' );
+                    ptr.Append( entity );    
+                    }
+                }
+            }
+        else 
+            {
+            if ( ch == '&' ) // entity starts
+                {
+                insideEntity = ETrue;
+                lexer.Mark();
+                }
+            else 
+                {
+                ptr.Append( ch );
+                }
+            }
+        }
+    CleanupStack::Pop( result );
+    return result;
+    }
+
+
+// -----------------------------------------------------------------------------
+// UpnpString::InetToStringL
+// Intet address to string.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* InetToStringL(const TInetAddr& aAddress)
+    {
+    TBuf<20> address;
+    aAddress.Output(address);
+    HBufC8* host8 = UpnpString::FromUnicodeL(address);
+    CleanupStack::PushL(host8);
+    TBuf8<10> port;
+    port.Num(aAddress.Port());
+    
+    HBufC8* host = HBufC8::NewL(host8->Length() + port.Length() + 1);
+    host->Des().Zero();
+    host->Des().Append(*host8);
+    host->Des().Append(UpnpString::KColon());
+    host->Des().Append(port);
+    
+    CleanupStack::PopAndDestroy(host8);
+
+    return host;
+    }
+    
+// -----------------------------------------------------------------------------
+// UpnpString::TrimLC
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//   
+EXPORT_C HBufC8* TrimLC(const TDesC8& aBuf, TBool aQuotations)
+    {
+    if( aBuf.Length() == 0 )
+        {
+        return aBuf.AllocLC();
+        }
+    TPtrC8 ptr(aBuf);    
+
+    while( ( ('"' == ptr[0]) && aQuotations ) ||
+        (' ' == ptr[0]) )
+        {
+        if(ptr.Length() == 1)
+            {
+            return HBufC8::NewLC(0);
+            }
+        ptr.Set(ptr.Mid(1));
+        }
+    while( ( ('"' == ptr[ptr.Length() - 1] ) && aQuotations ) ||
+        (' ' == ptr[ptr.Length() - 1] ) )
+        {
+        ptr.Set(ptr.Left(ptr.Length() -1));            
+        }
+
+    return ptr.AllocLC();
+    }
+
+// -----------------------------------------------------------------------------
+// UpnpString::DeleteArray
+// Empties the array and deletes the referenced objects.
+// -----------------------------------------------------------------------------
+//
+void DeleteArray(TAny* param)
+    {
+    RPointerArray<TPtrC8>* array;
+    
+    array = reinterpret_cast<RPointerArray<TPtrC8>*>(param);
+    array->ResetAndDestroy();
+    }
+
+    // -----------------------------------------------------------------------------
+    // UpnpString::ReplaceHttpCharacters
+    // -----------------------------------------------------------------------------
+    //
+EXPORT_C void ReplaceHttpCharacters(TDes8& aString)
+    {
+    TInt i=-1;
+    while(++i < aString.Length())
+        {    //check if it is "%" and that the length from this position is at least 
+        //3 = length of "%" HEX HEX
+            if( (aString[i] == '%') && (aString.Length() >= i+3) )
+            {
+            TLex8 lexer(aString.Mid(i+1, KUrlCharNoLen-1)); // two characters next to '%'
+            TUint8 charNo;
+            if(lexer.Val(charNo, EHex) == KErrNone )
+                {
+                TText8 c(charNo);
+                TPtrC8 charDes(&c, KOneCharLen);
+                aString.Replace(i, KUrlCharNoLen, charDes);
+                }
+            }
+        } 
+    }
+    
+// -----------------------------------------------------------------------------
+// UpnpString::ReplaceHttpCharactersL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void ReplaceHttpCharactersL(TDes& aString)
+    {
+    HBufC8* temp8 = FromUnicodeL(aString);
+    CleanupStack::PushL(temp8);
+    TPtr8 tempPtr(temp8->Des());
+    ReplaceHttpCharacters(tempPtr);
+    
+    HBufC* temp16 = ToUnicodeL(tempPtr);
+    aString.Copy(*temp16);
+    delete temp16;
+    CleanupStack::PopAndDestroy(temp8);
+    }
+
+}
+//  End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnpsymbianserverbase.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,275 @@
+/** @file
+ * 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:  Implementation of CUpnpSymbianServerBase
+ *
+ */
+
+#include <upnpsymbianserverbase.h>
+#include "upnpuheapmark.h"
+#include "upnpcustomlog.h"
+
+#include <ecom/ecom.h>
+
+const TInt KUpnpSymbianServerShutdownInterval = 2000000;
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::StartServerL
+// Create and start the server.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSymbianServerBase::StartServerL( const TDesC& aThreadName,
+    TServerFactoryMethodLC aServerFactoryMethodLC )
+    {
+    User::LeaveIfError( User::RenameThread( aThreadName ) );
+    // Construct active scheduler
+    CActiveScheduler* activeScheduler = new( ELeave ) CActiveScheduler;
+    CleanupStack::PushL( activeScheduler );
+
+    // Install active scheduler
+    // We don't need to check whether an active scheduler is already installed
+    // as this is a new thread, so there won't be one
+    CActiveScheduler::Install( activeScheduler );
+
+    // Construct our server
+    CUpnpSymbianServerBase* serverObject = aServerFactoryMethodLC();
+    LOGS( "UpnpSymbianServer *** Ready to accept connections" );
+
+    RProcess::Rendezvous( KErrNone );
+
+    // Start handling requests
+    CActiveScheduler::Start();
+
+    LOGS( "UpnpSymbianServer *** Active scheduler stopped" );
+    LOGS( "UpnpSymbianServer *** Prepared for shutdown" );
+
+    CleanupStack::PopAndDestroy( serverObject );
+    REComSession::FinalClose();
+    CleanupStack::PopAndDestroy( activeScheduler );
+    LOGS( "UpnpSymbianServer *** Shutdown complete" );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::StartServer
+// Create and start the server.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSymbianServerBase::StartServer( const TDesC& aThreadName,
+        TServerFactoryMethodLC aServerFactoryMethodLC )
+    {
+    __UPNP_UHEAP_MARK;
+
+    CTrapCleanup* cleanupStack = CTrapCleanup::New();
+    if ( !( cleanupStack ) )
+        {
+        User::Panic( aThreadName, ECreateTrapCleanup );
+        }
+
+    TRAPD( err, StartServerL( aThreadName, aServerFactoryMethodLC) );
+    if ( err != KErrNone )
+        {
+        //there's no need to panic server
+        //f.e. KErrAlreadyExist is valid in case of simultanous start
+        }
+
+    delete cleanupStack;
+    cleanupStack = NULL;
+
+    __UPNP_UHEAP_MARKEND;
+    return err;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::CUpnpSymbianServerBase
+// Constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSymbianServerBase::CUpnpSymbianServerBase()
+: CServer2( EPriorityNormal )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::~CUpnpSymbianServerBase
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpSymbianServerBase::~CUpnpSymbianServerBase()
+    {
+    delete iShutdownTimer;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::BaseConstructL
+// Second phase base constructor. It must be called by derived class.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSymbianServerBase::BaseConstructL()
+    {
+    StartL( ServerName() );
+    iShutdownTimer = CUpnpNotifyTimer::NewL( this );
+    SuggestShutdown();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::PanicClient
+// Panic client.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSymbianServerBase::PanicClient(
+        const RMessage2& aMessage, TInt aPanic ) const
+    {
+    LOG_FUNC_NAME;
+    aMessage.Panic( ServerName(), aPanic );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::PanicServer
+// Panic server.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSymbianServerBase::PanicServer( TInt aPanic ) const
+    {
+    User::Panic( ServerName(), aPanic );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::IncrementSessionCount
+// Increment sessions.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSymbianServerBase::IncrementSessionCount()
+    {
+    LOG_FUNC_NAME;
+    iSessionCount++;
+    iShutdownTimer->Cancel();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::DecrementSessions
+// Decrement sessions.
+// -----------------------------------------------------------------------------
+//
+void CUpnpSymbianServerBase::DecrementSessionCount()
+    {
+    LOG_FUNC_NAME;
+    iSessionCount--;
+    ASSERT( iSessionCount >= 0 );
+    SuggestShutdown();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::SuggestShutdown
+// Checks every stop condidion and starts closing server timeout if all of them
+// are fulfilled.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSymbianServerBase::SuggestShutdown()
+    {
+    if ( (iSessionCount <= 0) && CanBeStopped() )
+        {
+        iShutdownTimer->Start( KUpnpSymbianServerShutdownInterval );
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::TimerEventL
+// End of shutdown timer event
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSymbianServerBase::TimerEventL( CUpnpNotifyTimer* aTimer )
+    {
+    ASSERT( iShutdownTimer == aTimer );
+    ASSERT( (iSessionCount <= 0) && CanBeStopped() );
+    CActiveScheduler::Stop();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::RunL
+// Invoked when server receives message.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpSymbianServerBase::RunL()
+    {
+    switch( Message().Function() )
+        {
+        case RMessage2::EConnect:
+        IncrementSessionCount();
+        break;
+        case RMessage2::EDisConnect:
+        DecrementSessionCount();
+        break;
+        }
+    CServer2::RunL();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::RunError
+// RunError is called when RunL leaves.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpSymbianServerBase::RunError( TInt aError )
+    {
+    LOG_FUNC_NAME;
+    if ( aError == KErrBadDescriptor )
+        {
+        // A bad descriptor error implies a badly programmed client, so panic it;
+        // otherwise report the error to the client
+        LOGS( "RunError - BadClient" );
+        PanicClient( Message(), EBadDescriptor );
+        }
+    else if ( aError != KErrCorrupt )
+        {
+        LOGS( "RunError - Faulty Message" );
+        if ( !Message().IsNull() )
+            {
+            Message().Complete( aError );
+            }
+        }
+
+    // The leave will result in an early return from CServer::RunL(), skipping
+    // the call to request another message. So do that now in order to keep the
+    // server running.
+    ReStart();
+
+    // Handled the error fully
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::NewSessionL
+// Create new session or leaves with KErrNotSupported if version is unsupported.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CSession2* CUpnpSymbianServerBase::NewSessionL(
+        const TVersion& aVersion, const RMessage2& aMessage ) const
+    {
+    LOG_FUNC_NAME;
+    // Check we're the right version
+    if ( !User::QueryVersionSupported( SupportedVersion(), aVersion ) )
+        {
+        User::Leave( KErrNotSupported );
+        }
+    return NewSessionL( aMessage );
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpSymbianServerBase::CanBeStopped
+// Default implementation for transient servers - no additional stopping conditions
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CUpnpSymbianServerBase::CanBeStopped() const
+    {
+    return ETrue;
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack/upnputils/src/upnptimeoutelement.cpp	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,170 @@
+/** @file
+* Copyright (c) 2005-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:  CUpnpTimeoutElement
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <e32base.h>
+#include "upnptimeoutelement.h"
+#define KLogFile _L("UPnPStack.txt")
+#include "upnpcustomlog.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUpnpTimeoutElement::CUpnpTimeoutElement
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpTimeoutElement::CUpnpTimeoutElement(MUpnpTimeoutElementParent& aParent)
+    : CActive(EPriorityNormal), iParent(aParent)
+    {
+    CActiveScheduler::Add( this );
+    iRenew = EOnce;
+    }
+
+// ----------------------------------------------------------------------------
+// CUpnpTimeoutElement::BaseConstructL
+// Base class constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpTimeoutElement::BaseConstructL()
+    {
+    TInt err = iTimer.CreateLocal();
+    if ( KErrNone != err )
+        {
+        LOGS1("CUpnpTimeoutElement::CUpnpTimeoutElement() CreateLocal FAILED: %d", err );
+        User::Leave( err );
+        }
+    }
+// -----------------------------------------------------------------------------
+// CUpnpTimeoutElement::~CUpnpTimeoutElement
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpTimeoutElement::~CUpnpTimeoutElement() 
+    {
+    Cancel();
+    iTimer.Close();
+    }
+    
+// -----------------------------------------------------------------------------
+// CUpnpTimeoutElement::SetTimeout
+// Set timeout and start timer
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpTimeoutElement::SetTimeout( TInt aSeconds )
+    {
+    iSeconds=aSeconds;
+    if (iSeconds>KTime)
+        {
+        TUint32 microsec = KTime * KMicroInSec;
+        if ( IsActive() )
+           {
+           Cancel();
+           }
+        iTimer.After(iStatus, TTimeIntervalMicroSeconds32(microsec));
+    	SetActive();
+        iState = ELongTime;       
+        }    
+    else
+        {
+        TUint32 microsec = aSeconds * KMicroInSec;
+        if ( IsActive() )
+            {
+            Cancel();
+            }
+    	iTimer.After(iStatus, TTimeIntervalMicroSeconds32(microsec));
+    	SetActive();
+        iState = EAlive;    
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTimeoutElement::RunL
+// When timer expires, RunL is called.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpTimeoutElement::RunL()
+    {
+    if (iStatus.Int() == KErrNone)
+        {
+        switch( iState )
+            {
+            case ELongTime:
+                 if (iSeconds>KTime) iSeconds=iSeconds-KTime;                 
+                 SetTimeout(iSeconds);
+                 break;
+            case EAlive:
+                TRAP_IGNORE( iParent.TimeoutExpiredL( this ) );
+                break;
+            case EDead:
+            default:
+                
+                break;
+            }
+        }
+        else
+        {
+        LOGS1("CUpnpTimeoutElement::CUpnpTimeoutElement() RunL iStatus  %d", iStatus.Int() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTimeoutElement::DoCancel
+// Cancel active request.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpTimeoutElement::DoCancel()
+    {
+    iTimer.Cancel();
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTimeoutElement::RunError
+// Cancel active request.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CUpnpTimeoutElement::RunError( TInt aError )
+    {
+    LOGS1("CUpnpTimeoutElement::RunError, error %d",aError);
+    return KErrNone;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CUpnpTimeoutElement::SetRenew
+// Set renew.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CUpnpTimeoutElement::SetRenew( TRenew aRenew )
+    {
+    iRenew = aRenew;
+    }
+
+// -----------------------------------------------------------------------------
+// CUpnpTimeoutElement::Renew
+// Return renew.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CUpnpTimeoutElement::TRenew& CUpnpTimeoutElement::Renew()
+    {
+    return iRenew;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,26 @@
+/** @file
+* 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:  
+*
+*/
+
+
+#include "../upnp_device_api/group/bld.inf"
+#include "../upnp_common_api/group/bld.inf"
+#include "../upnp_utils_api/group/bld.inf"
+#include "../upnp_control_point_api/group/bld.inf"
+#include "../upnp_httpserver_api/group/bld.inf"
+#include "../upnp_http_transfer_api/group/bld.inf"
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,50 @@
+/** @file
+* 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:  File that exports the files belonging to 
+:                UPnP Common API
+*
+*/
+
+
+#include "../../../group/upnpplatformvar.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/upnpdiscoveryobserver.h            MW_LAYER_PLATFORM_EXPORT_PATH( upnpdiscoveryobserver.h )
+../inc/upnpicon.h                         MW_LAYER_PLATFORM_EXPORT_PATH( upnpicon.h )
+../inc/upnperrors.h                       MW_LAYER_PLATFORM_EXPORT_PATH( upnperrors.h )
+../inc/upnpcons.h                         MW_LAYER_PLATFORM_EXPORT_PATH( upnpcons.h )
+../inc/upnpaction.h                       MW_LAYER_PLATFORM_EXPORT_PATH( upnpaction.h )
+../inc/upnpdevice.h                       MW_LAYER_PLATFORM_EXPORT_PATH( upnpdevice.h )
+../inc/upnpdescriptionproperty.h          MW_LAYER_PLATFORM_EXPORT_PATH( upnpdescriptionproperty.h )
+../inc/upnpdispatcher.h                   MW_LAYER_PLATFORM_EXPORT_PATH( upnpdispatcher.h )
+../inc/upnpcommonstructs.h                MW_LAYER_PLATFORM_EXPORT_PATH( upnpcommonstructs.h )
+../inc/upnpdispatchercustomer.h           MW_LAYER_PLATFORM_EXPORT_PATH( upnpdispatchercustomer.h )
+../inc/upnpservice.h                      MW_LAYER_PLATFORM_EXPORT_PATH( upnpservice.h )
+../inc/upnpnotifytimer.h                  MW_LAYER_PLATFORM_EXPORT_PATH( upnpnotifytimer.h )
+../inc/upnpargument.h                     MW_LAYER_PLATFORM_EXPORT_PATH( upnpargument.h )
+../inc/upnpstatevariable.h                MW_LAYER_PLATFORM_EXPORT_PATH( upnpstatevariable.h )
+../inc/upnpdispatcherengineobserver.h     MW_LAYER_PLATFORM_EXPORT_PATH( upnpdispatcherengineobserver.h )
+../inc/upnpsettings.h                     MW_LAYER_PLATFORM_EXPORT_PATH( upnpsettings.h )
+../inc/upnpconnmanagereventtypes.h        MW_LAYER_PLATFORM_EXPORT_PATH( upnpconnmanagereventtypes.h )
+../inc/upnpnetworkeventobserver.h         MW_LAYER_PLATFORM_EXPORT_PATH( upnpnetworkeventobserver.h )
+../inc/upnpnetworkeventbase.h             MW_LAYER_PLATFORM_EXPORT_PATH( upnpnetworkeventbase.h )
+../inc/upnpnetworkeventaddresschange.h    MW_LAYER_PLATFORM_EXPORT_PATH( upnpnetworkeventaddresschange.h )
+../inc/upnpconnectionmanagernetworkeventprovider.h MW_LAYER_PLATFORM_EXPORT_PATH( upnpconnectionmanagernetworkeventprovider.h )
+../inc/upnpconnectionmanagernetworkevent.h MW_LAYER_PLATFORM_EXPORT_PATH( upnpconnectionmanagernetworkevent.h )
+../inc/upnpcommonupnplits.h               MW_LAYER_PLATFORM_EXPORT_PATH( upnpcommonupnplits.h )
+../inc/upnpdevicedescription.h            MW_LAYER_PLATFORM_EXPORT_PATH( upnpdevicedescription.h )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,269 @@
+/** @file
+* 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:  Declares the CUpnpAction class
+*
+*/
+
+
+#ifndef C_CUPNPACTION_H
+#define C_CUPNPACTION_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include <in_sock.h>
+#include "upnperrors.h"
+
+// FORWARD DECLARATIONS
+
+class CUpnpSoapMessage;
+class CUpnpService;
+class CUpnpArgument;
+
+// CLASS DECLARATION
+
+/**
+*  Used to make a common body for actions. \
+*  This class is only used when an action is sent or received. \
+*  This class makes a common body for actions, which can then be modified by user. \
+* 
+*  @since Series60 2.6
+*/
+class CUpnpAction : public CBase
+{ 
+public: // Constructors and destructor                  
+                    
+    /**
+    * Two-phased constructor for building from a XML node.
+    * Adds the arguments and their default values according to the XML node.
+    */
+    IMPORT_C static CUpnpAction* NewLC( CUpnpAction& aAction, 
+                                        CUpnpService& aParentService );
+    
+    /**
+    * Destructor.
+    */
+    IMPORT_C virtual ~CUpnpAction();
+    
+public: // New functions
+        
+    /**
+    * Sets error code
+    * @since Series S60 3.1
+    * @param aError
+    */
+    IMPORT_C void SetError( TInt aError );
+    
+    /**
+    * Get service
+    * @since Series60 2.6
+    * @return Parent service.
+    */
+    IMPORT_C CUpnpService& Service();
+    
+    /**
+    * Getter.
+    * @since Series60 2.6
+    * @return Error code
+    */
+    IMPORT_C TInt Error() const;
+    
+    /**
+    * Get session ID
+    * @since Series60 2.6
+    * @return Session ID.
+    */
+    IMPORT_C TInt SessionId() const;
+    
+    void SetSessionId(TInt aId);
+     
+    /**
+    * Get argument tyoe
+    * @since Series60 2.6
+    * @param aArgumentName Name of the argument.
+    * @return Type of the argument.
+    */
+    IMPORT_C TInt ArgumentType( const TDesC8& aArgumentName );
+    
+    /**
+    * Get argument list
+    * @since Series60 2.6
+    * @return List of the argumets.
+    */
+    IMPORT_C RPointerArray<CUpnpArgument>& ArgumentList();
+    
+    /**
+    * Get action name
+    * @since Series60 2.6
+    * @return Name of the action
+    */
+    IMPORT_C TDesC8& Name();
+    
+    /**
+    * Modifies an existing argument of the action.
+    * @since Series60 2.6
+    * @param aName the name of the argument.
+    * @param aValue the value of the argument.
+    * @return status of operation.
+    */
+    IMPORT_C TInt SetArgumentL( const TDesC8& aName, const TDesC8& aValue );
+    
+    /**
+    * Modifies an existing argument of the action.
+    * @since Series60 2.6
+    * @param aName Name of the argument.
+    * @return KErrNone if set succeeds, KErrBadName if not.
+    */
+    IMPORT_C const TDesC8& ArgumentValue( const TDesC8& aName );
+    
+    /**
+    * Returns the argument.
+    * @since Series60 2.6
+    * @param aName Name of the argument.
+    * @return argument
+    */
+    IMPORT_C CUpnpArgument* Argument( const TDesC8& aName );
+    
+    /**
+    * Get destination address
+    * @since Series60 2.6
+    * @return Destination address of the action.
+    */
+    IMPORT_C TInetAddr DestinationAddr() const;
+    
+    /**
+    * Set destination address
+    * @since Series60 2.6
+    * @param aAddr Destination address of the action.
+    */
+    IMPORT_C void SetDestinationAddr( const TInetAddr & aAddr );
+    
+    /**
+    * Set destination path
+    * @since Series60 2.6
+    * @param aDestination Destination path of the action (destination service).
+    */
+    IMPORT_C void SetDestinationPathL( const TDesC8& aDestination );
+    
+    /**
+    * Get destination path
+    * @since Series60 2.6
+    * @return Destination path of the action.
+    */
+    IMPORT_C const TDesC8& DestinationPath();
+    
+    /**
+    * Set sender address
+    * @since Series60 2.6
+    * @param aSender Source address of the action.
+    */
+    IMPORT_C void SetSender( const TInetAddr & aSender );
+    
+    /**
+    * Get source address of sender address
+    * @since Series60 2.6
+    * @return Source address of the action.
+    */
+    IMPORT_C TInetAddr& Sender();
+    
+    /**
+    * Get service type
+    * @since Series60 2.6
+    * @return Service type.
+    */
+    IMPORT_C TDesC8& ServiceType();
+
+    /**
+    * Returns whether an action is local, comes from local control point.
+    * @since Series60 2.6
+    * @return status.
+    */
+    IMPORT_C TBool Local() const;        
+    
+    /**
+    * Sets the value of iLocal.
+    * @since Series60 2.6
+    * @param aLocal new value of the iLocal parameter
+    */
+    IMPORT_C void SetLocal(TBool aLocal);        
+    
+public:
+    /**
+     * Construct action ONLY with specified name (not completely valid object)
+     * for TEST use only.
+     */
+    IMPORT_C static CUpnpAction* NewL(const TDesC8& aActionName);
+    
+public: // for internal use (construct action from xml description)
+
+  static CUpnpAction* NewL(CUpnpService& aParentService);
+       
+  void SetNameL(const TDesC8& aName);
+       
+  void AddArgumentL( CUpnpArgument& aAction );
+
+  void  ConstructL();    
+    
+private: // Constructors
+    
+    /**
+    * C++ default constructor.
+    * @param aParentService Parent service.
+    */
+    CUpnpAction( CUpnpService& aParentService );
+    
+    /**
+    * C++ default constructor.
+    */
+    CUpnpAction();   
+    
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * Adds the arguments and their default values according to the XML node
+    */
+    void ConstructL( CUpnpAction& aAction );
+    
+private: // Data
+     
+     // Session ID
+     TInt                            iSessionId;
+     
+     // Error code
+     TInt                            iError;
+
+     // indicate if action is local, comes from local control point
+     TInt                            iLocal;
+     
+     // Name of the action
+     HBufC8*                         iName;
+     
+     // Source address
+     TInetAddr                       iSender;
+     
+     // Destination service
+     HBufC8*                         iDestinationPath;
+            
+     // Destination address
+     TInetAddr                       iDestinationAddr;
+     
+     // Arguments of the action
+     RPointerArray<CUpnpArgument>    iArguments;
+     
+     // Parent service
+     CUpnpService&                   iParentService; 
+};
+
+#endif // C_CUPNPACTION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpargument.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,166 @@
+/** @file
+* 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:  Declares the CUpnpArgument class
+*
+*/
+
+
+#ifndef C_CUPNPARGUMENT_H
+#define C_CUPNPARGUMENT_H
+
+// INCLUDES 
+
+#include <e32base.h>
+#include <badesca.h>
+#include "upnpcons.h"
+
+// ENUMERATIONS
+
+enum { EIn, EOut };
+
+// FORWARD DECLARATIONS
+
+class CUpnpSoapMessage;
+class CUpnpService;
+
+// CLASS DECLARATION
+
+/**
+*  Used to make a common body for actions.
+*  This class is only used when an action is sent or received.
+*  This class makes a common body for actions, which can then be modified by user.
+*
+*  @since Series60 2.6
+*/
+class CUpnpArgument : public CBase
+{
+public: // Constructors and destructor
+    static CUpnpArgument* NewL( CUpnpService& aParentService );
+        
+    /**
+    * Two-phased constructor for building from a XML node.
+    * Internally uses the function NewL(CSereneElement*)
+    */
+    static CUpnpArgument* NewL( CUpnpArgument& aArgument, 
+                                         CUpnpService& aParentService );
+    
+    /** 
+    * Destructor.
+    */
+    virtual ~CUpnpArgument();
+    
+public: // New functions
+
+    /**
+    * Returns type of the argument.
+    * @since Series60 2.6
+    * @return TArgumentType.
+    */
+    IMPORT_C TArgumentType Type();
+
+    /**
+    * Returns direction of the argument.
+    * @since Series60 2.6
+    * @return EIn or EOut.
+    */
+    IMPORT_C TInt Direction() const;
+
+    /**
+    * Returns related state variable.
+    * @since Series60 2.6
+    * @return the related state variable
+    */
+    IMPORT_C TDesC8& RelatedStateVariable();
+
+    /**
+    * Returns the name of the argument.
+    * @since Series60 2.6
+    * @return argument name
+    */
+    IMPORT_C TDesC8& Name();
+
+    /**
+    * Returns the value of the argument.
+    * @since Series60 2.6
+    * @return Value of argument.
+    */
+    IMPORT_C TDesC8& Value();
+
+    /**
+    * Sets the value of argument.
+    * @since Series60 2.6
+    * (If the value is inproper, the method leaves with EInvalidArgs,
+	* which is the internal upnp error code used by UPnP Stack)
+    * @param aValue Value that is to be set for this argument.
+    */
+    IMPORT_C void SetValueL( const TDesC8& aValue );
+    
+    void SetDirectionL( TInt aDirection );
+    
+    void SetNameL(const TDesC8& aDirection );
+    
+    void SetRelatedStateVarL(const TDesC8& aRelatedStateVar);
+ 
+    void ConstructL();
+     
+    void SetType( TInt aType );
+    
+private: // Constructors
+
+    /**
+    * C++ default constructor.
+    * @param aParentService Parent service.
+    */
+    CUpnpArgument( CUpnpService& aParentService );
+        
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * Adds the arguments and their default values according to the XML node
+    * @param aNode CSenElement.
+    */
+    void ConstructL( CUpnpArgument& aArgument );
+
+    /**
+    * Delete and null iValue member.
+    */
+    void DeleteAndNullValue();
+    
+    /**
+    * Checks the error code for the SetValue method and leaves if needed.
+    */
+    void CheckErrorL(TInt aError, const TDesC8& aValue);
+private: // Data
+
+    // Argument name buffer, owned
+    HBufC8*     iName;
+
+    // Related state varable buffer, owned
+    HBufC8*     iRelatedStateVariable;
+
+    // Direction, owned
+    TInt        iDirection;
+    
+    // Value of the related state variable
+    HBufC8*     iValue;
+
+    // Type of the related state variable
+    TInt        iType;
+    
+    // Parent service, owned
+    CUpnpService&   iParentService;
+};
+
+#endif // C_CUPNPARGUMENT_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpcommonstructs.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,257 @@
+/** @file
+* Copyright (c) 2005-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:  Declares common structs (classes) for UPnP stack:
+*                TUpnpAddLocalDevice, TUpnpRemoveLocalDevice, TUpnpGetHTTPMessage
+*                TUpnpHTTPMessageSize, TUpnpHTTPMessage, TUpnpGetDeviceListSize
+*                TUpnpGetDeviceList, TUpnpCancelRequest, TUpnpDevice, TUpnpService
+*                TUpnpSsdpSearch
+*
+*/
+
+
+#ifndef C_UPNPCOMMONSTRUCTS_H
+#define C_UPNPCOMMONSTRUCTS_H
+
+// INCLUDES
+#include <in_sock.h>
+
+// FORWARD DECLARATIONS
+class CUpnpDeviceLibraryElement;
+
+// CONSTANTS
+static const TInt KUrlMaxLength = 256;//DLNA : 7.2.24.4 Max URL sholdn't exided 256(1024) characters
+static const TInt KUdnMaxLength = 68; //DLNA 7.2.19.1  The maximum length is 68 bytes, including the "uuid:" portion
+static const TInt KServiceTypeBufferLength = 4 + 255 + 9 + 64 + 3;//urn:domain-name:service:serviceType:v  SEE: UPNP-DeviceArchitecture v1.0
+                                                              //4( urn: ) 
+                                                              //255 max domain name SEE: http://www.ops.ietf.org/lists/namedroppers/namedroppers.2003/msg00964.html
+                                                              //9 ( :service: )
+                                                              //64 max service name 
+                                                              //3 - ( :xx )
+                                                              //sum: 335
+static const TInt KDeviceTypeBufferLength = 4 + 255 + 8 + 64 + 3;//urn:domain-name:device:deviceType:v  SEE: UPNP-DeviceArchitecture v1.0
+                                                             // 4( urn: ) 
+                                                             //255 max domain name SEE: http://www.ops.ietf.org/lists/namedroppers/namedroppers.2003/msg00964.html
+                                                             //8 ( :device: )
+                                                             //64 max service name 
+                                                             //3 - ( :xx )
+                                                             //sum: 334
+static const TInt KMaxServiceCount = 10;
+
+
+// CLASS DECLARATIONS
+
+/**
+*  TUpnpAddLocalDevice
+*
+*  @since Series60 2.0
+*/
+class TUpnpAddLocalDevice
+    {
+public:
+    // Data in buffer
+
+    TInt iBufferLength;
+
+    TInt iUuidLength;
+    TInt iDeviceTypeLength;
+    TInt iDescriptionUrlLength;
+    TInt iDomainLength;
+    TInt iPortNumberLength;
+    TInt iLocalLength;
+    TInt iRootDeviceLength;
+
+    TInt iServiceLength[KMaxServiceCount];
+
+    // External data
+
+    TInt iTimeout;
+    };
+
+/**
+*  TUpnpRemoveLocalDevice
+*
+*  @since Series60 2.0
+*/
+class TUpnpRemoveLocalDevice
+    {
+public:
+    // UID buffer string
+    TBuf8<50> iUUID;
+    };
+
+/**
+*  TUpnpGetHTTPMessage
+*
+*  @since Series60 2.0
+*/
+class TUpnpGetHTTPMessage
+    {
+public:
+    // Device path string
+    TBuf8<50> iDevicePath;
+    };
+
+/**
+*  TUpnpHTTPMessageSize
+*
+*  @since Series60 2.0
+*/
+class TUpnpHTTPMessageSize
+    {
+public:
+    // Total length
+    TInt iTotalLength;
+    
+    // Buffer length
+    TInt iBufferLength;
+    
+    // Header length
+    TInt iHeaderLength;
+    // Body length
+    TInt iBodyLength;
+
+    // Destintion path length
+    TInt iDestinationPathLength;
+    // Sender path length
+    TInt iSenderPathLength;
+
+    // The incoming file lenght
+    TInt iInFileLength;
+    // The outgoing file length
+    TInt iOutFileLength;
+    };
+
+/**
+*  TUpnpHTTPMessage
+*
+*  @since Series60 2.0
+*/
+class TUpnpHTTPMessage
+    {
+public:
+    // Session ID
+    TInt iSessionId;
+    // Remote host IP address
+    TInetAddr iRemoteHost;
+
+    // The type variable
+    TInt iType;
+    // Pending request state variable
+    void* iPendingRequest;
+    };
+
+/**
+*  TUpnpGetDeviceListSize
+*
+*  @since Series60 2.0
+*/
+class TUpnpGetDeviceListSize
+    {
+public:
+    // The update ID variable
+    TInt iUpdateId;
+    // The device count variable
+    TInt iDeviceCount;
+    // The service count variable
+    TInt iServiceCount;
+    };
+
+/**
+*  TUpnpGetDeviceList
+*
+*  @since Series60 2.0
+*/
+class TUpnpGetDeviceList
+    {
+    public:
+    
+    };
+
+/**
+*  TUpnpCancelRequest
+*
+*  @since Series60 2.0
+*/
+class TUpnpCancelRequest
+    {
+    public:
+
+    };
+
+/**
+*  TUpnpDevice
+*
+*  @since Series60 2.0
+*/
+class TUpnpDevice
+    {
+    public:
+    /**
+    * Set device
+    * Defined in SSDPServer upnpdevicelibrary.cpp
+    * @param elem the device library element to be set
+    * @since Series60 2.0
+    */
+    IMPORT_C void Set( CUpnpDeviceLibraryElement* elem );
+
+    // Description URL string
+    TBuf8<KUrlMaxLength> iDescriptionURL;
+    // Device type string
+    TBuf8<KDeviceTypeBufferLength> iDeviceType;
+    // Domain string
+    TBuf8<KDeviceTypeBufferLength> iDomain;
+    // UID string
+    TBuf8<KUdnMaxLength> iUUID;
+    // Service count string
+    TInt iServiceCount;
+    // Is alive variable
+    TBool iAlive;
+    // Cache-control timeout indicator
+    TBool iExpired;
+    // Local variable
+    TBool iLocal;
+    // Remote variable
+    TBool iRemote;
+    };
+
+/**
+*  TUpnpService
+*
+*  @since Series60 2.0
+*/
+class TUpnpService
+    {
+    public:
+    // Service type string
+    TBuf8<KServiceTypeBufferLength> iServiceType;
+
+    };
+
+
+/**
+*  TUpnpSsdpSearch
+*
+*  @since Series60 2.0
+*/
+class TUpnpSsdpSearch
+    {
+public:
+    // The search string
+    TBuf8<100> iSearchString;
+    };
+
+
+#endif // C_UPNPCOMMONSTRUCTS_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpcommonupnplits.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,199 @@
+/** @file
+* 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:  Declares string definitions
+*
+*/
+
+
+#ifndef C_UPNPCOMMONUPNPLITS_H
+#define C_UPNPCOMMONUPNPLITS_H
+
+#include <e32base.h> 
+
+//CONSTANTS
+
+const TInt KLongInfoSize = 1000;
+const TInt KMaxInfoSize = 20;
+
+// LITERALS
+
+_LIT8( Keq,                 "=\"" );
+_LIT8( Kfalse,              "false" );
+_LIT8( Ktrue,               "true" );
+
+_LIT8( KClosingBracket,     ")" );
+_LIT8( KClosingBracketWithQuotation, "\")" );
+_LIT8( KColon,              ":");
+_LIT8( KComma,              "," );
+_LIT8( KEmptyString,        "" );
+_LIT8( KKorp,               "<" ); 
+_LIT8( KKorpSlash,          "</" ); 
+_LIT8( KObjectID,           "ObjectID" );
+_LIT8( KOne,                "1" );
+_LIT8( KOneNumber,          "%i" );
+_LIT8( KOneNumber8,         "%i" );
+_LIT8( KPlainLineFeed,      "\r\n" );
+_LIT8( KProk,               ">" );
+_LIT8( KSeparator,          "://" );    // from upnphttpsession.h
+_LIT8( KSpace,              " " );
+_LIT8( KSpace8,             " " );
+_LIT8( KQuotation,          "\"" ); 
+_LIT8( KQuotationWithSpace, "\" " );
+_LIT8( KZero,               "0" );
+
+// from upnphttpsession.h
+_LIT16( KBackSlash,         "\\" );
+_LIT16( KSpace16,           " " );
+_LIT16( KDoubleBackSlash,   "\\" );     // from upnphttpsessionfileserving.h
+
+// from messahandlerengine.h/(cpp)
+_LIT( KMessagehandlerPanic, "UPnP messagehandler Panic" );
+_LIT8( KEmptyMessage, " " );
+_LIT8( KMulticastPacket, " " );
+
+// from upnpdispatcherengine.h/(cpp)
+//_LIT8( KZero, "0" ); // redefinition
+_LIT16( KLanBearer, "LANBearer" );
+
+// from upnpdispatchersession.h/(cpp)
+#if defined(__HN_31__) || defined(__HN_32__)
+_LIT( KMessageHandlerFilename, "hnMessageHandler" );
+#else
+_LIT( KMessageHandlerFilename, "MessageHandler" );
+#endif
+
+
+
+
+//----------------------------------------------------------------------------------
+// Literals for logs & others & panics
+//----------------------------------------------------------------------------------
+// from upnpcm.h/(cpp)
+_LIT8( KErrorHere, "Here is an ERROR!" );
+
+// from upnphttpsessionfileserving.cpp
+_LIT8( Servedbytes,"Sent %d/%d" );
+_LIT8( NBytesServed,"Served %d bytes" );
+
+// from upnptcpsession.cpp
+_LIT8( KRunL,"RunL(), error %d" );
+
+// from upnpdispatcherengine.h/(cpp)
+_LIT8( KSendFail, "DISPATCHERENGINE *** Sending of http message fails!" );
+
+// from service.pp
+_LIT8(KPanic, "SERVICE *** Leave during service description parsing: ");
+
+
+//----------------------------------------------------------------------------------
+// *.CPP tiedostoista tulleet uudet literaalit
+//----------------------------------------------------------------------------------
+// from upnphttpserver.h
+
+_LIT8( KIndexHtml,      "index.html" );
+_LIT16( KIndexHtml16,   "index.html" );
+_LIT8( KIndexXml,       "index.xml" );
+_LIT16( KIndexXml16,    "index.xml" );
+
+
+_LIT8( KArgTypeProtocolInfo,    "A_ARG_TYPE_ProtocolInfo" );
+_LIT8( KAvtransId,              "A_ARG_TYPE_AVTransportID" );
+_LIT8( KConMan,                 "A_ARG_TYPE_ConnectionManager" );
+_LIT8( KConId,                  "A_ARG_TYPE_ConnectionID" );
+_LIT8( KConStat,                "A_ARG_TYPE_ConnectionStatus" );
+_LIT8( KDirection,                    "A_ARG_TYPE_Direction" );
+_LIT8( KProtInf,                "A_ARG_TYPE_ProtocolInfo" );
+_LIT8( KRcsId,                  "A_ARG_TYPE_RcsID" );
+
+_LIT8( KConnectionIDs,          "ConnectionIDs" );
+_LIT8( KCurConId,               "CurrentConnectionIDs" );
+_LIT8( KGetProtInfo,            "GetProtocolInfo" );
+_LIT8( KGetCurConIds,           "GetCurrentConnectionIDs" );
+_LIT8( KGetCurConInfo,          "GetCurrentConnectionInfo" );
+_LIT8( KSink,                   "Sink" );
+_LIT8( KSinkInf,                "SinkProtocolInfo" );
+_LIT8( KSource,                 "Source" );
+_LIT8( KSourceInf,              "SourceProtocolInfo" );
+_LIT8( KSupportedProtocols,     "http-get:*:*:*" );
+_LIT8( KNull,                   "NULL" );
+_LIT8( KOutput,                 "output" );
+_LIT8( KOk,                     "OK" );
+_LIT8( KTypeRcsID,              "RcsID" );
+_LIT8( KTypeAVTransportID,      "AVTransportID" );
+_LIT8( KTypeProtocolInfo,       "ProtocolInfo" );
+_LIT8( KTypePeerConnectionManager, "PeerConnectionManager" );
+_LIT8( KTypePeerConnectionID,   "PeerConnectionID" );
+_LIT8( KTypeDirection,          "Direction" );
+_LIT8( KTypeStatus,             "Status" );
+_LIT8( KArgument,               "ConnectionID" );
+_LIT8( KPrepareForConnection,   "PrepareForConnection" );
+_LIT8( KConnectionComplete,     "ConnectionComplete" );
+
+// from upnpdevice.h
+_LIT8( KControlUrl,     "controlURL" );
+_LIT8( KDevice,         "device" );
+_LIT8( KDeviceType,     "deviceType" );
+_LIT8( KDeviceList,		"deviceList" );
+_LIT8( KDotXml,         ".xml" );
+_LIT8( KFriendlyName,   "friendlyName" );
+_LIT8( KHttp,           "http://" );
+_LIT8( KIcon,           "icon" );
+_LIT8( KIconList,       "iconList");
+_LIT8( KLine,           "-" );
+_LIT8( KMask8,          "%08x" );
+_LIT8( KManufacturer,   "manufacturer" );
+_LIT8( KManufacturerUrl, "manufacturerURL" );
+_LIT8( KModelDescription, "modelDescription" );
+_LIT8( KModelName,      "modelName" );
+_LIT8( KModelNumber,    "modelNumber" );
+_LIT8( KModelUrl,       "modelURL" );
+_LIT8( KSepar,          ":" );
+_LIT8( KSerialNumber,   "serialNumber" );
+_LIT8( KService,        "service" );
+_LIT8( KServiceList,	"serviceList" );
+_LIT8( KServiceId,      "serviceId" );
+_LIT8( KServiceType,    "serviceType" );
+_LIT8( KServiceUrn,     "service:" );
+_LIT8( KServiceDescriptionUrl, "SCPDURL" );
+_LIT8( KSubscriptionUrl, "eventSubURL" );
+_LIT8( KDeviceSearch,   ":device:" );
+_LIT8( KR,              "\r" );
+_LIT8( KSlash8,         "/" );
+_LIT8( KUdn,            "UDN" );
+_LIT8( KUuid,           "uuid:" );
+_LIT8( KPresentationUrl, "presentationURL" );
+_LIT8( KUrlBase, "URLBase" );
+
+// from upnpgenamessage.h
+_LIT8( KNoHeader,       "NoHeader" );
+_LIT8( KDefaultHostPort, "80" );
+_LIT8( KSidPrefix,      "uuid:" );
+_LIT8( KTimeoutPrefix,  "Second-" );
+
+
+// from upnpcontrolpoint.h
+_LIT8( KPath,       "path" ); 
+_LIT8( KGet,        "GET" );
+_LIT8( KSeconds,    "Second-" );
+_LIT8( KMimePng,    "image/png" );
+_LIT8( KMimeJpeg,   "image/jpeg" );
+_LIT8( KUpnpPath,   "C:\\System\\Data\\UPnP\\" );
+_LIT8( KLessThan8,   "<"  ); // (8&16 bit)
+_LIT8( KGreaterThan8, ">" ); // (8&16 bit)
+
+_LIT( KMediaDriveLetter, "c:");
+	
+#endif	// C_UPNPCOMMONUPNPLITS_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpconnectionmanagernetworkevent.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,81 @@
+/** @file
+* 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: TUpnpConnectionManagerNetworkEvent
+*
+*/
+
+#ifndef T_UPNPCONNECTIONMANAGERNETWORKEVENT_H
+#define T_UPNPCONNECTIONMANAGERNETWORKEVENT_H
+
+// INCLUDE FILES
+#include <e32cmn.h>
+#include <in_sock.h>
+#include "upnpconnmanagereventtypes.h"
+
+/**
+ * This class describes network event sent by ipc
+ * @since S60 5.0
+ */
+class TUpnpConnectionManagerNetworkEvent
+    {
+public:
+    
+    /**
+     * C++ constructor
+     */
+    IMPORT_C TUpnpConnectionManagerNetworkEvent();
+
+    /**
+     * C++ constructor
+     */
+    IMPORT_C TUpnpConnectionManagerNetworkEvent( TUpnpCmSubRsp aType );
+
+    /**
+     * C++ constructor
+     */
+    IMPORT_C TUpnpConnectionManagerNetworkEvent( TUpnpCmSubRsp aType, 
+                                                 TInetAddr aInetAddr );
+
+    /**
+     * Sets event type
+     */
+    IMPORT_C void SetType( TUpnpCmSubRsp aType );
+
+    /**
+     * Sets address after address change event
+     */  
+    IMPORT_C void SetAddress( TInetAddr aAddress );
+    
+    /**
+     * Get event type
+     */  
+    IMPORT_C TUpnpCmSubRsp& Type();
+
+    /**
+     * Get address
+     */  
+    IMPORT_C TInetAddr InetAddr();
+
+private:
+    
+    // event type    
+    TUpnpCmSubRsp iType;
+
+    // address
+    TInetAddr iInetAddr;
+    };
+
+#endif // T_UPNPCONNECTIONMANAGERNETWORKEVENT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpconnectionmanagernetworkeventprovider.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,136 @@
+/** @file
+* 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:  CUpnpConnectionManagerNetworkEventProvider
+*
+*/
+
+#ifndef C_UPNPCONNECTIONMANAGERNETWORKEVENTPROVIDER_H
+#define C_UPNPCONNECTIONMANAGERNETWORKEVENTPROVIDER_H
+
+// INCLUDES
+
+#include <e32base.h>
+#include "upnpconnectionmanagernetworkevent.h"
+#include <upnpnetworkeventobserver.h>
+
+// CLASS DECLARATION
+
+class CUpnpNetworkEventSubscriberError;
+class RUpnpConnectionManagerSession;
+
+
+/**
+ * Watches connection status
+ * @since S60 5.0
+ */
+NONSHARABLE_CLASS( CUpnpConnectionManagerNetworkEventProvider ) : public CActive
+    {
+public:
+    /**
+     * Two-phased constructor. Subscribes events for connection status
+     * session to server is maintained by the class
+     * @since Series 60 5.0 HN
+     * @param aObserver event observer    
+     * @return watcher object
+     */
+    IMPORT_C static CUpnpConnectionManagerNetworkEventProvider* NewL( 
+                                   MUpnpNetworkEventObserver& aObserver );
+    
+    /**
+     * Two-phased constructor. Subscribes events for connection status
+     * session to server is maintained outside the class
+     * @since Series 60 5.0 HN
+     * @param aClient that must be opened and closed outside the class
+     * @param aObserver event observer
+     * @return network provider object
+     */
+    static CUpnpConnectionManagerNetworkEventProvider* NewL( 
+                                   RUpnpConnectionManagerSession& aClient,
+                                   MUpnpNetworkEventObserver& aObserver );
+
+    /**
+     * Destructor. Usubscribes
+     */                                 
+    ~CUpnpConnectionManagerNetworkEventProvider();
+    
+    /**
+     * Subscribes to server
+     * called during construction
+     * @since Series 60 5.0 HN
+     */
+    IMPORT_C void Subscribe();
+    
+private:
+    /**
+     * Constructor.
+     */
+    CUpnpConnectionManagerNetworkEventProvider( 
+                                  MUpnpNetworkEventObserver& aObserver );
+
+    /**
+     * Constructor.
+     */
+    CUpnpConnectionManagerNetworkEventProvider( RUpnpConnectionManagerSession& aClient,
+                                  MUpnpNetworkEventObserver& aObserver );
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL();
+
+    /**
+     * Dispatch response from connection server
+     * @since Series 60 5.0 HN
+     */
+    void DispatchResponseNetworkEventL();
+    
+private:    // from CActive
+
+    /**
+     * RunL
+     */
+    void RunL();
+    
+    /**
+     * RunError
+     */
+    TInt RunError( TInt aError );
+    
+    /**
+     * DoCancel
+     */
+    void DoCancel();
+   
+
+private:    
+    
+    // current network event that will be passed to client by ipc communication
+    TUpnpConnectionManagerNetworkEvent iCurrentNetworkEvent;
+    
+    // determines if session to server is maintaned by the class
+    TBool iSessionOwner;
+    
+    // connection manager client    
+    RUpnpConnectionManagerSession* iConnectionManagerSession;
+    
+    // event observer
+    MUpnpNetworkEventObserver& iNetworkEventObserver;
+
+    // In case of KErrNoMemory error during creation of object
+    CUpnpNetworkEventSubscriberError* iNetworkEventSubscriberError;
+    };     
+    
+#endif // C_UPNPCONNECTIONMANAGERNETWORKEVENTPROVIDER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpconnmanagereventtypes.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+/** @file
+* 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:  Connection manager / common definitions for cliet and server
+*
+*/
+
+#ifndef T_UPNPCONNECTIONMANAGEREVENTTYPES_H
+#define T_UPNPCONNECTIONMANAGEREVENTTYPES_H
+
+// DATA TYPES
+// opcodes used in message passing between client and server
+enum TUpnpCmRqst
+    {
+    EEnsureStartRConnection = 1,
+    EIsRConnectionStarted,
+    EEventSubscribe,
+    ECancelEventSubscribe,
+    ECmActiveIap,
+    ECmGetAddress
+    };
+
+// server response for subscription
+enum TUpnpCmSubRsp
+    {
+    EUnknownEvent = 1,
+    EConnectionClosedEvent,
+    EWlanLostEvent,
+    EAddressChangeEvent    
+    };
+    
+#endif  // T_UPNPCONNECTIONMANAGEREVENTTYPES_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpcons.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,375 @@
+/** @file
+* 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:  Constants
+*
+*/
+
+
+#ifndef C_UPNPCONS_H
+#define C_UPNPCONS_H
+
+// INCLUDES
+#include <in_sock.h>
+//#include <PathInfo.h>
+#include "upnperrors.h"
+
+#define D_LIT8(name,s) (TDesC8&)_LIT8(name, s)
+
+//#define __DEFINES_IN_USE__
+
+// CONSTANTS
+_LIT( KSessionIdSemaphoreName,       "SessIdSemaphore" );
+_LIT( KSessionIdAccessSemaphoreName, "SessIdAccessSemaphore" );
+
+
+_LIT8( KPrinterDevice,       "urn:schemas-upnp-org:device:Printer:1" );
+_LIT8( KMediaServerDevice,   "urn:schemas-upnp-org:device:MediaServer:1" );
+_LIT8( KMediaRendererDevice, "urn:schemas-upnp-org:device:MediaRenderer:1" );
+
+const TInt KMaxFixed144Left = 14;
+const TInt KMaxFixed144Right = 4;
+const TInt KDefaultHttpPortNumber = 80;
+const TInt KMaxIntegerLength=10;
+
+const TInt KErrHttpBadRequest = -400;
+const TInt KRandomPort = 0;
+
+
+// ENUMERATIONS
+    enum TArgumentType
+    {
+        EUi1,
+        EUi2,
+        EUi4,
+        EI1,
+        EI2,
+        EI4,
+        EInt,
+        ER4,
+        ER8,
+        ENumber,
+        EFixed144,
+        EFloat,
+        EChar,
+        EString,
+        EDate,
+        EDateTime,
+        EDateTimeTz,
+        ETime,
+        ETimeTz,
+        EBoolean,
+        EBinBase64,
+        EBinHex,
+        EUri,
+        EUuid,
+        EUnknown
+    };
+
+    typedef TArgumentType TStateVariableType;
+    
+
+
+namespace UpnpString
+{
+    static const TInt KMaxFilenameLength = 100;
+    static const TInt KShortStringLength = 30;
+    static const TInt KDefaultStringLength = 150;
+    static const TInt KMaxIntLength = 11;
+    static const TInt KMaxTUintLength = 10;
+    static const TInt KMaxAddrOutputLength = 20;
+
+    static const TInt KMaxUuidLength = 43;
+
+    static const TInt KMaxHeaderLength = 512;
+    static const TInt KSocketBufferSize = 1024;
+    
+    static const TInt KDateTimeStringLen = 50;
+    
+    static const TInt KLineFeedLength = 2; 
+    static const TInt KCRLFLength = 2; 
+    static const TInt KDoubleLineFeedLength = 4;
+    static const TInt KCRLFCRLength = 3;
+    static const TInt KLinefeedLength = 1;
+    static const TInt KCRLength = 1;
+    
+    
+
+    
+    _LIT8( KColon,              ":" );
+    _LIT8( KEqual,              "=" );    
+    _LIT8( KDblColon,           "::" );
+    _LIT8( KSemiColon,          ";" );
+    _LIT8( KSpace,              " " );
+    _LIT8( KTab,                "\t" );
+    _LIT8( KSlash,              "/" );
+    _LIT8( KDoubleSlash,        "//" );
+    _LIT8( KInvComma,           "\"" );
+    _LIT8( KMinus,              "-" );
+    _LIT8( KComa,               "," );
+
+    _LIT( KColon16,             ":" );
+    _LIT( KDblColon16,          "::" );
+    _LIT( KSemiColon16,         ";" );
+    _LIT( KSpace16,             " " );
+    _LIT( KSlash16,             "/" );
+    _LIT( KDoubleSlash16,       "//" );
+    
+    _LIT8(  KDot8,              "." );
+    _LIT16( KDot16,             "." );
+    _LIT16( KDoubleBackSlash16, "\\" );
+    _LIT8( KDoubleBackSlash,    "\\" );    
+    _LIT8( KLinefeed,           "\n" );
+    _LIT8( KCRLF,               "\n\n" );
+    
+    _LIT8( KEmpty,              "" );
+    _LIT( KEmpty16,             "" );
+        
+    _LIT8( KLineFeed,           "\r\n" );
+    _LIT8( KCRLFSP,             "\r\n " );
+    _LIT8( KCRLFHT,             "\r\n\t" );
+    _LIT8( KCR,                 "\r" );
+    _LIT8( KLFCRLF,             "\n\r\n" );    
+    _LIT8( KCRLFCR,             "\r\n\r" ); 
+    _LIT8( KDoubleLineFeed,     "\r\n\r\n" );    
+
+    // used in HttpSession::CheckIfExistsL    
+    _LIT( KUnderScore, "_" );
+
+}
+
+namespace UpnpPaths
+{    
+    // _LIT8( KDefaultMediaPath,    "c:\\My Files\\Image gallery\\");
+    _LIT8( KDefaultMediaPath,       "c:\\nokia\\" );
+    // _LIT8( KDefaultMediaPath,    "e:\\" ); 
+
+    // #define KDefaultMediaPath PathInfo::PhoneMemoryRootPath()
+    // _LIT( KDefaultMediaPath,     "C:\\My Files\\Image gallery\\" );  
+    // #define KDefaultMediaPath PathInfo::PhoneMemoryRootPath()
+
+    _LIT8( KLoggingPath,                    "c:\\logs\\upnp\\" );
+    _LIT8( KDefaultPostedFilesPath,         "c:\\System\\data\\upnp\\posted\\" );
+    _LIT8( KMediaserverHttpDocumentRoot,    "/Media/MediaServerContent/" );
+    _LIT16( KLoggingPath16,                 "c:\\logs\\upnp\\" );
+    _LIT16( KDefaultPostedFilesPath16,      "c:\\System\\data\\upnp\\posted\\" );
+    _LIT16( KMediaserverHttpDocumentRoot16, "/Media/MediaServerContent/" );
+    
+    //patterny for checking if current folder/filename is allowed to share
+    _LIT(KForbiddenPrivateFolderPattern,    "?:\\private\\*"); 
+    _LIT(KForbiddenZDrivePattern,           "z:\\*");     
+
+    static const TInt KDriveLength = 1;    // C or E
+    
+}
+
+namespace UpnpSocket
+{
+    static const TInt KMaxConnectionsInQueue = 2;
+}
+
+namespace UpnpGENA
+{
+    _LIT8( KGenaSubscribe,      "SUBSCRIBE" );
+    _LIT8( KGenaUnSubscribe,    "UNSUBSCRIBE" );
+    _LIT8( KGenaNotify,         "NOTIFY" );
+    
+    _LIT8( KCallback,           "CALLBACK" );
+    _LIT8( KTimeout,            "TIMEOUT" );
+    _LIT8( KContentType,        "Content-Type" );
+    _LIT8( KSeq,                "SEQ" );
+    _LIT8( KSid,                "SID" );
+
+    _LIT8( KDefaultNt,          "upnp:event" );
+    _LIT8( KDefaultNts,         "upnp:propchange" );
+    _LIT8( KDefaultContentType, "text/xml" );
+    _LIT8( KTextXmlUtf8,        "text/xml; charset=\"utf-8\"");
+
+    _LIT8( KGenaEvent,          "schemas-upnp-org:event-1-0" );
+}
+
+namespace UpnpHTTP
+{
+    static const TInt KDefaultHTTPPort = 50001;
+    _LIT8( KSchemeSeparator,    "://" );
+    _LIT( KSchemeSeparator16,   "://" );
+    
+    _LIT8( TransferCoding,      "Transfer-Coding:" );
+    _LIT8( TransferEncoding,    "Transfer-Encoding:" );
+    _LIT8( KConnection,         "Connection" );
+    _LIT8( Chunked,             "Chunked" );
+    _LIT8( KClose,              "close" );
+
+    _LIT8( KHTTPUrl,            "http://" );
+    _LIT8( KHdrContentLength,   "Content-Length" );    
+    _LIT8( KHdrContentType,     "Content-Type" );    
+    _LIT8( KHdrDate,            "Date" );
+    _LIT8( KHdrExt,             "EXT:" );
+    _LIT8( KHdrExtWithoutColon, "EXT" );
+    
+    _LIT8( KHdrExpect,          "Expect" );
+    _LIT8( K100Continue,        "100-continue" );
+    
+    _LIT8( KHdrRange,           "Range" );
+    _LIT8( KHdrContentRange,    "Content-Range" );
+    _LIT8( KBytes,              "bytes" );
+    _LIT8( KHTTPPartialContent, "HTTP/1.1 206 Partial Content");
+    _LIT8( KHTTPNoContent,      "HTTP/1.1 204 No Content");
+
+    _LIT8( KHdrPragma,          "Pragma" );
+    _LIT8( KHdrCacheControl,    "Cache-Control" );
+    _LIT8( KNoCache,            "no-cache" );
+    
+    _LIT8( KHdrUserAgent,       "User-Agent" );
+    _LIT8( KCPUserAgentValue,   "DLNADOC/1.50 UPnP/1.0" );
+    _LIT8( KHdrServer,          "Server" );
+    
+    _LIT( TransferCoding16,     "Transfer-Coding:" );
+    _LIT( TransferEncoding16,   "Transfer-Encoding:" );
+    _LIT( KConnection16,        "Connection" );
+    _LIT( Chunked16,            "Chunked" );
+
+    _LIT( KHTTPUrl16,           "http://" );
+    _LIT( KHdrContentLength16,  "Content-Length" );
+    _LIT( KHdrDate16,           "Date" );
+    _LIT( KHdrExt16,            "EXT:" );
+
+    _LIT8( KHTTPOk,             "HTTP/1.1 200 OK" );
+    
+    _LIT8( KDefaultDate,        "Sun, 06 Nov 1994 08:49:37 GMT" );
+    //schemes
+    _LIT( KSchemeFile,          "file" );
+    _LIT8( KSchemeFile8,        "file" );
+    _LIT( KSchemeHTTP,          "http" );
+    _LIT8( KSchemeHTTP8,        "http" );
+
+    _LIT8( KHdrAcceptLanguage,  "Accept-Language" );
+    _LIT8( KHdrContentLanguage, "Content-Language" );
+    _LIT8( KLanguageEn,         "en" );
+    _LIT8( KContentLength,      "Content-Length:" );
+    _LIT8( KContentType,        "Content-Type:" );
+}
+
+namespace UpnpSSDP
+{
+    static const TInt KDefaultSSDPPort = 50101;
+    static const TInt KMaxMessageLength = 2048;
+    
+    static const TUint KMulticastAddress = INET_ADDR(239,255,255,250);
+    static const TInt KMulticastPort = 1900;
+    static const TInt KHdrSTLen = 2;
+    static const TInt KIPAddBuffLen = 100;
+    static const TInt KDefaultMaxAgeValue = 1800;
+
+
+    _LIT8( KNotify,               "NOTIFY" );
+    _LIT8( KMSearch,              "M-SEARCH" );
+ 
+    _LIT8( KMethodNotify,         "NOTIFY * HTTP/1.1" );
+    _LIT8( KMethodMSearch,        "M-SEARCH * HTTP/1.1" );
+    
+    _LIT8( KHdrHost,              "Host" );
+    _LIT8( KHdrCacheControl,      "Cache-Control" );
+    _LIT8( KHdrLocation,          "Location" );
+    _LIT8( KHdrLOCATION,          "LOCATION" );
+    _LIT8( KHdrSearchTarget,      "NT" );
+    _LIT8( KHdrSEARCHTARGET,      "Nt" );
+    _LIT8( KHdrNotificationType,  "NTS" );
+    _LIT8( KHdrNOTIFICATIONTYPE,  "Nts" );
+    _LIT8( KHdrServer,            "Server" );
+    _LIT8( KHdrUuid,              "USN" );
+    _LIT8( KHdrUUID,              "Usn" );
+    _LIT8( KHdrMan,               "Man" );
+    _LIT8( KHdrMx,                "MX" );
+    _LIT8( KHdrSt,                "ST" );
+        
+    _LIT8( KNotificationAlive,    "ssdp:alive" );
+    _LIT8( KNotificationByebye,   "ssdp:byebye" );
+    _LIT8( KNotificationDiscover, "\"ssdp:discover\"" );
+    
+    _LIT8( KDefaultOS,            "Symbian OS 7.0s" );    
+    _LIT8( KDefaultProduct,       "Nokia phone" );
+    
+    _LIT8( KDefaultMaxAge,        "max-age=1800" );
+    _LIT8( KSsdpMaxAge,           "max-age" );
+    _LIT8( KDefaultHost,          "239.255.255.250:1900" );
+    _LIT8( KDefaultLocation,      "239.255.255.250:1900" );
+    _LIT8( KDefaultResponseDelay, "2" );
+    
+    _LIT8( KUPnPRootDevice,       "upnp:rootdevice" );
+    _LIT8( KSearchTargetAll,      "ssdp:all" );
+    
+    _LIT8( KUPnPUuid,             "uuid:" );
+    _LIT8( KUPnPDeviceSchema,     "urn:schemas-upnp-org:device:" );
+    _LIT8( KUPnPServiceSchema,    "urn:schemas-upnp-org:service:" );
+    
+    _LIT8( novalue,               "NoValue" );
+}
+
+namespace UpnpCD
+{
+    _LIT8( KQuotation,          "\""); 
+    _LIT8( KQuotationWithSpace, "\" ");
+    _LIT8( KObjectID,           "ObjectID");
+    _LIT8( KSpace,              " ");
+    _LIT8( KSpace8,             " ");
+    _LIT8( KKorp,               "<"); 
+    _LIT8( KKorpSlash,          "</"); 
+    _LIT8( KProk,               ">");
+    _LIT8( KOne,                "1");
+    _LIT8( KZero,               "0");
+    _LIT8( KMinusOne,           "-1");
+    _LIT8( KClosingBracket,     ")");
+    _LIT8( KClosingBracketWithQuotation, "\")");
+    _LIT8( KPlainLineFeed,      "\r\n");
+    _LIT8( Keq,                 "=\"");
+    _LIT8( KOneNumber,          "%i");
+    _LIT8( KComma,              ",");
+    _LIT8( KEmptyString,        "");
+    _LIT8( KColon,              ":");
+    _LIT8( KErrorHere,          "Here is an ERROR!");
+    _LIT8( KOneNumber8,         "%i");
+    _LIT8( Ktrue,               "true");
+    _LIT8( Kfalse,              "false");
+    _LIT8( KRequired,           "r");    // stands for required
+    _LIT8( kElement,            "e"); // stands for element
+    _LIT8( KProperty,           "p");
+    _LIT8( kYes,                "1");
+    _LIT8( KProperties,         "ps");
+    _LIT8( kName,               "n");
+    _LIT8( kInherited,          "i");
+    _LIT8( kItem,               "i");
+    _LIT8( KType,               "type");
+    _LIT8( kAttribute,          "Attribute");
+    _LIT8( kNo,                 "0");
+}
+
+namespace UpnpDLNA
+{
+    _LIT8( KHdrTransferMode,            "transferMode.dlna.org");
+    _LIT8( KTransferModeStreaming,      "Streaming");
+    _LIT8( KTransferModeInteractive,    "Interactive");
+    _LIT8( KTransferModeBackground,     "Background");
+    
+    _LIT8( KHdrTimeSeekRange,           "TimeSeekRange.dlna.org");
+    _LIT8( KHdrPlaySpeed,               "PlaySpeed.dlna.org");
+    _LIT8( KHdrRealTimeInfo,            "realTimeInfo.dlna.org");
+
+    _LIT8( KHdrContentFeatures,         "contentFeatures.dlna.org");
+    _LIT8( KHdrGetcontentFeatures,      "getcontentFeatures.dlna.org");
+    _LIT8( KHdrGetcontentFeaturesValue, "1");
+}
+
+#endif // C_UPNPCONS_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpdescriptionproperty.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,116 @@
+/** @file
+* 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:  Declares the CUpnpDevice class
+*
+*/
+
+
+#ifndef C_CUPNPDESCRIPTIONPROPERTY_H
+#define C_CUPNPDESCRIPTIONPROPERTY_H
+
+
+// INCLUDES
+#include <e32std.h>
+#include <badesca.h>
+#include <f32file.h>
+#include <s32file.h> 
+
+
+// FORWARD DECLARATIONS
+class TUpnpDevice;
+class TUpnpService;
+class CUpnpIcon;
+
+
+// CLASS DECLARATION
+/**
+*  This class stores properties of a device, like: manufacturer, UDN and so on.
+*  @lib serviceframework.lib
+*  @since Series60 3.2
+*/
+
+class CUpnpDescriptionProperty: public CBase
+{
+public:
+    
+    /**
+    * Two-phased constructor.    
+    * @since Series60 3.2 
+    * @param aName new property name
+    * @param aValue new property value
+    */	
+    static CUpnpDescriptionProperty* NewL( const TDesC8& aName, const TDesC8& aValue );
+    
+    /**
+    * Two-phased constructor.    
+    * @since Series60 3.2    
+    */
+    static CUpnpDescriptionProperty* NewL();
+    
+    /**
+    * Default C++ constructor    
+    * @since Series60 3.2    
+    */
+    CUpnpDescriptionProperty();
+                    
+    /**
+    * Destructor of the class.     
+    * @since Series60 3.2    
+    */
+    ~CUpnpDescriptionProperty();
+    
+    /**
+    * 2nd phase constructor    
+    * @since Series60 3.2
+    * @param aName new property name
+    * @param aValue new property value
+    */
+    void ConstructL( const TDesC8& aName, const TDesC8& aValue );
+    
+    /**
+    * Setter for property name    
+    * @since Series60 3.2
+    * @param aName new property name
+    */
+    void SetNameL( const TDesC8& aName);
+    
+    /**
+    * Setter for property value    
+    * @since Series60 3.2
+    * @param aValue new property value
+    */
+    void SetValueL( const TDesC8& aValue );
+    
+    /**
+    * Getter for property name    
+    * @since Series60 3.2
+    * @return property name
+    */
+    const TDesC8& Name();
+    
+    /**
+    * Getter for property value
+    * @since Series60 3.2
+    * @return property value
+    */
+    const TDesC8& Value();
+
+private:
+    HBufC8* iName;
+    HBufC8* iValue;    
+};
+
+#endif  // C_CUPNPDESCRIPTIONPROPERTY_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpdevice.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,627 @@
+/** @file
+* 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:  Declares the CUpnpDevice class
+*
+*/
+
+
+#ifndef C_CUPNPDEVICE_H
+#define C_CUPNPDEVICE_H
+
+// INCLUDES
+
+#include <e32std.h>
+#include <badesca.h>
+#include "upnpservice.h"
+#include "upnpdescriptionproperty.h"
+
+// FORWARD DECLARATIONS
+class TUpnpDevice;
+class TUpnpService;
+class CUpnpIcon;
+class CUpnpDescriptionProperty;
+
+// CONSTANTS
+const TInt KDefaultDescriptionUrlPort = 80;
+
+/**
+ *  Device
+ *
+ *  Prior using the CUpnpDevice class, client application has to create the network
+ *  connection. If connection is not up and running, the
+ *  CUpnpDispatcherEngine class construction will fail.
+ *  See UPnP Interface Design document for instuctions.
+ *
+ *  @since Series60 2.6
+ */
+class CUpnpDevice : public CBase
+    {
+
+public:
+    /**
+     * Localization of device (local, home network or remote)
+     */
+    enum TUpnpDeviceNetwork
+        {
+        EUnknown = 0,
+        ELocalDevice,
+        EHomeNetwork,
+        ERemoteDevice
+        };
+public:
+    // Constructors and destructor
+
+    /**
+     * Two-phased constructor.
+     * @param aDevice Device to create new device from.
+     * @param aServices Services for the new device.
+     * @return A new CUpnpDevice instance.
+     */
+    IMPORT_C static CUpnpDevice* NewL( const TUpnpDevice* aDevice,
+            const RPointerArray<TUpnpService>& aServices );
+
+    /**
+     * Destructor.
+     */
+    virtual ~CUpnpDevice();
+
+public: // New functions
+
+    // Device description XML-inferface functions
+
+    /**
+     * XML-inferface function.
+     * @since Series60 2.6
+     * @return Content of deviceType-tags in device description. KNullDesC8
+     * if not found.
+     */
+    IMPORT_C const TPtrC8 DeviceType();
+
+    /**
+     * XML-inferface function.
+     * @since Series60 2.6
+     * @return Content of friendlyName-tags in device description.
+     * KNullDesC8 if not found.
+     */
+    IMPORT_C const TPtrC8 DescriptionProperty(const TDesC8& aPropertyName);
+
+    // servicelist
+
+    /**
+     * XML-inferface function.
+     * @since Series60 2.6
+     * @return Array of listed servicetyped in device description
+     * service. KNullDesC8 if not found.
+     */
+    IMPORT_C CDesC8Array& ServiceTypesL();
+
+    /**
+     * XML-inferface function.
+     * @since Series60 2.6
+     * @param aServiceType Type of the service.
+     * @return Content of serviceId-tags in device description of asked
+     * service. KNullDesC8 if not found.
+     */
+    IMPORT_C const TPtrC8 ServiceId( const TDesC8& aServiceType );
+
+    /**
+     * XML-inferface function.
+     * @since Series60 2.6
+     * @param aServiceType Type of the service.
+     * @return Content of SCDPURL-tags in device description of asked
+     * service. KNullDesC8 if not found.
+     */
+    IMPORT_C const TPtrC8 ServiceDescriptionUrl( const TDesC8& aServiceType );
+
+    // end servicelist
+
+    /**
+     * Getter.
+     * @since Series60 2.6
+     * @return iServiceList.
+     */
+    IMPORT_C RPointerArray<CUpnpService>& ServiceList();
+
+    /**
+     * Getter (embedded devices).
+     * @since Series60 2.6
+     * @return iDeviceList.
+     */
+    IMPORT_C RPointerArray<CUpnpDevice>& DeviceList();
+
+    /**
+     * Gets whole embedded hierarchy as a flat list.
+     * @since Series60 2.6
+     * @return device list.
+     */
+    IMPORT_C void GetAllDevices( RPointerArray<CUpnpDevice>& aDevices );
+
+    /**
+     * Getter.
+     * @since Series60 2.6
+     * @return iIcons.
+     */
+    IMPORT_C RPointerArray<CUpnpIcon>& Icons();
+
+    /**
+     * Getter.
+     * @since Series60 2.6
+     * @return ETrue if alive.
+     */
+    IMPORT_C TBool Alive() const;
+
+    /**
+     * Setter.
+     * @since Series60 2.6
+     * @param aAlive Desired TBool.
+     */
+    IMPORT_C void SetAlive( TBool aAlive );
+
+    /**
+     * Getter.
+     * @since Series60 3.2
+     * @return ETrue if device expired.
+     */
+    IMPORT_C TBool Expired() const;
+
+    /**
+     * Setter.
+     * @since Series60 3.2
+     * @param aAlive Desired TBool.
+     */
+    IMPORT_C void SetExpired( TBool aAlive );
+
+    /**
+     * Getter.
+     * @since Series60 2.6
+     * @return ETrue if local.
+     */
+    IMPORT_C TBool Local() const;
+
+    /**
+     * Setter.
+     * @since Series60 2.6
+     * @param aLocal Desired TBool.
+     */
+    IMPORT_C void SetLocal( TBool aLocal );
+
+    /**
+     * Getter.
+     * @since Series60 5.0
+     * @return ETrue if remote.
+     */
+    IMPORT_C TBool Remote() const;
+
+    /**
+     * Getter.
+     * @since Series60 5.0
+     * @return Device network type.
+     */
+    IMPORT_C TUpnpDeviceNetwork DeviceNetwork() const;
+
+    /**
+     * Setter.
+     * @since Series60 5.0
+     * @param aNetworkType Desired network.
+     */
+    IMPORT_C void SetDeviceNetwork( TUpnpDeviceNetwork aNetworkType );
+
+    /**
+     * Getter.
+     * @since Series60 2.6
+     * @return UUID of the device.
+     */
+    IMPORT_C const TPtrC8 Uuid();
+
+    /**
+     * Setter.
+     * @since Series60 3.2
+     * @param aUUID New device UUID.
+     */
+    void SetUuidL( const TDesC8& aUUID );
+	
+	/**
+     * Adds device
+	 * @param device 
+     * @since Series60 2.6
+     */
+    void AddDeviceL( CUpnpDevice* device );
+
+    /**
+     * Getter.
+     * @since Series60 2.6
+     * @return iDescriptionUrl. KNullDesC8 if not set.
+     */
+    IMPORT_C const TDesC8& DescriptionUrl() const;
+	
+	/**
+     * Sets description Url
+	 * @param aDescriptionUrl 
+     * @since Series60 2.6
+     */
+    void SetDescriptionUrlL( const TDesC8& aDescriptionUrl);
+    
+    /**
+     * Getter
+     * @since Series60 2.6
+     * @return DescriptionUrlPath.
+     * 
+     * @note Method for internal use.
+     */
+    IMPORT_C const TPtrC8 DescriptionUrlPath() const;
+
+    /**
+     * Getter.
+     * @since Series60 2.6
+     * @return DescriptionUrlAddressL.
+     */
+    IMPORT_C TInetAddr DescriptionUrlAddressL() const;
+
+    /**
+     * Getter.
+     * @since Series60 2.6
+     * @return DescriptionUrlPort. KErrNotFound if invalid.
+     * 
+     * @note Method for internal use.
+     */
+    IMPORT_C TInt DescriptionUrlPort() const;
+
+    /**
+     * Add service to dispatcher.
+     * @since Series60 2.6
+     * @param aService Attached service.
+     */
+    void AttachServiceL( CUpnpService* aService );
+
+    /**
+     * Sets the address of this device.
+     * @since Series60 2.6
+     * @param aAddr Address.
+     */
+    IMPORT_C void SetAddress( const TInetAddr& aAddr );
+
+    /**
+     * Returns the address of this device.
+     * @since Series60 2.6
+     * @return Address of device.
+     */
+    IMPORT_C virtual TInetAddr Address();
+
+    /**
+     * Adds aSessionId to list, that contains sessionIds
+     * of currently pending service HTTP GET requests.
+     * @since Series60 2.6
+     * @param aSessionId Session ID.
+     */
+    IMPORT_C void WaitServiceDescriptionL( TInt aSessionId );
+
+    /**
+     * Returns count of currently pending service HTTP GET
+     * requests.
+     * @since Series60 2.6
+     * @return Number of service descriptions which aren't yet received.
+     */
+    IMPORT_C TInt WaitServiceDescriptionCount();
+
+    /**
+     * Returns a sessionId of HTTP GET in array, that has
+     * index of aIndex.
+     * @since Series60 2.6
+     * @param aIndex Index of sessionId.
+     * @return SessionId.
+     */
+    IMPORT_C TInt WaitServiceDescriptionSessionId(TInt aIndex);
+
+    /**
+     * Removes session id from device's service receiving list.
+     * This sessionId is in array position of aIndex.
+     * @since Series60 2.6
+     * @param aIndex Index of sessionId.
+     */
+    IMPORT_C void WaitServiceDescriptionRemoveSessionId( TInt aIndex );
+
+    enum TServiceAdd
+        {
+        ENotServiceAdded,
+        EServiceAdded,
+        EAllServicesAdded
+        };
+
+    /**
+     * For Control point. State of icon receiving.
+     * @since Series60 2.6
+     * @return Refer to enum TServiceAdd for possible values.
+     */
+    TServiceAdd ServiceDescriptionReceiveState() const
+        {
+        return iServiceDescriptionReceiveState;
+        }
+
+    /**
+     * Adds aSessionId into list of currently pending icon requests.
+     * @since Series60 2.6
+     * @param aSessionId Session ID.
+     */
+    IMPORT_C void WaitIconL( TInt aSessionId );
+
+    /**
+     * Adds a service to this device. Returns EAllServicesAdded, if
+     * information about all services on this device has been received.
+     * Else returns EServiceAdded.
+     * @since Series60 2.6
+     * @param aSessionId Session ID.
+     * @param aHttpMsgBody   Body of a HTTP-message.
+     * @return Refer to enum TServiceAdd for possible values.
+     */
+    IMPORT_C TServiceAdd AddServiceL( TInt aSessionId,
+            CUpnpService* aService );
+
+    enum TIconAdd
+        {
+        ENotIconAdded,
+        EIconAdded,
+        EAllIconsAdded
+        };
+
+    /**
+     * For Control point. State of icon receiving.
+     * @since Series60 2.6
+     * @return Refer to enum TIconAdd for possible values.
+     */
+    TIconAdd IconReceiveState() const
+        {
+        return iIconReceiveState;
+        }
+
+    /**
+     * Adds a icon to this device. Returns EAllIconsAdded, if
+     * all icons for this device has been downloaded. Else returns
+     * EIconAdded.
+     * @since Series60 2.6
+     * @param aSessionId Session ID.
+     * @return Refer to enum TIconAdd for possible values.
+     */
+    IMPORT_C TIconAdd AddIcon(TInt aSessionId);
+
+    /**
+     * Concatenate given URL with URLBase if exists
+     * @param URL to concatanate
+     * @return concatenated URL
+     */
+    IMPORT_C HBufC8* ConcatWithUrlBaseL(const TDesC8& aUrl);
+
+    /**
+     * Get information from device description.
+     * Given parameter is name of XML-tag in device description.
+     * @param aProperty name of element in device description
+     * @return value of given element or empty value
+     */
+    IMPORT_C TPtrC8 GetProperty(const TDesC8& aProperty);
+	
+	/**
+     * Sets type of device
+	 * @param aType 
+     * @since Series60 2.6
+     */
+    void SetTypeL(const TDesC8& aType);
+	
+	/**
+     * Adds a specific device property
+	 * @param aDeviceProperty 
+     * @since Series60 2.6
+     */
+    void AddDevicePropertyL( CUpnpDescriptionProperty* aDeviceProperty);
+
+	/**
+     * Adds icon
+	 * @param aIcon 
+     * @since Series60 2.6
+     */
+    IMPORT_C void AddIconL( CUpnpIcon* aIcon);
+
+    /**
+     * Get information about service IDs    
+     * @return array of service ids
+     */
+    IMPORT_C CDesC8Array& ServiceIdL();
+	
+	/**
+     * Makes a copy of device
+     * @since Series60 2.6
+     * @return CUpnpDevice
+     */
+    IMPORT_C CUpnpDevice* CloneL();
+
+    /**
+     * Removes service from iServiceList.
+     * @since Series60 3.2
+     * @param aService Service to detach.
+     */
+    void DetachService( CUpnpService *aService );
+
+public: // Functions from base classes
+
+    /**
+     * Removes IP address in front of the url leaving only path to file.
+     * @since Series60 2.6
+     * @return The path part of url.
+     */
+    static TPtrC8 RemoveIpAddress( const TDesC8& aAddress );
+	
+	/**
+     * Marks out that the device is root
+	 * @param aIsRoot
+     * @since Series60 2.6
+     */
+    void SetRootDevice(TBool aIsRoot);
+
+    /**
+     * C++ default constructor.
+     */
+    CUpnpDevice();
+
+private:
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL( const TUpnpDevice* aDevice,
+            const RPointerArray<TUpnpService>& aServices );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CUpnpDevice* NewL( const TDesC8& aDescription );
+
+    /**
+     * This function is used for removing old icon request session 
+     * id from list and adding a new one.
+     * @since Series60 2.6
+     * @param aOldSessionId Old session id that is to be removed from list.
+     * @param aNewSessionId New session id that is to be added to list.
+     * @return KErrNone if ok, otherwise error code.
+     */
+    TInt ChangeIconSessionIdL( const TInt aOldSessionId,
+            const TInt aNewSessionId );
+
+    /**
+     * This function checks if given session id exists in 
+     * @since Series60 2.6
+     * @param aSessionId Session id that is searched from the list.
+     * @return index in array or KErrNotFound.
+     */
+    TInt CheckIconSessionIdExist( const TInt aSessionId );
+
+public: //Getters for some xml content.
+
+    /**
+     * This function gives <URLBase> tag value.
+     */
+    IMPORT_C const TPtrC8 UrlBase();
+
+    /**
+     * This function gives <presentationUrl> value. 
+     */
+    IMPORT_C const TPtrC8 PresentationUrl();
+
+    /**
+     * This function set UrlBase value if it is empty in xml document.
+     */
+    IMPORT_C void SetUrlBaseL(const TDesC8& aUrlBase);
+
+    /**
+     *
+     * @since Series S60 3.1
+     * @return ETrue if it is an embbeded device
+     */
+    IMPORT_C TBool IsEmbeddDevice();
+
+    /**
+     * General initializations, internal usage.
+     * @since Series60 2.6
+     */
+    void Init();
+
+    /**
+     * Cleanups array
+     * @since Series S60 3.2
+     */
+    void CleanupServiceArray();
+
+protected: // Data
+
+    // time value
+    TInt64 iTimeValue;
+
+    // list of session IDs of icons not yet arrived
+    RArray<TInt> iIconSessionIds;
+
+    // list of session IDs of Service Descriptions not yet arrived
+    RArray<TInt> iServiceDescriptionSessionIds;
+
+    // list of icons this device has.
+    RPointerArray<CUpnpIcon> iIcons;
+
+    // this is a pointer list to service infos contained in device description
+    // RPointerArray<CUpnpService> iServices;
+
+    // this is a pointer list to the CUpnpDevice structures
+    // contains embedded devices of this device
+    RPointerArray<CUpnpDevice> iDeviceList;
+
+    // this is a pointer list to the CUpnpService structures; 
+    // real service structures based on service descriptions
+    RPointerArray<CUpnpService> iServiceList;
+
+    // State of adding services. When all services has been added
+    // to this device, iServiceDescriptionReceiveState is EAllServicesAdded
+    TServiceAdd iServiceDescriptionReceiveState;
+
+    // State of adding icons. When all icons has been received,
+    // iIconReceiveState is EAllIconsAdded.
+    TIconAdd iIconReceiveState;
+
+    // member variables for CUpnpDevice that has the data of device description
+    CDesC8ArrayFlat* iServiceTypes;
+
+    // alive flag
+    TBool iAlive;
+
+    // Indicate if device cache-control time expired
+    TBool iExpired;
+
+    // icons flag
+    TBool iIsAllIconsArrived;
+
+    // Network type (local, home or remote).
+    TUpnpDeviceNetwork iNetworkType;
+
+    // Url to this device's Device Description Document.
+    HBufC8* iDescriptionURL;
+
+    // device type
+    HBufC8* iDeviceType;
+
+    // domain
+    HBufC8* iDomain;
+
+    // device UDN without "uuid:"-prefix
+    HBufC8* iUUID;
+
+    // seq
+    HBufC8* iClockSeq;
+
+    // address
+    TInetAddr iAddress;
+
+    // for logging into right thread log
+    TInt iHandle;
+
+    // root device flag
+    TBool iIsRootDevice;
+
+    // Device description file information
+    HBufC* iDeviceDescription;
+    // properties
+    RPointerArray<CUpnpDescriptionProperty> iProperties;
+
+    /*UrlBase valueu if in document is empty*/
+    HBufC8* iUrlBase;
+
+    // services id     
+    CDesC8ArrayFlat* iServicesId;
+    };
+
+#endif  // C_CUPNPDEVICE_H
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpdevicedescription.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,58 @@
+/** @file
+* 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:  Declares the CUpnpDeviceDescription class
+*
+*/
+
+
+#ifndef C_CUPNPDEVICEDESCRIPTION_H
+#define C_CUPNPDEVICEDESCRIPTION_H
+
+// INCLUDES
+
+
+#include "upnpdevice.h"
+
+/**
+ *  Device
+ *
+ *  Prior using the CUpnpDeviceDescription class, client application has to create the network
+ *  connection. If connection is not up and running, the
+ *  CUpnpDispatcherEngine class construction will fail.
+ *  See UPnP Interface Design document for instuctions.
+ *
+ *  @since Series60 2.6
+ */
+class CUpnpDeviceDescription : public CUpnpDevice
+    {
+
+public:
+    /**
+     * Destructor.
+     */
+    IMPORT_C virtual ~CUpnpDeviceDescription();
+
+public: // New functions
+
+    IMPORT_C void SetDescriptionUrlL( const TDesC8& aDescriptionUrl);
+    
+    /**
+     * C++ default constructor.
+     */
+    IMPORT_C CUpnpDeviceDescription();
+
+    };
+
+#endif  // C_CUPNPDEVICEDESCRIPTION_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpdiscoveryobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,56 @@
+/** @file
+* Copyright (c) 2007-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:  Dispacther parent interface
+*
+*/
+
+
+#ifndef C_MUpnpDiscoveryObserver_H
+#define C_MUpnpDiscoveryObserver_H
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+
+/** 
+    @brief An interface from dispatcher to its parent (device/control point)
+    
+    This interface class is used to provide an interface from dispather to 
+    its users. 
+*/
+class MUpnpDiscoveryObserver
+{
+public:
+    /** 
+    * This function is used by dispatcher to get the path of the messages coming
+    *       to this dispatcher.
+    * @return The path identifying the parent of the dispatcher
+    */
+    virtual const TDesC8 & Path() = 0;  
+
+    /** 
+    * Device found
+    * @param aDevice which has been found
+    */
+    virtual void DeviceFoundL( CUpnpDevice& aDevice ) = 0;
+
+    /** 
+    * Device lost
+    * @param aDevice which has been lost
+    */
+    virtual void DeviceLostL( CUpnpDevice& aDevice ) = 0;
+};
+
+#endif // C_MUpnpDiscoveryObserver_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpdispatcher.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,259 @@
+/** @file
+* 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:  Message dispacther
+*
+*/
+
+
+
+#ifndef C_CUPNPDISPATCHER_H
+#define C_CUPNPDISPATCHER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <badesca.h>
+#include "upnpnotifytimer.h"
+#include "upnpcommonstructs.h"
+#include "upnphttpmessage.h"
+#include "upnpdispatcherengineobserver.h"
+
+// FORWARD DECLARATIONS
+class CUpnpDispatcherEngine;
+class MUpnpDispatcherCustomer;
+class MUpnpDiscoveryObserver;
+class MUpnpHttpServerTransactionCreator;
+
+// CONSTANTS
+
+// CLASS DECLARATION
+
+/**
+    @brief A message dispatcher unit cooperating with Message Handler
+
+    This class represents a logical unit between UPnP devices / control
+    points and Message Handler.
+    Message Handler is a Symbian Server - thus, dispatcher follows the
+    same client/server framework and is a client that opens a session
+    to Message Handler. This is not done by class CUpnpDispatcher;
+    the class RUpnpDispatcherSession represents the client interface.
+
+    Using AddCustomer/RemoveCustomer functions it is possible to set
+    the active services. Dispatcher is able to forward messages
+    to its customers.
+
+    Also SendMessage function is very essential part of the dispatcher.
+ */
+class CUpnpDispatcher : public CBase,
+            public MDispatcherEngineObserver
+{
+public:
+    /**
+    * Create a CUpnpDispatcher object using two phase construction,
+    * and return a pointer to the created object.
+    *
+    *A session with Message Handler is initiated during the construction.
+    *
+    * @param aParent
+    * @return a pointer to the created instance of CUpnpDispatcher
+    */
+    IMPORT_C static CUpnpDispatcher* NewL( MUpnpDiscoveryObserver* aParent );
+
+
+    /**
+    * Create a CUpnpDispatcher object using two phase construction,
+    * and return a pointer to the created object
+    *
+    * A session with Message Handler is initiated during the construction.
+    *
+    * @param aParent the object to be used to handle updates from the server
+    * @return a pointer to the created instance of CUpnpDispatcher
+    */
+    IMPORT_C static CUpnpDispatcher* NewLC( MUpnpDiscoveryObserver* aParent ) ;
+
+    /**
+    * Destroy the object and release all memory objects
+    */
+    IMPORT_C virtual ~CUpnpDispatcher();
+
+private:
+    /**
+    * @function CUpnpDispatcher
+    *
+    * @discussion Perform the first phase of two phase construction
+    * @param aObserver the object to be used to handle updates from the server
+    */
+    CUpnpDispatcher( MUpnpDiscoveryObserver* aParent );
+
+    /**
+    * @function ConstructL
+    *
+    * @discussion Perform the second phase construction of a CUpnpDispatcher object
+    */
+    void ConstructL();
+
+public:
+    /**
+    * Sends a SSDP Search with 8-bit searchString.
+    * @param aSearchString String to use in SSDP ST -header.
+    */
+    IMPORT_C void SearchL( const TDesC8& aSearchString );
+
+    /**
+    * Sends a SSDP Search with 16-bit searchString. This method makes a
+    * conversion to 8-bit and then makes the search
+    * @param aSearchString Stfing to use in SSDP ST -header.
+    */
+    IMPORT_C void SearchL( const TDesC16& aSearchString );
+
+    /**
+    * Sends a stop filtering request. Device notification will not be
+    * stoped in ssdp.
+    * @param aUuids UUids.
+    */
+    IMPORT_C void StopFilteringL( const TDesC8& aUuids );
+
+    /**
+    * Send a message. This function pushes the message to the Message Handler.
+    * @param aMessage The message to be sent.
+    * @param aIsLocal ETrue if is local device, else EFalse
+    *    if device is local, then action will be  send without network layer
+    *   - aMessage has to be EAction type.
+    */
+    IMPORT_C void SendMessageL( CUpnpHttpMessage* aMessage,
+                                MUpnpDispatcherCustomer& aCustomer,
+                                TBool aIsLocal = EFalse);
+
+    /**
+    * Add a customer to the customer list of this dispatcher. In practice,
+    * means that messages start being forwarded to that customer.
+    * @param aCustomer The customer to be added.
+    */
+    IMPORT_C void AddCustomer( const MUpnpDispatcherCustomer& aCustomer );
+
+    /**
+    * Remove a customer from the customer list of this dispatcher. In practice,
+    * means that messages stop being forwarded to that customer.
+    * @param aCustomer The customer to be removed.
+    */
+    IMPORT_C void RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer );
+
+    /**
+    * Add a customer to the customer list of this dispatcher. In practice,
+    * means that messages start being forwarded to that customer.
+    * @param aCustomer The customer to be added.
+    * @param aIsCP The customer is control point.
+    */
+    IMPORT_C void AddCustomerL( const MUpnpDispatcherCustomer& aCustomer, TBool aIsCP );
+
+    /**
+    * Remove a customer from the customer list of this dispatcher. In practice,
+    * means that messages stop being forwarded to that customer.
+    * @param aCustomer The customer to be removed.
+    * @param aIsCP The customer is control point.
+    */
+    IMPORT_C void RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer, TBool aIsCP );
+
+    /**
+    * Adds a local device to Message Handler's device library.
+    * @param aUuid UUID of the device.
+    * @param aDeviceType Device type of the device (e.g MediaServer:1)
+    * @param aDescriptionPath URL to device description.
+    * @param aServices List of services this device provides.
+    * @param aIsRootDevice ETrue, if this device is UPnP root device, \
+    * EFalse otherwise.
+    */
+    IMPORT_C void AddLocalDeviceL( const TDesC8& aUuid,
+                                   const TDesC8& aDeviceType,
+                                   const TDesC8& aDescriptionPath,
+                                   const CDesC8Array& aServices,
+                                   const TBool aIsRootDevice );
+
+    /**
+    * Removes a local device from Message Handler's device library.
+    * @param aUuid UUID of the device that is to be removed.
+    */
+    void RemoveLocalDeviceL( const TDesC8& aUuid, TBool aSilent );
+
+    /**
+    *
+    * @param aUpdateId
+    */
+    virtual void DeviceListReceivedL(TInt aUpdateId);
+
+public:
+
+    /**
+    * Returns an active interface's Hardware (MAC) address.
+    * @return Buffer that contains the address.
+    */
+    const HBufC8* MacAddressL();
+
+    /**
+    * Returns HTTP server address.
+    * @return Buffer that contains the address.
+    */
+    IMPORT_C TInetAddr HttpServerAddress();
+
+    /**
+    * Informs upper layers about newly found devices.
+    * @param aNewId New update id that needs to be stored.
+    */
+    IMPORT_C void UpdateDevicesL(TInt aNewId);
+    
+    /**
+    * Sets handle to transaction creator interface.
+    * @since Series60 5.0 
+    * @param aTransactionCreator pointer to object implementing MUpnpHttpServerTransactionCreator
+    *     interface.
+    **/
+    void SetTransactionCreator( MUpnpHttpServerTransactionCreator* aTransactionCreator );
+    
+    /**
+    *Starts http server
+    *@param aRegister determines if starting error in message handler process will be checked
+    *@param aPort starts server on fixed port
+    */        
+    IMPORT_C void StartHttpServerL( TBool aRegister, const TInt aPort );
+
+    /**
+    * Stops http server
+    */
+    IMPORT_C void StopHttpServer();
+
+    /*****IPFIltering**********/
+    IMPORT_C void StartIPFilteringL( );
+    IMPORT_C void StopIPFiltering();
+    /*************************/
+
+private:
+
+    enum TState
+    {
+        EReceiving,
+        ESending
+    };
+
+    /*! @var iParent observer which handles updates from the server */
+    MUpnpDiscoveryObserver*  iParent;
+
+    /*! @var iEngine Pointer to engine class. */
+    CUpnpDispatcherEngine*  iEngine;
+
+    /*! @var iUpdateId device list update id. */
+    TInt iUpdateId;
+    };
+
+#endif // C_CUPNPDISPATCHER_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpdispatchercustomer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,52 @@
+/** @file
+* 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:  Message dispacther customer/observer
+*
+*/
+
+
+#ifndef C_MUPNPDISPATCHERCUSTOMER_H
+#define C_MUPNPDISPATCHERCUSTOMER_H
+
+
+// FORWARD DECLARATIONS
+class CUpnpHttpMessage;
+
+
+// CLASS DECLARATION
+
+/**
+    @brief An interface from dispatcher to its customer (service)
+  */
+class MUpnpDispatcherCustomer
+{
+public:
+    /**
+    * A callback function to receive HTTP messages. Dispatcher checks the 
+    * mailbox periodically and calls this function if 
+    * a message to this customer is received
+    * @param aMessage A pointer containing the received message
+    */
+    virtual void MessageReceivedLD( CUpnpHttpMessage* aMessage ) = 0;
+    
+    /** 
+    * A function that should return the path identifying this customer
+    * @return The identifier path (e.g. service name without version)
+    */
+    virtual const TDesC8 & Path() = 0;
+};
+
+#endif // C_MUPNPDISPATCHERCUSTOMER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpdispatcherengineobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,35 @@
+/** @file
+* 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:  MDispatcherEngineObserver
+*    
+*
+*/
+
+#ifndef C_MUPNPDISPATCHERENGINEOBSERVER_H
+#define C_MUPNPDISPATCHERENGINEOBSERVER_H
+
+// INCLUDES
+#include <e32base.h>
+
+
+
+
+// CLASS DECLARATION
+
+class MDispatcherEngineObserver
+{
+public:
+    virtual void DeviceListReceivedL(TInt aUpdateId) = 0;
+};
+#endif // C_MUPNPDISPATCHERENGINEOBSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnperrors.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,240 @@
+/** @file
+* 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:  Declares UPnP and Http error codes 
+*
+*/
+
+
+#ifndef C_UPNPERRORS_H
+#define C_UPNPERRORS_H
+
+#include <e32base.h> 
+
+	enum THttpStatusCode {
+
+		// Informational 1xx
+		EHttpContinue		    =	100,
+		EHttpSwitchingProtocols =   101,
+
+		// Successful 2xx
+		EHttp200Ok			    =	200,
+		EHttpCreated		    =	201,
+		EHttpAccepted		    =	202,
+		EHttpNonAuthoritative	=	203,
+		EHttpNoContent			=	204,
+		EHttpResetContent		=	205,
+		EHttpPartialContent		=	206,
+
+		// Redirection 3xx	
+		EHttpMultipleChoises	=	300,
+		EHttpMovedPermanently	=	301,
+		EHttpFound				=	302,
+		EHttpSeeOther			=	303,
+		EHttpNotModified		=	304,
+		EHttpUseProxy			=	305,
+	    //	Unused				=	306,
+		EHttpTemporaryRedirect	=	307,
+
+		// Client error 4xx
+		EHttpBadRequest		    =	400,
+		EHttpUnAuthorized		=	401,
+		EHttpPaymentRequired	=	402,
+		EHttpForbidden			=	403,
+		EHttpNotFound			=	404,
+		EHttpMethodNotAllowed	=	405,
+		EHttpNotAcceptable		=	406,
+		EHttpProxyAuthenticationRequired	=	407,
+		EHttpRequestTimeout		=	408,
+		EHttpConflict			=	409,
+		EHttpGone				=	410,
+		EHttpLengthRequired		=	411,
+		EHttpPreconditionFailed	=	412,
+		EHttpEntityTooLarge		=	413,
+		EHttpUriTooLong			=	414,
+		EHttpUnsupportedMediaType=	415,
+		EHttpRequestedRangeNotSatisfiable   =   416,
+		EHttpExpectationFailed	=	417,
+		
+		// Server Error 5xx
+		EHttpInternalServerError=	500,
+		EHttpNotImplemented		=	501,
+		EHttpBadGateway			=	502,
+		EHttpServiceUnavailable	=	503,
+		EHttpGatewayTimeout		=	504,
+		EHttpVersionNotSupported=	505,
+		EHttpInsufficientStorage=	507 
+
+	};
+
+	// Informational 1xx
+	_LIT8( KHttpContinue,           "Continue" );	                // 100
+	_LIT8( KHttpSwitchingProtocols, "Switching Protocols" );        // 101
+
+          
+	// Successful 2xx		
+	_LIT8( KHttpCreated,            "Created" );                    // 201
+	_LIT8( KHttpAccepted,           "Accepted" );                   // 202
+	_LIT8( KHttpNonAutohorative,    "Non-Authoritative Information" );// 203
+	_LIT8( KHttpNoContent,          "No Content" );                 // 204
+	_LIT8( KHttpResetContent,       "Reset Content" );              // 205
+	_LIT8( KHttpPartialContent,     "Partial Content" );            // 206
+
+	// Redirection 3xx	
+	_LIT8( KHttpMultipleChoises,    "Multiple Choices" );           // 300
+	_LIT8( KHttpMovedPermanently,   "Moved Permanently" );          // 301
+	_LIT8( KHttpFound,              "Found" );                      // 302
+	_LIT8( KHttpSeeOther,           " See Other" );                 // 303
+	_LIT8( KHttpNotModified,        "Not Modified" );               // 304
+	_LIT8( KHttpUseProxy,           "Use Proxy" );                  // 305
+	_LIT8( KHttpTemporaryRedirect,  "Temporary Redirect" );	        // 307
+
+	// Client error 4xx
+	_LIT8( KHttpBadRequest,         "Bad Request" );                 // 400
+	_LIT8( KHttpUnauthorized,       "Unauthorized" );                // 401
+	_LIT8( KHttpPaymentRequired,    "Payment Required" );            // 402
+	_LIT8( KHttpForbidden,          "Forbidden" );                   // 403
+	_LIT8( KHttpNotFound,           "Not Found" );                   // 404
+	_LIT8( KHttpMethodNotAllowed,   "Method Not Allowed" );          // 405
+	_LIT8( KHttpNotAcceptable,      "Not Acceptable" );              // 406
+	_LIT8( KHttpProxyAuthenticationRequired, "Proxy Authentication Required");//407
+	_LIT8( KHttpRequestTimeout,     "Request Timeout" );            // 408
+	_LIT8( KHttpConflict,           "Conflict" );                    // 409
+	_LIT8( KHttpGone,               "Gone" );                        // 410
+	_LIT8( KHttpLengthRequired,     "Length Required" );             // 411
+	_LIT8( KHttpPreconditionFailed, "Precondition Failed" );         // 412
+	_LIT8( KHttpEntityTooLarge,     "Request Entity Too Large" );    // 413
+	_LIT8( KHttpUriTooLarge,        "Request-URI Too Large" );       // 414
+	_LIT8( KHttpUnsupprotedMediaType, "Unsupported Media Type" );    // 415
+	_LIT8( KHttpRequestedRangeNotSatisfiable, "Requested range not satisfiable" );// 416
+	_LIT8( KHttpExpectationFailed,  "Expectation Failed" );          // 417
+
+		// Server Error 5xx
+	_LIT8( KHttpInternalServerError,"Internal Server Error" );	    // 500
+	_LIT8( KHttpNotImplemented,     "Not Implemented" );            // 501
+	_LIT8( KHttpBadGateway,         "Bad Gateway" );                // 502
+	_LIT8( KHttpServiceUnavailable, "Service Unavailable" );        // 503
+	_LIT8( KHttpGatewayTimeout,     "Gateway Time-out" );           // 504
+	_LIT8( KHttpVersionNotSupported,"HTTP Version not supported" );	// 505
+	
+	_LIT8( KHttpInsufficientStorage,"Insufficient Storage" );	// 507
+
+	enum TUpnpErrorCode {
+		EUpnpOk			=	0,
+		EUpnpUndefined	=	-1,
+
+		EHttpOk			=	200,
+
+		EBadRequest		=	400,
+		EInvalidAction	=	401,
+		EInvalidArgs	=	402,
+		EInvalidVar		=	404,
+		EPreconditionFailed=412,
+
+		EInternalServerError=500,
+		EActionFailed	=	501,
+
+		// 600-699 Common action errors
+		EArgumentValue	=	600,
+		EArgumentRange	=	601,
+		ENotImplemented	=	602,
+		EOutOfMemory	=	603,
+		EHumanIntervention=	604,
+		EStringTooLong	=	605,
+		ENotAuthorized	=	606,
+		ESignatureFailure =	607,
+		ESignatureMissing =	608,
+		ENotEncrypted	=	609,
+		EInvalidSequence =	610,
+		EInvalidUrl		=	611,
+		ENoSession		=	612,
+
+		// 700-799 Action specific errors
+		ENoSuchObject	=	701,
+		EInvalidCurrentTag= 702,
+		EInvalidNewTag	=	703,
+		ERequiredTag	=	704,
+		EReadOnlyTag	=	705,
+		EParameterMismatch = 706,
+		EInvalidSearch	=	708,
+		EInvalidSort	=	709,
+		ENoContainer	=	710,
+		ERestrictedObject=  711,
+		EBadMetadata	=	712,
+		ERestrictedParentObject=713,
+		ENoSourceResource = 714,
+		ESourceAccess	=	715,
+		ETransferBusy	=	716,
+		ENoFileTransfer	=	717,
+		ENoDestinationResource=718,
+		EDestinationAccess= 719,
+		ECannotProcess	=	720,
+
+		// 800-899 Action specific errors. Defined by vendor.
+		EUndefined		=	808
+		};
+	
+
+	_LIT8( KHttpOk, "OK" );	                                    /// 200
+		
+	_LIT8( KBadRequest,         "Bad Request" );	            /// 400
+	_LIT8( KInvalidAction,      "Invalid Action" );	            /// 401
+	_LIT8( KInvalidArgs,        "Invalid Args" );	            /// 402
+	_LIT8( KInvalidVar,         "Invalid Var" );	            /// 404
+	_LIT8( KPreconditionFailed, "Precondition Failed" );	    /// 412
+		
+	_LIT8( KInternalServerError,"Internal Server Error" );	    /// 500
+	_LIT8( KActionFailed,       "Action Failed" );	            /// 501
+		
+	// 600-699 Common action errors	
+	_LIT8( KArgumentValue,      "Argument Value Invalid" );	    /// 600
+	_LIT8( KArgumentRange,      "Argument Value Out of Range" );/// 601
+	_LIT8( KNotImplemented,     "Optional Action Not Implemented" );/// 602
+	_LIT8( KOutOfMemory,        "Out of Memory" );	            /// 603
+	_LIT8( KHumanIntervention,  "Human Intervention Required" );/// 604
+	_LIT8( KStringTooLong,      "String Argument Too Long" );   /// 605
+	_LIT8( KNotAuthorized,      "Action not authorized" );	    /// 606
+	_LIT8( KSignatureFailure,   "Signature failure" );	        /// 607
+	_LIT8( KSignatureMissing,   "Signature missing" );	        /// 608
+	_LIT8( KNotEncrypted,       "Not encrypted" );	            /// 609
+	_LIT8( KInvalidSequence,    "Invalid sequence" );	        /// 610
+	_LIT8( KInvalidUrl,         "Invalid control URL" );        /// 611
+	_LIT8( KNoSession,          "No such session" );	        /// 612
+		
+	// 700-799 Action specific errors	
+	_LIT8( KNoSuchObject,       "No such object" );	            /// 701
+	_LIT8( KInvalidCurrentTag,  "Invalid CurrentTagValue" );   	/// 702
+	_LIT8( KInvalidNewTag,      "Invalid NewTagValue" );	    /// 703
+	_LIT8( KRequiredTag,        "Required tag" );	            /// 704
+	_LIT8( KReadOnlyTag,        "Read only tag" );              /// 705
+	_LIT8( KInvalidConnectionReference,  "Invalid Connection Reference" );        	/// 706
+	_LIT8( KParameterMismatch,  "Parameter Mismatch" );        	/// 706
+	_LIT8( KInvalidSearch,      "Unsupported or invalid search criteria" );	/// 708
+	_LIT8( KInvalidSort,	    "Unsupported or invalid sort criteria" );	/// 709
+	_LIT8( KNoContainer,        "No such container" );	        /// 710
+	_LIT8( KRestrictedObject,   "Restricted object" );	        /// 711
+	_LIT8( KBadMetadata,        "Bad metadata" );	            /// 712
+	_LIT8( KRestrictedParentObject, "Restricted parent object" ); /// 713
+	_LIT8( KNoSourceResource,   "No such source resource" );	/// 714
+	_LIT8( KSourceAccess,       "Source resource access denied" ); /// 715
+	_LIT8( KTransferBusy,       "Transfer busy" );	            /// 716
+	_LIT8( KNoFileTransfer,     "No such file transfer" );	    /// 717
+	_LIT8( KNoDestinationResource,"No such destination resource" );	/// 718
+	_LIT8( KDestinationAccess,  "Destination resource access denied" );	/// 719
+	_LIT8( KCannotProcess,      "Cannot process the request" );	/// 720
+	
+
+
+#endif	// C_UPNPERRORS_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpicon.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,281 @@
+/** @file
+* 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:  Declares CUpnpIcon class
+*
+*/
+
+
+#ifndef C_CUPNPICON_H
+#define C_CUPNPICON_H
+
+// INCLUDES
+
+#include <badesca.h>
+#include <upnpdescriptionproperty.h>
+#include <s32mem.h>
+// CONSTANTS
+
+_LIT8( KUrl, "url" );
+_LIT8( KWidth, "width" );
+_LIT8( KDepth, "depth" );
+_LIT8( KHeight, "height" );
+_LIT8( KMimeType, "mimetype" );
+
+const TInt KMaxNumberPropertySize=10;
+const TInt KMaxMimeTypeSize = 20;
+const TInt KDefBuffer = 100;
+
+// CLASS DECLARATION
+
+/**
+*  Declares CUpnpIcon class
+*
+*  @since Series60 2.6
+*/
+class CUpnpIcon : public CBase
+{
+public: // Constructors and destructor
+
+    /**
+    * Two-phased constructor. returns a pointer to the new element.
+    * @param aElement This reference contains the state variable element
+    */
+    IMPORT_C static CUpnpIcon* NewL( );
+    
+    /**
+    * Two-phased constructor. returns a pointer to the new element.
+    * @param aPath icon path
+    * @param aUrl icon url
+    * @param aWidth icon width
+    * @param aHeight icon height
+    * @param aDepth icon depth
+    * @param aMimeType icon mime type
+    */    
+    IMPORT_C static CUpnpIcon* NewL(const TDesC16& aPath, const TDesC8& aUrl, const TInt aWidth, const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType);
+    
+    /**
+    * Two-phased constructor. returns a pointer to the new element.
+    * @param aPath icon path
+    * @param aWidth icon width
+    * @param aHeight icon height
+    * @param aDepth icon depth
+    * @param aMimeType icon mime type
+    */    
+    IMPORT_C static CUpnpIcon* NewL(const TDesC16& aPath, const TInt aWidth, const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType);
+    
+    /**
+    * Destructor. Deletes the element from memory. 
+    */
+    IMPORT_C virtual ~CUpnpIcon();
+    
+    
+public: // New functions
+
+    /**
+    * Returns the mime type.
+    * @since Series60 2.6
+    * @return return icon mime type
+    */
+    IMPORT_C const TPtrC8 MimeType() const;
+    
+    /**
+    * Returns the width of the icon.
+    * @since Series60 2.6
+    * @return width in pixels or KErrNotFound
+    */
+    IMPORT_C TInt Width() const;
+    
+    /**
+    * Returns the width of the icon.
+    * @since Series60 2.6
+    * @return icon width 
+    */
+    TPtrC8 WidthTPtrC8() const;
+    
+    /**
+    * Returns the height of the icon.
+    * @since Series60 2.6
+    * @return height in pixels or KErrNotFound
+    */
+    IMPORT_C TInt Height() const;
+    
+    /**
+    * Returns height of the icon.
+    * @since Series60 2.6
+    * @return icon height 
+    */
+    TPtrC8 HeightTPtrC8() const;
+    
+    /**
+    * Returns the color depth of the icon.
+    * @since Series60 2.6
+    * @return icon depth or KErrNotFound
+    */
+    IMPORT_C TInt Depth() const;
+    
+    /**
+    * Returns color depth of the icon.
+    * @since Series60 2.6
+    * @return icon depth
+    */    
+    TPtrC8 DepthTPtrC8() const;
+    
+    /**
+    * Returns the url address.
+    * @since Series60 2.6
+    * @return url address or NULL 
+    */
+    IMPORT_C const TPtrC8 Url() const;
+
+    /**
+    * Returns the icon buffer
+    * @since Series60 2.6
+    * @return icon buffer
+    */
+    IMPORT_C const TPtr8& GetIconBufferPtr() const;
+    
+    /**
+    * Get bitmap filename
+    * @since Series60 2.6
+    * @return bitmap filename
+    */
+    IMPORT_C TFileName BitmapFilename() const;
+    
+    /**
+    * Set bitmap filename
+    * @since Series60 2.6
+    * @param aName the bitmap filename (path?)
+    */
+    IMPORT_C void SetBitmapFilename( const TDesC& aName );
+    
+    /**
+    * Sets icon mime type
+    * @since Series60 2.6
+    * @param aMimeType icon mime type
+    */
+    void SetMimeTypeL( const TDesC8& aMimeType );
+    
+    /**
+    * Sets icon url
+    * @since Series60 2.6
+    * @param aUrl icon url
+    */
+    IMPORT_C void SetUrlL( const TDesC8& aUrl );
+    
+    /**
+    * Sets icon width
+    * @since Series60 2.6
+    * @param aWidth icon width
+    */
+    void SetWidthL( const TInt aWidth );
+    
+    /**
+    * Sets icon height
+    * @since Series60 2.6
+    * @param aHeight icon height
+    */
+    void SetHeightL( const TInt aHeight );
+    
+    /**
+    * Sets icon depth
+    * @since Series60 2.6
+    * @param aDepth icon depth
+    */
+    void SetDepthL( const TInt aDepth );
+    
+    /**
+    * Add description property
+    * @since Series60 3.2
+    * @param aProperty
+    */
+    void AddPropertyL( CUpnpDescriptionProperty* aProperty );
+    
+    /**
+    * Deserializes icon
+    * @since Series60 3.2
+    * @param aStream
+    */
+    void ExternalizeL( RWriteStream& aStream ) const;
+    
+    /**
+    * Serializes icon
+    * @since Series60 3.2
+    * @param aStream
+    */
+    IMPORT_C void InternalizeL( RReadStream& aStream );
+    
+    /**
+    * @since Series60 3.2
+    * @return serialized icon
+    */
+    IMPORT_C HBufC8* ToDes8L() const;
+    
+private: // Constructors
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @param aElement
+    */
+    void ConstructL( );
+    
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @param aPath icon path
+    * @param aUrl icon url
+    * @param aWidth icon width
+    * @param aHeight icon height
+    * @param aDepth icon depth
+    * @param aMimeType icon mime type
+    */
+    void CUpnpIcon::ConstructL(const TDesC16& aPath, const TDesC8& aUrl, const TInt aWidth, const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType);
+    
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @param aPath icon path
+    * @param aWidth icon width
+    * @param aHeight icon height
+    * @param aDepth icon depth
+    * @param aMimeType icon mime type
+    */
+    void CUpnpIcon::ConstructL(const TDesC16& aPath, const TInt aWidth, const TInt aHeight, const TInt aDepth, const TDesC8& aMimeType);
+        
+    
+    /**
+    * C++ default constructor.
+    * @param aElement
+    */
+    CUpnpIcon();
+
+    /**
+    * Deletes icon's file if exists.
+    * @since Series60 2.6
+    */
+    void DeleteIconFromFsL();
+
+private: // Data
+    
+    // Buffer to pass data to server
+    HBufC8* iSendBuffer;           
+    TPtr8 iSendBufferPtr;
+ 	
+    // XML element containing icon description
+    RPointerArray<CUpnpDescriptionProperty> iProperties;
+    	
+    // iFileName the bitmap filename, owned
+    TFileName   iFilename;
+    };
+	
+#endif  //C_CUPNPICON_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpnetworkeventaddresschange.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,57 @@
+/** @file
+* 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:  CUpnpNetworkEventAddressChange 
+*
+*/
+
+#ifndef C_UPNPNETWORKEVENTADDRESSCHANGE_H
+#define C_UPNPNETWORKEVENTADDRESSCHANGE_H
+
+// Includes
+#include <upnpnetworkeventbase.h>
+#include <in_sock.h>
+
+/**
+ * Class encapsulating AddressChange network event
+ * @since S60 5.0
+ **/
+class CUpnpNetworkEventAddressChange : public CUpnpNetworkEventBase 
+    {
+public:
+    
+    /**
+     * Constructor
+     * @since S60 5.0 
+     * @param address
+     */
+    CUpnpNetworkEventAddressChange( TInetAddr aAddress );
+
+    /**
+     * Getter for address
+     * @since S60 5.0 
+     * @return address
+     */
+    IMPORT_C TInetAddr Address();
+    
+private:  // Data
+
+    // address
+    TInetAddr iInetAddr;
+
+    };
+
+#endif // C_UPNPNETWORKEVENTADDRESSCHANGE_H
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpnetworkeventbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,75 @@
+/** @file
+* 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:  CUpnpNetworkEventBase 
+*
+*/
+
+#ifndef C_UPNPNETWORKEVENTBASE_H
+#define C_UPNPNETWORKEVENTBASE_H
+
+// Includes
+#include <e32base.h>
+#include <upnpconnmanagereventtypes.h>
+
+
+/**
+ * Base class for network events
+ * @since S60 5.0
+ **/
+class CUpnpNetworkEventBase : public CBase
+    {
+public:
+    
+    /**
+     * Constructor
+     * @since S60 5.0 
+     * @param error
+     */
+    CUpnpNetworkEventBase( TInt aError );
+    
+    /**
+     * Constructor
+     * @since S60 5.0 
+     * @param network event type
+     */
+    CUpnpNetworkEventBase( TUpnpCmSubRsp aType );
+    
+    /**
+     * Getter for network event type
+     * @since S60 5.0 
+     * @return Type
+     */
+    IMPORT_C TUpnpCmSubRsp Type();
+    
+    /**
+     * Getter for network event error
+     * @since S60 5.0 
+     * @return error
+     */
+    IMPORT_C TInt SubscriberError(); 
+    
+protected:  // Data
+
+    // Network event type
+    TUpnpCmSubRsp iType;
+
+    // Subscription error
+    TInt iSubscriberError;
+
+    };
+
+#endif // C_UPNPNETWORKEVENTBASE_H
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpnetworkeventobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,47 @@
+/** @file
+* 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:  MUpnpNetworkEventObserver
+*
+*/
+
+#ifndef M_UPNPNETWORKEVENTOBSERVER_H
+#define M_UPNPNETWORKEVENTOBSERVER_H
+
+// Includes
+#include <e32cmn.h>
+#include <upnpnetworkeventbase.h>
+#include <upnpnetworkeventaddresschange.h>
+
+
+/**
+ * Observer for network events
+ * @since S60 5.0
+ **/
+class MUpnpNetworkEventObserver
+    {
+public:
+    
+    /**
+     * Inform about netowrk event
+     * @since S60 5.0 
+     * @param network event
+     */
+    virtual void NetworkEvent( CUpnpNetworkEventBase* aEvent ) = 0;
+
+    };
+
+#endif // M_UPNPCONNECTIONMANAGERNETWORKEVENTOBSERVER_H
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpnotifytimer.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,181 @@
+/** @file
+* 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:  Declares virtual MUpnpNotifyTimerObserver callback class
+*                and the implemented active object class CUpnpNotifyTimer
+*
+*/
+
+
+#ifndef C_CUPNPNOTIFYTIMER_H
+#define C_CUPNPNOTIFYTIMER_H
+
+// INCLUDES
+#include <e32base.h>
+
+// CONSTANTS
+static const TInt KSecond = 1000000;
+// Max number of seconds we can pass to RTime::After
+static const TInt KOneIterationSeconds = 1800;
+
+// FORWARD DECLARATIONS
+class CUpnpNotifyTimer;
+
+// CLASS DECLARATION
+/**
+ * An interface from notifytimer to its customer (service)
+ *
+ *  @since Series60 2.0
+ */
+class MUpnpNotifyTimerObserver
+    {
+public:
+
+    /**
+     * TimerEventL
+     * A callback function to time updates.
+     * @since Series60 2.0
+     * @param aTimer A pointer containing updated time.
+     * @return None
+     */
+	virtual void TimerEventL( CUpnpNotifyTimer* aTimer ) = 0;
+
+    /**
+    * TimerEventError
+    * Called when RunL leaves. By default no implementation needed.
+    * @since Series60 3.2
+    * @param aError Leave error
+    * @return Error
+    */
+    virtual void TimerEventError( CUpnpNotifyTimer* /*aTimer*/, TInt /*aError*/ ) 
+    { 
+    }
+
+    };
+    
+// CLASS DECLARATION
+/**
+* Wrapper for RTimer classs to notify observer about elaspsed time
+*
+*  @since Series60 2.0
+*/
+class CUpnpNotifyTimer : public CActive
+    {
+protected:
+
+    /**
+     * Constructor
+     */
+    IMPORT_C CUpnpNotifyTimer( MUpnpNotifyTimerObserver* aObserver );
+    
+public:
+    IMPORT_C static CUpnpNotifyTimer* NewL(MUpnpNotifyTimerObserver* aObserver);
+
+    void ConstructL();
+    
+    /**
+     * Destructor.
+     */
+    ~CUpnpNotifyTimer();
+
+    /**
+     * At
+     * @since Series60 2.0
+     * @param aTime
+     */
+    IMPORT_C void AfterSeconds( TInt aIntervalInSeconds );
+
+    /**
+     * After
+     * @since Series60 2.0
+     * @param aInterval
+     * @param aUnused this is unused now
+     */
+    IMPORT_C void After( TInt aInterval = 1, TBool aUnused = EFalse );
+
+    /**
+     * After
+     * @since Series60 2.0
+     * @param aInterval
+     * @param aUnused this is unused now
+     */
+    IMPORT_C void After( TTimeIntervalMicroSeconds32 aInterval, TBool aUnused );
+ 
+    /**
+     * Start
+     * Start the CUpnpNotifyTimer object.
+     * @since Series60 2.0
+     * @param aInterval
+     * @param aUnused this is unused now 
+     */
+    IMPORT_C void Start( TTimeIntervalMicroSeconds32 aInterval,
+        TBool aUnused = EFalse);
+
+    /**
+     * RunL
+     * Active object state machine.
+     * @since Series60 2.0
+     */
+    void RunL();
+
+    /**
+     * RunError
+     * RunError in case RunL leaves.
+     * @since Series60 2.0
+     */
+    TInt RunError( TInt aError );
+
+    /**
+     * DoCancel
+     * Cancel outstanding request(s) and reset the iActive flag.
+     * @since Series60 2.0
+     */
+    IMPORT_C void DoCancel();
+
+    /**
+     * CompleteOneselfImmediate
+     * Immediate completes oneself by call of User::RequestComplete().
+     * @since Series60 3.2
+     */
+    IMPORT_C void CompleteOneselfImmediate();
+
+private: 
+
+    /**
+     * StartNextIteration
+     * only for internal use, decrease repeat counter 
+     * and waits for KOneIterationSeconds seconds it is required for long 
+     * run timers because of RTimer::After 32 bit limitation - about 35 minutes      
+     */
+    void StartNextIteration();
+
+    // Data
+
+    // Interface observer object, owned
+    MUpnpNotifyTimerObserver* iObserver;
+
+    // Interval variable, owned
+    TTimeIntervalMicroSeconds32 iInterval;
+
+    // Timer, owned
+    RTimer iTimer;
+	
+    // How many times timer need to be run for 30min 
+    // after that timer will run for {(total time) mod (1800)} seconds 
+    TInt iIterationsToRun;
+    };
+
+
+#endif // C_CUPNPNOTIFYTIMER_H
+
+// End Of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpservice.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,274 @@
+/** @file
+* 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:  Implements the CUpnpService class
+*
+*/
+
+
+#ifndef C_CUPNPSERVICE_H
+#define C_CUPNPSERVICE_H
+
+// INCLUDES
+
+#include <e32std.h>
+#include <e32des8.h>
+#include "upnpaction.h"
+#include "upnpstatevariable.h"
+#include "upnpdispatchercustomer.h"
+#include "upnphttpmessage.h"
+
+// CONSTANTS
+
+_LIT8( KAction,     "action" );
+_LIT8( KStateVariable,  "stateVariable" );
+_LIT8( KProperty,   "property" );
+
+// FORWARD DECLARATIONS
+
+class CUpnpDevice;
+class CUpnpAction;
+class CUpnpServiceImplementation;
+class CUpnpDispatcher;
+class CUpnpHttpMessage;
+class CUpnpGenaMessage;
+class MUpnpContentDirectoryDataFinder; 
+
+// CLASS DECLARATION
+
+/**
+*  SCPD handling.
+*  This is a data class containing the data of the service description
+*  (SCPD). This data consists of actions, their arguments and state variables.
+*
+*  @since Series60 2.6
+*/
+class CUpnpService : public CBase
+{
+public: // Constructors and destructor
+
+    IMPORT_C TBool IsAdded();
+    
+    /** Two-phased constructor, called from other NewL functions.
+    * Only for internal usage. 
+    * @param aDescription Content of the service description.
+    * @param aServiceType Type of the service.
+    * @param aDevice Parent device.
+    */
+    IMPORT_C static CUpnpService* NewL( const TDesC8& aDescription, 
+                                        const TDesC8& aServiceType, 
+                                        CUpnpDevice& aDevice );
+                        
+    /** 
+    * Destructor
+    */
+    IMPORT_C virtual ~CUpnpService();
+        
+public: // New functions
+
+  
+    /**
+    * Sets the value of a state variable. If no such named state variable
+    * found, ignore.
+    * @since Series60 2.6
+    * @param aName Name of the variable (in SCPD).
+    * @param aValue Requested value for state variable.
+    */
+    IMPORT_C void SetStateVariableL( const TDesC8& aName, 
+                     const TDesC8& aValue );
+
+    /**
+    * Returns the requested state variable
+    * @since Series60 2.6
+    * @param aName Name of the variable (in SCPD).
+    * @return CUpnpStateVariable*. Points to NULL if state variable not found.
+    */
+    IMPORT_C CUpnpStateVariable* StateVariable( const TDesC8& aName );
+    
+    /**
+    * Get service type of this (local or remote) service
+    * @since Series60 2.6
+    * @return Service type.
+    */
+    IMPORT_C const TDesC8& ServiceType();
+    
+    void SetServiceTypeL( const TDesC8& aSercviceType );
+    /**
+    * Get message dispatching path. For internal use only. 
+    * @since Series60 2.6
+    * @return path
+    */
+    IMPORT_C const TDesC8& Path();
+	
+    void SetPathL( const TDesC8& aPath );
+        
+    /**
+    * Get parent device of this service. 
+    * @since Series60 2.6
+    * @return Parent device.
+    */
+    IMPORT_C CUpnpDevice& Device();
+   
+    /**
+    * For internal use. Get subscription url address of this service.  
+    * To make subscriptions use CUpnpControlPoint::SubscribeL( CUpnpService* )
+    * @since Series60 2.6
+    * @return subscription url address
+    */
+    IMPORT_C const TPtrC8 SubscriptionUrl();
+    
+    /**
+    * For internal use. Set subscription url address of this service.  
+    * To make subscriptions use CUpnpControlPoint::SubscribeL( CUpnpService* )    
+    * @param aUrl subscription url address, ownership is passed
+    */
+    IMPORT_C void SetSubscriptionUrl(HBufC8* aUrl);
+
+    /**
+    * For internal use. Get control url address of this service.  
+    * @return control url address
+    */
+    IMPORT_C const TPtrC8 ControlUrl();
+        
+    /**
+    * For internal use. Set control url address of this service.  
+    * @param aUrl control url address, ownership is passed
+    */
+    IMPORT_C void SetControlUrl(HBufC8* aUrl);
+    
+    /**
+    * For internal use. Get service url address of this service.  
+    * @return control url address
+    */
+    IMPORT_C const TPtrC8 ServiceDescriptionUrl();
+    
+    /**
+    * For internal use. Set control url address of this service.  
+    * @param aUrl service url address, ownership is passed
+    */
+    IMPORT_C void SetServiceDescriptionUrl(HBufC8* aUrl);
+        
+    /**
+    * Get IP address of this (local or remote) service. 
+    * @since Series60 2.6
+    * @return address
+    */
+    IMPORT_C TInetAddr Address();
+    
+   
+    
+    /**
+    * Returns an action with the given name. If such action found,
+    * the pointer aAction is set to that action. 
+    * @since Series60 2.6
+    * @param aAction XML element where action is placed.
+    * @param aActionName Name of the action.
+    * @return ETrue, if action is found.
+    */
+    IMPORT_C TBool GetAction( CUpnpAction*& aAction, 
+                  const TDesC8& aActionName );
+    
+    /**
+    * For internal use. Sets the aActionList pointer to point to
+    * list of XML elements describing actions.
+    * @since Series60 2.6
+    * @param aActionList pointer array containing the action list    
+    */
+    IMPORT_C void GetActionList( RPointerArray<CUpnpAction>& aActionList );
+    
+    /**
+    * Get the state variable list of this action. See interface of 
+    * CUpnpStateVariable to use state variables. 
+    * @since Series60 2.6
+    * @return Gives list of state variables of service.
+    */
+    IMPORT_C RPointerArray<CUpnpStateVariable> StateVariableList() const;
+    
+    IMPORT_C void AddStateVariableL( CUpnpStateVariable* aStateVariable );
+    /**
+    * Creates and returns a new action. This function is proposed to be
+    * used by control points (derived from CUpnpControlPoint).
+    * The target IP address and other details are already set in the 
+    * CUpnpAction structure, and after setting the parameters it can be 
+    * sent using CUpnpServiceImplementation or CUpnpControlPoint interface.
+    * @since Series60 2.6
+    * @param aActionName Name of the action.
+    * @return action object
+    */
+    IMPORT_C CUpnpAction* CreateActionLC( const TDesC8& aActionName );
+
+   
+        
+public: // From MUpnpDispatcherCustomer
+
+    
+    void SetArgumentTypes();
+    
+    TBool IsComplete();
+    
+protected:
+
+    /**
+    * C++ default constructor.
+    * @param aDevice Parent device.
+    */
+    IMPORT_C CUpnpService( CUpnpDevice& aDevice );
+    
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @param aDesciption Content of the service description.
+    * @param aServiceType Type of the service.
+    */
+    IMPORT_C void ConstructL( const TDesC8& aDescription, 
+                  const TDesC8& aServiceType );  
+
+public:
+    static CUpnpService* NewL(CUpnpDevice* aParent);
+      
+    void AddActionL( CUpnpAction& aAction );
+
+    void Added();
+    
+protected: // Data
+      
+    // State variable list, owned
+    RPointerArray<CUpnpStateVariable>           iStateVariables;
+
+    // Action variable list, owned
+    RPointerArray<CUpnpAction>                  iActions;
+
+    // Not owned; cannot be NULL
+    CUpnpDevice&                                iParentDevice;
+
+    
+    // Service type, owned
+    HBufC8*                                     iType;
+
+    // Used to identify messages, owned
+    HBufC8*                                     iPath;
+    // subscription url
+    HBufC8*                                     iSubscriptionUrl;
+    // control url
+    HBufC8*                                     iControlUrl;
+    // adding flag    
+    TBool                                       iIsAdded;
+    // complete flag    
+    TBool                                       iComplete;
+    // url    
+    HBufC8*                                 	iUrl;
+    };
+    
+
+#endif  // C_CUPNPSERVICE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpsettings.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,162 @@
+/*
+* 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:  Declares the upnpsettings class
+ *
+ *
+*/
+
+
+#ifndef C_CUPNPSETTING_H
+#define C_CUPNPSETTING_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CONSTANTS
+const TUid KHnCRUidUPnPStack = { 0x2000F881 }; //for parallel stack
+const TUid KCRUidUPnPStack   = { 0x101F9784 };
+
+// FORWARD DECLARATIONS
+class CRepository;
+
+// CLASS DECLARATION
+
+/**
+ *  Configuration API for UPnP stack operation
+ *
+ *  @lib serviceframework.lib
+ *  @since Series 60 3.1
+ */
+
+class CUpnpSettings: public CBase
+    {
+public:
+    
+    /** Central repository value for IAP key */     
+    static const TUint  KUPnPStackIapId = 1;
+    
+    /** Central repository value for customized UserAgent key */         
+    static const TUint  KUPnPStackCustomizedUserAgent = 2;    
+
+    /** Central repository value for file buffer size key */         
+    static const TUint  KUPnPStackFileBufferSize = 3;    
+    
+    /** Central repository value for customized ServerHeader key */         
+    static const TUint  KUPnPStackCustomizedServerHeader = 4;    
+
+    /** Central repository value for customized M-Search string key */         
+    static const TUint  KUPnPStackMSearchConfig = 5;    
+
+public: // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    */
+    IMPORT_C static CUpnpSettings* NewL(TUid aRepositoryUid);
+
+    /**
+    * Destructor.
+    */
+    virtual ~CUpnpSettings();
+
+public: // New functions
+    /**
+    * Sets numeric value.
+    * @param aId parameter id
+    * @return error code
+    */
+    IMPORT_C TInt Set(TUint aId, TInt& aValue);
+
+    /**
+    *  Gets numeric value.
+    * @param aId parameter id
+    * @return error code
+    */
+    IMPORT_C TInt Get(TUint aId, TInt& aValue);
+
+    /**
+    * Gets numeric value.
+    * @param aId parameter id
+    * @return error code
+    */
+    IMPORT_C static TInt GetIapL();
+    
+    /**
+    * Sets string value.
+    * @param aId parameter id
+    * @return error code
+    */
+    IMPORT_C TInt Set(TUint aId, const TDesC& aValue);
+
+    /**
+    * Sets string value.
+    * @param aId parameter id
+    * @return error code
+    */
+    IMPORT_C TInt SetL(TUint aId, const TDesC8& aValue);    
+    
+    /**
+    * Gets string value.
+    * @param aId parameter id
+    * @return error code
+    */
+    IMPORT_C TInt Get(TUint aId, TDes& aValue);
+
+    /**
+    * Gets string value.
+    * @param aId parameter id
+    * @return string value
+    */
+    IMPORT_C HBufC8* GetL(TUint aId);    
+    
+    /**
+    * Gets User-Agent string value.
+    * @return string value
+    */
+    IMPORT_C static HBufC8* GetUserAgentL();
+
+    /**
+    * Gets Product string value.
+    * @return string value
+    */
+    IMPORT_C static TInt GetFileBufferSizeL();
+    
+    /**
+    * Gets Server header string value.
+    * @return string value
+    */
+    IMPORT_C static HBufC8* GetServerHeaderL();
+
+    /**
+    * Gets Server header string value.
+    * @return string value
+    */
+    static HBufC8* GetMSearchConfigurationL();
+
+private:
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    * @param aRepositoryId  
+    */   
+    void ConstructL(TUid aRepositoryId);
+
+private: 
+    // Central repository client
+    CRepository*        iRepository;
+    };
+
+#endif // C_CUPNPSETTING_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/inc/upnpstatevariable.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,257 @@
+/** @file
+* 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:  Declares CUpnpStateVariable class
+*
+*/
+
+
+#ifndef C_CUPNPSTATEVARIABLE_H
+#define C_CUPNPSTATEVARIABLE_H
+
+// INCLUDES
+
+#include <badesca.h>
+#include "upnpcons.h"
+
+// FORWARD DECLARATIONS
+
+class CUpnpServiceImplementation;
+
+// CLASS DECLARATION
+
+/**
+*  State variable handler class.
+*  Provides easy access to the state variables of the device.
+*
+*  @since Series60 2.6
+*/
+class CUpnpStateVariable: public CBase
+    {
+public: // Constructors and destructor
+
+    static CUpnpStateVariable* NewL();
+   
+    /**
+    * Destructor. Deletes the element from memory. 
+    */
+    virtual ~CUpnpStateVariable();
+    
+public: // New functions
+
+    /**
+    * Set parent implementation
+    * @since Series60 2.6
+    * @param aParent the parent service
+    */
+    void SetParentImplementation( CUpnpServiceImplementation& aParent );
+
+    /**
+    * Returns argument type
+    * @since Series60 2.6
+    * @return argument type
+    */
+    IMPORT_C TArgumentType Type();   
+    
+    /**
+    * Set argument type
+    * @since Series60
+    * @aParam aType Type of the state variable
+    */
+    IMPORT_C void SetTypeL( const TDesC8& aType );
+    
+    /**
+    * Get state variable name
+    * @since Series60 2.6
+    * @return Name of the state variable as descriptor.
+    */
+    IMPORT_C const TPtrC8 Name();
+
+    /**
+    * Set state variable name
+    * @since Series60
+    * @param aName  Name of the state variable
+    */
+    IMPORT_C void SetNameL( const TDesC8& aName );
+    
+    /**
+    * Get value of state variable
+    * @since Series60 2.6
+    * @return Value of the state variable as descriptor.
+    */
+    IMPORT_C const TPtrC8 Value();
+    
+    /**
+    * Sets the Value of the state variable (given as a descriptor)
+    * @since Series60 2.6
+    * @param aValue containing the wanted value of the variable
+    */
+    IMPORT_C void SetValueL( const TDesC8& aValue,
+                             TBool aIsModerated = ETrue );
+
+    /**
+    * Sets the Value of the state variable (given as an integer)
+    * @since Series60 2.6
+    * @param aValue containing the wanted value of the variable
+    */
+    IMPORT_C void SetValueL( TInt aValue, TBool aIsModerated = ETrue );
+    
+    /**
+    * Get event 
+    * @since Series60 2.6
+    * @return Eventability, "yes" if eventable.
+    */
+    IMPORT_C const TPtrC8 Eventable();
+    
+    /**
+    * Set event 
+    * @since Series60 
+    *  
+    */ 
+    IMPORT_C void SetEventableL( const TDesC8& aEventable );
+    
+    /**
+    * Get default value
+    * @since Series60 2.6
+    * @param aValue the reference to the value to be set
+    * @return Default value of the variable as a integer.
+    */
+    IMPORT_C void GetDefaultValue( TInt& aValue );
+
+    /**
+    * Get default value
+    * @since Series60 2.6
+    * @return Default value of the variable.
+    */
+    IMPORT_C const TPtrC8 DefaultValue();
+    
+    /**
+    * Get list of allowed values
+    * @since Series60 2.6
+    * @return List of allowed values. 
+    * If variable has not allowedValueList a empty array is returned.
+    */
+    IMPORT_C CDesC8Array* AllowedValuesLC();
+     /**
+    * Add a allowed value
+    * @since Series60
+    * @aParam aAllowedValue a new allowed value
+    */
+    IMPORT_C void AddAllowedValueL( const TDesC8& aAllowedValue );
+    
+    /**
+    * Get maximum value
+    * @since Series60 2.6
+    * @return Maximum value of an integer variable.
+    */
+    IMPORT_C TInt MaxValue();
+    
+    /**
+    * Get minimum value
+    * @since Series60 2.6
+    * @return Minimum value of an integer variable.
+    */
+    IMPORT_C TInt MinValue();
+    
+    /**
+    * Get step
+    * @since Series60 2.6
+    * @return Size of an increment for the value.
+    */
+    IMPORT_C TInt Step();
+
+    /**
+    * Is the statevariable ready for eventing
+    */
+    TBool ReadyForEventing();
+
+    /**
+    * Returns the minimum time between eventing
+    * this statevariable
+    * @return Minimum time between events
+    */
+    TInt MaxEventRate();
+
+    /**
+    * Keeps track of how many timeouts have beend reached after
+    * previous event
+    */
+    void EventTick();
+
+    /**
+    * Sets the minimum time between events
+    * for this statevariable
+    * @param aMaxRate Minimum time between events in microseconds
+    * @param aNormalRate Rate that is used to event this state variable.
+    */
+    void SetMaxEventRate(TInt aMaxRate, TInt aNormalRate);
+    
+    void SetDefaultValueL(const TDesC8& aDefaultValue );
+    void SetRangeMinL(const TDesC8& aRangeMin );
+    void SetRangeMaxL(const TDesC8& aRangeMax );
+    void SetRangeStepL(const TDesC8& aRangeStep );
+    TBool IsModerated();
+private: // Constructors
+
+    /**
+    * C++ default constructor.
+    * @param aElement This pointer contains the state variable element
+    */
+    CUpnpStateVariable();
+    
+    /** 
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL();
+private: // Data
+
+    // Parent service implementation, owned
+    CUpnpServiceImplementation* iParent;
+    // normal event rate
+    TInt            iNormalEventRate;
+    // max event rate
+    TInt            iMaxEventRate;
+    // time
+    TTime           iTime;
+    // event time
+    TTime           iEventTime;
+    // current event time
+    TInt            iCurrentEventTime;
+    // eventing ready flag
+    TBool           iReadyForEventing;
+    // name
+    HBufC8*         iName;
+    // data type
+    HBufC8*         iDataType;
+    // default value
+    HBufC8*         iDefaultValue;
+    // minimal range
+    HBufC8*         iRangeMin;
+    // maximal range
+    HBufC8*         iRangeMax;
+    // range step
+    HBufC8*         iRangeStep;
+        
+    // allowed value list
+    RPointerArray<HBufC8>   iAllowedValueList;
+    // value
+    HBufC8*         iValue;
+    // event table
+    HBufC8*         iEventable;
+    // is moderated flag
+    TBool           iModerated;
+    };
+
+#endif  // C_CUPNPSTATEVARIABLE_H
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_common_api/upnp_common_api.metaxml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="cc561e4a19c830fbee91d90de9d2e008" dataversion="1.0">
+  <name>UPnP Common API</name>
+  <description>UPnP Common API is used by developers of UPnP control points and UPnP devices. It contains functionality and definitions that are common to both control points and devices.</description>
+  <type>c++</type>
+  <subsystem>upnpstack</subsystem>
+  <libs>
+    <lib name="upnpserviceframework.lib" />
+  </libs>
+  <release category="domain"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_control_point_api/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,27 @@
+/** @file
+* 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:  File that exports the files belonging to 
+:                UPnP Control Point API
+*
+*/
+
+
+#include "../../../group/upnpplatformvar.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/upnpcontrolpoint.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnpcontrolpoint.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_control_point_api/inc/upnpcontrolpoint.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,604 @@
+/** @file
+* 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:  implementation of Control Point
+*
+*/
+
+
+#ifndef C_CUPNPCONTROLPOINT_H
+#define C_CUPNPCONTROLPOINT_H
+
+// INCLUDES
+#include <e32base.h>
+#include <badesca.h>
+#include <upnpnetworkeventobserver.h>
+#include "upnpdispatcher.h"
+#include "upnpdispatchercustomer.h"
+#include "upnpdiscoveryobserver.h"
+
+// FORWARD DECLARATIONS
+class CUpnpDevice;
+class CUpnpService;
+class CUpnpAction;
+class CUpnpHttpMessage;
+class CUpnpGenaMessage;
+class CUpnpServiceInfo;
+class CUpnpContentHandlersController;
+class CUpnpCpbDescriptionAgent;
+class CUpnpCpbCurrentHttpClient;
+class CUpnpCpbDiscoveryAgent;
+class CUpnpCpbDeviceRepository;
+class MUpnpCpStackRequestor;
+class MUpnpCpHttpRequestor;
+class CUpnpConnectionManagerNetworkEventProvider;
+class CUpnpCpbInitialEventRetryHandler;
+
+/**
+ * @brief Base class for control points.
+ *
+ * An abstract control point class. This class has an interfaces for following
+ * areas:
+ *
+ * Device discovery
+ * Resolving properties of devices and services
+ * Action requests to the services
+ * Eventing subscriptions
+ *
+ *  @since Series60 2.6
+ */
+class CUpnpControlPoint : public CBase, public MUpnpDiscoveryObserver,
+         public MUpnpNetworkEventObserver
+    {
+
+public:
+    static const TInt KDefaultSubscriptionTimeout = 300; // 5 minutes
+
+    enum TFilteringMode
+        {
+        EBoth,
+        ERada,
+        EControlPoint,
+        };
+
+public:
+    // Constructors and destructors
+
+    /**
+     * Virtual destructor function.
+     */
+    IMPORT_C virtual ~CUpnpControlPoint();
+
+protected:
+    // Constructors
+
+
+    /**
+     * Basic constructor function. Should be called in the constructor of
+     * the deriving class.
+     * @param aFriendlyName The friendly name of the control point. Friendly
+     * name of a control point cannot be seen outside the emulator.
+     */
+    IMPORT_C CUpnpControlPoint();
+
+    /**
+     * For internal, automated test cases use only.
+     */
+    IMPORT_C CUpnpControlPoint(
+                MUpnpCpStackRequestor& aStackRequestor,
+                MUpnpCpHttpRequestor& aHttpRequestor );
+
+    /**
+     * One of the two ConstructL functions of CUpnpControlPoint has to be called
+     * in the ConstructL (or corresponding) function of the deriving class.
+     * \n Sets essential variables and the target device types.
+     * Examples of target device types:
+     * <ul><li>AV control point: MediaServer:1, MediaRenderer:1
+     * <li>Lighting control point: SaunaLight:1, CandleLight:1 (an imaginary example)
+     * </ul>
+     * @since Series60 2.6
+     * @param aTargetDeviceTypes A descriptor array containing the target device
+     * types in separate descriptors.
+     */
+    IMPORT_C void ConstructL( const CDesC8Array& aTargetDeviceTypes );
+
+    /**
+     * One of the two ConstructL functions of CUpnpControlPoint has to be called
+     * in the ConstructL (or corresponding) function of the deriving class.
+     * \n Sets essential variables and the target device types.
+     * Examples of target device types:
+     * <ul><li>Printer control point: Printer:1
+     * <li>Cooking control point: RobotCook:1 (an imaginary example)
+     * </ul>
+     * @since Series60 2.6
+     * @param aTargetDeviceType A descriptor containing the target device type
+     */
+    IMPORT_C void ConstructL( const TDesC8& aTargetDeviceType );
+
+public:
+    // Functions from devired class
+
+    /**
+     * Make a SSDP search. Search string should be some of these strings (defined in UPnP Device Architecture):\n\n
+     * <ul>
+     * <li><b>urn:schemas-upnp-org:device:<i>deviceType:v</i></b>,\r where <i>deviceType:v</i> should be replaced by target device type and version. Search for devices of specific type.\n
+     * <li><b>urn:schemas-upnp-org:service:<i>serviceType:v</i></b>,\r where <i>serviceType:v</i> should be replaced by target service type and version. Search for services of specific type.\n
+     * <li><b>upnp:rootdevice</b>\r Search for root devices.\n
+     * <li><b>ssdp:all</b>\r Search for any devices or services\n
+     * </ul>
+     * @since Series60 2.6
+     * @param aSearchString The search target.
+     */
+    IMPORT_C void SearchL( const TDesC8& aSearchString );
+
+    /**
+     * Sends an action. This action can be instantiated using
+     * CUpnpService::CreateActionLC() function. Target addresses and some other
+     * necessary information are added in the action during construction.
+     * After instantiation of the action, set the arguments using e.g.
+     * CUpnpAction::SetArgument() function. After this, you are ready to call
+     * this function.
+     * After the target service has reacted to the action,
+     * it will send a response. This response is forwarded to
+     * ActionResponseReceived function.
+     *
+     * The user of this function has the responsibility to delete the CUpnpAction instance.
+     * @since Series60 2.6
+     * @param aAction The action to be sent.
+     */
+    IMPORT_C void SendL( CUpnpAction* aAction );
+
+    /**
+     * Sends a HTTP message. This HTTP message can be instantiated in many
+     * ways; it's recommended to use RUpnpHttpMessageFactory class. When the
+     * response to this request has been receiveid, the HttpResponseReceived()
+     * virtual function is called.
+     *
+     * Notice that the user of this function has the responsibility to delete
+     * the CUpnpHttpMessage instance.
+     * @since Series60 2.6
+     * @param aMessage The message to be sent.
+     */
+    IMPORT_C void SendL( CUpnpHttpMessage* aMessage );
+
+    /**
+     * Returns the device list maintained by CUpnpControlPoint. Only target type
+     * devices are added to this list. (Recall: target types are defined in
+     * ConstructL(...) function of CUpnpControlPoint.
+     *
+     * While discovering devices, the DeviceDiscovered(...) function is called
+     * once for every device after the device has been added to this list.
+     */
+    IMPORT_C const RPointerArray<CUpnpDevice>& DeviceList() const;
+
+    /**
+     * Subscribes to a service. This starts the eventing to this control point
+     * done by the target service. Practically, the StateUpdated virtual
+     * function is called when an event is received.
+     *
+     * It's necessary to subscribe to a service when the service is used by
+     * this control point.
+     *
+     * See service definitions to see the list of the evented state variables;
+     * not every state variable is evented.
+     *
+     * It's not needed to maintain a separate list of subscribed services in
+     * the deriving class. Control point manages a such list. If the target
+     * service is already evented, this function does nothing.
+     * @since Series60 2.6
+     * @param aService The target service.
+     */
+    IMPORT_C void SubscribeL( CUpnpService* aService );
+
+    /**
+     * Removes the subscription of the target services. Practically, eventing
+     * from target service is stopped
+     * @since Series60 2.6
+     * @param aService The target service.
+     */
+    IMPORT_C void UnsubscribeL( const CUpnpService* aService );
+
+    /**
+     * Removes the subscription of the target services. Practically, eventing
+     * from target service is stopped
+     * @since Series60 2.6
+     * @param aService The target service.
+     * @param aSendUnsubscribeMessage ETrue if unsubscription message is sent to
+     * remote host. Otherwise EFalse ( only remove service ).
+     */
+    void UnsubscribeL( CUpnpService* aService, TBool aSendUnsubscribeMessage );
+
+    /**
+     * Resubscribes to a service.
+     * @param aServiceInfo The target, already subscribed service info
+     */
+    void ResubscribeL( CUpnpServiceInfo* aServiceInfo );
+
+public: // From MUpnpDiscoveryObserver
+
+    // interface for CUpnpDispatcher
+    /**
+     * For internal use; called by CUpnpDispatcher.
+     * @since Series60 2.6
+     * @param aDevice The target service.
+     */
+    IMPORT_C void DeviceFoundL( CUpnpDevice& aDevice );
+
+    /**
+     * For internal use; called by CUpnpDispatcher.
+     * @since Series60 2.6
+     * @param aDevice The target service.
+     */
+    IMPORT_C void DeviceLostL( CUpnpDevice& aDevice );
+
+    /**
+     * For internal use; called by CUpnpDispatcher.
+     * @since Series60 2.6
+     * @return the application path
+     */
+    IMPORT_C const TDesC8& Path();
+
+public:
+    /**
+     * This function will be invoke if IP Address of UPnP changes
+     */
+    void AddressChangedL();
+
+    /**
+     * For internal use.
+     * @since Series60 2.6
+     * @param aDevice The target service.
+     */
+    void MessageReceived( CUpnpHttpMessage* aHttpMessage );
+
+    /**
+     * ProcessDeviceMessageL
+     * @since Series60 5.0
+     * @param aHttpMessage
+     */
+    void ProcessDeviceMessageL( CUpnpHttpMessage* aHttpMessage );
+
+    /**
+     * ProcessServiceMessageL
+     * @since Series60 5.0
+     * @param aHttpMessage
+     */
+    void ProcessServiceMessageL( CUpnpHttpMessage* aHttpMessage );
+
+    /**
+     * SubscriptionResponseReceivedL
+     * @since Series60 2.6
+     * @param aServiceInfo
+     */
+    void SubscriptionResponseReceivedL( CUpnpHttpMessage& aHttpMessage );
+
+    /**
+     * UnSubscriptionResponseReceived
+     * @since Series60 3.2
+     * @param aHttpMessage
+     */
+    void UnSubscriptionResponseReceived();
+
+    /**
+     * ProcessActionMessageL
+     * @since Series60 3.2
+     * @param aHttpMessage
+     */
+    void ProcessActionMessageL( CUpnpHttpMessage* aHttpMessage );
+
+   /**
+    * NotifyReceivedL
+    * @since Series60 2.6
+    * @param aHttpMessage
+    */
+   void NotifyReceivedL( CUpnpHttpMessage& aHttpMessage );
+    
+    /**
+     * Provides handling for postponed initial event that comes before subscription 
+     * transaction has been completed
+     * @param aGenaMsg 
+     */
+   void HandlePostponedInitialEventL( CUpnpGenaMessage& aGenaMsg );
+   
+private: // New functions
+
+    /**
+     * ActionMessage
+     * @since Series60 3.1
+     * @param aHttpMessage
+     */
+    void ActionMessage(CUpnpHttpMessage* aHttpMessage);
+
+    /**
+     * Removes root device from device repository, and deletes passed object
+     * @since Series60 3.2
+     * @param aDevice
+     */
+    void RemoveRootDeviceLD( CUpnpDevice* aDevice );
+
+    /**
+     * RemoveActionsL
+     * @since Series60 3.2
+     * @param aDevice
+     */
+    void RemoveActionsL(CUpnpDevice* aDevice );
+
+    /**
+     * RemoveServicesL
+     * @since Series60 3.2
+     * @param aDevice
+     */
+    void RemoveServicesL( CUpnpDevice* aDevice );
+
+    /**
+     * FindServiceInfoByService
+     * @param aService
+     */
+    CUpnpServiceInfo* FindServiceInfoByService( CUpnpService* aService );
+
+    /**
+     * FindServiceInfoByGenaMessage
+     * @param aGenaMsg
+     */
+    CUpnpServiceInfo* FindServiceInfoByGenaMessage(
+            CUpnpGenaMessage* aGenaMsg );
+
+    /**
+     * RemoveFromSubscribedListD
+     * @param aServiceInfoToRemove service info that will be removed from
+     *     subscribed list
+     */
+    void RemoveFromSubscribedList( CUpnpServiceInfo* aServiceInfoToRemove );
+
+    /**
+     * MapHttpError
+     * @param http error
+     * @since Series60 3.2
+     * @return generic symbian error
+     */
+    TInt MapHttpError( TInt aError );
+
+    /**
+     * Sends a HTTP message that is response and destroy it. Leave safe.
+     * @param aMessage response to be sent.
+     */
+    void SendResponseMessageLD( CUpnpHttpMessage* aResponse );
+
+    /**
+     * CheckEventKey
+     * @param aIncomingSeq incoming event key in notify message
+     * @param aExistingSeq existing event key
+     * @since Series60 3.2
+     * @return generic symbian error
+     */
+    TInt CheckEventKey( const TDesC8& aIncomingSeq, TUint32 aExistingSeq );
+
+    /**
+     * Send a proper error basing on httpmsg
+     * @since Series60 2.6
+     * @param aHttpMessage http message
+     * @param aCode error code
+     */
+    void SendErrorResponseL( CUpnpHttpMessage* aHttpMessage, THttpStatusCode aCode );
+    
+    // Gena events handling methods
+    CUpnpServiceInfo* FindServiceInfoBySid( RPointerArray<CUpnpServiceInfo>& aInfos,
+            const TDesC8& aSid );
+    
+    void ResubscribeL( CUpnpServiceInfo& aInfo );
+    
+    void ParseEventUpdateStateVariablesL(
+            CUpnpGenaMessage& aGenaMsg, CUpnpServiceInfo& aInfo );
+    
+    THttpStatusCode ValidateEventResolveHttpResponseCode(
+            CUpnpGenaMessage& aGenaMsg );
+
+public:
+
+    /**
+     * Device getter.
+     * @since Series 60 2.6
+     * @param aUuid A Universal Unique Identifier of device.
+     * @return Founded device.
+     */
+    IMPORT_C const CUpnpDevice* Device(const TDesC8& aUuid);
+
+    /**
+     * Callback function for eventing. This function is called when
+     * a) before this, we have made a subscription to the service
+     * b) at least one of the evented state variables of the service
+     * has changed
+     *
+     * Note that you cannot see which of the evented state variables has
+     * changed. Fortunately, there are not many evented state variables.
+     * @since Series60 2.6
+     * @param aService At least one of the evented state variables of this
+     * service has changed. CUpnpControlPoint class owns the CUpnpService instance;
+     * do not delete it after inspection!
+     */
+    virtual void StateUpdatedL( CUpnpService* aService ) = 0;
+
+    /**
+     * Callback function for device discovery. This function is called once
+     * for every device. The device is already then in the device list
+     * accessible through DeviceList() function.
+     * @since Series60 2.6
+     * @param aDevice The newly discovered device.
+     */
+    virtual void DeviceDiscoveredL( CUpnpDevice* aDevice ) = 0;
+
+    /**
+     * Callback function for device disappearance. This function is called
+     * once for every device that has disappeared.
+     *
+     * Notice that before this, the device is removed from the generic
+     * control point
+     * @since Series60 2.6
+     * @param aDevice The disappeared device.
+     */
+    virtual void DeviceDisappearedL( CUpnpDevice* aDevice ) = 0;
+
+    /**
+     * Callback function for action responses. This function is called
+     * @since Series60 2.6
+     * @param aAction
+     */
+    virtual void ActionResponseReceivedL( CUpnpAction* aAction ) = 0;
+
+    /**
+     * Callback function for HTTP responses
+     * @since Series60 2.6
+     * @param aMessage
+     */
+    virtual void HttpResponseReceivedL( CUpnpHttpMessage* aMessage ) = 0;
+
+    /**
+     * This function creates Gena subscription message, which will be used for data retrieval.
+     */
+    CUpnpGenaMessage* CreateSubscriptionMessageL(CUpnpService& aService,
+            const TDesC8& aPath, TInt aTimeout, THTTPMsgType aType);
+
+    /**
+     * Gets address from Url
+     * @since Series60 3.2
+     * @param aUrl
+     * @return TInetAddr
+     */
+    TInetAddr GiveAddressL(const TDesC8& aUrl);
+
+    /**
+     * Non-leaving caller of callback function for eventing.
+     * @since Series60 3.2
+     * @see CUpnpControlPoint::StateUpdatedL
+     */
+    void StateUpdated( CUpnpService* aService );
+
+    /**
+     * Non-leaving caller of callback function for device discovery.
+     * @since Series60 3.2
+     * @see CUpnpControlPoint::DeviceDiscoveredL
+     */
+    void DeviceDiscovered( CUpnpDevice* aDevice );
+
+    /**
+     * Non-leaving caller of callback function for device disappearance.
+     * @since Series60 3.2
+     * @see CUpnpControlPoint::DeviceDisappearedL
+     */
+    void DeviceDisappeared( CUpnpDevice* aDevice );
+
+    /**
+     * Non-leaving caller of callback function for action responses.
+     * @since Series60 3.2
+     * @see CUpnpControlPoint::ActionResponseReceivedL
+     */
+    void ActionResponseReceived( CUpnpAction* aAction );
+
+    /**
+     * Non-leaving caller of callback function for HTTP responses.
+     * @since Series60 3.2
+     * @see CUpnpControlPoint::HttpResponseReceivedL
+     */
+    void HttpResponseReceived( CUpnpHttpMessage* aMessage );
+
+    /**
+     * Checks if all device in tree expired
+     * @since Series60 3.2
+     * @param aRoot Device
+     * @return ETrue when all devices expired, otherwise EFalse
+     */
+    TBool AllDevicesExpired( CUpnpDevice* aDevice );
+
+public:
+
+    /**
+     * Starts rada device asynchronusly
+     * sience Series60 5.0
+     * @param aStatus asychronus object to completes the request
+     */
+    IMPORT_C void EnableRadaDeviceL( TRequestStatus& aStatus );
+
+    /**
+     * Starts rada device synchronusly
+     * sience Series60 5.0
+     * @return rada device start status
+     */
+    IMPORT_C TInt EnableRadaDeviceL();
+
+    /**
+     * Stops rada device synchronusly
+     * sience Series60 5.0
+     */
+    IMPORT_C void DisableRadaDeviceL();
+
+    /*****IPFiltering****/
+    IMPORT_C void StartIPFilteringL( TFilteringMode aMode = EBoth );
+    IMPORT_C void StopIPFilteringL( TFilteringMode aMode = EBoth );
+    /********************/
+
+public:    // from MUpnpNetworkEventObserver
+
+    /**
+     * It is called from bottom layer when network event occurs [callback method]
+     * sience Series60 5.0
+     * @result None
+     */
+    IMPORT_C void NetworkEvent( CUpnpNetworkEventBase* aEvent );
+
+private: // Data
+
+    // HTTP messages sender/response, owned
+    CUpnpCpbCurrentHttpClient* iCpbHttpClient;
+
+    // It's necessary to store this pointer, because in
+    // AddressChanged method iCpbHttpClient is recreated.
+    // not owned
+    // NULL if default stackRequestor should be constructed
+    MUpnpCpStackRequestor* const iPredefinedStackRequestor;
+
+    // not owned
+    // NULL if default httpRequestor should be constructed
+    MUpnpCpHttpRequestor* const iPredefinedHttpRequestor;
+
+    // Discovery processing class
+    CUpnpCpbDescriptionAgent* iDescriptionAgent;
+
+    // Target device types, owned
+    CDesC8ArrayFlat* iTargetDeviceTypes;
+
+    // CP owns array objects
+    // Subscribed services list, owned
+    RPointerArray<CUpnpServiceInfo> iSubscribedServicesInfos;
+
+    // Action list, owned
+    RPointerArray<CUpnpAction> iActionList;
+
+    // Ropository with devices
+    CUpnpCpbDeviceRepository* iDeviceRepository;
+
+    // Discovery processing class
+    CUpnpCpbDiscoveryAgent* iDiscoveryAgent;
+
+    //sax parsers
+    CUpnpContentHandlersController* iSaxController;
+
+    // Network events provider used for WLAN lost and address change
+    CUpnpConnectionManagerNetworkEventProvider *iNetworkEventProvider;
+    
+    CUpnpCpbInitialEventRetryHandler* iInitialEventRetry;
+    };
+
+#endif // C_CUPNPCONTROLPOINT_H
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_control_point_api/upnp_control_point_api.metaxml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="6f534afa09f07fc25a19214b7c1ce7b1" dataversion="1.0">
+  <name>UPnP Control Point API</name>
+  <description>UPnP Control Point API is used by developers of UPnP control points. This API is used to control and show the status of available UPnP collaborating devices in the network. It hides the addressing, discovery, description and eventing layers and provides control layer functionality. It can be used to send HTTP messages and actions to remote services, and receive action responses from them. Furthermore it offers functionality to control the eventing subscriptions (subscriptions, subscription renewals and unsubscriptions).</description>
+  <type>c++</type>
+  <subsystem>upnpstack</subsystem>
+  <libs>
+    <lib name="upnpcontrolpointbase.lib" />
+  </libs>
+  <release category="domain"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,34 @@
+/** @file
+* 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:  File that exports the files belonging to 
+:                UPnP Device API
+*
+*/
+
+
+#include "../../../group/upnpplatformvar.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/upnpserviceimplementation.h         MW_LAYER_PLATFORM_EXPORT_PATH( upnpserviceimplementation.h )
+../inc/upnpsubscriberlibraryobserver.h     MW_LAYER_PLATFORM_EXPORT_PATH( upnpsubscriberlibraryobserver.h )
+../inc/upnpdeviceimplementationbase.h      MW_LAYER_PLATFORM_EXPORT_PATH( upnpdeviceimplementationbase.h )
+../inc/upnpdeviceimplementation.h          MW_LAYER_PLATFORM_EXPORT_PATH( upnpdeviceimplementation.h )
+../inc/upnpdevicedescriptionprovider.h     MW_LAYER_PLATFORM_EXPORT_PATH( upnpdevicedescriptionprovider.h )
+../inc/upnpdevicedescriptionrequest.h      MW_LAYER_PLATFORM_EXPORT_PATH( upnpdevicedescriptionrequest.h )
+../inc/upnpdevicedescriptionstore.h        MW_LAYER_PLATFORM_EXPORT_PATH( upnpdevicedescriptionstore.h )
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/inc/upnpdevicedescriptionprovider.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,78 @@
+/** @file
+* Copyright (c) 2005-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:  Declaration of MUpnpSubscriberLibraryObserver
+*
+*/
+
+#ifndef C_MUPNPDEVICEDESCRIPTIONPROVIDER_H
+#define C_MUPNPDEVICEDESCRIPTIONPROVIDER_H
+
+//INCLUDES
+#include <e32base.h>
+#include <f32file.h>
+
+//FORWARD DECLARATIONS
+class CUpnpDeviceDescriptionRequest;
+
+// CLASS DECLARATION
+/**
+*  This interface informs local device implementation owner 
+*  about incomig description request via callbacks:
+*  - OnDeviceDescription
+*  - OnServiceDescription
+*  - OnIcon
+*  If callback returns error 404 Not found is returned to 
+*  remote requestor otherwse GetFile() is invoked
+*  which has to return open hadle to description file. 
+*/
+class MUpnpDeviceDescriptionProvider
+{
+public: // New functions 
+   /**
+    * Method is called on request of device icon 
+    * @param aServiceUri service description uri
+    * @param aServiceFile open handle to icon file    
+    * @return System wide error code
+    */    
+    virtual TInt OnDeviceDescription( CUpnpDeviceDescriptionRequest& aRequest ) = 0;
+
+   /**
+    * Method is called on request of service description xml
+    * @param aServiceUri service description uri
+    * @param aServiceFile open handle to service description file
+    * @return System wide error code.
+    */
+    virtual TInt OnServiceDescription( CUpnpDeviceDescriptionRequest& aRequest ) = 0;
+   /**
+    * Method is called on request of device icon 
+    * @param aServiceUri service description uri
+    * @param aServiceFile open handle to icon file    
+    * @return System wide error code
+    */    
+    virtual TInt OnIcon( CUpnpDeviceDescriptionRequest& aRequest ) = 0;
+    
+   /**
+    * Method matches uri and returs a handle to an open file 
+    * @param aServiceUri service description uri
+    * @param aServiceFile open handle to icon file    
+    * @return System wide error code
+    */    
+    virtual TInt GetFile( const TDesC8& aUri, RFile& aFile ) = 0;
+    
+};
+
+
+#endif  // C_MUPNPDEVICEDESCRIPTIONPROVIDER_H
+
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/inc/upnpdevicedescriptionrequest.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,85 @@
+/** @file
+* Copyright (c) 2005-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:  Declaration of MUpnpSubscriberLibraryObserver
+*
+*/
+
+//INCLUDES
+#ifndef C_MUPNPDESCRIPTIONPROVIDER_H
+#define C_MUPNPDESCRIPTIONPROVIDER_H
+
+#include <e32base.h>
+#include <in_sock.h>
+
+
+//FORWARD DECLARATIONS
+class CUpnpHttpMessage;
+
+// CLASS DECLARATION
+/**
+*  
+*/
+NONSHARABLE_CLASS( CUpnpDeviceDescriptionRequest ): public CBase
+{
+public: // New functions 
+
+   /**
+    * Method is called on request of device icon 
+    * @param aServiceUri service description uri
+    * @param aServiceFile open handle to icon file    
+    * @return System wide error code
+    */    
+    static CUpnpDeviceDescriptionRequest* NewL( const TDesC8& aUri,
+                                                 const TInetAddr& aInetAddress );
+    
+    static CUpnpDeviceDescriptionRequest* NewLC( const TDesC8& aUri,
+                                                  const TInetAddr& aInetAddress );
+        
+   
+    /**
+     * Method matches uri and returs a handle to an open file 
+     * @param aServiceUri service description uri
+     * @param aServiceFile open handle to icon file    
+     * @return System wide error code
+     */
+    IMPORT_C void InetAddress( TInetAddr& aInetAddr );
+
+    /**
+     * Method matches uri and returs a handle to an open file 
+     * @param aServiceUri service description uri
+     * @param aServiceFile open handle to icon file    
+     * @return System wide error code
+     */
+    IMPORT_C TPtrC8 Uri();
+                    
+
+    CUpnpDeviceDescriptionRequest::~CUpnpDeviceDescriptionRequest();
+    
+private:
+    
+    CUpnpDeviceDescriptionRequest::CUpnpDeviceDescriptionRequest( const TInetAddr& aInetAddress );
+
+    void CUpnpDeviceDescriptionRequest::ConstructL( const TDesC8& aUri );
+    
+    RBuf8 iUri;
+    
+    TInetAddr iAddress;
+        
+    
+};
+
+
+#endif  // C_MUPNPDESCRIPTIONPROVIDER_H
+
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/inc/upnpdevicedescriptionstore.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,200 @@
+/** @file
+* 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:  Declares the CUpnpDeviceDescriptionStore class
+ *
+*/
+
+
+#ifndef C_CUPNPDEVICEDESCRIPTIONSTORE_H
+#define C_CUPNPDEVICEDESCRIPTIONSTORE_H
+
+#include <e32base.h> 
+#include <xmlengdom.h> 
+#include <xmlengdocument.h>
+#include <xmlengdomparser.h>
+#include <upnpicon.h>
+
+class CUpnpDevice;
+
+const TInt KMinSpaceToWriteDescription = 204800;
+
+class CUpnpDeviceDescriptionStore : public CBase
+    {
+public:
+
+    /**    
+     * Two phased constructor
+     * @since S60 3.2    
+     * @param aDescription device description xml file
+     * @return an instance of CUpnpDeviceDescriptionStore class
+     */
+    IMPORT_C static CUpnpDeviceDescriptionStore* NewL( const TDesC& aDescription );
+
+    /**    
+     * Two phased constructor, leaves the object onto the CleanupStack
+     * @since S60 3.2    
+     * @param aDescription device description xml file
+     * @return an instance of CUpnpDeviceDescriptionStore class
+     */
+    IMPORT_C static CUpnpDeviceDescriptionStore* NewLC( const TDesC& aDescription );
+
+    /**    
+     * Destructor
+     * @since S60 3.2        
+     */
+    virtual ~CUpnpDeviceDescriptionStore();
+
+    /**    
+     * Returns description file
+     * 
+     * @since S60 5.1
+     * @return file name with path
+     */
+    IMPORT_C const TDesC& DescriptionFile();
+    
+    /**     
+     * Sets some property value in an emmbedded device.
+     * @since S60 3.2
+     * @param aName tag name
+     * @param aValue tag value
+     * @param aUuid device udn
+     */
+    IMPORT_C void SetPropertyL( const TDesC8& aName, const TDesC8& aValue,
+        const TDesC8& aUuid );
+
+    /**
+     * Removes the tag of the device description of xml
+     * @param aTagName - the tag of device that should be removed
+     */
+    IMPORT_C void RemoveTagL( const TDesC8& aTagName );
+
+    /**
+     * Adds the tag of the device description of xml
+     * @param aTagName - the tag of device that should be added
+     * @return the element that was added
+     */
+    IMPORT_C TXmlEngElement AddTagL( const TDesC8& aTagName );
+
+    /**     
+     * Removes icon property 
+     * @since S60 3.2
+     * @param aUrl
+     */
+    IMPORT_C void RemoveIconL( const TDesC8& aUrl );
+
+    /**     
+     * Removes all icons property 
+     * @since S60 3.2
+     */
+    IMPORT_C void RemoveIconsL();
+
+    /**     
+     * Adds icon property 
+     * @since S60 3.2
+     * @param aIcon
+     */
+    IMPORT_C void AddIconL( const CUpnpIcon& aIcon );
+
+    /*Updates icon property 
+     * @since S60 3.2
+     * @param aIcon
+     */
+    IMPORT_C void UpdateIconL( const CUpnpIcon& aIcon );
+
+    /**
+     * Gets some property value from an embedded device.
+     * @since S60 3.2
+     * @param aName tag name
+     * @param aUuid device udn
+     * @return property value
+     */
+    IMPORT_C TPtrC8 Property( const TDesC8& aName, const TDesC8& aUuid );
+
+    /**     
+     * Sets some property value in a root device.
+     * @since S60 3.2
+     * @param aName tag name
+     * @param aValue tag value  
+     */
+    IMPORT_C void SetPropertyL( const TDesC8& aName, const TDesC8& aValue );
+
+    /**     
+     * Gets some property value from a root device.
+     * @since S60 3.2
+     * @param aName tag name 
+     * @return property value
+     */
+    IMPORT_C TPtrC8 Property( const TDesC8& aName );
+
+    /**     
+     * Saves device description file path
+     * @since S60 3.2    
+     */
+    IMPORT_C void SaveL();
+
+    /**     
+     * Get icons from device description xml.
+     * Caller is owner of the returned array.
+     * 
+     * @since S60 5.1
+     * @return array with icons
+     */
+    IMPORT_C RPointerArray< CUpnpIcon > IconListL();
+
+private:
+
+    /**    
+     * Default C++ constructor
+     * @since S60 3.2        
+     */
+    CUpnpDeviceDescriptionStore();
+
+    /**    
+     * 2nd phase constructor
+     * @since S60 3.2    
+     * @param aDescription    
+     */
+    void ConstructL( const TDesC& aDescription );
+
+    /**    
+     * Adds icon element
+     * @since S60 3.2    
+     * @param aPropertyIcon 
+     * @param aMimeType icon mime type    
+     * @param aWidth icon width
+     * @param aHeight icon height
+     * @param aDepth icon depth
+     * @param aUrl icon url
+     */
+    void AddIconElementL( TXmlEngElement& aPropertyIcon,
+        const TDesC8& aMimeType, const TDesC8& aWidth, const TDesC8& aHeight,
+        const TDesC8& aDepth, const TDesC8& aUrl );
+
+    /**    
+     * Gets iconlist element
+     * @since S60 3.2    
+     */
+    TXmlEngElement GetIconlistElementL();
+
+private:
+    
+
+    RXmlEngDocument iDescription;
+    RXmlEngDOMImplementation iDOMImpl;
+    RXmlEngDOMParser iParser;
+
+    RBuf iFileName;
+    };
+
+#endif // ? C_CUPNPDEVICEDESCRIPTIONSTORE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/inc/upnpdeviceimplementation.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,142 @@
+/** @file
+* 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:  Declares the CUpnpDevice class
+*
+*/
+
+#ifndef C_CUPNPDEVICEIMPLEMENTATION_H
+#define C_CUPNPDEVICEIMPLEMENTATION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <badesca.h>
+#include "upnpdeviceimplementationbase.h"
+
+class MUpnpDeviceDescriptionProvider;
+
+/**
+*  Device
+*
+*  Prior using the CUpnpDevice class, client application has to create the network
+*  connection. If connection is not up and running, the
+*  CUpnpDispatcherEngine class construction will fail.
+*  See UPnP Interface Design document for instuctions.
+*
+*  @since Series60 3.2
+*/
+class CUpnpDeviceImplementation : public CUpnpDeviceImplementationBase
+    {
+public:
+     
+    enum TStopMode
+        {
+        EStopNormal,
+        EStopSilent
+        };
+
+    /**
+    * Two-phased constructor.
+    * The most important operations invoked inside this method:
+    * 1. Start Upnp Stack (if not started yet)
+    * 2. Parse device description to DOM for further updating purpose.
+    *
+    * @since Series60 3.2
+    * @param aDescriptionStore Device description store reference
+    * @param aDeviceDescriptioUri Uri of device description xml used in 
+    *        discovery and description layers of Upnp device architecture 
+    * @param aProvider description provider which resolves file paths for
+    *        description uri's: device and service descriptions and icons       
+    * @return A new CUpnpDeviceImplementation instance.
+    */
+    IMPORT_C static CUpnpDeviceImplementation* NewL( const TDesC8& aDeviceDescriptioUri,
+                                                     CUpnpDeviceDescriptionStore& aDescriptionStore,
+                                                     MUpnpDeviceDescriptionProvider& aProvider );
+
+    /**
+    * Called after the device is constructed.
+    * The most important operations invoked inside this method:
+    * 1. Start the HTTP server.
+    * 2. Generate the UUID (if missing in the device description)
+    * 3. Save the device description to the file.
+    * 4. Advertise the device in a network 
+    *    (send two ssdp:bye-bye/ and two ssdp:alive messages).
+    * 
+    * @since Series60 3.2
+    */
+    IMPORT_C virtual void StartL( const TInt aPort = KRandomPort );        
+
+    /**
+    * Stops the device. It equals to the Stop( EStopNormal ). 
+    * @since Series60 3.2
+    */
+    IMPORT_C virtual void StopL();
+
+    /**
+    * Stops the device.
+    * Most important operations:
+    * 1. Device is removed from Message Handler/SSDP Server device library. 
+    * 2. HTTP server is stopped.
+    *
+    * @param aMode one of the following modes:
+    *    - EStopNormal - ssdp:bye-bye messages are sent before 
+    *                    the device is removed from the library     
+    *    - EStopSilent - device is removed from the library silently 
+    *                    without ssdp:bye-bye messages    
+    * @since Series60 3.2
+    */
+    IMPORT_C void StopL( TStopMode aMode );
+    
+    /**
+    * C++ default constructor.
+    */
+    CUpnpDeviceImplementation();
+
+    /**
+    * Destructor.
+    */
+    IMPORT_C virtual ~CUpnpDeviceImplementation();
+
+private:
+
+    /**
+    * Symbian 2nd phase constructor can leave
+    * @since Series60 3.2
+    * @param aFilename File to create device from
+    */
+    void ConstructL( const TDesC8& aDeviceDescriptioUri, 
+                     CUpnpDeviceDescriptionStore& aDescriptionStore,
+                     MUpnpDeviceDescriptionProvider& aProvider );
+
+    /**
+    * Internal: Stops device and HTTP server
+    * @since Series60 3.2
+    */    
+    void StopDeviceL( TStopMode aMode );
+
+     /**
+    * Internal: Adds device
+    * @since Series60 3.2
+    */ 
+    void AddLocalDeviceL();
+
+     /**
+    * Internal: Removes device
+    * @since Series60 3.2
+    */ 
+    void RemoveLocalDeviceL( const TDesC8& aUuid, TBool aSilent );
+    };
+
+#endif  // C_CUPNPDEVICEIMPLEMENTATION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/inc/upnpdeviceimplementationbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,257 @@
+/** @file
+* 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:  Declares the CUpnpDeviceImplementationBase class
+*
+*/
+
+#ifndef C_CUPNPDEVICEIMPLEMENTATIONBASE_H
+#define C_CUPNPDEVICEIMPLEMENTATIONBASE_H
+
+// INCLUDES
+#include <e32std.h>
+#include <badesca.h>
+#include <upnpcons.h>
+#include "upnpservice.h"
+#include "upnpdiscoveryobserver.h"
+#include "upnpdescriptionproperty.h"
+#include "upnpdevice.h"
+
+
+// FORWARD DECLARATIONS
+class TUpnpDevice;
+class TUpnpService;
+class CUpnpIcon;
+class CUpnpDesciptionProperty;
+class CUpnpDeviceDescriptionStore;
+class CUpnpHttpServerTransactionHandler;
+class MUpnpDeviceDescriptionProvider;
+
+/**
+*  Device
+*
+*  Prior using the CUpnpDevice class, client application has to create the network
+*  connection. If connection is not up and running, the
+*  CUpnpDispatcherEngine class construction will fail.
+*  See UPnP Interface Design document for instuctions.
+*
+*  @since Series60 5.0_HN
+*/
+class CUpnpDeviceImplementationBase : public CUpnpDevice
+    {
+    
+public: // Constructors and destructor
+    
+    /**
+    * Destructor.
+    */
+    IMPORT_C virtual ~CUpnpDeviceImplementationBase();
+
+    /**
+    * Starts the device.
+    * Pure virtual function.
+    * @since Series60 3.2
+    * @param aPort Port on which HTTP server should be started.
+    */
+    virtual void StartL( const TInt aPort = KRandomPort ) = 0;
+   
+    /**
+    * Stops the device.
+    * Pure virtual function.
+    * @since Series60 3.2
+    */
+    virtual void StopL() = 0;
+    
+    /**
+    * Sets description property for the device.
+    * This method changes only internal attributes of the Device object
+    * they are automatically saved in the description file by the StartL method
+    * @since Series60 3.0
+    */
+    IMPORT_C void SetDescriptionPropertyL( const TDesC8& aPropertyName,
+                                           const TDesC8& aPropertyValue );
+    
+    /**
+    * Removes tag from device description xml
+    * @param aPropertyName the name of the element that should be removed
+    */
+    IMPORT_C void RemoveDescriptionPropertyL( const TDesC8& aPropertyName );
+    
+    /**
+    * Removes icon of given url.  
+    * Device performs the following operations:
+    * - deletes respective icon element from description XML flie 
+    * @param aUrl icon url
+    */
+    IMPORT_C void RemoveIconL( const TDesC8& aUrl);
+
+    /**
+    * Removes all icons
+    * Device performs the following operations:
+    * - deletes all icon elements from description XML flie 
+    */
+    IMPORT_C void RemoveIconsL();
+
+    /**
+    * Adds new icon to a device description. 
+    * Device performs the following operations:
+    * - adds icon element to its device description XML file 
+    * @param aIcon icon reference
+    */   
+    IMPORT_C void AddIconL( const CUpnpIcon& aIcon );
+
+    /**
+    * Updates icon of given url.  
+    * Device performs the following operations:
+    * - replaces respective icon element from description XML flie
+    *   url value remains unchanged 
+    * @param aIcon icon reference
+    */
+    void UpdateIconL( const CUpnpIcon& aIcon );    
+              
+    /**
+    * Generates Universally Unique Identifier using good algorithm.
+    * @since Series60 3.2
+    * @return A new UUID in following format:
+    * "uuid:01234567-0123-0123-0123-012345678901"
+    */
+    HBufC8* GenerateUuidL();
+               
+    /**
+    * Creates dispatcher to iDispatcher-member.
+    * @since Series60 3.2
+    */
+    void CreateDispatcherL();
+
+    /**
+    * C++ default constructor.
+    */
+    CUpnpDeviceImplementationBase();
+                                      
+    /**
+    * Getter for address of the device
+    * @since Series S60 3.1
+    * @return TInetAddr
+    */        
+    IMPORT_C virtual TInetAddr Address();    
+   
+    /**
+    * Adds the service to dispatcher
+    * @since Series S60 3.1
+    * @param aService 
+    */
+    void AttachServiceL( CUpnpService *aService );
+            
+    /**
+    * For internal use. Sets the dispatcher pointer of this device
+    * @since Series S60 3.1
+    * @param aDispatcher an instance of dispatcher 
+    */
+    void SetDispatcher( CUpnpDispatcher* aDispatcher ); 
+    
+    /**************IPFILTERING*************/
+    
+    IMPORT_C void StartIPFilteringL();
+    IMPORT_C void StopIPFiltering();
+	/**************************************/
+
+    MUpnpDeviceDescriptionProvider& DescritptionProvider();
+    
+protected:    // New functions
+
+    /**
+    * Starts HTTP Server if the device is a root device.
+    * @since Series60 5.0_HN
+    * @param aPort Port on which HTTP server should be started.
+    */
+    void StartHttpServerL( const TInt aPort );
+
+    /**
+    * Stops HTTP Server.
+    * @since Series60 5.0_HN
+    */
+    void StopHttpServer();
+       
+    /**
+    * Generates a new uuid for the device if it already does not exist.
+    * @since Series60 3.2
+    * @param aFileName Device description.
+    */
+    void CheckUuidGenL( const TDesC16& aFileName );
+  
+    /**
+    * Getter for dispatcher.
+    * @since Series60 3.2
+    * @return Pointer used dispatcher.
+    */
+    CUpnpDispatcher* Dispatcher();
+           
+    /**
+    * Symbian 2nd phase constructor can leave
+    * @since Series60 5.0_HN
+    * @param aFilename File to create device from
+    */
+    void BaseConstructL( const TDesC8& aDeviceDescriptioUri,
+                         CUpnpDeviceDescriptionStore& aDescriptionStore, 
+                         MUpnpDeviceDescriptionProvider& aProvider );
+    
+    /**
+    * Recursively generates udns
+    * @since Series60 3.2
+    * @param aDevice device implementation
+    */
+    void GenerateUdnsL( CUpnpDeviceImplementationBase* aDevice );
+        
+    /**
+    * Assigns a dispatcher to all embedded devices
+    * @since Series60 3.2
+    */
+    void RegisterEmbeddedDevices();
+    
+    /**
+    * Removes all embedded devices from dispatcher
+    * @since Series60 3.2
+    */
+    void UnregisterEmbeddedDevicesL();
+
+    /**
+    * Saves description store.
+    * @since Series60 5.0_HN
+    */
+    void SaveDescriptionStoreL();
+
+protected:    // Data
+    
+    // dipatcher
+    // owned
+    CUpnpDispatcher* iDispatcher;
+
+    // path
+    // owned
+    HBufC8* iPath;
+        
+    // owned
+    CUpnpHttpServerTransactionHandler* iServerTransactionHandler; 
+
+    // description store
+    // not owned
+    CUpnpDeviceDescriptionStore* iDescriptionStore;   
+
+    // not owned
+    MUpnpDeviceDescriptionProvider* iDescriptionProvider;
+    
+    };
+
+#endif  // C_CUPNPDEVICEIMPLEMENTATIONBASE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/inc/upnpserviceimplementation.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,263 @@
+/** @file
+* Copyright (c) 2005-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:  Declares the CUpnpServiceImplementation class
+*
+*/
+
+
+#ifndef C_CUPNPSERVICEIMPLEMENTATION_H
+#define C_CUPNPSERVICEIMPLEMENTATION_H
+
+// INCLUDES
+
+#include "upnpservice.h"
+#include "upnperrors.h"
+#include "upnpsubscriberlibraryobserver.h"
+#include "upnpnotifytimer.h"
+#include "upnphttpmessage.h"
+
+// FORWARD DECLARATIONS
+
+class CUpnpAction;
+class CUpnpStateVariable;
+class CUpnpService;
+class CUpnpHttpMessage;
+class CUpnpSoapMessage;
+class CUpnpGenaMessage;
+class CUpnpSubscriberLibrary;
+class CUpnpContentHandlersController;
+class CUpnpDeviceImplementationBase;
+class CUpnpEventController;
+class TUpnpSoapParser;
+class MUpnpHttpServerTransactionCreator;
+// CONSTANTS
+
+
+
+// CLASS DECLARATION
+
+/**
+*  Interface
+*  CUpnpServiceImplementation class is a virtual class where actual services
+*  (like Content Directory) are inherited. It contains all mandatory methods
+*  that a service must have and gives access to data that service requires.
+*
+*  @since Series60 2.6
+*/
+class CUpnpServiceImplementation :
+        public CUpnpService,
+        public MUpnpDispatcherCustomer
+
+    {
+    public: 
+
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C CUpnpServiceImplementation( CUpnpDevice& aDevice );
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C virtual ~CUpnpServiceImplementation();
+
+        /**
+        * Sends a HTTP message. Forwards outgoing HTTP message to dispatcher.
+        * @since Series60 2.6
+        * @param aMessage HTTP-message.
+        * @return ?description
+        */
+        IMPORT_C virtual void SendL( CUpnpHttpMessage* aMessage );
+
+        /**
+        * Get message dispatching path. For internal use only.
+        * @since Series60 2.6
+        * @return path
+        */
+        IMPORT_C const TDesC8& Path();
+               
+        /**
+        * For internal use. Sets the dispatcher pointer of this service.
+        * @since Series60 2.6
+        * @param aDispatcher the dispatcher to be set
+        */
+        IMPORT_C void SetDispatcher( CUpnpDispatcher* aDispatcher );
+
+
+        /**
+        * Sets state variable.
+        * @since Series60 2.6
+        * @param aName Name of the variable (in SCPD).
+        * @param aValue Requested value for state variable.
+        */
+        IMPORT_C void SetStateVariableL( const TDesC8& aName,
+                                         const TDesC8& aValue,
+                                         TBool aIsModerated = ETrue );
+
+        /**
+        * Returns requested state variable value.
+        * @since Series60 2.6
+        * @param aVariableName Name (16 bit) of the variable (in SCPD).
+        * @return TPtrC8 Value of the variable or empty if not set.
+        */
+        IMPORT_C const TPtrC8 StateVariableValue( const TDesC8& aVariableName );
+
+        /**
+        * Returns requested state variable.
+        * @since Series60 2.6
+        * @param aVariableName Name of the variable (in SCPD).
+        * @return CUpnpStateVariable*. Points to NULL if state variable not found.
+        */
+        IMPORT_C CUpnpStateVariable* StateVariable( const TDesC8& aVariableName );
+
+        /**
+        * Function used by CUpnpStateVariable.
+        * @since Series60 2.6
+        * @param aVariable This state variable is evented on next event message.
+        */
+        IMPORT_C void AddEventVariable( const CUpnpStateVariable& aVariable, TBool aIsModerated );
+
+        /**
+        * Converts incoming HTTP-message to appropriate class type and calls
+        * appropriate action handler.
+        * @since Series60 2.6
+        * @param aMessage
+        */
+        IMPORT_C void MessageReceivedLD( CUpnpHttpMessage* aMessage );
+
+        /**
+        * Sets the minimum time that has to be expired before
+        * the statevariable can be evented again
+        * @param aVariable Reference to the wanted variable
+        * @param aMaxRate  The minimum time between events
+        */
+        IMPORT_C void SetVariableMaxEventRate
+                                (const TDesC8& aVariable, TInt aMaxRate);
+
+        // From MNotifyTimeObserver
+        /**
+        * From MNotifyTimer Function which sends events.
+        * Eventing is controlled by iEventTimer.
+        * @since Series60 2.6
+        * @param aTimer Timer.
+        */
+        IMPORT_C void TimerEventL( CUpnpNotifyTimer* aTimer );
+
+        /**
+        * Pure virtual function to be implemented in actual services.
+        * Purpose of the function is to find correct action and execute it.
+        * Ownership of CUpnpAction is passed by to the function.
+        * @since Series60 2.6
+        * @param aAction action object destruction of which should be guearanteed
+        *                by implementation (also in case of leave)
+        */
+        virtual void ActionReceivedLD( CUpnpAction* aAction ) = 0;
+     
+        /**
+        * Parses a CUpnpSoapMessage to a CUpnpHttpMessage and sends it then.
+        * @since Series60 2.6
+        * @param aMessage SOAP-message.
+        * @param aError UPnP error code.
+        * If code != EHttpOk, a error message is generated.
+        */
+        IMPORT_C void SendL( CUpnpSoapMessage* aMessage, TUpnpErrorCode aError );
+
+        /**
+        * Function to inform services about Eventing. Every derived service
+        * can overwrite this function, thus being informed when
+        * statevariable is evented.
+        * @since Series60 2.6
+        * @param aVariable Evented statevariable.
+        */
+        IMPORT_C virtual void StateVariableEvented(const TDesC8& aVariableName);
+
+        /**
+        * Shows number of subscribers
+        * @since Series60 2.6
+        */
+        IMPORT_C TInt SubcribersAmount();
+
+        IMPORT_C RPointerArray<CUpnpStateVariable>& EventedStateVariables();
+        CUpnpDeviceImplementationBase& DeviceImpl();
+
+
+    protected:  // New functions
+
+        /**
+        * Parses a CUpnpAction to a CUpnpHttpMessage and sends it then.
+        * @since Series60 2.6
+        * @param aAction Executed action.
+        * @param aError UPnP error code. If code != EHttpOk,
+        * a error message is generated.
+        */
+        IMPORT_C void SendL( CUpnpAction* aAction, TUpnpErrorCode aError );
+
+        /**
+         * Constructor. Initializes systems used in eventing.
+         */
+        IMPORT_C void BaseConstructL( const TDesC& aFileName, const TDesC8&  aServiceType );
+
+
+        
+    private: // New functions
+
+        /**
+        * Handles subscription, resubscription and subscription canceling.
+        * Modifies subscriber library.
+        * @since Series60 2.6
+        * @param aMessage
+        */
+        void HandleActionL( CUpnpGenaMessage* aMessage );
+
+        /**
+        * Parses message to a CUpnpAction and then calls ActionReceivedCDL()
+        * @since Series60 2.6
+        * @param aMessage
+        */
+        void HandleActionL( CUpnpSoapMessage* aMessage );
+
+        /**
+        * Maps generic error to upnp
+        * @since Series60 3.2
+        * @param aError generic error
+        * @return upnp error.
+        */
+        TUpnpErrorCode MapGenericErrorToUpnp( TInt aError );
+        
+        
+    protected: // Data
+
+        // iService, owned
+        CUpnpService*                           iService;
+
+        // State variable list, owned
+        RPointerArray<CUpnpStateVariable>       iEventedVariables;
+
+        //for parsing soap/gena
+        TUpnpSoapParser*                        iSoapParser;
+
+        // sax controller
+        CUpnpContentHandlersController*         iSaxController;
+
+        // dispatcher
+        CUpnpDispatcher*                        iDispatcher;
+
+        // event controller
+        CUpnpEventController*                   iEventController;
+    };
+
+
+#endif // C_CUPNPSERVICEIMPLEMENTATION_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/inc/upnpsubscriberlibraryobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,53 @@
+/** @file
+* Copyright (c) 2005-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:  Declaration of MUpnpSubscriberLibraryObserver
+*
+*/
+
+
+#ifndef C_CUPNPSUBSCRIBERLIBRARYOBSERVER_H
+#define C_CUPNPSUBSCRIBERLIBRARYOBSERVER_H
+
+class CUpnpStateVariable;
+class CUpnpSubscriberLibraryElement;
+// CLASS DECLARATION
+/**
+*  An interface to Subscriber Library.
+*  
+*  @since Series60 2.6
+*/
+class MUpnpSubscriberLibraryObserver
+{
+public: // New functions 
+
+    /**
+    * A virtual function to be implemented in derived classes.
+    * It is called after timeout is passed (event is sent).
+    * @since Series60 2.6
+    * @return List of eventable variables.
+    */
+    virtual RPointerArray<CUpnpStateVariable>& EventedStateVariables() = 0;
+    /**
+    * A virtual function to be implemented in derived classes.
+    * It is called after removing subscriber
+    * @param aSubscriberElement pointer to romoved subscriber
+    * @param aPos position taken by subscriber in SubscriberLibrary
+    */    
+    virtual void SubscriberRemoved( CUpnpSubscriberLibraryElement* aSubscriber, TInt aPos  ) = 0;
+};
+
+
+#endif  // C_CUPNPSUBSCRIBERLIBRARYOBSERVER_H
+
+//End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_device_api/upnp_device_api.metaxml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="03d7bb6eaffebb13c9ab7b447618985f" dataversion="1.0">
+  <name>UPnP Device API</name>
+  <description>UPnP Device API is used by developers of UPnP devices. It provides a way to receive actions from control points and to respond to those actions. Responses are further forwarded to the originating control point. Furthermore the API provides information on which eventable state variables are available in the device, and which actions and their parameters are available. It also provides a way to edit the DOM tree containing information on the services in the device.</description>
+  <type>c++</type>
+  <subsystem>upnpstack</subsystem>
+  <libs>
+    <lib name="upnpserviceframework.lib" />
+  </libs>
+  <release category="domain"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_http_transfer_api/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,31 @@
+/** @file
+* 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:  File that exports the files belonging to 
+:                UPnP Device API
+*
+*/
+
+
+#include "../../../group/upnpplatformvar.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/httptransferobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(httptransferobserver.h)
+../inc/httptransferbase.h MW_LAYER_PLATFORM_EXPORT_PATH(httptransferbase.h)
+../inc/httpworkerobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(httpworkerobserver.h)
+../inc/httpdownloader.h MW_LAYER_PLATFORM_EXPORT_PATH(httpdownloader.h)
+../inc/httpuploader.h MW_LAYER_PLATFORM_EXPORT_PATH(httpuploader.h)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_http_transfer_api/inc/httpdownloader.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,134 @@
+/** @file
+* 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:  Handles downloads
+*
+*/
+
+
+#ifndef C_CHTTPDOWNLOADER_H
+#define C_CHTTPDOWNLOADER_H
+
+
+// System include files
+#include "httptransferbase.h"
+#include "httptransferobserver.h"
+
+/**
+ * Downloader
+ *
+ * This class handles the queue of the downloaded files and array of 
+ * workers.
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ * @deprecated
+ */
+class CHttpDownloader : public CHttpTransferBase
+    {
+public:
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize Size of the upload buffer
+     * @param aParallelTransfers Number of parallel transfers
+     * @deprecated
+     */
+    IMPORT_C static CHttpDownloader* NewL( 
+                                     MHttpTransferObserver& aObserver,
+                                     TUint aIAPId,
+                                     TUint aBufferSize,
+                                     TUint aParallelTransfers );
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize Size of the upload buffer
+     * @param aParallelTransfers Number of parallel transfers
+     * @deprecated
+     */
+    IMPORT_C static CHttpDownloader* NewLC( 
+                                     MHttpTransferObserver& aObserver,
+                                     TUint aIAPId,
+                                     TUint aBufferSize,
+                                     TUint aParallelTransfers );
+
+    /**
+     * Destructor
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    virtual ~CHttpDownloader();
+
+    /**
+     * Method for downloading the file. Creates and enqueues the file
+     *
+     * @since S60 v3.2
+     * @param aUri Uri of the downloaded object
+     * @param aTargetPath Local path of the object
+     * @param aKey Identifier of the object
+     * @deprecated
+     */
+    IMPORT_C void DownloadFileL( const TDesC8& aUri,
+                                 const TDesC& aTargetPath, 
+                                 TAny* aKey );
+
+    /**
+     * Method for downloading the file. Uses the file handle to store the 
+     * data.
+     *
+     * @since S60 v3.2
+     * @param aUri Uri of the file
+     * @param aFileHandle Handle to the file
+     * @param aKey Key of the file
+     * @deprecated
+     */
+    IMPORT_C void DownloadFileL( const TDesC8& aUri,
+                                 const RFile& aFileHandle,
+                                 TAny* aKey );
+
+private:
+    /**
+     * Default constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize size of the upload buffer
+     * @param aParallelTransfers Number of parallel transfers
+     * @deprecated
+     */
+    CHttpDownloader( MHttpTransferObserver& aObserver, 
+                     TUint aIAPId,
+                     TUint aBufferSize,
+                     TUint aParallelTransfers );
+
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    void ConstructL();
+
+    };
+
+#endif // C_CHTTPDOWNLOADER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_http_transfer_api/inc/httptransferbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,330 @@
+/** @file
+* 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:  Base class for downloader / uploader classes
+*
+*/
+
+
+#ifndef C_CHTTPTRANSFERBASE_H
+#define C_CHTTPTRANSFERBASE_H
+
+
+// System include files
+#include <e32base.h>
+#include <f32file.h>
+
+// user include files
+#include "httpworkerobserver.h"
+
+// Forward declarations
+class CHttpTransferWorker;
+class MHttpTransferObserver;
+class CHttpFile;
+
+// Constants
+const TUint KDefaultParallelTransfers = 1;
+
+/**
+ * Base class of the downloader and uploader classes.
+ * Handles filequeue.
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ * @deprecated
+ */
+class CHttpTransferBase : public CActive,
+                          public MHttpWorkerObserver
+    {
+public:
+
+    /**
+     * This enum is used in SetProperty to recognize the action
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    enum THttpPropertyType 
+        {
+        ETargetURI,
+        ETargetPath
+        };
+
+public:
+    /**
+     * Virtual destructor
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */   
+    virtual ~CHttpTransferBase();
+
+    /**
+     * Deletes all the instances of CHttpFiles in iFileQueue. Also
+     * cancels all the on-going transfers.
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    IMPORT_C void CancelAll();
+
+    /**
+     * Deletes the corresponding instance of CHttpFile in iFileQueue
+     * or stops the corresponding transfer.
+     *
+     * @since S60 v3.2
+     * @param aKey Key corresponding the process
+     * @deprecated
+     */
+    IMPORT_C TInt CancelTransfer( TAny* aKey );
+
+    /**
+     * Switch the tracking of the duration on/off.
+     *
+     * @since S60 v3.2
+     * @param aKey Key corresponding the process
+     * @param aValue Value of the flag
+     * @deprecated
+     */
+    IMPORT_C TInt TrackProgress( TAny* aKey, TBool aValue );
+
+    /**
+     * Sets a header
+     *
+     * @since S60 v3.2
+     * @param aKey the file identifier
+     * @param aFieldName The field name, e.g. 'Accept'
+     * @param aFieldValue The field value. e.g. 'text/plain'
+     * @deprecated
+     */
+    IMPORT_C void SetHeaderL( TAny* aKey,
+                              const TDesC8& aFieldName, 
+                              const TDesC8& aFieldValue );
+
+    /**
+     * Starts the transfer of the file.
+     * Leaves if aKey is invalid
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the downloaded file
+     * @deprecated
+     */
+    IMPORT_C void StartTransferL( TAny* aKey );
+
+    /**
+     * Sets property
+     *
+     * @since S60 v3.2
+     * @param aKey Key of the file property concerns
+     * @param aProperty Id of the property to be changed
+     * @param aValue Value of the property
+     * @deprecated
+     */
+    IMPORT_C void SetPropertyL( TAny* aKey, 
+                                THttpPropertyType aProperty, 
+                                const TDesC& aValue );
+
+    /**
+     * Gets a property
+     *
+     * @since S60 v3.2
+     * @param aKey Key of the file property concerns
+     * @param aProperty Id of the property
+     * @return Pointer to the property value
+     * @deprecated
+     */
+    IMPORT_C const HBufC* GetPropertyL( TAny* aKey, 
+                                        THttpPropertyType aProperty );
+
+    /**
+     * Adds file into wait queue
+     *
+     * @since S60 v3.2
+     * @param aKey Key of the file
+     * @param aPath Path of the file
+     * @param aUri Uri of the file
+     * @deprecated
+     */
+    IMPORT_C void InsertFileIntoWaitQueueL( TAny* aKey, 
+                                            const TDesC& aTargetPath,
+                                            const TDesC8& aUri );
+
+    /**
+     * Adds file into wait queue
+     *
+     * @since S60 v3.2
+     * @param aKey Key of the file
+     * @param aFileHandle Handle to the file
+     * @param aUri Uri of the file
+     * @deprecated
+     */
+    IMPORT_C void InsertFileIntoWaitQueueL( TAny* aKey, 
+                                            const RFile& aFileHandle,
+                                            const TDesC8& aUri );
+
+    /**
+     * Moves the file to file queue from wait queue. Starts also the
+     * transfer.
+     *
+     * @since S60 v3.2
+     * @param aKey Key of the file
+     * @deprecated
+     */
+    IMPORT_C void MoveToTransferQueueL( TAny* aKey );
+
+    /**
+     * Activates new request
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    void ActivateNewTransferRequest();
+
+    /**
+     * Processes the next file in the queue
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    void ProcessNextFileL();
+
+// from base class CActive
+
+    /**
+     * Cancels outstanding request.
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    void DoCancel();
+
+    /**
+     * Handles request completion event.
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    void RunL();
+
+    /**
+     * Handles leave which occurs in RunL
+     *
+     * @since S60 v3.2
+     * @param aError Error code
+     * @return Error code or KErrNone if handle successful
+     * @deprecated
+     */
+    TInt RunError( TInt aError );
+
+// from base class MHttpWorkerObserver
+
+    /**
+     * Call back for workers to inform when they are ready
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    void WorkerCompleted();
+
+protected:
+
+    /**
+     * Creates new CHttpFile object and adds it to the iFileQueue
+     *
+     * @since S60 v3.2
+     * @param aUri Uri of the downloaded object
+     * @param aTargetPath Local path of the object
+     * @param aKey Identifier of the object
+     * @deprecated
+     */
+    void CreateAndQueueHttpFileL( const TDesC8& aUri, 
+                                  const TDesC& aTargetPath, 
+                                  TAny* aKey );
+
+    /**
+     * Creates new CHttpFile object and adds it to the iFileQueue
+     *
+     * @since S60 v3.2
+     * @param aUri Uri of the downloaded object
+     * @param aFileHandle Handle to the file on disk
+     * @param aKey Identifier of the object
+     * @deprecated
+     */
+    void CreateAndQueueHttpFileL( const TDesC8& aUri, 
+                                  const RFile& aFileHandle,
+                                  TAny* aKey );
+
+    /**
+     * Returns and removes the last item from iFileQueue and sets it to
+     * iProcessedFile.
+     *
+     * @since S60 v3.2
+     * @return Pointer to next file in the queue. Null if empty queue.
+     * @deprecated
+     */
+    CHttpFile* NextFile();
+
+    /**
+     * Default constructor
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    CHttpTransferBase();
+    
+protected: 
+
+    /**
+     * Pointerarray which contains the files
+     */
+    RPointerArray<CHttpFile> iFileQueue;
+
+    /**
+     * Queue for the waiting files
+     */
+    RPointerArray<CHttpFile> iWaitQueue;
+
+    /**
+     * Array of worker classes.
+     */
+    RPointerArray<CHttpTransferWorker> iWorkerArray;
+
+    /**
+     * Pointer to the transfer observer
+     * Not own.
+     */
+    MHttpTransferObserver* iObserver;
+
+    /**
+     * IAP id
+     */
+    TUint iIAPId;
+
+    /**
+     * buffer size, configurable
+     */
+    TUint iBufferSize;
+
+    /**
+     * Number of parallel transfers
+     */
+    TUint iParallelTransfers;
+
+    /**
+     * Worker which is being processed
+     */
+    CHttpTransferWorker* iActiveWorker;
+
+    };
+
+#endif // C_CHTTPTRANSFERBASE_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_http_transfer_api/inc/httptransferobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,70 @@
+/** @file
+* 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:  Observer for downloads / uploads
+*
+*/
+
+
+#ifndef C_MHTTPTRANSFEROBSERVER_H
+#define C_MHTTPTRANSFEROBSERVER_H
+
+
+/**
+ * Interface class for transfer events  
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ * @deprecated
+ */
+class MHttpTransferObserver
+    {
+public:
+
+    /**
+     * Callback method to inform transfer progress to the observer.
+     * Transfer progress is indicated every time httpframework informs that
+     * it has received a buffer of data or needs new data to be sent
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @param aBytes Bytes transferred so far
+     * @param aTotalBytes Total bytes of the file
+     * @deprecated
+     */
+    virtual void TransferProgress( TAny* aKey,
+                                   TInt aBytes, 
+                                   TInt aTotalBytes )=0;
+
+    /**
+     * Callback method to inform that file is ready to be transfered
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @deprecated
+     */
+    virtual void ReadyForTransferL( TAny* aKey )=0;
+
+    /**
+     * Callback method to inform the transfer completion to the observer
+     *
+     * @since S60 v3.2
+     * @param aKey Identifier of the file
+     * @param aStatus Status of the process
+     * @deprecated
+     */
+    virtual void TransferCompleted( TAny* aKey, TInt aStatus )=0;
+
+    };
+
+#endif // C_MHTTPTRANSFEROBSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_http_transfer_api/inc/httpuploader.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,118 @@
+/** @file
+* 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:  Handles uploads
+*
+*/
+
+
+#ifndef C_CHTTPUPLOADER_H
+#define C_CHTTPUPLOADER_H
+
+
+// System include files
+#include "httptransferbase.h"
+#include "httptransferobserver.h"
+
+/**
+ * This class handles the queue of the uploaded files and array of workers.
+ *  
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ * @deprecated
+ */
+class CHttpUploader : public CHttpTransferBase
+    {
+public:
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize size of the upload buffer
+     * @param aParallelTransfers Number of parallel transfers
+     * @deprecated
+     */
+    IMPORT_C static CHttpUploader* NewL(
+                                    MHttpTransferObserver& aObserver,
+                                    TUint aIAPId,
+                                    TUint aBufferSize,
+                                    TUint aParallelTransfers );
+
+    /**
+     * Constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize size of the upload buffer
+     * @param aParallelTransfers Number of parallel transfers
+     * @deprecated
+     */
+    IMPORT_C static CHttpUploader* NewLC(
+                                    MHttpTransferObserver& aObserver,
+                                    TUint aIAPId,
+                                    TUint aBufferSize,
+                                    TUint aParallelTransfers );
+
+    /**
+     * Destructor
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    virtual ~CHttpUploader();
+
+    /**
+     * Method for uploading the file. Creates and enqueues the file
+     *
+     * @since S60 v3.2
+     * @param aUri Uri of the downloaded object
+     * @param aTargetPath Local path of the object
+     * @param aKey Identifier of the object
+     * @deprecated
+     */
+    IMPORT_C void UploadFileL( const TDesC8& aUri, 
+                               const TDesC& aTargetPath, 
+                               TAny* aKey );
+
+private:
+
+    /**
+     * Default constructor
+     *
+     * @since S60 v3.2
+     * @param aObserver Transfer observer
+     * @param aIAPId IAP id
+     * @param aBufferSize size of the upload buffer
+     * @param aParallelTransfers Number of parallel transfers
+     * @deprecated
+     */
+    CHttpUploader( MHttpTransferObserver& aObserver,
+                   TUint aIAPId,
+                   TUint aBufferSize,
+                   TUint aParallelTransfers );
+
+    /**
+     * Second phase constructor
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    void ConstructL();
+    
+    };
+
+#endif // C_CHTTPDOWNLOADER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_http_transfer_api/inc/httpworkerobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,43 @@
+/** @file
+* 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:  Observer for worker objects
+*
+*/
+
+
+#ifndef C_MHTTPWORKEROBSERVER_H
+#define C_MHTTPWORKEROBSERVER_H
+
+
+/**
+ * Interface class for worker events
+ *
+ * @lib httptransfer.lib
+ * @since S60 v3.2
+ * @deprecated
+ */
+class MHttpWorkerObserver
+    {
+public:
+
+    /**
+     * Call back method used to inform that worker has completed
+     *
+     * @since S60 v3.2
+     * @deprecated
+     */
+    virtual void WorkerCompleted()=0;
+    };
+
+#endif // C_MHTTPWORKEROBSERVER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_http_transfer_api/upnp_http_transfer_api.metaxml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="" dataversion="1.0">
+  <name>UPnP Http Transfer API</name>
+  <description>Interface to Http Transfer component, providing generic utilities.</description>
+  <type>c++</type>
+  <subsystem>upnpstack</subsystem>
+  <libs>
+    <lib name="httptransfer.dll" />
+  </libs>
+  <release category="domain"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_httpserver_api/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,30 @@
+/** @file
+* 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:  File that exports the files belonging to 
+:                UPnP Utils API
+*
+*/
+
+
+#include "../../../group/upnpplatformvar.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/upnphttpserversession.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnphttpserversession.h)
+../inc/upnphttpserverruntime.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnphttpserverruntime.h)
+../inc/upnphttpservertransactioncreator.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnphttpservertransactioncreator.h)
+../inc/upnphttpservertransaction.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnphttpservertransaction.h)
+../inc/upnphttpserverobserver.h    MW_LAYER_PLATFORM_EXPORT_PATH(upnphttpserverobserver.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpserverobserver.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies  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 HTTP observer class
+*
+*/
+
+
+#ifndef C_MUPNPHTTPSERVEROBSERVER_H
+#define C_MUPNPHTTPSERVEROBSERVER_H
+
+// FORWARD DECLARATIONS
+class CUpnpHttpMessage;
+
+// CLASS DESCRIPTION
+/**
+ * MUpnpHttpServerObserver is an interface class notifying
+ * about the HTTP events, errors.
+ * Interface should be used only for achieving file transfer completion status.
+ * Other usages are internal to upnp stack.
+ *
+ * @lib dlnawebserver.lib
+ * @since S60 5.1
+ */
+class MUpnpHttpServerObserver
+    {
+public: 
+
+    /**
+     * This is virtual callback function which is used for forwarding
+     * messages to upper layer - to observer.
+     * 
+     * @since S60 5.1
+     * @param aMessage the HTTP message
+     */
+    virtual void HttpEventLD( CUpnpHttpMessage* aMessage ) = 0;
+    };
+
+#endif // C_MUPNPHTTPSERVEROBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpserverruntime.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,84 @@
+/*
+* 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:  CUpnpHttpServerRuntime is a single runtime.
+*
+*/
+
+#ifndef UPNPHTTPSERVERRUNTIME_H
+#define UPNPHTTPSERVERRUNTIME_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <es_sock.h>
+#include <in_sock.h>
+
+// FORWARD DECLARATIONS
+class MUpnpHttpServerTransactionCreator;
+class CUpnpHttpServer;
+class MUpnpHttpServerObserver;
+
+// CLASS DECLARATION
+/**
+ * CUpnpHttpServerRuntime single runtime contains a set of n HTTP transactions.
+ * It provides method for setting transaction creator.
+ * 
+ * @lib dlnawebserver.lib
+ * @since S60 5.1
+ */
+NONSHARABLE_CLASS( CUpnpHttpServerRuntime ) : public CBase
+    {
+public:
+
+    /**
+     * Sets transaction creator to http server.
+     * 
+     * @since S60 5.1
+     * @param aCreator reference to transaction creator
+     */
+    IMPORT_C void SetCreator( MUpnpHttpServerTransactionCreator& aCreator );
+
+    
+    // For internal usage only    
+    static CUpnpHttpServerRuntime* NewL( TUint aUnusedIapId, 
+                                         MUpnpHttpServerObserver& aObserver );
+
+    static CUpnpHttpServerRuntime* NewLC( TUint aUnusedIapId, 
+                                          MUpnpHttpServerObserver& aObserver );
+    ~CUpnpHttpServerRuntime();    
+    CUpnpHttpServer& HttpServer();
+    void DeleteServer();    
+    void StartServerL( const TInt aPort );    
+private:
+
+    CUpnpHttpServerRuntime( TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver );
+    void ConstructL();    
+    void GetIapAndStartServerL();
+    void OpenSocketServerL();        
+    void CloseSocketServer();
+    
+private:    // data
+    // Socket server.
+    RSocketServ iSocketServ;        
+    // Http server, owned
+    CUpnpHttpServer* iHttpServer;    
+    // Http server observer.
+    MUpnpHttpServerObserver& iObserver;      
+    // Pointer to transaction creator, not owned    
+    MUpnpHttpServerTransactionCreator* iTransactionCreator;          
+    // Determine if socket server is opened.
+    TBool iIsSocketOpened;
+    };
+
+#endif // UPNPHTTPSERVERRUNTIME_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpserversession.h	Tue Feb 02 01:12:20 2010 +0200
@@ -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:  CUpnpHttpServerSession is class that is used to handle single 
+*                 connections to HttpServer
+*
+*/
+
+#ifndef UPNPHTTPSERVERSESSION_H
+#define UPNPHTTPSERVERSESSION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <es_sock.h>
+#include <in_sock.h>
+
+// FORWARD DECLARATIONS
+class CUpnpHttpServerRuntime;
+class MUpnpHttpServerObserver;
+class CUpnpHttpMessage;
+
+const TInt KUpnpHttpServerRandomPort = 0;
+
+// CLASS DECLARATION
+/**
+ * CUpnpHttpServerSession is used for starting and stopping http server
+ * instance on random or predefined port.
+ * It contains only one default runtime which handles all incoming request URLs. 
+ * @lib dlnawebserver.lib
+ * @since S60 5.1
+ */
+NONSHARABLE_CLASS( CUpnpHttpServerSession ) : public CBase
+    {
+public:
+
+    /**
+     * Two-phased constructor.
+     * @param aUnusedIapId internet access point id (unused in current implementation)
+     * @param aObserver observer to be notified about httpEvents
+     */
+    IMPORT_C static CUpnpHttpServerSession* NewL( TUint aUnusedIapId,
+                                                  MUpnpHttpServerObserver& aObserver );
+                                                  
+    /**
+     * Destructor.
+     */
+    ~CUpnpHttpServerSession();
+
+    /**
+     * Starts http server owned by this session.
+     * 
+     * @since S60 5.1
+     * @param aPort port on which server starts, default value: KRandomPort
+     */
+    IMPORT_C void StartL( const TInt aPort = KUpnpHttpServerRandomPort );
+
+    /**
+     * Stops http server owned by this session.
+     * 
+     * @since S60 5.1
+     */
+    IMPORT_C void Stop();
+
+    /**
+     * Gets http server address (including port).
+     *
+     * @since S60 5.1
+     * @param aAddr used to return server address
+     */
+    IMPORT_C void GetAddress( TInetAddr& aAddr );
+
+    /**
+     * Gets default runtime.
+     * 
+     * @since S60 5.1
+     * @return reference to http server runtime
+     */
+    IMPORT_C CUpnpHttpServerRuntime& DefaultRuntime();
+    
+    //For internal usage only.
+    static CUpnpHttpServerSession* NewLC( TUint aUnusedIapId,
+                                          MUpnpHttpServerObserver& aObserver );
+    IMPORT_C TSockAddr* HWAddressL();    
+    IMPORT_C TInt SendMessageL( CUpnpHttpMessage* aMessage );
+           
+private:
+
+    /**
+     * Constructor for performing 1st stage construction.
+     */
+    CUpnpHttpServerSession();
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL( TUint aUnusedIapId, MUpnpHttpServerObserver& aObserver );
+
+private:    // data
+
+    // Pointer to server runtime, owned
+    CUpnpHttpServerRuntime* iServerRuntime;
+    };
+
+#endif // UPNPHTTPSERVERSESSION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpservertransaction.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,150 @@
+/*
+* 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:  CUpnpHttpServerTransaction declaration.
+*
+*/
+
+#ifndef UPNPHTTPSERVERTRANSACTION_H_
+#define UPNPHTTPSERVERTRANSACTION_H_
+
+// INCLUDES
+#include <f32file.h> 
+#include <e32base.h>
+#include <in_sock.h>
+
+
+// FORWARD DECLARATIONS
+
+class CUpnpHttpSession;
+class CUpnpHttpMessage;
+class CUpnpDlnaFilter;
+
+// CLASS DECLARATION
+
+/**
+ * Base abstract class for HTTP server transactions.
+ * Client has to derive from this class to implement required 
+ * behavior.
+ * 
+ * @lib dlnawebserver.lib
+ * @since S60 5.1
+ */
+class CUpnpHttpServerTransaction : public CBase
+    {
+public:
+
+    /** Http Event type enumerator */
+    enum TUpnpHttpServerEvent
+        {
+        EOnRequestStart = 0, 
+        EOnResponseStart, 
+        EOnComplete
+        };
+    
+    /**
+     * Destructor.
+     */
+    IMPORT_C ~CUpnpHttpServerTransaction();
+
+    /**
+     * Handler for transaction event.
+     *    
+     * @since S60 5.1
+     * @param aEvent server event
+     */
+    virtual void OnCallbackL( TUpnpHttpServerEvent aEvent ) = 0;
+
+ 
+    /**
+     * Returns response header buffer.
+     * 
+     * @since S60 5.1
+     * @return descriptor with data
+     */
+    IMPORT_C const TDesC8& QueryResponseHeader();
+
+    /**
+     * Returns request header value.
+     * When header not found, returns KNullDesC8.
+     * 
+     * @since S60 5.1
+     * @param aHeaderName header name
+     * @return descriptor with data
+     */
+    IMPORT_C TDesC8& QueryRequestHeader( const TDesC8& aHeaderName );
+
+    /**
+     * Adds pair : name - value to response header
+     * To add HTTP method and HTTP code, pass it as aValue parameter
+     * and as aName pass KNullDesC8. 
+     * 
+     * @since S60 5.1
+     * @param aName header name
+     * @param aValue header value
+     */    
+    IMPORT_C void AddResponseHeaderL( const TDesC8& aName, const TDesC8& aValue );
+    
+    // For internal usage only
+    IMPORT_C void SetRequest( CUpnpHttpMessage* aRequest );
+    IMPORT_C TInt Error();   
+    RFile& DataSource();
+    RFile& DataSink();
+
+protected:
+
+    /**
+     * C++ constructor.
+     */
+    IMPORT_C CUpnpHttpServerTransaction();
+    
+    /**
+     * Sets data source.
+     * 
+     * @since S60 5.1
+     * @param aFile File handle, may not be on cleanupstack
+     */
+    IMPORT_C void SetDataSourceL( RFile& aFile );
+
+    /**
+     * Sets data sink.
+     * 
+     * @since S60 5.1
+     * @param aFile File handle, may not be on cleanupstack
+     */
+    IMPORT_C void SetDataSinkL( RFile& aFile );
+
+    /**
+     * Sets http code.
+     * 
+     * @since S60 5.1
+     * @param aCode http code
+     */
+    IMPORT_C void SetHttpCode( TInt aCode );
+        
+private:    // data
+    
+    // File handle.
+    RFile iFile;
+    
+    // Buffer for header data.
+    RBuf8 iHeaderBuffer;
+    
+    // Http code.
+    TInt iHttpCode;
+    
+    // Http message.
+    CUpnpHttpMessage* iRequest;    
+    };
+
+#endif /* UPNPHTTPSERVERTRANSACTION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_httpserver_api/inc/upnphttpservertransactioncreator.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* 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:  MUpnpHttpServerTransactionCreator declaration.
+*
+*/
+
+#ifndef UPNPHTTPSERVERTRANSACTIONCREATOR_H_
+#define UPNPHTTPSERVERTRANSACTIONCREATOR_H_
+
+// FORWARD DECLARATIONS
+
+class CUpnpHttpServerTransaction;
+class TDesC8;
+class TInetAddr;
+
+// CLASS DESCRIPTION
+
+/**
+ * MUpnpHttpServerTransactionCreator is an interface 
+ * for creation of CUpnpHttpServerTransaction based class instance.
+ * 
+ * This method is invoked whenever http request related to file transfer
+ * arrives to http server. 
+ *
+ * @lib dlnawebserver.lib
+ * @since S60 5.1
+ */
+class MUpnpHttpServerTransactionCreator
+    {
+public:
+    /**
+     * Create a new transaction object.
+     * The object ownership is transferred to an invoker.
+     * 
+     * @since S60 5.1
+     * @param aMethod Http message method ( GET, HEAD or POST )
+     * @param aUri Http message request uri
+     * @param aSernder IP address of the Http message sender
+     * @param aTrans Returns newly created transaction object 
+     */
+    virtual void NewTransactionL( const TDesC8& aMethod,
+                                  const TDesC8& aUri,
+                                  const TInetAddr& aSender,
+                                  CUpnpHttpServerTransaction*& aTrans ) = 0;
+    };
+
+#endif /* UPNPHTTPSERVERTRANSACTIONCREATOR_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_httpserver_api/upnp_httpserver_api.metaxml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="07c7c977501222d346b4c2016ec67ef8" dataversion="1.0">
+  <name>UPnP Http Server API</name>
+  <description>Interface to Http Server component, providing generic utilities.</description>
+  <type>c++</type>
+  <subsystem>upnpstack</subsystem>
+  <libs>
+    <lib name="dlnawebserver.lib" />
+  </libs>
+  <release category="domain"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/group/bld.inf	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,34 @@
+/** @file
+* 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:  File that exports the files belonging to 
+:                UPnP Utils API
+*
+*/
+
+
+#include "../../../group/upnpplatformvar.hrh"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/upnpfileutils.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnpfileutils.h)
+../inc/upnphttpheader.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnphttpheader.h)
+../inc/upnpstring.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnpstring.h)
+../inc/upnphttpmessagefactory.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnphttpmessagefactory.h)
+../inc/upnphttpmessage.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnphttpmessage.h)
+../inc/upnpdominterface.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnpdominterface.h)
+../inc/upnpsessionbase.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnpsessionbase.h)
+../inc/upnpsymbianserverbase.h     MW_LAYER_PLATFORM_EXPORT_PATH(upnpsymbianserverbase.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/inc/upnpdominterface.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,413 @@
+/** @file
+* 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:  Declares UpnpDomInterface functions
+*
+*/
+
+
+#ifndef C_UPNPDOMINTERFACE_H
+#define C_UPNPDOMINTERFACE_H
+
+// INCLUDES
+
+#include <e32def.h>
+#include <e32math.h>
+#include <f32file.h>
+#include <s32file.h>
+#include <utf.h>
+#include <xmlengdom.h>
+
+namespace UpnpDomInterface
+    {
+    
+	//CONSTANTS
+    _LIT8(KContainer, "container");
+    _LIT8(KSearchable, "searchable");
+    _LIT8(KTrueVal, "1");
+    
+	/*
+	* GetAttrValueL
+	* Gets value of the indicated attribut for the given tag.
+	* @Param aElement reference to the Element which attribute's value 
+	*	should be returned.
+	* @Param aAttribute name of the attribute which value should be returned.
+	* @Return attribute's value or empty descriptor if Element has no such attribute.
+	*/
+	IMPORT_C TPtrC8 GetAttrValueL( const TXmlEngElement& aElement,
+                    	      	   const TDesC8& aAttribute );	
+    
+    /*
+	* GetElementValueL
+	* Gets value of the indicated element.
+	* @Param aElement reference to the Element which value should be returned.
+	* @Return value or empty descriptor if Element has no content.
+	*/
+	IMPORT_C TPtrC8 GetElementValueL( const TXmlEngElement& aElement );	
+    
+    /*
+	* AllocElementValueL
+	* Gets value of the indicated element and allocs it on heap.
+	* @Param aElement reference to the Element which value should be returned.
+	* @Return pointer to allocated descriptor eith content or NULL if Element has no content.
+	*/
+	IMPORT_C HBufC* AllocElementValueL( const TXmlEngElement& aElement );	
+    
+                    	      	    
+	/*
+	* CheckTagL
+	* Checks if given XML element has given tag.	
+	* @Param aElement reference to the Element that is being checked
+	* @Param aTag LocalName of the Element which is being checked
+    * @Return ETrue if element's name is equal to the passed one 
+	*/
+	IMPORT_C TBool CheckTagL( const TXmlEngElement& aElement,
+                    	      const TDesC8& aTag );
+	
+	/*
+	* CheckTagL
+	* Checks if given XML element has given tag and contains given value.
+	* @Param aElement reference to the Element that is being checked
+	* @Param aTag LocalName of the Element which is being checked
+    * @Param aTagValue The value that is checked againts 
+    * the contents of the aTag element
+    * @Return ETrue if element meets searching criteria
+	*/
+	IMPORT_C TBool CheckTagL( const TXmlEngElement& aElement,
+                       		  const TDesC8& aTag,
+                       		  const TDesC8& aTagValue );
+    
+    /*
+    * CheckSubTagL
+    * Checks if the given elements has an element whose 
+    * local name is specified by the Tag
+    * @Param aElement reference to the Element that is being checked
+    * @Param aTag LocalName that is being searched for 
+    * @Return ETrue if subtag meets search criteria
+    */
+    IMPORT_C TBool CheckSubTagL( const TXmlEngElement& aElement,
+                                 const TDesC8& aTag );
+                                                    		 
+    /*
+    * CheckSubTagL
+    * Checks the value of the specified SubTag (Element) against 
+    * the given value returns ETrue if match found else EFalse 
+    * @Param aElement reference to the Element that is being checked
+    * @Param aTag LocalName of the Element which is being checked
+    * @Param aTagValue The value that is checked againts 
+    * the contents of the Tag element
+    * @Return ETrue if subtag meets search criteria
+    */
+    IMPORT_C TBool CheckSubTagL( const TXmlEngElement& aElement,
+                                 const TDesC8& aTag,
+                                 const TDesC8& aTagValue );
+    
+    /*
+    * CheckSubTagPrefixL
+    * Checks the value of the specified SubTag (Element) against 
+    * the given value returns ETrue if match found else EFalse 
+    * @Param aElement reference to the Element that is being checked
+    * @Param aNameSpacePrefix Specifies the wanted prefix
+    * @Param aTag LocalName of the Element which is being checked
+    * @Param aTagValue The value that is checked againts 
+    * the contents of the Tag element
+    * @Return ETrue if subtag meets search criteria
+    */
+    IMPORT_C TBool CheckSubTagPrefixL( const TXmlEngElement& aElement,
+                                       const TDesC8& aNameSpacePrefix,
+                                       const TDesC8& aTag,
+                                       const TDesC8& aTagValue );
+    
+    /*
+    * CheckAttributeValueL
+    * Checks the attribute value of the given element against the given value. 
+    * @Param aElement reference to the Element being checked
+    * @Param aAttribute The Name of the attribute which is being checked
+    * @Param aValue The value that is checked against the value of the aAttribute
+    * @Return ETrue if attribute meets given criteria
+    */
+    IMPORT_C TBool CheckAttributeValueL( const TXmlEngElement& aElement,
+                                         const TDesC8& aAttribute,
+                                         const TDesC8& aValue);
+                                         
+    /*
+    * DeleteElement
+    * Deletes the specified element from the DomTree
+    * @param aElement reference to the Element to be deleted
+    * @return the parent element
+    */
+    IMPORT_C TXmlEngElement DeleteElement(TXmlEngElement& aElement);      
+                                   
+    /*
+    * GetElementL
+    * Searches the DomTree for the element specified by the given specifiers.
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aWanted Specifies the location of the reference 
+    * which will be set to point to the wanted Element
+    * @param aMainTag LocalName of the Element that is being searched for 
+    * @param aDepth specifies how deep into the tree the search will proceed 
+    * (if set to -1 the whole tree will be searched)
+    * @param aCurrentDepth How deep into the tree the search has proceeded 
+    * (should be set to 0 when the search is started)
+    * @Return ETrue if element is found
+    */
+    IMPORT_C TBool GetElementL( const TXmlEngElement& aElement, 
+                                TXmlEngElement& aWanted, 
+                                const TDesC8& aMainTag,
+                                TInt aDepth=-1, 
+                                TInt aCurrentDepth=0);
+    
+  	/*
+    * GetElementL
+    * Searches the DomTree for the element specified by the given specifiers.
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aWanted Specifies the location of the reference 
+    * which will be set to point to the wanted Element
+    * @param aMainTag LocalName of the Element that is being searched for 
+    * @param aSubTag LocalName of an Element within 
+    * the MainElement that is being searched for
+    * @param aDepth specifies how deep into the tree the search will proceed 
+    * (if set to -1 the whole tree will be searched)
+    * @param aCurrentDepth How deep into the tree the search has proceeded 
+    * (should be set to 0 when the search is started)
+    * @Return ETrue if element is found
+    */
+    IMPORT_C TBool GetElementL( const TXmlEngElement& aElement, 
+    						    TXmlEngElement& aWanted,
+                                const TDesC8& aMainTag,
+                                const TDesC8& aSubTag,
+                                TInt aDepth=-1,
+                                TInt aCurrentDepth=0);
+    
+    /**
+    * GetElementL
+    * Searches the DomTree for the element specified by the given specifiers.
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aWanted Specifies the location of the reference 
+    * which will be set to point to the wanted Element
+    * @param aMainTag LocalName of the Element that is being searched for 
+    * @param aSubTag LocalName of an Element within 
+    * the MainElement that is being searched for
+    * @param aSubTagValue Contents of the Element specified by the aSubTag
+    * @param aDepth specifies how deep into the tree the search will proceed 
+    * (if set to -1 the whole tree will be searched)
+    * @param aCurrentDepth How deep into the tree the search has proceeded 
+    * (should be set to 0 when the search is started)
+    * @Return ETrue if element is found 
+    */
+    IMPORT_C TBool GetElementL( const TXmlEngElement& aElement, 
+    						    TXmlEngElement& aWanted, 
+                                const TDesC8& aMainTag,
+                                const TDesC8& aSubTag,
+                                const TDesC8& aSubTagValue,
+                                TInt aDepth=-1,
+                                TInt aCurrentDepth=0);
+                                   
+    /*
+    * GetContentElementL
+    * Searches the DomTree for the element specified by the given specifiers.
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aWanted Specifies the location of the reference 
+    * which will be set to point to the wanted Element
+    * @param aSubTag LocalName of an Element within 
+    * the MainElement that is being searched for
+    * @param aSubTagValue Contents of the Element specified by the aSubTag
+    * @param aDepth specifies how deep into the tree the search will proceed 
+    * (if set to -1 the whole tree will be searched)
+    * @param aCurrentDepth How deep into the tree the search has proceeded 
+    * (should be set to 0 when the search is started)
+    * @Return ETrue if element is found
+    */
+    IMPORT_C TBool GetContentElementL( const TXmlEngElement& aElement, 
+    								   TXmlEngElement& aWanted,
+                                       const TDesC8& aSubTag,
+                                       const TDesC8& aSubTagValue,
+                                       TInt aDepth=-1,
+                                       TInt aCurrentDepth=0);
+    
+    /*
+    * GetDirectoryElementL
+    * Searches the DomTree for the element specified by the given parameters 
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aWanted Specifies the location of the reference 
+    * which will be set to point to the wanted Element
+    * @param aMainTag LocalName of the Element that is being searched for 
+    * @param aAttribute The name of the Attribute of the MainElement 
+    * that is searched for
+    * @param aAttributeValue The wanted value of the Attribute 
+    * that is searched for 
+    * @param aDepth specifies how deep into the tree the search will proceed 
+    * (if set to -1 the whole tree will be searched)
+    * @param aCurrentDepth How deep into the tree the search has proceeded 
+    * (should be set to 0 when the search is started)
+    * @Return ETrue if element is found
+    */
+    IMPORT_C TBool GetDirectoryElementL( const TXmlEngElement& aElement, 
+    								     TXmlEngElement& aWanted,
+                                         const TDesC8& aMainTag,
+                                         const TDesC8& aAttribute,
+                                         const TDesC8& aAttributeValue, 
+                                         TInt aDepth=-1, 
+                                         TInt aCurrentDepth=0);
+
+    /*
+    * GetDirectoryElementL
+    * Searches the DomTree for the element specified by the given parameters 
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aWanted Specifies the location of the reference 
+    * which will be set to point to the wanted Element
+    * @param aAttribute The name of the Attribute of the MainElement 
+    * that is searched for
+    * @param aAttributeValue The wanted value of the Attribute 
+    * that is searched for 
+    * @param aDepth specifies how deep into the tree the search will proceed 
+    * (if set to -1 the whole tree will be searched)
+    * @param aCurrentDepth How deep into the tree the search has proceeded 
+    * (should be set to 0 when the search is started)
+    * @Return ETrue if element is found
+    */
+    IMPORT_C TBool GetDirectoryElementL( const TXmlEngElement& aElement, 
+    								     TXmlEngElement& aWanted,
+                                         const TDesC8& aAttribute,
+                                         const TDesC8& aAttributeValue, 
+                                         TInt aDepth=-1, 
+                                         TInt aCurrentDepth=0);
+    
+    /*
+    * GetElementListL
+    * Creates a RArray of Elements that fit the given specifiers 
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aElementList list of elements matching searching criteria
+    * @param aMainTag LocalName of the Element that is being searched for 
+    * @param aSearchable Specifies whether or not 
+    * the searchability of container-elements is checked
+    * @Return ETrue if any element has been found.
+    */
+    IMPORT_C TBool GetElementListL( const TXmlEngElement& aElement,
+                                    RArray<TXmlEngElement>& aElementList,
+                                    const TDesC8& aMainTag,
+                                    TBool aSearchable=EFalse );
+    
+    
+    
+    /*
+    * GetElementList
+    * Creates a RArray of Elements that fit the given specifiers 
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aElementList list of elements matching searching criteria
+    * @param aMainTag LocalName of the Element that is being searched for 
+    * @param aSubTag LocalName of an Element within 
+    * the MainElement that is being searched for
+    * @param aSubTagValue Contents of the Element specified by the aSubTag
+    * @param aSearchable Specifies whether or not 
+    * the searchability of container-elements is checked 	
+ 	* @Return ETrue if any element has been found.
+    */
+    IMPORT_C TBool GetElementListL( const TXmlEngElement& aElement, 
+                                    RArray<TXmlEngElement>& aElementList,
+                                    const TDesC8& aMainTag, 
+                                    const TDesC8& aSubTag, 
+                                    const TDesC8& aSubValue,
+                                    TBool aSearchable=EFalse);
+
+    
+        
+    /*
+    * GetElementList
+    * Creates a RArray of Elements that fit the given specifiers 
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aElementList list of elements matching searching criteria
+    * @param aMainTag LocalName of the Element that is being searched for 
+    * @param aSubTag LocalName of an Element within 
+    * the MainElement that is being searched for
+    * @param aSubTagValue Contents of the Element specified by the aSubTag
+    * @Param aSearchable Specifies whether or not 
+    * the searchability of container-elements is checked
+    * @Param aNSPrefix the Prefix of the wanted element
+    * @Return ETrue if any element has been found. 
+    */
+    IMPORT_C TBool GetElementListL( const TXmlEngElement& aElement, 
+                                    RArray<TXmlEngElement>& aElementList,
+                                    const TDesC8& aMainTag,
+                                    const TDesC8& aSubTag,
+                                    const TDesC8& aSubValue,
+                                    const TDesC8& aNSPrefix,
+                                    TBool aSearchable=EFalse );
+    
+    /*
+    * GetDirectoryElementList
+    * Creates a RArray of Elements that fit the given specifiers 
+    * @param aElement reference to a "Root" element from which the search will start
+    * @param aElementList list of elements matching searching criteria
+    * @param aAttrName The name of the Attribute of the Element 
+    * that is searched for
+    * @param aAttributeValue The wanted value of the Attribute 
+    * that is searched for 
+    * @param aSearchable Specifies whether or not the searchability 
+    * of container-elements is checked 
+    * @Return ETrue if any element has been found. 
+    */
+    IMPORT_C TBool GetDirectoryElementListL( const TXmlEngElement& aElement, 
+                                             RArray<TXmlEngElement>& aElementList,
+                                             const TDesC8& aAttrName,
+                                             const TDesC8& aAttrValue,
+                                             TBool aSearchable=EFalse);
+    
+    /*
+    * GetContentElementList
+    * Creates a RArray of Elements that fit the given specifiers
+    * @Param aElement reference to a "Root" element from which the search will start
+    * @param aElementList list of elements matching searching criteria
+    * @Param aMainTag LocalName of the Element that is being searched for 
+    * @Param aSubTag LocalName of an Element within the MainElement 
+    * that is being searched for
+    * @Param aSubTagValue Contents of the Element specified by the aSubTag
+    * @Param aSearchable Specifies whether or not 
+    * the searchability of container-elements is checked 
+    * @Return ETrue if any element has been found.
+    */
+    IMPORT_C TBool GetContentElementListL( const TXmlEngElement& aElement, 
+                                           RArray<TXmlEngElement>& aElementList,
+                                           const TDesC8& aSubTag,
+                                           const TDesC8& aSubValue,
+                                           TBool aSearchable=EFalse );               
+                                          
+    /*
+    * SaveToFile
+    * Saves the contents of the aRoot element into the given file.
+    * All saving should be done with ROOT element.
+    * @param aFileName name of the file
+    * @param aRoot reference to the first element of the DomTree
+    * @return ETrue if writing succeeded 
+    */
+    IMPORT_C TBool SaveToFileL(const TDesC16& aFileName, const TXmlEngElement& aRoot);
+    
+    /*
+    * SaveToFile
+    * Saves the contents of the aRoot element into the given file.
+    * Writes given TDesC8 string to file
+    * @param aFileName name of the file
+    * @param aData string that is saved to the file
+    * @return ETrue if writing succeeded 
+    */
+    IMPORT_C TBool SaveToFileL(const TDesC16& aFileName, const TDesC8& aData);
+                                         
+    
+    
+}
+
+#endif      // C_UPNPDOMINTERFACE_H   
+            
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/inc/upnpfileutils.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,182 @@
+/** @file
+* 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:  Declares File functions
+ *
+*/
+
+
+#ifndef C_UPNPFILEUTILS_H
+#define C_UPNPFILEUTILS_H
+
+#include <e32base.h>
+#include <f32file.h>
+
+//CONSTANTS
+
+//media types
+_LIT8( KHtml, "text/html");
+_LIT8( KXml, "text/xml");
+_LIT8( KTxt, "text/plain");
+_LIT8( KJpg, "image/jpeg");
+_LIT8( KGif, "image/gif");
+_LIT8( KPng, "image/png");
+_LIT8( KMpeg, "video/mpeg");
+_LIT8( KAvi, "video/x-msvideo");
+_LIT8( KMp3, "audio/mpeg");
+
+// media types - file extensions
+_LIT16( KHtml16, ".HTML");
+_LIT16( KXml16, ".XML");
+_LIT16( KTxt16, ".TXT");
+_LIT16( KJpeg16, ".JPEG");
+_LIT16( KJpg16, ".JPG");
+_LIT16( KGif16, ".GIF");
+_LIT16( KPng16, ".PNG");
+_LIT16( KMpeg16, ".MPEG");
+_LIT16( KMpg16, ".MPG");
+_LIT16( KAvi16, ".AVI");
+_LIT16( KMp316, ".MP3");
+
+//for extracting the IP address
+const TInt KIPNumMax = 255;
+const TInt KIPNumMin = 1;
+
+// NAMESPACE DECLARATION
+namespace UpnpFileUtil
+    {
+    /**
+     ReadFileL
+     
+     Reads the specified file and returns a pointer to HBufC8 holding the 
+     just read information
+     @param	aFilename	= name of the file to be read
+     @return	HBufC8 holding the contents of the read file
+     **/
+    IMPORT_C HBufC8* ReadFileL(const TDesC16& aFilename);
+
+    /**
+     GetMimeTypeForFileL
+     
+     - In emulator, checks the filename, and returns mimetype-string depending on extension.
+     - In Target device, uses RApaLsSession (Application server) to find out file's mime type.
+     @param	aFilename	name of file	
+     @return	mimetype
+     **/
+    IMPORT_C HBufC8* GetMimeTypeForFileL(const TDesC16& aFilename);
+
+    /**
+     GetMimeTypeByExtension
+     @param	aFilename	name of file	
+     @return	mimetype
+     **/
+    HBufC8* GetMimeTypeByExtensionL( const TDesC16& aFilename );
+    /**
+     Util method.Extract path from URL defined as 
+     scheme://username:password@host:port/path?parameter=value#anchor
+     Additionaly path is without last file name
+     Example
+     in:		http://10.132.11.36:50001/Media/1
+     out(return, filename, scheme):	Media	1	http
+     
+     in:		http://10.132.11.36:50001/Super/Media/1
+     out(return, filename, scheme):	Super/Media	1	http
+     
+     in:		file:///C:/Super/Media/1
+     out(return, filename, scheme):	C:/Super/Media	1	file
+     
+     in:		/Media/1
+     out(return, filename, scheme):	Media	1	file
+     
+     
+     @param aURL full/partial url
+     @param aFilename out parameter, filename without any shlashes
+     @param aScheme out parameter, scheme part of URL
+     @return path with slash at the end and without at the begin
+     **/
+    IMPORT_C TPtrC8 ExtractUrlPath(
+        const TDesC8& aUrl, TPtrC8& aFilename, TPtrC8& aScheme, TInt& aParseError );
+
+    /**
+     @param aUrl
+     @return True/False
+     **/
+    TBool ExtractUrlPathHost(const TDesC8& aUrl, TInt& aParseError );
+
+    /**
+     @param ippart
+     @return TInt - KErrNotFound or a number in from a IP
+     **/
+    TInt ExtractNumFromIP(TPtrC8 ippart);
+    /**
+     @gets drive number from given aPtah
+     @param aPath, aFs
+     @return TInt - drive number
+     **/
+    TInt DriveNumberFromPath( const TDesC16& aPath, RFs& aFs );
+
+    /**
+     Util method.Extract path from URL defined as 
+     scheme://username:password@host:port/path?parameter=value#anchor
+     @param aURL full/partial url
+     @param aFilename out parameter, filename without any shlashes
+     @return path with slash at the end and without at the begin
+     **/
+    IMPORT_C TPtrC8 ExtractUrlPath(const TDesC8& aUrl, TPtrC8& aFilename, TInt& aParseError);
+
+    /**
+     Util method.Extract path from URL defined as 
+     scheme://username:password@host:port/path?parameter=value#anchor
+     @param aURL full/partial url
+     @return path with slash at the end and without at the begin
+     **/
+    IMPORT_C TPtrC8 ExtractUrlPath(const TDesC8& aUrl, TInt& aParseError);
+
+    /**
+     Util method.Convert / to \\ from url convention to folder
+     Example
+     in:		Media/foo
+     out:	Media\\foo
+     
+     
+     @param aURL path from URL
+     @return path in system format
+     **/
+    IMPORT_C HBufC8* SwitchToBackSlashL(const TDesC8& aUrl);
+    IMPORT_C HBufC* SwitchToBackSlashL(const TDesC& aUrl);
+
+    /**
+     Util method. Checks if the drive from a path is short of the space requested
+     @param aPath, aSize, aFs
+     @return True/False
+     **/
+    IMPORT_C TBool CheckDiskSpaceShortL( const TDesC16& aPath, TInt aSize, RFs& aFs );
+
+    /**
+     Util method. Checks if the drive from a path is short of the space requested
+     @param aDriveNumber, aSize
+     @return True/False
+     **/
+    IMPORT_C TBool CheckDiskSpaceShortL( TDriveNumber aDriveNumber, TInt aSize );
+    
+    /**
+    * Parses uri
+    * @since Series60 5.0 HN
+    * @param aUrl url to parse
+    * return error code
+    **/
+    IMPORT_C TInt ParseUri( const TDesC8& aUrl );    
+
+    }
+
+#endif // C_UPNPFILEUTILS_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/inc/upnphttpheader.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,99 @@
+/** @file
+* 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:  Declares HttpHeader class.
+*
+*/
+
+
+#ifndef C_CUPPNHTTPHEADER_H
+#define C_CUPPNHTTPHEADER_H
+
+// INCLUDES
+#include <e32base.h>
+
+
+// CLASS DECLARATION
+
+/**
+	\brief A HTTPMessage header, which consists of Name-Value-pair.
+
+	This is HTTPMessage header name-value pair. HTTPMessage contains a list of these header rows.
+	*/
+class CUpnpHttpHeader : public CBase
+	{
+
+public:
+	/**
+	Constructor function of HTTPHeader object.
+	@param aName This is the name part of HTTP Header. 
+	@param aValue This is the value part of HTTP Header. 
+	@return A new CUpnpHttpHeader instance.
+	**/
+	static CUpnpHttpHeader* NewL(const TDesC8& aName, const TDesC8& aValue);
+	
+	/**
+	Destructor function.
+	**/
+	virtual ~CUpnpHttpHeader();
+
+	/**
+	Returns value of HTTPHeader.
+	@return A value of HTTPHeader.
+	**/
+	IMPORT_C TDesC8& Value();
+
+	/**
+	Returns name of HTTPHeader.
+	@return A name of HTTPHeader.
+	**/
+	IMPORT_C TDesC8& Name();
+	
+	/**
+	Set name of HTTPHeader.
+	@param aName New name for HTTPHeader. 
+	@return None.
+	**/
+	IMPORT_C void SetNameL(const TDesC8& aName);
+
+	/**
+	Set value of HTTPHeader.
+	@param aValue New value for HTTPHeader.
+	@return None. 
+	**/
+	IMPORT_C void SetValueL(const TDesC8& aValue);
+	
+private:
+
+	/**
+	First phase constructor.
+	**/
+	CUpnpHttpHeader();
+
+	/**
+	Second phase constructor.
+	**/
+	void ConstructL(const TDesC8& aName, const TDesC8& aValue);
+
+	/**
+	Name of header.
+	**/
+	HBufC8* iName;
+
+	/**
+	Value of header.
+	**/
+	HBufC8* iValue;
+	};
+
+#endif // C_CUPPNHTTPHEADER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/inc/upnphttpmessage.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,804 @@
+/** @file
+* 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:  Declares HttpMessage class.
+*
+*/
+
+
+#ifndef C_CUPNPHTTPMESSAGE_H
+#define C_CUPNPHTTPMESSAGE_H
+
+// INCLUDES
+#include <e32base.h>
+#include <in_sock.h>
+
+#include "upnphttpheader.h"
+#include "upnperrors.h"
+#include "upnpnotifytimer.h"
+//#include "upnpmessageobserver.h"
+
+class CUpnpHttpHeaderList;
+class MUpnpMessageObserver;
+
+
+// FORWARD DECLARATIONS
+
+
+// CONSTANTS
+enum TTransferStatus
+    {
+    ETransferInProgress,
+	EStopped,
+	EError,
+	ECompleted
+    };
+
+static const TInt KMaxHeaderLength = 100;
+static const TInt KMaxSsdpMessageLength = 2048;
+static const TInt KStatusLineMin = 13;
+
+_LIT8(KHttpGet, "GET");
+_LIT8(KHttpPost, "POST");
+_LIT8(KHttpHead,"HEAD");
+_LIT8(KHttpOptions,"OPTIONS");
+_LIT8(KHttpPut, "PUT");
+_LIT8(KHttpDelete, "DELETE");
+_LIT8(KHttpTrace, "TRACE");
+_LIT8(KHttpConnect, "CONNECT");
+_LIT8(KHttp11, " HTTP/1.1");
+_LIT8(KHttp11Ok, "HTTP/1.1 200 OK");
+_LIT8(KHttp11Continue, "HTTP/1.1 100 Continue");
+_LIT8(KHttpVersionPattern, "HTTP/*.*");
+_LIT8(KHttp11WithoutSpace, "HTTP/1.1");
+_LIT8(KHttp10, "HTTP/1.0");
+_LIT8(KHigherLevelSintaticBreaks," \t;,");
+_LIT8(KHttp8, "HTTP");
+_LIT8(KHttpOkCode8, "200");
+_LIT8(KResponseLinePattern,"*HTTP/?.? ??? *");
+_LIT8(K1xxResponsePattern, "HTTP/1.1 1?? *");
+
+//for SOAP
+_LIT8(KEnvelope, "s:Envelope");
+_LIT8(KSoapAction, "SOAPACTION");
+
+// A Category value for a property of Publish and Subscribe
+const TUid KUPnPUtilsCat={0x10204161};
+enum TUPnPUtilsKeys {EUPnPUtilsCounter};
+
+static const TInt KMaximumHTTPHeaderRowLength=200;
+static const TInt KMaxMessageLength=8192;
+static const TInt KLineLengthLimit=998;
+
+enum THTTPMsgType 
+	{
+		EDeviceDescription = 1,
+		EServiceDescription,
+		EIcon,
+		EAction,
+		ESubscription,
+		EUnSubscription,
+		EStateVariableQuery,
+		EStateVariableChanged,
+        EResubscription,
+        ETransferStart = 100,
+        ETransferError,
+        EImportComplete,
+        EExportComplete
+	};
+
+// CLASS DECLARATION
+
+/*! 
+  \brief Base message class for all messages. Consists of HTTPHeader -list
+  and body-buffer.
+  
+  Also contains Sessionid, DestinationPath and SenderPath. 
+  SessionId identifies the HTTPSession this message belongs to.
+  DestinationPath and SenderPath are used to identify actions in GENA messages.
+  
+  */
+class CUpnpHttpMessage : public CBase, public MUpnpNotifyTimerObserver
+	{
+
+public:
+
+	/**
+	Constructor function.
+	  
+	@return A new CUpnpHttpMessage instance.
+	**/
+	IMPORT_C static CUpnpHttpMessage* NewL();
+
+	/**
+	Constructor function.
+	  
+	@param aAddr Destination ip address.
+	@return A new CUpnpHttpMessage instance.
+	**/
+	IMPORT_C static CUpnpHttpMessage* NewL(const TInetAddr& aAddr);
+
+	/**
+	Constructor function.
+	  
+	@param aAddr Destination ip address.
+	@param aSessionId Session id of the message.
+	@return A new CUpnpHttpMessage instance.
+	**/
+	IMPORT_C static CUpnpHttpMessage* NewL(TInetAddr aAddr, TInt aSessionId);
+
+	/**
+	Constructor function.
+	  
+	@param aMessageBuffer Buffer which contains the message.
+	@param aSender Sender's IP address.
+	@return A new CUpnpHttpMessage instance.
+	**/	
+	IMPORT_C static CUpnpHttpMessage* NewL( TDesC8& aMessageBuffer, 
+	                                    TInetAddr aSender);
+
+	/**
+	Constructor function.
+	  
+	@param aMessageBuffer Buffer which contains the message.
+	@param aSender Sender's IP address.
+	@param aSessionId Session id of the message.
+	@return A new CUpnpHttpMessage instance.
+	**/
+	IMPORT_C static CUpnpHttpMessage* NewL( TDesC8& aMessageBuffer, 
+	                                    const TInetAddr & aSender, 
+	                                    TInt aSessionId);
+
+	/**
+	Destructor function.
+	**/	
+	IMPORT_C virtual ~CUpnpHttpMessage();
+
+protected:
+
+	/**
+	First phase construct.
+	**/	
+	IMPORT_C CUpnpHttpMessage();
+
+	/**
+	Second phase construct.
+	**/		
+	IMPORT_C void ConstructL();
+
+	/**
+	Second phase construct.
+	**/		
+	IMPORT_C void ConstructL(TInetAddr& aSender, TInt aSessionId);
+
+	/**
+	Parses a HttpMessage object from aBuffer.
+	@param aBuffer Buffer to parse.
+	@return None.
+	**/	
+	IMPORT_C virtual void ParseL(TDesC8& aBuffer);
+
+	/**
+	Parses one row of headers.
+	@param aBuffer Buffer that contains one header row ("Connection: close" 
+	for example).
+	@param aFirstLine ETrue if parsing first header row of Httpmessage, 
+	EFalse otherwise. This is needed because first line has to be parsed 
+	differently.
+	@return None.
+	**/	
+	IMPORT_C void ParseHeaderRowL(const TDesC8& aBuffer, TBool aFirstLine);
+
+	/**
+	Append ContentLength when headers are dumped to string (using by public method HeadersToStringL)
+	@param aHeaders without "Content-Length"
+	**/	
+	IMPORT_C virtual void AppendContentLengthToHeadersL(HBufC8*& aHeaders);
+
+	/**
+	Fold long header fields where is a "MUST limit 998"
+	(including the header's name and value but excluding the last carriage-return/line-feed sequence, CRLF). 
+	BODY portion of a header field can be split into a multiple	line representation.
+	RFC2822 2.2.3  folding SHOULD be limited to placing the CRLF at higher-level syntactic breaks
+	DLNA v1.5 7.4.14.3 HTTP headers that span multiple lines must prefix the additional lines with at least one space (SP) or horizontal tab (HT) as described in section 
+	@param aUpperCaseHeader header which may be folded
+	**/	
+	IMPORT_C void FoldHeaderL(HBufC8*& aHeader);
+
+	/**
+	Unfolding header
+	RFC2822 2.2.3 Unfolding from ONE header is accomplished by simply removing any CRLF that is immediately followed by WSP
+	@param aUpperCaseHeader header which will be unfolded
+	**/	
+	IMPORT_C void UnFoldHeader(HBufC8*& aHeader);
+
+protected: // from MUpnpNotifyTimerObserver
+
+    IMPORT_C void TimerEventL( CUpnpNotifyTimer* aTimer );
+
+public:
+
+	/**
+	Adds a Header row in this message.
+	@param aName Name of the header.
+	@param aValue Value of the header.
+	@return None.
+	**/
+	IMPORT_C void AddPairL(const TDesC8& aName, const TDesC8& aValue);
+	
+	IMPORT_C void RemovePairL(const TDesC8& aName);
+	
+	/**
+	Sets the body of message.
+	@param aBody Buffer that contains the body for the message.
+	@return None.
+	**/	
+	IMPORT_C void SetBodyL(const TDesC8& aBody);
+
+	/**
+	Returns the body of message.
+	@return Message body.	
+	**/
+	IMPORT_C TDesC8& Body();
+
+	/**
+	Returns message as HBufC8.
+	@return Buffer that contains message headers.
+	**/	
+	IMPORT_C virtual HBufC8* HeadersToStringL();
+
+	/**
+	Returns message as HBufC8.
+	@return Pointer to message string.
+	**/
+	IMPORT_C virtual HBufC8* ToStringL();
+	
+	/**
+	Sets the date of message.
+	@param time Time to set in message.
+	@return None.
+	**/
+	IMPORT_C void SetMessageDateL(const TTime & time);
+
+	/**
+	Returns the IP address of the sender of the message.
+	@return IP address of the sender.
+	**/	
+	IMPORT_C TInetAddr& Sender();
+
+	/**
+	Returns the IP address of the receiver of the message.
+	@return IP address of the receiver.
+	**/	
+	IMPORT_C TInetAddr& Receiver();
+	
+	/**
+	Sets the DestinationPath of the message.
+	@param aDestinationPath Destination Path to be set.
+	@return None.
+	**/			
+	IMPORT_C void SetDestinationPathL(const TDesC8& aDestinationPath);
+	
+	/**
+	Returns the DestinationPath of the message.
+	@return Pointer to destination string.
+	**/		
+	IMPORT_C TPtrC8 DestinationPath();
+
+	/**
+	Sets the SourcePath of the message.
+	@param aSourcePath Source Path to be set.
+	@return None.
+	**/
+	
+	IMPORT_C void SetSenderPathL(const TDesC8& aSourcePath);
+
+	/**
+	Returns the SenderPath of the message.
+	@return Pointer to sender string.
+	**/		
+	IMPORT_C TPtrC8 SenderPath();
+	
+	/**
+	Returns the SenderPath from Headers.
+	@return Sender path.
+	**/
+	IMPORT_C const TPtrC8 SenderPathFromHeader();
+	
+	/**
+	Sets the private member iPendingRequest.
+	@param aPointer Pointer to CUpnpAction.
+	@return None.
+	**/
+	IMPORT_C void SetPendingRequest(TAny* aPointer);
+
+	/**
+	Returns iPendingRequest pointer.
+	@return PendingRequest pointer.
+	**/			
+	IMPORT_C TAny* PendingRequest();	
+
+	/**
+	Sets the filename where to save incoming content. The default behaviour is that the requested file is downloaded
+	and if there is already file with name as the given one the requested content will be saved under the same name but
+	with serial number prefix.
+	@param aFilename Path and name of file where to save.
+	@param aOverwriteExisting Should the existing file with the same name be overwritten.
+			If flag is set to EFalse then the new file with name: aFilename_serialNumber will
+			be created.
+	@return None.
+	**/	
+	IMPORT_C void SetInFilenameL(const TDesC8& aFilename, TBool aOverwriteExisting = EFalse );
+	
+	/**
+	Returns the name of file where to save incoming content.
+	@return Returns a pointer to file name in which to save the message body.
+	**/
+	IMPORT_C TPtrC8 InFilename();
+	
+	/**
+	Returns if the existing file should be overwritten with the requested content.
+	If not then the new file with name: aFilename_serialNumber will be created.
+	@return Should existing file be overwritten.
+	**/
+	IMPORT_C TBool OverwriteExisting();
+	
+	/**
+	Sets the range of remote filename which will be requested. Calling this method involves sending GET request 
+	with "Range" HTTP header, so this header should not be explicitly added by caller!
+	If server doesn't support "Range" header then will probably respond with HTTP 200 Ok and the whole content,
+	so observer will be notified with such a message instead of HTTP 206 Partial Content.
+	@param aOffset Offset of the file that should be requested from server. 
+	@param aLength Length of file content to be requested. Notice that if aOffset is set to some value 
+			and aLength is set to 0 then the range from aOffset to the end of file will be requested.
+			If both, offset and length are set to 0 then the range mode is off and whole file will be requested.
+	@param aSaveAtOffset Should the requested offset of the remote file be saved at physical offset of
+			existing local file. Notice that to save in local file at the same offset of the file the 
+			following requirements should be met:
+			- Local file with the name passed in aFilename parameter must exists.
+			- In the file there must be already content at least from beginning of the file to the aOffset-1 position.
+			- The flag aOverwriteExisting in SetInFilenameL method must be set to ETrue.
+			If one of the mentioned requirements won't be met then the range content will be saved in new file
+			at the beginning, if aOverwriteExisting is set to EFalse, or in the existing file at the beginning of 
+			the file, if aOverwriteExisting is set to ETrue. 
+	@return None.
+	**/	
+	IMPORT_C void SetRangeL( TInt aOffset, TInt aLength, TBool aSaveAtOffset );
+	
+	/**
+	Returns the offset of the file that should be requested from server.
+	@return Offset of the file that should be requested from server.
+	**/
+	IMPORT_C TInt Offset();
+	
+	/**
+	Returns the length of file content to be requested.
+	@return Length of file content to be requested.
+	**/
+	IMPORT_C TInt Length();
+	
+	/**
+	Return if the requested offset of the remote file should be saved at physical offset of
+	the local file.
+	@return Should the requested offset of the remote file be saved at physical offset of existing local file. 
+	**/
+	IMPORT_C TBool SaveAtOffset();
+	
+	/**
+	Sets the filename which will be used as message body.
+	@param aFilename Path and name of file to use.
+	@return None.
+	**/	
+	IMPORT_C void SetOutFilenameL(const TDesC8& aFilename);	
+
+	/**
+	Returns the name of file which will be set as body of message to send.
+	@return Returns a pointer to file which will be used as message body.
+	**/
+	IMPORT_C TPtrC8 OutFilename();
+	
+	/**
+	Returns value of the header.
+	@param aName Name of the header to be returned.
+	@return Value of the header.
+	**/			
+	IMPORT_C TDesC8& GetHeaderValue(const TDesC8& aName);
+
+	/**
+	Check if header exists, also return value of header if exists
+	@param aHeaderName Name of the header.
+	@param aExist True if header exist, false if not.
+	@return Value of the header (if exist, otherwise KNullDesC).
+	**/			
+	IMPORT_C TDesC8& IsHeader(const TDesC8& aHeaderName, TBool& aExist);
+
+	/**
+	Sets messages Session id.
+	@param aId Session id we want the message to have.
+	@return None.
+	**/
+	IMPORT_C void SetSessionId(TInt aId);	
+
+	/**
+	Returns the SessionId of the message.
+	@return SessionId of the message.
+	**/
+	IMPORT_C TInt SessionId() const;	
+
+	/**
+	Creates new, unused Session id value.
+	@return new session id.
+	**/
+	IMPORT_C static TInt NewSessionIdL();
+
+	/**
+	Compares if two messages have same session id.
+	@param aFirst First message to compare.
+	@param aSecond Second message to compare.
+	@return ETrue if same session id, EFalse otherwise.
+	**/
+	IMPORT_C static TBool SessionIdMatch( const CUpnpHttpMessage& aFirst, 
+	                                      const CUpnpHttpMessage& aSecond);
+	
+	/**
+	Returns length of message body.
+	@return Length of message body.
+	**/
+	IMPORT_C TInt BodyLength() const;
+
+	/**
+	Returns the service used from http message, for example MediaServer:1 
+    from Mediaserver:1/ContentDirectory.
+	@return Pointer to device name.
+	**/
+	IMPORT_C const TPtrC8 DevicePath();
+
+	/**
+	Returns the service used from http message, for example ContentDirectory 
+    from Mediaserver:1/ContentDirectory.
+	@return Pointer to service name.
+	**/
+	IMPORT_C const TPtrC8 ServicePath() const;
+
+	/**
+	Checks if message is SOAP message.
+	@return ETrue, if SOAP, EFalse otherwise.
+	**/
+	IMPORT_C TBool IsSoap() const;
+
+	/**
+	Checks if message is GENA message.
+	@return ETrue, if GENA, EFalse otherwise.
+	**/
+	IMPORT_C TBool IsGena();
+
+	/**
+	Checks if message is a 1xx response.
+	@return ETrue, if 1xx error, EFalse otherwise.
+	**/
+	IMPORT_C TBool Is1xx();
+
+	/**
+	Checks if message is a 2xx response.
+	@return ETrue, if 2xx error, EFalse otherwise.
+	**/
+	IMPORT_C TBool Is2xx();
+	
+	/**
+	Checks if message is a 3xx response.
+	@return ETrue, if 3xx error, EFalse otherwise.
+	**/
+	IMPORT_C TBool Is3xx();
+	
+	/**
+	Returns the method of message, like GET, POST etc.
+	@return Pointer that points to message's method.
+	**/
+	IMPORT_C const TPtrC8 Method();
+
+	/**
+	Returns version of HTTP Request, like HTTP/1.1, HTTP/1.0 etc.
+	@return Pointer that points to HTTP's version.
+	**/
+	IMPORT_C const TPtrC8 RequestHTTPVersion();
+
+	/** 
+	Returns a pointer to this message's headerlist.
+	@return Pointer to this message's HTTPHeaderList.
+	**/
+	IMPORT_C CUpnpHttpHeaderList* HeaderList();
+
+	/**
+	Sets the type of message. Used by ControlPoint
+	@param aType Error code numeral value.
+	@return None.
+	**/
+	IMPORT_C void SetType(THTTPMsgType aType);
+
+	/**
+	Returns the Http message type, used by controlpoint.
+	@return HTTP message type.
+	**/
+	IMPORT_C THTTPMsgType Type() const;
+
+	/**
+	Returns textual presentation of the given error.
+	@param aError Error number.
+	@return Textual presentation of given error code.
+	**/			 
+ 	IMPORT_C static const TDesC8& UpnpError(TUpnpErrorCode aError);
+ 	
+ 	/**
+	Returns textual presentation of the given error.
+	@param aError Error number.
+	@return Textual presentation of given error code.
+	**/
+	IMPORT_C static HBufC8* UpnpErrorL(TUpnpErrorCode aError);
+
+	/**
+	Returns the textual error message of given error code.
+	@param aError Error code numeral value.
+	@return Textual representation of error code.
+	**/
+	IMPORT_C static const TDesC8& HttpError(THttpStatusCode aError);
+
+	/**
+	Returns the error code of the message.
+	@return Error code.
+	**/
+	IMPORT_C TInt Error();
+
+	/**
+	Sets the aBuf as string presentation of aAddr
+	@param aAddr Address that will be converted.
+	@param aBuf Buffer that will contain textual presentation of aAddr.
+	@return None.
+	**/
+	IMPORT_C static void AddrOutput(const TInetAddr& aAddr, TDes8& aBuf);
+
+	/**
+	Sets the TInetAddr object value to given aBuf.
+	@param aAddr Address that will contain same logical value as aBuf 
+	after conversion.
+	@param aBuf String we want to convert to TInetAddr.
+	@return None.
+	**/
+	IMPORT_C static void AddrInput(TInetAddr& aAddr, const TDesC8& aBuf);
+
+	/**
+	Returns the current iRetryCounter value.
+	@return Current counter value.
+	**/
+	IMPORT_C TInt RetryCounter();
+
+	/**
+	Sets the retry counter value
+	@param aValue value to be set for RetryCounter.
+	@return None.
+	**/
+	IMPORT_C void SetRetryCounter(TInt aValue);
+
+	/**
+    Sets the timer on message to expire in given time.
+    Makes callback to MSsdpMessageObserver* after timeout.
+	@param aObserver Pointer to message's timer observer.
+    @param aTimeoutValue Number of microseconds to expire.
+	@return Error code, KErrNone if no errors.
+	**/
+    IMPORT_C TInt SetMessageTimeoutL( MUpnpMessageObserver* aObserver, 
+                                      const TInt aTimeoutValue );
+
+	/**
+    Cancels the timer on message.
+	**/
+    IMPORT_C void CancelMessageTimeout();
+
+	/**
+    Sets the priority for HTTP session used with this message.
+    @param aPriority Priority of the session.
+	**/
+    IMPORT_C void SetHttpPriority( TThreadPriority aPriority );
+
+	/**
+    Returns the priority of HTTP session used with this message.
+	**/
+    IMPORT_C TThreadPriority HttpPriority();
+
+	/**
+    Sets the uri to find the local file.
+	**/
+    IMPORT_C void SetOutUriL( const TDesC8& aUri );
+
+	/**
+    Returns the value of OutUri.
+	**/    
+    IMPORT_C const TDesC8& OutUri();
+
+	/**
+    Sets if message is a local requests
+    @param aLocal value indicating if message is local.
+	**/
+    IMPORT_C void SetLocal( TBool aLocal);
+
+	/**
+    Returns if message is a local requests.
+	**/
+    IMPORT_C TBool Local();  
+    
+    /**
+    Sets if message is a client request
+    @param aClientRequest value indicating if message is from the client.
+	**/
+    IMPORT_C void SetClientRequest( TBool aClientRequest);
+
+	/**
+    Returns if message is a client requests.
+	**/
+    IMPORT_C TBool ClientRequest();
+    
+    
+    /**
+	Find FIRST occurence of LWS    = [CRLF] 1*( SP | HT ) (RFC 2616 2.2 Basic Rules)
+	RFC2822 2.2.3 Unfolding is accomplished by simply removing any CRLF that is immediately followed by WSP
+	@param aText text which include many headers (some can be folded)
+	@return The offset of the LWS sequence from the beginning of this descriptor's data. 
+			KErrNotFound, if the data sequence cannot be found.
+	**/	
+	IMPORT_C static TInt FindLWS(const TDesC8& aText);
+	
+	   /**
+    Sets a timeout for a session (valid only for TCP client sessions!)
+    @param aTimeout value in microseconds.
+	**/
+    IMPORT_C void SetTcpTimeout( TInt aTimeout);
+
+	/**
+    Returns the value of TCP-session's timeout for a message.
+	**/
+    IMPORT_C TInt TcpTimeout();
+    /**
+    * Returns the internal error code for a message
+	**/
+    IMPORT_C TInt InternalError();
+    
+    /**
+    * Sets the internal error code for a message
+	**/
+    IMPORT_C void SetInternalError(TInt aErrorCode);
+
+protected:
+
+	/**
+	List of message headers.
+	**/	
+	CUpnpHttpHeaderList* iHeaderList;
+
+	/**
+	Variable used to route messages thru Dispatcher.
+	**/		
+	HBufC8* iDestinationPath;
+
+	/**
+	Variable used to route messages thru Dispatcher.
+	**/	
+	HBufC8* iSenderPath;
+	
+	/**
+	Variable used to route messages to correct Http session.
+	**/	
+	TInt iSessionId;
+
+	/**
+	Variable used by controlpoint.
+	**/	
+	THTTPMsgType iType;
+
+	/**
+	Variable used by controlpoint.
+	**/	
+	TAny* iPendingRequest;
+
+	/**
+	Message body.
+	**/	
+	HBufC8* iTextBody;
+	
+	/**
+	Destination of this message.
+	**/	
+	TInetAddr iRemoteHost;
+
+	/**
+	Buffer that contains the path and filename of file used as message 
+	body when sending message.
+	**/		
+	HBufC8* iOutFilename;
+
+	/**
+	Buffer that contains the path and filename of file used to save 
+	incoming data.
+	**/		
+	HBufC8* iInFilename;
+
+	/**
+	Counter that is used to track resending count, for example in 
+	Control point.
+	**/			
+	TInt iRetryCounter;
+
+	/**
+	Priority that is used for HTTP session with this message.
+	**/	
+	TThreadPriority iSessionPriority;
+
+	/**
+	Timer that is used in SSDP messages to cause randomness in sending
+	SSDP messages.
+	**/
+	CUpnpNotifyTimer* iTimer;
+
+	/**
+    Used for resolving url presentation to local filesystem file.
+	**/
+	HBufC8* iOutUri;
+
+	/**
+	Calls this observer's MessageExpiredL() function when iTimer
+    expires.
+	**/	
+	MUpnpMessageObserver* iMessageObserver;
+	
+	/**
+	Should the existing local file be overwritten with the requested content.
+	If not then the new file with name: iInFilename_serialNumber will be created
+	to save incoming content.
+	**/
+	TBool iOverwriteExisting;
+	
+	/**
+	Offset of the file that should be requested from server. 
+	**/
+	TInt iOffset;
+	
+	/**
+	Length of file content to be requested.
+	**/
+	TInt iLength; 
+	
+	/**
+	Should the requested offset of the remote file be saved at physical offset of existing local file.
+	**/
+	TBool iSaveAtOffset;
+	/**
+	* Indicate whether request is local (it means send by local shortcut) or remote, 
+	**/
+	TBool iLocal;
+	/**
+	* Indicate to the upper layer that a message is a client request sent to our (this) host, if False it is ignored
+	It should prevent confusing a client session with the server one by the upper layer
+	**/
+	TBool iClientRequest;
+	/**
+	* Indicates the session timeout value, used only in client sessions of TcpServer!
+	It should prevent confusing a client session with the server one by the upper layer
+	**/
+	TInt iTcpTimeout;
+	/**
+	* internal error
+	**/
+	
+	TInt iInternalError;
+	
+	};
+
+#endif // C_CUPNPHTTPMESSAGE_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/inc/upnphttpmessagefactory.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,188 @@
+/** @file
+* 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:  Declares HttpMessageFactory class.
+*
+*/
+
+
+#ifndef C_RUPNPHTTPMESSAGEFACTORY_H
+#define C_RUPNPHTTPMESSAGEFACTORY_H
+
+// INCLUDES
+#include <e32base.h>
+#include "upnphttpmessage.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+/*! 
+  \brief HTTP Message Factory. Used to create standard HTTP messages.
+ 
+  */
+
+class RUpnpHttpMessageFactory
+	{
+public:
+
+	/**
+	Constructor function; Creates HTTP get message, which is used normally to get content from remote servers.
+	@param aDestination Destination of the message.
+	@param aPath path to file in Http server.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpGetL(TInetAddr& aDestination, const TDesC8& aPath);
+
+	/**
+	Constructor function; Creates HTTP get message, which is used normally to get content from remote servers.
+	@param aDestination Destination of the message.
+	@param aHeadPath Start path to file in Http server.
+	@param aTailPath End path to file in Http server.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpGetL(TInetAddr& aDestination, const TDesC8& aHeadPath, const TDesC8& aTailPath);
+
+	/**
+	Constructor function; Creates HTTP get message, which is used normally to get content from remote servers.
+	@param aUrl Url to file.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpGetL(const TDesC8& aUrl);
+
+	/**
+	Constructor function; Creates HTTP get message, which is used normally to get content from remote servers.
+	@param aDestination Destination of the message.
+	@param aPath path to file in Http server.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpGetL(const TDesC8& aDestination, const TDesC8& aPath);
+	
+	/**
+	Constructor function; Creates HTTP HEAD message.
+	@param aUrl Url to file/target/service.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpHeadL(const TDesC8& aUrl);
+
+	/**
+	Constructor function; Creates HTTP HEAD message.
+	@param aDestination Destination of the message.
+	@param aPath path to file in Http server.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpHeadL(const TDesC8& aDestination, const TDesC8& aPath);
+	
+	/**
+	Constructor function; Creates HTTP HEAD message.
+	@param aDestination Destination of the message.
+	@param aPath path to file in Http server.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpHeadL( TInetAddr& aDestination, const TDesC8& aPath);
+
+	/**
+	Constructor function; Creates HTTP POST message.
+	@param aUrl Url to file/target/service.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpPostL(const TDesC8& aUrl);
+
+	/**
+	Constructor function; Creates HTTP POST message.
+	@param aDestination Destination of the message.
+	@param aPath path to file in Http server.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpPostL(const TDesC8& aDestination, const TDesC8& aPath);
+
+	/**
+	Constructor function; Creates HTTP POST message.
+	@param aDestination Destination of the message.
+	@param aPath path to file in Http server.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpPostL(const TInetAddr& aDestination, const TDesC8& aPath);
+
+	/**
+	Creates a HTTP OK reply message, Code 200.
+	@param aMessage Message in which should be replied.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpResponseOkL(CUpnpHttpMessage* aMessage);
+
+	/**
+	Creates a HTTP OK reply message, Code 200.
+	@param aDestination Destination of the reply message.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpResponseOkL(const TInetAddr& aDestination);
+
+	/**
+	Creates a HTTP reply message.
+	@param aMessage Message in which should be replied.
+	@param aStatus Number of status code.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* Http11ResponseL( CUpnpHttpMessage *aMessage, TInt aStatus );
+
+	/**
+	Creates a HTTP reply message.
+	@param aDestination Destination of the reply message.
+	@param aStatus Number of status code.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* Http11ResponseL( const TInetAddr& aDestination, TInt aStatus );
+
+	/**
+	Creates a HTTP Error message.
+	@param aMessage Message in which should be replied.
+	@param aError Number of error code.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpResponseErrorL(CUpnpHttpMessage* aMessage, TInt aError);
+
+	/**
+	Creates a HTTP Error message.
+	@param aAddr Destination of the error message.
+	@param aError Number of error code.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* HttpResponseErrorL(const TInetAddr& aAddr, TInt aError);
+
+	/**
+	Creates a HTTP Error message with UPnp error codes.
+	@param aMessage Message in which should be replied.
+	@param aError Number of error code.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* UpnpResponseErrorL(CUpnpHttpMessage* aMessage, TUpnpErrorCode aError);
+
+	/**
+	Creates a HTTP Error message with UPnp error codes.
+	@param aDestination Destination of the error message.
+	@param aError Number of error code.
+	@return new Http message.
+	**/
+	IMPORT_C static CUpnpHttpMessage* UpnpResponseErrorL(const TInetAddr& aDestination, TUpnpErrorCode aError);
+	
+private:
+	
+	/**
+	Sets Host HTTP header to given message basing on given destinstion address.
+	@param aMessage Message for which the Host header will be set.
+	@param aDestination Destination address.
+	**/
+	static void SetHostHeaderL( CUpnpHttpMessage* aMessage, const TInetAddr& aDestination );
+};
+
+
+#endif // C_RUPNPHTTPMESSAGEFACTORY_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/inc/upnpsessionbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,53 @@
+/** @file
+* 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:  Declaration of RUpnpSessionBase
+*
+*/
+
+#ifndef RUPNPSESSIONBASE_H
+#define RUPNPSESSIONBASE_H
+
+#include <e32base.h>
+
+/**
+ * Base class for all client side session classes used in upnp stack project
+ * It provides you connecting and starting server
+ *
+ * Note that it should be used with server part implementation that use
+ * CUpnpSymbianServerBase class.
+ *
+ *  @lib upnpipserversutils
+ */
+class RUpnpSessionBase : public RSessionBase
+    {
+protected:
+
+    /**
+     * Connect to the server and create a session
+     *
+     * @param aServerName               name of server to connect to
+     * @param aServerVersion            version of server that is supported
+     * @param aServerMessageSlots       number of message slots
+     * @param aServerStartRetryCount    number of possible start retries to be made
+     * @param aServerFileName           name of server exe file to run
+     * @param aServerUid3               uid3 of server exe to run
+     * @return error code
+     */
+    IMPORT_C TInt Connect( const TDesC& aServerName, TVersion aServerVersion,
+        TInt aServerMessageSlots, TInt aServerStartRetryCount,
+        const TDesC& aServerFileName, TUid aServerUid3 );
+
+    };
+
+#endif // RUPNPSESSIONBASE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/inc/upnpstring.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,272 @@
+/** @file
+* 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:  Declares String functions
+*
+*/
+
+
+#ifndef C_UPNPSTRING_H
+#define C_UPNPSTRING_H
+
+// INCLUDES
+#include "in_sock.h"
+
+// CONSTANTS
+_LIT8(KEt, "&");
+_LIT8(KEtAmp, "&amp;");
+_LIT8(KEtlt, "&lt;");
+_LIT8(KEtgt, "&gt;");
+_LIT8(KApostrophe, "'");
+_LIT8(KEtApos, "&apos;");
+_LIT8(KEtQuot, "&quot;");
+_LIT8(KCSpace, "%20");
+const TInt KUrlCharNoLen = 3;
+const TInt KOneCharLen = 1;
+
+
+// ================= MEMBER FUNCTIONS =======================
+namespace UpnpString
+    {
+
+    /**
+    * Checks whether character Colon or not.
+    * @since Series 60 2.o
+    * @param aChar character to be investigated.
+    * @return Boolean value.
+    */
+    IMPORT_C TBool IsColon(const TUint8& aChar);
+    
+    /**
+    * Converts TDesC16 (UTF-16) to HBufC8 (UTF-8)
+    * @param    aBuffer    data to be converted
+    * @return HBufC8*    the converted data 
+    */
+    IMPORT_C HBufC8* FromUnicodeL(const TDesC& aBuffer);
+
+    /**
+    * Converts TDesC8 (UTF-8) to HBufC16 (UTF-16)
+    * @param    aBuffer    data to be converted
+    * @return HBufC16*    the converted data 
+    */
+    IMPORT_C HBufC16* ToUnicodeL(const TDesC8& aBuffer);
+    
+    /**
+    * Returns current date in string representation in a 
+    * form Sun, 06 Nov 1994 08:49:37 GMT
+    * @return    HBufC8* string representation of current date
+    */
+    IMPORT_C HBufC8* CurrentDateLC();
+    
+    /**
+    * Returns date in string representation in a 
+    * form Sun, 06 Nov 1994 08:49:37 GMT
+    * @return    HBufC8* string representation of a given date
+    */
+    HBufC8* GetDateLC(const TTime& aTime);
+    /**
+    * Get proper string for a week day    
+    * @param    aDate    
+    * @return    Abbreviated name of a weekday
+    */
+    const TDesC8& GetWeekday(const TTime& aDate);
+    
+    /**
+    * Get proper string for a month
+    * @param    aDate    
+    * @return    Abbreviated name of a month
+    */
+    const TDesC8& GetMonth(const TDateTime& aDate);
+    
+    /**
+    * Cuts data in aPtr into smaller pieces where aDelim is found
+    * and puts the data into the aArray
+    * @param    aPtr    stores the data to be cut to pieces
+    * @param    aDelim    the delimeter from which the aPtr is cut
+    * @param    aArray    holds the cut up parts of aPtr
+    * @return    None.
+    */
+    IMPORT_C void CutToPiecesL(
+        TPtrC8 aPtr,
+        TChar aDelim,
+        RPointerArray<TPtrC8>& aArray
+        );
+        
+    /**
+    * Removes spaces and (if wanted) quatation marks from the end
+    * and beginning of the given string
+    * @param    aPtr        The data to be trimmed
+    * @param    aQuatations    TBool: Remove quotations?
+    * @return    TPtrC8        Trimmed string
+    */
+    IMPORT_C TPtrC8 Trim(TPtrC8 aPtr, TBool aQuotations = EFalse);
+
+    /**
+    * Removes spaces and (if wanted) quatation marks from
+    * the end and beginning of the given string
+    * @since Series 60 2.0
+    * @param aBuf buffer to be trimmed
+    * @param aQuotations indicates whether '"' are trimmed.
+    * @return Trimmed buffer
+    */
+    IMPORT_C HBufC8* TrimLC(const TDesC8& aBuf, TBool aQuotations);
+
+    /**
+    * Reads the aPlaceth element from the CSV string
+    * @param    aCSV    data CSV string
+    * @param    aPlace    the position of the wanted element
+    * @return    HBufC8*    the wanted element
+    */
+    IMPORT_C HBufC8* ValueFromCsvL(const TDesC8& aCSV, TInt aPlace);
+
+    /**
+    * Adds a value to a CSV string
+    * @param    aCSV    original CSV string
+    * @param    aValue    value that is added to string
+    * @return    HBufC8*    the result CSV string of the join operation
+    */
+    IMPORT_C HBufC8* AddValueToCsvL(const TDesC8& aCSV, const TDesC8& aValue);
+
+    /**
+    * Removes an element from the CSV string
+    * @param    aCSV    original CSV string
+    * @param    aValue    value to be removed
+    * @return    HBufC8*    resulting CSV string 
+    */
+    IMPORT_C HBufC8* RemoveFromCsvLC(const TDesC8& aCSV, const TDesC8& aValue );
+
+    /**
+    * Adds elements from the given CSV string to the given array
+    * @param    aCSV    CSV string that is going to be ripped apart
+    * @param    aArray    the results of the conversion
+    * @return    None.
+    */
+    IMPORT_C void CsvToRPointerArrayL(
+        const TDesC8& aCSV,
+        RPointerArray<TPtrC8>& aArray
+        );
+
+    /**
+    * Converts array of elements into a CSV string
+    * @param    aArray    element array
+    * @return    HBufC8    result CSV string
+    */
+    IMPORT_C HBufC8* RPointerArrayToCsvLC( RPointerArray<TPtrC8>& aArray);
+
+    /**
+    * Adds aString2 to aString
+    * @param aString    string that is going to be appended
+    * @param aString2    string that is added 
+    * @return    None.
+    */
+    IMPORT_C void AppendStringL(CBufFlat& aString, const TDesC8& aString2);
+
+    /**
+    * Adds aString2 to aString
+    * @param aString    string that is going to be appended
+    * @param aString2    string that is added 
+    * @return    None.
+    */
+    IMPORT_C void AppendStringL(HBufC8*& aString, const TDesC8& aString2);
+
+    /**
+    * Converts given string to integer format
+    * @param    aStr    string to be converted
+    * @param    aInt    Resulting integer
+    * @return    TInt    system wide error code.
+    */
+    IMPORT_C TInt StringToInt(const TDesC8& aStr, TInt* aInt);
+
+    /**
+    * Replaces a part of the given string with a new part
+    * @param    aStr            Original string
+    * @paran    aResult            resulting string
+    * @param    aTrg            the target part of the string
+    * @param    aReplacement    the replacement part
+    * @return    None.
+    */    
+    IMPORT_C void StringReplaceL(
+        const TDesC8& aOrginal,
+        HBufC8*& aResult,
+        const TDesC8& aTrg,
+        const TDesC8& aReplacement
+        );
+    
+    /**
+    * Replaces a part of the given string with a new part
+    * @param    aStr            Original string
+    * @param    aTrg            the target part of the string
+    * @param    aReplacement    the replacement part
+    * @return    HBufC*            resulting string
+    */
+    IMPORT_C HBufC8* StringReplaceL(
+        const TDesC8& aStr,
+        const TDesC8& aTrg,
+        const TDesC8& aReplacement
+        );    
+
+    /**
+    Replaces a part of the given string with a new part
+    @param    aString            Original string, replacements done here
+    @param    aTrg            the target part of the string
+    @param    aReplacement    the replacement part
+    @return    none
+    **/
+    IMPORT_C void StringReplaceInPlaceL(TDes8& aString, const TDesC8& aTrg, const TDesC8& aReplacement);
+
+    /**
+    * Encodes the XML string
+    * @param    aBuf    the string to be converted
+    * @return    HBufC8*    the converted string
+    */
+    IMPORT_C HBufC8* EncodeXmlStringL( HBufC8*& aBuf );
+    
+    /**
+    * Encodes the XML string
+    * @param    aBuf    the string to be converted
+    * @result   HBufC8* the converted string
+    */
+    IMPORT_C HBufC8* EncodeXmlStringL( const TDesC8& aBuf );
+    
+    /**
+    * Decodes the XML string 
+    * @param    aBuf        string to be decoded
+    * @return    HBufC8*        decoded string
+    */
+    IMPORT_C HBufC8* DecodeXmlStringL( HBufC8*& aBuf );
+
+    /**
+    decodes the XML string 
+    @param    aBuf        string to be decoded
+    @return    HBufC8*        decoded string
+    **/
+    IMPORT_C HBufC8* DecodeXmlStringL( const TDesC8& aBuf );
+
+    /**
+    * Returns a HBufC8 representation of the InetAddress
+    * @param    aAddress    InetAddress 
+    * @return HBufC8*        string representation of InetAddress
+    */
+    IMPORT_C HBufC8* InetToStringL(const TInetAddr& aAddress);
+    
+    /**
+    * Replaces URL codes "%xx" by the corresponding character
+    * @param    aString    InetAddress string to be processed
+    */
+    IMPORT_C void ReplaceHttpCharactersL( TDes& aString );
+    IMPORT_C void ReplaceHttpCharacters( TDes8& aString );
+    
+    }
+
+
+#endif // C_UPNPSTRING_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/inc/upnpsymbianserverbase.h	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,201 @@
+/** @file
+ * 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:  Declaration of CUpnpSymbianServerBase
+ *
+ */
+
+#ifndef CUPNPSYMBIANSERVERBASE_H
+#define CUPNPSYMBIANSERVERBASE_H
+
+#include <e32base.h>
+#include "upnpnotifytimer.h"
+
+class CUpnpSymbianServerBase;
+
+typedef CUpnpSymbianServerBase* (*TServerFactoryMethodLC)();
+
+/**
+ * Base class for all symbian server classes used in upnp stack project
+ * This implementation provides:
+ * - proper server starting,
+ * - 2 seconds stoping timeout,
+ * - stopping server if ( no connected clients && CanBeStopped() )
+ *   @see CanBeStopped()
+ *   @see SuggestShutdown()
+ * - session connection version checking,
+ * - basic panics utility functions,
+ * - basic errors handling
+ * Note that it should be used with client part implementation that use
+ * RUpnpSessionBase class.
+ *
+ *  @lib upnpipserversutils
+ */
+class CUpnpSymbianServerBase : public CServer2, public MUpnpNotifyTimerObserver
+    {
+public:
+    enum TUpnpSymbianServerPanics
+        {
+        ECreateTrapCleanup,
+        EBadRequest,
+        EBadDescriptor,
+        EFirstUnusedPanicNumber //this should be always last enum as this is
+        //used by derived server to start their panic enums
+        };
+
+public:
+    /**
+     * Fully initialise thread, and start the server.
+     * Method is intended to be called from E32Main method without any earlier
+     * initialisation.
+     * @param aThreadName name to which thread will be renamed.
+     * @param aServerFactoryMethodLC two phase constructor of server object that
+     *          leaves it on cleanup stack.
+     * @return error code
+     */
+    IMPORT_C static TInt StartServer( const TDesC& aThreadName,
+            TServerFactoryMethodLC aServerFactoryMethodLC );
+
+    /**
+     * Destructor
+     */
+    IMPORT_C ~CUpnpSymbianServerBase();
+
+    /**
+     * Panic the client.
+     * @param aMessage the message channel to the client.
+     * @param aReason the reason code for the panic.
+     */
+    IMPORT_C void PanicClient( const RMessage2& aMessage, TInt aReason ) const;
+
+protected:
+    /**
+     * Constructor.
+     */
+    IMPORT_C CUpnpSymbianServerBase();
+
+    /**
+     * Second phase base constructor. It must be called by derived class.
+     */
+    IMPORT_C void BaseConstructL();
+
+    /**
+     * Panic the server.
+     * @param aPanic the panic code.
+     */
+    IMPORT_C void PanicServer( TInt aPanic ) const;
+
+private:
+    /**
+     * Returns new CSession2 object.
+     * This method don't have to bother about version checking
+     * as this is done by implementation of
+     * CUpnpSymbianServerBase::NewSessionL
+     *      (const TVersion& aVersion, const RMessage2& aMessage)
+     * that is wrapping this method.
+     */
+    virtual CSession2* NewSessionL( const RMessage2& aMessage ) const = 0;
+
+    /**
+     * Returns version that is supported by this server.
+     */
+    virtual TVersion SupportedVersion() const = 0;
+
+    /**
+     * Return name of a server.
+     * @return name of a server.
+     */
+    virtual const TDesC& ServerName() const = 0;
+
+    /**
+     * Derived classes can implement in the method additional condidions
+     * of stopping server process that will be checked in SuggestShutdown
+     * method and befor actual server stopping. Default implementation
+     * provides no additional condidions.
+     *
+     * @return ETrue if server proccess can be stopped at the moment
+     */
+    IMPORT_C virtual TBool CanBeStopped() const;
+
+protected:
+    /**
+     * Method should be called when derived class wants to suggest
+     * closing of the media server. This method checks every stop
+     * condidion and starts closing server timeout if all of them are
+     * fulfilled.
+     */
+    IMPORT_C void SuggestShutdown();
+
+protected:
+    //from MUpnpNotifyTimerObserver
+    /**
+     * Invoked by shutdown timer when event TimerEventL occured.
+     */
+    IMPORT_C virtual void TimerEventL( CUpnpNotifyTimer* aTimer );
+
+protected:
+    //from CServer2
+    /**
+     * This method wraps pure virtual NewSessionL(const RMessage2&)
+     * and leaves with KErrNotSupported if aVersion is different
+     * from version provided by pure virtual SupportedVersion.
+     */
+    IMPORT_C CSession2* NewSessionL(
+            const TVersion& aVersion, const RMessage2& aMessage ) const;
+
+protected:
+    //from CActive
+
+    /**
+     * Invoked by active object framework to handle ending events
+     */
+    IMPORT_C void RunL();
+
+    /**
+     * Process any errors.
+     * @param aError the leave code reported.
+     * @result return KErrNone if leave is handled.
+     */
+    IMPORT_C TInt RunError( TInt aError );
+
+private:
+    /**
+     * Internal method that initialises thread, and starts the server.
+     * Precondition is that cleanup stack is correctly initialised
+     * and method is called from within a TRAP.
+     * @param aThreadName name to which thread will be renamed.
+     * @param aServerFactoryMethodLC two phase constructor of server object that
+     *          leaves it on cleanup stack.
+     */
+    static void StartServerL( const TDesC& aThreadName,
+        TServerFactoryMethodLC aServerFactoryMethodLC );
+
+    /**
+     * Increment the count of the active sessions for this server.
+     */
+    void IncrementSessionCount();
+
+    /**
+     * Decrement the count of the active sessions for this server.
+     */
+    void DecrementSessionCount();
+
+private:
+    /** @var iSessionCount the number of session owned by this server */
+    TInt iSessionCount;
+
+    /** shutdown timer */
+    CUpnpNotifyTimer* iShutdownTimer;
+    };
+
+#endif // CUPNPSYMBIANSERVERBASE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/upnp/upnpstack_plat/upnp_utils_api/upnp_utils_api.metaxml	Tue Feb 02 01:12:20 2010 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="ecac83ea2f682fd626f862bb64f883ec" dataversion="1.0">
+  <name>UPnP Utils API</name>
+  <description>Interface to the Utils component, providing generic utilities.</description>
+  <type>c++</type>
+  <subsystem>upnpstack</subsystem>
+  <libs>
+    <lib name="upnpipserversutils.lib" />
+  </libs>
+  <release category="domain"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>