1 // Copyright (c) 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 // CATGetModemStatus |
|
15 // Description: |
|
16 // CATSIMCard |
|
17 |
|
18 #include "atgetsimstatusready.h" |
|
19 #include "mslogger.h" |
|
20 |
|
21 |
|
22 _LIT8(KGetSIMCardCommand, "AT+CCID=?;\r"); |
|
23 // Class CATSIMCard |
|
24 // --------------------------------------------------------------------------- |
|
25 // CATSIMCard::NewL |
|
26 // other items were commented in a header |
|
27 // --------------------------------------------------------------------------- |
|
28 CATSIMCard* CATSIMCard::NewL(CGlobalPhonemanager& aGloblePhone, |
|
29 CCtsyDispatcherCallback& aCtsyDispatcherCallback) |
|
30 { |
|
31 CATSIMCard* self = new(ELeave) CATSIMCard(aGloblePhone, |
|
32 aCtsyDispatcherCallback); |
|
33 CleanupStack::PushL(self ); |
|
34 self->ConstructL(); |
|
35 CleanupStack::Pop(self ); |
|
36 return self ; |
|
37 } |
|
38 // --------------------------------------------------------------------------- |
|
39 // CATSIMCard::CATSIMCard |
|
40 // other items were commented in a header |
|
41 // --------------------------------------------------------------------------- |
|
42 CATSIMCard::CATSIMCard(CGlobalPhonemanager& aGloblePhone, |
|
43 CCtsyDispatcherCallback& aCtsyDispatcherCallback) |
|
44 :CAtCommandBase(aGloblePhone,aCtsyDispatcherCallback) |
|
45 { |
|
46 } |
|
47 // --------------------------------------------------------------------------- |
|
48 // CATSIMCard::ConstructL |
|
49 // other items were commented in a header |
|
50 // --------------------------------------------------------------------------- |
|
51 void CATSIMCard::ConstructL() |
|
52 { |
|
53 CAtCommandBase::ConstructL(); |
|
54 iAtType = ELtsyAT_Phone_SimCardStatus; |
|
55 } |
|
56 // --------------------------------------------------------------------------- |
|
57 // CATSIMCard::~CATSIMCard( |
|
58 // other items were commented in a header |
|
59 // --------------------------------------------------------------------------- |
|
60 CATSIMCard::~CATSIMCard() |
|
61 { |
|
62 } |
|
63 // --------------------------------------------------------------------------- |
|
64 // CATSIMCard::StartRequestL |
|
65 // other items were commented in a header |
|
66 // --------------------------------------------------------------------------- |
|
67 void CATSIMCard::StartRequest() |
|
68 { |
|
69 ExecuteCommand(); |
|
70 } |
|
71 // --------------------------------------------------------------------------- |
|
72 // CATSIMCard::ExecuteCommand |
|
73 // other items were commented in a header |
|
74 // --------------------------------------------------------------------------- |
|
75 void CATSIMCard::ExecuteCommand( ) |
|
76 { |
|
77 iTxBuffer.Copy(KGetSIMCardCommand); |
|
78 Write(); |
|
79 } |
|
80 // --------------------------------------------------------------------------- |
|
81 // CATSIMCard::ParseResponseL |
|
82 // other items were commented in a header |
|
83 // --------------------------------------------------------------------------- |
|
84 void CATSIMCard::ParseResponseL(const TDesC8& /*aResponseBuf*/) |
|
85 { |
|
86 if (CurrentLine().Match(KLtsyOkString) == 0) |
|
87 { |
|
88 iError = KErrNone; |
|
89 } |
|
90 else |
|
91 { |
|
92 iError = KErrGeneral; |
|
93 } |
|
94 } |
|
95 // --------------------------------------------------------------------------- |
|
96 // CATSIMCard::GetErrorValue |
|
97 // other items were commented in a header |
|
98 // --------------------------------------------------------------------------- |
|
99 TInt CATSIMCard::GetErrorValue() |
|
100 { |
|
101 return iError; |
|
102 } |
|
103 // --------------------------------------------------------------------------- |
|
104 // CATSIMCard::EventSignal |
|
105 // other items were commented in a header |
|
106 // --------------------------------------------------------------------------- |
|
107 void CATSIMCard::EventSignal(TAtEventSource aEventSource, TInt aStatus) |
|
108 { |
|
109 if(KErrNone ==aStatus) |
|
110 { |
|
111 if(aEventSource == EReadCompletion) |
|
112 { |
|
113 aStatus = iError; |
|
114 } |
|
115 else |
|
116 return; |
|
117 } |
|
118 CAtCommandBase::Complete(); |
|
119 iPhoneGlobals.iEventSignalActive = EFalse; |
|
120 iCtsyDispatcherCallback.CallbackPhoneBootNotifySimStatusReadyComp(aStatus); |
|
121 } |
|
122 // |
|
123 // End of file |
|