/* * mycgi.h * CGI スクリプトを処理する関数 */ #ifndef _MYCGI_H_ #define _MYCGI_H_ #ifndef APR_GENERAL_H #include "apr_general.h" #endif #ifndef APR_FILE_IO_H #include "apr_file_io.h" #endif #ifndef APR_ERRNO_H #include "apr_errno.h" #endif #ifndef APR_TABLES_H #include "apr_tables.h" #endif #ifndef APR_BUCKETS_H #include "apr_buckets.h" #endif #ifndef APR_STRINGS_H #include "apr_strings.h" #endif #ifndef APR_THREAD_PROC_H #include "apr_thread_proc.h" #endif #ifndef _MYBB_H_ #include "mybb.h" #endif /* CGI プロセス用コンテクスト */ typedef struct _cgi_ctx { apr_pool_t *pool; /* メモリプール */ char * prog_name; /* プログラムパス */ char * script_name; /* スクリプトパス */ apr_table_t *env_tab; /* 環境変数テーブル */ apr_size_t clen; /* CGI プロセスに渡すデータサイズ(バイト長)*/ apr_bucket_brigade *bbin; /* CGI プロセスに渡すデータストリーム */ apr_bucket_brigade *bbout; /* CGI プロセスから受け取るデータのストリーム */ } cgi_ctx; /* * 返り値: * 1: 成功 * 0: 失敗 */ int invoke_cgi (cgi_ctx *cctx); #endif /* _MYCGI_H_ */