#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <utime.h>
#include <atalk/adouble.h>
#include <atalk/afp.h>
#include <atalk/cnid.h>
#include <atalk/dsi.h>
#include <atalk/fce_api.h>
#include <atalk/globals.h>
#include <atalk/logger.h>
#include <atalk/netatalk_conf.h>
#include <atalk/unix.h>
#include <atalk/util.h>
#include <atalk/vfs.h>
#include "desktop.h"
#include "dircache.h"
#include "directory.h"
#include "file.h"
#include "filedir.h"
#include "fork.h"
#include "unix.h"
#include "volume.h"
Data Structures | |
struct | reenum |
Macros | |
#define | PARAM_NEED_ADP(b) |
#define | APPLETEMP ".AppleTempXXXXXX" |
Functions | |
static int | default_type (void *finder) |
void * | get_finderinfo (const struct vol *vol, const char *upath, struct adouble *adp, void *data, int islink) |
char * | set_name (const struct vol *vol, char *data, cnid_t pid, char *name, cnid_t id, uint32_t utf8) |
uint32_t | get_id (struct vol *vol, struct adouble *adp, const struct stat *st, const cnid_t did, const char *upath, const int len) |
Get CNID for did/upath args both from database and adouble file. | |
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) |
int | getfilparams (const AFPObj *obj, struct vol *vol, uint16_t bitmap, struct path *path, struct dir *dir, char *buf, size_t *buflen, int in_enumerate) |
int | afp_createfile (AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen) |
int | afp_setfilparams (AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen) |
int | setfilparams (const AFPObj *obj, struct vol *vol, struct path *path, uint16_t f_bitmap, char *buf) |
int | renamefile (struct vol *vol, struct dir *ddir, int sdir_fd, char *src, char *dst, char *newname, struct adouble *adp) |
size_t | mtoUTF8 (const struct vol *vol, const char *src, size_t srclen, char *dest, size_t destlen) |
int | copy_path_name (const struct vol *vol, char *newname, char *ibuf) |
int | afp_copyfile (AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen) |
int | copyfile (struct vol *s_vol, struct vol *d_vol, struct dir *d_dir, int sfd, char *src, char *dst, char *newname, struct adouble *adp) |
static int | check_attrib (const struct vol *vol, struct adouble *adp) |
int | deletefile (const struct vol *vol, int dirfd, char *file, int checkAttrib) |
int | afp_createid (AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *rbuflen) |
static int | reenumerate_loop (struct dirent *de, char *mname _U_, void *data) |
static int | reenumerate_id (struct vol *vol, char *name, struct dir *dir) |
int | afp_resolveid (AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *rbuflen) |
int | afp_deleteid (AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen) |
static struct adouble * | find_adouble (const AFPObj *obj, struct vol *vol, struct path *path, struct ofork **of, struct adouble *adp) |
int | afp_exchangefiles (AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen) |
Variables | |
const uint8_t | ufinderi [ADEDLEN_FINDERI] |
static const uint8_t | old_ufinderi [] |
struct path | Cur_Path |
#define APPLETEMP ".AppleTempXXXXXX" |
#define PARAM_NEED_ADP | ( | b | ) |
int afp_copyfile | ( | AFPObj * | obj, |
char * | ibuf, | ||
size_t ibuflen | _U_, | ||
char *rbuf | _U_, | ||
size_t * | rbuflen ) |
int afp_createfile | ( | AFPObj * | obj, |
char * | ibuf, | ||
size_t ibuflen | _U_, | ||
char *rbuf | _U_, | ||
size_t * | rbuflen ) |
int afp_createid | ( | AFPObj *obj | _U_, |
char * | ibuf, | ||
size_t ibuflen | _U_, | ||
char * | rbuf, | ||
size_t * | rbuflen ) |
int afp_deleteid | ( | AFPObj *obj | _U_, |
char * | ibuf, | ||
size_t ibuflen | _U_, | ||
char *rbuf | _U_, | ||
size_t * | rbuflen ) |
int afp_exchangefiles | ( | AFPObj * | obj, |
char * | ibuf, | ||
size_t ibuflen | _U_, | ||
char *rbuf | _U_, | ||
size_t * | rbuflen ) |
int afp_resolveid | ( | AFPObj * | obj, |
char * | ibuf, | ||
size_t ibuflen | _U_, | ||
char * | rbuf, | ||
size_t * | rbuflen ) |
int afp_setfilparams | ( | AFPObj * | obj, |
char * | ibuf, | ||
size_t ibuflen | _U_, | ||
char *rbuf | _U_, | ||
size_t * | rbuflen ) |
int copy_path_name | ( | const struct vol * | vol, |
char * | newname, | ||
char * | ibuf ) |
int copyfile | ( | struct vol * | s_vol, |
struct vol * | d_vol, | ||
struct dir * | d_dir, | ||
int | sfd, | ||
char * | src, | ||
char * | dst, | ||
char * | newname, | ||
struct adouble * | adp ) |
|
static |
int deletefile | ( | const struct vol * | vol, |
int | dirfd, | ||
char * | file, | ||
int | checkAttrib ) |
|
static |
void * get_finderinfo | ( | const struct vol * | vol, |
const char * | upath, | ||
struct adouble * | adp, | ||
void * | data, | ||
int | islink ) |
Only enter if no appledouble information and no finder information found.
uint32_t get_id | ( | struct vol * | vol, |
struct adouble * | adp, | ||
const struct stat * | st, | ||
const cnid_t | did, | ||
const char * | upath, | ||
const int | len ) |
Get CNID for did/upath args both from database and adouble file.
vol | (rw) volume |
adp | (rw) adouble struct of object upath, might be NULL |
st | (r) stat of upath, must NOT be NULL |
did | (r) parent CNID of upath |
upath | (r) name of object |
len | (r) strlen of upath |
int getfilparams | ( | const AFPObj * | obj, |
struct vol * | vol, | ||
uint16_t | bitmap, | ||
struct path * | path, | ||
struct dir * | dir, | ||
char * | buf, | ||
size_t * | buflen, | ||
int | in_enumerate ) |
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 ) |
size_t mtoUTF8 | ( | const struct vol * | vol, |
const char * | src, | ||
size_t | srclen, | ||
char * | dest, | ||
size_t | destlen ) |
|
static |
int renamefile | ( | struct vol * | vol, |
struct dir * | ddir, | ||
int | sdir_fd, | ||
char * | src, | ||
char * | dst, | ||
char * | newname, | ||
struct adouble * | adp ) |
char * set_name | ( | const struct vol * | vol, |
char * | data, | ||
cnid_t | pid, | ||
char * | name, | ||
cnid_t | id, | ||
uint32_t | utf8 ) |
int setfilparams | ( | const AFPObj * | obj, |
struct vol * | vol, | ||
struct path * | path, | ||
uint16_t | f_bitmap, | ||
char * | buf ) |
|
extern |
|
static |
const uint8_t ufinderi[ADEDLEN_FINDERI] |