PTLib  Version 2.18.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
httpsvc.h
Go to the documentation of this file.
1 /*
2  * httpsvc.h
3  *
4  * Common classes for service applications using HTTP as the user interface.
5  *
6  * Portable Windows Library
7  *
8  * Copyright (c) 1993-2002 Equivalence Pty. Ltd.
9  *
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and limitations
18  * under the License.
19  *
20  * The Original Code is Portable Windows Library.
21  *
22  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23  *
24  * Contributor(s): ______________________________________.
25  */
26 
27 #ifndef PTLIB_HTTPSVC_H
28 #define PTLIB_HTTPSVC_H
29 
30 #if P_HTTPFORMS
31 
32 #include <ptlib/svcproc.h>
33 #include <ptlib/sockets.h>
34 #include <ptclib/httpform.h>
35 #include <ptclib/cypher.h>
36 
37 
39 class PConfigPage;
40 
41 
43 
45 {
47 
48  public:
49  enum {
51  };
52  struct Info {
53  const char * productName;
54  const char * manufacturerName;
55 
60  const char * compilationDate;
61 
62  PTEACypher::Key productKey;
63  const char * securedKeys[MaxSecuredKeys];
65 
66  PTEACypher::Key signatureKey;
67 
68  const char * manufHomePage;
69  const char * email;
70  const char * productHTML;
71  const char * gifHTML;
73  const char * gifFilename;
75  int gifWidth;
76  int gifHeight;
77 
78  const char * copyrightHolder;
79  const char * copyrightHomePage;
80  const char * copyrightEmail;
81 
82  WORD oemVersion;
83  };
84 
85  PHTTPServiceProcess(const Info & inf);
87 
88  PBoolean OnStart();
89  void OnStop();
90  PBoolean OnPause();
91  void OnContinue();
92  const char * GetServiceDependencies() const;
93 
94  virtual void OnConfigChanged() = 0;
95  virtual PBoolean Initialise(const char * initMsg) = 0;
96 
97  static const PString & GetDefaultSection();
98 
99  class ClearLogPage;
100 
101  struct Params
102  {
103  Params(
104  const char * configPageName,
105  const char * section = GetDefaultSection()
106  );
107  virtual ~Params() { }
108 
109  const char * m_configPageName;
110  const char * m_section;
112 
113  // Authentication
114  const char * m_realmKey;
115  const char * m_usernameKey;
116  const char * m_passwordKey;
118 
119  // Logging
121  const char * m_logLevelKey;
122  const char * m_logFileKey;
123  const char * m_logOptionsKey;
124  const char * m_rotateDirKey;
125  const char * m_rotatePrefixKey;
126  const char * m_rotateTemplateKey;
127  const char * m_rotateSizeKey;
128  const char * m_rotateCountKey;
129  const char * m_rotateAgeKey;
130  const char * m_fullLogPageName;
131  const char * m_clearLogPageName;
132  const char * m_tailLogPageName;
133 
137 
138  // HTTP access
139  const char * m_httpPortKey;
140  const char * m_httpInterfacesKey;
141  WORD m_httpPort; // Output
143  };
144  virtual bool InitialiseBase(
145  Params & params
146  );
147 
148 
149  virtual PString GetPageGraphic();
150  void GetPageHeader(PHTML &);
151  void GetPageHeader(PHTML &, const PString & title);
152 
153  virtual PString GetCopyrightText();
154 
155  const PString & GetMacroKeyword() const { return m_macroKeyword; }
156  const PTime & GetCompilationDate() const { return m_compilationDate; }
157  const PString & GetHomePage() const { return m_manufacturersHomePage; }
158  const PString & GetEMailAddress() const { return m_manufacturersEmail; }
159  const PString & GetProductName() const { return m_productNameHTML; }
160  const PString & GetGifHTML() const { return m_gifHTML; }
161  const PString & GetCopyrightHolder() const { return m_copyrightHolder; }
163  const PString & GetCopyrightEmail() const { return m_copyrightEmail; }
164  const PTEACypher::Key & GetProductKey() const { return m_productKey; }
165  const PStringArray & GetSecuredKeys() const { return m_securedKeys; }
166  const PTEACypher::Key & GetSignatureKey() const { return m_signatureKey; }
168  void SetIgnoreSignatures(bool ig) { m_ignoreSignatures = ig; }
169 
170  static PHTTPServiceProcess & Current();
171 
172  virtual void AddRegisteredText(PHTML & html);
173  virtual void AddUnregisteredText(PHTML & html);
174  virtual PBoolean SubstituteEquivalSequence(PHTTPRequest & request, const PString &, PString &);
175 
176  protected:
178  PTEACypher::Key m_productKey;
180  PTEACypher::Key m_signatureKey;
182 
188  unsigned m_gifWidth;
189  unsigned m_gifHeight;
194 
195  void BeginRestartSystem();
196  void EndRestartSystem();
197  virtual void OnHTTPEnded(PHTTPServer & server);
198 
200 
201  friend class PConfigPage;
202  friend class PConfigSectionsPage;
203  P_REMOVE_VIRTUAL(PHTTPServer*, CreateHTTPServer(PChannel &),0);
204  P_REMOVE_VIRTUAL(PHTTPServer*, OnCreateHTTPServer(const PHTTPSpace &),0);
205 };
206 
207 
209 
210 
211 class PConfigPage : public PHTTPConfig
212 {
214  public:
215  PConfigPage(
216  PHTTPServiceProcess & app,
217  const PString & section,
218  const PHTTPAuthority & auth
219  );
220  PConfigPage(
221  PHTTPServiceProcess & app,
222  const PString & url,
223  const PString & section,
224  const PHTTPAuthority & auth
225  );
226 
227  void OnLoadedText(PHTTPRequest &, PString & text);
228 
229  virtual PBoolean OnPOST(
230  PHTTPServer & server,
231  const PHTTPConnectionInfo & connectInfo
232  );
233 
234  virtual PBoolean Post(
235  PHTTPRequest & request,
236  const PStringToString & data,
237  PHTML & replyMessage
238  );
239 
240  protected:
241  virtual PBoolean GetExpirationDate(
242  PTime & when
243  );
244 
246 };
247 
248 
250 
252 {
254  public:
256  PHTTPServiceProcess & app,
257  const PURL & url,
258  const PHTTPAuthority & auth,
259  const PString & prefix,
260  const PString & valueName,
261  const PURL & editSection,
262  const PURL & newSection,
263  const PString & newTitle,
264  PHTML & heading
265  );
266 
267  void OnLoadedText(PHTTPRequest &, PString & text);
268 
269  virtual PBoolean OnPOST(
270  PHTTPServer & server,
271  const PHTTPConnectionInfo & connectInfo
272  );
273 
274  virtual PBoolean Post(
275  PHTTPRequest & request,
276  const PStringToString & data,
277  PHTML & replyMessage
278  );
279 
280  protected:
281  virtual PBoolean GetExpirationDate(
282  PTime & when
283  );
284 
286 };
287 
288 
290 
292 {
294  public:
296  PHTTPServiceProcess & app,
297  const PHTTPAuthority & auth
298  );
299 
301  PHTTPRequest & request
302  );
303  void OnLoadedText(PHTTPRequest & request, PString & text);
304 
305  virtual PBoolean Post(
306  PHTTPRequest & request,
307  const PStringToString & data,
308  PHTML & replyMessage
309  );
310 
311  virtual void AddFields(
312  const PString & prefix
313  ) = 0;
314 
315  protected:
317 };
318 
319 
321 
322 class PServiceHTML : public PHTML
323 {
325  public:
326  PServiceHTML(const char * title,
327  const char * help = NULL,
328  const char * helpGif = "help.gif");
329 
331  static PString ExtractSignature(const PString & html,
332  PString & out,
333  const char * keyword = "#equival");
334 
336  static PString CalculateSignature(const PString & out);
337  static PString CalculateSignature(const PString & out, const PTEACypher::Key & sig);
338 
340  static PBoolean CheckSignature(const PString & html);
341 
348  };
349  static bool ProcessMacros(
350  PHTTPRequest & request,
351  PString & text,
352  const PString & filename,
353  unsigned options
354  );
355  static bool SpliceMacro(
356  PString & text,
357  const PString & tokens,
358  const PString & value
359  );
360 };
361 
362 
364 
365 class PServiceMacro : public PObject
366 {
367  public:
368  PServiceMacro(const char * name, PBoolean isBlock);
369  PServiceMacro(const PCaselessString & name, PBoolean isBlock);
370  Comparison Compare(const PObject & obj) const;
371  virtual PString Translate(
372  PHTTPRequest & request,
373  const PString & args,
374  const PString & block
375  ) const;
376  protected:
377  const char * macroName;
380  static PServiceMacro * list;
381  friend class PServiceMacros_list;
382 };
383 
384 
385 #define P_EMPTY
386 
387 #define PCREATE_SERVICE_MACRO(name, request, args) \
388  class PServiceMacro_##name : public PServiceMacro { \
389  public: \
390  PServiceMacro_##name() : PServiceMacro(#name, false) { } \
391  PString Translate(PHTTPRequest &, const PString &, const PString &) const; \
392  }; \
393  static const PServiceMacro_##name serviceMacro_##name; \
394  PString PServiceMacro_##name::Translate(PHTTPRequest & request, const PString & args, const PString &) const
395 
396 
397 
398 #define PCREATE_SERVICE_MACRO_BLOCK(name, request, args, block) \
399  class PServiceMacro_##name : public PServiceMacro { \
400  public: \
401  PServiceMacro_##name() : PServiceMacro(#name, true) { } \
402  PString Translate(PHTTPRequest &, const PString &, const PString &) const; \
403  }; \
404  static const PServiceMacro_##name serviceMacro_##name; \
405  PString PServiceMacro_##name::Translate(PHTTPRequest & request, const PString & args, const PString & block) const
406 
407 
408 
410 
412 {
414  public:
415  PServiceHTTPString(const PURL & url, const PString & string)
416  : PHTTPString(url, string) { }
417 
418  PServiceHTTPString(const PURL & url, const PHTTPAuthority & auth)
419  : PHTTPString(url, auth) { }
420 
421  PServiceHTTPString(const PURL & url, const PString & string, const PHTTPAuthority & auth)
422  : PHTTPString(url, string, auth) { }
423 
424  PServiceHTTPString(const PURL & url, const PString & string, const PString & contentType)
425  : PHTTPString(url, string, contentType) { }
426 
427  PServiceHTTPString(const PURL & url, const PString & string, const PString & contentType, const PHTTPAuthority & auth)
428  : PHTTPString(url, string, contentType, auth) { }
429 
431 
432  protected:
433  virtual PBoolean GetExpirationDate(
434  PTime & when
435  );
436 };
437 
438 
440 {
442  public:
443  PServiceHTTPFile(const PString & filename, PBoolean needSig = false)
444  : PHTTPFile(filename) { needSignature = needSig; }
445  PServiceHTTPFile(const PString & filename, const PFilePath & file, PBoolean needSig = false)
446  : PHTTPFile(filename, file) { needSignature = needSig; }
447  PServiceHTTPFile(const PString & filename, const PString & file, PBoolean needSig = false)
448  : PHTTPFile(filename, file) { needSignature = needSig; }
449  PServiceHTTPFile(const PString & filename, const PHTTPAuthority & auth, PBoolean needSig = false)
450  : PHTTPFile(filename, auth) { needSignature = needSig; }
451  PServiceHTTPFile(const PString & filename, const PFilePath & file, const PHTTPAuthority & auth, PBoolean needSig = false)
452  : PHTTPFile(filename, file, auth) { needSignature = needSig; }
453 
454  void OnLoadedText(PHTTPRequest &, PString & text);
455 
456  protected:
457  virtual PBoolean GetExpirationDate(
458  PTime & when
459  );
460 
462 };
463 
465 {
467  public:
468  PServiceHTTPDirectory(const PURL & url, const PDirectory & dirname, PBoolean needSig = false)
469  : PHTTPDirectory(url, dirname) { needSignature = needSig; }
470 
471  PServiceHTTPDirectory(const PURL & url, const PDirectory & dirname, const PHTTPAuthority & auth, PBoolean needSig = false)
472  : PHTTPDirectory(url, dirname, auth) { needSignature = needSig; }
473 
474  void OnLoadedText(PHTTPRequest &, PString & text);
475 
476  protected:
477  virtual PBoolean GetExpirationDate(
478  PTime & when
479  );
480 
482 };
483 
484 
486 {
487  PCLASSINFO(ClearLogPage, PServiceHTTPString);
488  public:
489  ClearLogPage(PHTTPServiceProcess & process, const PURL & url, const PHTTPAuthority & auth);
490 
491  virtual PString LoadText(
492  PHTTPRequest & request // Information on this request.
493  );
494 
495  virtual PBoolean Post(
496  PHTTPRequest & request,
497  const PStringToString &,
498  PHTML & msg
499  );
500 
501  protected:
503 };
504 
505 
506 #endif // P_HTTPFORMS
507 
508 #endif // PTLIB_HTTPSVC_H
509 
510 
511 // End Of File ///////////////////////////////////////////////////////////////
PHTTPServiceProcess & process
Definition: httpsvc.h:316
PTEACypher::Key signatureKey
Signature key for encryption of HTML files.
Definition: httpsvc.h:66
static bool ProcessMacros(PHTTPRequest &request, PString &text, const PString &filename, unsigned options)
atomic< PThread * > m_restartThread
Definition: httpsvc.h:199
PTEACypher::Key m_signatureKey
Definition: httpsvc.h:180
PString m_copyrightEmail
Definition: httpsvc.h:193
const char * m_rotateTemplateKey
Definition: httpsvc.h:126
PBoolean CheckSignature()
const char * m_realmKey
Definition: httpsvc.h:114
Definition: httpsvc.h:52
virtual PBoolean SubstituteEquivalSequence(PHTTPRequest &request, const PString &, PString &)
PString m_manufacturersHomePage
Definition: httpsvc.h:184
PRegisterPage(PHTTPServiceProcess &app, const PHTTPAuthority &auth)
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...
virtual PBoolean OnPOST(PHTTPServer &server, const PHTTPConnectionInfo &connectInfo)
Handle the POST command passed from the HTTP socket.
virtual PString GetCopyrightText()
unsigned m_gifWidth
Definition: httpsvc.h:188
PHTTPFile * m_fullLogPage
Definition: httpsvc.h:134
const char * m_logFileKey
Definition: httpsvc.h:122
Definition: httpsvc.h:291
static const PString & GetDefaultSection()
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:2164
Definition: httpsvc.h:485
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
Get a block of data (eg HTML) that the resource contains.
const PStringArray & GetSecuredKeys() const
Definition: httpsvc.h:165
bool ShouldIgnoreSignatures() const
Definition: httpsvc.h:167
Definition: httpsvc.h:50
ClearLogPage(PHTTPServiceProcess &process, const PURL &url, const PHTTPAuthority &auth)
Definition: httpsvc.h:346
PString m_macroKeyword
Definition: httpsvc.h:177
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
This class describes the simplest authorisation mechanism for a Universal Resource Locator...
Definition: http.h:1505
P_REMOVE_VIRTUAL(PHTTPServer *, CreateHTTPServer(PChannel &), 0)
PTEACypher::Key m_productKey
Definition: httpsvc.h:178
This abstract class describes the authorisation mechanism for a Universal Resource Locator...
Definition: http.h:1452
This class defines an absolute time and date.
Definition: ptime.h:49
const PString & GetHomePage() const
Definition: httpsvc.h:157
PString m_gifFilename
Definition: httpsvc.h:187
Definition: httpsvc.h:101
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(PHTTPServiceProcess &app, const PString &section, const PHTTPAuthority &auth)
PString m_productNameHTML
Definition: httpsvc.h:186
PHTTPServiceProcess & m_process
Definition: httpsvc.h:502
friend class PServiceMacros_list
Definition: httpsvc.h:381
const char * m_httpPortKey
Definition: httpsvc.h:139
WORD patchVersion
Definition: httpsvc.h:59
const char * m_clearLogPageName
Definition: httpsvc.h:131
PBoolean OnStart()
Called when the service is started.
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
Get a block of data (eg HTML) that the resource contains.
PServiceHTTPString(const PURL &url, const PString &string, const PString &contentType)
Definition: httpsvc.h:424
PServiceHTTPString(const PURL &url, const PString &string, const PString &contentType, const PHTTPAuthority &auth)
Definition: httpsvc.h:427
const char * manufacturerName
Definition: httpsvc.h:54
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:3151
This class describes a full description for a file on the particular platform.
Definition: filepath.h:61
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:2251
PServiceHTTPDirectory(const PURL &url, const PDirectory &dirname, PBoolean needSig=false)
Definition: httpsvc.h:468
PServiceHTTPString(const PURL &url, const PHTTPAuthority &auth)
Definition: httpsvc.h:418
const PString & GetEMailAddress() const
Definition: httpsvc.h:158
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
Get a block of data (eg HTML) that the resource contains.
PServiceHTTPFile(const PString &filename, const PFilePath &file, PBoolean needSig=false)
Definition: httpsvc.h:445
This class is a variation of a string that ignores case.
Definition: pstring.h:2012
PBoolean needSignature
Definition: httpsvc.h:481
const char * m_tailLogPageName
Definition: httpsvc.h:132
This object describes a HyperText Transport Protocol resource which is a single file.
Definition: http.h:2098
This is an array collection class of PString objects.
Definition: pstring.h:2365
const char * m_rotateSizeKey
Definition: httpsvc.h:127
const PTime & GetCompilationDate() const
Definition: httpsvc.h:156
Definition: httpsvc.h:411
const char * compilationDate
Definition: httpsvc.h:60
PConfigPage * m_configPage
Definition: httpsvc.h:111
This object describes a HyperText Transport Protocol resource which is a string kept in memory...
Definition: http.h:2009
const char * m_rotatePrefixKey
Definition: httpsvc.h:125
unsigned m_gifHeight
Definition: httpsvc.h:189
const char * macroName
Definition: httpsvc.h:377
const char * m_passwordKey
Definition: httpsvc.h:116
void SetIgnoreSignatures(bool ig)
Definition: httpsvc.h:168
This object describes a HyperText Transport Protocol resource which is a set of files in a directory...
Definition: http.h:2303
PTime m_compilationDate
Definition: httpsvc.h:183
const char * productHTML
HTML for the product name, if NULL defaults to the productName variable.
Definition: httpsvc.h:70
const char * m_rotateDirKey
Definition: httpsvc.h:124
const char * gifFilename
File name for the products GIF file.
Definition: httpsvc.h:74
Class to represent a directory in the operating system file system.
Definition: pdirect.h:173
Definition: httpsvc.h:322
virtual void AddUnregisteredText(PHTML &html)
PServiceHTTPFile(const PString &filename, PBoolean needSig=false)
Definition: httpsvc.h:443
PHTTPServiceProcess(const Info &inf)
int gifHeight
in the generated HTML.
Definition: httpsvc.h:76
CodeStatus buildStatus
AlphaCode, BetaCode or ReleaseCode.
Definition: httpsvc.h:58
const char * manufHomePage
WWW address of manufacturers home page.
Definition: httpsvc.h:68
A process type that runs as a &quot;background&quot; service.
Definition: svcproc.h:45
const char * email
contact email for manufacturer
Definition: httpsvc.h:69
Definition: httpsvc.h:211
const char * securedKeys[MaxSecuredKeys]
Product secured keys for registration.
Definition: httpsvc.h:63
int gifWidth
Size of GIF image, if zero then none is used.
Definition: httpsvc.h:75
void GetPageHeader(PHTML &)
Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
Definition: httpsvc.h:344
PBoolean needSignature
Definition: httpsvc.h:461
PINDEX securedKeyCount
Definition: httpsvc.h:64
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
Abstract class defining I/O channel semantics.
Definition: channel.h:103
const char * m_configPageName
Definition: httpsvc.h:109
PServiceMacro * link
Definition: httpsvc.h:379
virtual void AddRegisteredText(PHTML &html)
PStringArray m_securedKeys
Definition: httpsvc.h:179
PString m_copyrightHomePage
Definition: httpsvc.h:192
virtual void OnHTTPEnded(PHTTPServer &server)
Callback when an existing HTTP connection has ended.
bool PBoolean
Definition: object.h:174
const PString & GetCopyrightHomePage() const
Definition: httpsvc.h:162
WORD oemVersion
Definition: httpsvc.h:82
virtual void AddFields(const PString &prefix)=0
virtual PBoolean GetExpirationDate(PTime &when)
Get a block of data (eg HTML) that the resource contains.
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)
static PHTTPServiceProcess & Current()
PString LoadText(PHTTPRequest &request)
Get a block of text data (eg HTML) that the resource contains.
const PString & GetProductName() const
Definition: httpsvc.h:159
const char * m_usernameKey
Definition: httpsvc.h:115
The character string class.
Definition: pstring.h:108
Definition: httpsvc.h:365
virtual PString LoadText(PHTTPRequest &request)
Get a block of text data (eg HTML) that the resource contains.
void OnContinue()
Resume after the service was paused.
Definition: httpsvc.h:343
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...
PTEACypher::Key productKey
Poduct key for registration.
Definition: httpsvc.h:62
Params(const char *configPageName, const char *section=GetDefaultSection())
PHTTPServiceProcess & process
Definition: httpsvc.h:285
Definition: httpsvc.h:439
PBoolean isMacroBlock
Definition: httpsvc.h:378
PString LoadText(PHTTPRequest &)
Get a block of text data (eg HTML) that the resource contains.
const char * productName
Definition: httpsvc.h:53
Definition: httpform.h:1081
virtual ~Params()
Definition: httpsvc.h:107
PString ExtractSignature(PString &out)
const char * GetServiceDependencies() const
PBoolean OnPause()
Called by the system when the service is to be paused.
This class describes a name space that a Universal Resource Locator operates in.
Definition: http.h:56
const char * copyrightEmail
E-Mail address for copyright holder.
Definition: httpsvc.h:80
static PServiceMacro * list
Definition: httpsvc.h:380
const PString & GetGifHTML() const
Definition: httpsvc.h:160
PString m_copyrightHolder
Definition: httpsvc.h:191
This class describes a HyperText markup Language string as used by the World Wide Web and the PURL an...
Definition: html.h:45
const char * m_section
Definition: httpsvc.h:110
Definition: httpsvc.h:347
const PString & GetCopyrightHolder() const
Definition: httpsvc.h:161
PHTTPSimpleAuth m_authority
Definition: httpsvc.h:117
PHTTPTailFile * m_tailLogPage
Definition: httpsvc.h:136
Listener for incoming HTTP request with thread pool to handle those requests.
Definition: http.h:1327
bool m_forceRotate
Definition: httpsvc.h:120
ClearLogPage * m_clearLogPage
Definition: httpsvc.h:135
PServiceHTTPDirectory(const PURL &url, const PDirectory &dirname, const PHTTPAuthority &auth, PBoolean needSig=false)
Definition: httpsvc.h:471
PServiceHTTPString(const PURL &url, const PString &string, const PHTTPAuthority &auth)
Definition: httpsvc.h:421
PString m_manufacturersEmail
Definition: httpsvc.h:185
Definition: httpsvc.h:251
const char * m_logOptionsKey
Definition: httpsvc.h:123
bool m_ignoreSignatures
Definition: httpsvc.h:181
virtual bool InitialiseBase(Params &params)
Definition: httpsvc.h:464
PServiceHTML(const char *title, const char *help=NULL, const char *helpGif="help.gif")
PServiceHTTPFile(const PString &filename, const PFilePath &file, const PHTTPAuthority &auth, PBoolean needSig=false)
Definition: httpsvc.h:451
virtual PString Translate(PHTTPRequest &request, const PString &args, const PString &block) const
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(const PString &filename, const PHTTPAuthority &auth, PBoolean needSig=false)
Definition: httpsvc.h:449
Definition: httpsvc.h:345
const char * m_rotateAgeKey
Definition: httpsvc.h:129
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...
WORD minorVersion
Definition: httpsvc.h:57
static bool SpliceMacro(PString &text, const PString &tokens, const PString &value)
const char * m_httpInterfacesKey
Definition: httpsvc.h:140
const char * copyrightHolder
Name of copyright holder.
Definition: httpsvc.h:78
const PString & GetMacroKeyword() const
Definition: httpsvc.h:155
void OnStop()
Called by the system when the service is stopped.
WORD majorVersion
Definition: httpsvc.h:56
virtual PString GetPageGraphic()
CodeStatus
Release status for the program.
Definition: pprocess.h:114
PString CalculateSignature()
PString m_httpInterfaces
Definition: httpsvc.h:142
const PString & GetCopyrightEmail() const
Definition: httpsvc.h:163
PServiceMacro(const char *name, PBoolean isBlock)
const char * m_logLevelKey
Definition: httpsvc.h:121
PServiceHTTPString(const PURL &url, const PString &string)
Definition: httpsvc.h:415
Definition: httpsvc.h:44
const char * m_fullLogPageName
Definition: httpsvc.h:130
const char * m_rotateCountKey
Definition: httpsvc.h:128
virtual void OnConfigChanged()=0
A TCP/IP socket for the HyperText Transfer Protocol version 1.0.
Definition: http.h:1042
virtual PBoolean OnPOST(PHTTPServer &server, const PHTTPConnectionInfo &connectInfo)
Handle the POST command passed from the HTTP socket.
virtual PBoolean Initialise(const char *initMsg)=0
This object describes a HyperText Transport Protocol request.
Definition: http.h:1417
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
PHTTPServiceProcess & process
Definition: httpsvc.h:245
This object describes the connectiono associated with a HyperText Transport Protocol request...
Definition: http.h:937
const char * copyrightHomePage
Home page for copyright holder.
Definition: httpsvc.h:79
PString m_gifHTML
Definition: httpsvc.h:190
This class describes a Universal Resource Locator.
Definition: url.h:56
const char * gifHTML
HTML to show GIF image in page headers, if NULL then the following are used to build one...
Definition: httpsvc.h:72
PServiceHTTPFile(const PString &filename, const PString &file, PBoolean needSig=false)
Definition: httpsvc.h:447
WORD m_httpPort
Definition: httpsvc.h:141
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &, PHTML &msg)
Get a block of data (eg HTML) that the resource contains.
const PTEACypher::Key & GetProductKey() const
Definition: httpsvc.h:164
const PTEACypher::Key & GetSignatureKey() const
Definition: httpsvc.h:166
This object describes a HyperText Transport Protocol resource which is a single file.
Definition: http.h:2224
MacroOptions
Definition: httpsvc.h:342
Definition: httpform.h:915