MapLink Pro 11.1.2.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Loading...
Searching...
No Matches
TSLOGCService Class Reference

Detailed Description

This class represents an instance of an OGC service, such as a WMS.

Instances are created via the create method of this class and should be deleted when finished with, except in the case where the instance is given to a TSLOGCServiceManager.

User requests should be passed to the processGetRequest method for processing.

Public Member Functions

 ~TSLOGCService ()
 
bool loadConfiguration (const char *configLocation)
 
TSLOGCMIMEResponseprocessGetRequest (const char *address, const char *request)
 
TSLOGCMIMEResponseprocessGetRequest (const char *address, const char *request, TSLOGCAttributes &attributes)
 
TSLOGCMIMEResponseprocessPostRequest (const char *address, const char *contentType, const unsigned char *body, unsigned int bodyLength)
 
TSLOGCMIMEResponseprocessPostRequest (const char *address, const char *contentType, const unsigned char *body, unsigned int bodyLength, TSLOGCAttributes &attributes)
 
const char * serviceName () const
 
void operator delete (void *pMem)
 

Static Public Member Functions

static TSLOGCServicecreate (const char *servicePlugin)
 

Constructor & Destructor Documentation

◆ ~TSLOGCService()

TSLOGCService::~TSLOGCService ( )

Member Function Documentation

◆ create()

static TSLOGCService * TSLOGCService::create ( const char * servicePlugin)
static

Constructs the requested service.

Parameters
servicePluginThe name of the service plug-in to load the service from.
Returns
a service instance if the service plug-in was loaded successfully. If the service plug-in was not found or failed to load, null will be returned.

◆ loadConfiguration()

bool TSLOGCService::loadConfiguration ( const char * configLocation)

Configures the service

Parameters
configLocationThe location of the configuration file to configure the service with.
Returns
true if the configuration file was found and loaded successfully, false otherwise.

◆ operator delete()

void TSLOGCService::operator delete ( void * pMem)

◆ processGetRequest() [1/2]

TSLOGCMIMEResponse * TSLOGCService::processGetRequest ( const char * address,
const char * request )

Processes an HTTP 'GET' formatted request

NOTE: Any URL encoded characters should have been decoded first. e.g. The space character is encoded as %20, it should have been translated back to a space character.

Parameters
addressThe URL through which the service was accessed
requestThe request query string - i.e. The parameters that appear after the '?' part of the address.

With the exception of the case when a null address or request is passed, a TSLOGCMIMEResponse instance will always be returned, although the contents of the response object may denote a service exception. The returned object is owned by the user and should be deleted when finished with.

◆ processGetRequest() [2/2]

TSLOGCMIMEResponse * TSLOGCService::processGetRequest ( const char * address,
const char * request,
TSLOGCAttributes & attributes )

Reserved for future use.

◆ processPostRequest() [1/2]

TSLOGCMIMEResponse * TSLOGCService::processPostRequest ( const char * address,
const char * contentType,
const unsigned char * body,
unsigned int bodyLength )

Processes an HTTP 'POST' formatted request

Parameters
addressThe URL through which the service was accessed
bodyThe POST body
bodyLengthThe length of the POST body, provided through the body parameter
contentTypeThe mimeType of the POST body.

With the exception of the case when any of the passed parameters are null, a TSLOGCMIMEResponse instance will always be returned, although the contents of the response object may denote a service exception. The returned object is owned by the user and should be deleted when finished with.

◆ processPostRequest() [2/2]

TSLOGCMIMEResponse * TSLOGCService::processPostRequest ( const char * address,
const char * contentType,
const unsigned char * body,
unsigned int bodyLength,
TSLOGCAttributes & attributes )

Reserved for future use.

◆ serviceName()

const char * TSLOGCService::serviceName ( ) const

Query the name of this service. E.G. "wms" etc.