2 * $Id: file.h,v 1.16.2.1 2003-06-23 10:25:07 didg Exp $
4 * Copyright (c) 1990,1991 Regents of The University of Michigan.
7 * Permission to use, copy, modify, and distribute this software and
8 * its documentation for any purpose and without fee is hereby granted,
9 * provided that the above copyright notice appears in all copies and
10 * that both that copyright notice and this permission notice appear
11 * in supporting documentation, and that the name of The University
12 * of Michigan not be used in advertising or publicity pertaining to
13 * distribution of the software without specific, written prior
14 * permission. This software is supplied as is without expressed or
15 * implied warranties of any kind.
17 * Research Systems Unix Group
18 * The University of Michigan
20 * 535 W. William Street
23 * netatalk@itd.umich.edu
29 /*#include <sys/stat.h>*/ /* including it here causes some confusion */
30 #include <sys/param.h>
31 #include <sys/cdefs.h>
32 #include <netatalk/endian.h>
33 #include <atalk/adouble.h>
37 #include "directory.h"
39 extern const u_char ufinderi[];
41 #define FILPBIT_ATTR 0
42 #define FILPBIT_PDID 1
43 #define FILPBIT_CDATE 2
44 #define FILPBIT_MDATE 3
45 #define FILPBIT_BDATE 4
46 #define FILPBIT_FINFO 5
47 #define FILPBIT_LNAME 6
48 #define FILPBIT_SNAME 7
49 #define FILPBIT_FNUM 8
50 #define FILPBIT_DFLEN 9
51 #define FILPBIT_RFLEN 10
52 #define FILPBIT_EXTDFLEN 11
53 #define FILPBIT_PDINFO 13 /* ProDOS Info/ UTF8 name */
54 #define FILPBIT_EXTRFLEN 14
56 /* attribute bits. (d) = directory attribute bit as well. */
57 #define ATTRBIT_INVISIBLE (1<<0) /* invisible (d) */
58 #define ATTRBIT_MULTIUSER (1<<1) /* multiuser */
59 #define ATTRBIT_SYSTEM (1<<2) /* system (d) */
60 #define ATTRBIT_DOPEN (1<<3) /* data fork already open */
61 #define ATTRBIT_ROPEN (1<<4) /* resource fork already open */
62 #define ATTRBIT_SHARED (1<<4) /* shared area (d) */
63 #define ATTRBIT_NOWRITE (1<<5) /* write inhibit(v2)/read-only(v1) bit */
64 #define ATTRBIT_BACKUP (1<<6) /* backup needed (d) */
65 #define ATTRBIT_NORENAME (1<<7) /* rename inhibit (d) */
66 #define ATTRBIT_NODELETE (1<<8) /* delete inhibit (d) */
67 #define ATTRBIT_NOCOPY (1<<10) /* copy protect */
68 #define ATTRBIT_SETCLR (1<<15) /* set/clear bits (d) */
76 #define kTextEncodingUTF8 0x08000103
80 kTextEncodingMacRoman = 0L,
81 kTextEncodingMacJapanese = 1,
82 kTextEncodingMacChineseTrad = 2,
83 kTextEncodingMacKorean = 3,
84 kTextEncodingMacArabic = 4,
85 kTextEncodingMacHebrew = 5,
86 kTextEncodingMacGreek = 6,
87 kTextEncodingMacCyrillic = 7,
88 kTextEncodingMacDevanagari = 9,
89 kTextEncodingMacGurmukhi = 10,
90 kTextEncodingMacGujarati = 11,
91 kTextEncodingMacOriya = 12,
92 kTextEncodingMacBengali = 13,
93 kTextEncodingMacTamil = 14,
94 kTextEncodingMacTelugu = 15,
95 kTextEncodingMacKannada = 16,
96 kTextEncodingMacMalayalam = 17,
97 kTextEncodingMacSinhalese = 18,
98 kTextEncodingMacBurmese = 19,
99 kTextEncodingMacKhmer = 20,
100 kTextEncodingMacThai = 21,
101 kTextEncodingMacLaotian = 22,
102 kTextEncodingMacGeorgian = 23,
103 kTextEncodingMacArmenian = 24,
104 kTextEncodingMacChineseSimp = 25,
105 kTextEncodingMacTibetan = 26,
106 kTextEncodingMacMongolian = 27,
107 kTextEncodingMacEthiopic = 28,
108 kTextEncodingMacCentralEurRoman = 29,
109 kTextEncodingMacVietnamese = 30,
110 kTextEncodingMacExtArabic = 31, /* The following use script code 0, smRoman*/
111 kTextEncodingMacSymbol = 33,
112 kTextEncodingMacDingbats = 34,
113 kTextEncodingMacTurkish = 35,
114 kTextEncodingMacCroatian = 36,
115 kTextEncodingMacIcelandic = 37,
116 kTextEncodingMacRomanian = 38,
117 kTextEncodingMacCeltic = 39,
118 kTextEncodingMacGaelic = 40,
119 kTextEncodingMacKeyboardGlyphs = 41,
122 extern char *set_name __P((const struct vol *, char *, char *, u_int32_t ) );
124 extern struct extmap *getextmap __P((const char *));
125 extern struct extmap *getdefextmap __P((void));
127 extern int getfilparams __P((struct vol *, u_int16_t, struct path *,
128 struct dir *, char *buf, int *));
130 extern int setfilparams __P((struct vol *, struct path *, u_int16_t, char *));
131 extern int renamefile __P((char *, char *, char *, const int, struct adouble *));
132 extern int copyfile __P((char *, char *, char *, const int));
133 extern int deletefile __P((struct vol *, char *, int));
135 extern void *get_finderinfo __P((const char *, struct adouble *, void *));
136 extern int copy_path_name __P((char *, char *i));
138 extern u_int32_t get_id __P((struct vol *, struct adouble *, const struct stat *,
139 const cnid_t , const char *, const int ));
142 extern int afp_exchangefiles __P((AFPObj *, char *, int, char *, int *));
143 extern int afp_setfilparams __P((AFPObj *, char *, int, char *, int *));
144 extern int afp_copyfile __P((AFPObj *, char *, int, char *, int *));
145 extern int afp_createfile __P((AFPObj *, char *, int, char *, int *));
147 extern int afp_createid __P((AFPObj *, char *, int, char *, int *));
148 extern int afp_resolveid __P((AFPObj *, char *, int, char *, int *));
149 extern int afp_deleteid __P((AFPObj *, char *, int, char *, int *));
151 #define afp_createid afp_null
152 #define afp_resolveid afp_null
153 #define afp_deleteid afp_null
154 #endif /* AD_VERSION > AD_VERSION1 */