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_CLIENT_SINK_H |
|
19 #define QTMS_CLIENT_SINK_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <qtms.h> |
|
23 #include <qtmsbuffer.h> |
|
24 #include <qtmssink.h> |
|
25 #include <qglobal.h> |
|
26 #include "qtmswrapperexport.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 namespace TMS |
|
30 { |
|
31 class TMSSink; |
|
32 } |
|
33 |
|
34 namespace QTMS |
|
35 { |
|
36 |
|
37 /** |
|
38 * QTMSClientSink class |
|
39 * |
|
40 * This class provides QTMS client sink interface. It serves as a data sink |
|
41 * to the QTMS, which supplies the client with buffers recorded by the a/v |
|
42 * recording device. The constant flow of data between the a/v recorder |
|
43 * device and the client is accomplished by sending BufferProcessed() events |
|
44 * in response to TMSClientSinkObserver::ProcessBuffer sink observer callbacks. |
|
45 * This indicates to the QTMS that the supplied buffer has been consumed by the |
|
46 * client and it is ready to receive more recorded data. |
|
47 * |
|
48 * @lib QTMSapi.lib |
|
49 * |
|
50 */ |
|
51 class QTMS_WRAPPER_DLL_EXPORT QTMSClientSink : public QObject, |
|
52 public QTMSSink |
|
53 { |
|
54 Q_OBJECT |
|
55 public: |
|
56 /** |
|
57 * Destructor |
|
58 */ |
|
59 virtual ~QTMSClientSink(); |
|
60 |
|
61 /** |
|
62 * Tell the sink that the buffer passed in has been processed by |
|
63 * the client and is ready to be reused by the Sink. |
|
64 * |
|
65 * This function must be called in response to the callback from the |
|
66 * sink observer QTMSClientSinkObserver::ProcessBuffer(). |
|
67 * |
|
68 * @param buffer |
|
69 * The buffer which has been processed by the client (filled in |
|
70 * with data). |
|
71 * |
|
72 * @return |
|
73 * Status of the operation. |
|
74 * |
|
75 */ |
|
76 gint BufferProcessed(QTMSBuffer* buffer); |
|
77 |
|
78 /** |
|
79 * Return sink type. |
|
80 * |
|
81 * This function can be called at any time. |
|
82 * |
|
83 * @param sinktype |
|
84 * The type of sink object (QTMS_SINK_CLIENT). |
|
85 * |
|
86 * @return |
|
87 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
88 * |
|
89 */ |
|
90 virtual gint GetType(QTMSSinkType& sinktype); |
|
91 |
|
92 Q_SIGNALS: |
|
93 void ProcessBuffer(const QTMSBuffer* buffer); |
|
94 |
|
95 protected: |
|
96 /** |
|
97 * Constructor |
|
98 */ |
|
99 QTMSClientSink(); |
|
100 |
|
101 protected: |
|
102 TMS::TMSSink* iSink; |
|
103 }; |
|
104 |
|
105 } //namespace QTMS |
|
106 |
|
107 #endif //QTMS_CLIENT_SINK_H |
|
108 // End of file |
|
109 |
|