qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Member Functions | List of all members
ICoreExtPacket Class Referenceabstract

#include <icoreextpacket.h>

Inheritance diagram for ICoreExtPacket:
Inheritance graph
Collaboration diagram for ICoreExtPacket:
Collaboration graph

Public Member Functions

 ICoreExtPacket ()=default
 
virtual ~ICoreExtPacket ()
 
 ICoreExtPacket (const ICoreExtPacket &)=default
 
ICoreExtPacketoperator= (const ICoreExtPacket &)=default
 
 ICoreExtPacket (ICoreExtPacket &&)=default
 
ICoreExtPacketoperator= (ICoreExtPacket &&)=default
 
virtual uint64_t addExtendedMessage (QString message)=0
 Adds message to packet. More...
 
virtual bool send ()=0
 Consumes the packet constructed with PacketBuilder packet and sends it to toxext. More...
 

Detailed Description

Abstraction around the toxext packet. The toxext flow is to allow several extensions to tack onto the same packet before sending it to avoid needing the toxext overhead for every single extension. This abstraction models a toxext packet list.

Intent is to retrieve a ICoreExtPacket from an ICoreExtPacketAllocator, append all relevant extension data, and then finally send the packet. After sending the packet is no longer guaranteed to be valid.

Definition at line 36 of file icoreextpacket.h.

Constructor & Destructor Documentation

◆ ICoreExtPacket() [1/3]

ICoreExtPacket::ICoreExtPacket ( )
default

◆ ~ICoreExtPacket()

ICoreExtPacket::~ICoreExtPacket ( )
virtualdefault

◆ ICoreExtPacket() [2/3]

ICoreExtPacket::ICoreExtPacket ( const ICoreExtPacket )
default

◆ ICoreExtPacket() [3/3]

ICoreExtPacket::ICoreExtPacket ( ICoreExtPacket &&  )
default

Member Function Documentation

◆ addExtendedMessage()

virtual uint64_t ICoreExtPacket::addExtendedMessage ( QString  message)
pure virtual

Adds message to packet.

Returns
Extended message receipt, UINT64_MAX on failure
Note
Any other extensions related to this message have to be added before the message itself

Implemented in CoreExt::Packet.

◆ operator=() [1/2]

ICoreExtPacket& ICoreExtPacket::operator= ( const ICoreExtPacket )
default

◆ operator=() [2/2]

ICoreExtPacket& ICoreExtPacket::operator= ( ICoreExtPacket &&  )
default

◆ send()

virtual bool ICoreExtPacket::send ( )
pure virtual

Consumes the packet constructed with PacketBuilder packet and sends it to toxext.

Implemented in CoreExt::Packet.


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