OSDN Git Service

* Updated changelog.
[modchxj/mod_chxj.git] / include / chxj_specified_device.h
old mode 100644 (file)
new mode 100755 (executable)
index 9d6abd9..d02c073
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2009 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");
@@ -30,12 +30,27 @@ typedef enum {
   CHXJ_SPEC_Hdml,
   CHXJ_SPEC_Jhtml,
   CHXJ_SPEC_Jxhtml,    /* use XHTML */
+  CHXJ_SPEC_iPhone2,   /* use XHTML */
+  CHXJ_SPEC_iPhone3,   /* use XHTML */
+  CHXJ_SPEC_iPhone4,   /* use XHTML */
+  CHXJ_SPEC_softbank_android, /* use XHTML (SoftBank) */
+  CHXJ_SPEC_au_android, /* use XHTML (au KDDI)  */
+  CHXJ_SPEC_docomo_android, /* use XHTML (docomo)   */
+  CHXJ_SPEC_android,        /* use XHTML */
   CHXJ_SPEC_HTML,
 } spec_type;
 
 #define CHXJ_PIC_OK                (0x01)
 #define CHXJ_PIC_NG                (0x00)
 
+#define IS_IPHONE(X) (((X)->html_spec_type == CHXJ_SPEC_iPhone2) \
+                     || ((X)->html_spec_type == CHXJ_SPEC_iPhone3) \
+                     || ((X)->html_spec_type == CHXJ_SPEC_iPhone4))
+#define IS_ANDROID(X) (  ((X)->html_spec_type == CHXJ_SPEC_softbank_android) \
+                      || ((X)->html_spec_type == CHXJ_SPEC_au_android)  \
+                      || ((X)->html_spec_type == CHXJ_SPEC_docomo_android) \
+                      || ((X)->html_spec_type == CHXJ_SPEC_android))
+
 #include "mod_chxj.h"
 #include "chxj_cookie.h"
 
@@ -44,6 +59,7 @@ typedef struct device_table_t device_table;
 
 struct device_table_t {
   struct device_table_t* next;
+  int                    provider;              /* DOCOMO|AU|SOFTBANK|UNKNOWN */
   const char*            device_id;
   const char*            device_name;
   spec_type              html_spec_type;
@@ -85,6 +101,7 @@ struct device_table_t {
   /*--------------------------------------------------------------------------*/
   int                    color;
   char*                  emoji_type;
+  char*                  output_encoding;  /* Output encoding */
 };
 
 typedef struct device_table_list_t  device_table_list;
@@ -96,6 +113,9 @@ struct device_table_list_t {
   ap_regex_t                  *regexp;
   device_table                *table;
   device_table                *tail;
+
+  device_table                **sort_table;
+  size_t                      table_count;
 };
 
 typedef struct converter_t converter_t;