VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Gv::HttpServerConfig Class Reference

A configuration structure for Gv::HttpServerPeer holding default settings from the command-line which are then overriden by url parameters. More...

#include <gvhttpserver.h>

Public Member Functions

 HttpServerConfig ()
 Default constructor for reasonable default values.
 
void init (unsigned int idle_timeout, unsigned int first_image_timeout, G::EpochTime repeat_timeout, unsigned int refresh_header, const GNet::Address &gateway, bool more_verbose)
 Initialises the configuration from command-line parameters.
 
void init (unsigned int idle_timeout, unsigned int first_image_timeout, G::EpochTime repeat_timeout, unsigned int refresh_header, const std::string &type)
 Initialises the configuration from command-line parameters.
 
void init (const G::Url &)
 Further initialises the configuration from url parameters.
 
unsigned int idleTimeout () const
 Returns the connection idle timeout. More...
 
unsigned int firstImageTimeout () const
 Returns the first-image timeout. More...
 
G::EpochTime imageRepeatTimeout () const
 Returns the repeat timeout. More...
 
bool moreVerbose () const
 Returns true for more verbosity.
 
std::string type () const
 Returns the required content-type.
 
bool quick () const
 Returns true if requesting the most-recent data from the channel rather than waiting for the next update. More...
 
bool streaming () const
 Returns true if streaming using multipart/x-mixed-replace.
 
GNet::Address gateway () const
 Returns the gateway network address, or the default address if none.
 
int scale () const
 Returns the required scale factor.
 
bool monochrome () const
 Returns the monochrome flag.
 
unsigned int refresh () const
 Returns the value for the http refresh header.
 
bool withStatus () const
 Returns true if the status url is enabled.
 

Detailed Description

A configuration structure for Gv::HttpServerPeer holding default settings from the command-line which are then overriden by url parameters.

Definition at line 275 of file gvhttpserver.h.

Member Function Documentation

unsigned int Gv::HttpServerConfig::firstImageTimeout ( ) const

Returns the first-image timeout.

If no input image is received in this period after the http get request then the get fails with '503 image unavailable'.

Definition at line 134 of file gvhttpserver.cpp.

unsigned int Gv::HttpServerConfig::idleTimeout ( ) const

Returns the connection idle timeout.

This terminates the connection if no http commands are received, unless streaming.

Definition at line 129 of file gvhttpserver.cpp.

G::EpochTime Gv::HttpServerConfig::imageRepeatTimeout ( ) const

Returns the repeat timeout.

When streaming this is the maximum time spent waiting for a new input image; if nothing is available by then then the old image is resent.

Definition at line 164 of file gvhttpserver.cpp.

bool Gv::HttpServerConfig::quick ( ) const

Returns true if requesting the most-recent data from the channel rather than waiting for the next update.

Definition at line 149 of file gvhttpserver.cpp.


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