PTLib  Version 2.10.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PvCard::InlineValue Class Reference

Representation of EBNF img-inline-value/snd-inline-value. More...

#include <vcard.h>

Inheritance diagram for PvCard::InlineValue:
PvCard::URIValue PURL PObject

Public Member Functions

 InlineValue (const char *str=NULL)
 InlineValue (const PString &str)
virtual void PrintOn (ostream &strm) const
 Output the contents of the URL to the stream as a string.
virtual void ReadFrom (istream &strm)
 Input the contents of the URL from the stream.
InlineValueReadFromParam (const ParamMap &params)
- Public Member Functions inherited from PvCard::URIValue
 URIValue (const char *str=NULL)
 URIValue (const PString &str)
- Public Member Functions inherited from PURL
 PURL ()
 Construct a new URL object from the URL string.
 PURL (const char *cstr, const char *defaultScheme="http")
 Construct a new URL object from the URL string.
 PURL (const PString &str, const char *defaultScheme="http")
 Construct a new URL object from the URL string.
 PURL (const PFilePath &path)
 Construct a new URL object from the file path.
 PURL (const PURL &other)
PURLoperator= (const PURL &other)
PBoolean LegacyParse (const PString &url, const PURLLegacyScheme *schemeInfo)
PString LegacyAsString (PURL::UrlFormat fmt, const PURLLegacyScheme *schemeInfo) const
virtual Comparison Compare (const PObject &obj) const
 Compare the two URLs and return their relative rank.
virtual PINDEX HashFunction () const
 This function yields a hash value required by the PDictionary class.
PBoolean Parse (const char *cstr, const char *defaultScheme=NULL)
 Parse the URL string into the fields in the object instance.
PBoolean Parse (const PString &str, const char *defaultScheme=NULL)
 Parse the URL string into the fields in the object instance.
PString AsString (UrlFormat fmt=FullURL) const
 Convert the URL object into its string representation.
 operator PString () const
PFilePath AsFilePath () const
 Get the "file:" URL as a file path.
const PCaselessStringGetScheme () const
 Get the scheme field of the URL.
void SetScheme (const PString &scheme)
 Set the scheme field of the URL.
const PStringGetUserName () const
 Get the username field of the URL.
void SetUserName (const PString &username)
 Set the username field of the URL.
const PStringGetPassword () const
 Get the password field of the URL.
void SetPassword (const PString &password)
 Set the password field of the URL.
const PCaselessStringGetHostName () const
 Get the hostname field of the URL.
void SetHostName (const PString &hostname)
 Set the hostname field of the URL.
WORD GetPort () const
 Get the port field of the URL.
void SetPort (WORD newPort)
 Set the port field in the URL.
PBoolean GetPortSupplied () const
 Get if explicit port is specified.
PBoolean GetRelativePath () const
 Get if path is relative or absolute.
PString GetPathStr () const
 Get the path field of the URL as a string.
void SetPathStr (const PString &pathStr)
 Set the path field of the URL as a string.
const PStringArrayGetPath () const
 Get the path field of the URL as a string array.
void SetPath (const PStringArray &path)
 Set the path field of the URL as a string array.
void AppendPath (const PString &segment)
 Append segment to the path field of the URL.
PString GetParameters () const
 Get the parameter (;) field of the URL.
void SetParameters (const PString &parameters)
 Set the parameter (;) field of the URL.
const PStringOptionsGetParamVars () const
 Get the parameter (;) field(s) of the URL as a string dictionary.
void SetParamVars (const PStringToString &paramVars)
 Set the parameter (;) field(s) of the URL as a string dictionary.
void SetParamVar (const PString &key, const PString &data, bool emptyDataDeletes=true)
 Set the parameter (;) field of the URL as a string dictionary.
