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@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.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 |
@file
|
williamr@2
|
18 |
@publishedAll
|
williamr@2
|
19 |
@released
|
williamr@2
|
20 |
*/
|
williamr@2
|
21 |
|
williamr@2
|
22 |
#ifndef REMCONGROUPNAVIGATIONTARGET_H
|
williamr@2
|
23 |
#define REMCONGROUPNAVIGATIONTARGET_H
|
williamr@2
|
24 |
|
williamr@2
|
25 |
#include <e32base.h>
|
williamr@2
|
26 |
#include <s32mem.h>
|
williamr@2
|
27 |
#include <remconcoreapi.h>
|
williamr@2
|
28 |
#include <remcon/avrcpspec.h>
|
williamr@2
|
29 |
|
williamr@2
|
30 |
#include <remcon/remconinterfacebase.h>
|
williamr@2
|
31 |
#include <remcon/remconinterfaceif.h>
|
williamr@2
|
32 |
|
williamr@2
|
33 |
class MRemConGroupNavigationTargetObserver;
|
williamr@2
|
34 |
class CRemConInterfaceSelector;
|
williamr@2
|
35 |
|
williamr@2
|
36 |
/**
|
williamr@2
|
37 |
Client-instantiable type supporting sending Battery Status responses.
|
williamr@2
|
38 |
*/
|
williamr@2
|
39 |
NONSHARABLE_CLASS(CRemConGroupNavigationApiTarget) : public CRemConInterfaceBase,
|
williamr@2
|
40 |
public MRemConInterfaceIf
|
williamr@2
|
41 |
{
|
williamr@2
|
42 |
public:
|
williamr@2
|
43 |
/**
|
williamr@2
|
44 |
Factory function.
|
williamr@2
|
45 |
@see CRemConInterfaceSelector
|
williamr@2
|
46 |
@param aInterfaceSelector The interface selector. The client must have
|
williamr@2
|
47 |
created one of these first.
|
williamr@2
|
48 |
@param aObserver The observer of this interface.
|
williamr@2
|
49 |
@return A new CRemConGroupNavigationApiTarget, owned by the interface selector.
|
williamr@2
|
50 |
*/
|
williamr@2
|
51 |
IMPORT_C static CRemConGroupNavigationApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
|
williamr@2
|
52 |
MRemConGroupNavigationTargetObserver& aObserver);
|
williamr@4
|
53 |
/**
|
williamr@4
|
54 |
Factory function.
|
williamr@4
|
55 |
@see CRemConInterfaceSelector
|
williamr@4
|
56 |
@param aInterfaceSelector The interface selector. The client must have
|
williamr@4
|
57 |
created one of these first.
|
williamr@4
|
58 |
@param aObserver The observer of this interface.
|
williamr@4
|
59 |
@param aNextGroupSupported Whether the Client support the next Group functionality.
|
williamr@4
|
60 |
@param aPreviousGroupSupported Whether the Client support the previous Group functionality.
|
williamr@4
|
61 |
@return A new CRemConGroupNavigationApiTarget, owned by the interface selector.
|
williamr@4
|
62 |
*/
|
williamr@4
|
63 |
IMPORT_C static CRemConGroupNavigationApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
|
williamr@4
|
64 |
MRemConGroupNavigationTargetObserver& aObserver, TBool aNextGroupSupported, TBool aPreviousGroupSupported);
|
williamr@2
|
65 |
|
williamr@2
|
66 |
/** Destructor */
|
williamr@2
|
67 |
IMPORT_C ~CRemConGroupNavigationApiTarget();
|
williamr@2
|
68 |
|
williamr@2
|
69 |
public:
|
williamr@2
|
70 |
/** Send a 'next group' response.
|
williamr@2
|
71 |
Called by the client after receiving a MRemConGroupNavigationTargetObserver::MrcgntoNextGroup().
|
williamr@2
|
72 |
@param aStatus Used by RemCon to indicate completion of the send request.
|
williamr@2
|
73 |
aStatus may be NULL if no completion indication required.
|
williamr@2
|
74 |
@param aError The response error.
|
williamr@2
|
75 |
*/
|
williamr@2
|
76 |
IMPORT_C void NextGroupResponse(TRequestStatus*& aStatus, TInt aError);
|
williamr@2
|
77 |
|
williamr@2
|
78 |
/** Send a 'previous group' response.
|
williamr@2
|
79 |
Called by the client after receiving a MRemConGroupNavigationTargetObserver::MrcgntoPreviousGroup().
|
williamr@2
|
80 |
@param aStatus Used by RemCon to indicate completion of the send request.
|
williamr@2
|
81 |
aStatus may be NULL if no completion indication required.
|
williamr@2
|
82 |
@param aError The response error.
|
williamr@2
|
83 |
*/
|
williamr@2
|
84 |
IMPORT_C void PreviousGroupResponse(TRequestStatus*& aStatus, TInt aError);
|
williamr@2
|
85 |
|
williamr@2
|
86 |
private:
|
williamr@2
|
87 |
/**
|
williamr@2
|
88 |
Constructor.
|
williamr@2
|
89 |
@param aInterfaceSelector The interface selector.
|
williamr@2
|
90 |
@param aObserver The observer of this interface.
|
williamr@2
|
91 |
*/
|
williamr@2
|
92 |
CRemConGroupNavigationApiTarget(CRemConInterfaceSelector& aInterfaceSelector,
|
williamr@2
|
93 |
MRemConGroupNavigationTargetObserver& aObserver);
|
williamr@2
|
94 |
|
williamr@2
|
95 |
void SendGroupResponse(TGroupNavigationPassthroughOperationIds aId, TRequestStatus*& aStatus, TInt aError);
|
williamr@2
|
96 |
|
williamr@2
|
97 |
void ConstructL();
|
williamr@2
|
98 |
|
williamr@4
|
99 |
void ConstructL(TBool aNextGroupSupported, TBool aPreviousGroupSupported);
|
williamr@2
|
100 |
private: // from CRemConInterfaceBase
|
williamr@2
|
101 |
TAny* GetInterfaceIf(TUid aUid);
|
williamr@2
|
102 |
|
williamr@2
|
103 |
private: // from MRemConInterfaceIf
|
williamr@2
|
104 |
void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
|
williamr@2
|
105 |
|
williamr@2
|
106 |
private: // unowned
|
williamr@2
|
107 |
MRemConGroupNavigationTargetObserver& iObserver;
|
williamr@2
|
108 |
|
williamr@2
|
109 |
private: // owned
|
williamr@2
|
110 |
CBufFlat* iOutData;
|
williamr@2
|
111 |
TPtr8 iPtr;
|
williamr@2
|
112 |
RBufWriteStream iStream;
|
williamr@4
|
113 |
TUint iNumRemotes;
|
williamr@2
|
114 |
};
|
williamr@2
|
115 |
|
williamr@2
|
116 |
#endif // REMCONGROUPNAVIGATIONTARGET_H
|