equal
deleted
inserted
replaced
|
1 // writer.h |
|
2 // |
|
3 // Copyright (c) 2008 - 2010 Accenture. All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of the "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 // Accenture - Initial contribution |
|
11 // |
|
12 |
|
13 #ifndef __WRITER_H__ |
|
14 #define __WRITER_H__ |
|
15 |
|
16 #include <e32std.h> |
|
17 #include "socketuser.h" |
|
18 |
|
19 |
|
20 class MWriterObserver |
|
21 { |
|
22 public: |
|
23 virtual void WriteComplete(TInt aError) = 0; |
|
24 }; |
|
25 |
|
26 |
|
27 class CWriter : public CSocketUser |
|
28 { |
|
29 public: |
|
30 static CWriter* NewL(RSocket& aSocket, MWriterObserver& aObserver); |
|
31 ~CWriter(); |
|
32 void StartWrite(const TDesC8& aDes); |
|
33 void Abort(); |
|
34 private: |
|
35 CWriter(RSocket& aSocket, MWriterObserver& aObserver); |
|
36 private: // From CActive. |
|
37 void RunL(); |
|
38 void DoCancel(); |
|
39 private: // From CSocketUser. |
|
40 virtual void HandleSocketConnected(); |
|
41 private: |
|
42 MWriterObserver& iObserver; |
|
43 const TDesC8* iPendingDes; |
|
44 }; |
|
45 |
|
46 #endif // __WRITER_H__ |
|
47 |