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