2 * Copyright (c) 1990,1991 Regents of The University of Michigan.
5 * Permission to use, copy, modify, and distribute this software and
6 * its documentation for any purpose and without fee is hereby granted,
7 * provided that the above copyright notice appears in all copies and
8 * that both that copyright notice and this permission notice appear
9 * in supporting documentation, and that the name of The University
10 * of Michigan not be used in advertising or publicity pertaining to
11 * distribution of the software without specific, written prior
12 * permission. This software is supplied as is without expressed or
13 * implied warranties of any kind.
15 * Research Systems Unix Group
16 * The University of Michigan
18 * 535 W. William Street
21 * netatalk@itd.umich.edu
27 /*#include <sys/stat.h>*/ /* including it here causes some confusion */
28 #include <sys/param.h>
29 #include <arpa/inet.h>
30 #include <atalk/adouble.h>
31 #include <atalk/globals.h>
34 #include "directory.h"
36 extern const u_char ufinderi[];
38 #define FILPBIT_ATTR 0
39 #define FILPBIT_PDID 1
40 #define FILPBIT_CDATE 2
41 #define FILPBIT_MDATE 3
42 #define FILPBIT_BDATE 4
43 #define FILPBIT_FINFO 5
44 #define FILPBIT_LNAME 6
45 #define FILPBIT_SNAME 7
46 #define FILPBIT_FNUM 8
47 #define FILPBIT_DFLEN 9
48 #define FILPBIT_RFLEN 10
49 #define FILPBIT_EXTDFLEN 11
50 #define FILPBIT_PDINFO 13 /* ProDOS Info/ UTF8 name */
51 #define FILPBIT_EXTRFLEN 14
52 #define FILPBIT_UNIXPR 15
60 #define kTextEncodingUTF8 0x08000103
64 kTextEncodingMacRoman = 0L,
65 kTextEncodingMacJapanese = 1,
66 kTextEncodingMacChineseTrad = 2,
67 kTextEncodingMacKorean = 3,
68 kTextEncodingMacArabic = 4,
69 kTextEncodingMacHebrew = 5,
70 kTextEncodingMacGreek = 6,
71 kTextEncodingMacCyrillic = 7,
72 kTextEncodingMacDevanagari = 9,
73 kTextEncodingMacGurmukhi = 10,
74 kTextEncodingMacGujarati = 11,
75 kTextEncodingMacOriya = 12,
76 kTextEncodingMacBengali = 13,
77 kTextEncodingMacTamil = 14,
78 kTextEncodingMacTelugu = 15,
79 kTextEncodingMacKannada = 16,
80 kTextEncodingMacMalayalam = 17,
81 kTextEncodingMacSinhalese = 18,
82 kTextEncodingMacBurmese = 19,
83 kTextEncodingMacKhmer = 20,
84 kTextEncodingMacThai = 21,
85 kTextEncodingMacLaotian = 22,
86 kTextEncodingMacGeorgian = 23,
87 kTextEncodingMacArmenian = 24,
88 kTextEncodingMacChineseSimp = 25,
89 kTextEncodingMacTibetan = 26,
90 kTextEncodingMacMongolian = 27,
91 kTextEncodingMacEthiopic = 28,
92 kTextEncodingMacCentralEurRoman = 29,
93 kTextEncodingMacVietnamese = 30,
94 kTextEncodingMacExtArabic = 31, /* The following use script code 0, smRoman*/
95 kTextEncodingMacSymbol = 33,
96 kTextEncodingMacDingbats = 34,
97 kTextEncodingMacTurkish = 35,
98 kTextEncodingMacCroatian = 36,
99 kTextEncodingMacIcelandic = 37,
100 kTextEncodingMacRomanian = 38,
101 kTextEncodingMacCeltic = 39,
102 kTextEncodingMacGaelic = 40,
103 kTextEncodingMacKeyboardGlyphs = 41,
106 extern char *set_name (const struct vol *, char *, cnid_t, char *, cnid_t, uint32_t );
108 extern struct extmap *getextmap (const char *);
109 extern struct extmap *getdefextmap (void);
111 extern int getfilparams (const AFPObj *obj, struct vol *, uint16_t, struct path *,
112 struct dir *, char *buf, size_t *, int);
113 extern int setfilparams (const AFPObj *obj, struct vol *, struct path *, uint16_t, char *);
114 extern int renamefile (const struct vol *, int, char *, char *, char *, struct adouble *);
115 extern int copyfile (const struct vol *, const struct vol *, int, char *, char *, char *, struct adouble *);
116 extern int deletefile (const struct vol *, int, char *, int);
118 extern int getmetadata (const AFPObj *obj, struct vol *vol, uint16_t bitmap, struct path *path,
119 struct dir *dir, char *buf, size_t *buflen, struct adouble *adp);
121 extern void *get_finderinfo (const struct vol *, const char *, struct adouble *, void *, int);
123 extern size_t mtoUTF8 (const struct vol *, const char *, size_t , char *, size_t );
124 extern int copy_path_name (const struct vol *, char *, char *i);
126 extern uint32_t get_id (struct vol *,
134 int afp_exchangefiles (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
135 int afp_setfilparams (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
136 int afp_copyfile (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
137 int afp_createfile (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
138 int afp_createid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
139 int afp_resolveid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
140 int afp_deleteid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);