|
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 // avrcpbrowsingincomingcommandhandler.h |
|
15 // |
|
16 |
|
17 #ifndef AVRCPBROWSINGINCOMINGCOMMANDHANDLER_H |
|
18 #define AVRCPBROWSINGINCOMINGCOMMANDHANDLER_H |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalComponent |
|
23 @released |
|
24 */ |
|
25 |
|
26 #include <avctpservices.h> |
|
27 #include <e32base.h> |
|
28 #include "avrcpplayerinfomanager.h" |
|
29 #include "commandhandlerinterface.h" |
|
30 #include "remconcommandinterface.h" |
|
31 |
|
32 class CBulkRouter; |
|
33 class CAvrcpBulkBearer; |
|
34 class TBTDevAddr; |
|
35 class CBrowseCommand; |
|
36 NONSHARABLE_CLASS(CRcpBrowsingCommandHandler) : public CBase, public MIncomingCommandHandler |
|
37 { |
|
38 public: |
|
39 static CRcpBrowsingCommandHandler* NewL(MRemConBulkCommandInterface& aCommandInterface, |
|
40 CBulkRouter& aRouter, |
|
41 CAvrcpPlayerInfoManager& aPlayerInfoManager, |
|
42 const TBTDevAddr& aAddr); |
|
43 ~CRcpBrowsingCommandHandler(); |
|
44 |
|
45 void Disconnect(); |
|
46 const TBTDevAddr& BtAddr() const; |
|
47 |
|
48 private: // from MIncomingCommandHandler |
|
49 void MessageSent(CAvrcpCommand& aCommand, TInt aSendResult); |
|
50 void MaxPacketSize(TInt aMtu); |
|
51 void ReceiveCommandL(const TDesC8& aMessageInformation, SymbianAvctp::TTransactionLabel aTransLabel, const TBTDevAddr& aAddr); |
|
52 |
|
53 TInt SendRemConResponse(TUid aInterfaceUid, TUint aId, RBuf8& aData); |
|
54 void SendReject(TUid aInterfaceUid, TUint aTransactionId); |
|
55 |
|
56 private: |
|
57 CRcpBrowsingCommandHandler(MRemConBulkCommandInterface& aCommandInterface, |
|
58 CBulkRouter& aRouter, |
|
59 CAvrcpPlayerInfoManager& aPlayerInfoManager, |
|
60 const TBTDevAddr& aAddr); |
|
61 |
|
62 void Respond(CBrowseCommand& aCommand, TInt aErr); |
|
63 void HandledCommand(CBrowseCommand& aCommand); |
|
64 |
|
65 void HandleInternalCommand(CBrowseCommand& aCommand); |
|
66 TInt HandleGetFolderItems(TUint aId, RBuf8& aCommandData); |
|
67 void DoHandleGetFolderItemsL(RBuf8& aCommandData, RBuf8& aResponseData); |
|
68 |
|
69 TInt SendInternalResponse(TUint aId, RBuf8& aData); |
|
70 TInt SendResponse(TDblQue<CBrowseCommand>& aCommandQueue, TUint aId, RBuf8& aData); |
|
71 |
|
72 TBool HandleSetBrowsedPlayer(CBrowseCommand& aCommand); |
|
73 |
|
74 private: |
|
75 TDblQue<CBrowseCommand> iCommandQueue; |
|
76 TDblQue<CBrowseCommand> iInternalCommandQueue; |
|
77 |
|
78 MRemConBulkCommandInterface& iCommandInterface; |
|
79 CBulkRouter& iRouter; |
|
80 |
|
81 TInt iMtu; |
|
82 |
|
83 CAvrcpPlayerInfoManager& iPlayerInfoManager; |
|
84 TBTDevAddr iAddr; |
|
85 }; |
|
86 |
|
87 #endif //AVRCPBROWSINGINCOMINGCOMMANDHANDLER_H |