PTLib
Version 2.18.8
|
This class can be used to register various URL types with the host operating system so that URLs will automatically launch the correct application. More...
#include <pprocess.h>
Public Member Functions | |
HostSystemURLHandlerInfo () | |
HostSystemURLHandlerInfo (const PString &t) | |
void | SetIcon (const PString &icon) |
PString | GetIcon () const |
void | SetCommand (const PString &key, const PString &command) |
PString | GetCommand (const PString &key) const |
bool | GetFromSystem () |
bool | CheckIfRegistered () |
bool | Register () |
Static Public Member Functions | |
static bool | RegisterTypes (const PString &types, bool force=true) |
Public Attributes | |
PString | type |
This class can be used to register various URL types with the host operating system so that URLs will automatically launch the correct application.
The simplest way to use these functions is to add the code similar to the following to the Main function of the PProcess descendant
PString urlTypes("sip\nh323\nsips\nh323s"); if (!PProcess::HostSystemURLHandlerInfo::RegisterTypes(urlTypes, false)) PProcess::HostSystemURLHandlerInfo::RegisterTypes(urlTypes, true);
This will check to see if the URL types sip, h323, sips and h323s are registered with the operating system to launch the current application. If they are not, it will rewrite the system configuraton so that they will.
For more information on the Windows implementation, see the following link:
http://msdn2.microsoft.com/en-us/library/aa767914.aspx
|
inline |
|
inline |
bool PProcess::HostSystemURLHandlerInfo::CheckIfRegistered | ( | ) |
bool PProcess::HostSystemURLHandlerInfo::GetFromSystem | ( | ) |
PString PProcess::HostSystemURLHandlerInfo::GetIcon | ( | ) | const |
bool PProcess::HostSystemURLHandlerInfo::Register | ( | ) |
|
static |
void PProcess::HostSystemURLHandlerInfo::SetCommand | ( | const PString & | key, |
const PString & | command | ||
) |
void PProcess::HostSystemURLHandlerInfo::SetIcon | ( | const PString & | icon | ) |
PString PProcess::HostSystemURLHandlerInfo::type |