]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/adouble.h
Start of rfork EA stuff
[netatalk.git] / include / atalk / adouble.h
index 056ed7881c37a7574ccab3716d8beca4a826f139..37e4e531a0db60454ae8e672ea5bba7459313e87 100644 (file)
 #include <sys/time.h>
 
 #include <netatalk/endian.h>
+#include <atalk/bstrlib.h>
 
 /* version info */
 #define AD_VERSION2     0x00020000
 #define AD_VERSION_EA   0x00020002
-#define AD_VERSION      AD_VERSION_EA
+
+/* default */
+#define AD_VERSION      AD_VERSION2
 
 /*
  * AppleDouble entry IDs.
@@ -73,7 +76,7 @@
 #define ADEID_PRIVINO       17
 #define ADEID_PRIVSYN       18 /* in synch with database */
 #define ADEID_PRIVID        19
-#define ADEID_MAX           19
+#define ADEID_MAX           (ADEID_PRIVID + 1)
 
 /* These are the real ids for these entries, as stored in the adouble file */
 #define AD_DEV              0x80444556
@@ -186,19 +189,18 @@ struct adouble {
     int                 ad_adflags;  /* ad_open flags adflags like ADFLAGS_DIR */
     unsigned int        ad_inited;
     int                 ad_options;
-    int                 ad_fileordir;
     int                 ad_refcount; /* used in afpd/ofork.c */
+    void                *ad_resforkbuf;  /* buffer for AD_VERSION_EA ressource fork */
+    size_t              ad_resforkbufsize; /* size of ad_resforkbuf */
     off_t               ad_rlen;     /* ressource fork len with AFP 3.0
                                         the header parameter size is too small. */
     char                *ad_m_name;   /* mac name for open fork */
     int                 ad_m_namelen;
+    bstring             ad_fullpath; /* adouble EA need this */
     struct adouble_fops *ad_ops;
-    uint16_t            ad_open_forks;      /* open forks (by others) */
-#ifdef USE_MMAPPED_HEADERS
-    char                *ad_data;
-#else
+    uint16_t            ad_open_forks; /* open forks (by others) */
+
     char                ad_data[AD_DATASZ_MAX];
-#endif
 };
 
 #define ADFLAGS_DF        (1<<0)
@@ -208,7 +210,6 @@ struct adouble {
 #define ADFLAGS_NOHF      (1<<4)  /* not an error if no ressource fork */
 #define ADFLAGS_RDONLY    (1<<5)  /* don't try readwrite */
 #define ADFLAGS_OPENFORKS (1<<6)  /* check for open fork in ad_metadata function */
-#define ADFLAGS_CREATE    (1<<7)
 
 #define ADVOL_NODEV      (1 << 0)
 #define ADVOL_CACHE      (1 << 1)
@@ -216,9 +217,6 @@ struct adouble {
 #define ADVOL_INVDOTS    (1 << 3) /* dot files (.DS_Store) are invisible) */
 #define ADVOL_NOADOUBLE  (1 << 4)
 
-extern uint32_t adv2_disk_eid[];
-#define DISK_EID(a) (adv2_disk_eid[a])
-
 /* lock flags */
 #define ADLOCK_CLR      (0)
 #define ADLOCK_RD       (1<<0)