mycgi.h
最終更新:2009/10/24
001: /*
002: * mycgi.h
003: * CGI スクリプトを処理する関数
004: */
005:
006: #ifndef _MYCGI_H_
007: #define _MYCGI_H_
008:
009: #ifndef APR_GENERAL_H
010: #include "apr_general.h"
011: #endif
012:
013: #ifndef APR_FILE_IO_H
014: #include "apr_file_io.h"
015: #endif
016:
017: #ifndef APR_ERRNO_H
018: #include "apr_errno.h"
019: #endif
020:
021: #ifndef APR_TABLES_H
022: #include "apr_tables.h"
023: #endif
024:
025: #ifndef APR_BUCKETS_H
026: #include "apr_buckets.h"
027: #endif
028:
029: #ifndef APR_STRINGS_H
030: #include "apr_strings.h"
031: #endif
032:
033: #ifndef APR_THREAD_PROC_H
034: #include "apr_thread_proc.h"
035: #endif
036:
037: #ifndef _MYBB_H_
038: #include "mybb.h"
039: #endif
040:
041: /* CGI プロセス用コンテクスト */
042:
043: typedef struct _cgi_ctx {
044: apr_pool_t *pool; /* メモリプール */
045: char * prog_name; /* プログラムパス */
046: char * script_name; /* スクリプトパス */
047: apr_table_t *env_tab; /* 環境変数テーブル */
048: apr_size_t clen; /* CGI プロセスに渡すデータサイズ(バイト長)*/
049: apr_bucket_brigade *bbin; /* CGI プロセスに渡すデータストリーム */
050: apr_bucket_brigade *bbout; /* CGI プロセスから受け取るデータのストリーム */
051: } cgi_ctx;
052:
053: /*
054: * 返り値:
055: * 1: 成功
056: * 0: 失敗
057: */
058:
059: int invoke_cgi (cgi_ctx *cctx);
060:
061: #endif /* _MYCGI_H_ */
![]() | KAKU PROJECT (2009) |