24
|
1 |
// Copyright (c) 1997-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 |
// Contains method definitions for EtelMM subsession RMobileLine
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
// From core API
|
|
19 |
#include <etelext.h>
|
|
20 |
|
|
21 |
// Multimode header files
|
|
22 |
#include <etelmm.h>
|
|
23 |
#include "mm_hold.h"
|
|
24 |
|
|
25 |
|
|
26 |
/************************************************************************/
|
|
27 |
//
|
|
28 |
// RMobileLine
|
|
29 |
//
|
|
30 |
/************************************************************************/
|
|
31 |
|
|
32 |
EXPORT_C RMobileLine::RMobileLine()
|
|
33 |
: iMmPtrHolder(NULL)
|
|
34 |
/** Constructor. */
|
|
35 |
{
|
|
36 |
}
|
|
37 |
|
|
38 |
EXPORT_C void RMobileLine::ConstructL()
|
|
39 |
/** Constructs and initializes the object.
|
|
40 |
|
|
41 |
@leave KErrNoMemory Out of memory.
|
|
42 |
@capability None
|
|
43 |
*/
|
|
44 |
{
|
|
45 |
RLine::ConstructL();
|
|
46 |
__ASSERT_ALWAYS(iMmPtrHolder==NULL,PanicClient(EEtelPanicHandleNotClosed));
|
|
47 |
iMmPtrHolder = CMobileLinePtrHolder::NewL(CMobileLinePtrHolder::EMaxNumberLinePtrSlots,CMobileLinePtrHolder::EMaxNumberLinePtrCSlots);
|
|
48 |
}
|
|
49 |
|
|
50 |
EXPORT_C void RMobileLine::Destruct()
|
|
51 |
/** Destructor
|
|
52 |
@capability None
|
|
53 |
*/
|
|
54 |
{
|
|
55 |
RLine::Destruct();
|
|
56 |
delete iMmPtrHolder;
|
|
57 |
iMmPtrHolder = NULL;
|
|
58 |
}
|
|
59 |
|
|
60 |
EXPORT_C TInt RMobileLine::GetMobileLineStatus(RMobileCall::TMobileCallStatus& aStatus) const
|
|
61 |
/** Returns the current state of the line.
|
|
62 |
|
|
63 |
If there is one call object RMobileCall associated with this line the returned
|
|
64 |
line status will be equal to the call status.
|
|
65 |
|
|
66 |
If there is more than one call object associated with this line, the state
|
|
67 |
of the call that is most active, i.e. the call that is connected and active
|
|
68 |
or is about to be connected, will be returned my this function.
|
|
69 |
|
|
70 |
@param aStatus On completion, contains the mobile line status.
|
|
71 |
@return KErrNone if successful, otherwise another of the system-wide error
|
|
72 |
codes.
|
|
73 |
@capability None
|
|
74 |
*/
|
|
75 |
{
|
|
76 |
TPckg<RMobileCall::TMobileCallStatus> ptr1(aStatus);
|
|
77 |
return Get(EMobileLineGetMobileLineStatus, ptr1);
|
|
78 |
}
|
|
79 |
|
|
80 |
EXPORT_C void RMobileLine::NotifyMobileLineStatusChange(TRequestStatus& aReqStatus, RMobileCall::TMobileCallStatus& aStatus) const
|
|
81 |
/** Allows the client to be notified when a line changes state. This function completes
|
|
82 |
when the mobile line changes it state.
|
|
83 |
|
|
84 |
Use RTelSubSessionBase::CancelAsyncRequest(EMobileLineNotifyMobileLineStatusChange)
|
|
85 |
to cancel a previously placed asynchronous NotifyMobileLineStatusChange().
|
|
86 |
|
|
87 |
@param aReqStatus On return, KErrNone if successful.
|
|
88 |
@param aStatus On completion, contains the new mobile call status.
|
|
89 |
@capability None
|
|
90 |
*/
|
|
91 |
{
|
|
92 |
__ASSERT_ALWAYS(iMmPtrHolder!=NULL,PanicClient(EEtelPanicNullHandle));
|
|
93 |
|
|
94 |
TPtr8& ptr1=iMmPtrHolder->Set(CMobileLinePtrHolder::ESlot1LineNotifyMobileLineStatusChange, aStatus);
|
|
95 |
|
|
96 |
Get(EMobileLineNotifyMobileLineStatusChange, aReqStatus, ptr1);
|
|
97 |
}
|
|
98 |
|