taskrambler  0.1.8
Web server and task management solution.
mime_type.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * getMimeType (const char *, size_t)
 
void clearMimeTypes (void)
 

Detailed Description

Author
Georg Hopp

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file mime_type.h.

Function Documentation

void clearMimeTypes ( void  )

Definition at line 106 of file mime_type.c.

References mime_types.

Referenced by main().

107 {
108  delete(mime_types);
109 }
Hash mime_types
Definition: mime_type.c:36

+ Here is the caller graph for this function:

char* getMimeType ( const char *  ,
size_t   
)

Definition at line 84 of file mime_type.c.

References hashGet(), mime_types, and readMimeTypes().

Referenced by assetCtor(), and httpWorkerProcess().

85 {
86  HashValue type;
87 
88  if (NULL == mime_types) {
89  readMimeTypes();
90 
91  if (NULL == mime_types) {
92  return NULL;
93  }
94  }
95 
96  type = hashGet(mime_types, ext, len);
97 
98  if (NULL == type) {
99  return NULL;
100  }
101 
102  return (char *)type->value;
103 }
void readMimeTypes(void)
Definition: mime_type.c:39
void * hashGet(Hash, const char *, size_t)
Definition: hash/get.c:51
Hash mime_types
Definition: mime_type.c:36

+ Here is the call graph for this function:

+ Here is the caller graph for this function: