OSDN Git Service

* Updated changelog.
[modchxj/mod_chxj.git] / include / chxj_dbm.h
1 /*
2  * Copyright (C) 2005-2011 Atsushi Konno All rights reserved.
3  * Copyright (C) 2005 QSDN,Inc. All rights reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef __CHXJ_DBM_H__
18 #define __CHXJ_DBM_H__
19
20 #include "mod_chxj.h"
21 #include "apr.h"
22 #include "apu.h"
23 #include "apr_dbm.h"
24 #include "apr_uuid.h"
25 #include "apr_md5.h"
26 #include "apr_base64.h"
27 #include "apr_uri.h"
28 #include "apr_time.h"
29 #include "apr_date.h"
30
31 extern void chxj_cookie_db_unlock(request_rec *r, apr_file_t *file);
32 extern apr_file_t *chxj_cookie_db_lock(request_rec *r);
33 extern char *chxj_cookie_db_lock_name_create(request_rec *r, const char *dir);
34 extern char *chxj_cookie_db_name_create(request_rec *r, const char *dir);
35 extern char *chxj_cookie_expire_db_lock_name_create(request_rec *r, const char *dir);
36 extern apr_file_t *chxj_cookie_expire_db_lock(request_rec *r);
37 extern void chxj_cookie_expire_db_unlock(request_rec *r, apr_file_t *file);
38
39 /* operation for cookie */
40 extern int chxj_save_cookie_dbm(request_rec *r, mod_chxj_config *m, const char *cookie_id, const char *store_string);
41 extern int chxj_update_cookie_dbm(request_rec *r, mod_chxj_config *m, const char *cookie_id, const char *store_string);
42 extern char *chxj_load_cookie_dbm(request_rec *r, mod_chxj_config *m, const char *cookie_id);
43 extern int chxj_delete_cookie_dbm(request_rec *r, mod_chxj_config *m, const char *cookie_id);
44 extern int chxj_save_cookie_expire_dbm(request_rec *r, mod_chxj_config *m, const char *cookie_id);
45 extern int chxj_delete_cookie_expire_dbm(request_rec *r, mod_chxj_config *m, const char *cookie_id);
46 extern int chxj_cookie_expire_gc_dbm(request_rec *r, mod_chxj_config *m);
47 extern cookie_lock_t *chxj_cookie_lock_dbm(request_rec *r, mod_chxj_config *UNUSED(m));
48 extern int chxj_cookie_unlock_dbm(request_rec *r, cookie_lock_t *lock, mod_chxj_config *UNUSED(m));
49 #endif