RequestHandler Class Reference

#include <request_handler.h>

Inheritance diagram for RequestHandler:
zmm::Object FileRequestHandler ServeRequestHandler URLRequestHandler WebRequestHandler web::action web::add web::addObject web::auth web::autoscan web::containers web::directories web::edit_load web::edit_save web::files web::items web::remove web::tasks web::voidType

Public Member Functions

virtual void get_info (IN const char *filename, OUT struct File_Info *info)=0
virtual zmm::Ref< IOHandleropen (IN const char *filename, OUT struct File_Info *info, IN enum UpnpOpenFileMode mode)=0
void retain ()
void release ()
int getRefCount ()

Static Public Member Functions

static void split_url (const char *url, char separator, zmm::String &path, zmm::String &parameters)
 Splits the url into a path and parameters string. Only '?' and '/' separators are allowed, otherwise an exception will be thrown.
static void * operator new (size_t size)
static void operator delete (void *ptr)

Protected Attributes

mt_atomic_t _ref_count
pthread_mutex_t mutex

Detailed Description

Definition at line 39 of file request_handler.h.

Member Function Documentation

virtual void RequestHandler::get_info ( IN const char *  filename,
OUT struct File_Info info 
) [pure virtual]
int Object::getRefCount (  )  [inherited]

Definition at line 78 of file

References zmm::Object::_ref_count, and atomic_get().

virtual zmm::Ref<IOHandler> RequestHandler::open ( IN const char *  filename,
OUT struct File_Info info,
IN enum UpnpOpenFileMode  mode 
) [pure virtual]
void Object::operator delete ( void *  ptr  )  [static, inherited]

Definition at line 87 of file

References FREE.

void * Object::operator new ( size_t  size  )  [static, inherited]

Definition at line 83 of file

References MALLOC.

void Object::release (  )  [inherited]
void Object::retain (  )  [inherited]
void RequestHandler::split_url ( const char *  url,
char  separator,
zmm::String path,
zmm::String parameters 
) [static]

Splits the url into a path and parameters string. Only '?' and '/' separators are allowed, otherwise an exception will be thrown.

url URL that has to be processed
path variable where the path portion will be saved
parameters variable where the parameters portion will be saved

This function splits the url into it's path and parameter components. content/media SEPARATOR object_id=12345&transcode=wav would be transformed to: path = "content/media" parameters = "object_id=12345&transcode=wav"

Definition at line 41 of file

References _, _Exception, zmm::String::index(), zmm::String::rindex(), and zmm::String::substring().

Referenced by create_request_handler(), ServeRequestHandler::get_info(), WebRequestHandler::open(), and ServeRequestHandler::open().

Field Documentation

mt_atomic_t zmm::Object::_ref_count [protected, inherited]
pthread_mutex_t zmm::Object::mutex [protected, inherited]

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

Generated on Fri Mar 26 20:16:57 2010 for MediaTomb by  doxygen 1.6.1