24
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Sony Ericsson Mobile Communications AB
|
|
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 |
* Sony Ericsson Mobile Communications AB - initial contribution.
|
|
11 |
* Nokia Corporation - additional changes.
|
|
12 |
*
|
|
13 |
* Contributors:
|
|
14 |
*
|
|
15 |
* Description:
|
|
16 |
* Inline code, logically part of telephonyfunctions.h
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
/**
|
|
22 |
@file
|
|
23 |
*/
|
|
24 |
|
|
25 |
inline TRequestStatus** CTelephonyFunctions::RequestStatus()
|
|
26 |
//
|
|
27 |
//Provide address of ptr-to-ReqStat. When User::RequestComplete() is used,
|
|
28 |
//the ptr-to-ReqStat (iRequestStatus in here) gets zeroed, I think to prevent
|
|
29 |
//the RequestComplete message ever getting sent twice. (This zeroing feature
|
|
30 |
//does not appear to be documented in Symbian SDK 6.0).
|
|
31 |
//
|
|
32 |
//@return address of Pointer-to-callers-RequestStatus member.
|
|
33 |
//
|
|
34 |
{
|
|
35 |
return &iRequestStatus;
|
|
36 |
}
|
|
37 |
|
|
38 |
inline TRequestStatus** CTelephonyFunctions::GetRequestStatus(CTelephonyFunctions::TOperations aOp)
|
|
39 |
//
|
|
40 |
//Provide address of ptr-to-ReqStat. When User::RequestComplete() is used,
|
|
41 |
//the ptr-to-ReqStat (iRequestStatus in here) gets zeroed, I think to prevent
|
|
42 |
//the RequestComplete message ever getting sent twice. (This zeroing feature
|
|
43 |
//does not appear to be documented in Symbian SDK 6.0).
|
|
44 |
//
|
|
45 |
//@return address of Pointer-to-callers-RequestStatus member.
|
|
46 |
//
|
|
47 |
{
|
|
48 |
return &(iReqStatusTable[aOp]);
|
|
49 |
}
|
|
50 |
|
|
51 |
inline TBool CTelephonyFunctions::IsRequestPending(CTelephonyFunctions::TOperations aOp)
|
|
52 |
{
|
|
53 |
return iReqPendingTable[aOp];
|
|
54 |
}
|
|
55 |
|
|
56 |
inline void CTelephonyFunctions::SetRequestPending(CTelephonyFunctions::TOperations aOp, TBool aBool)
|
|
57 |
//
|
|
58 |
//Notifier Active Objects use this when RunL() runs.
|
|
59 |
//
|
|
60 |
//Sets EFalse, which in turn prevents any later cancellation by the user.
|
|
61 |
//
|
|
62 |
{
|
|
63 |
iReqPendingTable[aOp] = aBool;
|
|
64 |
}
|
|
65 |
|
|
66 |
inline RMobileCall* CTelephonyFunctions::Call()
|
|
67 |
//
|
|
68 |
//Active Objects will use this.
|
|
69 |
//
|
|
70 |
//@return Pointer to the RCall in use
|
|
71 |
//
|
|
72 |
{
|
|
73 |
return &iCall;
|
|
74 |
}
|
|
75 |
|
|
76 |
inline RMobileCall* CTelephonyFunctions::Call(const CTelephony::TCallId aCallId)
|
|
77 |
//
|
|
78 |
//Active Objects will use this.
|
|
79 |
//
|
|
80 |
//@return Pointer to the RCall in use
|
|
81 |
//
|
|
82 |
{
|
|
83 |
if(iCallPoolStatus[aCallId]!=EUnset)
|
|
84 |
return &(iCallPool[aCallId]);
|
|
85 |
else
|
|
86 |
return NULL;
|
|
87 |
}
|
|
88 |
|
|
89 |
/**
|
|
90 |
* Active Objects will use this function to get the required line handle.
|
|
91 |
*
|
|
92 |
* @param aLine Line to return.
|
|
93 |
* @return Pointer to the RLine in use
|
|
94 |
*/
|
|
95 |
inline RMobileLine* CTelephonyFunctions::Line(const CTelephony::TPhoneLine aLine)
|
|
96 |
{
|
|
97 |
if (aLine == CTelephony::EVoiceLine)
|
|
98 |
{
|
|
99 |
return &iLineVoice;
|
|
100 |
}
|
|
101 |
else if (aLine == CTelephony::EDataLine)
|
|
102 |
{
|
|
103 |
return &iLineData;
|
|
104 |
}
|
|
105 |
else if (aLine == CTelephony::EFaxLine)
|
|
106 |
{
|
|
107 |
return &iLineFax;
|
|
108 |
}
|
|
109 |
else
|
|
110 |
{
|
|
111 |
return NULL;
|
|
112 |
}
|
|
113 |
}
|
|
114 |
|
|
115 |
inline RMobilePhone* CTelephonyFunctions::Phone()
|
|
116 |
{
|
|
117 |
return &iPhone;
|
|
118 |
}
|
|
119 |
|
|
120 |
inline void CTelephonyFunctions::SetAsyncRequestOutstandingFalse()
|
|
121 |
{
|
|
122 |
iAsyncRequestOutstanding = EFalse;
|
|
123 |
}
|
|
124 |
|
|
125 |
inline RProperty* CTelephonyFunctions::PhonePowerProperty()
|
|
126 |
{
|
|
127 |
return &iPhonePowerProperty;
|
|
128 |
}
|
|
129 |
|
|
130 |
|
|
131 |
|
|
132 |
|