datacommsserver/esockserver/test/providers/dummy/src/dummypr_mcprpubsubsubscriber.cpp
changeset 1 21d2ab05f085
parent 0 dfb7c4ff071f
child 2 dee179edb159
equal deleted inserted replaced
0:dfb7c4ff071f 1:21d2ab05f085
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    68 	{
    68 	{
    69 	this->Cancel(); // object must be stoppable by destcruction due to cleanup restrictions
    69 	this->Cancel(); // object must be stoppable by destcruction due to cleanup restrictions
    70 	iProperty.Close();
    70 	iProperty.Close();
    71 	}
    71 	}
    72 
    72 
    73 ///////////////////////////////////////////////////////////////////////////////
    73 //
    74 
    74 
    75 CMCPrPubSubAvailability* CMCPrPubSubAvailability::NewL(const ESock::CMetaConnectionProviderBase& aProvBase, TUint aStopCode)
    75 CMCPrPubSubAvailability* CMCPrPubSubAvailability::NewL(const ESock::CMetaConnectionProviderBase& aProvBase, TUint aStopCode)
    76 	{
    76 	{
    77 	CMCPrPubSubAvailability* self = new (ELeave) CMCPrPubSubAvailability(aProvBase,aStopCode);
    77 	CMCPrPubSubAvailability* self = new (ELeave) CMCPrPubSubAvailability(aProvBase,aStopCode);
    78 	CleanupStack::PushL(self);
    78 	CleanupStack::PushL(self);
   132 	TInt value;
   132 	TInt value;
   133 	User::LeaveIfError(iProperty.Get(value));
   133 	User::LeaveIfError(iProperty.Get(value));
   134 	__CFLOG_VAR((KDummyMCprTag, KDummyMCprSubTag, _L8("CMCPrPubSubAvailability subscribed value now %d"),value));
   134 	__CFLOG_VAR((KDummyMCprTag, KDummyMCprSubTag, _L8("CMCPrPubSubAvailability subscribed value now %d"),value));
   135 
   135 
   136     __ASSERT_DEBUG(!iAvailabilityActivity.IsNull(), User::Panic(KSpecAssert_DummyPrStopSubsc, 1)); //maybe a bit defensive, but this is test code after all. The test changes availability when nobody is listenning; Surely test is wrong?
   136     __ASSERT_DEBUG(!iAvailabilityActivity.IsNull(), User::Panic(KSpecAssert_DummyPrStopSubsc, 1)); //maybe a bit defensive, but this is test code after all. The test changes availability when nobody is listenning; Surely test is wrong?
   137 	}
   137     RClientInterface::OpenPostMessageClose(Id(), iAvailabilityActivity,
   138 
   138         TCFAvailabilityControlClient::TAvailabilityNotification(value).CRef());
   139 ///////////////////////////////////////////////////////////////////////////////
   139 	}
       
   140 
       
   141 //
   140 
   142 
   141 CMCPrPubSubStopTrigger* CMCPrPubSubStopTrigger::NewL(const ESock::CMetaConnectionProviderBase& aProvBase, TUint aStopCode)
   143 CMCPrPubSubStopTrigger* CMCPrPubSubStopTrigger::NewL(const ESock::CMetaConnectionProviderBase& aProvBase, TUint aStopCode)
   142 	{
   144 	{
   143 	CMCPrPubSubStopTrigger* self = new (ELeave) CMCPrPubSubStopTrigger(aProvBase,aStopCode);
   145 	CMCPrPubSubStopTrigger* self = new (ELeave) CMCPrPubSubStopTrigger(aProvBase,aStopCode);
   144 	CleanupStack::PushL(self);
   146 	CleanupStack::PushL(self);