#include <Transport.H>
Public Member Functions | |
| void * | impl () |
| Transport (bool encapsulating) | |
| An argument of false means decapsulating. | |
| virtual | ~Transport () |
| Disallows deletion. Throws NoDeletion exception. | |
| long | serialNo (long) |
| Get the next unclaimed serial no. | |
| Logical * | logical (long serialNo) |
| Returns the Logical with serialNo. | |
| void | loop () |
| Encapsulation/decapsulation loop in Transport thread. | |
| void | terminate () |
| Called by thread other than Transport or in call backs. | |
| virtual void | sendCallback (Page &) |
| Send call back. | |
| virtual size_t | recvCallback (Page &) |
| Receive call back. | |
| virtual bool | laterThan (const Page &p1, const Page &p2) |
| Transport page ordering function. | |
Static Public Attributes | |
| static const unsigned char | CurrentVersion = 0x00 |
Protected Member Functions | |
| Transport (int dummy) | |
| Despite appearance, derived classes should NOT call this. | |
Classes | |
| class | NoDeletion |
| Exception thrown by Transport::~Transport(). More... | |
| class | PrematureEndOfOggStream |
| Exception thrown by a reading Transport::loop. More... | |
Derive from this class and override Transport::sendCallback and Transport::recvCallback to provide the actual transport logic.
| Ogg::Transport::Transport | ( | int | dummy | ) | [inline, protected] |
Despite appearance, derived classes should NOT call this.
| Ogg::Transport::Transport | ( | bool | encapsulating | ) |
An argument of false means decapsulating.
| virtual Ogg::Transport::~Transport | ( | ) | [virtual] |
Disallows deletion. Throws NoDeletion exception.
| void* Ogg::Transport::impl | ( | ) | [inline] |
| long Ogg::Transport::serialNo | ( | long | ) |
Get the next unclaimed serial no.
For encapsulation, returns a valid unused serial number greater or equal to its argument. For decapsulation, returns the serial number of a detected logical stream greater than its argument
| void Ogg::Transport::loop | ( | ) |
Encapsulation/decapsulation loop in Transport thread.
On encapsulation, accepts initiations of Logical streams for sending. Enforces page ordering according to Ogg::operator<(Page, Page).
On decapsulation, makes ready first header packet for each logical stream. To be safe, instantiate the reading Logical instances before you loop.
Call this within a try block to catch exceptions. To force exit from the loop, call terminate from another thread or from within the call back methods.
| void Ogg::Transport::terminate | ( | ) |
const unsigned char Ogg::Transport::CurrentVersion = 0x00 [static] |
1.5.6