equal
deleted
inserted
replaced
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 // CCommReader. |
|
15 // |
|
16 |
|
17 //user include |
|
18 #include "commreader.h" |
|
19 #include "mcommobserver.h" |
|
20 #include "commengine.h" |
|
21 |
|
22 //Class CCommReader |
|
23 |
|
24 CCommReader::CCommReader(CCommEngine* aComm, TInt aPriority) |
|
25 : CActive(aPriority), iComm(aComm) |
|
26 { |
|
27 CActiveScheduler::Add(this); |
|
28 } |
|
29 |
|
30 CCommReader::~CCommReader() |
|
31 { |
|
32 Cancel(); |
|
33 } |
|
34 |
|
35 void CCommReader::RunL() |
|
36 { |
|
37 iComm->CommReadComplete(iStatus.Int()); |
|
38 } |
|
39 |
|
40 void CCommReader::DoCancel() |
|
41 { |
|
42 iComm->iCommPort.ReadCancel(); |
|
43 } |
|
44 |
|
45 void CCommReader::Activate() |
|
46 { |
|
47 SetActive(); |
|
48 } |
|
49 |
|
50 TRequestStatus& CCommReader::StatusRef() |
|
51 { |
|
52 return iStatus; |
|
53 } |
|
54 // |
|
55 // End of file |
|