servicediscoveryandcontrol/pnp/test/upnp/Client/upnpplugin/inc/ctimermappeduri.inl
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 #ifndef CTIMERMAPPEDURI_INL_
       
     2 #define CTIMERMAPPEDURI_INL_
       
     3 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 // All rights reserved.
       
     5 // This component and the accompanying materials are made available
       
     6 // under the terms of "Eclipse Public License v1.0"
       
     7 // which accompanies this distribution, and is available
       
     8 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 //
       
    10 // Initial Contributors:
       
    11 // Nokia Corporation - initial contribution.
       
    12 //
       
    13 // Contributors:
       
    14 //
       
    15 // Description:
       
    16 // Returns a reference to the timer entry for the purpose of deleting it from
       
    17 // the deltatimer entry contained in the calling object
       
    18 // 
       
    19 //
       
    20 
       
    21 TDeltaTimerEntry& CTimerMappedUri::GetTimerEntry() const
       
    22 	{
       
    23 	return *iEntry;
       
    24 	}
       
    25 
       
    26 const TDesC8& CTimerMappedUri::GetUri() const
       
    27 	{
       
    28 	return iUri;
       
    29 	}
       
    30 
       
    31 
       
    32 /* Tells if the uri passed is the same as contained in the object
       
    33  */
       
    34 TBool CTimerMappedUri::UriExists(const TDesC8& aUri) const
       
    35 	{
       
    36 	if(aUri.CompareF(iUri) == NULL)
       
    37 		return ETrue;
       
    38 	else
       
    39 		return EFalse;
       
    40 	}
       
    41 
       
    42 /* Returns the delay time according to which the timer has to be set */
       
    43 TInt CTimerMappedUri::Delay() const
       
    44 	{
       
    45 	return iTime;
       
    46 	}
       
    47 
       
    48 CTimerMappedUri* CTimerMappedUri::NewL(const TDesC8& aUri,TDeltaTimerEntry* aEntry,TInt aTime)
       
    49 	{
       
    50 	CTimerMappedUri* timerUri = new(ELeave) CTimerMappedUri(aEntry,aTime);
       
    51 	CleanupStack::PushL(timerUri);
       
    52 	timerUri->ConstructL(aUri);
       
    53 	CleanupStack::Pop(1);
       
    54 	return timerUri;
       
    55 	}
       
    56 
       
    57 CTimerMappedUri::CTimerMappedUri(TDeltaTimerEntry* aEntry,TInt aTime):iEntry(aEntry),iTime(aTime)
       
    58 	{
       
    59 	}
       
    60 
       
    61 void CTimerMappedUri::ConstructL(const TDesC8& aUri)
       
    62 	{
       
    63 	iUri.Close();
       
    64 	iUri.CreateL(aUri);
       
    65 	}
       
    66 
       
    67 CTimerMappedUri::~CTimerMappedUri()
       
    68 	{
       
    69 	iUri.Close();
       
    70 	delete iEntry;
       
    71 	}
       
    72 TBool CTimerMappedUri::MatchTimerEntry( const TDeltaTimerEntry* aEntry ) const
       
    73 	{
       
    74 	if ( aEntry == iEntry )
       
    75 		return ETrue;
       
    76 	else
       
    77 		return EFalse;
       
    78 	}
       
    79 
       
    80 #endif /*CTIMERMAPPEDURI_INL_*/