equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @Serial Writer header file |
|
23 @internalTechnology |
|
24 */ |
|
25 |
|
26 #ifndef SERIALWRITER_H |
|
27 #define SERIALWRITER_H |
|
28 |
|
29 #include <d32comm.h> // RBusDevComm |
|
30 #include <e32base.h> |
|
31 |
|
32 NONSHARABLE_CLASS(CSerialWriter) |
|
33 { |
|
34 public: |
|
35 static CSerialWriter* NewL(); |
|
36 ~CSerialWriter(); |
|
37 public: |
|
38 TInt Settings(const TInt& aPortNumber); |
|
39 TInt Write(const TDesC8& aData); |
|
40 //Decoration methods |
|
41 TInt WriteDecorated(const TDesC& aText, TInt aSeverity = 0) ; |
|
42 TInt WriteDecorated(const TDesC8& aText, TInt aSeverity= 0) ; |
|
43 private: |
|
44 void AddSeverity(TDes8& aLogBuffer, const TInt& aSeverity); |
|
45 void AddTime(TDes8& aLogBuffer) ; |
|
46 CSerialWriter(); |
|
47 void ConstructL(); |
|
48 TInt Connect(); |
|
49 TInt Config(); |
|
50 TInt Disconnect(); |
|
51 private: |
|
52 RBusDevComm iComm; |
|
53 TBool iReady; |
|
54 TInt iPortNum; |
|
55 }; |
|
56 |
|
57 |
|
58 #endif // SERIALWRITER_H |