const PStringGetFragment () const
 Get the fragment (#) field of the URL.
PString GetQuery () const
 Get the Query (?) field of the URL as a string.
void SetQuery (const PString &query)
 Set the Query (?) field of the URL as a string.
const PStringOptionsGetQueryVars () const
 Get the Query (?) field of the URL as a string dictionary.
void SetQueryVars (const PStringToString &queryVars)
 Set the Query (?) field(s) of the URL as a string dictionary.
void SetQueryVar (const PString &key, const PString &data)
 Set the Query (?) field of the URL as a string dictionary.
const PStringGetContents () const
 Get the contents of URL, data left after all elemetns are parsed out.
void SetContents (const PString &str)
 Set the contents of URL, data left after all elemetns are parsed out.
PBoolean IsEmpty () const
 Return true if the URL is an empty string.
bool LoadResource (PString &data, const PString &requiredContentType=PString::Empty())
 Get the resource the URL is pointing at.
bool LoadResource (PBYTEArray &data, const PString &requiredContentType=PString::Empty())
bool OpenBrowser () const
 Open the URL in a browser.
- Public Member Functions inherited from PObject
virtual ~PObject ()
virtual PObjectClone () const
 Create a copy of the class on the heap.
virtual const char * GetClass (unsigned ancestor=0) const
 Get the current dynamic type of the object instance.
PBoolean IsClass (const char *cls) const
virtual PBoolean InternalIsDescendant (const char *clsName) const
 Determine if the dynamic type of the current instance is a descendent of the specified class.
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
 Determine the byte wise comparison of two objects.
bool operator== (const PObject &obj) const
 Compare the two objects.
bool operator!= (const PObject &obj) const
 Compare the two objects.
bool operator< (const PObject &obj) const
 Compare the two objects.
bool operator> (const PObject &obj) const
 Compare the two objects.
bool operator<= (const PObject &obj) const
 Compare the two objects.
bool operator>= (const PObject &obj) const
 Compare the two objects.

Additional Inherited Members

- Public Types inherited from PURL
enum  UrlFormat { FullURL, PathOnly, URIOnly, HostPortOnly }
 Print/String output representation formats. More...
enum  TranslationType {
  LoginTranslation, PathTranslation, QueryTranslation, ParameterTranslation,
  QuotedParameterTranslation
}
 Type for translation of strings to URL format,. More...
- Public Types inherited from PObject
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
 Result of the comparison operation performed by the Compare() function. More...
- Static Public Member Functions inherited from PURL
static PString TranslateString (const PString &str, TranslationType type)
 Translate a string from general form to one that can be included into a URL.
static PString UntranslateString (const PString &str, TranslationType type)
 Untranslate a string from a form that was included into a URL into a normal string.
static void SplitVars (const PString &str, PStringToString &vars, char sep1= ';', char sep2= '=', TranslationType type=ParameterTranslation)
 Split a string to a dictionary of names and values.
static void SplitQueryVars (const PString &queryStr, PStringToString &queryVars)
 Split a string in &= form to a dictionary of names and values.
static void OutputVars (ostream &strm, const PStringToString &vars, char sep0= ';', char sep1= ';', char sep2= '=', TranslationType type=ParameterTranslation)
 Construct string from a dictionary using separators.
static bool OpenBrowser (const PString &url)
- Static Public Member Functions inherited from PObject
static const char * Class ()
 Get the name of the class as a C string.
static Comparison InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size)
 Internal function caled from CompareObjectMemoryDirect()
- Protected Member Functions inherited from PURL
void CopyContents (const PURL &other)
virtual PBoolean InternalParse (const char *cstr, const char *defaultScheme)
void Recalculate ()
- Protected Attributes inherited from PURL
PString urlString
PCaselessString scheme
PString username
PString password
PCaselessString hostname
WORD port
PBoolean portSupplied
PBoolean relativePath
 port was supplied in string input
PStringArray path
PStringOptions paramVars
PString fragment
PStringOptions queryVars
PString m_contents
- Friends inherited from PObject

Detailed Description

Representation of EBNF img-inline-value/snd-inline-value.

Constructor & Destructor Documentation

PvCard::InlineValue::InlineValue ( const char *  str = NULL)
inline
PvCard::InlineValue::InlineValue ( const PString str)
inline

Member Function Documentation

virtual void PvCard::InlineValue::PrintOn ( ostream &  strm) const
virtual

Output the contents of the URL to the stream as a string.

Reimplemented from PvCard::URIValue.

virtual void PvCard::InlineValue::ReadFrom ( istream &  strm)
virtual

Input the contents of the URL from the stream.

The input is a URL in string form.

Reimplemented from PvCard::URIValue.

InlineValue& PvCard::InlineValue::ReadFromParam ( const ParamMap params)

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