netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afpd/file.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1990,1991 Regents of The University of Michigan.
3 * All Rights Reserved.
4 *
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.
14 *
15 * Research Systems Unix Group
16 * The University of Michigan
17 * c/o Mike Clark
18 * 535 W. William Street
19 * Ann Arbor, Michigan
20 * +1-313-763-0525
22 */
23
24#ifndef AFPD_FILE_H
25#define AFPD_FILE_H 1
26
27#include <arpa/inet.h>
28#include <sys/param.h>
29/*#include <sys/stat.h>*/ /* including it here causes some confusion */
30
31#include <atalk/adouble.h>
32#include <atalk/globals.h>
33
34#include "directory.h"
35#include "volume.h"
36
37extern const uint8_t ufinderi[];
38
39#define FILPBIT_ATTR 0
40#define FILPBIT_PDID 1
41#define FILPBIT_CDATE 2
42#define FILPBIT_MDATE 3
43#define FILPBIT_BDATE 4
44#define FILPBIT_FINFO 5
45#define FILPBIT_LNAME 6
46#define FILPBIT_SNAME 7
47#define FILPBIT_FNUM 8
48#define FILPBIT_DFLEN 9
49#define FILPBIT_RFLEN 10
50#define FILPBIT_EXTDFLEN 11
51#define FILPBIT_PDINFO 13 /* ProDOS Info/ UTF8 name */
52#define FILPBIT_EXTRFLEN 14
53#define FILPBIT_UNIXPR 15
54
55#define kTextEncodingUTF8 0x08000103
56
100
101extern char *set_name(const struct vol *, char *, cnid_t, char *, cnid_t,
102 uint32_t);
103
104extern struct extmap *getextmap(const char *);
105extern struct extmap *getdefextmap(void);
106
107extern int getfilparams(const AFPObj *obj, struct vol *, uint16_t,
108 struct path *,
109 struct dir *, char *buf, size_t *, int);
110extern int setfilparams(const AFPObj *obj, struct vol *, struct path *,
111 uint16_t, char *);
112extern int renamefile(struct vol *, struct dir *, int, char *, char *, char *,
113 struct adouble *);
114extern int copyfile(struct vol *, struct vol *, struct dir *, int, char *,
115 char *, char *, struct adouble *);
116extern int deletefile(const struct vol *, int, char *, int);
117
118extern int getmetadata(const AFPObj *obj, struct vol *vol, uint16_t bitmap,
119 struct path *path,
120 struct dir *dir, char *buf, size_t *buflen, struct adouble *adp);
121
122extern void *get_finderinfo(const struct vol *, const char *, struct adouble *,
123 void *, int);
124
125extern size_t mtoUTF8(const struct vol *, const char *, size_t, char *, size_t);
126extern int copy_path_name(const struct vol *, char *, char *i);
127
128extern uint32_t get_id(struct vol *,
129 struct adouble *,
130 const struct stat *,
131 cnid_t,
132 const char *,
133 int);
134
135/* FP functions */
136int afp_exchangefiles(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
137 size_t *rbuflen);
138int afp_setfilparams(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
139 size_t *rbuflen);
140int afp_copyfile(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
141 size_t *rbuflen);
142int afp_createfile(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
143 size_t *rbuflen);
144int afp_createid(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
145 size_t *rbuflen);
146int afp_resolveid(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
147 size_t *rbuflen);
148int afp_deleteid(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
149 size_t *rbuflen);
150
151#endif
Part of Netatalk's AppleDouble implementatation.
uint32_t cnid_t
Definition adouble.h:156
const uint8_t ufinderi[ADEDLEN_FINDERI]
Definition afpd/file.c:62
int copyfile(struct vol *, struct vol *, struct dir *, int, char *, char *, char *, struct adouble *)
Definition afpd/file.c:1577
char * set_name(const struct vol *, char *, cnid_t, char *, cnid_t, uint32_t)
Definition afpd/file.c:152
struct extmap * getdefextmap(void)
Definition netatalk_conf.c:1800
uint32_t get_id(struct vol *, struct adouble *, const struct stat *, cnid_t, const char *, int)
Get CNID for did/upath args both from database and adouble file.
Definition afpd/file.c:236
int afp_createid(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
int getfilparams(const AFPObj *obj, struct vol *, uint16_t, struct path *, struct dir *, char *buf, size_t *, int)
Definition afpd/file.c:659
kTextEncoding_t
Definition afpd/file.h:57
@ kTextEncodingMacChineseSimp
Definition afpd/file.h:83
@ kTextEncodingMacVietnamese
Definition afpd/file.h:88
@ kTextEncodingMacDevanagari
Definition afpd/file.h:67
@ kTextEncodingMacMongolian
Definition afpd/file.h:85
@ kTextEncodingMacGurmukhi
Definition afpd/file.h:68
@ kTextEncodingMacGeorgian
Definition afpd/file.h:81
@ kTextEncodingMacEthiopic
Definition afpd/file.h:86
@ kTextEncodingMacArabic
Definition afpd/file.h:63
@ kTextEncodingMacKhmer
Definition afpd/file.h:78
@ kTextEncodingMacIcelandic
Definition afpd/file.h:94
@ kTextEncodingMacBengali
Definition afpd/file.h:71
@ kTextEncodingMacGaelic
Definition afpd/file.h:97
@ kTextEncodingMacMalayalam
Definition afpd/file.h:75
@ kTextEncodingMacCeltic
Definition afpd/file.h:96
@ kTextEncodingMacBurmese
Definition afpd/file.h:77
@ kTextEncodingMacJapanese
Definition afpd/file.h:60
@ kTextEncodingMacSymbol
Definition afpd/file.h:90
@ kTextEncodingMacTurkish
Definition afpd/file.h:92
@ kTextEncodingMacArmenian
Definition afpd/file.h:82
@ kTextEncodingMacCyrillic
Definition afpd/file.h:66
@ kTextEncodingMacLaotian
Definition afpd/file.h:80
@ kTextEncodingMacHebrew
Definition afpd/file.h:64
@ kTextEncodingMacCroatian
Definition afpd/file.h:93
@ kTextEncodingMacRoman
Definition afpd/file.h:59
@ kTextEncodingMacTamil
Definition afpd/file.h:72
@ kTextEncodingMacKorean
Definition afpd/file.h:62
@ kTextEncodingMacExtArabic
Definition afpd/file.h:89
@ kTextEncodingMacSinhalese
Definition afpd/file.h:76
@ kTextEncodingMacGreek
Definition afpd/file.h:65
@ kTextEncodingMacGujarati
Definition afpd/file.h:69
@ kTextEncodingMacTibetan
Definition afpd/file.h:84
@ kTextEncodingMacRomanian
Definition afpd/file.h:95
@ kTextEncodingMacThai
Definition afpd/file.h:79
@ kTextEncodingMacTelugu
Definition afpd/file.h:73
@ kTextEncodingMacDingbats
Definition afpd/file.h:91
@ kTextEncodingMacOriya
Definition afpd/file.h:70
@ kTextEncodingMacChineseTrad
Definition afpd/file.h:61
@ kTextEncodingMacCentralEurRoman
Definition afpd/file.h:87
@ kTextEncodingMacKannada
Definition afpd/file.h:74
@ kTextEncodingMacKeyboardGlyphs
Definition afpd/file.h:98
int deletefile(const struct vol *, int, char *, int)
Definition afpd/file.c:1765
void * get_finderinfo(const struct vol *, const char *, struct adouble *, void *, int)
Definition afpd/file.c:85
int afp_createfile(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
int getmetadata(const AFPObj *obj, struct vol *vol, uint16_t bitmap, struct path *path, struct dir *dir, char *buf, size_t *buflen, struct adouble *adp)
Definition afpd/file.c:302
int afp_resolveid(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/file.c:2031
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 copy_path_name(const struct vol *, char *, char *i)
Definition afpd/file.c:1360
int afp_deleteid(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
int setfilparams(const AFPObj *obj, struct vol *, struct path *, uint16_t, char *)
Definition afpd/file.c:898
int afp_exchangefiles(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
size_t mtoUTF8(const struct vol *, const char *, size_t, char *, size_t)
Definition afpd/file.c:1346
int renamefile(struct vol *, struct dir *, int, char *, char *, char *, struct adouble *)
Definition afpd/file.c:1262
struct extmap * getextmap(const char *)
Definition netatalk_conf.c:1776
static size_t rbuflen
Definition afpfunc_helpers.c:45
static char rbuf[rbufsize]
Definition afpfunc_helpers.c:44
static char buf[MAXPATHLEN+1]
Definition afppasswd.c:66
static AFPObj obj
Definition netatalk.c:62
Definition globals.h:154
Definition adouble.h:191
Definition include/atalk/directory.h:62
Definition include/atalk/volume.h:26
Definition include/atalk/directory.h:97
Definition include/atalk/volume.h:32