|
1 /* |
|
2 * Copyright (c) 2006 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: Definition of the ClientDataBuffer class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CCLIENTDATABUFFER_H |
|
20 #define C_CCLIENTDATABUFFER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <DataBuffer.h> |
|
25 |
|
26 namespace multimedia |
|
27 { |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * Object that Implements the Client Buffers. |
|
31 * This Class Implements the MDataBuffer interface |
|
32 * @lib EnhancedMediaClient.lib |
|
33 * @since S60 v3.2 |
|
34 */ |
|
35 |
|
36 class CClientDataBuffer : public CBase, |
|
37 public MDataBuffer |
|
38 |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aObserver Observer to callback the Event. |
|
45 */ |
|
46 static CClientDataBuffer* NewL(TUint aBufferSize); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CClientDataBuffer(); |
|
52 |
|
53 /** |
|
54 * From MDataBuffer. |
|
55 * Returns the Descriptor for the Client |
|
56 * @since S60 v3.2 |
|
57 */ |
|
58 virtual TPtr8& GetBufferPtr(); |
|
59 |
|
60 /** |
|
61 * From MDataBuffer. |
|
62 * Returns a boolean if it is the Last Buffer |
|
63 * @since S60 v3.2 |
|
64 */ |
|
65 virtual TBool IsLastBuffer(); |
|
66 |
|
67 /** |
|
68 * From MDataBuffer. |
|
69 * Sets the Last Buffer Flag on itself |
|
70 * @since S60 v3.2 |
|
71 */ |
|
72 virtual void SetLastBuffer(TBool aStatus); |
|
73 |
|
74 private: |
|
75 CClientDataBuffer(); |
|
76 void ConstructL(TUint aBufferSize); |
|
77 |
|
78 private: |
|
79 /** |
|
80 * Buffer Pointer |
|
81 */ |
|
82 HBufC8* iDataBuffer; |
|
83 /** |
|
84 * Pointer Descriptor for the Buffer |
|
85 */ |
|
86 TPtr8 iDataBufferDes; |
|
87 /** |
|
88 * Last Buffer Flag |
|
89 */ |
|
90 TBool iLastBuffer; |
|
91 }; |
|
92 } |
|
93 |
|
94 #endif // C_CCLIENTDATABUFFER_H |
|
95 |
|
96 // End of File |