VirtualBox

Changeset 74776 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 11, 2018 5:30:59 PM (6 years ago)
Author:
vboxsync
Message:

Main: Started implementing the IDataStream interface

Location:
trunk/src/VBox/Main
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Makefile.kmk

    r74290 r74776  
    462462        src-server/ClientToken.cpp \
    463463        src-server/CloudProviderManagerImpl.cpp \
     464        src-server/DataStreamImpl.cpp \
    464465        src-server/DHCPServerImpl.cpp \
    465466        src-server/NetworkServiceRunner.cpp \
  • trunk/src/VBox/Main/include/DataStreamImpl.h

    r74761 r74776  
    2222#include "DataStreamWrap.h"
    2323
     24#include <iprt/semaphore.h>
    2425
    2526class ATL_NO_VTABLE DataStream
     
    4142    int i_write(const void *pvBuf, size_t cbWrite, size_t *pcbWritten);
    4243
     44    /// Marks the end of the stream.
     45    int i_close();
     46
    4347private:
    4448    // wrapped IDataStream attributes and methods
     
    4751
    4852private:
     53    /** Maximum number of bytes the buffer can hold. */
     54    unsigned long     m_aBufferSize;
     55    /** The temporary buffer the conversion process writes into and the user reads from. */
    4956    std::vector<BYTE> m_aBuffer;
     57    /** Event semaphore for waiting until data is available. */
     58    RTSEMEVENT        m_hSemEvtDataAvail;
     59    /** Event semaphore for waiting until there is room in the buffer for writing. */
     60    RTSEMEVENT        m_hSemEvtBufSpcAvail;
     61    /** Flag whether the end of stream flag is set. */
     62    bool              m_fEos;
    5063};
    5164
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette