1 /* |
|
2 * Copyright (c) 2010 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: QT Bindings for TMS |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef QTMS_BUFFER_H |
|
19 #define QTMS_BUFFER_H |
|
20 |
|
21 #include <qtms.h> |
|
22 |
|
23 namespace QTMS |
|
24 { |
|
25 |
|
26 /** |
|
27 * QTMSBuffer class |
|
28 * |
|
29 * This interface provides data buffers to QTMS clients. This class allows |
|
30 * clients to allocate data by themselves or request a specific size of the |
|
31 * buffer from the factory. |
|
32 * |
|
33 * @lib QTMSapi.lib |
|
34 * |
|
35 */ |
|
36 class QTMSBuffer |
|
37 { |
|
38 public: |
|
39 /* |
|
40 * Destructor |
|
41 */ |
|
42 virtual ~QTMSBuffer() |
|
43 { |
|
44 } |
|
45 |
|
46 /** |
|
47 * Return buffer type. |
|
48 * |
|
49 * @param buftype |
|
50 * Type of the buffer object (QTMS_BUFFER_MEMORY). |
|
51 * |
|
52 * @return |
|
53 * QTMS_RESULT_SUCCESS if the operation was successful otherwise |
|
54 * system error. |
|
55 * |
|
56 */ |
|
57 virtual gint GetType(QTMSBufferType& buftype) = 0; |
|
58 |
|
59 /** |
|
60 * Returns time stamp of the buffer so that the framework can determine |
|
61 * the time at which this buffer has to be rendered by the output device |
|
62 * sink. |
|
63 * |
|
64 * @param ts |
|
65 * Time stamp in microseconds. |
|
66 * |
|
67 * @return |
|
68 * QTMS_RESULT_SUCCESS if the operation was successful otherwise |
|
69 * system error. |
|
70 * |
|
71 */ |
|
72 virtual gint GetTimeStamp(guint64& ts) = 0; |
|
73 |
|
74 /** |
|
75 * Sets the time stamp on the Buffer so that the framework can determine |
|
76 * the time at which this buffer has to be rendered by the output device |
|
77 * sink. |
|
78 * |
|
79 * @param ts |
|
80 * Time stamp in microseconds. |
|
81 * |
|
82 * @return |
|
83 * QTMS_RESULT_SUCCESS if the operation was successful otherwise |
|
84 * system error. |
|
85 * |
|
86 */ |
|
87 virtual gint SetTimeStamp(const guint64 ts) = 0; |
|
88 |
|
89 /** |
|
90 * Returns size of data in the buffer. |
|
91 * |
|
92 * @param size |
|
93 * Size of data in the buffer. |
|
94 * |
|
95 * @return |
|
96 * QTMS_RESULT_SUCCESS if the operation was successful otherwise |
|
97 * system error. |
|
98 * |
|
99 */ |
|
100 virtual gint GetDataSize(guint& size) = 0; |
|
101 |
|
102 /** |
|
103 * Set size of data in the buffer after filling in by the client. |
|
104 * |
|
105 * @param size |
|
106 * Size of data in the buffer. |
|
107 * |
|
108 * @return |
|
109 * QTMS_RESULT_SUCCESS if the operation was successful otherwise |
|
110 * system error. |
|
111 * |
|
112 */ |
|
113 virtual gint SetDataSize(const guint size) = 0; |
|
114 |
|
115 /** |
|
116 * Return pointer to the memory location of the data associated with this |
|
117 * buffer. |
|
118 * |
|
119 * @param bufptr |
|
120 * Pointer to the data stored in the buffer. |
|
121 * |
|
122 * @return |
|
123 * QTMS_RESULT_SUCCESS if the operation was successful otherwise |
|
124 * system error. |
|
125 * |
|
126 */ |
|
127 virtual gint GetDataPtr(guint8*& bufptr) = 0; |
|
128 }; |
|
129 |
|
130 } //namespace QTMS |
|
131 |
|
132 #endif //QTMS_BUFFER_H |
|