|
1 // Copyright (c) 2010 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" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef TARGETSESSION_H |
|
17 #define TARGETSESSION_H |
|
18 |
|
19 #include "targetclientprocess.h" |
|
20 #include "session.h" |
|
21 |
|
22 NONSHARABLE_CLASS(CRemConTargetSession) : public CRemConSession |
|
23 { |
|
24 public: |
|
25 /** |
|
26 Factory method. |
|
27 @param aClientProcess The client for which this session is being created. |
|
28 @param aServer The server. |
|
29 @param aBearerManager The bearer manager. |
|
30 @param aId The unique ID of the new session. |
|
31 @return Ownership of a new session. |
|
32 */ |
|
33 static CRemConTargetSession* NewL(CRemConTargetClientProcess& aClientProcess, |
|
34 CRemConServer& aServer, |
|
35 CBearerManager& aBearerManager, |
|
36 TUint aId); |
|
37 |
|
38 ~CRemConTargetSession(); |
|
39 |
|
40 /** |
|
41 From CRemConSession. |
|
42 Checks if this message is supported by the session |
|
43 @param aMsg The message to check |
|
44 @return ETrue if it is, EFalse otherwise |
|
45 */ |
|
46 TBool SupportedMessage(const CRemConMessage& aMsg) const; |
|
47 |
|
48 /** |
|
49 Indicates whether or not a given interface is supported by this |
|
50 target session. |
|
51 @param aInterfaceUid The UID of the interface to check for. |
|
52 @return ETrue if the interface is supported. |
|
53 */ |
|
54 TBool InterfaceSupported(TUid aInterfaceUid) const; |
|
55 |
|
56 private: // From CRemConSession: utility- IPC command handlers |
|
57 void SetPlayerType(const RMessage2& aMessage); |
|
58 void SendUnreliable(const RMessage2& aMessage); |
|
59 void RegisterInterestedAPIs(const RMessage2& aMessage); |
|
60 |
|
61 private: // From CRemConSession: utility |
|
62 CRemConMessage* DoPrepareSendMessageL(const RMessage2& aMessage); |
|
63 void DoSendCancel(); |
|
64 void DoReceive(); |
|
65 void SendToServer(CRemConMessage& aMsg); |
|
66 |
|
67 private: // utility |
|
68 CRemConMessage* DoCreateUnreliableMessageL(const RMessage2& aMessage); |
|
69 |
|
70 |
|
71 private: |
|
72 /** |
|
73 Constructor. |
|
74 @param aServer The server. |
|
75 @param aBearerManager The bearer manager. |
|
76 @param aId The unique ID of the new session. |
|
77 */ |
|
78 CRemConTargetSession(CRemConTargetClientProcess& aClientProcess, |
|
79 CRemConServer& aServer, |
|
80 CBearerManager& aBearerManager, |
|
81 TUint aId); |
|
82 |
|
83 /** |
|
84 2nd-phase construction. |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 private: |
|
89 CRemConTargetClientProcess& iClientProcess; |
|
90 }; |
|
91 |
|
92 #endif /* TARGETSESSION_H */ |