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