/[osn-commons]/trunk/freehttpd/freehttpd.h
ViewVC logotype

Diff of /trunk/freehttpd/freehttpd.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 44 by rakinar2, Sat Aug 10 18:33:37 2024 UTC revision 45 by rakinar2, Sun Aug 11 17:35:46 2024 UTC
# Line 1  Line 1 
1  #ifndef FREEHTTPD_H  #ifndef FREEHTTPD_H
2  #define FREEHTTPD_H  #define FREEHTTPD_H
3    
4    #include <magic.h>
5  #include <stddef.h>  #include <stddef.h>
6    
7  typedef struct freehttpd_config  typedef struct freehttpd_config
# Line 8  typedef struct freehttpd_config Line 9  typedef struct freehttpd_config
9      unsigned int port;      unsigned int port;
10      char *addr;      char *addr;
11      unsigned int max_listen_queue;      unsigned int max_listen_queue;
12        char *docroot;
13      size_t max_method_len;      size_t max_method_len;
14      size_t max_uri_len;      size_t max_uri_len;
15      size_t max_version_len;      size_t max_version_len;
16    
17        /* The following fields are for internal use only */
18        size_t _docroot_length;
19  } freehttpd_config_t;  } freehttpd_config_t;
20    
21  typedef enum freehttpd_error_code  typedef enum freehttpd_error_code
# Line 25  typedef enum freehttpd_error_code Line 30  typedef enum freehttpd_error_code
30      E_SYSCALL_ACCEPT,      E_SYSCALL_ACCEPT,
31      E_SYSCALL_RECV,      E_SYSCALL_RECV,
32      E_SYSCALL_SETSOCKOPT,      E_SYSCALL_SETSOCKOPT,
33        E_SYSCALL_READ,
34        E_SYSCALL_WRITE,
35      E_LIBC_FDOPEN,      E_LIBC_FDOPEN,
36      E_LIBC_MALLOC      E_LIBC_MALLOC
37  } ecode_t;  } ecode_t;
# Line 37  typedef enum freehttpd_config_option Line 44  typedef enum freehttpd_config_option
44      FREEHTTPD_CONFIG_MAX_METHOD_LEN,      FREEHTTPD_CONFIG_MAX_METHOD_LEN,
45      FREEHTTPD_CONFIG_MAX_URI_LEN,      FREEHTTPD_CONFIG_MAX_URI_LEN,
46      FREEHTTPD_CONFIG_MAX_VERSION_LEN,      FREEHTTPD_CONFIG_MAX_VERSION_LEN,
47      CONFIG_OPTION_COUNT      FREEHTTPD_CONFIG_DOCROOT,
48  } freehttpd_opt_t;  } freehttpd_opt_t;
49    
50  typedef struct freehttpd freehttpd_t;  typedef struct freehttpd freehttpd_t;
51    
52  freehttpd_t *freehttpd_init ();  freehttpd_t *freehttpd_init (magic_t magic);
53  void freehttpd_free (freehttpd_t *freehttpd);  void freehttpd_free (freehttpd_t *freehttpd);
54  ecode_t freehttpd_start (freehttpd_t *restrict freehttpd);  ecode_t freehttpd_start (freehttpd_t *restrict freehttpd);
55  ecode_t freehttpd_setopt (freehttpd_t *freehttpd, freehttpd_opt_t opt,  ecode_t freehttpd_setopt (freehttpd_t *freehttpd, freehttpd_opt_t opt,

Legend:
Removed from v.44  
changed lines
  Added in v.45

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26