| 
williamr@2
 | 
     1  | 
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
  | 
| 
williamr@2
 | 
     2  | 
// All rights reserved.
  | 
| 
williamr@2
 | 
     3  | 
// This component and the accompanying materials are made available
  | 
| 
williamr@2
 | 
     4  | 
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
  | 
| 
williamr@2
 | 
     5  | 
// which accompanies this distribution, and is available
  | 
| 
williamr@2
 | 
     6  | 
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
  | 
| 
williamr@2
 | 
     7  | 
//
  | 
| 
williamr@2
 | 
     8  | 
// Initial Contributors:
  | 
| 
williamr@2
 | 
     9  | 
// Nokia Corporation - initial contribution.
  | 
| 
williamr@2
 | 
    10  | 
//
  | 
| 
williamr@2
 | 
    11  | 
// Contributors:
  | 
| 
williamr@2
 | 
    12  | 
//
  | 
| 
williamr@2
 | 
    13  | 
// Description:
  | 
| 
williamr@2
 | 
    14  | 
//
  | 
| 
williamr@2
 | 
    15  | 
  | 
| 
williamr@2
 | 
    16  | 
  | 
| 
williamr@2
 | 
    17  | 
  | 
| 
williamr@2
 | 
    18  | 
/**
  | 
| 
williamr@2
 | 
    19  | 
 @file
  | 
| 
williamr@2
 | 
    20  | 
 @publishedAll
  | 
| 
williamr@2
 | 
    21  | 
 @released
  | 
| 
williamr@2
 | 
    22  | 
*/
  | 
| 
williamr@2
 | 
    23  | 
  | 
| 
williamr@2
 | 
    24  | 
#ifndef REMCONGROUPNAVIGATIONTARGET_H
  | 
| 
williamr@2
 | 
    25  | 
#define REMCONGROUPNAVIGATIONTARGET_H
  | 
| 
williamr@2
 | 
    26  | 
  | 
| 
williamr@2
 | 
    27  | 
#include <e32base.h>
  | 
| 
williamr@2
 | 
    28  | 
#include <s32mem.h>
  | 
| 
williamr@2
 | 
    29  | 
#include <remconcoreapi.h>
  | 
| 
williamr@2
 | 
    30  | 
#include <remcon/avrcpspec.h>
  | 
| 
williamr@2
 | 
    31  | 
  | 
| 
williamr@2
 | 
    32  | 
#include <remcon/remcongroupnavigation.h>
  | 
| 
williamr@2
 | 
    33  | 
#include <remcon/remconinterfacebase.h>
  | 
| 
williamr@2
 | 
    34  | 
#include <remcon/remconinterfaceif.h>
  | 
| 
williamr@2
 | 
    35  | 
  | 
| 
williamr@2
 | 
    36  | 
class MRemConGroupNavigationTargetObserver;
  | 
| 
williamr@2
 | 
    37  | 
class CRemConInterfaceSelector;
  | 
| 
williamr@2
 | 
    38  | 
  | 
| 
williamr@2
 | 
    39  | 
/**
  | 
| 
williamr@2
 | 
    40  | 
Client-instantiable type supporting sending Battery Status responses.
  | 
| 
williamr@2
 | 
    41  | 
*/
  | 
| 
williamr@2
 | 
    42  | 
NONSHARABLE_CLASS(CRemConGroupNavigationApiTarget) : public CRemConInterfaceBase, 
  | 
| 
williamr@2
 | 
    43  | 
								          		public MRemConInterfaceIf
  | 
| 
williamr@2
 | 
    44  | 
	{
 | 
| 
williamr@2
 | 
    45  | 
public:
  | 
| 
williamr@2
 | 
    46  | 
	/**
  | 
| 
williamr@2
 | 
    47  | 
	Factory function.
  | 
| 
williamr@2
 | 
    48  | 
	@see CRemConInterfaceSelector
  | 
| 
williamr@2
 | 
    49  | 
	@param aInterfaceSelector The interface selector. The client must have 
  | 
| 
williamr@2
 | 
    50  | 
	created one of these first.
  | 
| 
williamr@2
 | 
    51  | 
	@param aObserver The observer of this interface.
  | 
| 
williamr@2
 | 
    52  | 
	@return A new CRemConGroupNavigationApiTarget, owned by the interface selector.
  | 
| 
williamr@2
 | 
    53  | 
	*/
  | 
| 
williamr@2
 | 
    54  | 
	IMPORT_C static CRemConGroupNavigationApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, 
  | 
| 
williamr@2
 | 
    55  | 
		MRemConGroupNavigationTargetObserver& aObserver);
  | 
| 
williamr@2
 | 
    56  | 
	
  | 
