/*
- * $Id: file.h,v 1.13 2002-10-12 04:02:46 didg Exp $
+ * $Id: file.h,v 1.26 2010/03/12 15:16:49 franklahm Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
#define FILPBIT_DFLEN 9
#define FILPBIT_RFLEN 10
#define FILPBIT_EXTDFLEN 11
-#define FILPBIT_PDINFO 13 /* ProDOS Info */
+#define FILPBIT_PDINFO 13 /* ProDOS Info/ UTF8 name */
#define FILPBIT_EXTRFLEN 14
-
-/* attribute bits. (d) = directory attribute bit as well. */
-#define ATTRBIT_INVISIBLE (1<<0) /* invisible (d) */
-#define ATTRBIT_MULTIUSER (1<<1) /* multiuser */
-#define ATTRBIT_SYSTEM (1<<2) /* system (d) */
-#define ATTRBIT_DOPEN (1<<3) /* data fork already open */
-#define ATTRBIT_ROPEN (1<<4) /* resource fork already open */
-#define ATTRBIT_SHARED (1<<4) /* shared area (d) */
-#define ATTRBIT_NOWRITE (1<<5) /* write inhibit(v2)/read-only(v1) bit */
-#define ATTRBIT_BACKUP (1<<6) /* backup needed (d) */
-#define ATTRBIT_NORENAME (1<<7) /* rename inhibit (d) */
-#define ATTRBIT_NODELETE (1<<8) /* delete inhibit (d) */
-#define ATTRBIT_NOCOPY (1<<10) /* copy protect */
-#define ATTRBIT_SETCLR (1<<15) /* set/clear bits (d) */
+#define FILPBIT_UNIXPR 15
struct extmap {
char *em_ext;
};
#define kTextEncodingUTF8 0x08000103
-extern char *set_name __P((char *, const char *, u_int32_t ) );
-extern struct extmap *getextmap __P((const char *));
-extern struct extmap *getdefextmap __P((void));
+typedef enum {
+ /* Mac OS encodings*/
+ kTextEncodingMacRoman = 0L,
+ kTextEncodingMacJapanese = 1,
+ kTextEncodingMacChineseTrad = 2,
+ kTextEncodingMacKorean = 3,
+ kTextEncodingMacArabic = 4,
+ kTextEncodingMacHebrew = 5,
+ kTextEncodingMacGreek = 6,
+ kTextEncodingMacCyrillic = 7,
+ kTextEncodingMacDevanagari = 9,
+ kTextEncodingMacGurmukhi = 10,
+ kTextEncodingMacGujarati = 11,
+ kTextEncodingMacOriya = 12,
+ kTextEncodingMacBengali = 13,
+ kTextEncodingMacTamil = 14,
+ kTextEncodingMacTelugu = 15,
+ kTextEncodingMacKannada = 16,
+ kTextEncodingMacMalayalam = 17,
+ kTextEncodingMacSinhalese = 18,
+ kTextEncodingMacBurmese = 19,
+ kTextEncodingMacKhmer = 20,
+ kTextEncodingMacThai = 21,
+ kTextEncodingMacLaotian = 22,
+ kTextEncodingMacGeorgian = 23,
+ kTextEncodingMacArmenian = 24,
+ kTextEncodingMacChineseSimp = 25,
+ kTextEncodingMacTibetan = 26,
+ kTextEncodingMacMongolian = 27,
+ kTextEncodingMacEthiopic = 28,
+ kTextEncodingMacCentralEurRoman = 29,
+ kTextEncodingMacVietnamese = 30,
+ kTextEncodingMacExtArabic = 31, /* The following use script code 0, smRoman*/
+ kTextEncodingMacSymbol = 33,
+ kTextEncodingMacDingbats = 34,
+ kTextEncodingMacTurkish = 35,
+ kTextEncodingMacCroatian = 36,
+ kTextEncodingMacIcelandic = 37,
+ kTextEncodingMacRomanian = 38,
+ kTextEncodingMacCeltic = 39,
+ kTextEncodingMacGaelic = 40,
+ kTextEncodingMacKeyboardGlyphs = 41,
+} kTextEncoding_t;
+
+extern char *set_name (const struct vol *, char *, cnid_t, char *, cnid_t, u_int32_t );
+
+extern struct extmap *getextmap (const char *);
+extern struct extmap *getdefextmap (void);
+
+extern int getfilparams (struct vol *, u_int16_t, struct path *,
+ struct dir *, char *buf, size_t *);
+
+extern int setfilparams (struct vol *, struct path *, u_int16_t, char *);
+extern int renamefile (const struct vol *, int, char *, char *, char *, struct adouble *);
+extern int copyfile (const struct vol *, const struct vol *, int, char *, char *, char *, struct adouble *);
+extern int deletefile (const struct vol *, int, char *, int);
+
+extern int getmetadata (struct vol *vol, u_int16_t bitmap, struct path *path,
+ struct dir *dir, char *buf, size_t *buflen, struct adouble *adp);
-extern int getfilparams __P((struct vol *, u_int16_t, struct path *,
- struct dir *, char *buf, int *));
+extern void *get_finderinfo (const struct vol *, const char *, struct adouble *, void *, int);
-extern int setfilparams __P((struct vol *, struct path *, u_int16_t, char *));
-extern int renamefile __P((char *, char *, char *, const int, struct adouble *));
-extern int copyfile __P((char *, char *, char *, const int));
-extern int deletefile __P((char *, int));
+extern size_t mtoUTF8 (const struct vol *, const char *, size_t , char *, size_t );
+extern int copy_path_name (const struct vol *, char *, char *i);
-extern void *get_finderinfo __P((const char *, struct adouble *, void *));
+extern uint32_t get_id (struct vol *,
+ struct adouble *,
+ const struct stat *,
+ cnid_t ,
+ const char *,
+ int );
/* FP functions */
-extern int afp_exchangefiles __P((AFPObj *, char *, int, char *, int *));
-extern int afp_setfilparams __P((AFPObj *, char *, int, char *, int *));
-extern int afp_copyfile __P((AFPObj *, char *, int, char *, int *));
-extern int afp_createfile __P((AFPObj *, char *, int, char *, int *));
-#ifdef CNID_DB
-extern int afp_createid __P((AFPObj *, char *, int, char *, int *));
-extern int afp_resolveid __P((AFPObj *, char *, int, char *, int *));
-extern int afp_deleteid __P((AFPObj *, char *, int, char *, int *));
-#else /* CNID_DB */
-#define afp_createid afp_null
-#define afp_resolveid afp_null
-#define afp_deleteid afp_null
-#endif /* AD_VERSION > AD_VERSION1 */
+int afp_exchangefiles (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
+int afp_setfilparams (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
+int afp_copyfile (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
+int afp_createfile (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
+int afp_createid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
+int afp_resolveid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
+int afp_deleteid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
#endif