|
1 /* |
|
2 * Copyright (c) 2002-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 Session Base. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CPhSrvSubSessionBase.h" |
|
22 #include "CPhSrvSession.h" |
|
23 #include "CPhSrvSubSessionNotifier.h" |
|
24 |
|
25 |
|
26 // ============================ MEMBER FUNCTIONS =============================== |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CPhSrvSubSessionBase::CPhSrvSubSessionBase |
|
30 // |
|
31 // C++ Constructor |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 CPhSrvSubSessionBase::CPhSrvSubSessionBase( |
|
35 CPhSrvSession& aSession, |
|
36 TPhSrvSubSessionType aType ) |
|
37 : iSession(aSession), |
|
38 iSubSessionType(aType) |
|
39 { |
|
40 } |
|
41 |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CPhSrvSubSessionBase::PhoneSession |
|
45 // |
|
46 // Access a non-constant phone session |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 CPhSrvSession& CPhSrvSubSessionBase::PhoneSession() |
|
50 { |
|
51 return iSession; |
|
52 } |
|
53 |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CPhSrvSubSessionBase::PhoneSession |
|
57 // |
|
58 // Access the session |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 const CPhSrvSession& CPhSrvSubSessionBase::PhoneSession() const |
|
62 { |
|
63 return iSession; |
|
64 } |
|
65 |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // CPhSrvSubSessionBase::SubSessionUniqueHandle |
|
69 // |
|
70 // Return the unique handle for this subsession |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 TInt CPhSrvSubSessionBase::SubSessionUniqueHandle() const |
|
74 { |
|
75 return PhoneSession().SubSessionUniqueHandle( *this ); |
|
76 } |
|
77 |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CPhSrvSubSessionBase::Type |
|
81 // |
|
82 // The type of the subsession |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 CPhSrvSubSessionBase::TPhSrvSubSessionType CPhSrvSubSessionBase::Type() const |
|
86 { |
|
87 return iSubSessionType; |
|
88 } |
|
89 |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CPhSrvSubSessionBase::Write |
|
93 // |
|
94 // Write to client address space |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 void CPhSrvSubSessionBase::Write( |
|
98 const RMessage2& aMessage, |
|
99 TInt aLocation, |
|
100 const TDesC8& aDes, |
|
101 TInt aOffset ) |
|
102 { |
|
103 PhoneSession().Write( |
|
104 aMessage, |
|
105 aLocation, |
|
106 aDes, |
|
107 aOffset ); |
|
108 } |
|
109 |
|
110 |
|
111 // ----------------------------------------------------------------------------- |
|
112 // CPhSrvSubSessionBase::Read |
|
113 // |
|
114 // Read from client address space |
|
115 // ----------------------------------------------------------------------------- |
|
116 // |
|
117 void CPhSrvSubSessionBase::Read( |
|
118 const RMessage2& aMessage, |
|
119 TInt aLocation, |
|
120 TDes8& aDes, |
|
121 TInt aOffset ) |
|
122 { |
|
123 PhoneSession().Read( |
|
124 aMessage, |
|
125 aLocation, |
|
126 aDes, |
|
127 aOffset ); |
|
128 } |
|
129 |
|
130 |
|
131 // End of File |