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