equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 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 #ifndef MEMSPYDRIVERXFERBUFFER_H |
|
19 #define MEMSPYDRIVERXFERBUFFER_H |
|
20 |
|
21 // System includes |
|
22 #include <e32cmn.h> |
|
23 #include <kernel.h> |
|
24 |
|
25 // Classes referenced |
|
26 class DMemSpyDriverDevice; |
|
27 |
|
28 |
|
29 class DMemSpyDriverXferBuffer : public DBase |
|
30 { |
|
31 friend class RMemSpyMemStreamWriter; |
|
32 |
|
33 public: |
|
34 DMemSpyDriverXferBuffer( DMemSpyDriverDevice& aDevice, DThread& aThread ); |
|
35 ~DMemSpyDriverXferBuffer(); |
|
36 TInt Construct( TInt aSize ); |
|
37 |
|
38 public: // API |
|
39 TInt Size() const; |
|
40 TInt GrowBy( TInt aSize ); |
|
41 TInt EnsureCapacity( TInt aSize ); |
|
42 void Reset(); |
|
43 |
|
44 private: // Internal methods |
|
45 TInt WriteToClient( TDes8* aDestinationPointer, TInt aLength ); |
|
46 DThread& ClientThread(); |
|
47 TUint8* Ptr(); |
|
48 |
|
49 private: // Data members |
|
50 DMemSpyDriverDevice& iDevice; |
|
51 DThread& iClientThread; |
|
52 TInt iSize; |
|
53 TAny* iBuffer; |
|
54 }; |
|
55 |
|
56 |
|
57 |
|
58 #endif |