remotecontrol/remotecontrolfw/targetselectorplugin/public/remcontargetselectorplugininterface.h
author hgs
Wed, 13 Oct 2010 16:20:29 +0300
changeset 51 20ac952a623c
permissions -rw-r--r--
201040_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51
20ac952a623c 201040_02
hgs
parents:
diff changeset
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
20ac952a623c 201040_02
hgs
parents:
diff changeset
     2
// All rights reserved.
20ac952a623c 201040_02
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
20ac952a623c 201040_02
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
20ac952a623c 201040_02
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
20ac952a623c 201040_02
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
20ac952a623c 201040_02
hgs
parents:
diff changeset
     7
//
20ac952a623c 201040_02
hgs
parents:
diff changeset
     8
// Initial Contributors:
20ac952a623c 201040_02
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    10
//
20ac952a623c 201040_02
hgs
parents:
diff changeset
    11
// Contributors:
20ac952a623c 201040_02
hgs
parents:
diff changeset
    12
//
20ac952a623c 201040_02
hgs
parents:
diff changeset
    13
// Description:
20ac952a623c 201040_02
hgs
parents:
diff changeset
    14
//
20ac952a623c 201040_02
hgs
parents:
diff changeset
    15
20ac952a623c 201040_02
hgs
parents:
diff changeset
    16
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
    17
 @file
20ac952a623c 201040_02
hgs
parents:
diff changeset
    18
 @publishedPartner
20ac952a623c 201040_02
hgs
parents:
diff changeset
    19
 @released
20ac952a623c 201040_02
hgs
parents:
diff changeset
    20
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
    21
20ac952a623c 201040_02
hgs
parents:
diff changeset
    22
#ifndef TARGETSELECTORPLUGININTERFACE_H
20ac952a623c 201040_02
hgs
parents:
diff changeset
    23
#define TARGETSELECTORPLUGININTERFACE_H
20ac952a623c 201040_02
hgs
parents:
diff changeset
    24
20ac952a623c 201040_02
hgs
parents:
diff changeset
    25
#include <e32base.h>
20ac952a623c 201040_02
hgs
parents:
diff changeset
    26
20ac952a623c 201040_02
hgs
parents:
diff changeset
    27
class MRemConTargetSelectorPluginObserver;
20ac952a623c 201040_02
hgs
parents:
diff changeset
    28
class TRemConAddress;
20ac952a623c 201040_02
hgs
parents:
diff changeset
    29
class TClientInfo;
20ac952a623c 201040_02
hgs
parents:
diff changeset
    30
class TBearerSecurity;
20ac952a623c 201040_02
hgs
parents:
diff changeset
    31
class TClientInfoConstIter;
20ac952a623c 201040_02
hgs
parents:
diff changeset
    32
20ac952a623c 201040_02
hgs
parents:
diff changeset
    33
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
    34
The UID of this version of the Target Selector Plugin interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    35
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
    36
const TInt KRemConTargetSelectorInterface1 = 0x10208BCD;
20ac952a623c 201040_02
hgs
parents:
diff changeset
    37
20ac952a623c 201040_02
hgs
parents:
diff changeset
    38
20ac952a623c 201040_02
hgs
parents:
diff changeset
    39
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
    40
Abstract base class for target selector plugins.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    41
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
    42
class MRemConTargetSelectorPluginInterface
20ac952a623c 201040_02
hgs
parents:
diff changeset
    43
	{
20ac952a623c 201040_02
hgs
parents:
diff changeset
    44
public:
20ac952a623c 201040_02
hgs
parents:
diff changeset
    45
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
    46
	Called by RemCon to get the TSP to address an outgoing command (from a 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    47
	connectionless controller client) to zero or more remotes. The implementor 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    48
	should add zero or more items to aConnections and then call 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    49
	OutgoingCommandAddressed on the observer with an appropriate error.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    50
	Note that only one of AddressOutgoingCommand and PermitOutgoingCommand is 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    51
	outstanding at once.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    52
	The implementor is responsible for the capability check. For this reason, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    53
	aSender contains the client's current send message, and aBearerSecurity 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    54
	contains all the bearer security policies. To reiterate, RemCon does no 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    55
	security check on the client's send request either before calling 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    56
	AddressOutgoingCommand.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    57
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    58
	@param aOperationId The operation ID of the command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    59
	@param aSender The TClientInfo of the sending session.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    60
	@param aConnections An empty collection of connections. NB On completion, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    61
	an actual (bearer-level) connection does not need to exist for each item 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    62
	in the collection- RemCon passes responsibility to the bearer(s) for 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    63
	creating the specified connections. On successful completion, RemCon takes 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    64
	ownership of any items in the collection- new TRemConAddresses must be 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    65
	made on the heap.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    66
	@param aBearerSecurity Contains all the bearer security policies.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    67
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
    68
	virtual void AddressOutgoingCommand(
20ac952a623c 201040_02
hgs
parents:
diff changeset
    69
		TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
    70
		TUint aOperationId, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    71
		const TClientInfo& aSender,
20ac952a623c 201040_02
hgs
parents:
diff changeset
    72
		TSglQue<TRemConAddress>& aConnections,
20ac952a623c 201040_02
hgs
parents:
diff changeset
    73
		TSglQue<TBearerSecurity>& aBearerSecurity) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
    74
20ac952a623c 201040_02
hgs
parents:
diff changeset
    75
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
    76
	Called by RemCon to find out from the TSP whether the given 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    77
	connection-oriented controller client is permitted to send the given 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    78
	command to the given remote at this time. The implementor should call 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    79
	PermitOutgoingCommand with either ETrue, if the send is permitted, or 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    80
	EFalse, if the send is not permitted.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    81
	Note that only one of AddressOutgoingCommand and PermitOutgoingCommand is 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    82
	outstanding at once.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    83
	Note that a capability check will have been done by RemCon before 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    84
	PermitOutgoingCommand is called- actually at GoConnectionOriented time. 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    85
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    86
	@param aOperationId The operation ID of the command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    87
	@param aSender The TClientInfo of the sending session.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    88
	@param aConnection The remote the command will be sent over if permission 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    89
	is granted.
20ac952a623c 201040_02
hgs
parents:
diff changeset
    90
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
    91
	virtual void PermitOutgoingCommand(
20ac952a623c 201040_02
hgs
parents:
diff changeset
    92
		TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
    93
		TUint aOperationId, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    94
		const TClientInfo& aSender,
20ac952a623c 201040_02
hgs
parents:
diff changeset
    95
		const TRemConAddress& aConnection) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
    96
20ac952a623c 201040_02
hgs
parents:
diff changeset
    97
	/** 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    98
	Called by RemCon to cancel the current AddressOutgoingCommand or 
20ac952a623c 201040_02
hgs
parents:
diff changeset
    99
	PermitOutgoingCommand command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   100
	On receipt, the TSP must stop dereferencing any data given in the 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   101
	AddressOutgoingCommand or PermitOutgoingCommand request. The TSP should 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   102
	not subsequently call OutgoingCommandAddressed or 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   103
	OutgoingCommandPermitted, except in response to a subsequent new 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   104
	AddressOutgoingCommand or PermitOutgoingCommand command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   105
	If an AddressOutgoingCommand request is currently being processed, the TSP 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   106
	is responsible for deleting any TRemConAddresses it has already created.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   107
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   108
	virtual void CancelOutgoingCommand() = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   109
20ac952a623c 201040_02
hgs
parents:
diff changeset
   110
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   111
	Called by RemCon to get the TSP to address an incoming command (from a 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   112
	remote to zero or more target clients). The implementor should add or 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   113
	remove zero or more items from aClients and then call 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   114
	IncomingCommandAddressed on the observer with a suitable error. 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   115
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   116
	@param aOperationId The operation ID of the command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   117
	@param aClients A collection of existing target clients. The implementor 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   118
	may wish to start further target client(s) and add their process ID(s) to 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   119
	this collection. New TClientInfo items must be made on the stack. Note 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   120
	that when adding a TClientInfo to aClients, only the process ID needs to 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   121
	be correctly populated.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   122
	There is no 'cancel' method for AddressIncomingCommand. RemCon will only 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   123
	want to 'cancel' this when the server is terminating, at which point it 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   124
	will destroy the TSP anyway.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   125
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   126
	virtual void AddressIncomingCommand(
20ac952a623c 201040_02
hgs
parents:
diff changeset
   127
		TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   128
		TUint aOperationId, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   129
		TSglQue<TClientInfo>& aClients) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   130
			
20ac952a623c 201040_02
hgs
parents:
diff changeset
   131
	};
20ac952a623c 201040_02
hgs
parents:
diff changeset
   132
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   133
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   134
The UID of this version of the Target Selector Plugin interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   135
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   136
const TInt KRemConTargetSelectorInterface2 = 0x102858CF;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   137
20ac952a623c 201040_02
hgs
parents:
diff changeset
   138
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   139
Additional functions for TSP Interface V2
20ac952a623c 201040_02
hgs
parents:
diff changeset
   140
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   141
class MRemConTargetSelectorPluginInterfaceV2: public MRemConTargetSelectorPluginInterface
20ac952a623c 201040_02
hgs
parents:
diff changeset
   142
	{
20ac952a623c 201040_02
hgs
parents:
diff changeset
   143
public:
20ac952a623c 201040_02
hgs
parents:
diff changeset
   144
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   145
	Called by RemCon to get the TSP to decide which client should be
20ac952a623c 201040_02
hgs
parents:
diff changeset
   146
	allowed to respond to a command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   147
	This function is called as soon as each client returns a response, so
20ac952a623c 201040_02
hgs
parents:
diff changeset
   148
	the order in which clients are offered to the TSP is not predetermined.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   149
	Since AV/C expects only a single response, the first response allowed by 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   150
	the TSP is the one which will be sent on-air.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   151
	The initial list of clients will be populated from the TSP's response 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   152
	to AddressIncomingCommand().
20ac952a623c 201040_02
hgs
parents:
diff changeset
   153
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   154
	@param aOperationId The operation ID of the command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   155
	@param aClient The client which is trying to send a response
20ac952a623c 201040_02
hgs
parents:
diff changeset
   156
	@param aClients A list of clients which are still expected to respond,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   157
	including the one specified in aClient
20ac952a623c 201040_02
hgs
parents:
diff changeset
   158
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   159
	 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   160
	virtual void PermitOutgoingResponse(
20ac952a623c 201040_02
hgs
parents:
diff changeset
   161
			TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   162
			TUint aOperationId,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   163
			const TClientInfo& aClient,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   164
			TClientInfoConstIter& aClients) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   165
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   166
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   167
	Called by RemCon to get the TSP to address an incoming notify (from a 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   168
	remote to zero or more target clients). The implementor should call 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   169
	IncomingNotifyAddressed on the observer with a pointer to the chosen
20ac952a623c 201040_02
hgs
parents:
diff changeset
   170
	client (or NULL if no client is to be addressed) from the list, and a
20ac952a623c 201040_02
hgs
parents:
diff changeset
   171
	suitable error.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   172
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   173
	@param aOperationId The operation ID of the command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   174
	@param aClients A collection of existing target clients. The implementor 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   175
	may wish to start a target client and call IncomingNotifyAddressed
20ac952a623c 201040_02
hgs
parents:
diff changeset
   176
	with a new TClientInfo. The new TClientInfo item must be made on the stack. 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   177
	Note when creating the new TClientInfo, only the process ID needs to 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   178
	be correctly populated.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   179
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   180
	virtual void AddressIncomingNotify(
20ac952a623c 201040_02
hgs
parents:
diff changeset
   181
		TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   182
		TUint aOperationId, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   183
		TSglQue<TClientInfo>& aClients) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   184
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   185
	/** 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   186
	Called by RemCon to cancel the current PermitOutgoingResponse request.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   187
	On receipt, the TSP must stop dereferencing any data given in the 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   188
	PermitOutgoingResponse request. The TSP should not subsequently call
20ac952a623c 201040_02
hgs
parents:
diff changeset
   189
	OutgoingResponsePermitted, except in response to a subsequent new 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   190
	PermitOutgoingResponse request.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   191
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   192
	virtual void CancelOutgoingResponse() = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   193
	};
20ac952a623c 201040_02
hgs
parents:
diff changeset
   194
20ac952a623c 201040_02
hgs
parents:
diff changeset
   195
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   196
The UID of this version of the Target Selector Plugin interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   197
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   198
const TInt KRemConTargetSelectorInterface3 = 0x102858D3;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   199
20ac952a623c 201040_02
hgs
parents:
diff changeset
   200
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   201
Additional functions for TSP Interface V3
20ac952a623c 201040_02
hgs
parents:
diff changeset
   202
20ac952a623c 201040_02
hgs
parents:
diff changeset
   203
This interface must be implemented if the TSP wishes to support outgoing
20ac952a623c 201040_02
hgs
parents:
diff changeset
   204
Notify commands (local role controller).
20ac952a623c 201040_02
hgs
parents:
diff changeset
   205
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   206
class MRemConTargetSelectorPluginInterfaceV3
20ac952a623c 201040_02
hgs
parents:
diff changeset
   207
	{
20ac952a623c 201040_02
hgs
parents:
diff changeset
   208
public:
20ac952a623c 201040_02
hgs
parents:
diff changeset
   209
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   210
	Called by RemCon to get the TSP to address an outgoing notify command (from a 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   211
	connectionless controller client) to zero or one remote. The implementor 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   212
	need to get the connection list from which to chose the only one target device and then call 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   213
	OutgoingNotifyCommandAddressed on the observer with an appropriate error.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   214
	Note that only one of AddressOutgoingNotifyCommand and PermitOutgoingNotifyCommand is 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   215
	outstanding at once.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   216
	The implementor is responsible for the capability check. For this reason, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   217
	aSender contains the client's current send message, and aBearerSecurity 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   218
	contains all the bearer security policies. To reiterate, RemCon does no 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   219
	security check on the client's send request either before calling 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   220
	AddressOutgoingNotify.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   221
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   222
	@param aOperationId The operation ID of the command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   223
	@param aSender The TClientInfo of the sending session.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   224
	@param aBearerSecurity Contains all the bearer security policies.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   225
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   226
	virtual void AddressOutgoingNotify(
20ac952a623c 201040_02
hgs
parents:
diff changeset
   227
			TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   228
			TUint aOperationId, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   229
			const TClientInfo& aSender,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   230
			TSglQue<TBearerSecurity>& aBearerSecurity) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   231
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   232
	/** 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   233
	Called by RemCon to cancel the current AddressOutgoingNotify or 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   234
	PermitOutgoingNotifyCommand command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   235
	On receipt, the TSP must stop dereferencing any data given in the 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   236
	AddressOutgoingNotify or PermitOutgoingNotifyCommand request. The TSP should 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   237
	not subsequently call OutgoingNotifyCommandAddressed or 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   238
	OutgoingNotifyCommandPermitted, except in response to a subsequent new 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   239
	AddressOutgoingNotify or PermitOutgoingNotifyCommand command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   240
	If an AddressOutgoingNotify request is currently being processed, the TSP 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   241
	is responsible for deleting any TRemConAddresses it has already created.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   242
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   243
	virtual void CancelOutgoingNotifyCommand() = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   244
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   245
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   246
	Called by RemCon to find out from the TSP whether the given 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   247
	connection-oriented controller client is permitted to send the given notify
20ac952a623c 201040_02
hgs
parents:
diff changeset
   248
	command to the given remote at this time. The implementor should call 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   249
	PermitOutgoingNotifyCommand with either ETrue, if the send is permitted, or 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   250
	EFalse, if the send is not permitted.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   251
	Note that only one of AddressOutgoingNotify and PermitOutgoingNotifyCommand is 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   252
	outstanding at once.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   253
	Note that a capability check will have been done by RemCon before 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   254
	PermitOutgoingNotifyCommand is called- actually at GoConnectionOriented time. 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   255
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   256
	@param aOperationId The operation ID of the command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   257
	@param aSender The TClientInfo of the sending session.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   258
	@param aConnection The remote the command will be sent over if permission 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   259
	is granted.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   260
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   261
	virtual void PermitOutgoingNotifyCommand(
20ac952a623c 201040_02
hgs
parents:
diff changeset
   262
			TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   263
			TUint aOperationId, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   264
			const TClientInfo& aSender,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   265
			const TRemConAddress& aConnection) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   266
	};
20ac952a623c 201040_02
hgs
parents:
diff changeset
   267
20ac952a623c 201040_02
hgs
parents:
diff changeset
   268
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   269
The UID of this version of the Target Selector Plugin interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   270
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   271
const TInt KRemConTargetSelectorInterface4 = 0x10286A7;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   272
20ac952a623c 201040_02
hgs
parents:
diff changeset
   273
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   274
Additional functions for TSP Interface V4
20ac952a623c 201040_02
hgs
parents:
diff changeset
   275
20ac952a623c 201040_02
hgs
parents:
diff changeset
   276
This interface must be implemented if the TSP wishes to support addressing
20ac952a623c 201040_02
hgs
parents:
diff changeset
   277
by the bearer.  Bearer addressing will always be used if supported by the
20ac952a623c 201040_02
hgs
parents:
diff changeset
   278
bearer.  When bearer addressing is used the TSP will not be given any
20ac952a623c 201040_02
hgs
parents:
diff changeset
   279
option over which client receives a command, however if it implements this
20ac952a623c 201040_02
hgs
parents:
diff changeset
   280
interface it has visibility of where each command goes and can reject the 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   281
command if it is not acceptable.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   282
20ac952a623c 201040_02
hgs
parents:
diff changeset
   283
If this interface is not implemented default implementations of these functions 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   284
will be used which will allow the command to be addressed to the bearer's 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   285
selected client.  This means that if the TSP does not implement this interface
20ac952a623c 201040_02
hgs
parents:
diff changeset
   286
it will not see any commands which have been addressed by the bearer.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   287
20ac952a623c 201040_02
hgs
parents:
diff changeset
   288
Regardless of whether this interface is implemented commands which are not 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   289
addressed by the bearer will continue to be addressed by the TSP via earlier 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   290
versions of MRemConTargetSelectorPluginInterface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   291
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   292
class MRemConTargetSelectorPluginInterfaceV4
20ac952a623c 201040_02
hgs
parents:
diff changeset
   293
	{
20ac952a623c 201040_02
hgs
parents:
diff changeset
   294
public:
20ac952a623c 201040_02
hgs
parents:
diff changeset
   295
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   296
	Called by RemCon to get the TSP to permit an incoming command. This is called
20ac952a623c 201040_02
hgs
parents:
diff changeset
   297
	if the bearer has provided a target client for the command.  
20ac952a623c 201040_02
hgs
parents:
diff changeset
   298
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   299
	The implementor should decide if they wish to allow this command and then call
20ac952a623c 201040_02
hgs
parents:
diff changeset
   300
	IncomingCommandPermitted on the observer with a suitable error. 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   301
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   302
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   303
	@param aOperationId The operation ID of the command.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   304
	@param aClient a TClientInfo referring to the selected client
20ac952a623c 201040_02
hgs
parents:
diff changeset
   305
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   306
	virtual void PermitIncomingCommand(
20ac952a623c 201040_02
hgs
parents:
diff changeset
   307
		TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   308
		TUint aOperationId, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   309
		const TClientInfo& aClient) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   310
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   311
	/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   312
	Called by RemCon to get the TSP to permit an incoming Notify. This is called
20ac952a623c 201040_02
hgs
parents:
diff changeset
   313
	if the bearer has provided a target client for the Notify.  
20ac952a623c 201040_02
hgs
parents:
diff changeset
   314
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   315
	The implementor should decide if they wish to allow this Notify and then call
20ac952a623c 201040_02
hgs
parents:
diff changeset
   316
	IncomingNotifyPermitted on the observer with a suitable error. 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   317
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   318
	@param aInterfaceUid The UID of the client interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   319
	@param aOperationId The operation ID of the Notify.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   320
	@param aClient a TClientInfo referring to the selected client
20ac952a623c 201040_02
hgs
parents:
diff changeset
   321
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   322
	virtual void PermitIncomingNotify(
20ac952a623c 201040_02
hgs
parents:
diff changeset
   323
		TUid aInterfaceUid,
20ac952a623c 201040_02
hgs
parents:
diff changeset
   324
		TUint aOperationId, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   325
		const TClientInfo& aClient) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   326
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   327
	/** 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   328
	Called by RemCon when a bearer that can address commands wishes to
20ac952a623c 201040_02
hgs
parents:
diff changeset
   329
	inform the system that there has been a remote user action to 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   330
	select a different addressed client.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   331
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   332
	The bearer will then route addressed commands to this client until
20ac952a623c 201040_02
hgs
parents:
diff changeset
   333
	such time as SetRemoteAddressedClient is called again or the TSP
20ac952a623c 201040_02
hgs
parents:
diff changeset
   334
	calls SetLocalAddressedClient.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   335
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   336
	@param aBearerUid The bearer that has changed its addressed client
20ac952a623c 201040_02
hgs
parents:
diff changeset
   337
	@param aClient The RemCon client that is now selected by the bearer
20ac952a623c 201040_02
hgs
parents:
diff changeset
   338
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   339
	virtual void SetRemoteAddressedClient(const TUid& aBearerUid, 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   340
			const TClientInfo& aClient) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   341
	};
20ac952a623c 201040_02
hgs
parents:
diff changeset
   342
20ac952a623c 201040_02
hgs
parents:
diff changeset
   343
/**
20ac952a623c 201040_02
hgs
parents:
diff changeset
   344
The UID of this version of the Target Selector Plugin interface.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   345
*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   346
const TInt KRemConTargetSelectorInterface5 = 0x2002e6e1;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   347
20ac952a623c 201040_02
hgs
parents:
diff changeset
   348
class MRemConTargetSelectorPluginInterfaceV5
20ac952a623c 201040_02
hgs
parents:
diff changeset
   349
	{
20ac952a623c 201040_02
hgs
parents:
diff changeset
   350
public:
20ac952a623c 201040_02
hgs
parents:
diff changeset
   351
	/** Called by RemCon when a new target client has connected.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   352
	 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   353
	 @aClientInfo The information about the new client.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   354
	 */
20ac952a623c 201040_02
hgs
parents:
diff changeset
   355
	virtual void TargetClientAvailable(const TClientInfo& aClientInfo) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   356
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   357
	/** Called by RemCon when a target client has disconnected. 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   358
	 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   359
	 @aClientInfo The information about the client that has disconnected.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   360
	 */
20ac952a623c 201040_02
hgs
parents:
diff changeset
   361
	virtual void TargetClientUnavailable(const TClientInfo& aClientInfo) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   362
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   363
	/** Called by RemCon when a bearer wishes to begin being informed when
20ac952a623c 201040_02
hgs
parents:
diff changeset
   364
	the locally addressed player changes.  Once this function has been called
20ac952a623c 201040_02
hgs
parents:
diff changeset
   365
	the TSP should inform RemCon via SetLocalAddressedPlayer each time the
20ac952a623c 201040_02
hgs
parents:
diff changeset
   366
	player to which incoming commands from aBearer would be routed changes.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   367
	This might occur for example if a new application is launched, or if the
20ac952a623c 201040_02
hgs
parents:
diff changeset
   368
	foreground application changes, depending on what the TSP's rules are
20ac952a623c 201040_02
hgs
parents:
diff changeset
   369
	for deciding the target of the incoming message.  These updates should
20ac952a623c 201040_02
hgs
parents:
diff changeset
   370
	occur until UnregisterLocalAddressedClientObserver is called.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   371
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   372
	@param aBearerUid The bearer that wishes to be informed of updates
20ac952a623c 201040_02
hgs
parents:
diff changeset
   373
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   374
	virtual TInt RegisterLocalAddressedClientObserver(const TUid& aBearerUid) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   375
20ac952a623c 201040_02
hgs
parents:
diff changeset
   376
	/** Called by RemCon when a bearer wishes to stop being informed of 
20ac952a623c 201040_02
hgs
parents:
diff changeset
   377
	changes to the local addresse client.
20ac952a623c 201040_02
hgs
parents:
diff changeset
   378
	
20ac952a623c 201040_02
hgs
parents:
diff changeset
   379
	@param aBearerUid The bearer that no longer wishes to be informed of updates
20ac952a623c 201040_02
hgs
parents:
diff changeset
   380
	*/
20ac952a623c 201040_02
hgs
parents:
diff changeset
   381
	virtual TInt UnregisterLocalAddressedClientObserver(const TUid& aBearerUid) = 0;
20ac952a623c 201040_02
hgs
parents:
diff changeset
   382
	};
20ac952a623c 201040_02
hgs
parents:
diff changeset
   383
20ac952a623c 201040_02
hgs
parents:
diff changeset
   384
20ac952a623c 201040_02
hgs
parents:
diff changeset
   385
#endif // TARGETSELECTORPLUGININTERFACE_H