qtms/inc/qtmsstreamimpl.h
changeset 27 cbb1bfb7ebfb
child 32 edd273b3192a
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_STREAM_IMPL_H
       
    19 #define QTMS_STREAM_IMPL_H
       
    20 
       
    21 #include <qtms.h>
       
    22 #include <qtmsstream.h>
       
    23 #include <tmsstreamobsrvr.h>
       
    24 #include <QObject>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 namespace TMS {
       
    28 class TMSStream;
       
    29 }
       
    30 
       
    31 namespace QTMS {
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 //class QTMSStream;
       
    35 class QTMSSource;
       
    36 class QTMSSink;
       
    37 class QTMSForamt;
       
    38 class QTMSEffect;
       
    39 class QTMSBuffer;
       
    40 class QTMSFormat;
       
    41 
       
    42 // QTMSStreamImpl class
       
    43 class QTMSStreamImpl : public QTMSStream,
       
    44                        public TMS::TMSStreamObserver
       
    45 
       
    46     {
       
    47     enum TQueueType
       
    48         {
       
    49         EMsgBufQueue,
       
    50         EMsgComQueue
       
    51         };
       
    52 
       
    53 public:
       
    54     static gint Create(QTMSCallType callType, QTMSStreamType stype,
       
    55             QTMSStream*& qstrm, TMS::TMSStream*& tmsstrm);
       
    56 
       
    57     virtual ~QTMSStreamImpl();
       
    58 
       
    59     // From QTMSStreamBody
       
    60     gint AddObserver(TMS::TMSStreamObserver& obsrvr, gpointer user_data);
       
    61     gint RemoveObserver(TMS::TMSStreamObserver& obsrvr);
       
    62 
       
    63     // From TMSStreamObserver
       
    64     void TMSStreamEvent(const TMS::TMSStream& stream,
       
    65             TMS::TMSSignalEvent event);
       
    66 
       
    67 protected:
       
    68     QTMSStreamImpl();
       
    69 
       
    70     gint PostConstruct(QTMSCallType callType, QTMSStreamType stype,
       
    71             QTMSStream& parent);
       
    72 
       
    73     gint CreateQueue(const gint aNumSlots);
       
    74     void ReceiveMsgQHandlerEventsL();
       
    75     };
       
    76 
       
    77 } //namespace QTMS
       
    78 
       
    79 #endif // QTMS_STREAM_IMPL_H
       
    80 
       
    81 // End of file