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