|
1 /* |
|
2 * Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Sub implemetation for Sub Session Command handler. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CPhSrvSubSessionBase.h" |
|
22 #include "CPhSrvSession.h" |
|
23 #include "CPhSrvServer.h" |
|
24 #include <PhCltTypes.h> |
|
25 #include "MPhSrvComHandNegotiators.h" |
|
26 #include "CPhSrvSubSessionCommandHandler.h" |
|
27 |
|
28 |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CPhSrvSubSessionCommandHandler::CPhSrvSubSessionCommandHandler |
|
34 // |
|
35 // Constructor. |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 CPhSrvSubSessionCommandHandler::CPhSrvSubSessionCommandHandler( |
|
39 CPhSrvSession& aSession ) |
|
40 : CPhSrvSubSessionBase( aSession, EPhSrvSubSessionTypeComHand ) |
|
41 { |
|
42 } |
|
43 |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CPhSrvSubSessionCommandHandler::NewL |
|
47 // |
|
48 // Two-phased constructor. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CPhSrvSubSessionBase* CPhSrvSubSessionCommandHandler::NewL( |
|
52 CPhSrvSession& aSession ) |
|
53 { |
|
54 CPhSrvSubSessionBase* self = |
|
55 new( ELeave ) CPhSrvSubSessionCommandHandler( aSession ); |
|
56 |
|
57 return self; |
|
58 } |
|
59 |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CPhSrvSubSessionCommandHandler::PhSrvMessageDecoderCanProcessMessage |
|
63 // |
|
64 // Framework function. Returns ETrue for the op codes that |
|
65 // this subsession can handle. |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 TBool CPhSrvSubSessionCommandHandler::PhSrvMessageDecoderCanProcessMessage( |
|
69 TInt aFunction ) |
|
70 { |
|
71 switch( aFunction ) |
|
72 { |
|
73 case EPhoneServerComHandSubSessionOpen: |
|
74 case EPhoneServerComHandSubSessionClose: |
|
75 case EPhoneServerComHandSubSessionAtd: |
|
76 case EPhoneServerComHandSubSessionAta: |
|
77 case EPhoneServerComHandSubSessionChld: |
|
78 case EPhoneServerComHandSubSessionChup: |
|
79 case EPhoneServerComHandSubSessionVts: |
|
80 case EPhoneServerComHandSubSessionCancel: |
|
81 case EPhoneServerComHandSubSessionMuteMic: |
|
82 case EPhoneServerComHandSubSessionMuteRingingTone: |
|
83 return ETrue; |
|
84 |
|
85 default: |
|
86 return EFalse; |
|
87 } |
|
88 } |
|
89 |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CPhSrvSubSessionCommandHandler::PhSrvMessageProcessorHandleMessageL |
|
93 // |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 void CPhSrvSubSessionCommandHandler::PhSrvMessageProcessorHandleMessageL( |
|
97 const RMessage2& /* aMessage */ ) |
|
98 { |
|
99 // Stub implementation, i.e. functionality not supported. |
|
100 User::Leave( KErrNotSupported ); |
|
101 } |
|
102 |
|
103 |
|
104 // End of File |