24
|
1 |
// Copyright (c) 2008-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 |
//
|
|
15 |
|
|
16 |
#ifdef USING_CTSY_DISPATCHER
|
|
17 |
|
|
18 |
/**
|
|
19 |
* This file contains additional function definitions for the CMmPhoneTsy class
|
|
20 |
* in CTSY for use when the CTSY is used with the CTSY Dispatcher.
|
|
21 |
*/
|
|
22 |
|
|
23 |
#include "cmmphonetsy.h"
|
|
24 |
#include "cmmtsyreqhandlestore.h"
|
|
25 |
|
|
26 |
// ---------------------------------------------------------------------------
|
|
27 |
// CMmPhoneTsy::CompleteGetPhoneId
|
|
28 |
// Sets iPhoneIdentity fields and completes GetPhoneId.
|
|
29 |
// ---------------------------------------------------------------------------
|
|
30 |
//
|
|
31 |
void CMmPhoneTsy::CompleteGetPhoneId(
|
|
32 |
const RMobilePhone::TMobilePhoneIdentityV1& aPhoneId,
|
|
33 |
TInt aError )
|
|
34 |
{
|
|
35 |
if ( KErrNone == aError )
|
|
36 |
{
|
|
37 |
// Copy each field
|
|
38 |
if(aPhoneId.iManufacturer.Length() > 0)
|
|
39 |
{
|
|
40 |
iPhoneIdentity.iManufacturer.Copy(aPhoneId.iManufacturer);
|
|
41 |
}
|
|
42 |
if(aPhoneId.iModel.Length() > 0)
|
|
43 |
{
|
|
44 |
iPhoneIdentity.iModel.Copy(aPhoneId.iModel);
|
|
45 |
}
|
|
46 |
if(aPhoneId.iRevision.Length() > 0)
|
|
47 |
{
|
|
48 |
iPhoneIdentity.iRevision.Copy(aPhoneId.iRevision);
|
|
49 |
}
|
|
50 |
if(aPhoneId.iSerialNumber.Length() > 0)
|
|
51 |
{
|
|
52 |
iPhoneIdentity.iSerialNumber.Copy(aPhoneId.iSerialNumber);
|
|
53 |
}
|
|
54 |
|
|
55 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetPhoneId :");
|
|
56 |
TFLOGSTRING2(" Manufacturer: %S,", &iPhoneIdentity.iManufacturer);
|
|
57 |
TFLOGSTRING2(" Model: %S,", &iPhoneIdentity.iModel);
|
|
58 |
TFLOGSTRING2(" Revision: %S,", &iPhoneIdentity.iRevision);
|
|
59 |
TFLOGSTRING2(" SerialNumber: %S", &iPhoneIdentity.iSerialNumber);
|
|
60 |
}
|
|
61 |
|
|
62 |
//reset req handle. Returns the deleted req handle
|
|
63 |
iTsyReqHandleStore->ResetTsyReqHandle(EMultimodePhoneGetPhoneId );
|
|
64 |
|
|
65 |
TInt getPhoneIdRequestsCount = iGetPhoneIdRequests.Count();
|
|
66 |
|
|
67 |
for ( TInt i=0; i < getPhoneIdRequestsCount ; i++ )
|
|
68 |
{
|
|
69 |
TGetPhoneIdRequest* req = iGetPhoneIdRequests[i];
|
|
70 |
|
|
71 |
*(req->iRetPhoneId) = iPhoneIdentity;
|
|
72 |
ReqCompleted(req->iReqHandle, aError);
|
|
73 |
}
|
|
74 |
iGetPhoneIdRequests.ResetAndDestroy();
|
|
75 |
}
|
|
76 |
|
|
77 |
#endif //USING_CTSY_DISPATCHER
|