ESA JPIP server  0.1
jpip::Request Class Reference

Class derived from the HTTP Request class that contains the required code for properly analyzing a JPIP request, when this protocol is used over the HTTP. More...

#include <request.h>

Inheritance diagram for jpip::Request:
Collaboration diagram for jpip::Request:

Classes

union  ParametersMask
 Union used to control the presence of the different JPIP parameters in a request. More...
 

Public Types

enum  RoundDirection { ROUNDUP, ROUNDDOWN, CLOSEST }
 Enumeration of the possible round directions of a WOI for specifying the resolution levels. More...
 
- Public Types inherited from http::Request
enum  Type { GET, POST, UNKNOWN }
 Request type enumeration. More...
 

Public Member Functions

istream & ParseModel (istream &stream)
 Parses a cache model from an input stream. More...
 
istream & GetCodedChar (istream &in, char &c)
 Gets a coded char from an input stream. More...
 
virtual void ParseParameters (istream &stream)
 Parses the parameters of a CGI HTTP request. More...
 
virtual void ParseParameter (istream &stream, const string &param, string &value)
 Parses one parameter of a CGI HTTP request. More...
 
 Request ()
 Empty constructor. More...
 
void GetResolution (const CodingParameters::Ptr &coding_parameters, WOI *woi) const
 Obtains the resolution level and modifies the given WOI to adjust it according to that level. More...
 
virtual ~Request ()
 
- Public Member Functions inherited from http::Request
 Request (Type type=Request::GET, const string &uri="/", const Protocol &protocol=Protocol(1, 1))
 Initializes the request. More...
 
bool Parse (const string &line)
 Parses a request from a string. More...
 
void ParseURI (const string &uri)
 Parses a URI from a string. More...
 

Public Attributes

Size woi_size
 WOI size. More...
 
Point woi_position
 WOI position. More...
 
int min_codestream
 Minimum codestream. More...
 
int max_codestream
 Maximum codestream. More...
 
int length_response
 Maximum response length. More...
 
ParametersMask mask
 Parameters mask. More...
 
Size resolution_size
 Size of the resolution level. More...
 
CacheModel cache_model
 Cache model. More...
 
RoundDirection round_direction
 Round direction. More...
 
- Public Attributes inherited from http::Request
Type type
 Request type (GET or POST) More...
 
string object
 Object associated to the request. More...
 
Protocol protocol
 Protocol version used. More...
 
map< string, string > parameters
 Map with all the parameters when using the CGI form. More...
 

Detailed Description

Class derived from the HTTP Request class that contains the required code for properly analyzing a JPIP request, when this protocol is used over the HTTP.

See also
http::Request
CacheModel

Member Enumeration Documentation

Enumeration of the possible round directions of a WOI for specifying the resolution levels.

Enumerator
ROUNDUP 

Round-up.

ROUNDDOWN 

Round-down.

CLOSEST 

Closest.

Constructor & Destructor Documentation

jpip::Request::Request ( )
inline

Empty constructor.

virtual jpip::Request::~Request ( )
inlinevirtual

Member Function Documentation

istream & jpip::Request::GetCodedChar ( istream &  in,
char &  c 
)

Gets a coded char from an input stream.

Parameters
inInput stream.
cReference to store the char.
Returns
The same input stream.

Here is the caller graph for this function:

void jpip::Request::GetResolution ( const CodingParameters::Ptr coding_parameters,
WOI woi 
) const
inline

Obtains the resolution level and modifies the given WOI to adjust it according to that level.

Parameters
coding_parametersAssociated coding parameters.
woiWOI to modify.

Here is the caller graph for this function:

istream & jpip::Request::ParseModel ( istream &  stream)

Parses a cache model from an input stream.

Parameters
streamInput stream.
Returns
The same input stream after the parsing.

Here is the call graph for this function:

Here is the caller graph for this function:

void jpip::Request::ParseParameter ( istream &  stream,
const string &  param,
string &  value 
)
virtual

Parses one parameter of a CGI HTTP request.

Parameters
streamInput stream.
paramString to store the parameter name.
valueString to store the parameter value.

Reimplemented from http::Request.

Here is the call graph for this function:

void jpip::Request::ParseParameters ( istream &  stream)
virtual

Parses the parameters of a CGI HTTP request.

Parameters
streamInput stream.

Reimplemented from http::Request.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

CacheModel jpip::Request::cache_model

Cache model.

int jpip::Request::length_response

Maximum response length.

ParametersMask jpip::Request::mask

Parameters mask.

int jpip::Request::max_codestream

Maximum codestream.

int jpip::Request::min_codestream

Minimum codestream.

Size jpip::Request::resolution_size

Size of the resolution level.

RoundDirection jpip::Request::round_direction

Round direction.

Point jpip::Request::woi_position

WOI position.

Size jpip::Request::woi_size

WOI size.


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