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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #ifndef REMCONGROUPNAVIGATIONTARGET_H
23 #define REMCONGROUPNAVIGATIONTARGET_H
27 #include <remconcoreapi.h>
28 #include <remcon/avrcpspec.h>
30 #include <remcon/remconinterfacebase.h>
31 #include <remcon/remconinterfaceif.h>
33 class MRemConGroupNavigationTargetObserver;
34 class CRemConInterfaceSelector;
37 Client-instantiable type supporting sending Battery Status responses.
39 NONSHARABLE_CLASS(CRemConGroupNavigationApiTarget) : public CRemConInterfaceBase,
40 public MRemConInterfaceIf
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.
51 IMPORT_C static CRemConGroupNavigationApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
52 MRemConGroupNavigationTargetObserver& aObserver);
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.
63 IMPORT_C static CRemConGroupNavigationApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
64 MRemConGroupNavigationTargetObserver& aObserver, TBool aNextGroupSupported, TBool aPreviousGroupSupported);
67 IMPORT_C ~CRemConGroupNavigationApiTarget();
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.
76 IMPORT_C void NextGroupResponse(TRequestStatus*& aStatus, TInt aError);
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.
84 IMPORT_C void PreviousGroupResponse(TRequestStatus*& aStatus, TInt aError);
89 @param aInterfaceSelector The interface selector.
90 @param aObserver The observer of this interface.
92 CRemConGroupNavigationApiTarget(CRemConInterfaceSelector& aInterfaceSelector,
93 MRemConGroupNavigationTargetObserver& aObserver);
95 void SendGroupResponse(TGroupNavigationPassthroughOperationIds aId, TRequestStatus*& aStatus, TInt aError);
99 void ConstructL(TBool aNextGroupSupported, TBool aPreviousGroupSupported);
100 private: // from CRemConInterfaceBase
101 TAny* GetInterfaceIf(TUid aUid);
103 private: // from MRemConInterfaceIf
104 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
107 MRemConGroupNavigationTargetObserver& iObserver;
112 RBufWriteStream iStream;
116 #endif // REMCONGROUPNAVIGATIONTARGET_H