|
1 // Copyright (c) 2004-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 AVRCPREMOTEDEVICE_H |
|
17 #define AVRCPREMOTEDEVICE_H |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 @released |
|
23 */ |
|
24 |
|
25 #include <e32std.h> |
|
26 |
|
27 class CRemConBearerAvrcp; |
|
28 class MIncomingCommandHandler; |
|
29 class MOutgoingCommandHandler; |
|
30 class CRcpIncomingCommandHandler; |
|
31 class CRcpOutgoingCommandHandler; |
|
32 class CRcpRouter; |
|
33 class MRemConBearerObserver; |
|
34 /** |
|
35 CRcpRemoteDevice represents one remote RCP device. It manages |
|
36 the sending and receiving of commands between that device and the |
|
37 local device. |
|
38 */ |
|
39 NONSHARABLE_CLASS(CRcpRemoteDevice) : public CBase |
|
40 { |
|
41 public: |
|
42 static CRcpRemoteDevice* NewL(const TBTDevAddr& aAddr, |
|
43 CRcpRouter& aRouter, |
|
44 CRemConBearerAvrcp& aBearer, |
|
45 MRemConBearerObserver& aObserver, |
|
46 CDeltaTimer& aTimer, |
|
47 CAvrcpPlayerInfoManager& aPlayerInfoManager); |
|
48 |
|
49 virtual ~CRcpRemoteDevice(); |
|
50 |
|
51 void Disconnect(TBool aClearQueue); |
|
52 |
|
53 // Utility |
|
54 const TBTDevAddr& RemoteAddress() const; |
|
55 MIncomingCommandHandler& IncomingHandler() const; |
|
56 MOutgoingCommandHandler& OutgoingHandler() const; |
|
57 |
|
58 private: |
|
59 CRcpRemoteDevice(const TBTDevAddr& aAddr, |
|
60 CRcpRouter& aRouter, |
|
61 CRemConBearerAvrcp& aBearer, |
|
62 CDeltaTimer& aTimer); |
|
63 |
|
64 void ConstructL(MRemConBearerObserver& aObserver, |
|
65 CAvrcpPlayerInfoManager& aPlayerInfoManager); |
|
66 |
|
67 public: |
|
68 TDblQueLink iLink; // Used by bearer and router to manage remotes |
|
69 private: |
|
70 TBTDevAddr iDevice; |
|
71 |
|
72 CRcpIncomingCommandHandler* iIncoming; |
|
73 CRcpOutgoingCommandHandler* iOutgoing; |
|
74 |
|
75 CRcpRouter& iRouter; |
|
76 CRemConBearerAvrcp& iBearer; |
|
77 CDeltaTimer& iTimer; |
|
78 }; |
|
79 |
|
80 |
|
81 #endif // AVRCPREMOTEDEVICE_H |