aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorswhite <swhite@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2004-05-05 23:02:46 +0000
committerswhite <swhite@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2004-05-05 23:02:46 +0000
commit1eb98693ddf874f97953aaf17ce933f34a6f0ead (patch)
treee1f8a2e76e0049afe31550695b0c949b65081cb5
parent4ef6de9fdeb4efdbc3630fdfd31682b8fcdd741d (diff)
Changed HTTPD function names in exported header files to be in better
conformance with Cactus standards: From To ---- -- HTTP_Send_OK_Header HTTP_SendOKHeader HTTP_Send_OK_Refresh_Header HTTP_SendOKRefreshHeader HTTP_Major_Version HTTP_MajorVersion HTTP_Minor_Version HTTP_MinorVersion HTTP_Arg_Name HTTP_ArgName git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@200 1faa4e14-9dd3-4be0-9f0e-ffe519881164
-rw-r--r--doc/Content.txt2
-rw-r--r--src/Content.c18
-rw-r--r--src/Groups.c2
-rw-r--r--src/HTTPDUtils.h2
-rw-r--r--src/Parameters.c30
-rw-r--r--src/Redirect.c2
-rw-r--r--src/Thorns.c4
-rw-r--r--src/http.c10
-rw-r--r--src/httpRequest.h16
9 files changed, 42 insertions, 44 deletions
diff --git a/doc/Content.txt b/doc/Content.txt
index 1149ea9..a30f83f 100644
--- a/doc/Content.txt
+++ b/doc/Content.txt
@@ -79,7 +79,7 @@ A web page is typically generated in the following sequence.
The HTTP connection has already been established and saved in the httpRequest
pointer, and a String instance 'message' has been created.
- 0) HTTP_Send_OK_Header( httpRequest )
+ 0) HTTP_SendOKHeader( httpRequest )
1a) HTTP_SetDoctype( message );
1b) HTTP_SendString( httpRequest, message );
2) HTTP_Send( httpRequest, "<html><head>\n" );
diff --git a/src/Content.c b/src/Content.c
index 8ae4da1..2aaf2d1 100644
--- a/src/Content.c
+++ b/src/Content.c
@@ -113,13 +113,13 @@ HTTP_SendString( httpRequest *request, const String * message )
}
void
-HTTP_Send_OK_Header( httpRequest *request )
+HTTP_SendOKHeader( httpRequest *request )
{
- HTTP_Send_OK_Refresh_Header( request, -1 );
+ HTTP_SendOKRefreshHeader( request, -1 );
}
void
-HTTP_Send_OK_Refresh_Header( httpRequest *request, int secs )
+HTTP_SendOKRefreshHeader( httpRequest *request, int secs )
{
/* Status message */
HTTP_Send(request, "HTTP/1.0 200 OK\r\n");
@@ -381,7 +381,7 @@ static int MainPage(const cGH *cctkGH, httpRequest *request, void *data)
/* avoid compiler warning about unused parameter */
data = data;
- HTTP_Send_OK_Refresh_Header( request, refresh_seconds );
+ HTTP_SendOKRefreshHeader( request, refresh_seconds );
HTTP_SetDoctype( message );
HTTP_SendString(request, message);
@@ -832,7 +832,7 @@ static int ControlPage(const cGH *cctkGH, httpRequest *request, void *data)
if(!notauthorised)
{
/* Ok the person is authorised. */
- if(HTTP_Num_Arguments( request ) == 0)
+ if(HTTP_NumArguments( request ) == 0)
{
String *message = String_New();
/* No arguments, so just display the page */
@@ -1148,8 +1148,8 @@ static int ControlSet(const cGH *cctkGH, httpRequest *request)
* of text rendered at the bottom. */
/* Status message */
- if(HTTP_Major_Version( request ) < 1 ||
- (HTTP_Major_Version( request ) == 1 && HTTP_Minor_Version( request ) < 1))
+ if(HTTP_MajorVersion( request ) < 1 ||
+ (HTTP_MajorVersion( request ) == 1 && HTTP_MinorVersion( request ) < 1))
{
/* Older browsers don't understand 303 */
SetToCString(message,"HTTP/1.0 302 Found\r\n");
@@ -1186,7 +1186,7 @@ static int ControlTerminationPage(const cGH *cctkGH, httpRequest *request)
{
int retval = -1;
String *message = String_New();
- HTTP_Send_OK_Header( request );
+ HTTP_SendOKHeader( request );
HTTP_SetDoctype( message );
HTTP_SendString(request, message);
@@ -1391,7 +1391,7 @@ static int AboutPage(const cGH *cctkGH, httpRequest *request, void *data)
/* avoid compiler warning about unused parameter */
data = data;
- HTTP_Send_OK_Header( request );
+ HTTP_SendOKHeader( request );
HTTP_SetDoctype( message );
HTTP_SendString(request, message);
diff --git a/src/Groups.c b/src/Groups.c
index a12269b..42b88f0 100644
--- a/src/Groups.c
+++ b/src/Groups.c
@@ -100,7 +100,7 @@ static int GroupsPage(const cGH *cctkGH, httpRequest *request, void *data)
/* avoid compiler warning about unused parameter */
data = data;
- HTTP_Send_OK_Header( request );
+ HTTP_SendOKHeader( request );
/* Start the page */
HTTP_SetDoctype( message );
diff --git a/src/HTTPDUtils.h b/src/HTTPDUtils.h
index b3d9509..157546b 100644
--- a/src/HTTPDUtils.h
+++ b/src/HTTPDUtils.h
@@ -27,8 +27,6 @@ int SetHTML_ContentHeader(const cGH *cctkGH, int choice, String *mess,
const String *menu);
int SetHTML_ContentFooter(const cGH *cctkGH, int choice, String *mess);
-void SendHTTP_OK_Header(httpRequest *request);
-
#ifdef __cplusplus
}
#endif
diff --git a/src/Parameters.c b/src/Parameters.c
index c195fc7..3348494 100644
--- a/src/Parameters.c
+++ b/src/Parameters.c
@@ -144,8 +144,8 @@ SendHTTP_Redirect_Header( httpRequest *request )
{
/* Now redirect the browser to the normal page */
/* Status message */
- if(HTTP_Major_Version( request ) < 1 ||
- (HTTP_Major_Version( request ) == 1 && HTTP_Minor_Version( request ) < 1))
+ if(HTTP_MajorVersion( request ) < 1 ||
+ (HTTP_MajorVersion( request ) == 1 && HTTP_MinorVersion( request ) < 1))
{
/* Older browsers don't understand 303 */
HTTP_Send(request,"HTTP/1.0 302 Found\r\n");
@@ -198,7 +198,7 @@ static int MainParameterPage(const cGH *cctkGH, httpRequest *request, void *data
/* avoid compiler warning about unused parameter */
data = data;
- HTTP_Send_OK_Header( request );
+ HTTP_SendOKHeader( request );
HTTP_SetDoctype( message );
HTTP_SendString(request, message);
@@ -298,7 +298,7 @@ static int ThornParameterPage(const cGH *cctkGH, httpRequest *request, void *dat
USER_LENGTH);
int readonly = notauthorised;
- if(HTTP_Num_Arguments( request ) > 0)
+ if(HTTP_NumArguments( request ) > 0)
{
/* This is a parameter set request */
@@ -313,10 +313,10 @@ static int ThornParameterPage(const cGH *cctkGH, httpRequest *request, void *dat
{
first = 0;
fprintf(stderr, "Setting %s::%s to %s\n", thorn,
- HTTP_Arg_Name( argument),
- HTTP_Arg_Value( argument ));
- HTTP_SteerQueue(thorn, HTTP_Arg_Name( argument),
- HTTP_Arg_Value( argument ));
+ HTTP_ArgName( argument),
+ HTTP_ArgValue( argument ));
+ HTTP_SteerQueue(thorn, HTTP_ArgName( argument),
+ HTTP_ArgValue( argument ));
}
}
SendHTTP_Redirect_Header( request );
@@ -339,7 +339,7 @@ static int ThornParameterPage(const cGH *cctkGH, httpRequest *request, void *dat
{
/* Display the page. */
/* Status message */
- HTTP_Send_OK_Header( request );
+ HTTP_SendOKHeader( request );
HTTP_SetDoctype( message );
HTTP_SendString(request, message);
@@ -703,7 +703,7 @@ static int ParameterPage(const cGH *cctkGH, httpRequest *request, void *data)
USER_LENGTH);
int readonly = notauthorised;
- if(HTTP_Num_Arguments( request ) > 0)
+ if(HTTP_NumArguments( request ) > 0)
{
/* This is a parameter set request */
@@ -718,10 +718,10 @@ static int ParameterPage(const cGH *cctkGH, httpRequest *request, void *data)
{
first = 0;
fprintf(stderr, "Setting %s::%s to %s\n", pData->thorn,
- HTTP_Arg_Name( argument),
- HTTP_Arg_Value( argument ));
- HTTP_SteerQueue(pData->thorn, HTTP_Arg_Name( argument),
- HTTP_Arg_Value( argument ));
+ HTTP_ArgName( argument),
+ HTTP_ArgValue( argument ));
+ HTTP_SteerQueue(pData->thorn, HTTP_ArgName( argument),
+ HTTP_ArgValue( argument ));
}
}
SendHTTP_Redirect_Header( request );
@@ -742,7 +742,7 @@ static int ParameterPage(const cGH *cctkGH, httpRequest *request, void *data)
{
t_range *range;
/* Display the page. */
- HTTP_Send_OK_Header( request );
+ HTTP_SendOKHeader( request );
HTTP_SetDoctype( message );
HTTP_SendString(request, message);
diff --git a/src/Redirect.c b/src/Redirect.c
index ced0287..79d2bb9 100644
--- a/src/Redirect.c
+++ b/src/Redirect.c
@@ -288,7 +288,7 @@ static int RedirectPage(const cGH *cctkGH, httpRequest *request, void *data)
/* avoid compiler warning about unused parameter */
data = data;
- HTTP_Send_OK_Header(request);
+ HTTP_SendOKHeader(request);
/* Start the page */
SetToCString(message,"<html><head><title>Server Redirect</title>\n");
diff --git a/src/Thorns.c b/src/Thorns.c
index 2577418..99fe222 100644
--- a/src/Thorns.c
+++ b/src/Thorns.c
@@ -121,7 +121,7 @@ static int ThornMainPage(const cGH *cctkGH, httpRequest *request, void *data)
/* avoid compiler warning about unused parameter */
data = data;
- HTTP_Send_OK_Header( request );
+ HTTP_SendOKHeader( request );
HTTP_SetDoctype( message );
HTTP_SendString(request, message);
@@ -250,7 +250,7 @@ static int ThornPage(const cGH *cctkGH, httpRequest *request, void *data)
String *message = String_New();
const char *thorn = (const char *)data;
- HTTP_Send_OK_Header(request);
+ HTTP_SendOKHeader(request);
HTTP_SetDoctype( message );
HTTP_SendString(request, message);
diff --git a/src/http.c b/src/http.c
index c9cdd4d..a2e2ff1 100644
--- a/src/http.c
+++ b/src/http.c
@@ -93,17 +93,17 @@ typedef struct httpRequestTag
#define BLANK_HTTPREQUEST {NULL, 0, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
/* Accessors for the httpRequest structure */
-unsigned int HTTP_Major_Version( const httpRequest *request )
+unsigned int HTTP_MajorVersion( const httpRequest *request )
{
return request->http_major_version;
}
-unsigned int HTTP_Minor_Version( const httpRequest *request )
+unsigned int HTTP_MinorVersion( const httpRequest *request )
{
return request->http_minor_version;
}
-unsigned int HTTP_Num_Arguments( const httpRequest *request )
+unsigned int HTTP_NumArguments( const httpRequest *request )
{
return request->n_arguments;
}
@@ -123,12 +123,12 @@ void HTTP_SetResidual( httpRequest *request, const char *residual )
request->residual = residual;
}
-const char * HTTP_Arg_Value( const httpArg *arg )
+const char * HTTP_ArgValue( const httpArg *arg )
{
return arg->value;
}
-const char * HTTP_Arg_Name( const httpArg *arg )
+const char * HTTP_ArgName( const httpArg *arg )
{
return arg->arg;
}
diff --git a/src/httpRequest.h b/src/httpRequest.h
index fe1c0eb..5044fb3 100644
--- a/src/httpRequest.h
+++ b/src/httpRequest.h
@@ -36,21 +36,21 @@ int HTTP_Write(httpRequest *request, const char *buffer, size_t count);
int HTTP_Read(httpRequest *request, char *buffer, size_t count);
int HTTP_Send( httpRequest *request, const char * message );
-void HTTP_Send_OK_Header( httpRequest *request);
-void HTTP_Send_OK_Refresh_Header( httpRequest *request, int secs );
+void HTTP_SendOKHeader( httpRequest *request);
+void HTTP_SendOKRefreshHeader( httpRequest *request, int secs );
unsigned long int HTTP_Port(void);
-unsigned int HTTP_Major_Version( const httpRequest *request );
-unsigned int HTTP_Minor_Version( const httpRequest *request );
+unsigned int HTTP_MajorVersion( const httpRequest *request );
+unsigned int HTTP_MinorVersion( const httpRequest *request );
const char * HTTP_URI( const httpRequest *request );
void HTTP_SetResidual( httpRequest *request, const char *residual );
const char * HTTP_Residual( const httpRequest *request );
-unsigned int HTTP_Num_Arguments( const httpRequest *request );
-const char * HTTP_Get_Argument( const httpRequest *request, unsigned int index );
+unsigned int HTTP_NumArguments( const httpRequest *request );
+const char * HTTP_GetArgument( const httpRequest *request, unsigned int index );
httpSocket * HTTP_Connection( const httpRequest *request );
-const char * HTTP_Arg_Name( const httpArg *arg );
-const char * HTTP_Arg_Value( const httpArg *arg );
+const char * HTTP_ArgName( const httpArg *arg );
+const char * HTTP_ArgValue( const httpArg *arg );
#ifdef __cplusplus
}
#endif