| 
williamr@2
 | 
    57  | 
	/** Destructor */
  | 
| 
williamr@2
 | 
    58  | 
	IMPORT_C ~CRemConGroupNavigationApiTarget();
  | 
| 
williamr@2
 | 
    59  | 
  | 
| 
williamr@2
 | 
    60  | 
public:
  | 
| 
williamr@2
 | 
    61  | 
	/** Send a 'next group' response.
  | 
| 
williamr@2
 | 
    62  | 
	Called by the client after receiving a MRemConGroupNavigationTargetObserver::MrcgntoNextGroup().
  | 
| 
williamr@2
 | 
    63  | 
	@param aStatus Used by RemCon to indicate completion of the send request.
  | 
| 
williamr@2
 | 
    64  | 
	aStatus may be NULL if no completion indication required.
  | 
| 
williamr@2
 | 
    65  | 
	@param aError The response error.
  | 
| 
williamr@2
 | 
    66  | 
	*/
  | 
| 
williamr@2
 | 
    67  | 
	IMPORT_C void NextGroupResponse(TRequestStatus*& aStatus, TInt aError);
  | 
| 
williamr@2
 | 
    68  | 
  | 
| 
williamr@2
 | 
    69  | 
	/** Send a 'previous group' response.
  | 
| 
williamr@2
 | 
    70  | 
	Called by the client after receiving a MRemConGroupNavigationTargetObserver::MrcgntoPreviousGroup().
  | 
| 
williamr@2
 | 
    71  | 
	@param aStatus Used by RemCon to indicate completion of the send request.
  | 
| 
williamr@2
 | 
    72  | 
	aStatus may be NULL if no completion indication required.
  | 
| 
williamr@2
 | 
    73  | 
	@param aError The response error.
  | 
| 
williamr@2
 | 
    74  | 
	*/
  | 
| 
williamr@2
 | 
    75  | 
	IMPORT_C void PreviousGroupResponse(TRequestStatus*& aStatus, TInt aError);
  | 
| 
williamr@2
 | 
    76  | 
  | 
| 
williamr@2
 | 
    77  | 
private:
  | 
| 
williamr@2
 | 
    78  | 
	/** 
  | 
| 
williamr@2
 | 
    79  | 
	Constructor.
  | 
| 
williamr@2
 | 
    80  | 
	@param aInterfaceSelector The interface selector.
  | 
| 
williamr@2
 | 
    81  | 
	@param aObserver The observer of this interface.
  | 
| 
williamr@2
 | 
    82  | 
	*/
  | 
| 
williamr@2
 | 
    83  | 
	CRemConGroupNavigationApiTarget(CRemConInterfaceSelector& aInterfaceSelector, 
  | 
| 
williamr@2
 | 
    84  | 
		MRemConGroupNavigationTargetObserver& aObserver);
  | 
| 
williamr@2
 | 
    85  | 
  | 
| 
williamr@2
 | 
    86  | 
	void SendGroupResponse(TGroupNavigationPassthroughOperationIds aId, TRequestStatus*& aStatus, TInt aError);
  | 
| 
williamr@2
 | 
    87  | 
  | 
| 
williamr@2
 | 
    88  | 
	void ConstructL();
  | 
| 
williamr@2
 | 
    89  | 
  | 
| 
williamr@2
 | 
    90  | 
private: // from CRemConInterfaceBase
  | 
| 
williamr@2
 | 
    91  | 
	TAny* GetInterfaceIf(TUid aUid);
  | 
| 
williamr@2
 | 
    92  | 
  | 
| 
williamr@2
 | 
    93  | 
private: // from MRemConInterfaceIf
  | 
| 
williamr@2
 | 
    94  | 
	void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
  | 
| 
williamr@2
 | 
    95  | 
  | 
| 
williamr@2
 | 
    96  | 
private: // unowned
  | 
| 
williamr@2
 | 
    97  | 
	MRemConGroupNavigationTargetObserver& iObserver;
  | 
| 
williamr@2
 | 
    98  | 
  | 
| 
williamr@2
 | 
    99  | 
private: // owned
  | 
| 
williamr@2
 | 
   100  | 
	CBufFlat*		iOutData;
  | 
| 
williamr@2
 | 
   101  | 
	TPtr8			iPtr;
  | 
| 
williamr@2
 | 
   102  | 
	RBufWriteStream iStream;
  | 
| 
williamr@2
 | 
   103  | 
			
  | 
| 
williamr@2
 | 
   104  | 
	};
  | 
| 
williamr@2
 | 
   105  | 
  | 
| 
williamr@2
 | 
   106  | 
#endif // REMCONGROUPNAVIGATIONTARGET_H
  |