C++ Client  0.0.0.0
C++ wrapper for Corelink DLL
Corelink::StreamData Class Reference

#include <CorelinkClasses.h>

Public Member Functions

 StreamData ()
 
 ~StreamData ()
 
 StreamData (const StreamData &rhs)
 
StreamDataoperator= (const StreamData &rhs)
 
bool isSender () const
 
bool isReceiver () const
 

Static Public Member Functions

static StreamData parse (const char *data)
 
static bool isSender (const STREAM_ID &streamID)
 
static bool isReceiver (const STREAM_ID &streamID)
 
static StreamData getStreamData (const STREAM_ID &streamID)
 
static SendStream getSenderHandler (const STREAM_ID &streamID)
 
static RecvStream getReceiverHandler (const STREAM_ID &streamID)
 
static std::vector< STREAM_ID > listClientStreams ()
 
static std::vector< STREAM_ID > listStreamSources (const STREAM_ID &streamID)
 

Public Attributes

int streamID
 ID of the stream seen by the server. More...
 
int state
 Stores the type of the stream (UDP, TCP, WS & SEND, RECV). More...
 
int mtu
 Maximum transmission unit. Max size of packets transferable at a time. Not actually used as of now. More...
 
std::string user
 Username of the creator of the stream. More...
 
std::string workspace
 Workspace stream belongs to in the server. More...
 
std::string meta
 Additional data attached to the stream. More...
 
std::vector< std::string > type
 Type of the stream. Sender may only have a single type while Receiver has arbritary amount. More...
 

Friends

class Client
 
class DLLInit
 
class StreamData
 
class SendStream
 
class RecvStream
 
std::ostream & operator<< (std::ostream &os, const StreamData &rhs)
 

Detailed Description

Definition at line 346 of file CorelinkClasses.h.

Constructor & Destructor Documentation

◆ StreamData() [1/2]

Corelink::StreamData::StreamData ( )

◆ ~StreamData()

Corelink::StreamData::~StreamData ( )
inline

Definition at line 22 of file CorelinkStreamData.h.

◆ StreamData() [2/2]

Corelink::StreamData::StreamData ( const StreamData rhs)
inline

Definition at line 24 of file CorelinkStreamData.h.

Member Function Documentation

◆ getReceiverHandler()

RecvStream Corelink::StreamData::getReceiverHandler ( const STREAM_ID &  streamID)
inlinestatic

Creates a receiver handler to interact with the network.

Parameters
streamIDReceiver stream to create a handler for.
Returns
Handler to use the receiver stream if it is owned by client. Otherwise it returns a default constructed RecvStream (state = STATE_NONE, streamRef = -1).

Definition at line 128 of file CorelinkStreamData.h.

◆ getSenderHandler()

SendStream Corelink::StreamData::getSenderHandler ( const STREAM_ID &  streamID)
inlinestatic

Creates a sender handler to interact with the network.

Parameters
streamIDSender stream to create a handler for.
Returns
Handler to use the sender stream if it is owned by client. Otherwise it returns a default constructed SendStream (state = STATE_NONE, streamRef = -1).

Definition at line 120 of file CorelinkStreamData.h.

◆ getStreamData()

StreamData Corelink::StreamData::getStreamData ( const STREAM_ID &  streamID)
inlinestatic

Gets a copy of the data for a stream.

Parameters
streamIDClient stream to retrieve data from.
Returns
StreamData for the corresponding streamID if it is owned by client. Otherwise it returns a default constructed StreamData (state = STATE_NONE, streamRef = -1).

Definition at line 100 of file CorelinkStreamData.h.

◆ isReceiver() [1/2]

bool Corelink::StreamData::isReceiver ( ) const
inline

Checks whether this receiver is a sender on the client.

Returns
True if it is a receiver and false if it isn't.

Definition at line 91 of file CorelinkStreamData.h.

◆ isReceiver() [2/2]

bool Corelink::StreamData::isReceiver ( const STREAM_ID &  streamID)
inlinestatic

Gets whether a stream is a receiver on the client. This does not check for streams on the server.

Parameters
streamIDReceiver stream to check if exists.
Returns
True if receiver exists and false if it doesn't.

Definition at line 96 of file CorelinkStreamData.h.

◆ isSender() [1/2]

bool Corelink::StreamData::isSender ( ) const
inline

Checks whether this stream is a sender on the client.

Returns
True if it is a sender and false if it isn't.

Definition at line 82 of file CorelinkStreamData.h.

◆ isSender() [2/2]

bool Corelink::StreamData::isSender ( const STREAM_ID &  streamID)
inlinestatic

Checks whether a stream is a sender on the client. This does not check for streams on the server.

Parameters
streamIDSender stream to check if exists.
Returns
True if sender exists and false if it doesn't.

Definition at line 87 of file CorelinkStreamData.h.

◆ listClientStreams()

std::vector< STREAM_ID > Corelink::StreamData::listClientStreams ( )
inlinestatic

Gets all streams on client.

Returns
Vector of stream ids.

Definition at line 136 of file CorelinkStreamData.h.

◆ listStreamSources()

std::vector< STREAM_ID > Corelink::StreamData::listStreamSources ( const STREAM_ID &  streamID)
inlinestatic

Gets all sources for stream on client.

Returns
Vector of stream ids.

Definition at line 168 of file CorelinkStreamData.h.

◆ operator=()

StreamData & Corelink::StreamData::operator= ( const StreamData rhs)
inline

Definition at line 28 of file CorelinkStreamData.h.

◆ parse()

StreamData Corelink::StreamData::parse ( const char *  data)
inlinestatic

Definition at line 54 of file CorelinkStreamData.h.

Friends And Related Function Documentation

◆ Client

Client
friend

Definition at line 347 of file CorelinkClasses.h.

◆ DLLInit

friend class DLLInit
friend

Definition at line 348 of file CorelinkClasses.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const StreamData rhs 
)
friend

Definition at line 40 of file CorelinkStreamData.h.

◆ RecvStream

friend class RecvStream
friend

Definition at line 352 of file CorelinkClasses.h.

◆ SendStream

friend class SendStream
friend

Definition at line 351 of file CorelinkClasses.h.

◆ StreamData

Corelink::StreamData::StreamData
friend

Definition at line 350 of file CorelinkClasses.h.

Member Data Documentation

◆ meta

std::string Corelink::StreamData::meta

Additional data attached to the stream.

Definition at line 378 of file CorelinkClasses.h.

◆ mtu

int Corelink::StreamData::mtu

Maximum transmission unit. Max size of packets transferable at a time. Not actually used as of now.

Definition at line 372 of file CorelinkClasses.h.

◆ state

int Corelink::StreamData::state

Stores the type of the stream (UDP, TCP, WS & SEND, RECV).

Definition at line 370 of file CorelinkClasses.h.

◆ streamID

int Corelink::StreamData::streamID

ID of the stream seen by the server.

Definition at line 368 of file CorelinkClasses.h.

◆ type

std::vector<std::string> Corelink::StreamData::type

Type of the stream. Sender may only have a single type while Receiver has arbritary amount.

Definition at line 380 of file CorelinkClasses.h.

◆ user

std::string Corelink::StreamData::user

Username of the creator of the stream.

Definition at line 374 of file CorelinkClasses.h.

◆ workspace

std::string Corelink::StreamData::workspace

Workspace stream belongs to in the server.

Definition at line 376 of file CorelinkClasses.h.


The documentation for this class was generated from the following files: