implemented QSE_DIR_SORT.
changed the way directory listing is formatted.
This commit is contained in:
@ -54,20 +54,12 @@ typedef enum qse_dir_errnum_t qse_dir_errnum_t;
|
||||
enum qse_dir_flag_t
|
||||
{
|
||||
QSE_DIR_MBSPATH = (1 << 0),
|
||||
QSE_DIR_SORT = (1 << 1),
|
||||
QSE_DIR_STAT = (1 << 2)
|
||||
QSE_DIR_SORT = (1 << 1)
|
||||
};
|
||||
|
||||
struct qse_dir_ent_t
|
||||
{
|
||||
const qse_char_t* name;
|
||||
|
||||
struct
|
||||
{
|
||||
int type;
|
||||
qse_foff_t size;
|
||||
qse_ntime_t tmmod;
|
||||
} stat;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -259,15 +259,6 @@ typedef int (*qse_httpd_fmterr_t) (
|
||||
int bufsz
|
||||
);
|
||||
|
||||
typedef int (*qse_httpd_fmtdir_t) (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
const qse_mchar_t* qpath,
|
||||
const qse_httpd_dirent_t* dirent,
|
||||
qse_mchar_t* buf,
|
||||
int bufsz
|
||||
);
|
||||
|
||||
typedef void (*qse_httpd_impede_t) (
|
||||
qse_httpd_t* httpd
|
||||
);
|
||||
@ -305,7 +296,6 @@ struct qse_httpd_rcb_t
|
||||
qse_httpd_peekreq_t peekreq;
|
||||
qse_httpd_pokereq_t pokereq;
|
||||
qse_httpd_fmterr_t fmterr;
|
||||
qse_httpd_fmtdir_t fmtdir;
|
||||
qse_httpd_impede_t impede;
|
||||
qse_httpd_logact_t logact;
|
||||
};
|
||||
@ -492,6 +482,14 @@ struct qse_httpd_rsrc_cgi_t
|
||||
int nph;
|
||||
};
|
||||
|
||||
typedef struct qse_httpd_rsrc_dir_t qse_httpd_rsrc_dir_t;
|
||||
struct qse_httpd_rsrc_dir_t
|
||||
{
|
||||
const qse_mchar_t* path;
|
||||
const qse_mchar_t* head;
|
||||
const qse_mchar_t* foot;
|
||||
};
|
||||
|
||||
typedef struct qse_httpd_rsrc_t qse_httpd_rsrc_t;
|
||||
struct qse_httpd_rsrc_t
|
||||
{
|
||||
@ -505,11 +503,7 @@ struct qse_httpd_rsrc_t
|
||||
} auth;
|
||||
|
||||
qse_httpd_rsrc_cgi_t cgi;
|
||||
|
||||
struct
|
||||
{
|
||||
const qse_mchar_t* path;
|
||||
} dir;
|
||||
qse_httpd_rsrc_dir_t dir;
|
||||
|
||||
struct
|
||||
{
|
||||
@ -827,7 +821,7 @@ QSE_EXPORT qse_httpd_task_t* qse_httpd_entaskdir (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_client_t* client,
|
||||
qse_httpd_task_t* pred,
|
||||
const qse_mchar_t* name,
|
||||
qse_httpd_rsrc_dir_t* dir,
|
||||
qse_htre_t* req
|
||||
);
|
||||
|
||||
|
@ -106,12 +106,14 @@ enum qse_httpd_serverstd_query_code_t
|
||||
{
|
||||
QSE_HTTPD_SERVERSTD_SSL, /* qse_httpd_serverstd_ssl_t */
|
||||
|
||||
QSE_HTTPD_SERVERSTD_NAME, /* const qse_mchar_t* */
|
||||
QSE_HTTPD_SERVERSTD_ROOT, /* qse_httpd_serverstd_root_t */
|
||||
QSE_HTTPD_SERVERSTD_REALM, /* qse_httpd_serverstd_realm_t */
|
||||
QSE_HTTPD_SERVERSTD_AUTH, /* qse_httpd_serverstd_auth_t */
|
||||
QSE_HTTPD_SERVERSTD_DIRCSS, /* const qse_mchar_t* */
|
||||
QSE_HTTPD_SERVERSTD_ERRCSS, /* const qse_mchar_t* */
|
||||
QSE_HTTPD_SERVERSTD_ERRHEAD, /* const qse_mchar_t* */
|
||||
QSE_HTTPD_SERVERSTD_ERRFOOT, /* const qse_mchar_t* */
|
||||
|
||||
QSE_HTTPD_SERVERSTD_DIRHEAD, /* const qse_mchar_t* */
|
||||
QSE_HTTPD_SERVERSTD_DIRFOOT, /* const qse_mchar_t* */
|
||||
|
||||
QSE_HTTPD_SERVERSTD_INDEX, /* qse_httpd_serverstd_index_t */
|
||||
QSE_HTTPD_SERVERSTD_CGI, /* qse_httpd_serverstd_cgi_t */
|
||||
|
Reference in New Issue
Block a user