|
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 #ifndef BROWSECOMMAND_H |
|
17 #define BROWSECOMMAND_H |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 @released |
|
23 */ |
|
24 |
|
25 #include <avctpservices.h> |
|
26 #include <e32base.h> |
|
27 #include <remcon/remconbearerplugin.h> |
|
28 #include "avrcpcommand.h" |
|
29 #include "avrcpplayerinfomanager.h" |
|
30 |
|
31 const TInt KMinLengthSetBrowsedPlayerPdu = 2; // PDU 0x70 |
|
32 const TInt KMinLengthGetFolderItemsPdu = 10; // PDU 0x71 |
|
33 const TInt KMinLengthChangePathPdu = 3; // PDU 0x72 |
|
34 const TInt KMinLengthGetItemAttributesPdu = 12; // PDU 0x73 |
|
35 const TInt KMinLengthSearchPdu = 4; // PDU 0x80 |
|
36 const TInt KMinLengthGeneralReject = 4; // PDU 0xa0 |
|
37 |
|
38 class CRcpRemoteDevice; |
|
39 class MRemConBearerObserver; |
|
40 NONSHARABLE_CLASS(CBrowseCommand) : public CAvrcpCommand |
|
41 { |
|
42 public: |
|
43 static CBrowseCommand* NewL(const TDesC8& aMessageInformation, |
|
44 TUint aRemConId, |
|
45 SymbianAvctp::TTransactionLabel aTransLabel, |
|
46 const TBTDevAddr& aAddr, |
|
47 CAvrcpPlayerInfoManager* aPlayerInfoManager); |
|
48 |
|
49 // Called from handlers |
|
50 TInt ProcessIncomingCommandL(TInt aMaxResponse); |
|
51 void ProcessOutgoingResponse(RBuf8& aCommandData); |
|
52 void SetResult(TInt aErr); |
|
53 const TDesC8& CommandData() const; |
|
54 |
|
55 const TDesC8& Data() const; |
|
56 virtual SymbianAvctp::TMessageType MessageType() const; |
|
57 |
|
58 private: |
|
59 CBrowseCommand(TUint aRemConId, |
|
60 SymbianAvctp::TTransactionLabel aTransLabel, |
|
61 const TBTDevAddr& aAddr, |
|
62 CAvrcpPlayerInfoManager* aPlayerInfoManager); |
|
63 |
|
64 ~CBrowseCommand(); |
|
65 void ConstructL(const TDesC8& aMessageInformation); |
|
66 |
|
67 TInt HandleSetBrowsedPlayer(); |
|
68 TInt HandleGetFolderItems(); |
|
69 TInt HandleChangePath(); |
|
70 TInt HandleGetItemAttributes(); |
|
71 TInt HandleSearch(); |
|
72 TInt HandleUnknownPdu(); |
|
73 |
|
74 TInt AppendIncomingPayload(const TPtrC8& aPayload); |
|
75 void GenerateRejectPayloadL(TInt aErr); |
|
76 |
|
77 private: |
|
78 RBuf8 iFrame; |
|
79 TInt iMaxResponse; |
|
80 }; |
|
81 |
|
82 #endif //BROWSECOMMAND_H |