Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / apps / JAWS / clients / WebSTONE / src / nsapi-includes / frame / httpact.h
blob9c776eaaa9aa6de9cf009c8f7be570fa94731983
1 /*
2 * Copyright (c) 1994, 1995. Netscape Communications Corporation. All
3 * rights reserved.
5 * Use of this software is governed by the terms of the license agreement for
6 * the Netscape Communications or Netscape Comemrce Server between the
7 * parties.
8 */
11 /* ------------------------------------------------------------------------ */
15 * httpact.h: Defines the API characteristics for HTTP servers
17 * Rob McCool
21 #ifndef HTTPACT_H
22 #define HTTPACT_H
24 #include "frame/req.h"
25 #include "frame/object.h"
28 /* ------------------------------ Constants ------------------------------- */
30 #ifdef MCC_BATMAN
31 #define NUM_DIRECTIVES 5
32 #else
33 #ifdef MCC_PROXY
34 #define NUM_DIRECTIVES 10
35 #else
36 #define NUM_DIRECTIVES 7
37 #endif
38 #endif
41 /* -------------------------- Generic Prototypes -------------------------- */
45 * directive_name2num will return the position of the abbreviated directive
46 * dir in the directive table.
48 * If dir does not exist in the table, it will return -1.
51 int directive_name2num(char *dir);
55 * directive_num2name returns a string describing directive number num.
57 const char *directive_num2name(int num);
61 * servact_finderror looks through the request's object set to find a
62 * suitable error function to execute. Returns REQ_PROCEED if a function
63 * was found and executed successfully, REQ_NOACTION otherwise.
65 int servact_finderror(Session *sn, Request *rq);
69 * Read in and handle one request from the given session
71 void servact_handle(Session *sn);
74 /* ----------------------- HTTP specific prototypes ----------------------- */
77 int servact_handle_processed(Session *sn, Request *rq);
80 * Returns the translated path (filename) for the given uri, NULL otherwise.
81 * If authentication is required for the given uri, nothing is returned even
82 * if the current user has authenticated to that area.
84 char *servact_translate_uri(char *uri, Session *sn);
87 #ifdef MCC_PROXY
89 /* ----------------------- proxy specific prototypes ---------------------- */
92 * Resolves the given hostname, first trying to find a resolver
93 * function from obj.conf, and if that fails, just calls gethostbyname().
95 struct hostent *servact_gethostbyname(char *host, Session *sn, Request *rq);
99 * Establishes a connection to the specified host and port using
100 * a Connect class function from obj.conf. Returns the sockect
101 * descriptor that is connected (and which should be SSL_Import()'ed
102 * by the caller).
104 * Returns -2 (REQ_NOACTION), if no such Connect class function exists.
105 * The caller should use the native connect mechanism in that case.
107 * Returns -1 (REQ_ABORT) on failure to connect. The caller should not
108 * attempt to use the native connect.
110 int servact_connect(char *host, int port, Session *sn, Request *rq);
113 #endif /* ! MCC_PROXY */
115 #endif