gloox::prep Namespace Reference

This namespace offers functions to stringprep the individual parts of a JID. More...


Functions

std::string nodeprep (const std::string &node)
std::string nameprep (const std::string &domain)
std::string resourceprep (const std::string &resource)
std::string idna (const std::string &domain)


Detailed Description

This namespace offers functions to stringprep the individual parts of a JID.

You should not need to use these functions directly. All the necessary prepping is done for you if you stick to the interfaces provided. If you write your own enhancements, check with the spec.

Note:
These functions depend on an installed LibIDN at compile time of gloox. If LibIDN is not installed these functions return the string they are given without any modification.
Author:
Jakob Schroeter <js@camaya.net>
Since:
0.2

Function Documentation

std::string idna ( const std::string &  domain  ) 

This function applies the idna() function to a string. I.e. it transforms internationalized domain names into plain ASCII.

Parameters:
domain The string to convert.
Returns:
Returns the converted string. In case of an error an empty string is returned. If LibIDN is not available the string is returned unchanged.

Definition at line 91 of file prep.cpp.

std::string nameprep ( const std::string &  domain  ) 

This function applies the Nameprep profile of Stringprep to a string.

Parameters:
domain The string to apply the profile to.
Returns:
Returns the prepped string. In case of an error an empty string is returned. If LibIDN is not available the string is returned unchanged.

Definition at line 73 of file prep.cpp.

std::string nodeprep ( const std::string &  node  ) 

This function applies the Nodeprep profile of Stringprep to a string.

Parameters:
node The string to apply the profile to.
Returns:
Returns the prepped string. In case of an error an empty string is returned. If LibIDN is not available the string is returned unchanged.

Definition at line 64 of file prep.cpp.

std::string resourceprep ( const std::string &  resource  ) 

This function applies the Resourceprep profile of Stringprep to a std::string.

Parameters:
resource The string to apply the profile to.
Returns:
Returns the prepped string. In case of an error an empty string is returned. If LibIDN is not available the string is returned unchanged.

Definition at line 82 of file prep.cpp.


Generated on Sun Apr 27 11:08:32 2008 for gloox by  doxygen 1.5.5