accessoryservices/remotecontrolfw/server/inc/targetclientprocess.inl
author hgs
Thu, 23 Sep 2010 10:05:41 +0300
changeset 70 653a8b91b95e
permissions -rw-r--r--
201037
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
70
hgs
parents:
diff changeset
     1
// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     2
// All rights reserved.
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     7
//
hgs
parents:
diff changeset
     8
// Initial Contributors:
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    10
//
hgs
parents:
diff changeset
    11
// Contributors:
hgs
parents:
diff changeset
    12
//
hgs
parents:
diff changeset
    13
// Description:
hgs
parents:
diff changeset
    14
// Server-side representation of a target client, which may have multiple 
hgs
parents:
diff changeset
    15
// sessions associated with it.
hgs
parents:
diff changeset
    16
// 
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
/**
hgs
parents:
diff changeset
    19
 @file
hgs
parents:
diff changeset
    20
 @internalComponent
hgs
parents:
diff changeset
    21
*/
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
hgs
parents:
diff changeset
    24
inline TRemConClientId CRemConTargetClientProcess::Id() const
hgs
parents:
diff changeset
    25
	{
hgs
parents:
diff changeset
    26
	return iClientId;
hgs
parents:
diff changeset
    27
	}
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
inline TClientInfo& CRemConTargetClientProcess::ClientInfo()
hgs
parents:
diff changeset
    30
	{	
hgs
parents:
diff changeset
    31
	return iClientInfo;
hgs
parents:
diff changeset
    32
	}
hgs
parents:
diff changeset
    33
hgs
parents:
diff changeset
    34
inline const TClientInfo& CRemConTargetClientProcess::ClientInfo() const
hgs
parents:
diff changeset
    35
	{	
hgs
parents:
diff changeset
    36
	return iClientInfo;
hgs
parents:
diff changeset
    37
	}
hgs
parents:
diff changeset
    38
hgs
parents:
diff changeset
    39
inline TBool CRemConTargetClientProcess::IsClient(const TClientInfo& aClientInfo) const
hgs
parents:
diff changeset
    40
	{
hgs
parents:
diff changeset
    41
	return (iClientInfo.ProcessId() == aClientInfo.ProcessId() && iClientInfo.SecureId() == aClientInfo.SecureId());
hgs
parents:
diff changeset
    42
	}
hgs
parents:
diff changeset
    43
hgs
parents:
diff changeset
    44
inline TBool CRemConTargetClientProcess::ClientAvailable() const
hgs
parents:
diff changeset
    45
	{
hgs
parents:
diff changeset
    46
	return iClientAvailable;
hgs
parents:
diff changeset
    47
	}
hgs
parents:
diff changeset
    48
hgs
parents:
diff changeset
    49
inline TInt CRemConTargetClientProcess::TargetSessionCount() const
hgs
parents:
diff changeset
    50
	{
hgs
parents:
diff changeset
    51
	return iTargetSessions.Count();
hgs
parents:
diff changeset
    52
	}
hgs
parents:
diff changeset
    53
hgs
parents:
diff changeset
    54
inline TBool CRemConTargetClientProcess::HasPlayerInformation() const
hgs
parents:
diff changeset
    55
	{
hgs
parents:
diff changeset
    56
	return iPlayerInfoSet;
hgs
parents:
diff changeset
    57
	}
hgs
parents:
diff changeset
    58
hgs
parents:
diff changeset
    59
inline TPlayerType CRemConTargetClientProcess::PlayerType() const
hgs
parents:
diff changeset
    60
	{
hgs
parents:
diff changeset
    61
	return iPlayerType.iPlayerType;
hgs
parents:
diff changeset
    62
	}
hgs
parents:
diff changeset
    63
hgs
parents:
diff changeset
    64
inline TPlayerSubType CRemConTargetClientProcess::PlayerSubType() const
hgs
parents:
diff changeset
    65
	{
hgs
parents:
diff changeset
    66
	return iPlayerType.iPlayerSubType;
hgs
parents:
diff changeset
    67
	}
hgs
parents:
diff changeset
    68
hgs
parents:
diff changeset
    69
inline const TDesC8& CRemConTargetClientProcess::Name() const
hgs
parents:
diff changeset
    70
	{
hgs
parents:
diff changeset
    71
	return iPlayerName;
hgs
parents:
diff changeset
    72
	}
hgs
parents:
diff changeset
    73
hgs
parents:
diff changeset
    74
inline TBool CRemConTargetClientProcess::PlayerInformationMatches(const TPlayerTypeInformation& aPlayerType, const TDesC8& aPlayerName) const
hgs
parents:
diff changeset
    75
	{
hgs
parents:
diff changeset
    76
	return (aPlayerType.iPlayerType == PlayerType() && aPlayerType.iPlayerSubType == PlayerSubType() && aPlayerName == Name());
hgs
parents:
diff changeset
    77
	}