Url Class Reference
URL Class, works with file urls, and also with rtsp or http. <short description="">. More...
#include <Url.hpp>
Public Member Functions | |
| Url (const char *url) | |
| int | getPort () const |
| void | setPort (int port) |
| const char * | getPath () const |
| returns the path of the url incl. | |
| const char * | getFileName () const |
| const char * | getServerName () const |
| const char * | getProtocol () const |
| returns the protocol without the ://, e.g. | |
| const char * | toString () const |
| builds an url. | |
| bool | isEqual (const Url *url, bool ignoreServerName=false) const |
| an url is equal if servername and path are equal | |
| bool | hasServerName () const |
| bool | hasPort () const |
| bool | hasPath () const |
| bool | hasProtocol () const |
Static Public Member Functions | |
| char * | transformUrlToLocalFile (const Url *) |
| char * | transformPathToLocalFile (const Url *) |
| bool | convertUrlToSocket (const char *serverName, const int port, struct sockaddr_in *outSockStruct, int &outSocket) |
| converts an url to an already connected UDP socket | |
| void | doTest () |
| automatically tests Url class for bugs, throws assertion if any is found | |
Detailed Description
URL Class, works with file urls, and also with rtsp or http. <short description="">.Note that NO RELATIVE PATHS are allowed in a file url, this must be a full path in the form of e:\ or e:/ or /path An Url is composed of several fields: protocol://serverName[:port][/][path] port and path are optional. If no protocol is specified, file:// is assumed
- Author:
- Michael Kropfberger and Peter Schojer
- Version:
- Id
- Url.hpp,v 1.10 2006/02/24 13:24:39 mkropfbe Exp
Definition at line 63 of file Url.hpp.
Member Function Documentation
|
|
returns the path of the url incl. a filename or NULL if none was found Definition at line 246 of file Url.cpp. Referenced by doTest(), and isEqual().
|
|
|
returns the protocol without the ://, e.g. "file", "rtsp" Definition at line 271 of file Url.cpp. Referenced by ContainerFile::loadContainerInfo().
|
|
||||||||||||
|
an url is equal if servername and path are equal
References getPath(), getServerName(), and hasPath(). Referenced by MetaObject::addMP4Stream().
|
|
|
builds an url. If the url has no path, it is guaranteed that the url will end with / (e.g.: "rtsp://127.0.0.1:3128/" Definition at line 292 of file Url.cpp. Referenced by ContainerInfo::clone(), doTest(), CacheManagerLRU::getVideo(), ContainerFile::loadContainerInfo(), ContainerInfo::loadFromCfgFile(), MetaObject::MetaObject(), SemiProxySession::play(), CacheManagerLRU::putVideo(), ContainerInfo::saveToCfgFile(), ServerSession::setUrl(), and ProxySession::setUrl().
|
The documentation for this class was generated from the following files: