FileRequestHandler Class Reference

#include <file_request_handler.h>

Inheritance diagram for FileRequestHandler:
RequestHandler zmm::Object

Public Member Functions

 FileRequestHandler ()
virtual void get_info (IN const char *filename, OUT struct File_Info *info)
virtual zmm::Ref< IOHandleropen (IN const char *filename, OUT struct File_Info *info, IN enum UpnpOpenFileMode mode)
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 file_request_handler.h.


Constructor & Destructor Documentation

FileRequestHandler::FileRequestHandler (  ) 

Definition at line 72 of file file_request_handler.cc.


Member Function Documentation

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

Definition at line 78 of file object.cc.

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

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

Definition at line 87 of file object.cc.

References FREE.

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

Definition at line 83 of file object.cc.

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, inherited]

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

Parameters:
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 request_handler.cc.

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