OSDN Git Service

* updated for freebsd
[modchxj/mod_chxj.git] / include / chxj_cookie.h
index 2b6a495..26149ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2008 Atsushi Konno All rights reserved.
+ * Copyright (C) 2005-2011 Atsushi Konno All rights reserved.
  * Copyright (C) 2005 QSDN,Inc. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,6 +51,13 @@ struct cookie_t {
   apr_array_header_t* cookie_headers;
 };
 
+typedef struct cookie_lock_t cookie_lock_t;
+
+struct cookie_lock_t {
+  apr_file_t *file;
+};
+
+
 
 extern cookie_t* chxj_save_cookie(
   request_rec*            r);
@@ -116,8 +123,17 @@ extern cookie_t* chxj_update_cookie(
   cookie_t*    old_cookie);
 
 extern apr_time_t chxj_parse_cookie_expires(const char *s);
-extern int chxj_cookie_lock(request_rec *r);
-extern int chxj_cookie_unlock(request_rec *r);
+
+extern cookie_lock_t *__chxj_cookie_lock(request_rec *r, const char *filename, int line);
+extern int __chxj_cookie_unlock(request_rec *r, cookie_lock_t *lock, const char *filename, int line);
+
+extern char *chxj_add_cookie_no_update_parameter(request_rec *r, char *value, int xmlflag);
+extern char *chxj_cookie_only_mode(request_rec *r, const char *src, apr_size_t *len, cookie_t *cookie);
+char * chxj_uniq_id(request_rec *r);
+
+#define chxj_cookie_lock(X) __chxj_cookie_lock((X),__FILE__,__LINE__)
+#define chxj_cookie_unlock(X,L) __chxj_cookie_unlock((X),(L),__FILE__,__LINE__)
+
 #endif
 /*
  * vim:ts=2 et