All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
httpsvc.h
Go to the documentation of this file.
/*
* httpsvc.h
*
* Common classes for service applications using HTTP as the user interface.
*
* Portable Windows Library
*
* Copyright (c) 1993-2002 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Portable Windows Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Contributor(s): ______________________________________.
*
* $Revision: 24177 $
* $Author: rjongbloed $
* $Date: 2010-04-05 06:52:04 -0500 (Mon, 05 Apr 2010) $
*/
#ifndef PTLIB_HTTPSVC_H
#define PTLIB_HTTPSVC_H
#include <ptlib/svcproc.h>
#include <ptlib/sockets.h>
#include <ptclib/httpform.h>
#include <ptclib/cypher.h>
class PHTTPServiceProcess;
class PHTTPServiceThread : public PThread
{
PCLASSINFO(PHTTPServiceThread, PThread)
public:
PHTTPServiceThread(PINDEX stackSize,
PHTTPServiceProcess & app);
~PHTTPServiceThread();
void Main();
void Close();
protected:
PINDEX myStackSize;
PHTTPServiceProcess & process;
PTCPSocket * socket;
};
class PHTTPServiceProcess : public PServiceProcess
{
PCLASSINFO(PHTTPServiceProcess, PServiceProcess)
public:
enum {
MaxSecuredKeys = 10
};
struct Info {
const char * productName;
const char * manufacturerName;
WORD majorVersion;
WORD minorVersion;
CodeStatus buildStatus;
WORD buildNumber;
const char * compilationDate;
PTEACypher::Key productKey;
const char * securedKeys[MaxSecuredKeys];
PINDEX securedKeyCount;
PTEACypher::Key signatureKey;
const char * manufHomePage;
const char * email;
const char * productHTML;
const char * gifHTML;
const char * gifFilename;
int gifWidth;
int gifHeight;
const char * copyrightHolder;
const char * copyrightHomePage;
const char * copyrightEmail;
};
PHTTPServiceProcess(const Info & inf);
~PHTTPServiceProcess();
PBoolean OnStart();
void OnStop();
PBoolean OnPause();
void OnContinue();
const char * GetServiceDependencies() const;
virtual void OnConfigChanged() = 0;
virtual PBoolean Initialise(const char * initMsg) = 0;
PBoolean ListenForHTTP(
WORD port,
PSocket::Reusability reuse = PSocket::CanReuseAddress,
PINDEX stackSize = 0x4000
);
PBoolean ListenForHTTP(
PSocket * listener,
PSocket::Reusability reuse = PSocket::CanReuseAddress,
PINDEX stackSize = 0x4000
);
virtual PString GetPageGraphic();
void GetPageHeader(PHTML &);
void GetPageHeader(PHTML &, const PString & title);
virtual PString GetCopyrightText();
const PString & GetMacroKeyword() const { return macroKeyword; }
const PTime & GetCompilationDate() const { return compilationDate; }
const PString & GetHomePage() const { return manufacturersHomePage; }
const PString & GetEMailAddress() const { return manufacturersEmail; }
const PString & GetProductName() const { return productNameHTML; }
const PTEACypher::Key & GetProductKey() const { return productKey; }
const PStringArray & GetSecuredKeys() const { return securedKeys; }
const PTEACypher::Key & GetSignatureKey() const { return signatureKey; }
PBoolean ShouldIgnoreSignatures() const { return ignoreSignatures; }
void SetIgnoreSignatures(PBoolean ig) { ignoreSignatures = ig; }
static PHTTPServiceProcess & Current();
virtual void AddRegisteredText(PHTML & html);
virtual void AddUnregisteredText(PHTML & html);
virtual PBoolean SubstituteEquivalSequence(PHTTPRequest & request, const PString &, PString &);
virtual PHTTPServer * CreateHTTPServer(PTCPSocket & socket);
virtual PHTTPServer * OnCreateHTTPServer(const PHTTPSpace & urlSpace);
PTCPSocket * AcceptHTTP();
PBoolean ProcessHTTP(PTCPSocket & socket);
protected:
PSocket * httpListeningSocket;
PHTTPSpace httpNameSpace;
PString macroKeyword;
PTEACypher::Key productKey;
PStringArray securedKeys;
PTEACypher::Key signatureKey;
PBoolean ignoreSignatures;
PTime compilationDate;
PString manufacturersHomePage;
PString manufacturersEmail;
PString productNameHTML;
PString gifHTML;
PString copyrightHolder;
PString copyrightHomePage;
PString copyrightEmail;
void ShutdownListener();
void BeginRestartSystem();
void CompleteRestartSystem();
PThread * restartThread;
PLIST(ThreadList, PHTTPServiceThread);
ThreadList httpThreads;
PMutex httpThreadsMutex;
friend class PConfigPage;
friend class PConfigSectionsPage;
friend class PHTTPServiceThread;
};
class PConfigPage : public PHTTPConfig
{
PCLASSINFO(PConfigPage, PHTTPConfig)
public:
PConfigPage(
PHTTPServiceProcess & app,
const PString & section,
const PHTTPAuthority & auth
);
PConfigPage(
PHTTPServiceProcess & app,
const PString & title,
const PString & section,
const PHTTPAuthority & auth
);
void OnLoadedText(PHTTPRequest &, PString & text);
PBoolean OnPOST(
PHTTPServer & server,
const PURL & url,
const PMIMEInfo & info,
const PStringToString & data,
const PHTTPConnectionInfo & connectInfo
);
virtual PBoolean Post(
PHTTPRequest & request,
const PStringToString & data,
PHTML & replyMessage
);
protected:
virtual PBoolean GetExpirationDate(
PTime & when
);
PHTTPServiceProcess & process;
};
class PConfigSectionsPage : public PHTTPConfigSectionList
{
PCLASSINFO(PConfigSectionsPage, PHTTPConfigSectionList)
public:
PConfigSectionsPage(
PHTTPServiceProcess & app,
const PURL & url,
const PHTTPAuthority & auth,
const PString & prefix,
const PString & valueName,
const PURL & editSection,
const PURL & newSection,
const PString & newTitle,
PHTML & heading
);
void OnLoadedText(PHTTPRequest &, PString & text);
PBoolean OnPOST(
PHTTPServer & server,
const PURL & url,
const PMIMEInfo & info,
const PStringToString & data,
const PHTTPConnectionInfo & connectInfo
);
virtual PBoolean Post(
PHTTPRequest & request,
const PStringToString & data,
PHTML & replyMessage
);
protected:
virtual PBoolean GetExpirationDate(
PTime & when
);
PHTTPServiceProcess & process;
};
class PRegisterPage : public PConfigPage
{
PCLASSINFO(PRegisterPage, PConfigPage)
public:
PRegisterPage(
PHTTPServiceProcess & app,
const PHTTPAuthority & auth
);
PString LoadText(
PHTTPRequest & request
);
void OnLoadedText(PHTTPRequest & request, PString & text);
virtual PBoolean Post(
PHTTPRequest & request,
const PStringToString & data,
PHTML & replyMessage
);
virtual void AddFields(
const PString & prefix
) = 0;
protected:
PHTTPServiceProcess & process;
};
class PServiceHTML : public PHTML
{
PCLASSINFO(PServiceHTML, PHTML)
public:
PServiceHTML(const char * title,
const char * help = NULL,
const char * helpGif = "help.gif");
PString ExtractSignature(PString & out);
static PString ExtractSignature(const PString & html,
PString & out,
const char * keyword = "#equival");
PString CalculateSignature();
static PString CalculateSignature(const PString & out);
static PString CalculateSignature(const PString & out, const PTEACypher::Key & sig);
PBoolean CheckSignature();
static PBoolean CheckSignature(const PString & html);
enum MacroOptions {
NoOptions = 0,
NeedSignature = 1,
LoadFromFile = 2,
NoURLOverride = 4,
NoSignatureForFile = 8
};
static bool ProcessMacros(
PHTTPRequest & request,
PString & text,
const PString & filename,
unsigned options
);
static bool SpliceMacro(
PString & text,
const PString & tokens,
const PString & value
);
};
class PServiceMacro : public PObject
{
public:
PServiceMacro(const char * name, PBoolean isBlock);
PServiceMacro(const PCaselessString & name, PBoolean isBlock);
Comparison Compare(const PObject & obj) const;
virtual PString Translate(
PHTTPRequest & request,
const PString & args,
const PString & block
) const;
protected:
const char * macroName;
PBoolean isMacroBlock;
PServiceMacro * link;
static PServiceMacro * list;
friend class PServiceMacros_list;
};
#define P_EMPTY
#define PCREATE_SERVICE_MACRO(name, request, args) \
class PServiceMacro_##name : public PServiceMacro { \
public: \
PServiceMacro_##name() : PServiceMacro(#name, false) { } \
PString Translate(PHTTPRequest &, const PString &, const PString &) const; \
}; \
static const PServiceMacro_##name serviceMacro_##name; \
PString PServiceMacro_##name::Translate(PHTTPRequest & request, const PString & args, const PString &) const
#define PCREATE_SERVICE_MACRO_BLOCK(name, request, args, block) \
class PServiceMacro_##name : public PServiceMacro { \
public: \
PServiceMacro_##name() : PServiceMacro(#name, true) { } \
PString Translate(PHTTPRequest &, const PString &, const PString &) const; \
}; \
static const PServiceMacro_##name serviceMacro_##name; \
PString PServiceMacro_##name::Translate(PHTTPRequest & request, const PString & args, const PString & block) const
class PServiceHTTPString : public PHTTPString
{
PCLASSINFO(PServiceHTTPString, PHTTPString)
public:
PServiceHTTPString(const PURL & url, const PString & string)
: PHTTPString(url, string) { }
PServiceHTTPString(const PURL & url, const PHTTPAuthority & auth)
: PHTTPString(url, auth) { }
PServiceHTTPString(const PURL & url, const PString & string, const PHTTPAuthority & auth)
: PHTTPString(url, string, auth) { }
PServiceHTTPString(const PURL & url, const PString & string, const PString & contentType)
: PHTTPString(url, string, contentType) { }
PServiceHTTPString(const PURL & url, const PString & string, const PString & contentType, const PHTTPAuthority & auth)
: PHTTPString(url, string, contentType, auth) { }
PString LoadText(PHTTPRequest &);
protected:
virtual PBoolean GetExpirationDate(
PTime & when
);
};
class PServiceHTTPFile : public PHTTPFile
{
PCLASSINFO(PServiceHTTPFile, PHTTPFile)
public:
PServiceHTTPFile(const PString & filename, PBoolean needSig = false)
: PHTTPFile(filename) { needSignature = needSig; }
PServiceHTTPFile(const PString & filename, const PFilePath & file, PBoolean needSig = false)
: PHTTPFile(filename, file) { needSignature = needSig; }
PServiceHTTPFile(const PString & filename, const PString & file, PBoolean needSig = false)
: PHTTPFile(filename, file) { needSignature = needSig; }
PServiceHTTPFile(const PString & filename, const PHTTPAuthority & auth, PBoolean needSig = false)
: PHTTPFile(filename, auth) { needSignature = needSig; }
PServiceHTTPFile(const PString & filename, const PFilePath & file, const PHTTPAuthority & auth, PBoolean needSig = false)
: PHTTPFile(filename, file, auth) { needSignature = needSig; }
void OnLoadedText(PHTTPRequest &, PString & text);
protected:
virtual PBoolean GetExpirationDate(
PTime & when
);
PBoolean needSignature;
};
class PServiceHTTPDirectory : public PHTTPDirectory
{
PCLASSINFO(PServiceHTTPDirectory, PHTTPDirectory)
public:
PServiceHTTPDirectory(const PURL & url, const PDirectory & dirname, PBoolean needSig = false)
: PHTTPDirectory(url, dirname) { needSignature = needSig; }
PServiceHTTPDirectory(const PURL & url, const PDirectory & dirname, const PHTTPAuthority & auth, PBoolean needSig = false)
: PHTTPDirectory(url, dirname, auth) { needSignature = needSig; }
void OnLoadedText(PHTTPRequest &, PString & text);
protected:
virtual PBoolean GetExpirationDate(
PTime & when
);
PBoolean needSignature;
};
#endif // PTLIB_HTTPSVC_H
// End Of File ///////////////////////////////////////////////////////////////
PRegisterPage::process
PHTTPServiceProcess & process
Definition: httpsvc.h:302
PHTTPServiceProcess::Info::signatureKey
PTEACypher::Key signatureKey
Signature key for encryption of HTML files.
Definition: httpsvc.h:87
svcproc.h
PServiceHTML::ProcessMacros
static bool ProcessMacros(PHTTPRequest &request, PString &text, const PString &filename, unsigned options)
PHTTPServiceThread::socket
PTCPSocket * socket
Definition: httpsvc.h:59
PMIMEInfo
This class contains the Multipurpose Internet Mail Extensions parameters and variables.
Definition: mime.h:52
PHTTPServiceProcess::signatureKey
PTEACypher::Key signatureKey
Definition: httpsvc.h:161
PHTTPServiceProcess::securedKeys
PStringArray securedKeys
Definition: httpsvc.h:160
PServiceHTML::CheckSignature
PBoolean CheckSignature()
PHTTPServiceProcess::Info
Definition: httpsvc.h:73
PHTTPServiceProcess::SubstituteEquivalSequence
virtual PBoolean SubstituteEquivalSequence(PHTTPRequest &request, const PString &, PString &)
PRegisterPage::PRegisterPage
PRegisterPage(PHTTPServiceProcess &app, const PHTTPAuthority &auth)
PRegisterPage::OnLoadedText
void OnLoadedText(PHTTPRequest &request, PString &text)
This is called after the text has been loaded and may be used to customise or otherwise mangle a load...
PHTTPServiceProcess::GetCopyrightText
virtual PString GetCopyrightText()
PHTTPServiceProcess::productNameHTML
PString productNameHTML
Definition: httpsvc.h:167
PRegisterPage
Definition: httpsvc.h:277
PCLASSINFO
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
PConfigPage::Post
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
Get a block of data (eg HTML) that the resource contains.
PHTTPServiceProcess::GetSecuredKeys
const PStringArray & GetSecuredKeys() const
Definition: httpsvc.h:139
PHTTPServiceThread::~PHTTPServiceThread
~PHTTPServiceThread()
PHTTPServiceProcess::gifHTML
PString gifHTML
Definition: httpsvc.h:168
PServiceHTML::NoURLOverride
Definition: httpsvc.h:332
PHTTPServiceProcess::httpListeningSocket
PSocket * httpListeningSocket
Definition: httpsvc.h:155
PHTTPServiceThread::Close
void Close()
PConfigSectionsPage::GetExpirationDate
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
PHTTPAuthority
This abstract class describes the authorisation mechanism for a Universal Resource Locator...
Definition: http.h:1002
PTime
This class defines an absolute time and date.
Definition: ptime.h:53
PHTTPServiceProcess::GetHomePage
const PString & GetHomePage() const
Definition: httpsvc.h:135
PConfigPage::OnLoadedText
void OnLoadedText(PHTTPRequest &, PString &text)
This is called after the text has been loaded and may be used to customise or otherwise mangle a load...
PConfigPage::PConfigPage
PConfigPage(PHTTPServiceProcess &app, const PString &section, const PHTTPAuthority &auth)
PHTTPServiceProcess::SetIgnoreSignatures
void SetIgnoreSignatures(PBoolean ig)
Definition: httpsvc.h:142
PServiceMacro::PServiceMacros_list
friend class PServiceMacros_list
Definition: httpsvc.h:367
PHTTPServiceProcess::BeginRestartSystem
void BeginRestartSystem()
PHTTPServiceProcess::OnStart
PBoolean OnStart()
Called when the service is started.
PServiceHTTPString::GetExpirationDate
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
PRegisterPage::Post
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
Get a block of data (eg HTML) that the resource contains.
PServiceHTTPString::PServiceHTTPString
PServiceHTTPString(const PURL &url, const PString &string, const PString &contentType)
Definition: httpsvc.h:410
PServiceHTTPString::PServiceHTTPString
PServiceHTTPString(const PURL &url, const PString &string, const PString &contentType, const PHTTPAuthority &auth)
Definition: httpsvc.h:413
PHTTPServiceProcess::CompleteRestartSystem
void CompleteRestartSystem()
PHTTPServiceProcess::Info::manufacturerName
const char * manufacturerName
Definition: httpsvc.h:75
PHTTPServiceProcess::copyrightHolder
PString copyrightHolder
Definition: httpsvc.h:169
PStringToString
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:2784
PFilePath
This class describes a full description for a file on the particular platform.
Definition: filepath.h:65
PObject::Comparison
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
PServiceHTTPDirectory::PServiceHTTPDirectory
PServiceHTTPDirectory(const PURL &url, const PDirectory &dirname, PBoolean needSig=false)
Definition: httpsvc.h:454
PHTTPServiceProcess::manufacturersHomePage
PString manufacturersHomePage
Definition: httpsvc.h:165
PHTTPServiceProcess::macroKeyword
PString macroKeyword
Definition: httpsvc.h:157
PServiceHTTPString::PServiceHTTPString
PServiceHTTPString(const PURL &url, const PHTTPAuthority &auth)
Definition: httpsvc.h:404
PHTTPServiceProcess::GetEMailAddress
const PString & GetEMailAddress() const
Definition: httpsvc.h:136
PConfigSectionsPage::Post
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
Get a block of data (eg HTML) that the resource contains.
PServiceHTTPFile::PServiceHTTPFile
PServiceHTTPFile(const PString &filename, const PFilePath &file, PBoolean needSig=false)
Definition: httpsvc.h:431
PCaselessString
This class is a variation of a string that ignores case.
Definition: pstring.h:1708
PHTTPServiceProcess::copyrightEmail
PString copyrightEmail
Definition: httpsvc.h:171
PHTTPServiceProcess::productKey
PTEACypher::Key productKey
Definition: httpsvc.h:159
PServiceHTTPDirectory::needSignature
PBoolean needSignature
Definition: httpsvc.h:467
PHTTPFile
This object describes a HyperText Transport Protocol resource which is a single file.
Definition: http.h:1614
PStringArray
This is an array collection class of PString objects.
Definition: pstring.h:2024
PHTTPServiceProcess::GetCompilationDate
const PTime & GetCompilationDate() const
Definition: httpsvc.h:134
PServiceHTTPString
Definition: httpsvc.h:397
PHTTPServiceProcess::Info::compilationDate
const char * compilationDate
Definition: httpsvc.h:81
PHTTPString
This object describes a HyperText Transport Protocol resource which is a string kept in memory...
Definition: http.h:1525
PHTTPServiceThread
Definition: httpsvc.h:45
PServiceMacro::macroName
const char * macroName
Definition: httpsvc.h:363
PHTTPServiceThread::Main
void Main()
User override function for the main execution routine of the thread.
PHTTPServiceProcess::ProcessHTTP
PBoolean ProcessHTTP(PTCPSocket &socket)
PHTTPServiceThread::myStackSize
PINDEX myStackSize
Definition: httpsvc.h:57
PHTTPDirectory
This object describes a HyperText Transport Protocol resource which is a set of files in a directory...
Definition: http.h:1819
PHTTPServiceThread::PHTTPServiceThread
PHTTPServiceThread(PINDEX stackSize, PHTTPServiceProcess &app)
PHTTPServiceProcess::Info::productHTML
const char * productHTML
HTML for the product name, if NULL defaults to the productName variable.
Definition: httpsvc.h:91
PHTTPServiceProcess::Info::gifFilename
const char * gifFilename
File name for the products GIF file.
Definition: httpsvc.h:95
PBoolean
BOOL PBoolean
Definition: object.h:102
PHTTPConfig::section
PString section
Definition: httpform.h:876
PDirectory
Class to represent a directory in the operating system file system.
Definition: pdirect.h:182
PServiceHTML
Definition: httpsvc.h:308
PHTTPServiceProcess::AddUnregisteredText
virtual void AddUnregisteredText(PHTML &html)
PServiceHTTPFile::PServiceHTTPFile
PServiceHTTPFile(const PString &filename, PBoolean needSig=false)
Definition: httpsvc.h:429
PHTTPServiceProcess::~PHTTPServiceProcess
~PHTTPServiceProcess()
PHTTPServiceProcess::PHTTPServiceProcess
PHTTPServiceProcess(const Info &inf)
PHTTPServiceProcess::Info::gifHeight
int gifHeight
in the generated HTML.
Definition: httpsvc.h:97
PHTTPServiceProcess::Info::buildStatus
CodeStatus buildStatus
AlphaCode, BetaCode or ReleaseCode.
Definition: httpsvc.h:79
PSocket::CanReuseAddress
Definition: socket.h:85
PHTTPServiceProcess::Info::manufHomePage
const char * manufHomePage
WWW address of manufacturers home page.
Definition: httpsvc.h:89
PServiceProcess
A process type that runs as a "background" service.
Definition: svcproc.h:49
PHTTPServiceProcess::Info::email
const char * email
contact email for manufacturer
Definition: httpsvc.h:90
PConfigPage
Definition: httpsvc.h:191
PHTTPServiceProcess::Info::securedKeys
const char * securedKeys[MaxSecuredKeys]
Product secured keys for registration.
Definition: httpsvc.h:84
PHTTPServiceProcess::PLIST
PLIST(ThreadList, PHTTPServiceThread)
PHTTPServiceProcess::Info::gifWidth
int gifWidth
Size of GIF image, if zero then none is used.
Definition: httpsvc.h:96
PHTTPServiceProcess::GetPageHeader
void GetPageHeader(PHTML &)
PServiceMacro::Compare
Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
PServiceHTTPFile::GetExpirationDate
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
PServiceHTML::NeedSignature
Definition: httpsvc.h:330
PServiceHTTPFile::needSignature
PBoolean needSignature
Definition: httpsvc.h:447
PHTTPServiceProcess::Info::securedKeyCount
PINDEX securedKeyCount
Definition: httpsvc.h:85
PHTTPServiceProcess::httpThreadsMutex
PMutex httpThreadsMutex
Definition: httpsvc.h:181
PConfigPage::GetExpirationDate
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
PHTTPServiceProcess::compilationDate
PTime compilationDate
Definition: httpsvc.h:164
PServiceMacro::link
PServiceMacro * link
Definition: httpsvc.h:365
PHTTPServiceProcess::AddRegisteredText
virtual void AddRegisteredText(PHTML &html)
PConfigSectionsPage::OnPOST
PBoolean OnPOST(PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PStringToString &data, const PHTTPConnectionInfo &connectInfo)
Handle the POST command passed from the HTTP socket.
PHTTPServiceProcess::ShutdownListener
void ShutdownListener()
PRegisterPage::AddFields
virtual void AddFields(const PString &prefix)=0
PServiceHTTPDirectory::GetExpirationDate
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
PHTTPServiceProcess::AcceptHTTP
PTCPSocket * AcceptHTTP()
PConfigSectionsPage::PConfigSectionsPage
PConfigSectionsPage(PHTTPServiceProcess &app, const PURL &url, const PHTTPAuthority &auth, const PString &prefix, const PString &valueName, const PURL &editSection, const PURL &newSection, const PString &newTitle, PHTML &heading)
PHTTPServiceProcess::ShouldIgnoreSignatures
PBoolean ShouldIgnoreSignatures() const
Definition: httpsvc.h:141
PHTTPServiceProcess::Current
static PHTTPServiceProcess & Current()
cypher.h
PRegisterPage::LoadText
PString LoadText(PHTTPRequest &request)
Get a block of text data (eg HTML) that the resource contains.
PHTTPServiceProcess::GetProductName
const PString & GetProductName() const
Definition: httpsvc.h:137
PString
The character string class.
Definition: pstring.h:108
PTEACypher::Key
Definition: cypher.h:639
PServiceMacro
Definition: httpsvc.h:351
PHTTPServiceProcess::OnContinue
void OnContinue()
Resume after the service was paused.
PServiceHTML::NoOptions
Definition: httpsvc.h:329
PConfigSectionsPage::OnLoadedText
void OnLoadedText(PHTTPRequest &, PString &text)
This is called after the text has been loaded and may be used to customise or otherwise mangle a load...
PTCPSocket
A socket that uses the TCP transport on the Internet Protocol.
Definition: tcpsock.h:44
PHTTPServiceProcess::Info::productKey
PTEACypher::Key productKey
Poduct key for registration.
Definition: httpsvc.h:83
PConfigPage::OnPOST
PBoolean OnPOST(PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PStringToString &data, const PHTTPConnectionInfo &connectInfo)
Handle the POST command passed from the HTTP socket.
PConfigSectionsPage::process
PHTTPServiceProcess & process
Definition: httpsvc.h:271
PHTTPServiceProcess::restartThread
PThread * restartThread
Definition: httpsvc.h:177
PServiceHTTPFile
Definition: httpsvc.h:425
PServiceMacro::isMacroBlock
PBoolean isMacroBlock
Definition: httpsvc.h:364
PServiceHTTPString::LoadText
PString LoadText(PHTTPRequest &)
Get a block of text data (eg HTML) that the resource contains.
PHTTPServiceProcess::Info::productName
const char * productName
Definition: httpsvc.h:74
PHTTPConfigSectionList
Definition: httpform.h:891
PHTTPServiceProcess::ListenForHTTP
PBoolean ListenForHTTP(WORD port, PSocket::Reusability reuse=PSocket::CanReuseAddress, PINDEX stackSize=0x4000)
PServiceHTML::ExtractSignature
PString ExtractSignature(PString &out)
PHTTPServiceProcess::GetServiceDependencies
const char * GetServiceDependencies() const
PHTTPServiceProcess::ignoreSignatures
PBoolean ignoreSignatures
Definition: httpsvc.h:162
PHTTPServiceThread::process
PHTTPServiceProcess & process
Definition: httpsvc.h:58
PThread
This class defines a thread of execution in the system.
Definition: thread.h:66
PHTTPServiceProcess::Info::buildNumber
WORD buildNumber
Definition: httpsvc.h:80
PHTTPServiceProcess::OnPause
PBoolean OnPause()
Called by the system when the service is to be paused.
PHTTPSpace
This class describes a name space that a Universal Resource Locator operates in.
Definition: http.h:58
PHTTPServiceProcess::Info::copyrightEmail
const char * copyrightEmail
E-Mail address for copyright holder.
Definition: httpsvc.h:101
PServiceMacro::list
static PServiceMacro * list
Definition: httpsvc.h:366
PHTML
This class describes a HyperText markup Language string as used by the World Wide Web and the PURL an...
Definition: html.h:49
PServiceHTML::NoSignatureForFile
Definition: httpsvc.h:333
PServiceHTTPDirectory::PServiceHTTPDirectory
PServiceHTTPDirectory(const PURL &url, const PDirectory &dirname, const PHTTPAuthority &auth, PBoolean needSig=false)
Definition: httpsvc.h:457
PServiceHTTPString::PServiceHTTPString
PServiceHTTPString(const PURL &url, const PString &string, const PHTTPAuthority &auth)
Definition: httpsvc.h:407
PConfigSectionsPage
Definition: httpsvc.h:234
PServiceHTTPDirectory
Definition: httpsvc.h:450
PServiceHTML::PServiceHTML
PServiceHTML(const char *title, const char *help=NULL, const char *helpGif="help.gif")
PServiceHTTPFile::PServiceHTTPFile
PServiceHTTPFile(const PString &filename, const PFilePath &file, const PHTTPAuthority &auth, PBoolean needSig=false)
Definition: httpsvc.h:437
PServiceMacro::Translate
virtual PString Translate(PHTTPRequest &request, const PString &args, const PString &block) const
PHTTPServiceProcess::manufacturersEmail
PString manufacturersEmail
Definition: httpsvc.h:166
PServiceHTTPFile::OnLoadedText
void OnLoadedText(PHTTPRequest &, PString &text)
This is called after the text has been loaded and may be used to customise or otherwise mangle a load...
PServiceHTTPFile::PServiceHTTPFile
PServiceHTTPFile(const PString &filename, const PHTTPAuthority &auth, PBoolean needSig=false)
Definition: httpsvc.h:435
sockets.h
PServiceHTML::LoadFromFile
Definition: httpsvc.h:331
httpform.h
PHTTPServiceProcess::CreateHTTPServer
virtual PHTTPServer * CreateHTTPServer(PTCPSocket &socket)
PServiceHTTPDirectory::OnLoadedText
void OnLoadedText(PHTTPRequest &, PString &text)
This is called after the text has been loaded and may be used to customise or otherwise mangle a load...
PMutex
Synonym for PTimedMutex.
PHTTPServiceProcess::Info::minorVersion
WORD minorVersion
Definition: httpsvc.h:78
PServiceHTML::SpliceMacro
static bool SpliceMacro(PString &text, const PString &tokens, const PString &value)
PHTTPServiceProcess::Info::copyrightHolder
const char * copyrightHolder
Name of copyright holder.
Definition: httpsvc.h:99
PHTTPServiceProcess::MaxSecuredKeys
Definition: httpsvc.h:71
PHTTPServiceProcess::GetMacroKeyword
const PString & GetMacroKeyword() const
Definition: httpsvc.h:133
PHTTPResource::contentType
PString contentType
MIME content type for the resource.
Definition: http.h:1512
PHTTPServiceProcess::copyrightHomePage
PString copyrightHomePage
Definition: httpsvc.h:170
PHTTPServiceProcess::OnStop
void OnStop()
Called by the system when the service is stopped.
PHTTPServiceProcess::Info::majorVersion
WORD majorVersion
Definition: httpsvc.h:77
PHTTPServiceProcess::GetPageGraphic
virtual PString GetPageGraphic()
PProcess::CodeStatus
CodeStatus
Release status for the program.
Definition: pprocess.h:235
PSocket
A network communications channel.
Definition: socket.h:58
PServiceHTML::CalculateSignature
PString CalculateSignature()
PServiceMacro::PServiceMacro
PServiceMacro(const char *name, PBoolean isBlock)
PServiceHTTPString::PServiceHTTPString
PServiceHTTPString(const PURL &url, const PString &string)
Definition: httpsvc.h:401
PHTTPServiceProcess::OnCreateHTTPServer
virtual PHTTPServer * OnCreateHTTPServer(const PHTTPSpace &urlSpace)
PHTTPServiceProcess
Definition: httpsvc.h:65
PHTTPServiceProcess::OnConfigChanged
virtual void OnConfigChanged()=0
PHTTPServer
A TCP/IP socket for the HyperText Transfer Protocol version 1.0.
Definition: http.h:762
PHTTPServiceProcess::Initialise
virtual PBoolean Initialise(const char *initMsg)=0
PHTTPRequest
This object describes a HyperText Transport Protocol request.
Definition: http.h:968
PSocket::Reusability
Reusability
Flags to reuse of port numbers in Listen() function.
Definition: socket.h:84
PObject
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PConfigPage::process
PHTTPServiceProcess & process
Definition: httpsvc.h:228
PHTTPConnectionInfo
This object describes the connectiono associated with a HyperText Transport Protocol request...
Definition: http.h:665
PHTTPServiceProcess::Info::copyrightHomePage
const char * copyrightHomePage
Home page for copyright holder.
Definition: httpsvc.h:100
PURL
This class describes a Universal Resource Locator.
Definition: url.h:54
PHTTPServiceProcess::httpThreads
ThreadList httpThreads
Definition: httpsvc.h:180
PHTTPServiceProcess::Info::gifHTML
const char * gifHTML
HTML to show GIF image in page headers, if NULL then the following are used to build one...
Definition: httpsvc.h:93
PServiceHTTPFile::PServiceHTTPFile
PServiceHTTPFile(const PString &filename, const PString &file, PBoolean needSig=false)
Definition: httpsvc.h:433
PHTTPServiceProcess::GetProductKey
const PTEACypher::Key & GetProductKey() const
Definition: httpsvc.h:138
PHTTPServiceProcess::GetSignatureKey
const PTEACypher::Key & GetSignatureKey() const
Definition: httpsvc.h:140
PServiceHTML::MacroOptions
MacroOptions
Definition: httpsvc.h:328
PHTTPServiceProcess::httpNameSpace
PHTTPSpace httpNameSpace
Definition: httpsvc.h:156
PHTTPConfig
Definition: httpform.h:804