|
1 /* |
|
2 * Copyright (c) 2004 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: This file contains definitions of the queue item class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __DATABUFFERQUEUEITEM_H__ |
|
21 #define __DATABUFFERQUEUEITEM_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <mmf/server/mmfdatabuffer.h> |
|
26 #include <mmfcontrollerframework.h> |
|
27 |
|
28 |
|
29 /** |
|
30 * Class to encapsulate a queue item. |
|
31 * |
|
32 * @lib S60StreamingSource.lib |
|
33 * @since 3.0 |
|
34 */ |
|
35 class CDataBufferQueueItem : public CBase |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 */ |
|
42 static CDataBufferQueueItem* NewL( CMMFDataBuffer* aDataBuffer, TMMFMessage& aMessage ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CDataBufferQueueItem(); |
|
48 |
|
49 /** |
|
50 * Used to set the Message Status when completing the Message. |
|
51 * @since Series 60 3.1 |
|
52 * @param status ErrorCode to be sent back when completing the message |
|
53 */ |
|
54 void SetMessageStatus(TInt status); |
|
55 |
|
56 /** |
|
57 * Used to Get the DataBuffer associated with the Item. |
|
58 * @since Series 60 3.1 |
|
59 * @return Pointer to the CMMFDataBuffer owned by the Queue Item |
|
60 */ |
|
61 CMMFDataBuffer* GetDataBuffer(); |
|
62 |
|
63 private: |
|
64 |
|
65 /** |
|
66 * C++ default constructor. |
|
67 */ |
|
68 CDataBufferQueueItem(); |
|
69 |
|
70 /** |
|
71 * Construct a queue item object and initialize it with |
|
72 * @param aDataBuffer Buffer containing data |
|
73 */ |
|
74 void ConstructL( CMMFDataBuffer* aDataBuffer, TMMFMessage& aMessage ); |
|
75 |
|
76 public: |
|
77 // next item |
|
78 TSglQueLink* iLink; |
|
79 |
|
80 private: |
|
81 // Data buffer |
|
82 CMMFDataBuffer* iBuffer; |
|
83 // Message to complete when this buffer item is processed |
|
84 TMMFMessage* iMessage; |
|
85 TInt iMessageStatus; |
|
86 }; |
|
87 |
|
88 |
|
89 #endif // __DATABUFFERQUEUEITEM_H__ |
|
90 |
|
91 // End of File |