ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cRequestBroker

This is the default implementation of IStreamingRequests used by requestable_writer. More...

#include <requestable_writer.h>

Inheritance diagram for cRequestBroker:
[legend]

Public Member Functions

 cRequestBroker (cSampleWriter *pWriter=nullptr)
 Default constructor.
 
 ~cRequestBroker () override
 Destructor.
 
void SetCallbacks (std::function< void(uint32_t, const base::IProperties *)> fnEnable, std::function< void(uint32_t)> fnDisable)
 Sets the callbacks for enabling and disabling specific Substreams.
 
void UpdateType (const ucom::ant::iobject_ptr< const IStreamType > &pType)
 Call this when you updated your Substreams type.
 
void DisableCurrentRequests (bool bCallDisableCallback=false)
 This will disable all current requests.
 
tResult RequestSamples (ucom::ant::iobject_ptr< IStreamingRequest > &pRequest, uint32_t nSubStreamId, const base::ant::IProperties *pRequestProperties=nullptr) override
 
void RegisterStreamTypeHandler (IStreamTypeHandler &oHandler) override
 
void UnregisterStreamTypeHandler (IStreamTypeHandler &oHandler) override
 
- Public Member Functions inherited from object< Bases >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast()
 

Private Attributes

std::unique_ptr< cImplementation > m_pImplementation
 

Additional Inherited Members

- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

This is the default implementation of IStreamingRequests used by requestable_writer.

Definition at line 27 of file requestable_writer.h.

Constructor & Destructor Documentation

◆ cRequestBroker()

cRequestBroker ( cSampleWriter * pWriter = nullptr)

Default constructor.

Parameters
[in]pWriterThe writer instance that this broker is associated with. This is used for error handling.

Member Function Documentation

◆ DisableCurrentRequests()

void DisableCurrentRequests ( bool bCallDisableCallback = false)

This will disable all current requests.

Parameters
[in]bCallDisableCallbackif true, the callback for disabling Substreams will be called for each currently enabled Substream.

◆ SetCallbacks()

void SetCallbacks ( std::function< void(uint32_t, const base::IProperties *)> fnEnable,
std::function< void(uint32_t)> fnDisable )

Sets the callbacks for enabling and disabling specific Substreams.

Parameters
[in]fnEnableThis is called when the first consumer requests a specific Substream.
[in]fnDisableThis is called when the last consumer cancels its request for a Substream.

◆ UpdateType()

void UpdateType ( const ucom::ant::iobject_ptr< const IStreamType > & pType)

Call this when you updated your Substreams type.

Parameters
[in]pTypeThe new Stream Type.

Member Data Documentation

◆ m_pImplementation

std::unique_ptr<cImplementation> m_pImplementation
private

Definition at line 70 of file requestable_writer.h.