accessoryservices/remotecontrolfw/client/common/remconclient.h
changeset 70 653a8b91b95e
parent 0 4e1aa6a622a0
equal deleted inserted replaced
64:61992147389a 70:653a8b91b95e
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2010 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 "Eclipse Public 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.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    32 class TRemConAddress;
    32 class TRemConAddress;
    33 
    33 
    34 /**
    34 /**
    35 The abstract base class for RemCon session handles.
    35 The abstract base class for RemCon session handles.
    36 */
    36 */
    37 class RRemCon : public RSessionBase
    37 NONSHARABLE_CLASS(RRemCon) : public RSessionBase
    38 	{
    38 	{
    39 public:
    39 public:
    40 	/**
    40 	/**
    41 	Connect the handle to the server.
    41 	Connect the handle to the server.
    42 	Must be called before all other methods (except Version and Close).
    42 	Must be called before all other methods (except Version and Close).
    45 	IMPORT_C TInt Connect();
    45 	IMPORT_C TInt Connect();
    46 
    46 
    47 	/**
    47 	/**
    48 	Connect the handle to the server.
    48 	Connect the handle to the server.
    49 	Must be called before all other methods (except Version and Close).
    49 	Must be called before all other methods (except Version and Close).
    50 	@param aClientType  The type of client player
    50 	@param aPlayerType  The type of client player
    51 	@param aClientSubType The sub-type of the client player
    51 	@param aPlayerSubType The sub-type of the client player
    52 	@param aName The name of client player
    52 	@param aName The name of client player
    53 	@return Error.
    53 	@return Error.
    54 	*/
    54 	*/
    55 	IMPORT_C TInt Connect(const TPlayerType& aClientType, const TPlayerSubType& aClientSubType, const TDesC8& aName);
    55 	IMPORT_C TInt Connect(const TPlayerType& aPlayerType, const TPlayerSubType& aPlayerSubType, const TDesC8& aName);
    56 	/**
    56 	/**
    57 	Getter for the version of the server.
    57 	Getter for the version of the server.
    58 	@return Version of the server.
    58 	@return Version of the server.
    59 	*/
    59 	*/
    60 	IMPORT_C TVersion Version() const;
    60 	virtual TVersion Version() const = 0;
    61 
    61 
    62 	/**
    62 	/**
    63 	Sends a message (command or response) to the remote device.
    63 	Sends a message (command or response) to the remote device.
    64 	@param aStatus TRequestStatus for asynchronous completion.
    64 	@param aStatus TRequestStatus for asynchronous completion.
    65 	@param aInterfaceUid The UID of the interface to which the message 
    65 	@param aInterfaceUid The UID of the interface to which the message 
   201 	*/
   201 	*/
   202 	RRemCon(TRemConClientType aType);
   202 	RRemCon(TRemConClientType aType);
   203 
   203 
   204 private: // utility
   204 private: // utility
   205 	TInt DoConnect();
   205 	TInt DoConnect();
   206 	TInt SetClientType();
   206 	TInt SetPlayerType(const TPlayerType& aPlayerType, const TPlayerSubType& aPlayerSubType, const TDesC8& aName);
   207 	TInt SetClientType(const TPlayerType& aClientType, const TPlayerSubType& aClientSubType, const TDesC8& aName);
       
   208 
   207 
   209 private: // owned
   208 private: // owned
   210 	const TRemConClientType iClientType;
   209 	const TRemConClientType iClientType;
   211 
   210 
   212 	/** 
   211 	/** 
   249 ConnectBearerCancel and DisconnectBearerCancel merely cancel interest in the 
   248 ConnectBearerCancel and DisconnectBearerCancel merely cancel interest in the 
   250 corresponding request. They do not change the state of the system, bearers, 
   249 corresponding request. They do not change the state of the system, bearers, 
   251 connections, or member data in any other way. They operate as pure Symbian OS 
   250 connections, or member data in any other way. They operate as pure Symbian OS 
   252 asynchronous cancel methods.
   251 asynchronous cancel methods.
   253 */
   252 */
   254 class RRemConController : public RRemCon
   253 NONSHARABLE_CLASS(RRemConController) : public RRemCon
   255 	{
   254 	{
   256 public:
   255 public:
   257 	IMPORT_C RRemConController();
   256 	IMPORT_C RRemConController();
   258 
   257 
   259 	/**
   258 	/**
   297 	Cancels interest in the completion of an outstanding DisconnectBearer 
   296 	Cancels interest in the completion of an outstanding DisconnectBearer 
   298 	request. Does not affect the state of the bearer-level connection.
   297 	request. Does not affect the state of the bearer-level connection.
   299 	@return KErrNone.
   298 	@return KErrNone.
   300 	*/
   299 	*/
   301 	IMPORT_C TInt DisconnectBearerCancel();
   300 	IMPORT_C TInt DisconnectBearerCancel();
       
   301 
       
   302 	/** Returns the version of the RemCon server interface this session supports.
       
   303 	@return Supported version
       
   304 	*/
       
   305 	TVersion Version() const;
   302 	};
   306 	};
   303 
   307 
   304 /**
   308 /**
   305 The concrete session class for RemCon targets.
   309 The concrete session class for RemCon targets.
   306 */
   310 */
   307 class RRemConTarget : public RRemCon
   311 NONSHARABLE_CLASS(RRemConTarget) : public RRemCon
   308 	{
   312 	{
   309 public:
   313 public:
   310 	IMPORT_C RRemConTarget();
   314 	IMPORT_C RRemConTarget();
       
   315 	
       
   316 	/** Returns the version of the RemCon server interface this session supports.
       
   317 	@return Supported version
       
   318 	*/
       
   319 	TVersion Version() const;
   311 	};
   320 	};
   312 
   321 
   313 #endif // REMCONCLIENT_H
   322 #endif // REMCONCLIENT_H